Unbreak nios2-*-linux* GDB testing.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e57bb7a0
PL
12015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2
3 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4 function, return 1.
5 (the_low_target): Install it.
6
586b02a9
PA
72015-07-14 Pedro Alves <palves@redhat.com>
8
9 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10 Instead, ignore ECHILD, and throw an error for other errnos.
11
58c1b36c
PA
122015-07-10 Pedro Alves <palves@redhat.com>
13
14 * event-loop.c (struct callback_event) <data>: Change type to
15 gdb_client_data instance instead of gdb_client_data pointer.
16 (append_callback_event): Adjust.
17
421530db
PL
182015-07-10 Pierre Langlois <pierre.langlois@arm.com>
19
20 * linux-aarch64-low.c: Add comments for each linux_target_ops
21 method. Remove comments already covered in target_ops and
22 linux_target_ops definitions.
23 (the_low_target): Add comments for each unimplemented method.
24
c2d65f38
YQ
252015-07-09 Yao Qi <yao.qi@linaro.org>
26
27 * linux-aarch64-low.c (aarch64_regmap): Remove.
28 (aarch64_usrregs_info): Remove.
29 (regs_info): Set field usrregs to NULL.
30
b20a6524
MM
312015-07-02 Markus Metzger <markus.t.metzger@intel.com>
32
33 * linux-low.c: Include "rsp-low.h"
34 (linux_low_encode_pt_config, linux_low_encode_raw): New.
35 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
36 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
37 (handle_btrace_enable_pt): New.
38 (handle_btrace_general_set): Support "pt".
39 (handle_btrace_conf_general_set): Support "pt:size".
40
96c97461
PL
412015-06-29 Pierre Langlois <pierre.langlois@arm.com>
42
43 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
44 Z_PACKET_SW_BP.
45
37d66942
PL
462015-06-29 Pierre Langlois <pierre.langlois@arm.com>
47
48 * linux-aarch64-low.c: Remove comment about endianness.
49 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
50 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
51 memcmp.
52
dc06243f
GB
532015-06-24 Gary Benson <gbenson@redhat.com>
54
55 * linux-i386-ipa.c (stdint.h): Do not include.
56 * lynx-i386-low.c (stdint.h): Likewise.
57 * lynx-ppc-low.c (stdint.h): Likewise.
58 * mem-break.c (stdint.h): Likewise.
59 * thread-db.c (stdint.h): Likewise.
60 * tracepoint.c (stdint.h): Likewise.
61 * win32-low.c (stdint.h): Likewise.
62
124e13d9
SM
632015-06-18 Simon Marchi <simon.marchi@ericsson.com>
64
65 * server.c (write_qxfer_response): Update call to
66 remote_escape_output.
67
909c2cda
JK
682015-06-15 Aleksandar Ristovski <aristovski@qnx.com
69 Jan Kratochvil <jan.kratochvil@redhat.com>
70
71 Merge multiple hex conversions.
72 * gdbreplay.c (tohex): Rename to 'fromhex'.
73 (logchar): Use fromhex.
74
24c05f46
JK
752015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
76
77 * server.c (handle_qxfer_libraries): Set `version' attribute for
78 <library-list>.
79
14d2069a
GB
802015-06-10 Gary Benson <gbenson@redhat.com>
81
82 * target.h (struct target_ops) <multifs_open>: New field.
83 <multifs_unlink>: Likewise.
84 <multifs_readlink>: Likewise.
85 * linux-low.c (nat/linux-namespaces.h): New include.
86 (linux_target_ops): Initialize the_target->multifs_open,
87 the_target->multifs_unlink and the_target->multifs_readlink.
88 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
89 * hostio.c (hostio_fs_pid): New static variable.
90 (hostio_handle_new_gdb_connection): New function.
91 (handle_setfs): Likewise.
92 (handle_open): Use the_target->multifs_open as appropriate.
93 (handle_unlink): Use the_target->multifs_unlink as appropriate.
94 (handle_readlink): Use the_target->multifs_readlink as
95 appropriate.
96 (handle_vFile): Handle vFile:setfs packets.
97 * server.c (handle_query): Call hostio_handle_new_gdb_connection
98 after target_handle_new_gdb_connection.
99
4b8b5e72
GB
1002015-06-10 Gary Benson <gbenson@redhat.com>
101
102 * configure.ac (AC_CHECK_FUNCS): Add setns.
103 * config.in: Regenerate.
104 * configure: Likewise.
105 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
106 (linux-namespaces.o): New rule.
107 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
108
3ac2e371
GB
1092015-06-09 Gary Benson <gbenson@redhat.com>
110
111 * hostio.c (handle_open): Process mode argument with
112 fileio_to_host_mode.
113
ca9b78ce
YQ
1142015-06-01 Yao Qi <yao.qi@linaro.org>
115
116 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
117 * linux-x86-low.c: Likewise.
118
bfacd19d
DB
1192015-05-28 Don Breazeal <donb@codesourcery.com>
120
121 * linux-low.c (handle_extended_wait): Initialize
122 thread_info.last_resume_kind for new fork children.
123
452003ef
PA
1242015-05-15 Pedro Alves <palves@redhat.com>
125
126 * target.h (target_handle_new_gdb_connection): Rewrite using if
127 wrapped in do/while.
128
1041a03c
JB
1292015-05-14 Joel Brobecker <brobecker@adacore.com>
130
131 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
132 * configure, config.in: Regenerate.
133 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
134 Declare typedef.
135
c269dbdb
DB
1362015-05-12 Don Breazeal <donb@codesourcery.com>
137
138 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
139 PTRACE_EVENT_VFORK_DONE.
140 (linux_low_ptrace_options, extended_event_reported): Add vfork
141 events.
142 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
143 and "vforkdone" for RSP 'T' Stop Reply Packet.
144 * server.h (report_vfork_events): Declare
145 global variable.
146
3a8a0396
DB
1472015-05-12 Don Breazeal <donb@codesourcery.com>
148
149 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
150 (the_low_target) <new_fork>: Initialize new member.
151 * linux-arm-low.c (arm_new_fork): New function.
152 (the_low_target) <new_fork>: Initialize new member.
153 * linux-low.c (handle_extended_wait): Call new target function
154 new_fork.
155 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
156 * linux-mips-low.c (mips_add_watchpoint): New function
157 extracted from mips_insert_point.
158 (the_low_target) <new_fork>: Initialize new member.
159 (mips_linux_new_fork): New function.
160 (mips_insert_point): Call mips_add_watchpoint.
161 * linux-x86-low.c (x86_linux_new_fork): New function.
162 (the_low_target) <new_fork>: Initialize new member.
163
de0d863e
DB
1642015-05-12 Don Breazeal <donb@codesourcery.com>
165
166 * linux-low.c (handle_extended_wait): Implement return value,
167 rename argument 'event_child' to 'event_lwp', handle
168 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
169 (linux_low_ptrace_options): New function.
170 (linux_low_filter_event): Call linux_low_ptrace_options,
171 use different argument fo linux_enable_event_reporting,
172 use return value from handle_extended_wait.
173 (extended_event_reported): New function.
174 (linux_wait_1): Call extended_event_reported and set
175 status to report fork events.
176 (linux_write_memory): Add pid to debug message.
177 (reset_lwp_ptrace_options_callback): New function.
178 (linux_handle_new_gdb_connection): New function.
179 (linux_target_ops): Initialize new structure member.
180 * linux-low.h (struct lwp_info) <waitstatus>: New member.
181 * lynx-low.c: Initialize new structure member.
182 * remote-utils.c (prepare_resume_reply): Implement stop reason
183 "fork" for "T" stop message.
184 * server.c (handle_query): Call handle_new_gdb_connection.
185 * server.h (report_fork_events): Declare global flag.
186 * target.h (struct target_ops) <handle_new_gdb_connection>:
187 New member.
188 (target_handle_new_gdb_connection): New macro.
189 * win32-low.c: Initialize new structure member.
190
ddcbc397
DB
1912015-05-12 Don Breazeal <donb@codesourcery.com>
192
193 * mem-break.c (APPEND_TO_LIST): Define macro.
194 (clone_agent_expr): New function.
195 (clone_one_breakpoint): New function.
196 (clone_all_breakpoints): New function.
197 * mem-break.h: Declare new functions.
198
89245bc0
DB
1992015-05-12 Don Breazeal <donb@codesourcery.com>
200
201 * linux-low.c (linux_supports_fork_events): New function.
202 (linux_supports_vfork_events): New function.
203 (linux_target_ops): Initialize new structure members.
204 (initialize_low): Call linux_check_ptrace_features.
205 * lynx-low.c (lynx_target_ops): Initialize new structure
206 members.
207 * server.c (report_fork_events, report_vfork_events):
208 New global flags.
209 (handle_query): Add new features to qSupported packet and
210 response.
211 (captured_main): Initialize new global variables.
212 * target.h (struct target_ops) <supports_fork_events>:
213 New member.
214 <supports_vfork_events>: New member.
215 (target_supports_fork_events): New macro.
216 (target_supports_vfork_events): New macro.
217 * win32-low.c (win32_target_ops): Initialize new structure
218 members.
219
835205d0
GB
2202015-05-12 Gary Benson <gbenson@redhat.com>
221
222 * server.c (handle_qxfer_exec_file): Use current process
223 if annex is empty.
224
21e94bd9
SL
2252015-05-08 Sandra Loosemore <sandra@codesourcery.com>
226
227 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
228 Remove HAVE_PTRACE_GETREGS conditionals.
229 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
230 instead of PTRACE_GETREGS and PTRACE_SETREGS.
231
45614f15
YQ
2322015-05-08 Yao Qi <yao.qi@linaro.org>
233
234 * linux-low.c (linux_supports_conditional_breakpoints): New
235 function.
236 (linux_target_ops): Install new target method.
237 * lynx-low.c (lynx_target_ops): Install NULL hook for
238 supports_conditional_breakpoints.
239 * nto-low.c (nto_target_ops): Likewise.
240 * spu-low.c (spu_target_ops): Likewise.
241 * win32-low.c (win32_target_ops): Likewise.
242 * server.c (handle_query): Check
243 target_supports_conditional_breakpoints.
244 * target.h (struct target_ops) <supports_conditional_breakpoints>:
245 New field.
246 (target_supports_conditional_breakpoints): New macro.
247
80ad801e
PA
2482015-05-06 Pedro Alves <palves@redhat.com>
249
250 PR server/18081
251 * server.c (start_inferior): If the process exits, mourn it.
252
819843c7
GB
2532015-04-21 Gary Benson <gbenson@redhat.com>
254
255 * hostio.c (fileio_open_flags_to_host): Factored out to
256 fileio_to_host_openflags in common/fileio.c. Single use
257 updated.
258
a2d5a9d7
MF
2592015-04-17 Max Filippov <jcmvbkbc@gmail.com>
260
261 * linux-xtensa-low.c (xtensa_fill_gregset)
262 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
263 XCHAL_HAVE_LOOP.
264
deb44829
MF
2652015-04-17 Max Filippov <jcmvbkbc@gmail.com>
266
267 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
268 (regs_info): Replace usrregs pointer with NULL.
269
e57f1de3
GB
2702015-04-17 Gary Benson <gbenson@redhat.com>
271
272 * target.h (struct target_ops) <pid_to_exec_file>: New field.
273 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
274 * server.c (handle_qxfer_exec_file): New function.
275 (qxfer_packets): Add exec-file entry.
276 (handle_query): Report qXfer:exec-file:read as supported packet.
277
62828379
RN
2782015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
279
280 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
281
b88bb450
GB
2822015-04-09 Gary Benson <gbenson@redhat.com>
283
284 * hostio-errno.c (errno_to_fileio_error): Remove function.
285 Update caller to use remote_fileio_to_fio_error.
286
c8f4bfdd
YQ
2872015-04-09 Yao Qi <yao.qi@linaro.org>
288
289 * linux-low.c (linux_insert_point): Call
290 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
291 (linux_remove_point): Call remove_memory_breakpoint if type is
292 raw_bkpt_type_sw.
293 * linux-x86-low.c (x86_insert_point): Don't call
294 insert_memory_breakpoint.
295 (x86_remove_point): Don't call remove_memory_breakpoint.
296
41f98f02
PA
2972015-04-01 Pedro Alves <palves@redhat.com>
298 Cleber Rosa <crosa@redhat.com>
299
300 * server.c (gdbserver_usage): Reorganize and extend the usage
301 message.
302
2bf6fb9d
PA
3032015-03-24 Pedro Alves <palves@redhat.com>
304
305 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
306 output. Also dump TRAP_TRACE.
307 (linux_low_filter_event): In debug output, distinguish a
308 resume_stop SIGSTOP from a delayed SIGSTOP.
309
369f6daa
GB
3102015-03-24 Gary Benson <gbenson@redhat.com>
311
312 * linux-x86-low.c (x86_linux_new_thread): Moved to
313 nat/x86-linux.c.
314 (x86_linux_prepare_to_resume): Likewise.
315
8e5d4070
GB
3162015-03-24 Gary Benson <gbenson@redhat.com>
317
318 * Makefile.in (x86-linux-dregs.o): New rule.
319 * configure.srv: Add x86-linux-dregs.o to relevant targets.
320 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
321 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
322 (x86_linux_dr_get): Likewise.
323 (x86_linux_dr_set): Likewise.
324 (update_debug_registers_callback): Likewise.
325 (x86_linux_dr_set_addr): Likewise.
326 (x86_linux_dr_get_addr): Likewise.
327 (x86_linux_dr_set_control): Likewise.
328 (x86_linux_dr_get_control): Likewise.
329 (x86_linux_dr_get_status): Likewise.
330 (x86_linux_update_debug_registers): Likewise.
331
2b95d440
GB
3322015-03-24 Gary Benson <gbenson@redhat.com>
333
334 * linux-x86-low.c (x86_linux_update_debug_registers):
335 New function, factored out from...
336 (x86_linux_prepare_to_resume): ...this.
337
14b0bc68
GB
3382015-03-24 Gary Benson <gbenson@redhat.com>
339
340 * linux-x86-low.c (x86_linux_dr_get): Update comments.
341 (x86_linux_dr_set): Likewise.
342 (update_debug_registers_callback): Likewise.
343 (x86_linux_dr_set_addr): Likewise.
344 (x86_linux_dr_get_addr): Likewise.
345 (x86_linux_dr_set_control): Likewise.
346 (x86_linux_dr_get_control): Likewise.
347 (x86_linux_dr_get_status): Likewise.
348 (x86_linux_prepare_to_resume): Likewise.
349
5dfe6ca8
GB
3502015-03-24 Gary Benson <gbenson@redhat.com>
351
352 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
353 Use perror_with_name. Pass string through gettext.
354 (x86_linux_dr_set): Likewise.
355
d33472ad
GB
3562015-03-24 Gary Benson <gbenson@redhat.com>
357
358 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
359 (x86_linux_dr_set_addr): ...this.
360 (x86_dr_low_get_addr): Rename to...
361 (x86_linux_dr_get_addr): ...this.
362 (x86_dr_low_set_control): Rename to...
363 (x86_linux_dr_set_control): ...this.
364 (x86_dr_low_get_control): Rename to...
365 (x86_linux_dr_get_control): ...this.
366 (x86_dr_low_get_status): Rename to...
367 (x86_linux_dr_get_status): ...this.
368 (x86_dr_low): Update with new function names.
369
4b134ca1
GB
3702015-03-24 Gary Benson <gbenson@redhat.com>
371
372 * Makefile.in (x86-linux.o): New rule.
373 * configure.srv: Add x86-linux.o to relevant targets.
374 * linux-low.c (lwp_set_arch_private_info): New function.
375 (lwp_arch_private_info): Likewise.
376 * linux-x86-low.c: Include nat/x86-linux.h.
377 (arch_lwp_info): Removed structure.
378 (update_debug_registers_callback):
379 Use lwp_set_debug_registers_changed.
380 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
381 and lwp_set_debug_registers_changed.
382 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
383
34c703da
GB
3842015-03-24 Gary Benson <gbenson@redhat.com>
385
386 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
387 * linux-arm-low.c (arm_new_thread): Likewise.
388 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
389 * linux-mips-low.c (mips_linux_new_thread): Likewise.
390 * linux-x86-low.c (x86_linux_new_thread): Likewise.
391 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
392
cff068da
GB
3932015-03-24 Gary Benson <gbenson@redhat.com>
394
395 * linux-low.c (ptid_of_lwp): New function.
396 (lwp_is_stopped): Likewise.
397 (lwp_stop_reason): Likewise.
398 * linux-x86-low.c (update_debug_registers_callback):
399 Use lwp_is_stopped.
400 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
401 lwp_stop_reason.
402
b2f7c7e8
GB
4032015-03-24 Gary Benson <gbenson@redhat.com>
404
405 * linux-low.h (linux_stop_lwp): Remove declaration.
406
6d4ee8c6
GB
4072015-03-24 Gary Benson <gbenson@redhat.com>
408
409 * linux-low.h: Include nat/linux-nat.h.
410 * linux-low.c (iterate_over_lwps_args): New structure.
411 (iterate_over_lwps_filter): New function.
412 (iterate_over_lwps): Likewise.
413 * linux-x86-low.c (update_debug_registers_callback):
414 Update signature to what iterate_over_lwps expects.
415 Remove PID check that iterate_over_lwps now performs.
416 (x86_dr_low_set_addr): Use iterate_over_lwps.
417 (x86_dr_low_set_control): Likewise.
418
70a0bb6b
GB
4192015-03-24 Gary Benson <gbenson@redhat.com>
420
421 * linux-x86-low.c (x86_debug_reg_state): New function.
422 (x86_linux_prepare_to_resume): Use the above.
423
7b669087
GB
4242015-03-24 Gary Benson <gbenson@redhat.com>
425
426 * linux-low.c (current_lwp_ptid): New function.
427 * linux-x86-low.c: Include nat/linux-nat.h.
428 (x86_dr_low_get_addr): Use current_lwp_ptid.
429 (x86_dr_low_get_control): Likewise.
430 (x86_dr_low_get_status): Likewise.
431
eef49a3d
PA
4322015-03-20 Pedro Alves <palves@redhat.com>
433
434 * tracepoint.c (cmd_qtstatus): Make "str" const.
435
b2333d22
PA
4362015-03-20 Pedro Alves <palves@redhat.com>
437
438 * server.c (handle_general_set): Make "req_str" const.
439
23f238d3
PA
4402015-03-19 Pedro Alves <palves@redhat.com>
441
442 * linux-low.c (linux_resume_one_lwp): Rename to ...
443 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
444 instead call perror_with_name.
445 (check_ptrace_stopped_lwp_gone): New function.
446 (linux_resume_one_lwp): Reimplement as wrapper around
447 linux_resume_one_lwp_throw that swallows errors if the LWP is
448 gone.
449
91baf43f
PA
4502015-03-19 Pedro Alves <palves@redhat.com>
451
452 * linux-low.c (count_events_callback, select_event_lwp_callback):
453 No longer check whether the thread has resume_stop as last resume
454 kind.
455
8bf3b159
PA
4562015-03-19 Pedro Alves <palves@redhat.com>
457
458 * linux-low.c (count_events_callback, select_event_lwp_callback):
459 Use the lwp's status_pending_p field, not the thread's.
460
b90fc188
PA
4612015-03-19 Pedro Alves <palves@redhat.com>
462
463 * linux-low.c (select_event_lwp_callback): Update comments to
464 no longer mention SIGTRAP.
465
464b0089
GB
4662015-03-18 Gary Benson <gbenson@redhat.com>
467
468 * server.c (handle_query): Do not report vFile:fstat as supported.
469
aa9e327f
GB
4702015-03-11 Gary Benson <gbenson@redhat.com>
471
472 * hostio.c (sys/types.h): New include.
473 (sys/stat.h): Likewise.
474 (common-remote-fileio.h): Likewise.
475 (handle_fstat): New function.
476 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 477
791c0056
GB
4782015-03-11 Gary Benson <gbenson@redhat.com>
479
480 * configure.ac (AC_CHECK_MEMBERS): Add checks for
481 struct stat.st_blocks and struct stat.st_blksize.
482 * configure: Regenerate.
483 * config.in: Likewise.
484 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
485 (OBS): Add common-remote-fileio.o.
486 (common-remote-fileio.o): New rule.
487
9a9df970
PA
4882015-03-09 Pedro Alves <palves@redhat.com>
489
490 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
491 'struct sockaddr' pointer in 'accept' call.
492
9eb1356e
PA
4932015-03-09 Pedro Alves <palves@redhat.com>
494
495 Revert:
496 2015-03-07 Pedro Alves <palves@redhat.com>
497 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
498 or <winsock2.h> here. Instead include "gdb_socket.h".
499 (remote_open): Use union gdb_sockaddr_u.
500 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
501 or <winsock2.h> here. Instead include "gdb_socket.h".
502 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
503 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
504 or <sys/un.h>.
505 (init_named_socket, gdb_agent_helper_thread): Use union
506 gdb_sockaddr_u.
507
aac331e4
PA
5082015-03-07 Pedro Alves <palves@redhat.com>
509
510 * configure.ac (build_warnings): Move
511 -Wdeclaration-after-statement to the C-specific set.
512 * configure: Regenerate.
513
366c75fc
PA
5142015-03-07 Pedro Alves <palves@redhat.com>
515
516 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
517 or <winsock2.h> here. Instead include "gdb_socket.h".
518 (remote_open): Use union gdb_sockaddr_u.
519 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
520 or <winsock2.h> here. Instead include "gdb_socket.h".
521 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
522 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
523 or <sys/un.h>.
524 (init_named_socket, gdb_agent_helper_thread): Use union
525 gdb_sockaddr_u.
526
492d29ea
PA
5272015-03-07 Pedro Alves <palves@redhat.com>
528
529 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
530 instead.
531
60a191ed
YQ
5322015-03-06 Yao Qi <yao.qi@linaro.org>
533
534 * linux-aarch64-low.c (aarch64_insert_point): Use
535 show_debug_regs as a boolean.
536 (aarch64_remove_point): Likewise.
537
f5771b1d
PA
5382015-03-05 Pedro Alves <palves@redhat.com>
539
540 * lynx-low.c (lynx_target_ops): Install NULL hooks for
541 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
542 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
543 * nto-low.c (nto_target_ops): Likewise.
544 * spu-low.c (spu_target_ops): Likewise.
545 * win32-low.c (win32_target_ops): Likewise.
546
3e572f71
PA
5472015-03-04 Pedro Alves <palves@redhat.com>
548
549 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
550 Decide whether a breakpoint triggered based on the SIGTRAP's
551 siginfo.si_code.
552 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
553 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
554 (linux_low_filter_event): Check for breakpoints before checking
555 watchpoints.
556 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
557 siginfo.si_code.
558 (linux_stopped_by_sw_breakpoint)
559 (linux_supports_stopped_by_sw_breakpoint)
560 (linux_stopped_by_hw_breakpoint)
561 (linux_supports_stopped_by_hw_breakpoint): New functions.
562 (linux_target_ops): Install new target methods.
563
1ec68e26
PA
5642015-03-04 Pedro Alves <palves@redhat.com>
565
566 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
567 * server.c (swbreak_feature, hwbreak_feature): New globals.
568 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
569 (captured_main): Clear swbreak_feature and hwbreak_feature.
570 * server.h (swbreak_feature, hwbreak_feature): Declare.
571 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
572 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
573 supports_stopped_by_hw_breakpoint>: New fields.
574 (target_supports_stopped_by_sw_breakpoint)
575 (target_stopped_by_sw_breakpoint)
576 (target_supports_stopped_by_hw_breakpoint)
577 (target_stopped_by_hw_breakpoint): Declare.
578
15c66dd6
PA
5792015-03-04 Pedro Alves <palves@redhat.com>
580
581 enum lwp_stop_reason -> enum target_stop_reason
582 * linux-low.c (check_stopped_by_breakpoint): Adjust.
583 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
584 (linux_wait_1, stuck_in_jump_pad_callback)
585 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
586 (linux_stopped_by_watchpoint):
587 * linux-low.h (enum lwp_stop_reason): Delete.
588 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
589 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
590
98fc70d6
YQ
5912015-03-04 Yao Qi <yao.qi@linaro.org>
592
593 * Makefile.in (SFILES): Add linux-aarch64-low.c.
594
dd2ac174
GB
5952015-03-03 Gary Benson <gbenson@redhat.com>
596
597 * hostio.c (handle_vFile): Fix prefix lengths.
598
d68e53f4
MM
5992015-03-03 Markus Metzger <markus.t.metzger@intel.com>
600
601 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
602 ptr_bits.
603
bf2d68ab
AA
6042015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
605
606 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
607 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
608 (clean): Add "rm -f" for above C files.
609 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
610 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
611 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
612 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
613 * linux-s390-low.c (HWCAP_S390_VX): New macro.
614 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
615 (init_registers_s390x_vx_linux64)
616 (init_registers_s390x_tevx_linux64)
617 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
618 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
619 declarations.
620 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
621 (s390_store_vxrs_high): New functions.
622 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
623 NT_S390_VXRS_HIGH.
624 (s390_arch_setup): Add logic for selecting one of the new target
625 descriptions. Activate the new vector regsets if applicable.
626 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
627 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
628 and init_registers_s390x_tevx_linux64.
629
c966a859
PA
6302015-03-01 Pedro Alves <palves@redhat.com>
631
632 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
633 parameter.
634
4180215b
PA
6352015-02-27 Pedro Alves <palves@redhat.com>
636
637 * linux-x86-low.c (u_debugreg_offset): New function.
638 (x86_linux_dr_get, x86_linux_dr_set): Use it.
639
749bab01
PA
6402015-02-27 Pedro Alves <palves@redhat.com>
641
642 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
643 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
644 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
645 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
646 (ps_lsetfpregs, ps_getpid)
647 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
648 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
649 (ps_lsetxregs, ps_plog): Declare.
650
3c14e5a3
PA
6512015-02-27 Pedro Alves <palves@redhat.com>
652
653 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
654 IP_AGENT_EXPORT_FUNC.
655 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
656 IP_AGENT_EXPORT_FUNC.
657 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
658 (IP_AGENT_EXPORT): Delete.
659 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
660 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
661 (gdb_trampoline_buffer_error, collecting, gdb_collect)
662 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
663 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
664 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
665 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
666 (traceframe_read_count, traceframe_write_count)
667 (traceframes_created, trace_state_variables, get_raw_reg)
668 (get_trace_state_variable_value, set_trace_state_variable_value)
669 (ust_loaded, helper_thread_id, cmd_buf): Use
670 IPA_SYM_EXPORTED_NAME.
671 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
672 (tracepoints) Use IP_AGENT_EXPORT_VAR.
673 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
674 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
675 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
676 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
677 EXTERN_C_PUSH/EXTERN_C_POP.
678 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
679 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
680 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
681 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
682 (traceframe_write_count, traceframe_read_count)
683 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
684 (about_to_request_buffer_space, get_trace_state_variable_value)
685 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
686 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
687 EXTERN_C_PUSH/EXTERN_C_POP.
688 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
689 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
690 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
691 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
692 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
693 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
694 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
695 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
696 Define.
697 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
698 (IP_AGENT_EXPORT_VAR_DECL): Define.
699 (tracing): Declare.
700 (gdb_agent_get_raw_reg): Declare.
701
fe978cb0
PA
7022015-02-27 Tom Tromey <tromey@redhat.com>
703 Pedro Alves <palves@redhat.com>
704
705 Rename symbols whose names are reserved C++ keywords throughout.
706
3bc3d82a
PA
7072015-02-27 Pedro Alves <palves@redhat.com>
708
709 * Makefile.in (COMPILER): New, get it from autoconf.
710 (CXX): Get from autoconf instead.
711 (COMPILE.pre): Use COMPILER.
712 (CC-LD): Rename to ...
713 (CC_LD): ... this. Use COMPILER.
714 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
715 (CXX_FOR_TARGET): Default to g++ instead of gcc.
716 * acinclude.m4: Include build-with-cxx.m4.
717 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
718 Disable -Werror by default if building in C++ mode.
719 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
720 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
721 the C++ compiler. Save/restore CXXFLAGS too.
722 * configure: Regenerate.
723
07697489
PA
7242015-02-27 Pedro Alves <palves@redhat.com>
725
726 * acinclude.m4: Include libiberty.m4.
727 * configure.ac: Call libiberty_INIT.
728 * config.in, configure: Regenerate.
729
9beb7c4e
PA
7302015-02-26 Pedro Alves <palves@redhat.com>
731
732 * linux-low.c (linux_wait_1): When incrementing the PC past a
733 program breakpoint always use the_low_target.breakpoint_len as
734 increment, rather than the maximum between that and
735 the_low_target.decr_pc_after_break.
736
8090aef2
PA
7372015-02-23 Pedro Alves <palves@redhat.com>
738
739 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
740 thread was doing a step-over; always adjust the PC if
741 we stepped over a permanent breakpoint.
742 (linux_wait_1): If we stepped over breakpoint that was on top of a
743 permanent breakpoint, manually advance the PC past it.
744
bc9540e8
PA
7452015-02-23 Pedro Alves <palves@redhat.com>
746
747 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
748 modes.
749 (x86_fill_gregset, x86_store_gregset): Use it when handling
750 $orig_eax.
751
2db9a427
PA
7522015-02-20 Pedro Alves <palves@redhat.com>
753
754 * thread-db.c: Include "nat/linux-procfs.h".
755 (thread_db_init): Skip listing new threads if the kernel supports
756 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
757
afa8d396
PA
7582015-02-20 Pedro Alves <palves@redhat.com>
759
760 * linux-low.c (status_pending_p_callback): Use ptid_match.
761
c9587f88
AT
7622015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
763
764 PR breakpoints/16812
765 * linux-low.c (wstatus_maybe_breakpoint): Remove.
766 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
767 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
768
b05ec7a5
AT
7692015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
770
771 PR breakpoints/15956
772 * tracepoint.c (cmd_qtinit): Add check for current_thread.
773
d33501a5
MM
7742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
775
776 * linux-low.c (linux_low_btrace_conf): Print size.
777 * server.c (handle_btrace_conf_general_set): New.
778 (hanle_general_set): Call handle_btrace_conf_general_set.
779 (handle_query): Report Qbtrace-conf:bts:size as supported.
780
f4abbc16
MM
7812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
782
783 * linux-low.c (linux_low_enable_btrace): Update parameters.
784 (linux_low_btrace_conf): New.
785 (linux_target_ops)<to_btrace_conf>: Initialize.
786 * server.c (current_btrace_conf): New.
787 (handle_btrace_enable): Rename to ...
788 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
789 to target_enable_btrace. Update comment. Update users.
790 (handle_qxfer_btrace_conf): New.
791 (qxfer_packets): Add btrace-conf entry.
792 (handle_query): Report qXfer:btrace-conf:read as supported packet.
793 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
794 (target_ops)<read_btrace_conf>: New.
795 (target_enable_btrace): Update parameters.
796 (target_read_btrace_conf): New.
797
043c3577
MM
7982015-02-09 Markus Metzger <markus.t.metzger@intel.com>
799
800 * server.c (handle_btrace_general_set): Remove call to
801 target_supports_btrace.
802 (supported_btrace_packets): New.
803 (handle_query): Call supported_btrace_packets.
804 * target.h: include btrace-common.h.
805 (btrace_target_info): Removed.
806 (supports_btrace, target_supports_btrace): Update parameters.
807
734b0e4b
MM
8082015-02-09 Markus Metzger <markus.t.metzger@intel.com>
809
810 * Makefile.in (SFILES): Add common/btrace-common.c.
811 (OBS): Add common/btrace-common.o.
812 (btrace-common.o): Add build rules.
813 * linux-low: Include btrace-common.h.
814 (linux_low_read_btrace): Use struct btrace_data. Call
815 btrace_data_init and btrace_data_fini.
816
d6c146e9
PA
8172015-02-06 Pedro Alves <palves@redhat.com>
818
819 * thread-db.c (find_new_threads_callback): Add debug output.
820
20ba1ce6
PA
8212015-02-04 Pedro Alves <palves@redhat.com>
822
823 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
824 (resume_stopped_resumed_lwps): New function.
825 (linux_wait_for_event_filtered): Use it.
826
8cc73a39
SDJ
8272015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
828
829 * Makefile.in (SFILES): Add linux-personality.c.
830 (linux-personality.o): New rule.
831 * configure.srv (srv_linux_obj): Add linux-personality.o to the
832 list of objects to be built.
833 * linux-low.c: Include nat/linux-personality.h.
834 (linux_create_inferior): Remove code to disable address space
835 randomization (moved to ../nat/linux-personality.c). Create
836 cleanup to disable address space randomization.
837
fb23d554
SDJ
8382015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
839
840 * Makefile.in (posix-strerror.o): New rule.
841 (mingw-strerror.o): Likewise.
842 * configure: Regenerated.
843 * configure.ac: Source file ../common/common.host. Initialize new
844 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
845
cdf43629
YQ
8462015-01-14 Yao Qi <yao@codesourcery.com>
847
848 * Makefile.in (SFILES): Add nat/ppc-linux.c.
849 (ppc-linux.o): New rule.
850 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
851 * configure.ac: AC_CHECK_FUNCS(getauxval).
852 * config.in: Re-generated.
853 * configure: Re-generated.
854 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
855 ppc64_64bit_inferior_p
856
514c5338
YQ
8572015-01-14 Yao Qi <yao@codesourcery.com>
858
859 * linux-ppc-low.c: Include "nat/ppc-linux.h".
860 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
861 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
862 (PT_ORIG_R3, PT_TRAP): Likewise.
863 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
864 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
865 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
866
3368c1e5
JB
8672015-01-10 Joel Brobecker <brobecker@adacore.com>
868
869 * i387-fp.c (i387_cache_to_xsave): In look over
870 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
871 zmmh_low_space field by use of zmmh_high_space.
872
582511be
PA
8732015-01-09 Pedro Alves <palves@redhat.com>
874
875 * linux-low.c (step_over_bkpt): Move higher up in the file.
876 (handle_extended_wait): Don't store the stop_pc here.
877 (get_stop_pc): Adjust comments and rename to ...
878 (check_stopped_by_breakpoint): ... this. Record whether the LWP
879 stopped for a software breakpoint or hardware breakpoint.
880 (thread_still_has_status_pending_p): New function.
881 (status_pending_p_callback): Use
882 thread_still_has_status_pending_p. If the event is no longer
883 interesting, resume the LWP.
884 (handle_tracepoints): Add assert.
885 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
886 (wstatus_maybe_breakpoint): New function.
887 (cancel_breakpoint): Delete function.
888 (check_stopped_by_watchpoint): New function, factored out from
889 linux_low_filter_event.
890 (lp_status_maybe_breakpoint): Delete function.
891 (linux_low_filter_event): Remove filter_ptid argument.
892 Leave thread group exits pending here. Store the LWP's stop PC.
893 Always leave events pending.
894 (linux_wait_for_event_filtered): Pull all events out of the
895 kernel, and leave them all pending.
896 (count_events_callback, select_event_lwp_callback): Consider all
897 events.
898 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
899 (select_event_lwp): Only give preference to the stepping LWP in
900 all-stop mode. Adjust comments.
901 (ignore_event): New function.
902 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
903 references to cancel_breakpoints. Adjust to renames. Also give
904 equal priority to all LWPs that have had events in non-stop mode.
905 If reporting a software breakpoint event, unadjust the LWP's PC.
906 (linux_wait): If linux_wait_1 returned an ignored event, retry.
907 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
908 Adjust.
909 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
910 (resume_status_pending_p): Use thread_still_has_status_pending_p.
911 (linux_stopped_by_watchpoint): Adjust.
912 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
913 * linux-low.h (enum lwp_stop_reason): New.
914 (struct lwp_info) <stop_pc>: Adjust comment.
915 <stopped_by_watchpoint>: Delete field.
916 <stop_reason>: New field.
917 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
918 * mem-break.c (software_breakpoint_inserted_here)
919 (hardware_breakpoint_inserted_here): New function.
920 * mem-break.h (software_breakpoint_inserted_here)
921 (hardware_breakpoint_inserted_here): Declare.
922 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
923 (cancel_breakpoints): Delete.
924 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
925 (upload_fast_traceframes): Remove references to
926 cancel_breakpoints.
927
a33e3959
PA
9282015-01-09 Pedro Alves <palves@redhat.com>
929
930 * thread-db.c (find_new_threads_callback): Ignore thread if the
931 kernel thread ID is -1.
932
8784d563
PA
9332015-01-09 Pedro Alves <palves@redhat.com>
934
935 * linux-low.c (linux_attach_fail_reason_string): Move to
936 nat/linux-ptrace.c, and rename.
937 (linux_attach_lwp): Update comment.
938 (attach_proc_task_lwp_callback): New function.
939 (linux_attach): Adjust to rename and use
940 linux_proc_attach_tgid_threads.
941 (linux_attach_fail_reason_string): Delete declaration.
942
76f2b779
JB
9432015-01-01 Joel Brobecker <brobecker@adacore.com>
944
945 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
946 * server.c (gdbserver_version): Likewise.
947
fafcc06a
SDJ
9482014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
949
950 * remote-utils.c: Include ctype.h.
951 (input_interrupt): Explicitly handle the case when the char
952 received is the NUL byte. Improve the printing of non-ASCII
953 characters.
954
beed38b8
JB
9552014-12-16 Joel Brobecker <brobecker@adacore.com>
956
957 * linux-low.c (linux_low_filter_event): Update call to
958 linux_enable_event_reporting following the addition of
959 a new parameter to that function.
960
bf330350
CU
9612014-12-16 Catalin Udma <catalin.udma@freescale.com>
962
963 PR server/17457
964 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
965 (AARCH64_FPCR_REGNO): Likewise.
966 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
967 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
968 (aarch64_store_fpregset): Likewise.
969
5227d625
JB
9702014-12-15 Joel Brobecker <brobecker@adacore.com>
971
972 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
973 Remove FIXME comment about assumption about N.
974
f93b65a0
JB
9752014-12-13 Joel Brobecker <brobecker@adacore.com>
976
977 * configure.ac: If large-file support is disabled in GDBserver,
978 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
979 * configure: Regenerate.
980
e5a9158d
AA
9812014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
982
983 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
984 warning upon ENODATA from ptrace.
985 * linux-s390-low.c (s390_store_tdb): New.
986 (s390_regsets): Add regset for NT_S390_TDB.
987
feea5f36
AA
9882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
989
990 * linux-low.c (regsets_store_inferior_registers): Skip regsets
991 without a fill_function.
992 * linux-s390-low.c (s390_fill_last_break): Remove.
993 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
994 (s390_arch_setup): Use regset's size instead of fill_function for
995 loop end condition.
996
098dbe61
AA
9972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
998
999 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1000 the regset's store function when ptrace returned an error.
1001 * regcache.c (get_thread_regcache): Invalidate register cache
1002 before fetching inferior's registers.
1003
28eef672
AA
10042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1005
1006 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1007 while-loop as for-loop.
1008 (regsets_store_inferior_registers): Likewise.
1009
bdca27a2
YQ
10102014-11-28 Yao Qi <yao@codesourcery.com>
1011
1012 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1013 * config.in, configure: Re-generate.
1014 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1015 is defined.
1016
9c232dda
YQ
10172014-11-21 Yao Qi <yao@codesourcery.com>
1018
1019 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1020 (AC_CHECK_HEADERS): Remove malloc.h.
1021 * configure: Re-generated.
1022 * config.in: Re-generated.
1023 * server.h: Don't include alloca.h and malloc.h.
1024 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1025 Don't include malloc.h.
1026
43968415
JB
10272014-11-17 Joel Brobecker <brobecker@adacore.com>
1028
1029 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1030 corresponding ERRNO check in same block.
1031
40e91bc7
PA
10322014-11-12 Pedro Alves <palves@redhat.com>
1033
1034 * server.c (cont_thread): Update comment.
1035 (start_inferior, attach_inferior): No longer clear cont_thread.
1036 (handle_v_cont): No longer set cont_thread.
1037 (captured_main): Clear cont_thread each time a GDB connects.
1038
c2c118cf
PA
10392014-11-12 Pedro Alves <palves@redhat.com>
1040
1041 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1042 thread, and don't resume all threads if the Hc thread has exited.
1043
78708b7c
PA
10442014-11-12 Pedro Alves <palves@redhat.com>
1045
1046 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1047 the process group instead of to a specific LWP.
1048
a2abc7de
PA
10492014-10-15 Pedro Alves <palves@redhat.com>
1050
1051 PR server/17487
1052 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1053 parameter.
1054 (arm_set_thread_context): Delete.
1055 (the_low_target): Adjust.
1056 * win32-i386-low.c (debug_registers_changed)
1057 (debug_registers_used): Delete.
1058 (update_debug_registers_callback): New function.
1059 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1060 needing to update their debug registers.
1061 (win32_get_current_dr): New function.
1062 (x86_dr_low_get_addr, x86_dr_low_get_control)
1063 (x86_dr_low_get_status): Fetch the debug register from the thread
1064 record's context.
1065 (i386_initial_stuff): Adjust.
1066 (i386_get_thread_context): Remove current_event parameter. Don't
1067 clear debug_registers_changed nor copy DR values to
1068 debug_reg_state.
1069 (i386_set_thread_context): Delete.
1070 (i386_prepare_to_resume): New function.
1071 (i386_thread_added): Mark the thread as needing to update irs
1072 debug registers.
1073 (the_low_target): Remove i386_set_thread_context and install
1074 i386_prepare_to_resume.
1075 * win32-low.c (win32_get_thread_context): Adjust.
1076 (win32_set_thread_context): Use SetThreadContext
1077 directly.
1078 (win32_prepare_to_resume): New function.
1079 (win32_require_context): New function, factored out from ...
1080 (thread_rec): ... this.
1081 (continue_one_thread): Call win32_prepare_to_resume on each thread
1082 we're about to continue.
1083 (win32_resume): Call win32_prepare_to_resume on the event thread.
1084 * win32-low.h (struct win32_thread_info)
1085 <debug_registers_changed>: New field.
1086 (struct win32_target_ops): Change prototype of set_thread_context,
1087 delete set_thread_context and add prepare_to_resume.
1088 (win32_require_context): New declaration.
1089
a442d071
GB
10902014-10-08 Gary Benson <gbenson@redhat.com>
1091
1092 * server.h: Do not include common-exceptions.h.
1093
6f1947e8
GB
10942014-10-08 Gary Benson <gbenson@redhat.com>
1095
1096 * server.h: Do not include cleanups.h.
1097
63b434a4
JH
10982014-09-30 James Hogan <james.hogan@imgtec.com>
1099
1100 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1101 mips64-dsp-linux.c.
1102
c4d9ceb6
YQ
11032014-09-23 Yao Qi <yao@codesourcery.com>
1104
1105 * linux-low.c (lp_status_maybe_breakpoint): New function.
1106 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1107 (count_events_callback): Likewise.
1108 (select_event_lwp_callback): Likewise.
1109 (cancel_breakpoints_callback): Likewise.
1110
89a5711c
DB
11112014-09-19 Don Breazeal <donb@codesourcery.com>
1112
1113 * linux-low.c (handle_extended_wait): Call
1114 linux_ptrace_get_extended_event.
1115 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1116 linux_is_extended_waitstatus.
1117
bffc0964
JB
11182014-09-16 Joel Brobecker <brobecker@adacore.com>
1119
1120 * Makefile.in (CPPFLAGS): Define.
1121 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1122 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1123
0bfdf32f
GB
11242014-09-16 Gary Benson <gbenson@redhat.com>
1125
1126 * inferiors.h (current_inferior): Renamed as...
1127 (current_thread): New variable. All uses updated.
1128 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1129 (maybe_move_out_of_jump_pad): Likewise.
1130 (cancel_breakpoint): Likewise.
1131 (linux_low_filter_event): Likewise.
1132 (wait_for_sigstop): Likewise.
1133 (linux_resume_one_lwp): Likewise.
1134 (need_step_over_p): Likewise.
1135 (start_step_over): Likewise.
1136 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1137 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1138 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1139 and save_inferior as saved_thread.
1140 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1141 saved_thread.
1142 (regcache_invalidate_thread): Likewise.
1143 * remote-utils.c (prepare_resume_reply): Likewise.
1144 * thread-db.c (thread_db_get_tls_address): Likewise.
1145 (disable_thread_event_reporting): Likewise.
1146 (remove_thread_event_breakpoints): Likewise.
1147 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1148 as saved_thread.
1149 * target.h (set_desired_inferior): Renamed as...
1150 (set_desired_thread): New declaration. All uses updated.
1151 * server.c (myresume): Updated comment to reference thread instead
1152 of inferior.
1153 (handle_serial_event): Likewise.
1154 (handle_target_event): Likewise.
1155
361c8ade
GB
11562014-09-12 Tom Tromey <tromey@redhat.com>
1157 Gary Benson <gbenson@redhat.com>
1158
1159 * regcache.h: Include common-regcache.h.
1160 (regcache_read_pc): Don't declare.
1161 * regcache.c (get_thread_regcache_for_ptid): New function.
1162
bd9269f7
GB
11632014-09-11 Tom Tromey <tromey@redhat.com>
1164 Gary Benson <gbenson@redhat.com>
1165
1166 * symbol.c: New file.
1167 * Makefile.in (SFILES): Add symbol.c.
1168 (OBS): Add symbol.o.
1169
f8c1d06b
GB
11702014-09-11 Gary Benson <gbenson@redhat.com>
1171
1172 * target.c (target_stop_ptid, target_continue_ptid): New
1173 functions.
1174
721ec300
GB
11752014-09-11 Tom Tromey <tromey@redhat.com>
1176 Gary Benson <gbenson@redhat.com>
1177
1178 * target.h: Include target/target.h.
1179 * target.c (target_read_memory, target_read_uint32)
1180 (target_write_memory): New functions.
1181
c5e92cca
GB
11822014-09-11 Gary Benson <gbenson@redhat.com>
1183
1184 * server.h (debug_hw_points): Don't declare.
1185 * server.c (debug_hw_points): Don't define. Replace all uses
1186 with show_debug_regs.
1187 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1188 all uses with show_debug_regs.
1189
2e4bb98a
EBM
11902014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1191
1192 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1193 endianness into account.
1194 (ppc_supply_ptrace_register): Likewise.
1195
ac740bc7
JH
11962014-09-03 James Hogan <james.hogan@imgtec.com>
1197
1198 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1199 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1200
97ea6506
GB
12012014-09-03 Gary Benson <gbenson@redhat.com>
1202
1203 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1204 ALL_DEBUG_ADDRESS_REGISTERS.
1205
df7e5265
GB
12062014-09-02 Gary Benson <gbenson@redhat.com>
1207
1208 * i386-low.h: Renamed as...
1209 * x86-low.h: New file. All type, function and variable name
1210 prefixes changed from "i386_" to "x86_". All references updated.
1211 * i386-low.c: Renamed as...
1212 * x86-low.c: New file. All type, function and variable name
1213 prefixes changed from "i386_" to "x86_". All references updated.
1214
ed859da7
GB
12152014-09-02 Gary Benson <gbenson@redhat.com>
1216
1217 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1218 (x86_linux_new_thread): Likewise.
1219
860789c7
GB
12202014-08-29 Gary Benson <gbenson@redhat.com>
1221
1222 * server.h (setjmp.h): Do not include.
1223 (toplevel): Do not declare.
1224 (common-exceptions.h): Include.
1225 (cleanups.h): Likewise.
1226 * server.c (toplevel): Do not define.
1227 (exit_code): New static global.
1228 (detach_or_kill_for_exit_cleanup): New function.
1229 (main): New function. Original main renamed to...
1230 (captured_main): New function.
1231 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1232
ff55e1b5
GB
12332014-08-29 Gary Benson <gbenson@redhat.com>
1234
1235 * Makefile.in (SFILES): Add common/common-exceptions.c.
1236 (OBS): Add common-exceptions.o.
1237 (common-exceptions.o): New rule.
1238 * utils.c (prepare_to_throw_exception): New function.
1239
e9bcb658
GB
12402014-08-29 Gary Benson <gbenson@redhat.com>
1241
1242 * config.in: Regenerate.
1243 * configure: Likewise.
1244
e3180625
GB
12452014-08-29 Gary Benson <gbenson@redhat.com>
1246
1247 * Makefile.in (SFILES): Add common/cleanups.c.
1248 (OBS): cleanups.o.
1249 (cleanups.o): New rule.
1250
e3d6ba5d
GB
12512014-08-29 Gary Benson <gbenson@redhat.com>
1252
1253 * utils.c (internal_vwarning): New function.
1254
7096e886
GB
12552014-08-28 Gary Benson <gbenson@redhat.com>
1256
1257 * utils.h (fatal): Remove declaration.
1258 * utils.c (fatal): Remove function.
1259
14ce3192
GB
12602014-08-28 Gary Benson <gbenson@redhat.com>
1261
1262 * tracepoint.c (gdb_agent_init): Replace fatal with
1263 perror_with_name.
1264 (initialize_tracepoint): Likewise.
1265
50278d59
GB
12662014-08-28 Gary Benson <gbenson@redhat.com>
1267
1268 * remote-utils.c (remote_prepare): Replace fatal with error.
1269
aa96c426
GB
12702014-08-28 Gary Benson <gbenson@redhat.com>
1271
1272 * linux-low.c (linux_async): Replace fatal with warning.
1273 Tidy up and return.
1274 (linux_start_non_stop): Return -1 if linux_async failed.
1275
f7160e97
GB
12762014-08-28 Gary Benson <gbenson@redhat.com>
1277
1278 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1279 gdb_assert.
1280 (i386_dr_low_get_addr): Remove vague comment.
1281 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1282 gdb_assert.
1283
38e08fca
GB
12842014-08-28 Gary Benson <gbenson@redhat.com>
1285
1286 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1287 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1288 internal_error.
1289 (linux_resume_one_lwp): Likewise.
1290 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1291 gdb_assert.
1292 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1293 with internal_error.
1294 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1295 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1296 (find_register_by_name): Replace fatal with internal_error.
1297 (find_regno): Likewise.
1298 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1299 * thread-db.c (thread_db_create_event): Likewise.
1300 (thread_db_load_search): Likewise.
1301 (try_thread_db_load_1): Likewise.
1302 * tracepoint.c (get_jump_space_head): Replace fatal with
1303 internal_error.
1304 (claim_trampoline_space): Likewise.
1305 (have_fast_tracepoint_trampoline_buffer): Likewise.
1306 (cmd_qtstart): Likewise.
1307 (stop_tracing): Likewise.
1308 (fast_tracepoint_collecting): Likewise.
1309 (target_malloc): Likewise.
1310 (download_tracepoint): Likewise.
1311 (download_trace_state_variables): Replace check with gdb_assert.
1312 (upload_fast_traceframes): Replace fatal with internal_error.
1313
34abf635
GB
13142014-08-19 Tom Tromey <tromey@redhat.com>
1315 Gary Benson <gbenson@redhat.com>
1316
1317 * Makefile.in (SFILES): Add common/common-debug.c.
1318 (OBS): Add common-debug.o.
1319 (common-debug.o): New rule.
1320 * debug.h (debug_printf): Don't declare.
1321 * debug.c (debug_printf): Renamed and rewritten as...
1322 (debug_vprintf): New function.
1323
f6e94d78
GB
13242014-08-19 Gary Benson <gbenson@redhat.com>
1325
1326 * utils.h: Do not include print-utils.h.
1327
9239eeab
GB
13282014-08-19 Tom Tromey <tromey@redhat.com>
1329 Gary Benson <gbenson@redhat.com>
1330
1331 * server.h: Add static assertion.
1332 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1333
ef87c8bb
GB
13342014-08-19 Tom Tromey <tromey@redhat.com>
1335 Gary Benson <gbenson@redhat.com>
1336
1337 * Makefile.in (SFILES): Add common/errors.c.
1338 (OBS): Add errors.o.
1339 (IPA_OBS): Add errors-ipa.o.
1340 (errors.o): New rule.
1341 (errors-ipa.o): Likewise.
1342 * utils.h (perror_with_name, error, warning): Don't declare.
1343 * utils.c (warning): Renamed and rewritten as...
1344 (vwarning): New function.
1345 (error): Renamed and rewritten as...
1346 (verror): New function.
1347 (internal_error): Renamed and rewritten as...
1348 (internal_verror): New function.
1349
bb974a24
GB
13502014-08-07 Gary Benson <gbenson@redhat.com>
1351
1352 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1353 * configure: Regenerate.
1354 * config.in: Likewise.
1355 * server.h: Do not include errno.h.
1356 * event-loop.c: Likewise.
1357 * hostio-errno.c: Likewise.
1358 * linux-low.c: Likewise.
1359 * remote-utils.c: Likewise.
1360 * spu-low.c: Likewise.
1361 * utils.c: Likewise.
1362 * gdbreplay.c: Unconditionally include errno.h.
1363
6d3d12eb
GB
13642014-08-07 Gary Benson <gbenson@redhat.com>
1365
1366 * server.h: Do not include string.h.
1367 * event-loop.c: Likewise.
1368 * linux-low.c: Likewise.
1369 * regcache.c: Likewise.
1370 * remote-utils.c: Likewise.
1371 * spu-low.c: Likewise.
1372 * utils.c: Likewise.
1373
dccbb609
GB
13742014-08-07 Gary Benson <gbenson@redhat.com>
1375
1376 * server.h: Do not include gdb_assert.h.
1377
e76df0d0
GB
13782014-08-07 Gary Benson <gbenson@redhat.com>
1379
1380 * server.h: Do not include common-utils.h.
1381
4cb9c816
GB
13822014-08-07 Gary Benson <gbenson@redhat.com>
1383
1384 * server.h: Do not include ptid.h.
1385 * notif.h: Likewise.
1386
3995eeee
GB
13872014-08-07 Gary Benson <gbenson@redhat.com>
1388
1389 * server.h: Do not include gdb_locale.h.
1390
cb9f1a9b
GB
13912014-08-07 Gary Benson <gbenson@redhat.com>
1392
1393 * server.h: Do not include gdb/signals.h.
1394 * win32-low.c: Likewise.
1395
a5fceff8
GB
13962014-08-07 Gary Benson <gbenson@redhat.com>
1397
1398 * server.h: Do not include pathmax.h.
1399
b9391142
GB
14002014-08-07 Gary Benson <gbenson@redhat.com>
1401
1402 * server.h: Do not include libiberty.h.
1403 * linux-bfin-low.c: Likewise.
1404
0e443c87
GB
14052014-08-07 Gary Benson <gbenson@redhat.com>
1406
1407 * server.h: Do not include ansidecl.h.
1408
8ebb3f56
GB
14092014-08-07 Gary Benson <gbenson@redhat.com>
1410
1411 * linux-x86-low.c: Do not include stddef.h.
1412 * lynx-ppc-low.c: Likewise.
1413 * tracepoint.c: Likewise.
1414
8980bdf6
GB
14152014-08-07 Gary Benson <gbenson@redhat.com>
1416
1417 * server.h: Do not include stdarg.h.
1418 * nto-low.c: Likewise.
1419
d7096f71
GB
14202014-08-07 Gary Benson <gbenson@redhat.com>
1421
1422 * server.h: Do not include stdlib.h.
1423 * inferiors.c: Likewise.
1424 * linux-low.c: Likewise.
1425 * regcache.c: Likewise.
1426 * spu-low.c: Likewise.
1427 * tracepoint.c: Likewise.
1428 * utils.c: Likewise.
1429
d02f550d
GB
14302014-08-07 Gary Benson <gbenson@redhat.com>
1431
1432 * server.h: Do not include stdio.h.
1433 * linux-low.c: Likewise.
1434 * remote-utils.c: Likewise.
1435 * spu-low.c: Likewise.
1436 * utils.c: Likewise.
1437 * wincecompat.c: Likewise.
1438
87f6c4e3
GB
14392014-08-06 Gary Benson <gbenson@redhat.com>
1440
1441 * regcache.c (init_register_cache): Move conditionals inside if.
1442
7089dca4
GB
14432014-08-06 Gary Benson <gbenson@redhat.com>
1444
1445 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1446
462f517e
GB
14472014-07-31 Gary Benson <gbenson@redhat.com>
1448
1449 * ax.h: Do not include server.h.
1450 * gdbthread.h: Likewise.
1451 * lynx-low.h: Likewise.
1452 * notif.h: Likewise.
1453
976411d6
GB
14542014-07-30 Gary Benson <gbenson@redhat.com>
1455
1456 * server.h: Include common-defs.h.
1457 Do not include config.h or build-gnulib-gdbserver/config.h.
1458
d41f6d8e
GB
14592014-07-30 Gary Benson <gbenson@redhat.com>
1460
1461 * hostio-errno.c: Move server.h to top of includes list.
1462 * inferiors.c: Likewise.
1463 * linux-x86-low.c: Likewise.
1464 * notif.c: Include server.h.
1465
314c6a35
TT
14662014-07-24 Tom Tromey <tromey@redhat.com>
1467 Gary Benson <gbenson@redhat.com>
1468
1469 * server.h (CORE_ADDR): Now unsigned.
1470
69ff6be5
PA
14712014-07-16 Pedro Alves <palves@redhat.com>
1472
1473 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1474
ce9e3fe7
PA
14752014-07-15 Pedro Alves <palves@redhat.com>
1476
1477 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1478 copy.
1479
e76126e8
PA
14802014-07-11 Pedro Alves <palves@redhat.com>
1481
1482 * linux-low.c (kill_wait_lwp): New function, based on
1483 kill_one_lwp_callback, but use my_waitpid directly.
1484 (kill_one_lwp_callback, linux_kill): Use it.
1485
8e9db26e
PA
14862014-06-23 Pedro Alves <palves@redhat.com>
1487
1488 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1489 before setting DR0..DR3.
1490
698b3e08
GB
14912014-06-20 Gary Benson <gbenson@redhat.com>
1492
1493 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1494 * configure: Regenerated.
1495 * config.in: Likewise.
1496
125f8a3d
GB
14972014-06-20 Gary Benson <gbenson@redhat.com>
1498
1499 * Makefile.in (SFILES): Update locations for files moved
1500 from common to nat.
1501 (object file files): Reordered.
1502
42995dbd
GB
15032014-06-20 Gary Benson <gbenson@redhat.com>
1504
1505 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1506 (i386_dr_low_set_addr): Likewise.
1507 (i386_dr_low_get_addr): Likewise.
1508 (i386_dr_low_can_set_control): Likewise.
1509 (i386_dr_low_set_control): Likewise.
1510 (i386_dr_low_get_control): Likewise.
1511 (i386_dr_low_get_status): Likewise.
1512 (i386_get_debug_register_length): Likewise.
1513 * linux-x86-low.c (i386_dr_low_set_addr):
1514 Changed signature. Made static.
1515 (i386_dr_low_get_addr): Likewise.
1516 (i386_dr_low_set_control): Likewise.
1517 (i386_dr_low_get_control): Likewise.
1518 (i386_dr_low_get_status): Likewise.
1519 (i386_dr_low): New global variable.
1520 * win32-i386-low.c (i386_dr_low_set_addr):
1521 Changed signature. Made static.
1522 (i386_dr_low_get_addr): Likewise.
1523 (i386_dr_low_set_control): Likewise.
1524 (i386_dr_low_get_control): Likewise.
1525 (i386_dr_low_get_status): Likewise.
1526 (i386_dr_low): New global variable.
1527
e1d2394b
MS
15282014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1529
1530 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1531 * Makefile.in (AR, AR_FLAGS): Define.
1532 * configure: Regenerate.
1533
3a8ee006
GB
15342014-06-19 Gary Benson <gbenson@redhat.com>
1535
1536 * Makefile.in (i386-dregs.o): New rule.
1537 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1538 * i386-low.c (target.h): Remove include.
1539 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1540 (DR_CONTROL_SHIFT): Likewise.
1541 (DR_CONTROL_SIZE): Likewise.
1542 (DR_RW_EXECUTE): Likewise.
1543 (DR_RW_WRITE): Likewise.
1544 (DR_RW_READ): Likewise.
1545 (DR_RW_IORW): Likewise.
1546 (DR_LEN_1): Likewise.
1547 (DR_LEN_2): Likewise.
1548 (DR_LEN_4): Likewise.
1549 (DR_LEN_8): Likewise.
1550 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1551 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1552 (DR_ENABLE_SIZE): Likewise.
1553 (DR_LOCAL_SLOWDOWN): Likewise.
1554 (DR_GLOBAL_SLOWDOWN): Likewise.
1555 (DR_CONTROL_RESERVED): Likewise.
1556 (I386_DR_CONTROL_MASK): Likewise.
1557 (I386_DR_VACANT): Likewise.
1558 (I386_DR_LOCAL_ENABLE): Likewise.
1559 (I386_DR_GLOBAL_ENABLE): Likewise.
1560 (I386_DR_DISABLE): Likewise.
1561 (I386_DR_SET_RW_LEN): Likewise.
1562 (I386_DR_GET_RW_LEN): Likewise.
1563 (I386_DR_WATCH_HIT): Likewise.
1564 (i386_wp_op_t): Likewise.
1565 (i386_show_dr): Likewise.
1566 (i386_length_and_rw_bits): Likewise.
1567 (i386_insert_aligned_watchpoint): Likewise.
1568 (i386_remove_aligned_watchpoint): Likewise.
1569 (i386_handle_nonaligned_watchpoint): Likewise.
1570 i386_update_inferior_debug_regs(): Likewise.
1571 (i386_dr_insert_watchpoint): Likewise.
1572 (i386_dr_remove_watchpoint): Likewise.
1573 (i386_dr_region_ok_for_watchpoint): Likewise.
1574 (i386_dr_stopped_data_address): Likewise.
1575 (i386_dr_stopped_by_watchpoint): Likewise.
1576
8f26655c
GB
15772014-06-19 Gary Benson <gbenson@redhat.com>
1578
1579 * i386-low.c (i386_dr_show): Renamed to
1580 i386_show_dr and made static. All uses updated.
1581 (i386_dr_length_and_rw_bits): Renamed to
1582 i386_length_and_rw_bits and made static.
1583 All uses updated.
1584 (i386_dr_insert_aligned_watchpoint): Renamed to
1585 i386_insert_aligned_watchpoint and made static.
1586 All uses updated.
1587 (i386_dr_remove_aligned_watchpoint): Renamed to
1588 i386_remove_aligned_watchpoint and made static.
1589 All uses updated.
1590 (i386_dr_update_inferior_debug_regs): Renamed to
1591 i386_update_inferior_debug_regs and made static.
1592 All uses updated.
1593
b9228891
GB
15942014-06-18 Gary Benson <gbenson@redhat.com>
1595
5171def3
GB
1596 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1597 (i386_dr_low_can_set_control): Likewise.
1598 (i386_get_debug_register_length): Likewise.
1599 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1600 (i386_dr_low_can_set_control): Likewise.
1601 (i386_get_debug_register_length): Likewise.
1602
16032014-06-17 Gary Benson <gbenson@redhat.com>
1604
b9228891
GB
1605 * i386-low.h (i386-dregs.h): New include.
1606 (DR_FIRSTADDR): Now in i386-dregs.h.
1607 (DR_LASTADDR): Likewise.
1608 (DR_NADDR): Likewise.
1609 (DR_STATUS): Likewise.
1610 (DR_CONTROL): Likewise.
1611 (i386_debug_reg_state): Likewise.
1612 (i386_dr_insert_watchpoint): Likewise.
1613 (i386_dr_remove_watchpoint): Likewise.
1614 (i386_dr_region_ok_for_watchpoint): Likewise.
1615 (i386_dr_stopped_data_address): Likewise.
1616 (i386_dr_stopped_by_watchpoint): Likewise.
1617 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1618
4be83cc2
GB
16192014-06-18 Gary Benson <gbenson@redhat.com>
1620
1621 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1622 i386_dr_insert_watchpoint.
1623 (i386_low_remove_watchpoint): Renamed to
1624 i386_dr_remove_watchpoint.
1625 (i386_low_region_ok_for_watchpoint): Renamed to
1626 i386_dr_region_ok_for_watchpoint.
1627 (i386_low_stopped_data_address): Renamed to
1628 i386_dr_stopped_data_address.
1629 (i386_low_stopped_by_watchpoint): Renamed to
1630 i386_dr_stopped_by_watchpoint.
1631 * i386-low.c (i386_show_dr): Renamed to
1632 i386_dr_show and made nonstatic. All uses updated.
1633 (i386_length_and_rw_bits): Renamed to
1634 i386_dr_length_and_rw_bits and made nonstatic.
1635 All uses updated.
1636 (i386_insert_aligned_watchpoint): Renamed to
1637 i386_dr_insert_aligned_watchpoint and made nonstatic.
1638 All uses updated.
1639 (i386_remove_aligned_watchpoint): Renamed to
1640 i386_dr_remove_aligned_watchpoint and made nonstatic.
1641 All uses updated.
1642 (i386_update_inferior_debug_regs): Renamed to
1643 i386_dr_update_inferior_debug_regs and made nonstatic.
1644 All uses updated.
1645 (i386_low_insert_watchpoint): Renamed to
1646 i386_dr_insert_watchpoint. All uses updated.
1647 (i386_low_remove_watchpoint): Renamed to
1648 i386_dr_remove_watchpoint. All uses updated.
1649 (i386_low_region_ok_for_watchpoint): Renamed to
1650 i386_dr_region_ok_for_watchpoint. All uses updated.
1651 (i386_low_stopped_data_address): Renamed to
1652 i386_dr_stopped_data_address. All uses updated.
1653 (i386_low_stopped_by_watchpoint): Renamed to
1654 i386_dr_stopped_by_watchpoint. All uses updated.
1655
131aa0d4
GB
16562014-06-18 Gary Benson <gbenson@redhat.com>
1657
1658 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1659 (i386_dr_low_can_set_control): Likewise.
1660 (i386_insert_aligned_watchpoint): New check.
1661
d9305f7f
GB
16622014-06-18 Gary Benson <gbenson@redhat.com>
1663
1664 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1665 Renamed to state.
1666
e927c9fc
GB
16672014-06-18 Gary Benson <gbenson@redhat.com>
1668
1669 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1670 instead of fatal and error.
1671 (i386_handle_nonaligned_watchpoint): Likewise.
1672
1b6d4134
GB
16732014-06-18 Gary Benson <gbenson@redhat.com>
1674
1675 * i386-low.c (i386_get_debug_register_length): New macro.
1676 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1677 (i386_show_dr): Use debug_printf instead of fprintf. Use
1678 phex to format values.
1679
6e62758f
GB
16802014-06-18 Gary Benson <gbenson@redhat.com>
1681
1682 * i386-low.h: Comment changes.
1683 * i386-low.c: Likewise.
1684
fc6e2f03
GB
16852014-06-18 Gary Benson <gbenson@redhat.com>
1686
1687 * i386-low.c: Whitespace changes.
1688
f9d1eeed
TT
16892014-06-12 Tom Tromey <tromey@redhat.com>
1690
1691 * utils.c (freeargv): Remove.
1692
0b04e523
TT
16932014-06-12 Tom Tromey <tromey@redhat.com>
1694
1695 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1696 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1697 (parse_debug_format_options): Likewise.
1698 (gdbserver_usage): Likewise.
1699 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1700 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1701 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1702 against libiberty.
1703 ($(LIBGNU)): Depend on libiberty.
1704 (all-lib): Recurse into all subdirs.
1705 (install-only): Invoke "install" target in subdirs.
1706 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1707 targets.
1708 * configure: Rebuild.
1709 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1710 for vasprintf, vsnprintf, or gettimeofday.
1711 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1712 srv_tgtobj.
1713
270c9937
JB
17142014-06-05 Joel Brobecker <brobecker@adacore.com>
1715
1716 * development.sh: Delete.
1717 * Makefile.in (config.status): Adjust dependency on development.sh.
1718 * configure.ac: Adjust development.sh source call.
1719 * configure: Regenerate.
1720
0a261ed8
PA
17212014-06-02 Pedro Alves <palves@redhat.com>
1722
1723 * ax.c (gdb_free_agent_expr): New function.
1724 * ax.h (gdb_free_agent_expr): New declaration.
1725 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1726 list.
1727 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1728 static.
1729 (clear_breakpoint_conditions_and_commands): New function.
1730 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1731 (clear_breakpoint_conditions_and_commands): New declaration.
1732
e9dae05e
RR
17332014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1734
1735 * linux-aarch64-low.c (asm/ptrace.h): Include.
1736
5876f503
JK
17372014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1738
1739 Fix TLS access for -static -pthread.
1740 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1741 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1742 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1743
802e8e6d
PA
17442014-05-20 Pedro Alves <palves@redhat.com>
1745
1746 * linux-aarch64-low.c (aarch64_insert_point)
1747 (aarch64_remove_point): No longer check whether the type is
1748 supported here. Adjust to new interface.
1749 (the_low_target): Install aarch64_supports_z_point_type as
1750 supports_z_point_type method.
1751 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1752 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1753 instead of a Z packet char. Adjust.
1754 (arm_supports_z_point_type): New function.
1755 (arm_insert_point, arm_remove_point): Adjust to new interface.
1756 (the_low_target): Install arm_supports_z_point_type.
1757 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1758 (cris_insert_point, cris_remove_point): Adjust to new interface.
1759 Don't check whether the type is supported here.
1760 (the_low_target): Install cris_supports_z_point_type.
1761 * linux-low.c (linux_supports_z_point_type): New function.
1762 (linux_insert_point, linux_remove_point): Adjust to new interface.
1763 * linux-low.h (struct linux_target_ops) <insert_point,
1764 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1765 raw_breakpoint pointer parameter.
1766 <supports_z_point_type>: New method.
1767 * linux-mips-low.c (mips_supports_z_point_type): New function.
1768 (mips_insert_point, mips_remove_point): Adjust to new interface.
1769 Use mips_supports_z_point_type.
1770 (the_low_target): Install mips_supports_z_point_type.
1771 * linux-ppc-low.c (the_low_target): Install NULL as
1772 supports_z_point_type method.
1773 * linux-s390-low.c (the_low_target): Install NULL as
1774 supports_z_point_type method.
1775 * linux-sparc-low.c (the_low_target): Install NULL as
1776 supports_z_point_type method.
1777 * linux-x86-low.c (x86_supports_z_point_type): New function.
1778 (x86_insert_point): Adjust to new insert_point interface. Use
1779 insert_memory_breakpoint. Adjust to new
1780 i386_low_insert_watchpoint interface.
1781 (x86_remove_point): Adjust to remove_point interface. Use
1782 remove_memory_breakpoint. Adjust to new
1783 i386_low_remove_watchpoint interface.
1784 (the_low_target): Install x86_supports_z_point_type.
1785 * lynx-low.c (lynx_target_ops): Install NULL as
1786 supports_z_point_type callback.
1787 * nto-low.c (nto_supports_z_point_type): New.
1788 (nto_insert_point, nto_remove_point): Adjust to new interface.
1789 (nto_target_ops): Install nto_supports_z_point_type.
1790 * mem-break.c: Adjust intro comment.
1791 (struct raw_breakpoint) <raw_type, size>: New fields.
1792 <inserted>: Update comment.
1793 <shlib_disabled>: Delete field.
1794 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1795 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1796 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1797 (raw_bkpt_type_to_target_hw_bp_type): New function.
1798 (find_enabled_raw_code_breakpoint_at): New function.
1799 (find_raw_breakpoint_at): New type and size parameters. Use them.
1800 (insert_memory_breakpoint): New function, based off
1801 set_raw_breakpoint_at.
1802 (remove_memory_breakpoint): New function.
1803 (set_raw_breakpoint_at): Reimplement.
1804 (set_breakpoint): New, based on set_breakpoint_at.
1805 (set_breakpoint_at): Reimplement.
1806 (delete_raw_breakpoint): Go through the_target->remove_point
1807 instead of assuming memory breakpoints.
1808 (find_gdb_breakpoint_at): Delete.
1809 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1810 (find_gdb_breakpoint): New function.
1811 (set_gdb_breakpoint_at): Delete.
1812 (z_type_supported): New function.
1813 (set_gdb_breakpoint_1): New function, loosely based off
1814 set_gdb_breakpoint_at.
1815 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1816 (delete_gdb_breakpoint_at): Delete.
1817 (delete_gdb_breakpoint_1): New function, loosely based off
1818 delete_gdb_breakpoint_at.
1819 (delete_gdb_breakpoint): New function.
1820 (clear_gdb_breakpoint_conditions): Rename to ...
1821 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1822 breakpoint.
1823 (add_condition_to_breakpoint): Make static.
1824 (add_breakpoint_condition): Take a struct breakpoint pointer
1825 instead of an address. Adjust.
1826 (gdb_condition_true_at_breakpoint): Rename to ...
1827 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1828 z_type parameter.
1829 (gdb_condition_true_at_breakpoint): Reimplement.
1830 (add_breakpoint_commands): Take a struct breakpoint pointer
1831 instead of an address. Adjust.
1832 (gdb_no_commands_at_breakpoint): Rename to ...
1833 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1834 parameter. Return true if no breakpoint was found. Change debug
1835 output.
1836 (gdb_no_commands_at_breakpoint): Reimplement.
1837 (run_breakpoint_commands): Rename to ...
1838 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1839 and change return type to boolean.
1840 (run_breakpoint_commands): New function.
1841 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1842 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1843 breakpoint. Go through the_target->remove_point instead of
1844 assuming memory breakpoint.
1845 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1846 software and hardware breakpoints.
1847 (reinsert_raw_breakpoint): Go through the_target->insert_point
1848 instead of assuming memory breakpoint.
1849 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1850 software and hardware breakpoints.
1851 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1852 Check both software and hardware breakpoints.
1853 (validate_inserted_breakpoint): Assert the breakpoint is a
1854 software breakpoint. Set the inserted flag to -1 instead of
1855 setting shlib_disabled.
1856 (delete_disabled_breakpoints): Adjust.
1857 (validate_breakpoints): Only validate software breakpoints.
1858 Adjust to inserted flag change.
1859 (check_mem_read, check_mem_write): Skip breakpoint types other
1860 than software breakpoints. Adjust to inserted flag change.
1861 * mem-break.h (enum raw_bkpt_type): New enum.
1862 (raw_breakpoint, struct process_info): Forward declare.
1863 (Z_packet_to_target_hw_bp_type): Delete declaration.
1864 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1865 (set_gdb_breakpoint, delete_gdb_breakpoint)
1866 (clear_breakpoint_conditions): New declarations.
1867 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1868 (breakpoint_inserted_here): Update comment.
1869 (add_breakpoint_condition, add_breakpoint_commands): Replace
1870 address parameter with a breakpoint pointer parameter.
1871 (gdb_breakpoint_here): Update comment.
1872 (delete_gdb_breakpoint_at): Delete.
1873 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1874 * server.c (process_point_options): Take a struct breakpoint
1875 pointer instead of an address. Adjust.
1876 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1877 delete_gdb_breakpoint.
1878 * spu-low.c (spu_target_ops): Install NULL as
1879 supports_z_point_type method.
1880 * target.h: Include mem-break.h.
1881 (struct target_ops) <prepare_to_access_memory>: Update comment.
1882 <supports_z_point_type>: New field.
1883 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1884 instead of a char. Also take a raw breakpoint pointer.
1885 * win32-arm-low.c (the_low_target): Install NULL as
1886 supports_z_point_type.
1887 * win32-i386-low.c (i386_supports_z_point_type): New function.
1888 (i386_insert_point, i386_remove_point): Adjust to new interface.
1889 (the_low_target): Install i386_supports_z_point_type.
1890 * win32-low.c (win32_supports_z_point_type): New function.
1891 (win32_insert_point, win32_remove_point): Adjust to new interface.
1892 (win32_target_ops): Install win32_supports_z_point_type.
1893 * win32-low.h (struct win32_target_ops):
1894 <supports_z_point_type>: New method.
1895 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1896 instead of a char. Also take a raw breakpoint pointer.
1897
932539e3
PA
18982014-05-20 Pedro Alves <palves@redhat.com>
1899
1900 * mem-break.h: Include break-common.h.
1901 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1902 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1903 (Z_packet_to_target_hw_bp_type): New declaration.
1904 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1905 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1906 (Z_PACKET_ACCESS_WP): Delete macros.
1907 (Z_packet_to_hw_type): Delete function.
1908 * i386-low.h: Don't include break-common.h here.
1909 (Z_packet_to_hw_type): Delete declaration.
1910 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1911 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1912 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1913 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1914 * linux-aarch64-low.c: Don't include break-common.h here.
1915 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1916 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1917 (Z_packet_to_target_hw_bp_type): Delete function.
1918 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1919 function.
1920 (mips_insert_point, mips_remove_point): Use
1921 Z_packet_to_target_hw_bp_type.
1922
4ff0d3d8
PA
19232014-05-20 Pedro Alves <palves@redhat.com>
1924
1925 * linux-aarch64-low.c: Include break-common.h.
1926 (enum target_point_type): Delete.
1927 (Z_packet_to_point_type): Rename to ...
1928 (Z_packet_to_target_hw_bp_type): ... this, and return a
1929 target_hw_bp_type instead.
1930 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1931 instead of an enum target_point_type.
1932 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1933 breakpoint type.
1934 (aarch64_dr_state_insert_one_point)
1935 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1936 (aarch64_handle_aligned_watchpoint)
1937 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1938 Take an enum target_hw_bp_type instead of an enum
1939 target_point_type.
1940 (aarch64_supports_z_point_type): New function.
1941 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1942 use Z_packet_to_target_hw_bp_type.
1943
786dc519
JB
19442014-05-20 Joel Brobecker <brobecker@adacore.com>
1945
1946 * configure.ac: Only use -Werror by default when DEVELOPMENT
1947 is true.
1948 * configure: Regenerate.
1949
9e0aa64f
JK
19502014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1951
1952 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1953 * linux-x86-low.c (X86_64_USER_REGS): New.
1954 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1955
2b577b92
YQ
19562014-04-28 Yao Qi <yao@codesourcery.com>
1957
1958 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1959 name.
1960
94611da2
PA
19612014-04-25 Pedro Alves <palves@redhat.com>
1962
1963 PR server/16255
1964 * linux-low.c (linux_attach_fail_reason_string): New function.
1965 (linux_attach_lwp): Delete.
1966 (linux_attach_lwp_1): Rename to ...
1967 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1968 argument. Remove "initial" parameter. Return int instead of
1969 void. Don't error or warn here.
1970 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1971 failure to attach to the tgid. Call warning when failing to
1972 attach to an lwp.
1973 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1974 argument. Remove "initial" parameter. Return int instead of
1975 void. Don't error or warn here.
1976 (linux_attach_fail_reason_string): New declaration.
1977 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1978 interface change. Use linux_attach_fail_reason_string.
1979
01f9f808
MS
19802014-04-24 Michael Sturm <michael.sturm@mintel.com>
1981 Walfred Tedeschi <walfred.tedeschi@intel.com>
1982
1983 * Makefile.in: Added rules to handle new files
1984 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1985 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1986 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1987 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1988 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1989 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1990 x32-avx512-linux.o.
1991 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1992 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1993 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1994 i386/x32-avx512.xml.
1995 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1996 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1997 i386/x32-avx512-linux.xml.
1998 * i387-fp.c (num_avx512_k_registers): New constant for number
1999 of K registers.
2000 (num_avx512_zmmh_low_registers): New constant for number of
2001 lower ZMM registers (0-15).
2002 (num_avx512_zmmh_high_registers): New constant for number of
2003 higher ZMM registers (16-31).
2004 (num_avx512_ymmh_registers): New contant for number of higher
2005 YMM registers (ymm16-31 added by avx521 on x86_64).
2006 (num_avx512_xmm_registers): New constant for number of higher
2007 XMM registers (xmm16-31 added by AVX512 on x86_64).
2008 (struct i387_xsave): Add space for AVX512 registers.
2009 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2010 Add code to handle AVX512 registers.
2011 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2012 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2013 prototypei from generated file.
2014 (tdesc_amd64_avx512_linux): Likewise.
2015 (init_registers_x32_avx512_linux): Likewise.
2016 (tdesc_x32_avx512_linux): Likewise.
2017 (init_registers_i386_avx512_linux): Likewise.
2018 (tdesc_i386_avx512_linux): Likewise.
2019 (x86_64_regmap): Add AVX512 registers.
2020 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2021 mask.
2022 (initialize_low_arch): Add code to initialize AVX512 registers.
2023
51aa91f9
PA
20242014-04-23 Pedro Alves <palves@redhat.com>
2025
2026 * mem-break.c (find_gdb_breakpoint_at): Make static.
2027 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2028
a4165e94
PA
20292014-04-23 Pedro Alves <palves@redhat.com>
2030
2031 * i386-low.c: Don't include break-common.h here.
2032 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2033 prototype to take target_hw_bp_type as argument instead of a Z
2034 packet char.
2035 * i386-low.h: Include break-common.h here.
2036 (Z_packet_to_hw_type): Declare.
2037 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2038 prototypes.
2039 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2040 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2041 (x86_remove_point): Convert the packet number to a
2042 target_hw_bp_type before calling i386_low_remove_watchpoint.
2043 * win32-i386-low.c (i386_insert_point): Convert the packet number
2044 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2045 (i386_remove_point): Convert the packet number to a
2046 target_hw_bp_type before calling i386_low_remove_watchpoint.
2047
b8acf843
PA
20482014-04-23 Pedro Alves <palves@redhat.com>
2049
2050 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2051
d708bcd1
PA
20522014-04-10 Pedro Alves <palves@redhat.com>
2053
2054 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2055 Check if the condition or command is NULL before checking if the
2056 breakpoint is known. On success, return true.
2057 * mem-break.h (add_breakpoint_condition): Document return.
2058 (add_breakpoint_commands): Add describing comment.
2059 * server.c (skip_to_semicolon): New function.
2060 (process_point_options): Use it.
2061
2eec7d5b
PA
20622014-04-09 Pedro Alves <palves@redhat.com>
2063
2064 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2065 to lwpid_of.
2066
fa96cb38
PA
20672014-02-27 Pedro Alves <palves@redhat.com>
2068
2069 PR 12702
2070 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2071 macros.
2072 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2073 output.
2074 (last_thread_of_process_p): Take a PID argument instead of a
2075 thread pointer.
2076 (linux_wait_for_lwp): Delete.
2077 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2078 functions.
2079 (linux_low_filter_event): New function, party factored out from
2080 linux_wait_for_event.
2081 (linux_wait_for_event): Rename to ...
2082 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2083 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2084 sigsuspend. Check for zombie leaders.
2085 (linux_wait_for_event): Reimplement as wrapper around
2086 linux_wait_for_event_filtered.
2087 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2088 a normal or signal exit is seen, it's the whole process exiting.
2089 (wait_for_sigstop): No longer a for_each_inferior callback.
2090 Rewrite on top of linux_wait_for_event_filtered.
2091 (stop_all_lwps): Call wait_for_sigstop directly.
2092 * server.c (resume, handle_target_event): Handle
2093 TARGET_WAITKIND_NO_RESUMED.
2094
d763de10
JB
20952014-02-26 Joel Brobecker <brobecker@adacore.com>
2096
2097 * win32-low.c (psapi_get_dll_name,
2098 * win32_CreateToolhelp32Snapshot): Delete.
2099 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2100 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2101 Delete.
2102 (handle_load_dll): Add function description.
2103 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2104
850a0f76
JB
21052014-02-26 Joel Brobecker <brobecker@adacore.com>
2106
2107 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2108 Add comment.
2109 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2110 base address when calling win32_add_one_solib.
2111 (handle_load_dll): Delete local variable load_addr.
2112 Remove 0x1000 offset applied to DLL base address when calling
2113 win32_add_one_solib.
2114 (handle_unload_dll): Add comment.
2115
f25b3fc3
JB
21162014-02-26 Joel Brobecker <brobecker@adacore.com>
2117
2118 * win32-low.c (win32_add_all_dlls): Renames
2119 win32_ensure_ntdll_loaded. Rewrite function documentation.
2120 Adjust implementation to always load all DLLs.
2121 Add 0x1000 offset to DLL base address when calling
2122 win32_add_one_solib.
2123 (child_initialization_done): New static global.
2124 (do_initial_child_stuff): Set child_initialization_done to
2125 zero during child initialization, and 1 after. Replace call
2126 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2127 Add comment.
2128 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2129 (handle_unload_dll): Add function documentation.
2130 (get_child_debug_event): Ignore load and unload DLL events
2131 during child initialization.
2132
d86d4aaf
DE
21332014-02-20 Doug Evans <dje@google.com>
2134
3bc32da3 2135 Remove global all_lwps.
d86d4aaf
DE
2136 * inferiors.h (ptid_of): Move here from linux-low.h.
2137 (pid_of, lwpid_of): Ditto.
2138 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2139 parameter is a struct thread_info * now.
2140 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2141 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2142 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2143 directly.
2144 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2145 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2146 * linux-arm-low.c (update_registers_callback): Update, "entry"
2147 parameter is a struct thread_info * now.
2148 Fetch lwpid from current_inferior directly.
2149 (arm_insert_point): Pass &all_threads to find_inferior instead of
2150 &all_lwps.
2151 (arm_remove_point): Ditto.
2152 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2153 (arm_prepare_to_resume): Fetch pid from thread.
2154 (arm_read_description): Fetch lwpid from current_inferior directly.
2155 * linux-low.c (all_lwps): Delete.
2156 (delete_lwp): Delete call to remove_inferior.
2157 (handle_extended_wait): Fetch lwpid from thread.
2158 (add_lwp): Don't set lwp->entry.id. Remove call to
2159 add_inferior_to_list.
2160 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2161 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2162 (kill_one_lwp_callback): Ditto.
2163 (linux_kill): Don't dereference NULL pointer.
2164 Fetch ptid,lwpid from thread.
2165 (get_detach_signal): Fetch ptid from thread.
2166 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2167 Simplify call to regcache_invalidate_thread.
2168 (delete_lwp_callback): Update, "entry" parameter is a
2169 struct thread_info * now. Fetch pid from thread.
2170 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2171 (status_pending_p_callback): Update, "entry" parameter is a
2172 struct thread_info * now. Fetch ptid from thread.
2173 (find_lwp_pid): Update, "entry" parameter is a
2174 struct thread_info * now.
2175 (linux_wait_for_lwp): Fetch pid from thread.
2176 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2177 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2178 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2179 (dequeue_one_deferred_signal): Ditto.
2180 (cancel_breakpoint): Fetch ptid from current_inferior.
2181 (linux_wait_for_event): Pass &all_threads to find_inferior,
2182 not &all_lwps. Fetch ptid, lwpid from thread.
2183 (count_events_callback): Update, "entry" parameter is a
2184 struct thread_info * now.
2185 (select_singlestep_lwp_callback): Ditto.
2186 (select_event_lwp_callback): Ditto.
2187 (cancel_breakpoints_callback): Ditto.
2188 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2189 not &all_lwps.
2190 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2191 (unsuspend_one_lwp): Update, "entry" parameter is a
2192 struct thread_info * now.
2193 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2194 not &all_lwps.
2195 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2196 Fetch lwpid from thread, not lwp.
2197 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2198 Pass &all_threads to find_inferior, not &all_lwps.
2199 (send_sigstop): Fetch lwpid from thread, not lwp.
2200 (send_sigstop_callback): Update, "entry" parameter is a
2201 struct thread_info * now.
2202 (suspend_and_send_sigstop_callback): Ditto.
2203 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2204 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2205 struct thread_info * now.
2206 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2207 from thread, lwp.
2208 (lwp_running): Update, "entry" parameter is a
2209 struct thread_info * now.
2210 (stop_all_lwps): Fetch ptid from thread.
2211 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2212 (linux_resume_one_lwp): Fetch lwpid from thread.
2213 (linux_set_resume_request): Update, "entry" parameter is a
2214 struct thread_info * now. Fetch pid, lwpid from thread.
2215 (resume_status_pending_p): Update, "entry" parameter is a
2216 struct thread_info * now.
2217 (need_step_over_p): Ditto. Fetch lwpid from thread.
2218 (start_step_over): Fetch lwpid from thread.
2219 (linux_resume_one_thread): Update, "entry" parameter is a
2220 struct thread_info * now. Fetch lwpid from thread.
2221 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2222 (proceed_one_lwp): Update, "entry" parameter is a
2223 struct thread_info * now. Fetch lwpid from thread.
2224 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2225 struct thread_info * now.
2226 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2227 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2228 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2229 directly.
2230 (regsets_store_inferior_registers): Ditto.
2231 (fetch_register, store_register): Ditto.
2232 (linux_read_memory, linux_write_memory): Ditto.
2233 (linux_request_interrupt): Ditto.
2234 (linux_read_auxv): Ditto.
2235 (linux_xfer_siginfo): Ditto.
2236 (linux_qxfer_spu): Ditto.
2237 (linux_qxfer_libraries_svr4): Ditto.
2238 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2239 moved to inferiors.h.
2240 (get_lwp): Delete.
2241 (get_thread_lwp): Update.
2242 (struct lwp_info): Delete member "entry". Simplify comment for
2243 member "thread".
2244 (all_lwps): Delete.
2245 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2246 current_inferior directly.
2247 (update_watch_registers_callback): Update, "entry" parameter is a
2248 struct thread_info * now. Fetch pid from thread.
2249 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2250 (mips_insert_point): Fetch lwpid from current_inferior.
2251 Pass &all_threads to find_inferior, not &all_lwps.
2252 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2253 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2254 directly.
2255 (mips_stopped_data_address): Ditto.
2256 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2257 directly.
2258 * linux-tile-low.c (tile_arch_setup): Ditto.
2259 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2260 (update_debug_registers_callback): Update, "entry" parameter is a
2261 struct thread_info * now. Fetch pid from thread.
2262 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2263 Pass &all_threads to find_inferior, not &all_lwps.
2264 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2265 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2266 Pass &all_threads to find_inferior, not &all_lwps.
2267 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2268 (i386_dr_low_get_status): Ditto.
2269 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2270 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2271 (x86_linux_read_description): Ditto.
2272 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2273
3b8361aa
DE
22742014-02-20 Doug Evans <dje@google.com>
2275
2276 * inferiors.c (get_first_inferior): Fix buglet.
2277
f7667f0d
DE
22782014-02-19 Doug Evans <dje@google.com>
2279
2280 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2281 * inferiors.c (add_thread): Change result type to struct thread_info *.
2282 All callers updated.
2283 (add_lwp): Call add_thread here instead of in callers.
2284 All callers updated.
2285 * linux-low.h (get_lwp_thread): Rewrite.
2286 (struct lwp_info): New member "thread".
2287
b3312d80
DE
22882014-02-19 Doug Evans <dje@google.com>
2289
2290 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2291 All callers updated.
2292
ecc6f45c
DE
22932014-02-19 Doug Evans <dje@google.com>
2294
2295 * inferiors.c (add_thread): Fix whitespace.
2296
649ebbca
DE
22972014-02-19 Doug Evans <dje@google.com>
2298
2299 * dll.c (clear_dlls): Replace accessing list implemention details
2300 with API function.
2301 * gdbthread.h (get_first_thread): Declare.
2302 * inferiors.c (for_each_inferior_with_data): New function.
2303 (get_first_thread): New function.
2304 (find_thread_ptid): Simplify.
2305 (get_first_inferior): New function.
2306 (clear_list): Delete.
2307 (one_inferior_p): New function.
2308 (clear_inferior_list): New function.
2309 (clear_inferiors): Update.
2310 * inferiors.h (for_each_inferior_with_data): Declare.
2311 (clear_inferior_list): Declare.
2312 (one_inferior_p): Declare.
2313 (get_first_inferior): Declare.
2314 * linux-low.c (linux_wait_for_event): Replace accessing list
2315 implemention details with API function.
2316 * server.c (target_running): Ditto.
2317 (accumulate_file_name_length): New function.
2318 (emit_dll_description): New function.
2319 (handle_qxfer_libraries): Replace accessing list implemention
2320 details with API function.
2321 (handle_qxfer_threads_worker): New function.
2322 (handle_qxfer_threads_proper): Replace accessing list implemention
2323 details with API function.
2324 (handle_query): Ditto.
2325 (visit_actioned_threads_callback_ftype): New typedef.
2326 (visit_actioned_threads_data): New struct.
2327 (visit_actioned_threads): Rewrite to be find_inferior callback.
2328 (resume): Call find_inferior.
2329 (handle_status): Replace accessing list implemention
2330 details with API function.
2331 (process_serial_event): Replace accessing list implemention details
2332 with API function.
2333 * target.c (set_desired_inferior): Replace accessing list implemention
2334 details with API function.
2335 * tracepoint.c (same_process_p): New function.
2336 (gdb_agent_about_to_close): Replace accessing list implemention
2337 details with API function.
2338 * win32-low.c (child_delete_thread): Replace accessing list
2339 implemention details with API function.
2340 (match_dll_by_basename): New function.
2341 (dll_is_loaded_by_basename): New function.
2342 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2343 details call to dll_is_loaded_by_basename.
2344
80894984
DE
23452014-02-19 Doug Evans <dje@google.com>
2346
2347 * dll.h (struct dll_info): Add comment.
2348 * gdbthread.h (struct thread_info): Add comment.
2349 (current_ptid): Simplify.
2350 * inferiors.c (add_process): Update.
2351 (remove_process): Update.
2352 * inferiors.h (struct process_info): Rename member "head" to "entry".
2353 * linux-low.c (delete_lwp): Update.
2354 (add_lwp): Update.
2355 (last_thread_of_process_p): Update.
2356 (kill_one_lwp_callback, linux_kill): Update.
2357 (status_pending_p_callback): Update.
2358 (wait_for_sigstop): Update. Simplify read of ptid.
2359 (start_step_over): Update.
2360 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2361 (get_lwp_thread): Update.
2362 (struct lwp_info): Rename member "head" to "entry".
2363 * regcache.h (inferior_list_entry): Delete.
2364 * server.c (kill_inferior_callback): Update.
2365 (detach_or_kill_inferior_callback): Update.
2366 (print_started_pid): Update.
2367 (print_attached_pid): Update.
2368 (process_serial_event): Simplify read of ptid.
2369 * thread-db.c (thread_db_create_event): Update.
2370 (thread_db_get_tls_address): Update.
2371 * win32-low.c (current_inferior_ptid): Simplify.
2372
46917d26
TT
23732014-02-19 Tom Tromey <tromey@redhat.com>
2374
2375 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2376 argument.
2377 (target_supports_btrace): Update.
2378
0759a81e
YQ
23792014-02-14 Yao Qi <yao@codesourcery.com>
2380
2381 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2382 (rsp-low-ipa.o): New target.
2383
a7191e8b
TT
23842014-02-12 Tom Tromey <tromey@redhat.com>
2385
2386 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2387 convert_ascii_to_int.
2388 * regcache.c (registers_to_string): Likewise.
2389 * remote-utils.c (decode_M_packet): Likewise.
2390 * server.c (process_serial_event): Likewise.
2391
ff0e980e
TT
23922014-02-12 Tom Tromey <tromey@redhat.com>
2393
2394 * server.c (handle_query, handle_v_run): Use hex2bin, not
2395 unhexify.
2396 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2397
e9371aff
TT
23982014-02-12 Tom Tromey <tromey@redhat.com>
2399
2400 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2401 convert_int_to_ascii.
2402 * regcache.c (registers_to_string, collect_register_as_string):
2403 Likewise.
2404 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2405 Likewise.
2406 * server.c (process_serial_event): Likewise.
2407 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2408 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2409
971dc0b8
TT
24102014-02-12 Tom Tromey <tromey@redhat.com>
2411
2412 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2413 bin2hex, not hexify.
2414 * tracepoint.c (cmd_qtstatus): Likewise.
2415
0a822afb
TT
24162014-02-12 Tom Tromey <tromey@redhat.com>
2417
2418 * remote-utils.c (monitor_output): Pass explicit length to
2419 hexify.
2420
9c3d6531
TT
24212014-02-12 Tom Tromey <tromey@redhat.com>
2422
2423 * tracepoint.c: Include rsp-low.h.
2424 * server.c: Include rsp-low.h.
2425 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2426 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2427 declare.
2428 * remote-utils.c: Include rsp-low.h.
2429 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2430 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2431 (convert_int_to_ascii, convert_ascii_to_int): Move to
2432 common/rsp-low.c.
2433 * regcache.c: Include rsp-low.h.
2434 * ax.c: Include rsp-low.h.
2435 * Makefile.in (SFILES): Add common/rsp-low.c.
2436 (OBS): Add rsp-low.o.
2437 (rsp-low.o): New target.
2438
01fd3ea5
TT
24392014-02-12 Tom Tromey <tromey@redhat.com>
2440
2441 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2442 Include print-utils.h.
2443 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2444 (plongest, thirty_two, phex_nz): Remove.
2445 * Makefile.in (SFILES): Add common/print-utils.c.
2446 (OBS): Add print-utils.o.
2447 (print-utils-ipa.o): New target.
2448 (print-utils.o): New target.
2449 (IPA_OBJS): Add print-utils-ipa.o.
2450
e99dc820
TT
24512014-02-06 Tom Tromey <tromey@redhat.com>
2452
2453 * Makefile.in (SFILES): Fix indentation.
2454
ee1e2d4f
DE
24552014-02-05 Doug Evans <dje@google.com>
2456
2457 * linux-low.c (linux_wait_for_event): Improve comment.
2458 (linux_wait_1): Keep current_inferior in sync with event_child.
2459
f5a02773
DE
24602014-01-22 Doug Evans <dje@google.com>
2461
2462 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2463
87ce2a04
DE
24642014-01-22 Doug Evans <dje@google.com>
2465
2466 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2467 * configure: Regenerate.
2468 * config.in: Regenerate.
2469 * Makefile.in (SFILES): Add debug.c.
2470 (OBS): Add debug.o.
2471 * debug.c: New file.
2472 * debug.h: New file.
2473 * linux-aarch64-low.c (*): Update all debugging printfs to use
2474 debug_printf instead of fprintf.
2475 * linux-arm-low.c (*): Ditto.
2476 * linux-cris-low.c (*): Ditto.
2477 * linux-crisv32-low.c (*): Ditto.
2478 * linux-m32r-low.c (*): Ditto.
2479 * linux-sparc-low.c (*): Ditto.
2480 * linux-x86.c (*): Ditto.
2481 * linux-low.c (*): Ditto.
2482 (linux_wait_1): Add calls to debug_enter, debug_exit.
2483 (linux_wait): Remove redundant debugging printf.
2484 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2485 (linux_resume, unstop_all_lwps): Ditto.
2486 * mem-break.c (*): Update all debugging printfs to use
2487 debug_printf instead of fprintf.
2488 * remote-utils.c (*): Ditto.
2489 * thread-db.c (*): Ditto.
2490 * server.c #include <ctype.h>, "gdb_vecs.h".
2491 (debug_threads): Moved to debug.c.
2492 (*): Update all debugging printfs to use debug_printf instead of
2493 fprintf.
2494 (start_inferior): Replace call to fflush with call to debug_flush.
2495 (monitor_show_help): Mention set debug-format.
2496 (parse_debug_format_options): New function.
2497 (handle_monitor_command): Handle "monitor set debug-format".
2498 (gdbserver_usage): Mention --debug-format.
2499 (main): Parse --debug-format.
2500 * server.h (debug_threads): Declaration moved to debug.h.
2501 #include "debug.h".
2502 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2503 trace_debug_1 that uses debug_printf.
2504 (tracepoint_look_up_symbols): Update all debugging printfs to use
2505 debug_printf instead of fprintf.
2506
e671835b
BS
25072014-01-20 Baruch Siach <baruch@tkos.co.il>
2508
2509 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2510 sys/ptrace.h.
2511
b5737fa9
PA
25122014-01-17 Pedro Alves <palves@redhat.com>
2513
ea38d2a9 2514 PR build/16445
c7faa97a
PA
2515 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2516 defined after including gdb_proc_service.h.
b5737fa9 2517
40ed484e
DE
25182014-01-16 Doug Evans <dje@google.com>
2519
2520 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2521 (match_dll): Use it.
2522
969c39fb
MM
25232014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2524
2525 * target.h (target_ops) <read_btrace>: Change parameters and
2526 return type to allow error reporting.
2527 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2528 trace reading errors on.
2529 * linux-low.c (linux_low_read_btrace): Pass trace reading
2530 errors on.
2531 (linux_low_disable_btrace): New.
2532
ab7f45ba
DE
25332014-01-15 Doug Evans <dje@google.com>
2534
2535 * inferiors.c (thread_id_to_gdb_id): Delete.
2536 * inferiors.h (thread_id_to_gdb_id): Delete.
2537
66af0f44
EZ
25382014-01-13 Eli Zaretskii <eliz@gnu.org>
2539
2540 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2541 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2542 versions.
2543
9939e131
PA
25442014-01-08 Pedro Alves <palves@redhat.com>
2545
2546 * server.c (handle_status): Don't discard previous queued stop
2547 replies or thread's pending status here.
2548 (main) <disconnection>: Do it here instead.
2549
b7ea362b
PA
25502014-01-08 Pedro Alves <palves@redhat.com>
2551
2552 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2553 * server.c (visit_actioned_threads, handle_pending_status): New
2554 function.
2555 (handle_v_cont): Factor out parts to ...
2556 (resume): ... this new function. If in all-stop, and a thread
2557 being resumed has a pending status, report it without actually
2558 resuming.
2559 (myresume): Adjust to use the new 'resume' function.
2560 (clear_pending_status_callback, set_pending_status_callback)
2561 (find_status_pending_thread_callback): New functions.
2562 (handle_status): Handle the case of multiple threads having
2563 interesting statuses to report. Report threads' real last signal
2564 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2565 with an interesting thread to report the status for, instead of
2566 always reporting the status of the first thread.
2567
28498c42
JB
25682014-01-01 Joel Brobecker <brobecker@adacore.com>
2569
2570 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2571 * gdbreplay.c (gdbreplay_version): Likewise.
2572
f45c82da
YZ
25732013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2574
2575 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2576 iov.iov_len with the real length in use.
2577
379a5e2d
JB
25782013-12-13 Joel Brobecker <brobecker@adacore.com>
2579
2580 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2581 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2582 for all targets that use win32-low.c.
2583 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2584 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2585
4210d83e
PA
25862013-12-13 Pedro Alves <palves@redhat.com>
2587
2588 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2589 if equal to TARGET_WAITKIND_LOADED.
2590 * win32-low.c (cached_status): New static global.
2591 (win32_wait): Add declaration.
2592 (do_initial_child_stuff): Flush all initial pending debug events
2593 up to the initial breakpoint.
2594 (win32_wait): If CACHED_STATUS was set, return that instead
2595 of doing a real wait. Remove the code resuming the execution
2596 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2597 during the initial phase. Also remove the code changing
2598 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2599 TARGET_WAITKIND_STOPPED.
2600
e7f0d979
YQ
26012013-12-11 Yao Qi <yao@codesourcery.com>
2602
2603 * notif.c (handle_notif_ack): Return 0 if no notification
2604 matches.
2605
ebcf782c
DE
26062013-11-20 Doug Evans <dje@google.com>
2607
2608 * linux-low.c (linux_set_resume_request): Fix comment.
2609
20ad9378
DE
26102013-11-20 Doug Evans <dje@google.com>
2611
2612 * linux-low.c (resume_status_pending_p): Tweak comment.
2613
a196ebeb
WT
26142013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2615
2616 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2617 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2618 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2619 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2620 (srv_amd64_regobj): Add amd64-mpx.o.
2621 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2622 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2623 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2624 * i387-fp.c (num_pl_bnd_register) Added constant.
2625 (num_pl_bnd_cfg_registers) Added constant.
2626 (struct i387_xsave) Added reserved area and MPX fields.
2627 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2628 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2629 function.
2630 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2631 (init_registers_amd64_mpx_linux): Declare new function.
2632 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2633 (x86_64_regmap): Add MPX registers.
2634 (x86_linux_read_description): Add MPX case.
2635 (initialize_low_arch): Initialize MPX targets.
2636
0080a2f6
TT
26372013-11-18 Tom Tromey <tromey@redhat.com>
2638
2639 * configure: Rebuild.
2640 * configure.ac: Don't check for stdlib.h.
2641 * gdbreplay.c: Unconditionally include stdlib.h.
2642
2978b111
TT
26432013-11-18 Tom Tromey <tromey@redhat.com>
2644
2645 * config.in: Rebuild.
2646 * configure: Rebuild.
2647 * configure.ac: Don't use AC_HEADER_DIRENT.
2648
a3d08894
TT
26492013-11-18 Tom Tromey <tromey@redhat.com>
2650
2651 * server.h: Don't check HAVE_STRING_H.
2652 * gdbreplay.c: Don't check HAVE_STRING_H.
2653 * configure: Rebuild.
2654
0a5dd17d
TT
26552013-11-18 Tom Tromey <tromey@redhat.com>
2656
2657 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2658 LIBGNU.
2659
1bd2f0ba
TT
26602013-11-08 Tom Tromey <tromey@redhat.com>
2661
2662 * configure, config.in: Rebuild.
2663 * configure.ac: Remove unused configury.
2664
3266f10b
TT
26652013-11-08 Tom Tromey <tromey@redhat.com>
2666
2667 * acinclude.m4: Include common.m4, codeset.m4.
2668 * configure, config.in: Rebuild.
2669 * configure.ac: Use GDB_AC_COMMON.
2670
6682d959
AA
26712013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2672
2673 * linux-s390-low.c (HWCAP_S390_TE): New define.
2674 (s390_arch_setup): Consider the TE field in the HWCAP for
2675 determining 'have_regset_tdb'.
2676
fd0a4d76
SDJ
26772013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2678
2679 PR gdb/16014
2680 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2681 call to sizeof.
2682
1a3d890b
PA
26832013-10-02 Pedro Alves <palves@redhat.com>
2684
2685 * server.c (process_serial_event): Don't output "GDBserver
2686 exiting" if GDB is connected through stdio.
2687 * target.c (mywait): Likewise, be silent if GDB is connected
2688 through stdio.
2689
97ad4581
JB
26902013-10-01 Joel Brobecker <brobecker@adacore.com>
2691
2692 * lynx-low.c (lynx_add_threads_after_attach): New function.
2693 (lynx_attach): Remove call to add_thread. Add call to
2694 lynx_add_threads_after_attach instead.
2695
5b4e221c
MF
26962013-09-28 Mike Frysinger <vapier@gentoo.org>
2697
2698 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2699 * config.in, configure: Regenerated.
2700
ee47b2f8
YQ
27012013-09-18 Yao Qi <yao@codesourcery.com>
2702
2703 PR server/15959
2704 * server.c (start_inferior): Clear 'resume_info'.
2705
d6707650 27062013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2707
d6707650
JW
2708 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2709 for each register.
2710
9243dd0e 27112013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2712
9243dd0e
JW
2713 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2714 linux-tile-low.o to srv_tgtobj.
2715
c623a6ef
WN
27162013-09-16 Will Newton <will.newton@linaro.org>
2717
2718 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2719 out regs.
2720
fb71d39e
PA
27212013-09-06 Pedro Alves <palves@redhat.com>
2722
2723 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2724 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2725 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2726 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2727 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2728 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2729
8e7e9910
PA
27302013-09-06 Pedro Alves <palves@redhat.com>
2731
2732 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2733 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2734
7c3a12ca
PA
27352013-09-06 Pedro Alves <palves@redhat.com>
2736
2737 * linux-amd64-ipa.c: Include tracepoint.h.
2738 * linux-i386-ipa.c: Include tracepoint.h.
2739
8eb3d7b6
RW
27402013-09-06 Ricard Wanderlof <ricardw@axis.com>
2741
2742 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2743 (ps_get_thread_area): New function.
2744
eddddb9d
RW
27452013-09-06 Ricard Wanderlof <ricardw@axis.com>
2746
2747 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2748 (initialize_low_arch): Call init_registers_crisv32 rather than
2749 init_register_crisv32.
2750
533b0600
PA
27512013-09-05 Pedro Alves <palves@redhat.com>
2752
2753 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2754 to ...
2755 * hostio.h: ... this new file.
2756 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2757 win32-low.c: Include hostio.h.
2758
0ce3d3b5
PA
27592013-09-05 Pedro Alves <palves@redhat.com>
2760
2761 * server.h (gdb_client_data, handler_func, callback_handler_func)
2762 (delete_file_handler, add_file_handler, append_callback_event)
2763 (delete_callback_event, start_event_loop, initialize_event_loop):
2764 Move to event-loop.h and include it.
2765 * event-loop.h: New file.
2766
799cdc37
PA
27672013-09-05 Pedro Alves <palves@redhat.com>
2768
2769 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2770 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2771 (loaded_dll, unloaded_dll): Move to ...
2772 * dll.h: ... this new file.
2773 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2774
6a6bbd9d
PA
27752013-09-05 Pedro Alves <palves@redhat.com>
2776
2777 * server.h (current_process, get_thread_process, all_processes)
2778 (add_inferior_to_list, for_each_inferior, current_inferior)
2779 (remove_inferior, add_process, remove_process, find_process_pid)
2780 (have_started_inferiors_p, have_attached_inferiors_p)
2781 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2782 (clear_inferiors, find_inferior, find_inferior_id)
2783 (inferior_target_data, set_inferior_target_data)
2784 (inferior_regcache_data, set_inferior_regcache_data): Move to
2785 inferiors.h, and include it.
2786 * inferiors.h: New file.
2787
f699aaba
PA
27882013-09-05 Pedro Alves <palves@redhat.com>
2789
2790 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2791 Move ...
2792 * ax.h: ... here.
2793
c144c7a0
PA
27942013-09-05 Pedro Alves <palves@redhat.com>
2795
2796 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2797 tracepoint.h.
2798 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2799 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2800 (handle_tracepoint_general_set, handle_tracepoint_query)
2801 (tracepoint_finished_step, tracepoint_was_hit)
2802 (release_while_stepping_state_list, current_traceframe)
2803 (in_readonly_region, traceframe_read_mem)
2804 (fetch_traceframe_registers, traceframe_read_sdata)
2805 (traceframe_read_info, struct fast_tpoint_collect_status)
2806 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2807 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2808 (supply_fast_tracepoint_registers)
2809 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2810 (ipa_tdesc, claim_trampoline_space)
2811 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2812 (agent_mem_read, agent_get_trace_state_variable_value)
2813 (agent_set_trace_state_variable_value, agent_tsv_read)
2814 (agent_mem_read_string, get_raw_reg_func_addr)
2815 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2816 * tracepoint.h: ... this new file.
2817
ff42e6ab
PA
28182013-09-05 Pedro Alves <palves@redhat.com>
2819
2820 * server.h (perror_with_name, error, fatal, warning, paddress)
2821 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2822 include it.
2823 * utils.h: New file.
2824
541af0f4
PA
28252013-09-05 Pedro Alves <palves@redhat.com>
2826
2827 * server.h (remote_debug, noack_mode, transport_is_reliable)
2828 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2829 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2830 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2831 (write_enn, initialize_async_io, enable_async_io)
2832 (disable_async_io, check_remote_input_interrupt_request)
2833 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2834 (dead_thread_notify, prepare_resume_reply)
2835 (decode_address_to_semicolon, decode_address, decode_m_packet)
2836 (decode_M_packet, decode_X_packet, decode_xfer_write)
2837 (decode_search_memory_packet, unhexify, hexify)
2838 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2839 (look_up_one_symbol, relocate_instruction)
2840 (monitor_output): Move to remote-utils.h, and include it.
2841 * remote-utils.h: New file.
2842
eebdf26b
PA
28432013-09-05 Pedro Alves <palves@redhat.com>
2844
2845 * server.h (_): Delete.
2846
3aafd2ff
PA
28472013-09-02 Pedro Alves <palves@redhat.com>
2848
2849 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2850 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2851 allocated.
2852 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2853
cee83bcb
PM
28542013-09-02 Pierre Muller <muller@sourceware.org>
2855
2856 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2857 or WriteProcessMemory complete successfully and handle
2858 ERROR_PARTIAL_COPY error.
2859
9a13b2fa
PA
28602013-09-02 Pedro Alves <palves@redhat.com>
2861
2862 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2863 error instead of EIO.
2864
602e3198
JK
28652013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2866
2867 PR server/15604
2868 * linux-low.c: Include filestuff.h.
2869 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2870 * lynx-low.c: Include filestuff.h.
2871 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2872 * server.c: Include filestuff.h.
2873 (main): Call notice_open_fds.
2874 * spu-low.c: Include filestuff.h.
2875 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2876
96d7229d
LM
28772013-08-22 Luis Machado <lgustavo@codesourcery.com>
2878
2879 * Makefile.in: Explain why ../target and ../nat are not
2880 listed as include file search paths.
2881 (linux-waitpid.o): New object file rule.
2882 * configure.srv (srv_native_linux_obj): New variable.
2883 Replace all occurrences of linux native object files with
2884 $srv_native_linux_obj.
2885 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2886 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2887 (linux_enable_event_reporting): Remove declaration.
2888 (my_waitpid): Moved to common/linux-waitpid.c.
2889 (linux_wait_for_event): Pass ptid when calling
2890 linux_enable_event_reporting.
2891 (linux_supports_tracefork_flag): Remove.
2892 (linux_enable_event_reporting): Likewise.
2893 (linux_tracefork_grandchild): Remove.
2894 (STACK_SIZE): Moved to common/linux-ptrace.c.
2895 (linux_tracefork_child): Remove.
2896 (linux_test_for_tracefork): Remove.
2897 (linux_look_up_symbols): Call linux_supports_traceclone.
2898 (initialize_low): Remove call to linux_test_for_tracefork.
2899 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2900 common/linux-ptrace.h.
2901 (PTRACE_TYPE_ARG4): Likewise.
2902 Include linux-ptrace.h.
2903
32940073
PA
29042013-08-21 Pedro Alves <palves@redhat.com>
2905
2906 * config.in: Renegerate.
2907
33b60d58 29082013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2909
33b60d58
LM
2910 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2911 (SFILES): Remove $(srcdir)/common/target-common.c and
2912 add $(srcdir)/target/waitstatus.c.
2913 (OBS): Remove target-common.o and add waitstatus.o.
2914 (server_h): Remove $(srcdir)/../common/target-common.h and
2915 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2916 and $(srcdir)/../target/waitstatus.h.
2917 (target-common.o): Remove.
2918 (waitstatus.o): New target object file.
2919 * target.h: Do not include target-common.h and
2920 include target/resume.h, target/wait.h and
2921 target/waitstatus.h.
2922
b8e1b30e
LM
29232013-08-13 Luis Machado <lgustavo@codesourcery.com>
2924
2925 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2926 to PTRACE_TYPE_ARG3.
2927 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2928 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2929 PTRACE_TYPE_ARG4.
2930 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2931 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2932
7a60ad40
YQ
29332013-07-27 Jie Zhang <jie@codesourcery.com>
2934 Daniel Jacobowitz <dan@codesourcery.com>
2935 Yao Qi <yao@codesourcery.com>
2936
2937 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2938 (mips-linux-watch.o): New rule.
2939 (mips_linux_watch_h): New variable.
2940 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2941 srv_tgtobj.
2942 * linux-mips-low.c: Include mips-linux-watch.h.
2943 (struct arch_process_info, struct arch_lwp_info): New.
2944 (update_watch_registers_callback): New function.
2945 (mips_linux_new_process, mips_linux_new_thread) New functions.
2946 (mips_linux_prepare_to_resume, mips_insert_point): New
2947 functions.
2948 (mips_remove_point, mips_stopped_by_watchpoint): New
2949 functions.
2950 (rsp_bp_type_to_target_hw_bp_type): New function.
2951 (mips_stopped_data_address): New function.
2952 (the_low_target): Add watchpoint support functions.
2953
de6f69ad
YQ
29542013-07-27 Yao Qi <yao@codesourcery.com>
2955
2956 * i386-low.c: Include break-common.h.
2957 (enum target_hw_bp_type): Remove.
2958
3360c0bf
LM
29592013-07-24 Luis Machado <lgustavo@codesourcery.com>
2960
2961 * Makefile.in (SFILES): /common/target-common.c.
2962 (OBS): Add target-common.o.
2963 (server_h): Add $(srcdir)/../common/target-common.h.
2964 (target-common.o): New target.
2965 * server.c (queue_stop_reply_callback): Free
2966 status string after use.
2967 * target.c (target_waitstatus_to_string): Remove.
2968 * target.h: Include target-common.h.
2969 (resume_kind): Likewise.
2970 (target_waitkind): Likewise.
2971 (target_waitstatus): Likewise.
2972 (TARGET_WNOHANG): Likewise.
2973
bd885420
YQ
29742013-07-04 Yao Qi <yao@codesourcery.com>
2975
2976 * Makefile.in (host_alias): Use @host_noncanonical@.
2977 (target_alias): Use @target_noncanonical@.
2978 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2979 ACX_NONCANONICAL_HOST.
2980 * configure: Regenerated.
2981
2982 Revert:
2983 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2984
2985 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2986 * configure: Rebuild.
2987 * Makefile.in (version_host, version_target): Get from configure.
2988 (version.c): Use $(version_host) and $(version_target).
2989
17ef446e
PA
29902013-07-03 Pedro Alves <palves@redhat.com>
2991
2992 * Makefile.in (config.status): Depend on development.sh.
2993 * acinclude.m4: Include libmcheck.m4.
2994 * configure: Regenerate.
2995
7a9a7487
MG
29962013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2997
2998 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2999 attribute inside the parentheses.
3000 (winapi_DebugSetProcessKillOnExit): Ditto.
3001 (winapi_DebugBreakProcess): Ditto.
3002 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3003
49b64de6
MG
30042013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3005
3006 * notif.h (notif_event): Add a dummy member to avoid compiler
3007 errors.
3008
d5749ee7
PA
30092013-07-01 Pedro Alves <palves@redhat.com>
3010
3011 * hostio.c (HOSTIO_PATH_MAX): Define.
3012 (require_filename, handle_open, handle_unlink, handle_readlink):
3013 Use it.
3014
d8d2a3ee
PA
30152013-07-01 Pedro Alves <palves@redhat.com>
3016
3017 * server.h: Include "pathmax.h".
3018 * linux-low.c: Don't include sys/param.h.
3019 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3020 MAXPATHLEN.
3021 * win32-low.c: Don't include sys/param.h.
3022 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3023
bc7dea8d
PA
30242013-07-01 Pedro Alves <palves@redhat.com>
3025
3026 * event-loop.c: Don't check HAVE_UNISTD_H before including
3027 <unistd.h>.
3028 * gdbreplay.c: Likewise.
3029 * remote-utils.c: Likewise.
3030 * server.c: Likewise.
3031 * configure.ac: Don't check for unistd.h.
3032 * configure: Regenerate.
3033
d6c2da54
TT
30342013-06-28 Tom Tromey <tromey@redhat.com>
3035
3036 * Makefile.in (version.c): Use version.in, not
3037 common/version.in.
3038
257b6bec
MG
30392013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3040
3041 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3042 * configure: Rebuild.
3043 * Makefile.in (version_host, version_target): Get from configure.
3044 (version.c): Use $(version_host) and $(version_target).
3045
86ebe149
DK
30462013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3047
3048 Fix trace-status to output user name without trailing colon.
3049 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3050
f30aa5af
DK
30512013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3052
3053 Fix trace-status to output proper start-time and stop-time.
3054 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3055 output start time and stop time in hex as gdb expects.
3056
28a93511
YQ
30572013-06-26 Pedro Alves <pedro@codesourcery.com>
3058
3059 * tracepoint.c (build_traceframe_info_xml): Output trace state
3060 variables present in the trace buffer.
3061
01208463
TT
30622013-06-24 Tom Tromey <tromey@redhat.com>
3063
3064 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3065 create-version.sh.
3066 (version.o): Remove.
3067 * gdbreplay.c: Include version.h.
3068 (version, host_name): Don't declare.
3069 * server.h: Include version.h.
3070 (version, host_name): Don't declare.
3071
760256f9
PA
30722013-06-12 Pedro Alves <palves@redhat.com>
3073
3074 * linux-x86-low.c (linux_is_elf64): Delete global.
3075 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3076 with local linux_pid_exe_is_elf_64_file use.
3077
030031ee
PA
30782013-06-11 Pedro Alves <palves@redhat.com>
3079
3080 * linux-low.c (regset_disabled, disable_regset): New functions.
3081 (regsets_fetch_inferior_registers)
3082 (regsets_store_inferior_registers): Use them.
3083 (initialize_regsets_info); Don't allocate the disabled_regsets
3084 array here.
3085 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3086 comment.
3087
5da6eb0a
PA
30882013-06-11 Pedro Alves <palves@redhat.com>
3089
3090 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3091 xmalloc.
3092
7e5aaa09
PA
30932013-06-11 Pedro Alves <palves@redhat.com>
3094
3095 * linux-x86-low.c (initialize_low_arch): Call
3096 init_registers_x32_avx_linux.
3097
d878444c
JK
30982013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3099
3100 Fix compatibility with Android Bionic.
3101 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3102 it is not empty.
3103
3aee8918
PA
31042013-06-07 Pedro Alves <palves@redhat.com>
3105
5f2b57b5 3106 PR server/14823
3aee8918
PA
3107 * Makefile.in (OBS): Add tdesc.o.
3108 (IPA_OBJS): Add tdesc-ipa.o.
3109 (tdesc-ipa.o): New rule.
3110 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3111 interface.
3112 * linux-low.c (new_inferior): Delete.
3113 (disabled_regsets, num_regsets): Delete.
3114 (linux_add_process): Adjust to set the new per-process
3115 new_inferior flag.
3116 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3117 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3118 was a stop. When calling arch_setup, switch the current inferior
3119 to the thread that got an event.
3120 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3121 (regsets_fetch_inferior_registers)
3122 (regsets_store_inferior_registers): New regsets_info parameter.
3123 Adjust to use it.
3124 (linux_register_in_regsets): New regs_info parameter. Adjust to
3125 use it.
3126 (register_addr, fetch_register, store_register): New usrregs_info
3127 parameter. Adjust to use it.
3128 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3129 parameter regs_info. Adjust to use it.
3130 (linux_fetch_registers): Get the current inferior's regs_info, and
3131 adjust to use it.
3132 (linux_store_registers): Ditto.
3133 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3134 (initialize_low): Don't initialize the target_regsets here. Call
3135 initialize_low_arch.
3136 * linux-low.h (target_regsets): Delete declaration.
3137 (struct regsets_info): New.
3138 (struct usrregs_info): New.
3139 (struct regs_info): New.
3140 (struct process_info_private) <new_inferior>: New field.
3141 (struct linux_target_ops): Delete the num_regs, regmap, and
3142 regset_bitmap fields. New field regs_info.
3143 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3144 * i387-fp.c (num_xmm_registers): Delete.
3145 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3146 calls to new interface.
3147 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3148 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3149 Infer the number of xmm registers from the regcache's target
3150 description.
3151 * i387-fp.h (num_xmm_registers): Delete.
3152 * inferiors.c (add_thread): Don't install the thread's regcache
3153 here.
3154 * proc-service.c (gregset_info): Fetch the current inferior's
3155 regs_info. Adjust to use it.
3156 * regcache.c: Include tdesc.h.
3157 (register_bytes, reg_defs, num_registers)
3158 (gdbserver_expedite_regs): Delete.
3159 (get_thread_regcache): If the thread doesn't have a regcache yet,
3160 create one, instead of aborting gdbserver.
3161 (regcache_invalidate_one): Rename to ...
3162 (regcache_invalidate_thread): ... this.
3163 (regcache_invalidate_one): New.
3164 (regcache_invalidate): Only invalidate registers of the current
3165 process.
3166 (init_register_cache): Add target_desc parameter, and use it.
3167 (new_register_cache): Ditto. Assert the target description has a
3168 non zero registers_size.
3169 (regcache_cpy): Add assertions. Adjust.
3170 (realloc_register_cache, set_register_cache): Delete.
3171 (registers_to_string, registers_from_string): Adjust.
3172 (find_register_by_name, find_regno, find_register_by_number)
3173 (register_cache_size): Add target_desc parameter, and use it.
3174 (free_register_cache_thread, free_register_cache_thread_one)
3175 (regcache_release, register_cache_size): New.
3176 (register_size): Add target_desc parameter, and use it.
3177 (register_data, supply_register, supply_register_zeroed)
3178 (supply_regblock, supply_register_by_name, collect_register)
3179 (collect_register_as_string, collect_register_by_name): Adjust.
3180 * regcache.h (struct target_desc): Forward declare.
3181 (struct regcache) <tdesc>: New field.
3182 (init_register_cache, new_register_cache): Add target_desc
3183 parameter.
3184 (regcache_invalidate_thread): Declare.
3185 (regcache_invalidate_one): Delete declaration.
3186 (regcache_release): Declare.
3187 (find_register_by_number, register_cache_size, register_size)
3188 (find_regno): Add target_desc parameter.
3189 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3190 declarations.
3191 * remote-utils.c: Include tdesc.h.
3192 (outreg, prepare_resume_reply): Adjust.
3193 * server.c: Include tdesc.h.
3194 (gdbserver_xmltarget): Delete declaration.
3195 (get_features_xml, process_serial_event): Adjust.
3196 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3197 declare.
3198 (struct process_info) <tdesc>: New field.
3199 (ipa_tdesc): Declare.
3200 * tdesc.c: New file.
3201 * tdesc.h: New file.
3202 * tracepoint.c: Include tdesc.h.
3203 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3204 (get_context_regcache): Adjust to pass ipa_tdesc down.
3205 (do_action_at_tracepoint): Adjust to get the register cache size
3206 from the context regcache's description.
3207 (traceframe_walk_blocks): Adjust to get the register cache size
3208 from the current trace frame's description.
3209 (traceframe_get_pc): Adjust to get current trace frame's
3210 description and pass it down.
3211 (gdb_collect): Adjust to get the register cache size from the
3212 IPA's description.
3213 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3214 (gdbserver_xmltarget): Delete.
3215 (initialize_low_tracepoint): Set the ipa's target description.
3216 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3217 (initialize_low_tracepoint): Set the ipa's target description.
3218 * linux-x86-low.c: Include tdesc.h.
3219 [__x86_64__] (is_64bit_tdesc): New.
3220 (ps_get_thread_area, x86_get_thread_area): Use it.
3221 (i386_cannot_store_register): Rename to ...
3222 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3223 (i386_cannot_fetch_register): Rename to ...
3224 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3225 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3226 to new interface.
3227 (target_regsets): Rename to ...
3228 (x86_regsets): ... this.
3229 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3230 interface.
3231 (x86_siginfo_fixup): Use is_64bit_tdesc.
3232 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3233 (tdesc_x32_avx_linux, tdesc_x32_linux)
3234 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3235 Declare.
3236 (x86_linux_update_xmltarget): Delete.
3237 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3238 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3239 (AMD64_LINUX_USER64_CS): New.
3240 (x86_linux_read_description): New, based on
3241 x86_linux_update_xmltarget.
3242 (same_process_callback): New.
3243 (x86_arch_setup_process_callback): New.
3244 (x86_linux_update_xmltarget): New.
3245 (x86_regsets_info): New.
3246 (amd64_linux_regs_info): New.
3247 (i386_linux_usrregs_info): New.
3248 (i386_linux_regs_info): New.
3249 (x86_linux_regs_info): New.
3250 (x86_arch_setup): Reimplement.
3251 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3252 (x86_emit_ops): Ditto.
3253 (the_low_target): Adjust. Install x86_linux_regs_info,
3254 x86_cannot_fetch_register, and x86_cannot_store_register.
3255 (initialize_low_arch): New.
3256 * linux-ia64-low.c (tdesc_ia64): Declare.
3257 (ia64_fetch_register): Adjust.
3258 (ia64_usrregs_info, regs_info): New globals.
3259 (ia64_regs_info): New function.
3260 (the_low_target): Adjust.
3261 (initialize_low_arch): New function.
3262 * linux-sparc-low.c (tdesc_sparc64): Declare.
3263 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3264 Adjust.
3265 (sparc_arch_setup): New function.
3266 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3267 (the_low_target): Adjust.
3268 (initialize_low_arch): New function.
3269 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3270 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3271 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3272 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3273 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3274 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3275 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3276 (tdesc_powerpc_isa205_vsx64l): Declare.
3277 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3278 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3279 (ppc_set_pc, ppc_get_hwcap): Adjust.
3280 (ppc_usrregs_info): Forward declare.
3281 (!__powerpc64__) ppc_regmap_adjusted: New global.
3282 (ppc_arch_setup): Adjust to the current process'es target
3283 description.
3284 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3285 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3286 (ppc_store_evrregset): Adjust.
3287 (target_regsets): Rename to ...
3288 (ppc_regsets): ... this, and make static.
3289 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3290 (ppc_regs_info): New function.
3291 (the_low_target): Adjust.
3292 (initialize_low_arch): New function.
3293 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3294 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3295 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3296 (tdesc_s390x_linux64v2): Declare.
3297 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3298 (s390_fill_gregset, s390_store_last_break): Adjust.
3299 (target_regsets): Rename to ...
3300 (s390_regsets): ... this, and make static.
3301 (s390_get_pc, s390_set_pc): Adjust.
3302 (s390_get_hwcap): New target_desc parameter, and use it.
3303 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3304 (s390_arch_setup): Adjust to set the current process'es target
3305 description. Don't adjust the regmap.
3306 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3307 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3308 (regs_info_3264): New globals.
3309 (s390_regs_info): New function.
3310 (the_low_target): Adjust.
3311 (initialize_low_arch): New function.
3312 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3313 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3314 [__mips64] (init_registers_mips_linux)
3315 (init_registers_mips_dsp_linux): Delete defines.
3316 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3317 (have_dsp): New global.
3318 (mips_read_description): New, based on mips_arch_setup.
3319 (mips_arch_setup): Reimplement.
3320 (get_usrregs_info): New function.
3321 (mips_cannot_fetch_register, mips_cannot_store_register)
3322 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3323 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3324 (target_regsets): Rename to ...
3325 (mips_regsets): ... this, and make static.
3326 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3327 (dsp_regs_info, regs_info): New globals.
3328 (mips_regs_info): New function.
3329 (the_low_target): Adjust.
3330 (initialize_low_arch): New function.
3331 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3332 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3333 Declare.
3334 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3335 (arm_read_description): New, with bits factored from
3336 arm_arch_setup.
3337 (arm_arch_setup): Reimplement.
3338 (target_regsets): Rename to ...
3339 (arm_regsets): ... this, and make static.
3340 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3341 (arm_regs_info): New function.
3342 (the_low_target): Adjust.
3343 (initialize_low_arch): New function.
3344 * linux-m68k-low.c (tdesc_m68k): Declare.
3345 (target_regsets): Rename to ...
3346 (m68k_regsets): ... this, and make static.
3347 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3348 (m68k_regs_info): New function.
3349 (m68k_arch_setup): New function.
3350 (the_low_target): Adjust.
3351 (initialize_low_arch): New function.
3352 * linux-sh-low.c (tdesc_sharch): Declare.
3353 (target_regsets): Rename to ...
3354 (sh_regsets): ... this, and make static.
3355 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3356 (sh_regs_info, sh_arch_setup): New functions.
3357 (the_low_target): Adjust.
3358 (initialize_low_arch): New function.
3359 * linux-bfin-low.c (tdesc_bfin): Declare.
3360 (bfin_arch_setup): New function.
3361 (bfin_usrregs_info, regs_info): New globals.
3362 (bfin_regs_info): New function.
3363 (the_low_target): Adjust.
3364 (initialize_low_arch): New function.
3365 * linux-cris-low.c (tdesc_cris): Declare.
3366 (cris_arch_setup): New function.
3367 (cris_usrregs_info, regs_info): New globals.
3368 (cris_regs_info): New function.
3369 (the_low_target): Adjust.
3370 (initialize_low_arch): New function.
3371 * linux-cris-low.c (tdesc_crisv32): Declare.
3372 (cris_arch_setup): New function.
3373 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3374 (cris_regs_info): New function.
3375 (the_low_target): Adjust.
3376 (initialize_low_arch): New function.
3377 * linux-m32r-low.c (tdesc_m32r): Declare.
3378 (m32r_arch_setup): New function.
3379 (m32r_usrregs_info, regs_info): New globals.
3380 (m32r_regs_info): Adjust.
3381 (initialize_low_arch): New function.
3382 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3383 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3384 (tic6x_usrregs_info): Forward declare.
3385 (tic6x_read_description): New function, based on ...
3386 (tic6x_arch_setup): ... this. Reimplement.
3387 (target_regsets): Rename to ...
3388 (tic6x_regsets): ... this, and make static.
3389 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3390 (tic6x_regs_info): New function.
3391 (the_low_target): Adjust.
3392 (initialize_low_arch): New function.
3393 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3394 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3395 (target_regsets): Rename to ...
3396 (xtensa_regsets): ... this, and make static.
3397 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3398 globals.
3399 (xtensa_arch_setup, xtensa_regs_info): New functions.
3400 (the_low_target): Adjust.
3401 (initialize_low_arch): New function.
3402 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3403 (nios2_arch_setup): Set the current process'es tdesc.
3404 (target_regsets): Rename to ...
3405 (nios2_regsets): ... this.
3406 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3407 (nios2_regs_info): New function.
3408 (the_low_target): Adjust.
3409 (initialize_low_arch): New function.
a261b8f5
PA
3410 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3411 (aarch64_arch_setup): Set the current process'es tdesc.
3412 (target_regsets): Rename to ...
3413 (aarch64_regsets): ... this.
3414 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3415 (aarch64_regs_info): New function.
3416 (the_low_target): Adjust.
3417 (initialize_low_arch): New function.
3aee8918
PA
3418 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3419 globals.
3420 (target_regsets): Rename to ...
3421 (tile_regsets): ... this.
3422 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3423 (tile_regs_info): New function.
3424 (tile_arch_setup): Set the current process'es tdesc.
3425 (the_low_target): Adjust.
3426 (initialize_low_arch): New function.
3427 * spu-low.c (tdesc_spu): Declare.
3428 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3429 * win32-arm-low.c (tdesc_arm): Declare.
3430 (arm_arch_setup): New function.
3431 (the_low_target): Install arm_arch_setup instead of
3432 init_registers_arm.
3433 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3434 (init_windows_x86): Rename to ...
3435 (i386_arch_setup): ... this. Set `win32_tdesc'.
3436 (the_low_target): Adjust.
3437 * win32-low.c (win32_tdesc): New global.
3438 (child_add_thread): Don't create the thread cache here.
3439 (do_initial_child_stuff): Set the new process'es tdesc.
3440 * win32-low.h (struct target_desc): Forward declare.
3441 (win32_tdesc): Declare.
3442 * lynx-i386-low.c (tdesc_i386): Declare global.
3443 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3444 * lynx-low.c (lynx_tdesc): New global.
3445 (lynx_add_process): Set the new process'es tdesc.
3446 * lynx-low.h (struct target_desc): Forward declare.
3447 (lynx_tdesc): Declare global.
3448 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3449 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3450 * nto-low.c (nto_tdesc): New global.
3451 (do_attach): Set the new process'es tdesc.
3452 * nto-low.h (struct target_desc): Forward declare.
3453 (nto_tdesc): Declare.
3454 * nto-x86-low.c (tdesc_i386): Declare.
3455 (nto_x86_arch_setup): Set `nto_tdesc'.
3456
b1fbec62
GB
34572013-06-04 Gary Benson <gbenson@redhat.com>
3458
3459 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3460 to qSupported response when appropriate.
3461 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3462 with nonzero-length annex.
3463 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3464 arguments supplied in annex.
3465
d1ec4ce7
DE
34662013-05-31 Doug Evans <dje@google.com>
3467
ac44adcb 3468 PR server/15594
d1ec4ce7
DE
3469 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3470 64 bits in 64-cross-32 environment.
3471
9b25f2d3
PA
34722013-05-28 Pedro Alves <palves@redhat.com>
3473
3474 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3475 (aarch64-without-fpu.c): Delete rule.
3476 * configure.srv (aarch64*-*-linux*): Remove references to
3477 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3478 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3479 declaration.
3480
6740dc9c
PA
34812013-05-24 Pedro Alves <palves@redhat.com>
3482
3483 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3484 instead of strchr/decode_address. Error if the range isn't split
3485 with a ','. Don't assume there's be a ':' in the action.
3486
c2d6af84
PA
34872013-05-23 Yao Qi <yao@codesourcery.com>
3488 Pedro Alves <palves@redhat.com>
3489
3490 * linux-low.c (lwp_in_step_range): New function.
3491 (linux_wait_1): If the thread was range stepping and stopped
3492 outside the stepping range, report the stop to GDB. Otherwise,
3493 continue stepping. Add range stepping debug output.
3494 (linux_set_resume_request): Copy the step range from the resume
3495 request to the lwp.
3496 (linux_supports_range_stepping): New.
3497 (linux_target_ops) <supports_range_stepping>: Set to
3498 linux_supports_range_stepping.
3499 * linux-low.h (struct linux_target_ops)
3500 <supports_range_stepping>: New field.
3501 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3502 * linux-x86-low.c (x86_supports_range_stepping): New.
3503 (the_low_target) <supports_range_stepping>: Set to
3504 x86_supports_range_stepping.
3505 * server.c (handle_v_cont): Handle 'r' action.
3506 (handle_v_requests): Append ";r" if the target supports range
3507 stepping.
3508 * target.h (struct thread_resume) <step_range_start,
3509 step_range_end>: New fields.
3510 (struct target_ops) <supports_range_stepping>:
3511 New field.
3512 (target_supports_range_stepping): New macro.
3513
58794e1a
JB
35142013-05-17 Joel Brobecker <brobecker@adacore.com>
3515
3516 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3517 confusion in comment.
3518
d631c5a7
JB
35192013-05-17 Joel Brobecker <brobecker@adacore.com>
3520
3521 * lynx-low.c (struct process_info_private): New type.
3522 (lynx_add_process): New function.
3523 (lynx_create_inferior, lynx_attach): Replace calls to
3524 add_process by calls to lynx_add_process.
3525 (lynx_resume): If PTID is null, then try using
3526 current_process()->private->last_wait_event_ptid.
3527 Add comments.
3528 (lynx_clear_inferiors): Delete. The contents of that function
3529 has been inlined in lynx_mourn;
3530 (lynx_wait_1): Save the ptid in the process's private data.
3531 (lynx_mourn): Free the process' private data. Replace call
3532 to lynx_clear_inferiors by call to clear_inferiors.
3533
96f7a20f
YQ
35342013-05-17 Yao Qi <yao@codesourcery.com>
3535
3536 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3537 the right place.
3538
db0dfaa0
LM
35392013-05-16 Luis Machado <lgustavo@codesourcery.com>
3540
3541 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3542 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3543 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3544 PT_TEXT_END_ADDR guards. Update comments.
3545 (linux_target_op) <read_offsets>: Conditionally define to
3546 linux_read_offsets if the target is UCLIBC and if it defines
3547 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3548
68f5f838
SL
35492013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3550 Andrew Jenner <andrew@codesourcery.com>
3551
3552 * Makefile.in (SFILES): Add linux-nios2-low.c.
3553 (clean): Add action to delete nios2-linux.c.
3554 (nios2-linux.c): New rule.
3555 * configure.srv: Add nios2*-*-linux*.
3556 * linux-nios2-low.c: New.
3557
1ebff1fd
HAQ
35582013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3559
3560 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3561
f6150862
HZ
35622013-04-25 Hui Zhu <hui@codesourcery.com>
3563
3564 PR gdb/15186
f6150862
HZ
3565 * ax.c (ax_printf): Add fflush.
3566
614c279d
TT
35672013-04-22 Tom Tromey <tromey@redhat.com>
3568
3569 * Makefile.in (SFILES): Add filestuff.c.
3570 (OBS): Add filestuff.o.
3571 (filestuff.o): New target.
3572 * config.in, configure: Rebuild.
3573 * configure.ac: Check for fdwalk, pipe2.
3574
7d4e5717
PA
35752013-04-17 Pedro Alves <palves@redhat.com>
3576
3577 * configure.ac (USE_THREAD_DB): Delete variable.
3578 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3579 Don't AC_SUBST USE_THREAD_DB.
3580 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3581 * config.in, configure: Regenerate.
3582
d5c93e41
PA
35832013-04-16 Pedro Alves <palves@redhat.com>
3584
3585 * linux-low.h (struct lwp_info) <thread_known>: Move under
3586 the USE_THREAD_DB #ifdef.
3587
04f5fe89
PA
35882013-04-16 Pedro Alves <palves@redhat.com>
3589
3590 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3591 (linux-low.o): Delete rule.
3592 * linux-low.h: Always include "gdb_thread_db.h" instead of
3593 conditionally including thread_db.h.
3594 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3595 HAVE_THREAD_DB_H.
3596
480b27bf
JK
35972013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3598
3599 * Makefile.in (install-only): Fix make install regression.
3600
43662968
JK
36012013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3602
3603 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3604 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3605 installation.
3606 * gdbserver.1: Remove.
3607
3e74e146
PA
36082013-03-22 Pedro Alves <palves@redhat.com>
3609
3610 * linux-low.c (handle_extended_wait): Don't call
3611 linux_enable_event_reporting.
3612
a8347a2a
TT
36132013-03-15 Tony Theodore <tonyt@logyst.com>
3614
3615 PR build/9098:
3616 * Makefile.in (SHELL): Use @SHELL@.
3617
eeb56fa7
SDJ
36182013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3619
3620 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3621 compiler warning.
3622
4fa7e2ff
JB
36232013-03-13 Joel Brobecker <brobecker@adacore.com>
3624
3625 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3626 Remove extraneous NULL element.
3627
8ddb1965
YQ
36282013-03-13 Yao Qi <yao@codesourcery.com>
3629
3630 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3631 'V' block in trace frame.
3632
9accd112
MM
36332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3634
3635 * target.h (struct target_ops): Add btrace ops.
3636 (target_supports_btrace): New macro.
3637 (target_enable_btrace): New macro.
3638 (target_disable_btrace): New macro.
3639 (target_read_btrace): New macro.
3640 * gdbthread.h (struct thread_info): Add btrace field.
3641 * server.c: Include btrace-common.h.
3642 (handle_btrace_general_set): New function.
3643 (handle_btrace_enable): New function.
3644 (handle_btrace_disable): New function.
3645 (handle_general_set): Call handle_btrace_general_set.
3646 (handle_qxfer_btrace): New function.
3647 (struct qxfer qxfer_packets[]): Add btrace entry.
3648 * inferiors.c (remove_thread): Disable btrace.
3649 * linux-low: Include linux-btrace.h.
3650 (linux_low_enable_btrace): New function.
3651 (linux_low_read_btrace): New function.
3652 (linux_target_ops): Add btrace ops.
3653 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3654 Add srv_linux_btrace=yes.
3655 (x86_64-*-linux*): Add linux-btrace.o.
3656 Add srv_linux_btrace=yes.
3657 * configure.ac: Define HAVE_LINUX_BTRACE.
3658 * config.in: Regenerated.
3659 * configure: Regenerated.
3660
5cc22e4c
MM
36612013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3662
3663 * server.c (handle_qxfer): Preserve error message if -3 is
3664 returned.
3665 (qxfer): Document the -3 return value.
3666
7c97f91e
MM
36672013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3668
3669 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3670 (linux_btrace_h): New variable.
3671 (linux-btrace.o): New rule.
3672
be9a119c 36732013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3674 Hafiz Abid Qadeer <abidh@codesourcery.com>
3675
3676 * tracepoint.c (trace_buffer_size): New global.
3677 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3678 (init_trace_buffer): Change to one-argument function. Allocate
3679 trace buffer memory.
3680 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3681 handle QTBuffer:size packet.
3682 (cmd_bigqtbuffer_size): New function.
3683 (initialize_tracepoint): Call init_trace_buffer with
3684 DEFAULT_TRACE_BUFFER_SIZE.
3685 * server.c (handle_query): Add QTBuffer:size in the
3686 supported packets.
3687
e64f7499
YQ
36882013-03-07 Yao Qi <yao@codesourcery.com>
3689
3690 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3691 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3692 of -1.
3693 (cmd_qtsp): Adjust condition. Do post increment.
3694 Set cur_action and cur_step_action back to 0.
3695
f0ae6fc3
PA
36962013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3697
3698 PR server/15236
3699 * linux-low.c (linux_write_memory): Return early success if LEN is
3700 zero.
3701
b5b0b0af
CV
37022013-03-05 Corinna Vinschen <vinschen@redhat.de>
3703
334ad4a8 3704 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3705
589bc927
TT
37062013-02-28 Tom Tromey <tromey@redhat.com>
3707
3708 * configure.ac: Invoke AC_SYS_LARGEFILE.
3709 * configure, config.in: Rebuild.
3710
dfe07582
CV
37112013-02-28 Corinna Vinschen <vinschen@redhat.com>
3712
3713 * win32-low.c: Throughout, fix format strings and casts of
3714 printf-like functions to avoid type related warnings on all
3715 platforms.
3716 (get_child_debug_event): Print dwDebugEventCode as hex since
3717 that's how it's usually documented.
3718
736cd585
YQ
37192013-02-28 Yao Qi <yao@codesourcery.com>
3720
3721 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3722 pulongest.
3723
e1f58301
JW
37242013-02-27 Jiong Wang <jiwang@tilera.com>
3725
3726 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3727 (reg-tilegx32.c): New rule.
3728 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3729 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3730 different register info initializer according to elf class.
3731 (init_registers_tilgx32): New function. The tilegx32 register info
3732 initializer.
3733 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3734 (tile_store_gregset): Likewise.
3735
d171ca78
YQ
37362013-02-27 Yao Qi <yao@codesourcery.com>
3737
3738 * server.c (process_point_options): Print debug message when
3739 debug_threads is true.
3740
282bbdf3
YQ
37412013-02-26 Yao Qi <yao@codesourcery.com>
3742
3743 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3744
aca22551
PA
37452013-02-19 Pedro Alves <palves@redhat.com>
3746 Kai Tietz <ktietz@redhat.com>
3747
3748 PR gdb/15161
3749
3750 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3751 instead of strtoul to extract address from packet.
3752 (process_serial_event) <'z'>: Likewise.
3753
4f3cee1c
YQ
37542013-02-18 Yao Qi <yao@codesourcery.com>
3755
3756 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3757
8e1d55a3
PA
37582013-02-14 Pedro Alves <palves@redhat.com>
3759
3760 Plug memory leak.
3761
3762 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3763 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3764
458820da
PA
37652013-02-14 Pedro Alves <palves@redhat.com>
3766
3767 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3768
baea0dae
PA
37692013-02-14 Pedro Alves <palves@redhat.com>
3770
3771 * tracepoint.c (save_string): Delete.
3772 (add_tracepoint_action): Use savestring instead of save_string.
3773
0b1afbb3
PA
37742013-02-12 Pedro Alves <palves@redhat.com>
3775
3776 * linux-xtensa-low.c: Ditto.
3777 * xtensa-xtregs.c: Ditto.
3778
8a4ac37e
PA
37792013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3780
3781 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3782 thread_db.
3783
148de6bb
MS
37842013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3785
3786 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3787 aarch64_num_wp_regs and aarch64_num_bp_regs to
3788 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3789
55fac6e0
MS
37902013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3791
3792 * linux-aarch64-low.c (ps_get_thread_area): Replace
3793 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3794
176eb98c
MS
37952013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3796 Marcus Shawcroft <marcus.shawcroft@arm.com>
3797 Nigel Stephens <nigel.stephens@arm.com>
3798 Yufeng Zhang <yufeng.zhang@arm.com>
3799
3800 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3801 (aarch64.c, aarch64-without-fpu.c): New targets.
3802 * configure.srv (aarch64*-*-linux*): New.
3803 * linux-aarch64-low.c: New file.
3804
56f7af9c
MS
38052013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3806
43aaf8b6 3807 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3808 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3809 (dequeue_one_deferred_signal, linux_resume_one_thread)
3810 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3811 (linux_tracefork_grandchild, linux_test_for_tracefork)
3812 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3813 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3814 where the argument is 0.
3815
60f662b0
YQ
38162013-01-25 Yao Qi <yao@codesourcery.com>
3817
3818 * event-loop.c: Include "queue.h".
3819 (gdb_event_p): New typedef.
3820 (struct gdb_event) <next_event>: Remove.
3821 (event_queue): Change to QUEUE(gdb_event_p).
3822 (async_queue_event): Remove.
3823 (gdb_event_xfree): New.
3824 (initialize_event_loop): New.
3825 (process_event): Use API from QUEUE.
3826 (wait_for_event): Likewise.
3827 * server.c (main): Call initialize_event_loop.
3828 * server.h (initialize_event_loop): Declare.
3829
5ae4861a
YQ
38302013-01-18 Yao Qi <yao@codesourcery.com>
3831
3832 * ax.h (struct eval_agent_expr_context): New.
3833 (gdb_eval_agent_expr): Update declaration.
3834 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3835 TFRAME. Add new argument CTX.
3836 * server.h (struct eval_agent_expr_context): Declare.
3837 (agent_mem_read, agent_tsv_read): Update declaration.
3838 (agent_mem_read_string): Likewise.
3839 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3840 (add_traceframe_block): Add new argument TPOINT.
3841 Increase TPOINT->traceframe_usage.
3842 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3843 eval_tracepoint_agent_expr.
3844 (condition_true_at_tracepoint): Likewise.
3845 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3846 (agent_mem_read_string, agent_tsv_read): Likewise.
3847
85e00e85
YQ
38482013-01-16 Yao Qi <yao@codesourcery.com>
3849
3850 * linux-low.c (linux_resume_one_lwp): Don't check
3851 'lwp->bp_reinsert != 0'.
3852
4039cf45
JB
38532013-01-07 Joel Brobecker <brobecker@adacore.com>
3854 Pedro Alves <palves@redhat.com>
3855
3856 * lynx-low.c (ptrace_request_to_str): Define a temporary
3857 macro and use it to simplify this function's implementation.
3858
9044dee2
JB
38592013-01-07 Joel Brobecker <brobecker@adacore.com>
3860
3861 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3862 sets errno.
3863
e6352c8f
JB
38642013-01-07 Joel Brobecker <brobecker@adacore.com>
3865
3866 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3867
50681a27
JB
38682013-01-07 Joel Brobecker <brobecker@adacore.com>
3869
3870 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3871
3f6e77ef
JB
38722013-01-07 Joel Brobecker <brobecker@adacore.com>
3873
3874 * lynx-low.c (lynx_resume): Use the resume_info parameter
3875 to determine the ptid for the lynx_ptrace call, unless
3876 it is equal to minus_one_ptid, in which case we use the
3877 ptid of the current_inferior.
3878 (lynx_wait_1): After having received a thread create/exit
3879 event, resume the inferior's execution using the signaling
3880 thread's ptid, rather than the old ptid.
3881
7fda33ae
JB
38822013-01-07 Joel Brobecker <brobecker@adacore.com>
3883
3884 * lynx-low.c (lynx_resume): Delete variable ret.
3885
b9786c74
JB
38862013-01-01 Joel Brobecker <brobecker@adacore.com>
3887
3888 * gdbreplay.c (gdbreplay_version): Update copyright year.
3889 * server.c (gdbserver_version): Likewise.
3890
8b93d60f
JB
38912012-12-17 Joel Brobecker <brobecker@adacore.com>
3892
3893 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3894 new thread.
3895
037335a7
JB
38962012-12-17 Joel Brobecker <brobecker@adacore.com>
3897
3898 * lynx-low.c (ptrace_request_to_str): Add handling for
3899 PTRACE_GETTRACESIG.
3900
52d4cbd8
JB
39012012-12-17 Joel Brobecker <brobecker@adacore.com>
3902
3903 * lynx-low.c (lynx_attach): Delete variable new_process.
3904
ab8f6ca9
JB
39052012-12-17 Joel Brobecker <brobecker@adacore.com>
3906
3907 * lynx-low.c (lynx_create_inferior): Delete variable
3908 new_process.
3909
78cbc024
JB
39102012-12-17 Joel Brobecker <brobecker@adacore.com>
3911
3912 * lynx-low.c (ptrace_request_to_str): Do not handle
3913 PTRACE_GETTHREADLIST if this macro does not exist.
3914
14a00470
YQ
39152012-12-15 Yao Qi <yao@codesourcery.com>
3916
3917 * Makefile.in (OBS): Add notif.o.
3918 * notif.c, notif.h: New.
3919 * server.c: Include "notif.h".
3920 (struct vstop_notif) <next>: Remove.
3921 <base>: New field.
3922 (queue_stop_reply): Update.
3923 (push_event, send_next_stop_reply): Remove.
3924 (discard_queued_stop_replies): Update.
3925 (notif_stop): New variable.
3926 (handle_v_stopped): Remove.
3927 (handle_v_requests): Don't call handle_v_stopped. Call
3928 handle_ack_notif instead.
3929 (queue_stop_reply_callback): Call notif_event_enque instead
3930 of queue_stop_reply.
3931 (handle_status): Don't call send_next_stop_reply, call
3932 notif_write_event instead.
3933 (kill_inferior_callback): Likewise.
3934 (detach_or_kill_inferior_callback): Likewise.
3935 (main): Call initialize_notif.
3936 (process_serial_event): Call QUEUE_is_empty.
3937 (handle_target_event): Call notif_push instead of push event.
3938 * server.h (push_event): Remove declaration.
3939
61c125b9
TT
39402012-12-10 Tom Tromey <tromey@redhat.com>
3941
3942 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3943 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3944 macros.
3945 (.c.o): Rewrite.
3946 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3947 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3948 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3949 (amd64-linux-ipa.o, ax.o): Rewrite.
3950 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3951 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3952 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3953 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3954 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3955 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3956 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3957 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3958 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3959 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3960 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3961 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3962 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3963 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3964 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3965 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3966 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3967 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3968 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3969 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3970 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3971 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3972 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3973 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3974 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3975 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3976 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3977 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3978 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3979 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3980 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3981 (reg-tilegx.o): Remove.
3982 (all_object_files): New macro.
3983 Include .deps files.
3984 * aclocal.m4, configure: Rebuild.
3985 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3986 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3987 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3988
e90e9ad9
TT
39892012-12-05 Tom Tromey <tromey@redhat.com>
3990
3991 PR gdb/14917:
3992 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3993
02d403bf 39942012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3995
3996 * configure.ac: Check for linux/perf_event.h.
3997 * config.in: Regenerated.
3998 * configure: Regenerated.
3999
0270a750
PA
40002012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4001
4002 * hostio.c (handle_readlink): Decrease buffer size
4003 parameter passed to readlink by one byte.
4004
8c29b58e
YQ
40052012-11-26 Yao Qi <yao@codesourcery.com>
4006
4007 * configure.ac (build_warnings): Append '-Wempty-body'.
4008 * configure: Regenerated.
4009 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4010 body.
4011
8bdce1ff
PM
40122012-11-15 Pierre Muller <muller@sourceware.org>
4013
4014 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4015 * config.in: Regenerate.
4016 * configure: Regenerate.
4017 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4018 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4019 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4020 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4021 header.
4022 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4023 instead of <sys/wait.h> header.
4024 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4025
02d403bf 40262012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4027
4028 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4029 (various make rules): Remove -DGDBSERVER
4030
fbd5db48
YQ
40312012-11-09 Yao Qi <yao@codesourcery.com>
4032
4033 * spu-low.c (current_ptid): Move it to ..
4034 * gdbthread.h: ... here. New.
4035 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4036 * server.c (myresume, process_serial_event): Likewise.
4037 * thread-db.c (thread_db_find_new_threads): Likewise.
4038 * tracepoint.c (run_inferior_command): Likewise.
4039
b3dc46ff
AB
40402012-10-01 Andrew Burgess <aburgess@broadcom.com>
4041
4042 * server.c (handle_search_memory_1): Include access length in
4043 warning message.
4044
07c04788
HPN
40452012-09-05 Michael Brandt <michael.brandt@axis.com>
4046
4047 * linux-crisv32-low.c: Fix compile errors.
4048
918d227b
YQ
40492012-09-04 Yao Qi <yao@codesourcery.com>
4050
4051 * tracepoint.c (cmd_qtsv): Adjust debug message.
4052 Don't check CUR_TPOINT.
4053
18c1b81a
YQ
40542012-08-28 Yao Qi <yao@codesourcery.com>
4055
4056 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4057 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4058 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4059 Remove declarations of xmalloc, xreallloc, xstrdup and
4060 freeargv.
4061 * Makefile.in (libiberty_h): New.
4062 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4063 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4064
dc82f37b
YQ
40652012-08-23 Yao Qi <yao@codesourcery.com>
4066
4067 * server.h: Remove declaration of 'xsnprintf'.
4068
406b1477
KS
40692012-08-22 Keith Seitz <keiths@redhat.com>
4070
4071 * server.h: Include build-gnulib-gbserver/config.h.
4072 * gdbreplay.c: Likewise.
4073
e6712ff1
DE
40742012-08-08 Doug Evans <dje@google.com>
4075
4076 * Makefile.in (SFILES): Add gdb_vecs.c.
4077 (OBS): Add gdb_vecs.o.
4078 (gdb_vecs_h, host_defs_h): New variables.
4079 (thread-db.o): Add $(gdb_vecs_h) dependency.
4080 (gdb_vecs.o): New rule.
4081 * thread-db.c: #include "gdb_vecs.h".
4082 (thread_db_load_search): Use a vector to iterate over path elements.
4083 Handle text appearing after "$pdir".
4084
4085 * configure.ac: Add check for strstr.
4086 * config.in: Regenerate.
4087 * configure: Regenerate.
4088
7c3270ae
UW
40892012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4090
4091 * hostio.c (handle_pread): If pread fails, fall back to attempting
4092 lseek/read.
4093 (handle_pwrite): Likewise for pwrite.
4094
b62e2b27
UW
40952012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4096
4097 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4098 between unsupported TYPE and unimplementable ADDR/LEN combination.
4099 (arm_insert_point): Act on new return value.
4100
78a99e91
PA
41012012-07-31 Pedro Alves <palves@redhat.com>
4102
4103 * server.c (process_point_options): Only skip tokens if we find
4104 one that is unrecognized. Don't treat 'X' specially while
4105 skipping unrecognized tokens.
4106
fcf303ab
UW
41072012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4108
4109 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4110 to 4-byte-align HW breakpoint addresses for Thumb.
4111
7255706c
YQ
41122012-07-27 Yao Qi <yao@codesourcery.com>
4113
4114 PR remote/14161.
4115
4116 * server.h: Declare gdb_agent_about_to_close.
4117 * target.c (kill_inferior): Include "agent.h".
4118 New. Send command 'kill'.
4119 * target.h (kill_inferior): Removed macro.
4120 * tracepoint.c (gdb_agent_about_to_close): New.
4121 (gdb_agent_helper_thread): Handle command 'close'.
4122 Wait endlessly until the inferior stops.
4123 Install gdb_agent_remove_socket to atexit hook.
4124 (agent_socket_name): New static variable.
4125 (gdb_agent_socket_init): Replace local variable 'name' with
4126 'agent_socket_name'.
4127 (gdb_agent_remove_socket): New.
4128
5a3f286f
YQ
41292012-07-27 Yao Qi <yao@codesourcery.com>
4130
4131 * server.c (process_point_options): Stop at 'X' when parsing.
4132
961bd387
ME
41332012-07-19 Michael Eager <eager@eagercon.com>
4134
a261b8f5 4135 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4136 to hw_execute.
4137 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4138 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4139 hardware breakpoint.
4140
aa7c7447
JK
41412012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4142
4143 * gdbserver/linux-low.c (initialize_low): Call
4144 linux_ptrace_init_warnings.
4145
7f216e7c
DE
41462012-07-02 Doug Evans <dje@google.com>
4147
4148 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4149 pointer to int.
4150
d3ce09f5
SS
41512012-07-02 Stan Shebs <stan@codesourcery.com>
4152
4153 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4154 (ax.o): Add it to build rule.
4155 (ax-ipa.o): Ditto.
4156 (OBS): Add format.o.
4157 (IPA_OBS): Add format.o.
4158 * server.c (handle_query): Claim support for breakpoint commands.
4159 (process_point_options): Add command case.
4160 (process_serial_event): Leave running if there are printfs in
4161 effect.
4162 * mem-break.h (any_persistent_commands): Declare.
4163 (add_breakpoint_commands): Declare.
4164 (gdb_no_commands_at_breakpoint): Declare.
4165 (run_breakpoint_commands): Declare.
4166 * mem-break.c (struct point_command_list): New struct.
4167 (struct breakpoint): New field command_list.
4168 (any_persistent_commands): New function.
4169 (add_commands_to_breakpoint): New function.
4170 (add_breakpoint_commands): New function.
4171 (gdb_no_commands_at_breakpoint): New function.
4172 (run_breakpoint_commands): New function.
4173 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4174 locally.
4175 * ax.c: Include format.h.
4176 (ax_printf): New function.
4177 (gdb_eval_agent_expr): Add printf opcode.
4178
2f8f6aed
YQ
41792012-06-13 Yao Qi <yao@codesourcery.com>
4180
4181 * server.c (start_inferior): Remove duplicated writes to fields
4182 'last_resume_kind' and 'last_status' of 'current_inferior'.
4183
0c9070b3
YQ
41842012-06-12 Yao Qi <yao@codesourcery.com>
4185 Pedro Alves <palves@redhat.com>
4186
4187 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4188 comment.
4189 * server.c (handle_v_cont): Extend comment.
4190
c52daf70
YQ
41912012-06-11 Yao Qi <yao@codesourcery.com>
4192
4193 * linux-low.c (linux_attach): Add 'static'.
4194
d38bbb0a
YQ
41952012-06-06 Yao Qi <yao@codesourcery.com>
4196
4197 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4198
89dc0afd
JK
41992012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4200
4201 Fix gcc -flto compilation warning.
4202 * server.c (main): Make variable multi_mode and attach volatile.
4203
75f62ce7
TJB
42042012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4205
4206 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4207 if the platform doesn't know about it.
4208
65f479b6
PA
42092012-05-30 Jeff Kenton <jkenton@tilera.com>
4210
4211 * Makefile.in (SFILES): Add linux-tile-low.c.
4212 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4213 * configure.srv: Handle tilegx-*-linux*.
4214 * linux-tile-low.c: New file.
4215
0c5bf5a9
JK
42162012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4217
4218 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4219
a493e3e2
PA
42202012-05-24 Pedro Alves <palves@redhat.com>
4221
4222 PR gdb/7205
4223
43aaf8b6 4224 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4225
2ea28649
PA
42262012-05-24 Pedro Alves <palves@redhat.com>
4227
4228 PR gdb/7205
4229
4230 Replace target_signal with gdb_signal throughout.
4231
8d409d16
MR
42322012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4233
4234 * linux-low.c (linux_store_registers): Avoid the copying sequence
4235 when no data has been retrieved by ptrace.
4236
23512c01
MGD
42372012-05-22 Will Deacon <will.deacon@arm.com>
4238
4239 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4240 Include asm/ptrace.h.
4241 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4242 already defined.
4243
4934b29e
MR
42442012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4245
4246 * linux-low.c (linux_store_registers): Don't re-retrieve data
4247 with ptrace that has already been obtained from /proc. Always
4248 copy any data retrieved with ptrace to the buffer supplied.
4249
bde24c0a
PA
42502012-05-11 Yao Qi <yao@codesourcery.com>
4251 Pedro Alves <palves@redhat.com>
4252
4253 * linux-low.c (enum stopping_threads_kind): New.
4254 (stopping_threads): Change type to `enum stopping_threads_kind'.
4255 (handle_extended_wait): If stopping and suspending threads, leave
4256 the new_lwp suspended too.
4257 (linux_wait_for_event): Adjust.
4258 (stop_all_lwps): Set `stopping_threads' to
4259 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4260 whether we're suspending threads or just stopping them. Assert no
4261 recursion happens.
4262
623b6bdf
YQ
42632012-04-29 Yao Qi <yao@codesourcery.com>
4264
4265 * server.h: Move some code to ...
4266 * gdbthread.h: ... here. New.
4267 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4268 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4269 (nto-low.o, win32-low.o): Likewise.
4270 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4271 * regcache.c, remote-utils.c, server.c: Likewise.
4272 * target.c, tracepoint.c, win32-low.c: Likewise.
4273
f15f9948
TJB
42742012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4275
4276 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4277 (PTRACE_ARG4_TYPE): Likewise.
4278 (PTRACE_XFER_TYPE): Likewise.
4279 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4280 ptrace to PTRACE_ARG3_TYPE.
4281 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4282 (PTRACE_ARG4_TYPE): Likewise.
4283 (PTRACE_XFER_TYPE): Likewise.
4284 (linux_detach_one_lwp): Cast fourth argument of
4285 ptrace to long then PTRACE_ARG4_TYPE.
4286 (regsets_fetch_inferior_registers): Cast third argument of
4287 ptrace to long then PTRACE_ARG3_TYPE.
4288 (regsets_store_inferior_registers): Likewise.
4289
38ea300a
PA
42902012-04-20 Pedro Alves <palves@redhat.com>
4291
4292 * configure: Regenerate.
4293
c971b7fa
PA
42942012-04-19 Pedro Alves <palves@redhat.com>
4295
43aaf8b6 4296 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4297 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4298 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4299 (all, install-only, uninstall, clean-info, all-lib, clean): No
4300 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4301 (maintainer-clean realclean distclean): Use subdir_do.
4302 (subdir_do): New.
4303 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4304 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4305 * acinclude.m4: Include acx_configure_dir.m4.
4306 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4307 calls. Call AC_PROG_RANLIB. Configure gnulib using
4308 ACX_CONFIGURE_DIR.
4309 (GNULIB): New.
4310 (GNULIB_STDINT_H): Adjust.
4311 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4312 * gdbreplay.c: Include build-gnulib/config.h.
4313 * server.h: Likewise.
4314 * aclocal.m4: Regenerate.
4315 * config.in: Regenerate.
4316 * configure: Regenerate.
c971b7fa 4317
809277f8
PA
43182012-04-19 Pedro Alves <palves@redhat.com>
4319
4320 * Makefile.in (LIBGNU, INCGNU): Adjust.
4321 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4322 (all, install-only, uninstall, clean-info, all-lib, clean)
4323 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4324 * configure.ac: Adjust AC_OUTPUT output.
4325 * aclocal.m4: Regenerate.
4326 * configure: Regenerate.
4327
fd9bb8b8
PA
43282012-04-19 Pedro Alves <palves@redhat.com>
4329
4330 * Makefile.in (generated_files): New.
4331 (server_h): Remove the explicit dependency on config.h, and depend
4332 on $generated_files.
4333
1c298c66
PA
43342012-04-19 Pedro Alves <palves@redhat.com>
4335
4336 * Makefile.in (INCGNU): Add -Ignulib.
4337
57c4b50b
PA
43382012-04-19 Pedro Alves <palves@redhat.com>
4339
4340 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4341 (INCGNU): ... this, and spell out -I here.
4342 (GNULIB_LIB): Rename to ...
4343 (LIBGNU): ... this.
4344 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4345
1030e047
PA
43462012-04-19 Pedro Alves <palves@redhat.com>
4347
4348 * config.in: Regenerate.
4349
447d4319
PA
43502012-04-19 Pedro Alves <palves@redhat.com>
4351
4352 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4353 * server.h (memmem): Remove declaration.
4354 * config.in: Regenerate.
4355 * configure: Regenerate.
4356
aad9eab9
YQ
43572012-04-19 Yao Qi <yao@codesourcery.com>
4358
4359 * Makefile.in (SFILES): Add common/vec.c.
4360 (OBS): Add vec.o.
4361 (vec.o): New rule.
4362
3e10640f
YQ
43632012-04-19 Yao Qi <yao@codesourcery.com>
4364
4365 * remote-utils.c (prepare_resume_reply): Replace with macro
4366 target_core_of_thread.
4367 * server.c (handle_qxfer_threads_proper): Likewise.
4368 * target.h (traget_core_of_thread): New macro.
4369
71622373
PA
43702012-04-18 Pedro Alves <palves@redhat.com>
4371
4372 * aclocal.m4: Regenerate.
4373 * configure: Regenerate.
4374
80d26939
YQ
43752012-04-16 Yao Qi <yao@codesourcery.com>
4376
4377 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4378 duplicated on address.
4379
42476b70
YQ
43802012-04-16 Yao Qi <yao@codesourcery.com>
4381
4382 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4383 (struct tracepoint_action_ops) <send>: New field.
4384 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4385 (agent_expr_send, x_tracepoint_action_send): New.
4386 (l_tracepoint_action_send): New.
4387 (cmd_qtdp): Download and install tracepoint
4388 according to `use_agent'.
4389 (run_inferior_command): Add one more parameter `len'.
4390 Update callers.
4391 (tracepoint_send_agent): New.
4392 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4393
7bc83639
YQ
43942012-04-16 Yao Qi <yao@codesourcery.com>
4395
4396 * tracepoint.c (download_tracepoints): Moved to ...
4397 (cmd_qtstart): ... here.
4398
5f18041e
YQ
43992012-04-14 Yao Qi <yao@codesourcery.com>
4400
4401 * tracepoint.c: Include inttypes.h.
4402 (struct collect_memory_action): Use sized types.
4403 (struct tracepoint): Likewise.
4404 (cmd_qtdp, stop_tracing): Update print specifiers.
4405 (cmd_qtp, response_tracepoint): Likewise.
4406 (collect_data_at_tracepoint): Likewise.
4407 (collect_data_at_step): Likewise.
4408
55a8c076
YQ
44092012-04-14 Yao Qi <yao@codesourcery.com>
4410
4411 Import gnulib module inttypes.
4412 * aclocal.m4, config.in, configure: Regenerated.
4413
dc750257
YQ
44142012-04-14 Yao Qi <yao@codesourcery.com>
4415
4416 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4417 Makefile and config.status at last.
4418
0ab5faf9
YQ
44192012-04-13 Yao Qi <yao@codesourcery.com>
4420
4421 * tracepoint.c: Include stdint.h unconditionally.
4422
18f5fd81
TJB
44232012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4424
4425 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4426 on BFD_HAVE_SYS_PROCFS_TYPE.
4427 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4428 * configure: Regenerate.
4429 * config.in: Likewise.
4430
4d47af5c
L
44312012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4432
4433 * Makefile.in (clean): Also remove x32.c x32-linux.c
4434 x32-avx.c x32-avx-linux.c.
4435 (x32.o): New target.
4436 (x32.c): Likewise.
4437 (x32-linux.o): Likewise.
4438 (x32-linux.c): Likewise.
4439 (x32-avx.o): Likewise.
4440 (x32-avx.c): Likewise.
4441 (x32-avx-linux.o): Likewise.
4442 (x32-avx-linux.c): Likewise.
4443
4444 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4445 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4446 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4447 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4448 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4449 i386/x32-avx-linux.xml.
4450
4451 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4452 (init_registers_x32_avx_linux): Likwise.
4453 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4454 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4455
ecedbe58
PA
44562012-04-13 Pedro Alves <palves@redhat.com>
4457
4458 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4459 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4460 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4461 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4462 the sub-make.
4463
c92b5177
L
44642012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4465
4466 * linux-x86-low.c (compat_x32_clock_t): New.
4467 (compat_x32_siginfo_t): Likewise.
4468 (compat_x32_siginfo_from_siginfo): Likewise.
4469 (siginfo_from_compat_x32_siginfo): Likewise.
4470 (linux_is_elf64): Likewise.
4471 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4472 and siginfo_from_compat_x32_siginfo for x32.
4473 (x86_arch_setup): Set linux_is_elf64.
4474
214d508e
L
44752012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4476
4477 PR gdb/13969
4478 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4479 e_machine field.
4480 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4481 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4482 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4483 compatible with process.
4484
c9a1864a
YQ
44852012-04-12 Yao Qi <yao@codesourcery.com>
4486
4487 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4488 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4489 (install-only, install-info, clean): Handle sub dir gnulib.
4490 (all-lib, am--refresh): New targets.
4491 (memmem.o): Remove target.
4492 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4493 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4494 (AC_REPLACE_FUNCS): Remove memmem.
4495 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4496 (AC_OUTPUT): Generate Makefile in gnulib/.
4497 * aclocal.m4, config.in, configure: Regenerated.
4498
367ba2c2
MR
44992012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4500
4501 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4502
9d236627
PA
45032012-04-05 Pedro Alves <palves@redhat.com>
4504
4505 -Werror=strict-aliasing
4506
4507 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4508 pointer.
4509
111217b3
PA
45102012-04-04 Pedro Alves <palves@redhat.com>
4511
4512 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4513 (sparc_store_gregset_from_stack, sparc_store_gregset)
4514 (sparc_breakpoint_at): Fix formatting.
4515
8365dcf5
TJB
45162012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4517
4518 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4519 are available.
4520 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4521 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4522 * config.in: Regenerate.
4523 * configure: Likewise.
4524
689cc2ae
PA
45252012-03-29 Pedro Alves <palves@redhat.com>
4526
4527 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4528 Correct ptrace arguments.
4529
c14dfd32
PA
45302012-03-28 Pedro Alves <palves@redhat.com>
4531
4532 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4533 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4534 (IA64_FR1_REGNUM): New defines.
4535 (ia64_fetch_register): New.
4536 (the_low_target): Install it.
4537 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4538 field.
4539 * linux-low.c (linux_fetch_registers): Try the
4540 the_low_target.fetch_register hook first.
4541
4542 * linux-arm-low.c (the_low_target): Adjust.
4543 * linux-bfin-low.c (the_low_target): Adjust.
4544 * linux-cris-low.c (the_low_target): Adjust.
4545 * linux-crisv32-low.c (the_low_target): Adjust.
4546 * linux-m32r-low.c (the_low_target): Adjust.
4547 * linux-m68k-low.c (the_low_target): Adjust.
4548 * linux-mips-low.c (the_low_target): Adjust.
4549 * linux-ppc-low.c (the_low_target): Adjust.
4550 * linux-s390-low.c (the_low_target): Adjust.
4551 * linux-sh-low.c (the_low_target): Adjust.
4552 * linux-sparc-low.c (the_low_target): Adjust.
4553 * linux-tic6x-low.c (the_low_target): Adjust.
4554 * linux-x86-low.c (the_low_target): Adjust.
4555 * linux-xtensa-low.c (the_low_target): Adjust.
4556
63c88e13
PA
45572012-03-26 Pedro Alves <palves@redhat.com>
4558
4559 * server.c (handle_qxfer_libraries): Don't bail early if
4560 the_target->qxfer_libraries_svr4 is not NULL.
4561
fb723180
PA
45622012-03-26 Pedro Alves <palves@redhat.com>
4563
4564 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4565
0afae3cf
PA
45662012-03-23 Pedro Alves <palves@redhat.com>
4567
4568 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4569 "library-list-svr4" element's start tag when the the DSO list is
4570 empty.
4571
485f1ee4
PA
45722012-03-23 Pedro Alves <palves@redhat.com>
4573
4574 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4575 a variable whose type size is the same as the inferior's pointer
4576 size.
4577
a5362b9a
TS
45782012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4579
4580 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4581 struct siginfo.
4582 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4583 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4584 * linux-low.h: Include <signal.h>.
4585 (struct siginfo): Remove forward declaration.
4586 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4587 struct siginfo.
4588
d226c142
MF
45892012-03-21 Mike Frysinger <vapier@gentoo.org>
4590
4591 * .gitignore: Ignore more files.
4592
122f36ef
PA
45932012-03-19 Pedro Alves <palves@redhat.com>
4594 Jan Kratochvil <jan.kratochvil@redhat.com>
4595
4596 * server.c (cont_thread, general_thread): Add describing comments.
4597 (start_inferior): Clear `cont_thread'.
4598 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4599 of a process.
4600
fc3e5175
YQ
46012012-03-15 Yao Qi <yao@codesourcery.com>
4602
4603 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4604 handling to ...
4605 (cmd_qtdp): ... here.
4606
8d0d92cd
YQ
46072012-03-15 Yao Qi <yao@codesourcery.com>
4608
4609 * tracepoint.c (struct tracepoint_action_ops): New.
4610 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4611 (m_tracepoint_action_download): New.
4612 (r_tracepoint_action_download): New.
4613 (x_tracepoint_action_download): New.
4614 (l_tracepoint_action_download): New.
4615 (add_tracepoint_action): Install `action->ops' according type.
4616 (download_tracepoint_1): Move code `download' function pointer
4617 of various tracepoint_action_ops.
4618
87b0bb13
JK
46192012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4620
4621 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4622 linux_ptrace_attach_warnings.
4623
5f572dec
JK
46242012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4625
4626 * Makefile.in (linux-ptrace.o): New.
4627 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4628 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4629 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4630 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4631 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4632 of these targets.
4633 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4634
f4647387
YQ
46352012-03-08 Yao Qi <yao@codesourcery.com>
4636 Pedro Alves <palves@redhat.com>
4637
4638 Fix PR server/13392.
4639 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4640 offset of JMP insn.
4641 * tracepoint.c (remove_tracepoint): New.
4642 (cmd_qtdp): Call remove_tracepoint when failed to install.
4643
9b224c5e
PA
46442012-03-07 Pedro Alves <palves@redhat.com>
4645
4646 * linux-low.c (get_detach_signal): New.
4647 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4648 Pass on pending signals to PTRACE_DETACH. Check the result of the
4649 ptrace call.
4650 * server.c (program_signals, program_signals_p): New.
4651 (handle_general_set): Handle QProgramSignals.
4652 * server.h (program_signals, program_signals_p): Declare.
4653
e237a7e2
JK
46542012-03-05 Pedro Alves <palves@redhat.com>
4655 Jan Kratochvil <jan.kratochvil@redhat.com>
4656
4657 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4658 New comment why.
4659
5808517f
YQ
46602012-03-03 Yao Qi <yao@codesourcery.com>
4661
4662 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4663 agent_look_up_symbols.
4664
58b4daa5
YQ
46652012-03-03 Yao Qi <yao@codesourcery.com>
4666
4667 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4668 (linux-x86-low.o): Likewise.
4669 * server.h: Remove in_process_agent_loaded.
4670 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4671 common/agent.c.
4672 Update callers.
4673
8ffcbaaf
YQ
46742012-03-03 Yao Qi <yao@codesourcery.com>
4675
4676 * tracepoint.c (gdb_agent_capability): New global.
4677 (in_process_agent_loaded_ust): Renamed to
4678 `in_process_agent_supports_ust'.
4679 Update callers.
4680 (in_process_agent_supports_ust): Call agent_capability_check.
4681 (clear_installed_tracepoints): Assert that agent supports
4682 agent.
4683
d1feda86
YQ
46842012-03-03 Yao Qi <yao@codesourcery.com>
4685
4686 * linux-low.c (linux_supports_agent): New.
4687 (linux_target_ops): Initialize field `supports_agent' with
4688 linux_supports_agent.
4689 * target.h (struct target_ops) <supports_agent>: New.
4690 (target_supports_agent): New macro.
4691 * server.c (handle_general_set): Handle packet 'QAgent'.
4692 (handle_query): Send `QAgent+'.
4693 * Makefile.in (server.o): Depends on agent.h.
4694
2fa291ac
YQ
46952012-03-03 Yao Qi <yao@codesourcery.com>
4696
4697 * Makefile.in (OBS): Add agent.o.
4698 Add new rule for agent.o.
4699 Track dependence of tracepoint.c on agent.h.
4700 * tracepoint.c (run_inferior_command_1):
4701 (run_inferior_command): Call agent_run_command.
4702 (gdb_ust_connect_sync_socket): Deleted. Move it to
4703 common/agent.c.
4704 (resume_thread, stop_thread): Likewise.
4705 (gdb_ust_socket_init): Renamed to ...
4706 (gdb_agent_socket_init): ... New.
4707 (gdb_ust_thread): Renamed to ...
4708 (gdb_agent_helper_thread): ... New.
4709 (gdb_ust_init): Move some code to ...
4710 (gdb_agent_init): ... here. New.
4711 [HAVE_UST]: Call gdb_ust_init.
4712 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4713 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4714 * config.in, configure: Regenerated.
4715
05044653
PA
47162012-03-02 Pedro Alves <palves@redhat.com>
4717
4718 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4719 * linux-low.c (struct simple_pid_list): New.
4720 (stopped_pids): New a struct simple_pid_list pointer.
4721 (add_to_pid_list, pull_pid_from_list): New.
4722 (handle_extended_wait): Don't assume the first signal new children
4723 report is SIGSTOP. Adjust call to pull_pid_from_list.
4724 (linux_wait_for_lwp): Adjust.
4725
8d00225b
YQ
47262012-03-02 Yao Qi <yao@codesourcery.com>
4727
4728 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4729 debug log.
4730
19560ba5
YQ
47312012-03-02 Yao Qi <yao@codesourcery.com>
4732
4733 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4734 `stop_pc' and `tpoint'. Update caller.
4735
1faeff08
MR
47362012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4737
4738 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4739 * linux-low.c (use_linux_regsets): New macro.
4740 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4741 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4742 (linux_register_in_regsets): New function.
4743 (usr_fetch_inferior_registers): Skip registers covered by
4744 regsets.
4745 (usr_store_inferior_registers): Likewise.
4746 (usr_fetch_inferior_registers): New macro.
4747 (usr_store_inferior_registers): Likewise.
4748 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4749 (linux_store_registers): Likewise.
4750 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4751 prototype.
4752 (init_registers_mips64_dsp_linux): Likewise.
4753 (init_registers_mips_linux): New macro.
4754 (init_registers_mips_dsp_linux): Likewise.
4755 (mips_dsp_num_regs): Likewise.
4756 (DSP_BASE, DSP_CONTROL): New fallback macros.
4757 (mips_base_regs): New macro.
4758 (mips_regmap): Use it. Fix the size.
4759 (mips_dsp_regmap): New variable.
4760 (mips_dsp_regset_bitmap): Likewise.
4761 (mips_arch_setup): New function.
4762 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4763 than mips_regmap.
4764 (mips_cannot_store_register): Likewise.
4765 (the_low_target): Update .arch_setup, .num_regs and .regmap
4766 initializers. Add .regset_bitmap initializer.
4767 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4768 initializer.
4769 * linux-bfin-low.c (the_low_target): Likewise.
4770 * linux-cris-low.c (the_low_target): Likewise.
4771 * linux-crisv32-low.c (the_low_target): Likewise.
4772 * linux-ia64-low.c (the_low_target): Likewise.
4773 * linux-m32r-low.c (the_low_target): Likewise.
4774 * linux-m68k-low.c (the_low_target): Likewise.
4775 * linux-ppc-low.c (the_low_target): Likewise.
4776 * linux-s390-low.c (the_low_target): Likewise.
4777 * linux-sh-low.c (the_low_target): Likewise.
4778 * linux-sparc-low.c (the_low_target): Likewise.
4779 * linux-tic6x-low.c (the_low_target): Likewise.
4780 * linux-x86-low.c (the_low_target): Likewise.
4781 * linux-xtensa-low.c (the_low_target): Likewise.
4782 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4783 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4784 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4785 srv_xmlfiles.
4786 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4787 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4788
c03e6ccc
YQ
47892012-02-29 Yao Qi <yao@codesourcery.com>
4790 Pedro Alves <palves@redhat.com>
4791
4792 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4793 `step_over_finished' is true.
4794
644cebc9
PA
47952012-02-27 Pedro Alves <palves@redhat.com>
4796
4797 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4798 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4799
c14d7ab2
PA
48002012-02-27 Pedro Alves <palves@redhat.com>
4801
4802 PR server/9684
4803 * linux-low.c (pid_is_stopped): New.
4804 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4805
412c89dd
LM
48062012-02-25 Luis Machado <lgustavo@codesourcery.com>
4807
4808 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4809 of conditions.
4810
b745defe
MR
48112012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4812
4813 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4814
9f3a5c85
LM
48152012-02-24 Luis Machado <lgustavo@codesourcery>
4816
4817 * server.c (handle_query): Advertise support for target-side
4818 breakpoint condition evaluation.
4819 (process_point_options): New function.
4820 (process_serial_event): When inserting a breakpoint, check for
4821 a target-side condition that should be evaluated.
4822
4823 * mem-break.c: Include regcache.h and ax.h.
4824 (point_cond_list_t): New data structure.
4825 (breakpoint) <cond_list>: New field.
4826 (find_gdb_breakpoint_at): Make non-static.
4827 (delete_gdb_breakpoint_at): Clear any target-side
4828 conditions.
4829 (clear_gdb_breakpoint_conditions): New function.
4830 (add_condition_to_breakpoint): Likewise.
4831 (add_breakpoint_condition): Likewise.
4832 (gdb_condition_true_at_breakpoint): Likewise.
4833 (gdb_breakpoint_here): Return result directly instead
4834 of going through a local variable.
4835
4836 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4837 (clear_gdb_breakpoint_conditions): Likewise.
4838 (add_breakpoint_condition): Likewise.
4839 (gdb_condition_true_at_breakpoint): Likewise.
4840
4841 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4842 (need_step_over_p): Take target-side breakpoint condition into
4843 consideration.
4844
5e1dc496
LM
48452012-02-24 Luis Machado <lgustavo@codesourcery>
4846
4847 * server.h: Include tracepoint.h.
4848 (agent_mem_read, agent_get_trace_state_variable_value,
4849 agent_set_trace_state_variable_value,
4850 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4851 get_set_tsv_func_addr): New prototypes.
4852
4853 * ax.h: New include file.
4854 * ax.c: New source file.
4855
4856 * tracepoint.c: Include ax.h.
4857 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4858 agent_expr, eval_result_type): Move to ax.h.
4859 (parse_agent_expr): Rename to ...
4860 (gdb_parse_agent_expr): ... this, make it non-static and move
4861 to ax.h.
4862 (unparse_agent_expr) Rename to ...
4863 (gdb_unparse_agent_expr): ... this, make it non-static and move
4864 to ax.h.
4865 (eval_agent_expr): Rename to ...
4866 (eval_tracepoint_agent_expr): ... this.
4867 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4868 forward declarations.
4869 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4870 (agent_get_trace_state_variable_value): New function.
4871 (agent_set_trace_state_variable_value): New function.
4872 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4873 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4874 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4875 (condition_true_at_tracepoint): Likewise.
4876 (parse_agent_expr): Rename to ...
4877 (gdb_parse_agent_expr): ... this and move to ax.c.
4878 (unparse_agent_expr): Rename to ...
4879 (gdb_unparse_agent_expr): ... this and move to ax.c.
4880 (gdb_agent_op_name): Move to ax.c.
4881 (eval_agent_expr): Rename to ...
4882 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4883 and move to ax.c.
4884 (eval_tracepoint_agent_expr): New function.
4885 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4886 non-static.
5e1dc496
LM
4887 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4888 ax.c.
4889 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4890 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4891 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4892 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4893 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4894 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4895 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4896 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4897 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4898 (compile_bytecodes): Remove forward declaration.
4899 (is_goto_target): Move to ax.c.
4900 (compile_bytecodes): Move to ax.c and call
4901 agent_get_trace_state_variable_value (...) and
4902 agent_set_trace_state_variable_value (...).
4903
4904 * Makefile.in: Update ax.c and IPA dependencies.
4905
277e4e52
PA
49062012-02-24 Pedro Alves <palves@redhat.com>
4907
4908 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4909 (cmd_bigqtbuffer_circular): ... this. Only handle
4910 'QTBuffer:circular:'.
4911 (handle_tracepoint_general_set): Adjust.
4912
bf4c19f7
YQ
49132012-02-16 Yao Qi <yao@codesourcery.com>
4914
4915 * inferiors.c: Move code to ...
4916 * dll.c: .... here. New.
4917 * server.h: Declare clear_dlls.
4918 * Makefile.in (SFILES): Add dll.c.
4919 (OBS): Add dll.o
4920 (dll.o): New rule.
4921
d73f2619
YQ
49222012-02-11 Yao Qi <yao@codesourcery.com>
4923
4924 * server.c: (handle_monitor_command): Add a new parameter
4925 `own_buf'.
4926 (handle_query): Update caller.
4927
f8255c2a
JB
49282012-02-09 Joel Brobecker <brobecker@adacore.com>
4929
4930 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4931 * configure, config.in: Regenerate.
4932 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4933 is not defined.
4934
da84f473
PA
49352012-02-02 Pedro Alves <palves@redhat.com>
4936
4937 Try SIGKILL first, then PTRACE_KILL.
4938 * linux-low.c (linux_kill_one_lwp): New.
4939 (linux_kill_one_lwp): Rename to ...
4940 (kill_one_lwp_callback): ... this. Use the new
4941 linux_kill_one_lwp.
4942
e886a173
PA
49432012-02-02 Pedro Alves <palves@redhat.com>
4944
4945 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4946 inferior.
4947
be07f1a2
PA
49482012-01-27 Pedro Alves <palves@redhat.com>
4949
4950 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4951 (elf_64_file_p): Make static.
4952 (linux_pid_exe_is_elf_64_file): New.
4953 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4954 Delete declarations.
4955 (linux_pid_exe_is_elf_64_file): Declare.
4956 * linux-x86-low.c (x86_arch_setup): Use
4957 linux_pid_exe_is_elf_64_file.
4958
d8301ad1
JK
49592012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4960
4961 * linux-low.c (linux_wait_for_event_1): Rename to ...
4962 (linux_wait_for_event): ... here and merge it with former
4963 linux_wait_for_event - new variable wait_ptid, use it.
4964 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4965
01b17894
PA
49662012-01-23 Pedro Alves <palves@redhat.com>
4967
4968 * server.c (main): Avoid yet another case of infinite loop while
4969 detaching/killing after a longjmp.
4970
e825046f
JK
49712012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4972
4973 Code cleanup.
4974 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4975
b9e7b9c3
UW
49762012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4977
4978 * hostio.c (handle_readlink): New function.
4979 (handle_vFile): Call it to handle "vFile:readlink" packets.
4980
901f9912
UW
49812012-01-20 Pedro Alves <palves@redhat.com>
4982 Ulrich Weigand <ulrich.weigand@linaro.org>
4983
4984 * server.c (handle_v_requests): Only support vAttach and vRun to
4985 start multiple processes when in extended protocol mode.
4986
fc1ab1a0
PA
49872012-01-17 Pedro Alves <palves@redhat.com>
4988
4989 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4990 memalign plus mprotect to allocate the scratch buffer.
4991
7d5d4e98
PA
49922012-01-13 Pedro Alves <palves@redhat.com>
4993
4994 * server.c (attach_inferior): Clear `cont_thread'.
4995
f128d5e9
PA
49962012-01-13 Pedro Alves <palves@redhat.com>
4997
4998 * server.c (main): Avoid infinite loop while detaching/killing
4999 after a longjmp.
5000
06db92f0
DE
50012012-01-09 Doug Evans <dje@google.com>
5002
5003 * server.c (start_inferior): Set last_ptid in --wrapper case.
5004
32d92999
YQ
50052012-01-06 Yao Qi <yao@codesourcery.com>
5006
5007 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5008 defined.
5009 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5010
5e0a92a9
YQ
50112012-01-04 Yao Qi <yao@codesourcery.com>
5012
5013 * tracepoint.c (cmd_qtdp): Print debug message
5014 for static tracepoint.
5015
ae639e8c
YQ
50162012-01-04 Yao Qi <yao@codesourcery.com>
5017
5018 * tracepoint.c (trace_vdebug): Differentiate debug message
5019 between gdbserver and IPA.
5020
f72429c5
YQ
50212012-01-03 Yao Qi <yao@codesourcery.com>
5022
5023 * tracepoint.c (tracepoint_was_hit): Don't collect for
5024 static tracepoint.
5025
12c3e59c
JB
50262012-01-02 Joel Brobecker <brobecker@adacore.com>
5027
5028 * terminal.h: Reformat copyright header.
5029
67827812
JB
50302012-01-02 Joel Brobecker <brobecker@adacore.com>
5031
5032 * server.c (gdbserver_version): Update copyright year.
5033 * gdbreplay.c (gdbreplay_version): Likewise.
5034
3e52c33d
JK
50352011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5036
5037 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5038
5039 Revert:
5040 2011-12-18 Hui Zhu <teawater@gmail.com>
5041 * linux-low.c (linux_create_inferior): Save return value to ret.
5042
66f1260e
HZ
50432011-12-18 Hui Zhu <teawater@gmail.com>
5044
5045 * linux-low.c (linux_create_inferior): Save return value to ret.
5046
e77616d7
DE
50472011-12-16 Doug Evans <dje@google.com>
5048
e7b06c57
DE
5049 * linux-low.c (linux_create_inferior): If stdio connection,
5050 redirect stdin from /dev/null, stdout to stderr.
5051 * remote-utils.c (remote_is_stdio): New static global.
5052 (remote_connection_is_stdio): New function.
5053 (remote_prepare): Handle stdio connection.
5054 (remote_open): Ditto.
5055 (remote_close): Don't close stdin for stdio connections.
5056 (read_prim,write_prim): New functions. Replace all calls to
5057 read/write to these.
5058 * server.c (main): Watch for "-" argument. Move call to
5059 remote_prepare before start_inferior.
5060 * server.h (STDIO_CONNECTION_NAME): New macro.
5061 (remote_connection_is_stdio): Declare.
5062
e77616d7
DE
5063 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5064 in debugging output.
5065
82067193
YQ
50662011-12-15 Yao Qi <yao@codesourcery.com>
5067
5068 * tracepoint.c: Include sys/syscall.h.
5069 (gdb_ust_thread): Remove preprocessor conditional.
5070
82bfbe7e
PA
50712011-12-14 Pedro Alves <pedro@codesourcery.com>
5072
5073 * linux-low.c (linux_detach_one_lwp): Call
5074 the_low_target.prepare_to_resume before detaching.
5075
712c6575
YQ
50762011-12-14 Yao Qi <yao@codesourcery.com>
5077
5078 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5079 of write.
5080
d54d1edf
YQ
50812011-12-14 Yao Qi <yao@codesourcery.com>
5082
5083 * i386-low.c (i386_low_stopped_data_address): Initialize local
5084 variable `control'.
5085
6210a125
PA
50862011-12-13 Pedro Alves <pedro@codesourcery.com>
5087
5088 PR remote/13492
5089
5090 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5091 DR_CONTROL unless necessary. Extend comments.
5092 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5093 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5094
2ece8244
YQ
50952011-12-13 Yao Qi <yao@codesourcery.com>
5096
5097 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5098 macros.
5099 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5100
784867a5
JK
51012011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5102
5103 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5104 Print new debug message for such case.
5105
6bf36717
JK
51062011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5107
5108 Fix overlapping memcpy.
5109 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5110 the read_inferior_memory transfer.
5111 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5112 write_inferior_memory transfer.
5113 (set_fast_tracepoint_jump): New variable buf. Use it for the
5114 read_inferior_memory and write_inferior_memory transfers.
5115 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5116 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5117 Use it for the write_inferior_memory transfer.
5118 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5119 buffers.
5120
50275556
MR
51212011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5122
5123 * linux-low.c (fetch_register, store_register): Make code
5124 consistent, fix formatting.
5125
7325beb4
MR
51262011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5127
5128 * linux-low.c (usr_store_inferior_registers): Factor out code
5129 to handle individual registers into...
5130 (store_register): ... this new function.
5131
c642a434
UW
51322011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5133
5134 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5135 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5136 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5137 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5138 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5139 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5140 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5141 (srv_xmlfiles): Add new XML files.
5142
5143 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5144 and <sys/uio.h>.
5145 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5146 (init_registers_s390_linux32v1): Add prototype.
5147 (init_registers_s390_linux32v2): Likewise.
5148 (init_registers_s390_linux64v1): Likewise.
5149 (init_registers_s390_linux64v2): Likewise.
5150 (init_registers_s390x_linux64v1): Likewise.
5151 (init_registers_s390x_linux64v2): Likewise.
5152 (s390_num_regs): Increment to 52.
5153 (s390_regmap): Add orig_r2 register.
5154 (s390_num_regs_3264): Increment to 68.
5155 (s390_regmap_3264): Add orig_r2 register.
5156 (s390_collect_ptrace_register): Handle orig_r2 register.
5157 (s390_supply_ptrace_register): Likewise.
5158 (s390_fill_last_break): New function.
5159 (s390_store_last_break): Likewise.
5160 (s390_fill_system_call): New function.
5161 (s390_store_system_call): Likewise.
5162 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5163 register sets.
5164 (s390_check_regset): New function.
5165 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5166 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5167 Update target_regsets for available register sets.
5168
2268b414
JK
51692011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5170 Jan Kratochvil <jan.kratochvil@redhat.com>
5171
5172 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5173 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5174 New.
5175 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5176 * linux-low.h (struct process_info_private): New member r_debug.
5177 * server.c (handle_qxfer_libraries): Call
5178 the_target->qxfer_libraries_svr4.
5179 (handle_qxfer_libraries_svr4): New function.
5180 (qxfer_packets): New entry "libraries-svr4".
5181 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5182 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5183 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5184 PACKET_qXfer_libraries_svr4.
5185
d6db1fab
UW
51862011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5187
5188 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5189 PSW address/mask between 8-byte and 16-byte formats.
5190 (s390_supply_ptrace_register): Likewise.
5191 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5192 basic addressing mode bit.
5193
242f5f1c
SS
51942011-11-24 Stan Shebs <stan@codesourcery.com>
5195
5196 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5197
f196051f
SS
51982011-11-17 Stan Shebs <stan@codesourcery.com>
5199
5200 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5201 (tracing_start_time): New global.
5202 (tracing_stop_time): New global.
5203 (tracing_user_name): New global.
5204 (tracing_notes): New global.
5205 (tracing_stop_note): New global.
5206 (cmd_qtstart): Set traceframe_usage, start_time.
5207 (stop_tracing): Set stop_time.
5208 (cmd_qtstatus): Report additional status.
5209 (cmd_qtp): New function.
5210 (handle_tracepoint_query): Call it.
5211 (cmd_qtnotes): New function.
5212 (handle_tracepoint_general_set): Call it.
5213 (get_timestamp): Rename from tsv_get_timestamp.
5214
405f8e94
SS
52152011-11-14 Stan Shebs <stan@codesourcery.com>
5216 Kwok Cheung Yeung <kcy@codesourcery.com>
5217
5218 * linux-x86-low.c (small_jump_insn): New.
5219 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5220 trampoline and error message, build a trampoline and issue a small
5221 jump instruction to it.
5222 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5223 trampoline and error message.
5224 (x86_get_min_fast_tracepoint_insn_len): New.
5225 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5226 * linux-low.h (struct linux_target_ops): Add arguments to
5227 install_fast_tracepoint_jump_pad operation, add new operation.
5228 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5229 arguments.
5230 (linux_get_min_fast_tracepoint_insn_len): New function.
5231 (linux_target_op): Add new operation.
5232 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5233 (gdb_trampoline_buffer_end): Ditto.
5234 (gdb_trampoline_buffer_error): Ditto.
5235 (struct ipa_sym_addresses): Add fields for new IPA variables.
5236 (symbol_list): Add entries for new IPA variables.
5237 (struct tracepoint): Add fields to hold the address range of the
5238 trampoline used by the tracepoint.
5239 (trampoline_buffer_head): New static variable.
5240 (trampoline_buffer_tail): Ditto.
5241 (claim_trampoline_space): New function.
5242 (have_fast_tracepoint_trampoline_buffer): New function.
5243 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5244 structure.
5245 (install_fast_tracepoint): Ditto, also add error buffer argument.
5246 (cmd_qtminftpilen): New function.
5247 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5248 (fast_tracepoint_from_trampoline_address): New function.
5249 (fast_tracepoint_collecting): Handle trampoline as part of jump
5250 pad space.
5251 (set_trampoline_buffer_space): New function.
5252 (initialize_tracepoint): Initialize new IPA variables.
5253 * target.h (struct target_ops): Add arguments to
5254 install_fast_tracepoint_jump_pad operation, add new
5255 get_min_fast_tracepoint_insn_len operation.
5256 (target_get_min_fast_tracepoint_insn_len): New.
5257 (install_fast_tracepoint_jump_pad): Add arguments.
5258 * server.h (IPA_BUFSIZ): Define.
5259 * linux-i386-ipa.c: Include extra header files.
5260 (initialize_fast_tracepoint_trampoline_buffer): New function.
5261 (initialize_low_tracepoint): Call it.
5262 * server.h (set_trampoline_buffer_space): Declare.
5263 (claim_trampoline_space): Ditto.
5264 (have_fast_tracepoint_trampoline_buffer): Ditto.
5265
1e4d1764
YQ
52662011-11-14 Yao Qi <yao@codesourcery.com>
5267
5268 * server.c (handle_query): Handle InstallInTrace for qSupported.
5269 * tracepoint.c (add_tracepoint): Sort list.
5270 (install_tracepoint, download_tracepoint): New.
5271 (cmd_qtdp): Call them to install and download tracepoints.
5272 (sort_tracepoints): Removed.
5273 (cmd_qtstart): Update.
5274
5c73ff4e
YQ
52752011-11-14 Yao Qi <yao@codesourcery.com>
5276
5277 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5278 * mem-break.h: Declare.
5279 * tracepoint.c (cmd_qtstart): Move some code to ...
5280 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5281 New.
5282 (download_tracepoints): Move some code to ...
5283 (download_tracepoint_1): ... here. New.
5284
86a30030
YQ
52852011-11-08 Yao Qi <yao@codesourcery.com>
5286
5287 * remote-utils.c (relocate_instruction): A comment fix.
5288
8d26e50c
JB
52892011-11-07 Joel Brobecker <brobecker@adacore.com>
5290
5291 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5292 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5293 dr_status_mirror and dr_control_mirror from debug_reg_state.
5294 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5295 (i386_initial_stuff): Remove use of deleted globals.
5296 (i386_get_thread_context, i386_set_thread_context,
5297 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5298 from debug_reg_state.
5299
a59306a3
YQ
53002011-11-05 Yao Qi <yao@codesourcery.com>
5301
5302 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5303 address as TPOINT's.
5304
3065dfb6
SS
53052011-11-02 Stan Shebs <stan@codesourcery.com>
5306
5307 * tracepoint.c (agent_mem_read_string): New function.
5308 (eval_agent_expr): Call it for tracenz.
5309 * server.c (handle_query): Report support for tracenz.
5310
fd0d8c7c
YQ
53112011-11-02 Yao Qi <yao@codesourcery.com>
5312
5313 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5314
609086b1
YQ
53152011-11-02 Yao Qi <yao@codesourcery.com>
5316
5317 * target.h: Fix a typo in comment.
5318
b9fd1791
PA
53192011-10-31 Pedro Alves <pedro@codesourcery.com>
5320
5321 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5322 clobber the breakpoints' shadows with fast tracepoint jumps.
5323 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5324 * target.c (write_inferior_memory): Also pass MYADDR down to
5325 check_mem_write.
5326
03583c20
UW
53272011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5328
5329 * configure.ac: Check support for personality routine.
5330 * configure: Regenerate.
5331 * config.in: Likewise.
5332 * linux-low.c: Include <sys/personality.h>.
5333 Define ADDR_NO_RANDOMIZE if necessary.
5334 (linux_create_inferior): Disable address space randomization when
5335 forking inferior, if requested.
5336 (linux_supports_disable_randomization): New function.
5337 (linux_target_ops): Install it.
5338 * server.h (disable_randomization): Declare.
5339 * server.c (disable_randomization): New global variable.
5340 (handle_general_set): Handle QDisableRandomization.
5341 (handle_query): Likewise for qSupported.
5342 (main): Support --disable-randomization and --no-disable-randomization
5343 command line arguments.
5344 * target.h (struct target_ops): Add supports_disable_randomization.
5345 (target_supports_disable_randomization): New macro.
5346
723b724b
MF
53472011-09-29 Mike Frysinger <vapier@gentoo.org>
5348
5349 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5350 ifdef check.
5351 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5352 [!PT_GETDSBT] (target_loadmap): New definition.
5353 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5354 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5355 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5356 and PT_GETDSBT to LINUX_LOADMAP.
5357 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5358 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5359
55329a5c 53602011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5361
5362 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5363 (arm_linux_hwbp_cap): New static variable.
5364 (arm_linux_get_hwbp_cap): Replace by ...
5365 (arm_linux_init_hwbp_cap): ... this new function.
5366 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5367 (arm_linux_get_hw_watchpoint_count): Likewise.
5368 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5369 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5370 (arm_prepare_to_resume): Use perror_with_name instead of error.
5371
55329a5c 53722011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5373
5374 * linux-arm-low.c: Include <signal.h>.
5375 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5376 (struct arm_linux_hwbp_cap): New data type.
5377 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5378 (struct arm_linux_hw_breakpoint): New data type.
5379 (MAX_BPTS, MAX_WPTS): Define.
5380 (struct arch_process_info, struct arch_lwp_info): New data types.
5381 (arm_linux_get_hwbp_cap): New function.
5382 (arm_linux_get_hw_breakpoint_count): Likewise.
5383 (arm_linux_get_hw_watchpoint_count): Likewise.
5384 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5385 (arm_hwbp_control_initialize): Likewise.
5386 (arm_hwbp_control_is_enabled): Likewise.
5387 (arm_hwbp_control_is_initialized): Likewise.
5388 (arm_hwbp_control_disable): Likewise.
5389 (arm_linux_hw_breakpoint_equal): Likewise.
5390 (arm_linux_hw_point_initialize): Likewise.
5391 (struct update_registers_data): New data structure.
5392 (update_registers_callback: New function.
5393 (arm_insert_point): Likewise.
5394 (arm_remove_point): Likewise.
5395 (arm_stopped_by_watchpoint): Likewise.
5396 (arm_stopped_data_address): Likewise.
5397 (arm_new_process): Likewise.
5398 (arm_new_thread): Likewise.
5399 (arm_prepare_to_resume): Likewise.
5400 (the_low_target): Register arm_insert_point, arm_remove_point,
5401 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5402 arm_new_thread, and arm_prepare_to_resume.
5403
6b9801d4
SS
54042011-09-15 Stan Shebs <stan@codesourcery.com>
5405
5406 * server.h (struct emit_ops): Add compare-goto fields.
5407 * tracepoint.c (gdb_agent_op_sizes): New table.
5408 (emit_eq_goto): New function.
5409 (emit_ne_goto): New function.
5410 (emit_lt_goto): New function.
5411 (emit_le_goto): New function.
5412 (emit_gt_goto): New function.
5413 (emit_ge_goto): New function.
5414 (is_goto_target): New function.
5415 (compile_bytecodes): Recognize special cases of compare-goto
5416 combinations and call specialized emitters for them.
5417 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5418 (amd64_emit_ne_goto): New function.
5419 (amd64_emit_lt_goto): New function.
5420 (amd64_emit_le_goto): New function.
5421 (amd64_emit_gt_goto): New function.
5422 (amd64_emit_ge_goto): New function.
5423 (amd64_emit_ops): Add the new functions.
5424 (i386_emit_eq_goto): New function.
5425 (i386_emit_ne_goto): New function.
5426 (i386_emit_lt_goto): New function.
5427 (i386_emit_le_goto): New function.
5428 (i386_emit_gt_goto): New function.
5429 (i386_emit_ge_goto): New function.
5430 (i386_emit_ops): Add the new functions.
5431
bf15cbda
SS
54322011-09-08 Stan Shebs <stan@codesourcery.com>
5433
5434 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5435 (i386_emit_epilogue): Restore %ebx.
5436
943ca1dd
JZ
54372011-08-31 Jie Zhang <jzhang918@gmail.com>
5438
5439 * server.c (step_thread): Remove definition.
5440 (process_serial_event): Don't handle Hs.
5441 * server.h (step_thread): Remove declaration.
5442 * target.c (set_desired_inferior): Remove use of step_thread.
5443
e3deef73
LM
54442011-08-24 Luis Machado <lgustavo@codesourcery.com>
5445
5446 * linux-low.c: Include linux-procfs.h.
5447 (linux_attach_lwp_1): Update comments.
5448 (linux_attach): Scan for existing threads when attaching to a
5449 process that is the tgid.
5450 * Makefile.in: Update dependencies.
5451
13da1c97
LM
54522011-08-24 Luis Machado <lgustavo@codesourcery.com>
5453
5454 * configure.srv: Add linux-procfs.o dependencies.
5455
881127c9
YQ
54562011-08-14 Yao Qi <yao@codesourcery.com>
5457
5458 * target.h (struct target_ops): Fix indent.
5459 * win32-low.c (win32_target_ops): Fix comment.
5460
58dbd541
YQ
54612011-08-14 Andrew Jenner <andrew@codesourcery.com>
5462 Yao Qi <yao@codesourcery.com>
5463
5464 * Makefile.in (clean): Remove tic6x-*.c files.
5465 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5466 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5467 (tic6x-c64xp-linux.c): Likewise.
5468 * configure.srv: Add support for tic6x-*-uclinux.
5469 * linux-tic6x-low.c: New.
5470 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5471
78d85199
YQ
54722011-08-14 Andrew Stubbs <ams@codesourcery.com>
5473 Yao Qi <yao@codesourcery.com>
5474
5475 * target.h (struct target_ops): Add read_loadmap.
5476 * linux-low.c (struct target_loadseg): New type.
5477 (struct target_loadmap): New type.
5478 (linux_read_loadmap): New function.
5479 (linux_target_ops): Add linux_read_loadmap.
5480 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5481 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5482 to NULL.
78d85199 5483
a959a88d
EZ
54842011-08-05 Eli Zaretskii <eliz@gnu.org>
5485
5486 * win32-low.c: Include <stdint.h>.
5487
1ced966e
PA
54882011-07-22 Pedro Alves <pedro@codesourcery.com>
5489
5490 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5491 to the inferior here.
5492 (i386_remove_aligned_watchpoint): Ditto.
5493 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5494 fit part of the watchpoint in the debug registers.
5495 (i386_update_inferior_debug_regs): New.
5496 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5497 registers, and only update the inferior on success.
5498 (i386_low_remove_watchpoint): Ditto.
5499
d26e3629
KY
55002011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5501
5502 * linux-low.c (compare_ints, unique, list_threads, show_process,
5503 linux_core_of_thread): Delete.
5504 (linux_target_ops): Change linux_core_of_thread to
5505 linux_common_core_of_thread.
5506 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5507 * utils.c (malloc_failure): Change type of argument.
5508 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5509 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5510 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5511 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5512 (IPA_OBJS): Add common-utils-ipa.o.
5513 (ptid_h, linux_osdata_h): New macros.
5514 (server_h): Add common/common-utils.h, common/xml-utils.h,
5515 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5516 common/ptid.h.
5517 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5518 ptid.o, buffer.o): New rules.
5519 (linux-low.o): Add common/linux-osdata.h as a dependency.
5520 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5521 * configure.ac: Add AC_HEADER_DIRENT check.
5522 * config.in: Regenerate.
5523 * configure: Regenerate.
5524 * remote-utils.c (xml_escape_text): Delete.
5525 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5526 buffer_xml_printf): Move to common/buffer.c.
5527 * server.c (main): Remove call to initialize_inferiors.
5528 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5529 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5530 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5531 internal_error, gdb_assert, gdb_assert_fail): Delete.
5532 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5533 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5534 common/buffer.h.
5535 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5536 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5537 initialize_inferiors): Delete.
5538
2275a1a7
PA
55392011-07-20 Pedro Alves <pedro@codesourcery.com>
5540
5541 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5542 symbol error.
5543
0a5b1e09
PA
55442011-05-31 Pedro Alves <pedro@codesourcery.com>
5545
5546 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5547 assertion.
5548 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5549
6938fd34
YQ
55502011-05-26 Yao Qi <yao@codesourcery.com>
5551
5552 * Makefile.in (thread-db.o): Track dependence to
5553 common/gdb_thread_db.h.
5554 * thread-db.c: include gdb_thread_db.h from right place.
5555
b481f9e0
TT
55562011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5557
5558 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5559 __FILE__ and __LINE__ to internal_error.
5560
98a5dd13
DE
55612011-05-13 Doug Evans <dje@google.com>
5562
5563 * thread-db.c (try_thread_db_load_from_sdir): New function.
5564 (try_thread_db_load_from_dir): New function.
5565 (thread_db_load_search): Handle $sdir, ignore $pdir.
5566 Remove trying of system directories if search of
5567 libthread-db-search-path fails, that is now done via $sdir.
5568
d248b706
KY
55692011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5570
5571 * server.c (handle_query): Add EnableDisableTracepoints to the list
5572 of supported features.
43aaf8b6 5573 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5574 tracepoints.
43aaf8b6
PA
5575 (cmd_qtenable_disable): New.
5576 (cmd_qtstart): Install tracepoints even if disabled.
5577 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5578 receiving a QTEnable or QTDisable packet.
5579 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5580 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5581 tracepoints.
5582 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5583
84e578fb
DE
55842011-05-10 Doug Evans <dje@google.com>
5585
5586 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5587
71f55dd8
DE
55882011-05-04 Doug Evans <dje@google.com>
5589
5590 * linux-low.c (linux_join): Skip process lookup.
5591 * spu-low.c (spu_join): Ditto.
5592 * server.c (join_inferiors_callback): Delete.
5593 (process_serial_event): For 'D' packet (detach) call join_inferior
5594 directly.
5595
4d393d60
JM
55962011-05-04 Joseph Myers <joseph@codesourcery.com>
5597
5598 * README: Don't mention xscale*-*-linux*.
5599 * configure.srv (xscale*-*-linux*): Don't handle target.
5600
b00ad6ff
NF
56012011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5602
5603 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5604 casting pointers.
5605 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5606 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5607 (i386_emit_void_call_2): Likewise.
5608
af96c192
YQ
56092011-04-26 Yao Qi <yao@codesourcery.com>
5610
43aaf8b6
PA
5611 * linux-low.c: Move common macros to linux-ptrace.h.
5612 Include linux-ptrace.h.
af96c192
YQ
5613 * Makefile.in (linux_ptrace_h): New.
5614 (linux-low.o): Depends on linux-ptrace.h.
5615
03f2bd59
JK
56162011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5617
5618 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5619 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5620 (remote_prepare): New function with most of the TCP code from ...
5621 (remote_open): ... here. Detect PORT here unconditionally. Move also
5622 setting transport_is_reliable.
5623 * server.c (run_once): New variable.
5624 (gdbserver_usage): Document it.
5625 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5626 the first run if RUN_ONCE.
5627 * server.h (run_once, remote_prepare): New declarations.
5628
7a9dd1b2
TT
56292011-04-19 Tom Tromey <tromey@redhat.com>
5630
5631 * win32-low.c (handle_load_dll): Remove duplicate "the".
5632
81239425
PM
56332011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5634
5635 Remove support for old Cygwin 1.5 versions.
5636 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5637 function to avoid warning.
5638 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5639 warning.
5640
9e0627f1
PM
56412011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5642
5643 * gdbserver/server.h (Macro _): Define it if not available.
5644
588eebee
MS
56452011-03-14 Michael Snyder <msnyder@vmware.com>
5646
348af9f7 5647 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5648
43f70d4c
JB
56492011-03-10 Joel Brobecker <brobecker@adacore.com>
5650
5651 * Makefile.in (maintainer-clean realclean distclean): Remove
5652 "make ... subdir_do" command.
5653
348af9f7
MS
56542011-03-10 Michael Snyder <msnyder@vmware.com>
5655
5656 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5657
5658 * server.c (handle_v_run): Free alloced buffer on early return.
5659
e637a4f5
YQ
56602011-03-09 Yao Qi <yao@codesourcery.com>
5661
5662 Revert:
5663 2011-03-04 Yao Qi <yao@codesourcery.com>
5664
5665 * Makefile.in: Remove GNU make feature --directory.
5666
5667 2011-03-05 Yao Qi <yao@codesourcery.com>
5668
5669 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5670 (subdir_do): New make target. Copied from gdb/Makefile.
5671 (maintainer-clean, realclean, distclean, clean): Call corresponding
5672 make targets in common/Makefile.
5673
5674 2011-02-11 Yao Qi <yao@codesourcery.com>
5675
5676 * configure.ac: Call AC_PROG_RANLIB.
5677 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5678 * configure: Regenerate.
5679
e6edda56
JK
56802011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5681
5682 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5683
e5141119
JB
56842011-03-06 Yao Qi <yao@codesourcery.com>
5685
5686 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5687
64794aa4
JB
56882011-03-05 Yao Qi <yao@codesourcery.com>
5689
5690 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5691 (subdir_do): New make target. Copied from gdb/Makefile.
5692 (maintainer-clean, realclean, distclean, clean): Call corresponding
5693 make targets in common/Makefile.
5694
7a762829
YQ
56952011-03-04 Yao Qi <yao@codesourcery.com>
5696
5697 * Makefile.in: Remove GNU make feature --directory.
5698
348af9f7
MS
56992011-03-04 Michael Snyder <msnyder@vmware.com>
5700
5701 * server.c (queue_stop_reply): Call xmalloc not malloc.
5702
57032011-03-02 Michael Snyder <msnyder@vmware.com>
5704
5705 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5706
9f72fee2
MS
57072011-02-28 Michael Snyder <msnyder@vmware.com>
5708
588eebee
MS
5709 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5710 (cmd_qtframe): Ditto.
5711 (cmd_qtbuffer): Ditto.
5712 (cmd_bigqtbuffer): Ditto.
5713
9f72fee2
MS
5714 * utils.c (decimal2str): Initialize 'width' to nine, then
5715 don't mess with it.
5716
8040bd49
UW
57172011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5718
5719 * hostio.c (require_data): Free *data, not data.
5720
7e52cbd0
JK
57212011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5722
5723 * hostio.c (require_data): Use free, not xfree.
5724
9130f83e
MS
57252011-02-27 Michael Snyder <msnyder@vmware.com>
5726
4b812f4e
MS
5727 * server.c (handle_query): Discard unused value.
5728
9130f83e
MS
5729 * hostio.c (require_data): Free malloc memory before returning
5730 error.
5731
69d37113
MS
57322011-02-26 Michael Snyder <msnyder@vmware.com>
5733
5734 * linux-low.c (list_threads): Call closedir for dirent.
5735
35f5825a
MS
57362011-02-27 Michael Snyder <msnyder@vmware.com>
5737
2a589cef
MS
5738 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5739 a case statement falls through.
5740
0adea5f7
MS
5741 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5742
35f5825a
MS
5743 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5744 in comparison.
5745
238f1c74
MS
57462011-02-26 Michael Snyder <msnyder@vmware.com>
5747
5748 * utils.c (decimal2str): Eliminate dead code and dead param.
5749 (pulongest): Drop dead param from call to decimal2str.
5750 (plongest): Ditto.
5751
633ff500
JB
57522011-02-24 Joel Brobecker <brobecker@adacore.com>
5753
5754 Revert the following patch (not approved yet):
5755 2011-02-21 Hui Zhu <teawater@gmail.com>
5756 * tracepoint.c (tp_printf): New function.
5757 (eval_agent_expr): Handle gdb_agent_op_printf.
5758
f9c6ff72
HZ
57592011-02-21 Hui Zhu <teawater@gmail.com>
5760
5761 * tracepoint.c (tp_printf): New function.
5762 (eval_agent_expr): Handle gdb_agent_op_printf.
5763
94d5e490
TT
57642011-02-18 Tom Tromey <tromey@redhat.com>
5765
5766 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5767 (tracepoint.o): Likewise.
5768 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5769 (gdb_agent_op_names): Likewise.
5770
c7f96d2b
TT
57712011-02-18 Tom Tromey <tromey@redhat.com>
5772
5773 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5774 gdb_agent_op_rot>: New constants.
5775 (gdb_agent_op_names): Add pick and roll.
5776 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5777 cases.
5778
0feedb2c
JK
57792011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5780
5781 * aclocal.m4: Regenerated with aclocal-1.11.1.
5782
b3b9301e
PA
57832011-02-14 Pedro Alves <pedro@codesourcery.com>
5784
5785 * server.c (handle_qxfer_traceframe_info): New.
5786 (qxfer_packets): Register "traceframe-info".
5787 (handle_query): Report support for qXfer:traceframe-info:read+.
5788 * tracepoint.c (match_blocktype): New.
5789 (traceframe_find_block_type): Rename to ...
5790 (traceframe_walk_blocks): ... this. Add callback filter argument,
5791 and use it.
5792 (traceframe_find_block_type): New, reimplemented on top of
5793 traceframe_walk_blocks.
5794 (build_traceframe_info_xml): New.
5795 (traceframe_read_info): New.
5796 * server.h (traceframe_read_info): Declare.
5797
4f3e6fb7
YQ
57982011-02-11 Yao Qi <yao@codesourcery.com>
5799
5800 * configure.ac: Call AC_PROG_RANLIB.
5801 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5802 * configure: Regenerate.
5803
764880b7
PA
58042011-02-07 Pedro Alves <pedro@codesourcery.com>
5805
5806 * server.c (gdb_read_memory): Change return semantics to allow
5807 partial transfers.
5808 (handle_search_memory_1): Adjust.
5809 (process_serial_event) <'m' packet>: Handle partial transfers.
5810 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5811
1c79eb8a
PA
58122011-01-28 Pedro Alves <pedro@codesourcery.com>
5813
5814 * regcache.c (init_register_cache): Initialize
5815 regcache->register_status.
5816 (free_register_cache): Release regcache->register_status.
5817 (regcache_cpy): Copy register_status.
5818 (registers_to_string): Print 'x's for unavailable registers.
5819 (supply_register): Mark the register's status valid or
5820 unavailable, depending on whether a buffer was passed in or not.
5821 (supply_register_zeroed): New.
5822 (supply_regblock): Mark the registers' status valid or
5823 unavailable, depending on whether a buffer was passed in or not.
5824 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5825 (struct regcache): New `register_status' field.
5826 (supply_register_zeroed): Declare.
5827 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5828 supply_register_zeroed, rather than passing a NULL buffer to
5829 supply_register.
5830 * tracepoint.c (fetch_traceframe_registers): Update comment.
5831
85724a0e
PA
58322011-01-28 Pedro Alves <pedro@codesourcery.com>
5833
5834 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5835 buffer explicit.
5836
d08aafef
PA
58372011-01-25 Pedro Alves <pedro@codesourcery.com>
5838
5839 * server.h (decode_xfer_write): Change prototype.
5840 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5841 and don't extract the annex here.
5842 * server.c (decode_xfer_read): Remove `annex' parameter,
5843 and don't extract the annex here.
5844 (decode_xfer): New.
5845 (struct qxfer): New.
5846 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5847 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5848 (handle_qxfer_statictrace): New functions, abstracted out from
5849 handle_query, and made to use the struct qxfer interface.
5850 (handle_threads_qxfer_proper): Rename to ...
5851 (handle_qxfer_threads_proper): ... this.
5852 (handle_threads_qxfer): Rename to ...
5853 (handle_qxfer_threads): ... this. Adjust.
5854 (qxfer_packets): New array.
5855 (handle_qxfer): New function.
5856 (handle_query): Use handle_qxfer.
5857
493e2a69
MS
58582011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5859
5860 * gdbreplay.c: Shorten lines of >= 80 columns.
5861 * linux-low.c: Ditto.
5862 * linux-ppc-low.c: Ditto.
5863 * linux-s390-low.c: Ditto.
5864 * linux-sparc-low.c: Ditto.
5865 * linux-x86-low.c: Ditto.
5866 * linux-xtensa-low.c: Ditto.
5867 * mem-break.c: Ditto.
5868 * nto-low.c: Ditto.
5869 * regcache.h: Ditto.
5870 * remote-utils.c: Ditto.
5871 * server.c: Ditto.
5872 * server.h: Ditto.
5873 * thread-db.c: Ditto.
5874 * tracepoint.c: Ditto.
5875 * utils.c: Ditto.
5876 * win32-low.h: Ditto.
5877
44944448
JB
58782011-01-05 Joel Brobecker <brobecker@adacore.com>
5879
5880 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5881 update.
5882
71ce852c
JB
58832011-01-01 Joel Brobecker <brobecker@adacore.com>
5884
5885 * server.c (gdbserver_version): Update copyright year in version
5886 output.
5887 * gdbreplay.c (gdbreplay_version): Ditto.
5888
eb826dc6
MF
58892010-12-29 Jie Zhang <jie.zhang@analog.com>
5890
5891 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5892 * linux-bfin-low.c: New file.
5893 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5894 PT_DATA_ADDR for BFIN targets.
5895 * Makefile.in (SFILES): Add linux-bfin-low.c.
5896 (clean): Remove reg-bfin.c.
5897 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5898 * README: Mention supported Blackfin targets.
5899
39ab222a
MF
59002010-12-23 Mike Frysinger <vapier@gentoo.org>
5901
5902 * .gitignore: New file.
5903
a1f2ce7d
MF
59042010-11-16 Mike Frysinger <vapier@gentoo.org>
5905
5906 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5907
f474844c
JZ
59082010-10-22 Jie Zhang <jie@codesourcery.com>
5909
5910 * Makefile.in: Add FLAGS_TO_PASS variable.
5911 (install): Remove dependency of install-only and recursively
5912 invoke make for install-only.
5913
f1048712
DE
59142010-10-04 Doug Evans <dje@google.com>
5915
5916 * Makefile.in (uninstall): Use $(DESTDIR).
5917
b53a1623
PA
59182010-09-24 Pedro Alves <pedro@codesourcery.com>
5919
e6ee044d
PA
5920 PR gdb/11842
5921
b53a1623
PA
5922 * linux-x86-low.c (compat_siginfo_from_siginfo)
5923 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5924 si_code is < 0. Check for si_code == SI_TIMER before checking for
5925 si_code < 0.
5926
fa1bd1e4
JB
59272010-09-13 Joel Brobecker <brobecker@adacore.com>
5928
5929 * lynx-i386-low.c: New file.
5930 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5931
47fac8f8
JB
59322010-09-13 Joel Brobecker <brobecker@adacore.com>
5933
5934 * lynx-low.c (ptrace_request_to_str): Remove handling for
5935 request values that have been removed in LynxOS 5.x.
5936
1adfc54d
JB
59372010-09-13 Joel Brobecker <brobecker@adacore.com>
5938
5939 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5940 <ptrace.h>
5941
c2a66c29
NS
59422010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5943
5944 * configure.ac: Add --enable-inprocess-agent option.
5945 * configure: Rebuilt.
5946
32fcada3
YQ
59472010-09-06 Yao Qi <yao@codesourcery.com>
5948
5949 * linux-low.c (linux_kill): Remove unused variable.
5950 (linux_stabilize_threads): Likewise.
5951 * server.c (start_inferior): Likewise.
5952 (queue_stop_reply_callback): Likewise.
5953 * tracepoint.c (do_action_at_tracepoint): Likewise.
5954
0cccb683
YQ
59552010-09-06 Yao Qi <yao@codesourcery.com>
5956
5957 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5958 on return.
5959
423ec54c
JK
59602010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5961
5962 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5963
12ac6819
PA
59642010-09-06 Pedro Alves <pedro@codesourcery.com>
5965
5966 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5967 "$(IPA_DEPFILES)".
5968
8ed54b31
JB
59692010-09-01 Joel Brobecker <brobecker@adacore.com>
5970
5971 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5972 gdbserver/lynx-ppc-low.c: New files.
5973 * Makefile.in (lynx_low_h): New variable.
5974 (lynx-low.o, lynx-ppc-low.o): New rules.
5975 * configure.ac: On LynxOS, link with -lnetinet.
5976 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5977 * configure: regenerate.
5978
bb0116a4
JB
59792010-09-01 Joel Brobecker <brobecker@adacore.com>
5980
5981 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5982 * configure.ac: Add check for vasprintf and vsnprintf.
5983 * configure, config.in: Regenerate.
5984 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5985
a778ab81 59862010-09-01 Joel Brobecker <brobecker@adacore.com>
5987
5988 * gdbreplay.c: Move include of alloca.h up, next to include of
5989 malloc.h.
5990 * server.h: Add include of malloc.h.
5991 * mem-break.c: Remove include of malloc.h.
5992 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5993
8b034a19 59942010-09-01 Joel Brobecker <brobecker@adacore.com>
5995
5996 * Makefile.in (memmem.o): Build with -Wno-error.
5997
59982010-09-01 Joel Brobecker <brobecker@adacore.com>
5999
6000 * utils.c (xsnprintf): Make non-static.
6001 * server.h: Add xsnprintf declaration.
6002 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6003 replace calls to snprintf by calls to xsnprintf throughout.
6004
60052010-09-01 Joel Brobecker <brobecker@adacore.com>
6006
6007 * configure.ac: Add configure check for alloca.
6008 * configure, config.in: Regenerate.
6009 * server.h: Include alloca.h if it exists.
6010 * gdbreplay.c: Include alloca.h if it exists.
6011
1a981360
PA
60122010-08-28 Pedro Alves <pedro@codesourcery.com>
6013
6014 * linux-low.c (__SIGRTMIN): Define if not already defined.
6015 (linux_create_inferior): Check for __ANDROID__ rather than
6016 __SIGRTMIN.
6017 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6018 are already deferred.
6019 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6020 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6021 stopped and already has a pending signal to report.
6022 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6023 a pending signal to report or is moving out of a jump pad.
6024 (linux_init_signals): Check for __ANDROID__ rather than
6025 __SIGRTMIN.
6026
b4d51a55
PA
60272010-08-28 Pedro Alves <pedro@codesourcery.com>
6028
6029 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6030 debug_threads check. Avoid a linear search when not doing debug
6031 output.
6032
ec48365d
PA
60332010-08-27 Pedro Alves <pedro@codesourcery.com>
6034
6035 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6036 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6037 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6038 (process_event): Change local fd's type to gdb_fildes_t.
6039 (create_file_handler): Adjust prototype.
6040 (delete_file_handler): Adjust prototype.
6041 (handle_file_event): Adjust prototype. Use pfildes.
6042 (create_file_event): Adjsut prototype.
6043 * remote-utils.c (remote_desc, listen_desc): Change type to
6044 gdb_fildes_t.
6045 * server.h: New gdb_fildes_t typedef.
6046 [USE_WIN32API]: Include winsock2.h.
6047 (delete_file_handler, add_file_handler): Adjust prototypes.
6048 (pfildes): Declare.
6049 * utils.c (pfildes): New.
6050
854d88f0
PA
60512010-08-27 Pedro Alves <pedro@codesourcery.com>
6052
6053 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6054 * configure: Regenerate.
6055
0146f85b
PA
60562010-08-27 Pedro Alves <pedro@codesourcery.com>
6057
6058 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6059 (linux_done_accessing_memory): ... this.
6060 (linux_target_ops): Adjust.
6061 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6062 * nto-low.c (nto_target_ops): Adjust comment.
6063 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6064 * spu-low.c (spu_target_ops): Adjust comment.
6065 * target.h (target_ops): Rename unprepare_to_access_memory field
6066 to done_accessing_memory.
6067 (unprepare_to_access_memory): Rename to ...
6068 (done_accessing_memory): ... this.
6069
90d74c30
PA
60702010-08-26 Pedro Alves <pedro@codesourcery.com>
6071
6072 * linux-low.c (linux_prepare_to_access_memory): New.
6073 (linux_unprepare_to_access_memory): New.
6074 (linux_target_ops): Install them.
6075 * server.c (read_memory): Rename to ...
6076 (gdb_read_memory): ... this. Use
6077 prepare_to_access_memory/prepare_to_access_memory.
6078 (write_memory): Rename to ...
6079 (gdb_write_memory): ... this. Use
6080 prepare_to_access_memory/prepare_to_access_memory.
6081 (handle_search_memory_1): Adjust.
6082 (process_serial_event): Adjust.
6083 * target.h (struct target_ops): New fields
6084 prepare_to_access_memory and unprepare_to_access_memory.
6085 (prepare_to_access_memory, unprepare_to_access_memory): New.
6086 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6087 prepare_to_access_memory/prepare_to_access_memory.
6088 * nto-low.c (nto_target_ops): Adjust.
6089 * spu-low.c (spu_target_ops): Adjust.
6090 * win32-low.c (win32_target_ops): Adjust.
6091
fd467969
PA
60922010-08-26 Pedro Alves <pedro@codesourcery.com>
6093
6094 * Makefile.in (WARN_CFLAGS): Get it from configure.
6095 (WERROR_CFLAGS): New.
6096 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6097 * configure.ac: Introduce --enable-werror, which adds -Werror to
6098 the compiler command line. Enabled by default. Disable with
6099 --disable-werror. Add -Wdeclaration-after-statement
6100 Wpointer-arith and -Wformat-nonliteral to warning flags.
6101 * configure: Regenerate.
6102
331e2f5f
PA
61032010-08-26 Pedro Alves <pedro@codesourcery.com>
6104
6105 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6106
e581f2b4
PA
61072010-08-26 Pedro Alves <pedro@codesourcery.com>
6108
6109 * gdbreplay.c (remote_error): New.
6110 (gdbchar): New.
6111 (expect): Use gdbchar. Check for error reading from GDB.
6112 Clarify sync error output.
6113 (play): Check for errors writing to GDB.
6114 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6115 * remote-utils.c (getpkt): Check for errors writing to the remote
6116 descriptor.
6117
3c11dd79
PA
61182010-08-25 Pedro Alves <pedro@codesourcery.com>
6119
6120 * linux-low.c (linux_wait_1): Move non-debugging code out of
6121 `debug_threads' control.
6122
d20a8ad9
PA
61232010-08-25 Pedro Alves <pedro@codesourcery.com>
6124
6125 * linux-low.c (linux_wait_1): Don't set last_status here.
6126 * server.c (push_event, queue_stop_reply_callback): Assert we're
6127 not pushing a TARGET_WAITKIND_IGNORE event.
6128 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6129 (myresume, handle_target_event): Set the thread's last_resume_kind
6130 and last_status from the target returned status.
6131
964e4306
PA
61322010-08-25 Pedro Alves <pedro@codesourcery.com>
6133
6134 PR threads/10729
6135
6136 * linux-x86-low.c (update_debug_registers_callback): New.
6137 (i386_dr_low_set_addr): Use it.
6138 (i386_dr_low_get_addr): New.
6139 (i386_dr_low_set_control): Use update_debug_registers_callback.
6140 (i386_dr_low_get_control): New.
6141 (i386_dr_low_get_status): Adjust.
6142 * linux-low.c (linux_stop_lwp): New.
6143 * linux-low.h (linux_stop_lwp): Declare.
6144
6145 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6146 argument instead of a i386_debug_reg_state.
6147 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6148 a i386_debug_reg_state.
6149 (i386_insert_aligned_watchpoint): Adjust.
6150 (i386_remove_aligned_watchpoint): Adjust.
6151 (i386_low_stopped_data_address): Read the debug registers from the
6152 inferior instead of from the mirrors.
6153 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6154 (i386_dr_low_get_addr): Declare.
6155 (i386_dr_low_get_control): Declare.
6156 (i386_dr_low_get_status): Change prototype.
6157
6158 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6159 (i386_dr_low_get_addr): New.
6160 (i386_dr_low_get_control): New.
6161 (i386_dr_low_get_status): Adjust prototype. Return
6162 dr_status_mirror.
6163 (i386_initial_stuff): Clear dr_status_mirror and
6164 dr_control_mirror.
6165 (i386_get_thread_context): Adjust.
6166 (i386_set_thread_context): Adjust.
6167 (i386_thread_added): Adjust.
6168
5f21a75b
PA
61692010-08-24 Pedro Alves <pedro@codesourcery.com>
6170
6171 * linux-low.h (linux_thread_area): Delete declaration.
6172
3e4c1235
TS
61732010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6174
6175 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6176 after its termination.
6177
1971b033
PA
61782010-08-09 Pedro Alves <pedro@codesourcery.com>
6179
6180 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6181 (gdb_wants_all_stopped): Delete.
6182 (linux_wait_1): Don't call them.
6183 * server.c (handle_v_cont): Tag all threads as want-stopped.
6184 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6185 stopped as "client-wants-stopped".
6186
310444ac
PA
61872010-07-31 Pedro Alves <pedro@codesourcery.com>
6188
6189 * Makefile.in (signals_h): New.
6190 (server_h): Depend on it.
6191 (server.o): Don't depend on $(signals_def).
6192 (signals.o): Depend on $(signals_def).
6193
a19cae16
JK
61942010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6195
6196 * Makefile.in (signals_def): New.
6197 (server_h): Append include/gdb/signals.h and signals_def.
6198 (server.o): Append signals_def.
6199
30d50328
JK
62002010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6201
6202 * server.c (handle_target_event): Use target_signal_to_host for
6203 resume_info.sig initialization.
6204 * target.h (struct thread_resume) <sig>: New comment.
6205
5c3216e2
OS
62062010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6207
c6f46ca0
OS
6208 * server.c (handle_query): strcpy() the returned string from paddress()
6209 instead of sprintf().
5c3216e2
OS
6210 * utils.c (paddress): Return phex_nz().
6211
6bd31874
JB
62122010-07-07 Joel Brobecker <brobecker@adacore.com>
6213
6214 * server.c (handle_v_cont): Call mourn_inferior if process
6215 just exited.
6216 (myresume): Likewise.
6217
0fb4aa4b
PA
62182010-07-01 Pedro Alves <pedro@codesourcery.com>
6219
6220 Static tracepoints, and integration with UST.
6221
6222 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6223 * mem-break.c (uninsert_all_breakpoints)
6224 (reinsert_all_breakpoints): New.
6225 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6226 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6227 (gdb_agent_ust_loaded, helper_thread_id)
6228 (gdb_agent_helper_thread_id): New macros.
6229 (struct ipa_sym_addresses): Add addr_ust_loaded,
6230 addr_helper_thread_id, addr_cmd_buf.
6231 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6232 (in_process_agent_loaded_ust): New.
6233 (write_e_ust_not_loaded): New.
6234 (maybe_write_ipa_ust_not_loaded): New.
6235 (struct collect_static_trace_data_action): New.
6236 (enum tracepoint_type) <static_tracepoint>: New.
6237 (struct tracepoint) <handle>: Mention static tracepoints.
6238 (struct static_tracepoint_ctx): New.
6239 (CMD_BUF_SIZE): New.
6240 (add_tracepoint_action): Handle static tracepoint actions.
6241 (unprobe_marker_at): New.
6242 (clear_installed_tracepoints): Handle static tracepoints.
6243 (cmd_qtdp): Handle static tracepoints.
6244 (probe_marker_at): New.
6245 (cmd_qtstart): Handle static tracepoints.
6246 (response_tracepoint): Handle static tracepoints.
6247 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6248 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6249 (get_context_regcache): Handle static tracepoints.
6250 (do_action_at_tracepoint): Handle static tracepoint actions.
6251 (traceframe_find_block_type): Handle static trace data blocks.
6252 (traceframe_read_sdata): New.
6253 (download_tracepoints): Download static tracepoint actions.
6254 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6255 (GDB_PROBE_NAME): New.
6256 (ust_ops): New.
6257 (GET_UST_SYM): New.
6258 (USTF): New.
6259 (dlsym_ust): New.
6260 (ust_marker_to_static_tracepoint): New.
6261 (gdb_probe): New.
6262 (collect_ust_data_at_tracepoint): New.
6263 (gdb_ust_probe): New.
6264 (UNIX_PATH_MAX, SOCK_DIR): New.
6265 (gdb_ust_connect_sync_socket): New.
6266 (resume_thread, stop_thread): New.
6267 (run_inferior_command): New.
6268 (init_named_socket): New.
6269 (gdb_ust_socket_init): New.
6270 (cstr_to_hexstr): New.
6271 (next_st): New.
6272 (first_marker, next_marker): New.
6273 (response_ust_marker): New.
6274 (cmd_qtfstm, cmd_qtsstm): New.
6275 (unprobe_marker_at, probe_marker_at): New.
6276 (cmd_qtstmat, gdb_ust_thread): New.
6277 (gdb_ust_init): New.
6278 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6279 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6280 (ST_REGENTRY): New.
6281 (x86_64_st_collect_regmap): New.
6282 (X86_64_NUM_ST_COLLECT_GREGS): New.
6283 (AMD64_RIP_REGNUM): New.
6284 (supply_static_tracepoint_registers): New.
6285 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6286 (ST_REGENTRY): New.
6287 (i386_st_collect_regmap): New.
6288 (i386_NUM_ST_COLLECT_GREGS): New.
6289 (supply_static_tracepoint_registers): New.
6290 * server.c (handle_query): Handle qXfer:statictrace:read.
6291 <qSupported>: Report support for StaticTracepoints, and
6292 qXfer:statictrace:read features.
6293 * server.h (traceframe_read_sdata)
6294 (supply_static_tracepoint_registers): Declare.
6295 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6296 (unpack_varlen_hex): Include in IPA build.
6297 * Makefile.in (ustlibs, ustinc): New.
6298 (IPA_OBJS): Add remote-utils-ipa.o.
6299 ($(IPA_LIB)): Link -ldl and -lpthread.
6300 (UST_CFLAGS): New.
6301 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6302 * config.in, configure: Regenerate.
6303
9e4344e5
PA
63042010-06-20 Ian Lance Taylor <iant@google.com>
6305 Pedro Alves <pedro@codesourcery.com>
6306
6307 * linux-x86-low.c (always_true): Delete.
6308 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6309 trying to fool the compiler with always_true.
6310
c6beb2cb
PA
63112010-06-20 Pedro Alves <pedro@codesourcery.com>
6312
6313 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6314 conditions in gdbserver.
6315
d2ed6730
UW
63162010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6317
6318 * spu-low.c (spu_read_memory): Wrap around local store limit.
6319 (spu_write_memory): Likewise.
6320
4e29fb54
PA
63212010-06-15 Pedro Alves <pedro@codesourcery.com>
6322
6323 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6324 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6325 LONGEST uses.
6326 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6327 uses.
6328 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6329 uses with LONGEST uses.
6330
6a271cae
PA
63312010-06-14 Stan Shebs <stan@codesourcery.com>
6332 Pedro Alves <pedro@codesourcery.com>
6333
6334 Bytecode compiler.
6335
6336 * linux-x86-low.c: Include limits.h.
6337 (add_insns): New.
6338 (always_true): New.
6339 (EMIT_ASM): New.
6340 (EMIT_ASM32): New.
6341 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6342 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6343 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6344 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6345 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6346 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6347 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6348 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6349 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6350 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6351 (amd64_emit_void_call_2): New.
6352 (amd64_emit_ops): New.
6353 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6354 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6355 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6356 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6357 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6358 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6359 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6360 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6361 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6362 (i386_emit_stack_adjust, i386_emit_int_call_1)
6363 (i386_emit_void_call_2): New.
6364 (i386_emit_ops): New.
6365 (x86_emit_ops): New.
6366 (the_low_target): Install x86_emit_ops.
6367 * server.h (struct emit_ops): New.
6368 (get_raw_reg_func_addr): Declare.
6369 (current_insn_ptr, emit_error): Declare.
6370 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6371 (set_trace_state_variable_value): New defines.
6372 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6373 addr_get_trace_state_variable_value and
6374 addr_set_trace_state_variable_value.
6375 (symbol_list): New fields for get_raw_reg,
6376 get_trace_state_variable_value and set_trace_state_variable_value.
6377 (condfn): New typedef.
6378 (struct tracepoint): New field `compiled_cond'.
6379 (do_action_at_tracepoint): Clear compiled_cond.
6380 (get_trace_state_variable_value, set_trace_state_variable_value):
6381 Export in the IPA.
6382 (condition_true_at_tracepoint): If there's a compiled condition,
6383 run that.
6384 (current_insn_ptr, emit_error): New globals.
6385 (struct bytecode_address): New.
6386 (get_raw_reg_func_addr): New.
6387 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6388 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6389 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6390 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6391 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6392 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6393 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6394 (compile_tracepoint_condition, compile_bytecodes): New.
6395 * target.h (emit_ops): Forward declare.
6396 (struct target_ops): New field emit_ops.
6397 (target_emit_ops): New.
6398 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6399 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6400 * linux-low.c (linux_emit_ops): New.
6401 (linux_target_ops): Install it.
6402 * linux-low.h (struct linux_target_ops): New field emit_ops.
6403
92b72907
UW
64042010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6405
6406 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6407 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6408
fa593d66
PA
64092010-06-01 Pedro Alves <pedro@codesourcery.com>
6410 Stan Shebs <stan@codesourcery.com>
6411
6412 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6413 (all): Depend on $(extra_libraries).
6414 (install-only): Install the IPA.
6415 (IPA_OBJS, IPA_LIB): New.
6416 (clean): Remove the IPA lib.
6417 (IPAGENT_CFLAGS): New.
6418 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6419 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6420 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6421 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6422 * configure.ac: Check for atomic builtins support in the compiler.
6423 (IPA_DEPFILES, extra_libraries): Define.
6424 * configure.srv (ipa_obj): Add description.
6425 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6426 (i[34567]86-*-linux*): Set ipa_obj.
6427 (x86_64-*-linux*): Set ipa_obj.
6428 * linux-low.c (stabilizing_threads): New.
6429 (supports_fast_tracepoints): New.
6430 (linux_detach): Stabilize threads before detaching.
6431 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6432 the lwp is either not stabilizing, or is moving out of a jump pad.
6433 (linux_fast_tracepoint_collecting): New.
6434 (maybe_move_out_of_jump_pad): New.
6435 (enqueue_one_deferred_signal): New.
6436 (dequeue_one_deferred_signal): New.
6437 (linux_wait_for_event_1): If moving out of a jump pad, defer
6438 pending signals to later.
6439 (linux_stabilize_threads): New.
6440 (linux_wait_1): Check if threads need moving out of jump pads, and
6441 do it if so.
6442 (stuck_in_jump_pad_callback): New.
6443 (move_out_of_jump_pad_callback): New.
6444 (lwp_running): New.
6445 (linux_resume_one_lwp): Handle moving out of jump pads.
6446 (linux_set_resume_request): Dequeue deferred signals.
6447 (need_step_over_p): Also step over fast tracepoint jumps.
6448 (start_step_over): Also uninsert fast tracepoint jumps.
6449 (finish_step_over): Also reinsert fast tracepoint jumps.
6450 (linux_install_fast_tracepoint_jump): New.
6451 (linux_target_ops): Install linux_stabilize_threads and
6452 linux_install_fast_tracepoint_jump_pad.
6453 * linux-low.h (linux_target_ops) <get_thread_area,
6454 install_fast_tracepoint_jump_pad>: New fields.
6455 (struct lwp_info) <collecting_fast_tracepoint,
6456 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6457 (linux_get_thread_area): Declare.
6458 * linux-x86-low.c (jump_insn): New.
6459 (x86_get_thread_area): New.
6460 (append_insns): New.
6461 (push_opcode): New.
6462 (amd64_install_fast_tracepoint_jump_pad): New.
6463 (i386_install_fast_tracepoint_jump_pad): New.
6464 (x86_install_fast_tracepoint_jump_pad): New.
6465 (the_low_target): Install x86_get_thread_area and
6466 x86_install_fast_tracepoint_jump_pad.
6467 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6468 (struct fast_tracepoint_jump): New.
6469 (fast_tracepoint_jump_insn): New.
6470 (fast_tracepoint_jump_shadow): New.
6471 (find_fast_tracepoint_jump_at): New.
6472 (fast_tracepoint_jump_here): New.
6473 (delete_fast_tracepoint_jump): New.
6474 (set_fast_tracepoint_jump): New.
6475 (uninsert_fast_tracepoint_jumps_at): New.
6476 (reinsert_fast_tracepoint_jumps_at): New.
6477 (set_breakpoint_at): Use write_inferior_memory.
6478 (uninsert_raw_breakpoint): Use write_inferior_memory.
6479 (check_mem_read): Mask out fast tracepoint jumps.
6480 (check_mem_write): Mask out fast tracepoint jumps.
6481 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6482 (set_fast_tracepoint_jump): Declare.
6483 (delete_fast_tracepoint_jump)
6484 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6485 (reinsert_fast_tracepoint_jumps_at): Declare.
6486 * regcache.c: Don't compile many functions when building the
6487 in-process agent library.
6488 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6489 the register buffer in the heap.
6490 (free_register_cache): If the register buffer isn't owned by the
6491 regcache, don't free it.
6492 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6493 pre-existing register caches.
6494 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6495 type.
6496 (convert_ascii_to_int): : Constify `from' parameter type.
6497 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6498 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6499 the needed buffer in-place.
6500 (relocate_instruction): New.
6501 * server.c (handle_query) <qSymbols>: If the target supports
6502 tracepoints, give it a chance of looking up symbols. Report
6503 support for fast tracepoints.
6504 (handle_status): Stabilize threads.
6505 (process_serial_event): Adjust.
6506 * server.h (struct fast_tracepoint_jump): Forward declare.
6507 (struct process_info) <fast_tracepoint_jumps>: New field.
6508 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6509 (decode_X_packet, decode_M_packet): Adjust.
6510 (relocate_instruction): Declare.
6511 (in_process_agent_loaded): Declare.
6512 (tracepoint_look_up_symbols): Declare.
6513 (struct fast_tpoint_collect_status): Declare.
6514 (fast_tracepoint_collecting): Declare.
6515 (force_unlock_trace_buffer): Declare.
6516 (handle_tracepoint_bkpts): Declare.
6517 (initialize_low_tracepoint)
6518 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6519 * target.h (struct target_ops) <stabilize_threads,
6520 install_fast_tracepoint_jump_pad>: New fields.
6521 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6522 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6523 [HAVE_STDINT_H]: Include stdint.h.
6524 (trace_debug_1): Rename to ...
6525 (trace_vdebug): ... this.
6526 (trace_debug): Rename to ...
6527 (trace_debug_1): ... this. Add `level' parameter.
6528 (trace_debug): New.
6529 (ATTR_USED, ATTR_NOINLINE): New.
6530 (IP_AGENT_EXPORT): New.
6531 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6532 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6533 (about_to_request_buffer_space, trace_buffer_is_full)
6534 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6535 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6536 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6537 (traceframe_write_count, traceframes_created)
6538 (trace_state_variables)
6539 New renaming defines.
6540 (struct ipa_sym_addresses): New.
6541 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6542 (symbol_list): New.
6543 (ipa_sym_addrs): New.
6544 (all_tracepoint_symbols_looked_up): New.
6545 (in_process_agent_loaded): New.
6546 (write_e_ipa_not_loaded): New.
6547 (maybe_write_ipa_not_loaded): New.
6548 (tracepoint_look_up_symbols): New.
6549 (debug_threads) [IN_PROCESS_AGENT]: New.
6550 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6551 (UNKNOWN_SIDE_EFFECTS): New.
6552 (stop_tracing): New.
6553 (flush_trace_buffer): New.
6554 (stop_tracing_bkpt): New.
6555 (flush_trace_buffer_bkpt): New.
6556 (read_inferior_integer): New.
6557 (read_inferior_uinteger): New.
6558 (read_inferior_data_pointer): New.
6559 (write_inferior_data_pointer): New.
6560 (write_inferior_integer): New.
6561 (write_inferior_uinteger): New.
6562 (struct collect_static_trace_data_action): Delete.
6563 (enum tracepoint_type): New.
6564 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6565 <actions_str, step_actions, step_actions_str>: Only include in
6566 GDBserver.
fa593d66
PA
6567 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6568 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6569 (tracepoints): Use IP_AGENT_EXPORT.
6570 (last_tracepoint): Don't include in the IPA.
6571 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6572 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6573 (alloced_trace_state_variables): New.
6574 (trace_state_variables): Use IP_AGENT_EXPORT.
6575 (traceframe_t): Delete unused variable.
6576 (circular_trace_buffer): Don't include in the IPA.
6577 (trace_buffer_start): Delete.
6578 (struct trace_buffer_control): New.
6579 (trace_buffer_free): Delete.
6580 (struct ipa_trace_buffer_control): New.
6581 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6582 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6583 New.
6584 (trace_buffer_ctrl): New.
6585 (TRACE_BUFFER_CTRL_CURR): New.
6586 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6587 Reimplement as macros.
6588 (trace_buffer_wrap): Delete.
6589 (traceframe_write_count, traceframe_read_count)
6590 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6591 (struct tracepoint_hit_ctx) <type>: New field.
6592 (struct fast_tracepoint_ctx): New.
6593 (memory_barrier): New.
6594 (cmpxchg): New.
6595 (record_tracepoint_error): Update atomically in the IPA.
6596 (clear_inferior_trace_buffer): New.
6597 (about_to_request_buffer_space): New.
6598 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6599 updating the same buffer.
6600 (add_tracepoint): Default the tracepoint's type to trap
6601 tracepoint, and orig_size to -1.
6602 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6603 internal variables.
6604 (create_trace_state_variable): New parameter `gdb'. Handle it.
6605 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6606 (cmd_qtdp): Handle fast tracepoints.
6607 (cmd_qtdv): Adjust.
6608 (max_jump_pad_size): New.
6609 (gdb_jump_pad_head): New.
6610 (get_jump_space_head): New.
6611 (claim_jump_space): New.
6612 (sort_tracepoints): New.
6613 (MAX_JUMP_SIZE): New.
6614 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6615 IPA.
6616 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6617 support. Upload fast traceframes, and delete internal IPA
6618 breakpoints.
6619 (stop_tracing_handler): New.
6620 (flush_trace_buffer_handler): New.
6621 (cmd_qtstop): Upload fast tracepoints.
6622 (response_tracepoint): Handle fast tracepoints.
6623 (tracepoint_finished_step): Upload fast traceframes. Set the
6624 tracepoint hit context's tracepoint type.
6625 (handle_tracepoint_bkpts): New.
6626 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6627 type. Add comment about fast tracepoints.
6628 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6629 non-existing action_str field.
6630 (get_context_regcache): Handle fast tracepoints.
6631 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6632 to the regcache.
6633 (fast_tracepoint_from_jump_pad_address): New.
6634 (fast_tracepoint_from_ipa_tpoint_address): New.
6635 (collecting_t): New.
6636 (force_unlock_trace_buffer): New.
6637 (fast_tracepoint_collecting): New.
6638 (collecting): New.
6639 (gdb_collect): New.
6640 (write_inferior_data_ptr): New.
6641 (target_tp_heap): New.
6642 (target_malloc): New.
6643 (download_agent_expr): New.
6644 (UALIGN): New.
6645 (download_tracepoints): New.
6646 (download_trace_state_variables): New.
6647 (upload_fast_traceframes): New.
6648 (IPA_FIRST_TRACEFRAME): New.
6649 (IPA_NEXT_TRACEFRAME_1): New.
6650 (IPA_NEXT_TRACEFRAME): New.
6651 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6652 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6653 (gdb_jump_pad_buffer_end): New.
6654 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6655 (initialize_tracepoint): Adjust.
6656 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6657 buffer. Initialize the low module.
6658 * utils.c (PREFIX, TOOLNAME): New.
6659 (malloc_failure): Use PREFIX.
6660 (error): In the IPA, an error causes an exit.
6661 (fatal, warning): Use PREFIX.
6662 (internal_error): Use TOOLNAME.
6663 (NUMCELLS): Increase to 10.
6664 * configure, config.in: Regenerate.
6665
d149dd1d
PA
66662010-06-01 Pedro Alves <pedro@codesourcery.com>
6667
6668 * server.c (handle_query) <qSupported>: Do two passes over the
6669 qSupported string to avoid nesting strtok.
6670
f6528abd
JK
66712010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6672
6673 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6674 (CDEPS): New.
6675 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6676 -Wl,--dynamic-list.
6677 * configure: Regenerate.
6678 * proc-service.list: New.
6679
ca2a87a0
JK
66802010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6681
6682 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6683 New comment.
6684
363a6e9f
OS
66852010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6686
6687 * gdbreplay.c (remote_open): Check error return from socket() call by
6688 its equality to -1 not by it being negative.
6689 * remote-utils.c (remote_open): Likewise.
6690
d23b6cb1
PA
66912010-05-23 Pedro Alves <pedro@codesourcery.com>
6692
6693 * config.h: Regenerate.
6694
28d3cf85
MK
66952010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6696
6697 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6698 doesn't provide PTRACE_GET_THREAD_AREA.
6699
fea36a59
MK
67002010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6701
6702 * linux-m68k-low.c: Include <asm/ptrace.h>
6703 (ps_get_thread_area): Implement.
6704
24b066ba
DE
67052010-05-03 Doug Evans <dje@google.com>
6706
6707 * event-loop.c (struct callback_event): New struct.
6708 (callback_list): New global.
6709 (append_callback_event, delete_callback_event): New functions.
6710 (process_callback): New function.
6711 (start_event_loop): Call it.
6712 * remote-utils.c (NOT_SCHEDULED): Define.
6713 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6714 moved out of readchar.
6715 (readchar): Rewrite. Call reschedule before returning.
6716 (reset_readchar): New function.
6717 (remote_close): Call it.
6718 (process_remaining, reschedule): New functions.
6719 * server.h (callback_handler_func): New typedef.
6720 (append_callback_event, delete_callback_event): Declare.
6721
9836d6ea
PA
67222010-05-03 Pedro Alves <pedro@codesourcery.com>
6723
6724 * proc-service.c (ps_pglobal_lookup): Use
6725 thread_db_look_up_one_symbol.
6726 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6727 parameter. Use it instead of all_symbols_looked_up.
6728 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6729 field.
6730 (all_symbols_looked_up): Don't declare.
6731 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6732 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6733 field.
6734 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6735 Set all_symbols_looked_up here.
6736 (thread_db_look_up_one_symbol): New.
6737 (thread_db_get_tls_address): Adjust.
6738 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6739 thread_db object on the heap, and tentatively set it in the
6740 process structure.
6741 (thread_db_init): Don't set all_symbols_looked_up here.
6742 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6743
7984d532
PA
67442010-05-03 Pedro Alves <pedro@codesourcery.com>
6745
6746 * linux-low.c (linux_kill, linux_detach): Adjust.
6747 (status_pending_p_callback): Remove redundant statement. Check
6748 for !TARGET_WAITIKIND_IGNORE, instead of
6749 TARGET_WAITKIND_STOPPED.
6750 (handle_tracepoints): Make sure LWP is locked. Adjust.
6751 (linux_wait_for_event_1): Adjust.
6752 (linux_cancel_breakpoints): New.
6753 (unsuspend_one_lwp): New.
6754 (unsuspend_all_lwps): New.
6755 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6756 (send_sigstop_callback): Change return type to int, add new
6757 `except' parameter and handle it.
6758 (suspend_and_send_sigstop_callback): New.
6759 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6760 pass them down. If SUSPEND, also increment the lwp's suspend
6761 count.
6762 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6763 (need_step_over_p): Don't consider suspended LWPs.
6764 (start_step_over): Adjust.
6765 (proceed_one_lwp): Change return type to int, add new `except'
6766 parameter and handle it.
6767 (unsuspend_and_proceed_one_lwp): New.
6768 (proceed_all_lwps): Use find_inferior instead of
6769 for_each_inferior.
6770 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6771 also decrement the suspend count of LWPs. Pass `except' down,
6772 instead of hacking its suspend count.
6773 (linux_pause_all): Add `freeze' parameter. Adjust.
6774 (linux_unpause_all): New.
6775 (linux_target_ops): Install linux_unpause_all.
6776 * server.c (handle_status): Adjust.
6777 * target.h (struct target_ops): New fields `unpause_all' and
6778 `cancel_breakpoints'. Add new parameter to `pause_all'.
6779 (pause_all): Add new `freeze' parameter.
6780 (unpause_all): New.
6781 (cancel_breakpoints): New.
6782 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6783 cancel breakpoints.
6784 (cmd_qtstart): Pause threads.
6785 (stop_tracing): Pause threads, and cancel breakpoints.
6786 * win32-low.c (win32_target_ops): Adjust.
6787
e471f25b
PA
67882010-05-03 Pedro Alves <pedro@codesourcery.com>
6789
6790 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6791 the inferior right away from here...
6792 (linux_wait_1): ... to here, and adjust to check the thread's
6793 last_resume_kind instead of the lwp's step or stop_expected flags.
6794
1915ef4f
PA
67952010-05-02 Pedro Alves <pedro@codesourcery.com>
6796
6797 * README: Use consistent `GDB' and `GDBserver' spellings.
6798
f9e39928
PA
67992010-05-02 Pedro Alves <pedro@codesourcery.com>
6800
6801 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6802 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6803 (linux_detach_one_lwp): Assume the lwp is stopped.
6804 (any_thread_of): Delete.
6805 (linux_detach): Stop all lwps here. Don't blindly delete all
6806 breakpoints.
6807 (delete_lwp_callback): New.
6808 (linux_mourn): Delete all lwps of the process that is gone.
6809 (linux_wait_1): Don't delete the last lwp of the process here.
6810 * mem-break.h (mark_breakpoints_out): Declare.
6811 * mem-break.c (mark_breakpoints_out): New.
6812 (free_all_breakpoints): Use it.
6813 * server.c (handle_target_event): If the process is gone, mark
6814 breakpoints out.
6815 * thread-db.c (struct thread_db) <create_bp>: New field.
6816 (thread_db_enable_reporting): Fix prototype. Store a thread event
6817 breakpoint reference in the thread_db struct.
6818 (thread_db_load_search): Clear the thread_db object.
6819 (try_thread_db_load_1): Ditto.
6820 (switch_to_process): New.
6821 (disable_thread_event_reporting): Use it.
6822 (remove_thread_event_breakpoints): New.
6823 (thread_db_detach, thread_db_mourn): Use it.
6824
1e7fc18c
PA
68252010-05-01 Pedro Alves <pedro@codesourcery.com>
6826
6827 * linux-low.c (linux_enable_event_reporting): New.
6828 (linux_wait_for_event_1, handle_extended_wait): Use it.
6829
02fc4de7
PA
68302010-04-30 Pedro Alves <pedro@codesourcery.com>
6831
6832 * linux-low.c (linux_kill_one_lwp, linux_kill)
6833 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6834 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6835 SIGSTOP even if the LWP is stopped.
6836 (send_sigstop_callback): New.
6837 (stop_all_lwps): Use send_sigstop_callback instead.
6838 (linux_resume_one_thread): Adjust.
6839 (proceed_one_lwp): Still proceed an LWP that the client has
6840 requested to stop, if we haven't reported it as stopped yet. Make
6841 sure that LWPs the client want stopped, have a pending SIGSTOP.
6842
bc3b5632
DE
68432010-04-26 Doug Evans <dje@google.com>
6844
ae1ada35
DE
6845 * server.c (handle_general_set): Make static.
6846
bc3b5632
DE
6847 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6848 Print received char after testing for error/eof instead of before.
6849 (input_interrupt): Tweak comment.
6850
65730243
DE
68512010-04-23 Doug Evans <dje@google.com>
6852
6853 * server.c (start_inferior): Print inferior argv if --debug.
6854
a8ae7dc0
AR
68552010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6856
6857 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6858 * nto-x86-low.c: Include server.h
6859
1c07cc19
PM
68602010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6861
6862 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6863 be consistent with other sources of this directory.
6864 (init_registers_amd64): Correct name of source file of this function
6865 in the comment.
6866
e0a61e09
PM
68672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6868
6869 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6870 64-bit executables.
6871
54709339
PM
68722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6873
6874 * win32-i386-low.c: Add 64-bit support.
6875 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6876 (init_registers_amd64): Declare.
6877 (mappings): Add 64-bit version of array.
6878 (init_windows_x86): New function.
6879 (the_low_target): Change init_arch field to init_windows_x86.
6880
e8f0053d
PM
68812010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6882
6883 * win32-low.c: Adapt to support also 64-bit architecture.
6884 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6885 (get_image_name): Use SIZE_T type for local variable `done'.
6886 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6887 (toolhelp_get_dll_name): Idem.
6888 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6889 Use uintptr_t typecast to avoid warning.
6890 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6891 (handle_exception): Use phex_nz to avoid warning.
6892 (win32_wait): Remove unused local variable `process'.
6893
c481e77e
PM
68942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6895
6896 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6897 `amd64-avx.o'.
6898
12ea4b69
PM
68992010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6900
6901 * configure.ac: Use `ws2_32' library for srv_mingw.
6902 * configure: Regenerate.
6903 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6904 * remote-utils.c: Likewise.
6905
f6d1620c
L
69062010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6907
6908 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6909 if __x86_64__ is defined.
6910
8e642873
PM
69112010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6912
6913 * configure: Regenerate.
6914
711e434b
PM
69152010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6916
6917 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6918 * target.h (target_ops): New get_tib_address field.
6919 * win32-low.h (win32_thread_info): Add thread_local_base field.
6920 * win32-low.c (child_add_thread): Add tlb argument.
6921 Set thread_local_base field to TLB.
6922 (get_child_debug_event): Adapt to child_add_thread change.
6923 (win32_get_tib_address): New function.
6924 (win32_target_ops): Set get_tib_address field to
6925 win32_get_tib_address.
6926 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6927
505106cd
PA
69282010-04-12 Pedro Alves <pedro@codesourcery.com>
6929
505106cd
PA
6930 * linux-low.c (linux_mourn): Also remove the process.
6931 * server.c (handle_target_event): Don't remove the process here.
6932 * nto-low.c (nto_mourn): New.
6933 (nto_target_ops): Install it.
6934 * spu-low.c (spu_mourn): New.
6935 (spu_target_ops): Install it.
6936 * win32-low.c (win32_mourn): New.
6937 (win32_target_ops): Install it.
6938
e8470a06
PA
69392010-04-12 Pedro Alves <pedro@codesourcery.com>
6940
6941 * server.h (buffer_xml_printf): Remove redundant `;'.
6942
45ba0d02
PA
69432010-04-12 Pedro Alves <pedro@codesourcery.com>
6944
6945 * regcache.c (set_register_cache): Invalidate regcaches before
6946 changing the register cache layout.
6947 (regcache_invalidate_one): Allow a NULL regcache.
6948 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6949 regcaches before changing the register cache layout or the target
6950 regsets.
6951
59e04013
L
69522010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6953
6954 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6955 variable warning on Linux/x86-64.
6956
8336d594
PA
69572010-04-11 Pedro Alves <pedro@codesourcery.com>
6958
6959 GDBserver disconnected tracing support.
6960
6961 * linux-low.c (linux_remove_process): Delete.
6962 (add_lwp): Don't set last_resume_kind here.
6963 (linux_kill): Use `mourn'.
6964 (linux_detach): Use `thread_db_detach', and `mourn'.
6965 (linux_mourn): New.
6966 (linux_attach_lwp_1): Adjust comment.
6967 (linux_attach): last_resume_kind moved the thread_info; adjust.
6968 (status_pending_p_callback): Adjust.
6969 (linux_wait_for_event_1): Adjust.
6970 (count_events_callback, select_singlestep_lwp_callback)
6971 (select_event_lwp_callback, cancel_breakpoints_callback)
6972 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6973 (proceed_one_lwp): Adjust.
6974 (linux_async): Add debug output.
6975 (linux_thread_stopped): New.
6976 (linux_pause_all): New.
6977 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6978 linux_pause_all.
6979 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6980 (thread_db_free): Delete declaration.
6981 (thread_db_detach, thread_db_mourn): Declare.
6982 * thread-db.c (thread_db_init): Use thread_db_mourn.
6983 (thread_db_free): Delete, split in two.
6984 (disable_thread_event_reporting): New.
6985 (thread_db_detach): New.
6986 (thread_db_mourn): New.
6987
6988 * server.h (struct thread_info) <last_resume_kind>: New field.
6989 <attached>: Add comment.
6990 <gdb_detached>: New field.
6991 (handler_func): Change return type to int.
6992 (handle_serial_event, handle_target_event): Ditto.
6993 (gdb_connected): Declare.
6994 (tracing): Delete.
6995 (disconnected_tracing): Declare.
6996 (stop_tracing): Declare.
6997
6998 * server.c (handle_query) <qSupported>: Report support for
6999 disconnected tracing.
7000 (queue_stop_reply_callback): Account for running threads.
7001 (gdb_wants_thread_stopped): New.
7002 (gdb_wants_all_threads_stopped): New.
7003 (gdb_reattached_process): New.
7004 (handle_status): Clear the `gdb_detached' flag of all processes.
7005 In all-stop, stop all threads.
7006 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7007 (process_serial_event): If the remote connection breaks, or if an
7008 exit was forced with "monitor exit", force an event loop exit.
7009 Handle disconnected tracing on detach.
7010 (handle_serial_event): Adjust.
7011 (handle_target_event): If GDB isn't connected, forward events back
7012 to the inferior, unless the last process exited, in which case,
7013 exit gdbserver. Adjust interface.
7014
7015 * remote-utils.c (remote_open): Don't block in accept. Instead
7016 register an event loop source on the listen socket file
7017 descriptor. Refactor bits into ...
7018 (listen_desc): ... this new global.
7019 (gdb_connected): ... this new function.
7020 (enable_async_notification): ... this new function.
7021 (handle_accept_event): ... this new function.
7022 (remote_close): Clear remote_desc.
7023
7024 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7025
7026 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7027 New fields.
7028 (mourn_inferior): Define.
7029 (target_process_qsupported): Avoid the dangling else problem.
7030 (thread_stopped): Define.
7031 (pause_all): Define.
7032 (target_waitstatus_to_string): Declare.
7033 * target.c (target_waitstatus_to_string): New.
7034
7035 * tracepoint.c (tracing): Make extern.
7036 (disconnected_tracing): New.
7037 (stop_tracing): Make extern. Handle tracing stops due to GDB
7038 disconnecting.
7039 (cmd_qtdisconnected): New.
7040 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7041 (handle_tracepoint_general_set): Handle QTDisconnected.
7042
7043 * event-loop.c (event_handler_func): Change return type to int.
7044 (process_event): Bail out if the event handler wants the event
7045 loop to stop.
7046 (handle_file_event): Ditto.
7047 (start_event_loop): Bail out if the event handler wants the event
7048 loop to stop.
7049
7050 * nto-low.c (nto_target_ops): Adjust.
7051 * spu-low.c (spu_wait): Don't remove the process here.
7052 (spu_target_ops): Adjust.
7053 * win32-low.c (win32_wait): Don't remove the process here.
7054 (win32_target_ops): Adjust.
7055
5d267c4c
PA
70562010-04-11 Pedro Alves <pedro@codesourcery.com>
7057
7058 * regcache.c (realloc_register_cache): Invalidate inferior's
7059 regcache before recreating it.
7060
623ccd72
PA
70612010-04-09 Pedro Alves <pedro@codesourcery.com>
7062
7063 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7064
219f2f23
PA
70652010-04-09 Stan Shebs <stan@codesourcery.com>
7066 Pedro Alves <pedro@codesourcery.com>
7067
7068 * server.h (LONGEST): New.
7069 (struct thread_info) <while_stepping>: New field.
7070 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7071 Declare.
7072 (initialize_tracepoint, handle_tracepoint_general_set)
7073 (handle_tracepoint_query, tracepoint_finished_step)
7074 (tracepoint_was_hit, release_while_stepping_state_list):
7075 (current_traceframe): Declare.
7076 * server.c (handle_general_set): Handle tracepoint packets.
7077 (read_memory): New.
7078 (write_memory): New.
7079 (handle_search_memory_1): Use read_memory.
7080 (handle_query): Report support for conditional tracepoints, trace
7081 state variables, and tracepoint sources. Handle tracepoint
7082 queries.
7083 (main): Initialize the tracepoints module.
7084 (process_serial_event): Handle traceframe reads/writes.
7085
7086 * linux-low.c (handle_tracepoints): New.
7087 (linux_wait_1): Call it.
7088 (linux_resume_one_lwp): Handle while-stepping.
7089 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7090 (linux_target_ops): Install them.
7091 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7092 New field.
7093 * linux-x86-low.c (x86_supports_tracepoints): New.
7094 (the_low_target). Install it.
7095
7096 * mem-break.h (delete_breakpoint): Declare.
7097 * mem-break.c (delete_breakpoint): Make external.
7098
7099 * target.h (struct target_ops): Add `supports_tracepoints',
7100 `read_pc', and `write_pc' fields.
7101 (target_supports_tracepoints): Define.
7102 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7103 (phex_nz): New.
7104
7105 * regcache.h (struct regcache) <registers_owned>: New field.
7106 (init_register_cache, regcache_cpy): Declare.
7107 (regcache_read_pc, regcache_write_pc): Declare.
7108 (register_cache_size): Declare.
7109 (supply_regblock): Declare.
7110 * regcache.c (init_register_cache): New.
7111 (new_register_cache): Use it.
7112 (regcache_cpy): New.
7113 (register_cache_size): New.
7114 (supply_regblock): New.
7115 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7116
219f2f23
PA
7117 * tracepoint.c: New.
7118
7119 * Makefile.in (OBS): Add tracepoint.o.
7120 (tracepoint.o): New rule.
7121
3a13a53b
L
71222010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7123
7124 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7125 (i386-mmx.o): New.
7126 (i386-mmx.c): Likewise.
7127 (i386-mmx-linux.o): Likewise.
7128 (i386-mmx-linux.c): Likewise.
7129
7130 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7131 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7132 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7133 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7134
7135 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7136 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7137 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7138
1570b33e
L
71392010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7140
7141 * Makefile.in (clean): Updated.
7142 (i386-avx.o): New.
7143 (i386-avx.c): Likewise.
7144 (i386-avx-linux.o): Likewise.
7145 (i386-avx-linux.c): Likewise.
7146 (amd64-avx.o): Likewise.
7147 (amd64-avx.c): Likewise.
7148 (amd64-avx-linux.o): Likewise.
7149 (amd64-avx-linux.c): Likewise.
7150
7151 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7152 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7153 (srv_amd64_regobj): Add amd64-avx.o.
7154 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7155 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7156 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7157 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7158 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7159 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7160 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7161
7162 * i387-fp.c: Include "i386-xstate.h".
7163 (i387_xsave): New.
7164 (i387_cache_to_xsave): Likewise.
7165 (i387_xsave_to_cache): Likewise.
7166 (x86_xcr0): Likewise.
7167
7168 * i387-fp.h (i387_cache_to_xsave): Likewise.
7169 (i387_xsave_to_cache): Likewise.
7170 (x86_xcr0): Likewise.
7171
7172 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7173 * linux-crisv32-low.c (target_regsets): Likewise.
7174 * linux-m68k-low.c (target_regsets): Likewise.
7175 * linux-mips-low.c (target_regsets): Likewise.
7176 * linux-ppc-low.c (target_regsets): Likewise.
7177 * linux-s390-low.c (target_regsets): Likewise.
7178 * linux-sh-low.c (target_regsets): Likewise.
7179 * linux-sparc-low.c (target_regsets): Likewise.
7180 * linux-xtensa-low.c (target_regsets): Likewise.
7181
7182 * linux-low.c: Include <sys/uio.h>.
7183 (regsets_fetch_inferior_registers): Support nt_type.
7184 (regsets_store_inferior_registers): Likewise.
7185 (linux_process_qsupported): New.
7186 (linux_target_ops): Add linux_process_qsupported.
7187
7188 * linux-low.h (regset_info): Add nt_type.
7189 (linux_target_ops): Add process_qsupported.
7190
7191 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7192 and <sys/uio.h>.
7193 (init_registers_i386_avx_linux): New.
7194 (init_registers_amd64_avx_linux): Likewise.
7195 (xmltarget_i386_linux_no_xml): Likewise.
7196 (xmltarget_amd64_linux_no_xml): Likewise.
7197 (PTRACE_GETREGSET): Likewise.
7198 (PTRACE_SETREGSET): Likewise.
7199 (x86_fill_xstateregset): Likewise.
7200 (x86_store_xstateregset): Likewise.
7201 (use_xml): Likewise.
7202 (x86_linux_update_xmltarget): Likewise.
7203 (x86_linux_process_qsupported): Likewise.
7204 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7205 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7206 init_registers_i386_linux here. Call
7207 x86_linux_update_xmltarget.
7208 (the_low_target): Add x86_linux_process_qsupported.
7209
7210 * server.c (handle_query): Call target_process_qsupported.
7211
7212 * target.h (target_ops): Add process_qsupported.
7213 (target_process_qsupported): New.
7214
fc7238bb
PA
72152010-04-03 Pedro Alves <pedro@codesourcery.com>
7216
7217 * inferiors.c (add_thread): Set last_status kind to
7218 TARGET_WAITKIND_IGNORE.
7219 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7220 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7221 (linux_wait_1): Move `thread' local definition to block that uses
7222 it. Don't NULL initialize `event_child'.
7223 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7224 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7225 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7226
bdabb078
PA
72272010-04-01 Pedro Alves <pedro@codesourcery.com>
7228
7229 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7230 an extended waitstatus, or by a watchpoint.
7231 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7232 thread was stepping or has been stopped by a watchpoint.
7233
d3bbe7a0
PA
72342010-04-01 Pedro Alves <pedro@codesourcery.com>
7235
7236 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7237 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7238 of another, then delete the previous, and validate all
7239 breakpoints.
7240 (validate_inserted_breakpoint): New.
7241 (delete_disabled_breakpoints): New.
7242 (validate_breakpoints): New.
7243 (check_mem_read): Validate breakpoints before trusting their
7244 shadow. Delete disabled breakpoints.
7245 (check_mem_write): Validate breakpoints before trusting they
7246 should be inserted. Delete disabled breakpoints.
7247 * mem-break.h (validate_breakpoints):
7248 * server.c (handle_query): Validate breakpoints when we see a
7249 qSymbol query.
7250
8b07ae33
PA
72512010-04-01 Pedro Alves <pedro@codesourcery.com>
7252
7253 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7254 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7255 if we could tell there's a GDB breakpoint at stop_pc.
7256 (need_step_over_p): Don't do a step over if we find a GDB
7257 breakpoint at the resume PC.
7258
7259 * mem-break.c (struct raw_breakpoint): New.
7260 (enum bkpt_type): New type `gdb_breakpoint'.
7261 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7262 fields. New field `raw'.
7263 (find_raw_breakpoint_at): New.
7264 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7265 breakpoint instead.
7266 (set_breakpoint_at): Adjust.
7267 (delete_raw_breakpoint): New.
7268 (release_breakpoint): New.
7269 (delete_breakpoint): Rename to...
7270 (delete_breakpoint_1): ... this. Add proc parameter. Use
7271 release_breakpoint. Return ENOENT.
7272 (delete_breakpoint): Reimplement.
7273 (find_breakpoint_at): Delete.
7274 (find_gdb_breakpoint_at): New.
7275 (delete_breakpoint_at): Delete.
7276 (set_gdb_breakpoint_at): New.
7277 (delete_gdb_breakpoint_at): New.
7278 (gdb_breakpoint_here): New.
7279 (set_reinsert_breakpoint): Use release_breakpoint.
7280 (uninsert_breakpoint): Rename to ...
7281 (uninsert_raw_breakpoint): ... this.
7282 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7283 (reinsert_raw_breakpoint): Change parameter type to
7284 raw_breakpoint.
7285 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7286 instead.
7287 (check_breakpoints): Adjust. Use release_breakpoint.
7288 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7289 (breakpoint_inserted_here): Ditto.
7290 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7291 Don't trust the breakpoint's shadow if it is not inserted.
7292 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7293 (delete_all_breakpoints): Adjust.
7294 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7295 use delete_breakpoint_1.
7296
7297 * mem-break.h (breakpoints_supported): Delete declaration.
7298 (set_gdb_breakpoint_at): Declare.
7299 (gdb_breakpoint_here): Declare.
7300 (delete_breakpoint_at): Delete.
7301 (delete_gdb_breakpoint_at): Declare.
7302
7303 * server.h (struct raw_breakpoint): Forward declare.
7304 (struct process_info): New field `raw_breakpoints'.
7305
7306 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7307 breakpoints.
7308
6bf5e0ba
PA
73092010-03-24 Pedro Alves <pedro@codesourcery.com>
7310
7311 * linux-low.c (status_pending_p_callback): Fix comment.
7312 (linux_wait_for_event_1): Move most of the internal breakpoint
7313 handling from here...
7314 (linux_wait_1): ... to here.
7315 (count_events_callback): New.
7316 (select_singlestep_lwp_callback): New.
7317 (select_event_lwp_callback): New.
7318 (cancel_breakpoints_callback): New.
7319 (select_event_lwp): New.
7320 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7321 priority to all LWPs that have had events that should be reported
7322 to the client. Cancel breakpoints when about to reporting the
7323 event to the client, not while stopping lwps. No longer cancel
7324 finished single-steps here.
7325 (cancel_finished_single_step): Delete.
7326 (cancel_finished_single_steps): Delete.
7327
414a389f
PA
73282010-03-24 Pedro Alves <pedro@codesourcery.com>
7329
7330 * mem-break.c (enum bkpt_type): New.
7331 (struct breakpoint): New field `type'.
7332 (set_breakpoint_at): Change return type to struct breakpoint
7333 pointer. Set type to `other_breakpoint' by default.
7334 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7335 in the breakpoint list.
7336 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7337 (reinsert_breakpoint): Rename to ...
7338 (reinsert_raw_breakpoint): ... this.
7339 (reinsert_breakpoints_at): Adjust.
7340 * mem-break.h (struct breakpoint): Declare.
7341 (set_breakpoint_at): Change return type to struct breakpoint
7342 pointer.
7343
2280c721
PA
73442010-03-24 Pedro Alves <pedro@codesourcery.com>
7345
7346 * server.c (handle_query): Assign, not compare.
7347
d50171e4
PA
73482010-03-24 Pedro Alves <pedro@codesourcery.com>
7349
7350 Teach linux gdbserver to step-over-breakpoints.
7351
7352 * linux-low.c (can_hardware_single_step): New.
7353 (supports_breakpoints): New.
7354 (handle_extended_wait): If stopping threads, read the stop pc of
7355 the new cloned LWP.
7356 (get_pc): New.
7357 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7358 low target doesn't support retrieving the PC.
7359 (add_lwp): Set last_resume_kind to resume_continue.
7360 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7361 (linux_attach): Don't clear stop_expected. Set the lwp's
7362 last_resume_kind to resume_stop.
7363 (linux_detach_one_lwp): Don't check for removed breakpoints.
7364 (check_removed_breakpoint): Delete.
7365 (status_pending_p): Rename to ...
7366 (status_pending_p_callback): ... this. Don't check for removed
7367 breakpoints. Don't consider threads that are stopped from GDB's
7368 perspective.
7369 (linux_wait_for_lwp): Always read the stop_pc here.
7370 (cancel_breakpoint): New.
7371 (step_over_bkpt): New global.
7372 (linux_wait_for_event_1): Implement stepping over breakpoints.
7373 (gdb_wants_lwp_stopped): New.
7374 (gdb_wants_all_stopped): New.
7375 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7376 single-step traps here. Store the thread's last reported target
7377 wait status.
7378 (send_sigstop): Don't clear stop_expected. Always set it,
7379 instead.
7380 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7381 (cancel_finished_single_step): New.
7382 (cancel_finished_single_steps): New.
7383 (wait_for_sigstop): Don't cancel finished single-step traps here.
7384 (linux_resume_one_lwp): Don't check for removed breakpoints.
7385 Don't set `step' on non-hardware step archs.
7386 (linux_set_resume_request): Ignore resume_stop requests if already
7387 stopping or stopped. Set the lwp's last_resume_kind.
7388 (resume_status_pending_p): Don't check for removed breakpoints.
7389 (need_step_over_p): New.
7390 (start_step_over): New.
7391 (finish_step_over): New.
7392 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7393 requests. Clear the thread's last reported target waitstatus.
7394 Don't use the `suspended' flag. Don't consider pending breakpoints.
7395 (linux_resume): Start a step-over if necessary.
7396 (proceed_one_lwp): New.
7397 (proceed_all_lwps): New.
7398 (unstop_all_lwps): New.
7399 * linux-low.h (struct lwp_info): Rewrite comment for the
7400 `suspended' flag. Add the `stop_pc' field. Delete the
7401 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7402 Add `'last_resume_kind' and `need_step_over' fields.
7403 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7404 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7405 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7406 (set_raw_breakpoint_at): New.
7407 (set_breakpoint_at): Rewrite to use it.
7408 (reinsert_breakpoint_handler): Delete.
7409 (set_reinsert_breakpoint): New.
7410 (reinsert_breakpoint_by_bp): Delete.
7411 (delete_reinsert_breakpoints): New.
7412 (uninsert_breakpoint): Rewrite.
7413 (uninsert_breakpoints_at): New.
7414 (reinsert_breakpoint): Rewrite.
7415 (reinsert_breakpoints_at): New.
7416 (check_breakpoints): Rewrite.
7417 (breakpoint_here): New.
7418 (breakpoint_inserted_here): New.
7419 (check_mem_read): Adjust.
7420 * mem-break.h (breakpoints_supported, breakpoint_here)
7421 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7422 (reinsert_breakpoint_by_bp): Delete declaration.
7423 (delete_reinsert_breakpoints): Declare.
7424 (reinsert_breakpoint): Delete declaration.
7425 (reinsert_breakpoints_at): Declare.
7426 (uninsert_breakpoint): Delete declaration.
7427 (uninsert_breakpoints_at): Declare.
7428 (check_breakpoints): Adjust prototype.
7429 * server.h: Adjust include order.
7430 (struct thread_info): Declare here. Add a `last_status' field.
7431
30ba68cb
MS
74322010-03-23 Michael Snyder <msnyder@vmware.com>
7433
7434 * server.c (crc32): New function.
7435 (handle_query): Add handling for 'qCRC:' request.
7436
b9a881c2
PA
74372010-03-23 Pedro Alves <pedro@codesourcery.com>
7438
7439 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7440 lwp had been stopped by a watchpoint.
7441
e92d13d5
PA
74422010-03-16 Pedro Alves <pedro@codesourcery.com>
7443
7444 * server.h (internal_error): Declare.
7445 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7446 * utils.c (internal_error): New function.
7447
64daa791
AS
74482010-03-15 Andreas Schwab <schwab@redhat.com>
7449
7450 * configure.srv: Fix typo setting srv_regobj.
7451
f52cd8cd
PA
74522010-03-15 Pedro Alves <pedro@codesourcery.com>
7453
7454 * linux-low.c (fetch_register): Avoid passing a non string literal
7455 format to `error'.
7456 (usr_store_inferior_registers): Ditto.
7457
93ae6fdc
PA
74582010-03-14 Pedro Alves <pedro@codesourcery.com>
7459
7460 * linux-low.c (linux_write_memory): Bail out early if peeking
7461 memory failed.
7462
c3adc08c
PA
74632010-03-14 Pedro Alves <pedro@codesourcery.com>
7464
7465 * linux-low.h (struct lwp_info): New fields
7466 `stopped_by_watchpoint' and `stopped_data_address'.
7467 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7468 here, and cache them in the lwp object.
7469 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7470 directly.
7471 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7472 field.
7473 (linux_stopped_by_watchpoint): Rewrite.
7474 (linux_stopped_data_address): Rewrite.
7475
bce522a2
PA
74762010-03-06 Simo Melenius <simo.melenius@iki.fi>
7477
7478 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7479 switching the current inferior, not before.
7480
90884b2b
L
74812010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7482
7483 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7484 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7485 i386-linux.c and amd64-linux.c.
7486 (reg-i386.o): Removed.
7487 (reg-i386.c): Likewise.
7488 (reg-i386-linux.o): Likewise.
7489 (reg-i386-linux.c): Likewise.
7490 (reg-x86-64.o): Likewise.
7491 (reg-x86-64.c): Likewise.
7492 (reg-x86-64-linux.o): Likewise.
7493 (reg-x86-64-linux.c): Likewise.
7494 (i386.o): New.
7495 (i386.c): Likewise.
7496 (i386-linux.o): Likewise.
7497 (i386-linux.c): Likewise.
7498 (amd64.o): Likewise.
7499 (amd64.c): Likewise.
7500 (amd64-linux.o): Likewise.
7501 (amd64-linux.c): Likewise.
7502
7503 * configure.srv (srv_i386_regobj): New.
7504 (srv_i386_linux_regobj): Likewise.
7505 (srv_amd64_regobj): Likewise.
7506 (srv_amd64_linux_regobj): Likewise.
7507 (srv_i386_32bit_xmlfiles): Likewise.
7508 (srv_i386_64bit_xmlfiles): Likewise.
7509 (srv_i386_xmlfiles): Likewise.
7510 (srv_amd64_xmlfiles): Likewise.
7511 (srv_i386_linux_xmlfiles): Likewise.
7512 (srv_amd64_linux_xmlfiles): Likewise.
7513 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7514 srv_xmlfiles to $srv_i386_xmlfiles.
7515 (i[34567]86-*-mingw32ce*): Likewise.
7516 (i[34567]86-*-mingw*): Likewise.
7517 (i[34567]86-*-nto*): Likewise.
7518 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7519 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7520 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7521 (x86_64-*-linux*): Likewise.
7522
7523 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7524 (init_registers_amd64_linux): New.
7525 (x86_arch_setup): Replace init_registers_x86_64_linux with
7526 init_registers_amd64_linux.
7527
193f13e6
MK
75282010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7529
7530 * configure.ac: Check for libdl. If it is not available link against
7531 static libthread_db.
7532 * configure: Regenerate.
7533
85d721b8
PA
75342010-02-22 Pedro Alves <pedro@codesourcery.com>
7535
7536 PR9605
7537
7538 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7539 handing a read watchpoint.
7540 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7541
6076632b
DE
75422010-02-12 Doug Evans <dje@google.com>
7543
7544 * linux-low.c (linux_supports_tracefork_flag): Document.
7545 (linux_look_up_symbols): Add comment.
7546
3327ccf7
L
75472010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7548
7549 * regcache.c (supply_register): Clear regcache if buf is NULL.
7550
0718675c 75512010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7552 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7553
7554 * inferiors.c (find_inferior): Add function documentation.
7555 (unloaded_dll): Handle the case where the unloaded dll has not
7556 been previously registered in the dll list.
7557
177321bd
DJ
75582010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7559
7560 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7561 (thumb2_breakpoint): New.
7562 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7563
2b009048
DJ
75642010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7565
7566 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7567 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7568 breakpoints.
7569
3be029c7
PA
75702010-01-21 Pedro Alves <pedro@codesourcery.com>
7571
7572 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7573
18f5de3b
JK
75742010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7575
7576 * linux-s390-low.c (s390_collect_ptrace_register)
7577 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7578
3743bb4f
DE
75792010-01-21 Doug Evans <dje@google.com>
7580
14ce3065
DE
7581 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7582 (PTRACE_ARG4_TYPE): New macro.
7583 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7584 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7585 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7586 (usr_store_inferior_registers): Ditto.
7587 (linux_read_memory, linux_write_memory): Ditto.
7588 (linux_test_for_tracefork): Ditto.
7589
3743bb4f
DE
7590 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7591 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7592
8b315be5
PA
75932010-01-21 Pedro Alves <pedro@codesourcery.com>
7594
7595 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7596 target.
7597
85492558
PA
75982010-01-21 Pedro Alves <pedro@codesourcery.com>
7599
7600 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7601 prototype to take a regcache. Adjust.
7602
442ea881
PA
76032010-01-20 Pedro Alves <pedro@codesourcery.com>
7604
7605 * regcache.h (struct thread_info): Forward declare.
7606 (struct regcache): New.
7607 (new_register_cache): Adjust prototype.
7608 (get_thread_regcache): Declare.
7609 (free_register_cache): Adjust prototype.
7610 (registers_to_string, registers_from_string): Ditto.
7611 (supply_register, supply_register_by_name, collect_register)
7612 (collect_register_as_string, collect_register_by_name): Ditto.
7613 * regcache.c (struct inferior_regcache_data): Delete.
7614 (get_regcache): Rename to ...
7615 (get_thread_regcache): ... this. Adjust. Switch inferior before
7616 fetching registers.
7617 (regcache_invalidate_one): Adjust.
7618 (regcache_invalidate): Fix prototype.
7619 (new_register_cache): Return the new register cache.
7620 (free_register_cache): Change prototype.
7621 (realloc_register_cache): Adjust.
7622 (registers_to_string): Change prototype to take a regcache. Adjust.
7623 (registers_from_string): Ditto.
7624 (register_data): Ditto.
7625 (supply_register): Ditto.
7626 (supply_register_by_name): Ditto.
7627 (collect_register): Ditto.
7628 (collect_register_as_string): Ditto.
7629 (collect_register_by_name): Ditto.
7630 * server.c (process_serial_event): Adjust.
7631 * linux-low.h (regset_fill_func, regset_store_func): Change
7632 prototype.
7633 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7634 Change prototype.
7635 * linux-low.c (get_stop_pc): Adjust.
7636 (check_removed_breakpoint): Adjust.
7637 (linux_wait_for_event): Adjust.
7638 (linux_resume_one_lwp): Adjust.
7639 (fetch_register): Add regcache parameter. Adjust.
7640 (usr_store_inferior_registers): Ditto.
7641 (regsets_fetch_inferior_registers): Ditto.
7642 (regsets_store_inferior_registers): Ditto.
7643 (linux_fetch_registers, linux_store_registers): Ditto.
7644 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7645 regcache. Adjust.
43aaf8b6
PA
7646 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7647 Ditto.
442ea881
PA
7648 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7649 prototype to take a regcache.
7650 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7651 * remote-utils.c (convert_ascii_to_int, outreg)
7652 (prepare_resume_reply): Change prototype to take a regcache.
7653 Adjust.
7654 * target.h (struct target_ops) <fetch_registers, store_registers>:
7655 Change prototype to take a regcache.
7656 (fetch_inferior_registers, store_inferior_registers): Change
7657 prototype to take a regcache. Adjust.
7658 * proc-service.c (ps_lgetregs): Adjust.
7659 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7660 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7661 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7662 take a regcache. Adjust.
7663 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7664 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7665 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7666 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7667 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7668 (cris_cannot_fetch_register):
7669 (cris_breakpoint_at): Change prototype to take a regcache.
7670 Adjust.
7671 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7672 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7673 to take a regcache. Adjust.
7674 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7675 Adjust.
7676 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7677 take a regcache. Adjust.
7678 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7679 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7680 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7681 * linux-mips-low.c (mips_get_pc):
7682 (mips_set_pc): Change prototype to take a regcache. Adjust.
7683 (mips_reinsert_addr): Adjust.
7684 (mips_collect_register): Change prototype to take a regcache.
7685 Adjust.
7686 (mips_supply_register):
7687 (mips_collect_register_32bit, mips_supply_register_32bit)
7688 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7689 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7690 * linux-ppc-low.c (ppc_supply_ptrace_register)
7691 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7692 (parse_spufs_run): Adjust.
7693 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7694 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7695 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7696 take a regcache. Adjust.
7697 * linux-s390-low.c (s390_collect_ptrace_register)
7698 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7699 (s390_set_pc): Change prototype to take a regcache. Adjust.
7700 (s390_arch_setup): Adjust.
7701 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7702 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7703 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7704 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7705 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7706 regcache. Adjust.
7707 (sparc_breakpoint_at): Adjust.
7708 * linux-xtensa-low.c (xtensa_fill_gregset):
7709 (xtensa_store_gregset):
7710 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7711 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7712 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7713 prototype to take a regcache. Adjust.
7714 * win32-arm-low.c (arm_fetch_inferior_register)
7715 (arm_store_inferior_register): Change prototype to take a
7716 regcache. Adjust.
7717 * win32-i386-low.c (i386_fetch_inferior_register)
7718 (i386_store_inferior_register): Change prototype to take a
7719 regcache. Adjust.
7720 * win32-low.c (child_fetch_inferior_registers)
7721 (child_store_inferior_registers): Change prototype to take a
7722 regcache. Adjust.
7723 (win32_wait): Adjust.
7724 (win32_fetch_inferior_registers): Change prototype to take a
7725 regcache. Adjust.
7726 (win32_store_inferior_registers): Adjust.
7727 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7728 store_inferior_register>: Change prototype to take a regcache.
7729
60c3d7b0
DE
77302010-01-20 Doug Evans <dje@google.com>
7731
7732 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7733 #ifdef.
7734 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7735 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7736
dc146f7c
VP
77372010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7738
7739 * linux-low.c (linux_core_of_thread): New.
7740 (compare_ints, show_process, list_threads): New.
7741 (linux_qxfer_osdata): Report threads and cores.
7742 (linux_target_op): Register linux_core_of_thread.
7743 * remote-utils.c (prepare_resume_reply): Report the core.
7744 (buffer_xml_printf): Support %d specifier.
7745 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7746 New.
7747 (handle_query): Handle qXfer:threads. Announce availability
7748 thereof.
7749 * target.h (struct target_ops): New field core_of_thread.
7750
7803799a
UW
77512010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7752
7753 * Makefile.in (clean): Remove new generated files.
7754 (reg-s390.o, reg-s390.c): Remove rules.
7755 (reg-s390x.o, reg-s390x.c): Likewise.
7756 (s390-linux32.o, s390-linux32.c): Add rules.
7757 (s390-linux64.o, s390-linux64.c): Likewise.
7758 (s390x-linux64.o, s390x-linux64.c): Likewise.
7759 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7760 * linux-s390-low.c: Include <elf.h>.
7761 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7762 (init_registers_s390): Remove prototype.
7763 (init_registers_s390x): Likewise.
7764 (init_registers_s390_linux32): Add prototype.
7765 (init_registers_s390_linux64): Likewise.
7766 (init_registers_s390x_linux64): Likewise.
7767 (s390_num_regs_3264): New define.
7768 (s390_regmap_3264): New global variable.
7769 (s390_cannot_fetch_register): Remove obsolete check.
7770 (s390_cannot_store_register): Likewise.
7771 (s390_collect_ptrace_register): Handle upper/lower register halves.
7772 (s390_supply_ptrace_register): Likewise.
7773 (s390_fill_gregset): Update to register number changes.
7774 (s390_get_hwcap): New routine.
7775 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7776 Install appropriate regmap and register set.
7777
6e7ffa39
JB
77782010-01-01 Joel Brobecker <brobecker@adacore.com>
7779
7780 * server.c (gdbserver_version): Update copyright year to 2010.
7781 * gdbreplay.c (gdbreplay_version): Likewise.
7782
957f3f49
DE
77832009-12-28 Doug Evans <dje@google.com>
7784
7785 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7786 elf/external.h. Include <elf.h> instead but only if necessary.
7787
ca5c370d
PA
77882009-12-28 Pedro Alves <pedro@codesourcery.com>
7789
7790 * linux-low.c (linux_remove_process): Remove `detaching'
7791 parameter. Don't release/detach from thread_db here.
7792 (linux_kill): Release/detach from thread_db here, ...
7793 (linux_detach): ... and here, before actually detaching.
7794 (linux_wait_1): ... and here, when a process exits.
7795 * thread-db.c (any_thread_of): New.
7796 (thread_db_free): Switch the current inferior to a thread of the
7797 passed in process.
7798
4ee62156
DE
77992009-12-21 Doug Evans <dje@google.com>
7800
d90e6a88
DE
7801 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7802
c5f62d5f
DE
7803 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7804 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7805 warning ifndef __NR_tkill. Move setting of errno there too.
7806 Delete unnecessary resetting of errno after syscall.
7807 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7808
10e86dd7
DE
7809 * configure.ac: Check for dladdr.
7810 * config.in: Regenerate.
7811 * configure: Regenerate.
7812 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7813 (try_thread_db_load): Update.
7814
4ee62156
DE
7815 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7816
00f515da
DE
78172009-12-18 Doug Evans <dje@google.com>
7818
e9464885
DE
7819 * event-loop.c: Include unistd.h if it exists.
7820
07d4f67e
DE
7821 * linux-low.c (my_waitpid): Move definition away from being in
7822 between linux_tracefork_child/linux_test_for_tracefork.
7823
00f515da
DE
7824 * gdb_proc_service.h (psaddr_t): Fix type.
7825 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7826 signature to match glibc.
7827
1de1badb
DE
78282009-12-16 Doug Evans <dje@google.com>
7829
7830 * linux-low.c (linux_read_memory): Fix argument to read.
7831
aeeb81d1
PA
78322009-11-26 Pedro Alves <pedro@codesourcery.com>
7833
7834 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7835 events, don't leave current_inferior pointing at null.
7836
10357975
PA
78372009-11-26 Pedro Alves <pedro@codesourcery.com>
7838
7839 * win32-low.c (LOG): Delete.
7840 (OUTMSG): Output to stderr.
7841 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7842 on compile time LOG macro.
7843 (win32_wait): Fix debug output.
7844
cf6e3471
PA
78452009-11-26 Pedro Alves <pedro@codesourcery.com>
7846
7847 * win32-low.c (win32_add_one_solib): If the dll name is
7848 "ntdll.dll", prepend the system directory to the dll path.
7849
0c85e18e
MK
78502009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7851
7852 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7853
9ac544ce 78542009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7855 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7856
7857 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7858 * configure.ac: Check for __mcoldfire__ and set
7859 gdb_cv_m68k_is_coldfire.
7860 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7861 reg-cf.o and reg-m68k.o.
7862 * configure: Regenerated.
7863
fd7dd3e6
PA
78642009-11-16 Pedro Alves <pedro@codesourcery.com>
7865
7866 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7867 Pass it to thread_db_free.
7868 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7869 proper `detaching' argument to linux_remove_process.
7870 * linux-low.h (thread_db_free): Add `detaching' parameter.
7871 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7872 to thread_db_free.
7873 (thread_db_free): Add `detaching' parameter. Only
7874 call td_ta_clear_event if detaching from process.
7875
75aa492e
MK
78762009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7877
7878 * thread-db.c (thread_db_free): Fix typo.
7879
21e1bee4
PP
78802009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7881
7882 PR gdb/10838
7883 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7884
8838b45e
NS
78852009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7886
7887 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7888 with an i686 compiler.
7889 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7890 needed.
7891 * configure: Rebuilt.
7892
8a35fb51
SL
78932009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7894
7895 PR gdb/10783
7896
7897 * server.c (handle_search_memory_1): Correct read_addr initialization
7898 in loop for searching subsequent chunks.
7899
96f15937
PP
79002009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7901
7902 * configure.ac: New --with-libthread-db option.
7903 * thread-db.c: Allow direct dependence on libthread_db.
7904 (thread_db_free): Adjust.
7905 * config.in: Regenerate.
7906 * configure: Likewise.
889bf7c5 7907
5f7d1694
PP
79082009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7909
7910 PR gdb/10757
7911 * thread-db.c (attach_thread): New function.
7912 (maybe_attach_thread): Return success/failure.
7913 (find_new_threads_callback): Adjust.
889bf7c5
PA
7914 (thread_db_find_new_threads): Loop until no new threads.
7915
88e3b899
PA
79162009-10-13 Pedro Alves <pedro@codesourcery.com>
7917
7918 * proc-service.c (ps_lgetregs): Formatting.
7919
cdbfd419
PP
79202009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7921
7922 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7923 * configure.ac: Adjust.
7924 * linux-low.h (struct process_info_private): Move members to struct
7925 thread_db.
7926 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7927 * linux-low.c (linux_remove_process): Adjust.
7928 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7929 * server.c (handle_query): Move code ...
7930 (handle_monitor_command): ... here. New function.
7931 * target.h (struct target_ops): New member.
7932 * thread-db.c (struct thread_db): New.
7933 (libthread_db_search_path): New variable.
7934 (thread_db_create_event, thread_db_enable_reporting)
7935 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7936 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7937 (try_thread_db_load_1, dladdr_to_soname): New functions.
7938 (try_thread_db_load, thread_db_load_search): New functions.
7939 (thread_db_init): Search for libthread_db.
7940 (thread_db_free): New function.
7941 (thread_db_handle_monitor_command): Likewise.
7942 * config.in: Regenerate.
7943 * configure: Regenerate.
889bf7c5 7944
4168d2d6
UW
79452009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7946
7947 * spu-low.c (spu_kill): Wait for inferior to terminate.
7948 Call clear_inferiors.
7949 (spu_detach): Call clear_inferiors.
7950
81ecdfbb
RW
79512009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7952
7953 * aclocal.m4: Regenerate.
7954 * config.in: Likewise.
7955 * configure: Likewise.
7956
0b9ff2c0
UW
79572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7958
7959 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7960 (parse_spufs_run): New function.
7961 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7962 (ppc_breakpoint_at): Handle SPU breakpoints.
7963
efcbbd14
UW
79642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7965
7966 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7967 (SPUFS_MAGIC): Define.
7968 (spu_enumerate_spu_ids): New function.
7969 (linux_qxfer_spu): New function.
7970 (linux_target_ops): Install linux_qxfer_spu.
7971
f4d9bade
UW
79722009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7973
7974 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7975 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7976 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7977 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7978 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7979 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7980 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7981 (init_registers_powerpc_cell32l): Add prototype.
7982 (init_registers_powerpc_cell64l): Likewise.
7983 (ppc_arch_setup): Detect Cell/B.E. architecture.
7984
96e946ca
RW
79852009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7986
7987 * Makefile.in (datarootdir): New variable.
7988
58d6951d
DJ
79892009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7990
7991 * linux-low.c (linux_write_memory): Update debugging output.
7992 * Makefile.in (clean): Add new descriptions.
7993 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7994 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7995 * configure.srv: Add new files for arm*-*-linux*.
7996 * linux-arm-low.c: Add new declarations.
7997 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7998 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7999 (HWCAP_VFPv3D16): New.
8000 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8001 instead of __IWMMXT__.
8002 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8003 (arm_arch_setup): New.
8004 (target_regsets): Remove #ifdef. Add VFP regset.
8005 (the_low_target): Use arm_arch_setup.
8006
12b42a12
DJ
80072009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8008
8009 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8010 the main thread again.
8011
ac8c974e
AR
80122009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8013
8014 Adding Neutrino gdbserver.
8015 * configure: Regenerated.
8016 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8017 * configure.srv (i[34567]86-*-nto*): New target.
8018 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8019 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8020 (nto_comctrl) [__QNX__]: New function.
8021 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8022
4424e0c3 80232009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8024
8025 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8026 srv_tgtobj.
8027
912cf4ba
PA
80282009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8029 Pedro Alves <pedro@codesourcery.com>
8030
8031 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8032 don't support CONTEXT_EXTENDED_REGISTERS.
8033 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8034 (the_low_target): Install them.
8035 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8036 failing with ERROR_PIPE_NOT_CONNECTED.
8037
aa5ca48f
DE
80382009-06-30 Doug Evans <dje@google.com>
8039 Pierre Muller <muller@ics.u-strasbg.fr>
8040
8041 Add h/w watchpoint support to x86-linux, win32-i386.
8042 * Makefile.in (SFILES): Add i386-low.c
8043 (i386_low_h): Define.
8044 (i386-low.o): Add dependencies.
8045 (linux-x86-low.o): Add i386-low.h dependency.
8046 (win32-i386-low.o): Ditto.
8047 * i386-low.c: New file.
8048 * i386-low.h: New file.
8049 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8050 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8051 * linux-low.c (linux_add_process): Initialize arch_private.
8052 (linux_remove_process): Free arch_private.
8053 (add_lwp): Initialize arch_private.
8054 (delete_lwp): Free arch_private.
8055 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8056 provided.
8057 * linux-low.h (process_info_private): New member arch_private.
8058 (lwp_info): New member arch_private.
8059 (linux_target_ops): New members new_process, new_thread,
8060 prepare_to_resume.
8061 (ptid_of): New macro.
8062 * linux-x86-low.c: Include stddef.h, i386-low.h.
8063 (arch_process_info): New struct.
8064 (arch_lwp_info): New struct.
8065 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8066 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8067 (i386_dr_low_get_status): New function.
8068 (x86_insert_point, x86_remove_point): New functions.
8069 (x86_stopped_by_watchpoint): New function.
8070 (x86_stopped_data_address): New function.
8071 (x86_linux_new_process, x86_linux_new_thread): New functions.
8072 (x86_linux_prepare_to_resume): New function.
8073 (the_low_target): Add entries for insert_point, remove_point,
8074 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8075 prepare_to_resume.
8076 * server.c (debug_hw_points): New global.
8077 (monitor_show_help): Document set debug-hw-points.
8078 (handle_query): Process "set debug-hw-points".
8079 * server.h (debug_hw_points): Declare.
8080 (paddress): Declare.
8081 * utils.c (NUMCELLS, CELLSIZE): New macros.
8082 (get_sell, xsnprintf, paddress): New functions.
8083 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8084 remove_point, stopped_by_watchpoint, stopped_data_address.
8085 * win32-i386-low.c: Include i386-low.h.
8086 (debug_reg_state): Replaces dr.
8087 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8088 (i386_dr_low_get_status): New function.
8089 (i386_insert_point, i386_remove_point): New functions.
8090 (i386_stopped_by_watchpoint): New function.
8091 (i386_stopped_data_address): New function.
8092 (i386_initial_stuff): Update.
8093 (get_thread_context,set_thread_context,i386_thread_added): Update.
8094 (the_low_target): Add entries for insert_point,
8095 remove_point, stopped_by_watchpoint, stopped_data_address.
8096 * win32-low.c (win32_insert_watchpoint): New function.
8097 (win32_remove_watchpoint): New function.
8098 (win32_stopped_by_watchpoint): New function.
8099 (win32_stopped_data_address): New function.
8100 (win32_target_ops): Add entries for insert_watchpoint,
8101 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8102 * win32-low.h (win32_target_ops): New members insert_point,
8103 remove_point, stopped_by_watchpoint, stopped_data_address.
8104
d993e290
PA
81052009-06-25 Pedro Alves <pedro@codesourcery.com>
8106
8107 * server.c (process_serial_event): Re-return unsupported, not
8108 error, if the type isn't recognized. Re-allow supporting only
8109 insert or remove packets. Also call require_running for
8110 breakpoints. Add missing break statement to default case. Tidy.
8111 * target.h (struct target_ops): Rename insert_watchpoint to
8112 insert_point, and remove_watchpoint to remove_point.
8113
8114 * linux-low.h (struct linux_target_ops): Likewise.
8115 * linux-low.c (linux_insert_watchpoint): Rename to ...
8116 (linux_insert_point): ... this. Adjust.
8117 (linux_remove_watchpoint): Rename to ...
8118 (linux_remove_point): ... this. Adjust.
8119 (linux_target_ops): Adjust.
8120 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8121 (cris_insert_point): ... this.
8122 (cris_remove_watchpoint): Rename to ...
8123 (cris_remove_point): ... this.
8124 (the_low_target): Adjust.
8125
0f54c268
PM
81262009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8127
8128 * server.c (handle_v_kill): Pass signal_pid to
8129 kill_inferior if multi_process is zero.
8130
c6314022
AR
81312009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8132
8133 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8134 * target.h (target_ops): Comment for *_watchpoint to make it clear
8135 the functions can get types '0' and '1'.
8136
4463ce24
AR
81372009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8138
8139 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8140 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8141 * regcache.c (get_regcache): Likewise.
8142 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8143 * win32-low.c (child_fetch_inferior_registers): Remove check for
8144 regno 0.
8145
cf8fd78b
PA
81462009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8147 Pedro Alves <pedro@codesourcery.com>
8148
8149 * target.h (struct target_ops) <supports_multi_process>: New
8150 callback.
8151 (target_supports_multi_process): New.
8152 * server.c (handle_query): Even if GDB reports support, only
8153 enable multi-process if the target also supports it. Report
8154 multi-process support only if the target backend supports it.
8155 * linux-low.c (linux_supports_multi_process): New function.
8156 (linux_target_ops): Install it as target_supports_multi_process
8157 callback.
8158
47c0c975
DE
81592009-05-24 Doug Evans <dje@google.com>
8160
e09875d4
DE
8161 Global renaming of find_thread_pid to find_thread_ptid.
8162 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8163 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8164 All callers updated.
8165
e27d73f6
DE
8166 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8167 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8168 directly.
8169
47c0c975
DE
8170 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8171 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8172 (linux_resume_one_lwp): Ditto.
8173
2acc282a
DE
81742009-05-23 Doug Evans <dje@google.com>
8175
8176 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8177 from struct inferior_list_entry * to struct lwp_info *.
8178 All callers updated.
8179
9f1036c1
DE
81802009-05-13 Doug Evans <dje@google.com>
8181
8182 * linux-x86-low.c: Don't include assert.h.
8183 (x86_siginfo_fixup): Use fatal, not assert.
8184 (x86_arch_setup): Fix comment.
8185
d0722149
DE
81862009-05-12 Doug Evans <dje@google.com>
8187
8188 Biarch support for i386/amd64 gdbserver.
8189 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8190 Add linux-x86-low.c.
8191 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8192 (linux-x86-low.o): Add.
8193 * linux-x86-64-low.c: Delete.
8194 * linux-i386-low.c: Delete.
8195 * linux-x86-low.c: New file.
8196 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8197 linux-x86-low.o.
8198 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8199 linux-x86-low.o.
8200 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8201 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8202 (linux_child_pid_to_exec_file): New function.
8203 (elf_64_header_p, elf_64_file_p): New functions.
8204 (siginfo_fixup): New function.
8205 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8206 give target a chance to convert layout.
8207 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8208 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8209
fdeb2a12
DE
82102009-05-07 Doug Evans <dje@google.com>
8211
8212 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8213 (regsets_store_inferior_registers): Ditto.
8214
a6dbe5df
PA
82152009-05-06 Pedro Alves <pedro@codesourcery.com>
8216
8217 PR server/10048
8218
8219 * linux-low.c (must_set_ptrace_flags): Delete.
8220 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8221 of the global.
8222 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8223 `lwp->must_set_ptrace_flags' instead.
ba42693b 8224 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8225 (linux_wait_1): ... not here.
8226
5091eb23
DE
82272009-04-30 Doug Evans <dje@google.com>
8228
9f767825
DE
8229 * inferiors.c (started_inferior_callback): New function.
8230 (attached_inferior_callback): New function.
8231 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8232 * server.c (print_started_pid, print_attached_pid): New functions.
8233 (detach_or_kill_for_exit): New function.
8234 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8235 * server.h (have_started_inferiors_p): Declare.
8236 (have_attached_inferiors_p): Declare.
8237
5091eb23
DE
8238 * inferiors.c (remove_process): Fix memory leak, free process.
8239 * linux-low.c (linux_remove_process): New function.
8240 (linux_kill): Call it instead of remove_process.
8241 (linux_detach, linux_wait_1): Ditto.
8242
155c8968
PA
82432009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8244
8245 * configure.srv: Add x86 Windows CE target.
8246
7fe519cb
UW
82472009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8248
8249 * inferiors.c (get_thread_process): Make global.
8250 * server.h (get_thread_process): Add prototype.
8251 * thread-db.c (find_one_thread): Use get_thread_process
8252 instead of current_process.
8253 (thread_db_get_tls_address): Do not crash if called when
8254 thread layer is not yet initialized.
8255
5472f405
UW
82562009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8257
8258 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8259 * spu-low.c (current_tid): Rename to ...
8260 (current_ptid): ... this.
8261 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8262 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8263 ptid_get_lwp (current_ptid) instead of current_tid.
8264 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8265 instead of current_tid. Use find_process_pid to verify pid
8266 argument is valid. Pass proper argument to remove_process.
8267 (spu_thread_alive): Compare current_ptid instead of current_tid.
8268 (spu_resume): Likewise.
8269
55ac2b99
PA
82702009-04-02 Pedro Alves <pedro@codesourcery.com>
8271
8272 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8273 variable.
8274
95954743
PA
82752009-04-01 Pedro Alves <pedro@codesourcery.com>
8276
8277 Implement the multiprocess extensions, and add linux multiprocess
8278 support.
8279
8280 * server.h (ULONGEST): Declare.
8281 (struct ptid, ptid_t): New.
8282 (minus_one_ptid, null_ptid): Declare.
8283 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8284 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8285 (struct inferior_list_entry): Change `id' type from unsigned from
8286 to ptid_t.
8287 (struct sym_cache, struct breakpoint, struct
8288 process_info_private): Forward declare.
8289 (struct process_info): Declare.
8290 (current_process): Declare.
8291 (all_processes): Declare.
8292 (initialize_inferiors): Declare.
8293 (add_thread): Adjust to use ptid_t.
8294 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8295 (add_process, remove_process, find_thread_pid): Declare.
8296 (find_inferior_id): Adjust to use ptid_t.
8297 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8298 (multi_process): Declare.
8299 (push_event): Adjust to use ptid_t.
8300 (read_ptid, write_ptid): Declare.
8301 (prepare_resume_reply): Adjust to use ptid_t.
8302 (clear_symbol_cache): Declare.
8303 * inferiors.c (all_processes): New.
8304 (null_ptid, minus_one_ptid): New.
8305 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8306 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8307 (add_thread): Change unsigned long to ptid. Remove gdb_id
8308 parameter. Adjust.
8309 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8310 (gdb_id_to_thread): Rename to ...
8311 (find_thread_pid): ... this. Change unsigned long to ptid.
8312 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8313 (loaded_dll, pull_pid_from_list): Adjust.
8314 (add_process, remove_process, find_process_pid)
8315 (get_thread_process, current_process, initialize_inferiors): New.
8316 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8317 (struct target_waitstatus) <related_pid>: Ditto.
8318 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8319 return type to int.
8320 (struct target_ops) <join>: Add `pid' argument.
8321 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8322 (struct target_ops) <wait>: Add `ptid' field. Change return type
8323 to ptid.
8324 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8325 (mywait): Add `ptid' argument. Change return type to ptid_t.
8326 (target_pid_to_str): Declare.
8327 * target.c (set_desired_inferior): Adjust to use ptids.
8328 (mywait): Add new `ptid' argument. Adjust.
8329 (target_pid_to_str): New.
8330 * mem-break.h (free_all_breakpoints): Declare.
8331 * mem-break.c (breakpoints): Delelete.
8332 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8333 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8334 to use per-process breakpoint list.
8335 (free_all_breakpoints): New.
8336 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8337 (symbol_cache, all_symbols_looked_up): Delete.
8338 (hexchars): New.
8339 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8340 read_ptid): New.
8341 (prepare_resume_reply): Change ptid argument's type from unsigned
8342 long to ptid_t. Adjust. Implement W;process and X;process.
8343 (free_sym_cache, clear_symbol_cache): New.
8344 (look_up_one_symbol): Adjust to per-process symbol cache. *
8345 * server.c (cont_thread, general_thread, step_thread): Change type
8346 to ptid_t.
8347 (attached): Delete.
8348 (multi_process): New.
8349 (last_ptid): Change type to ptid_t.
8350 (struct vstop_notif) <ptid>: Change type to ptid_t.
8351 (queue_stop_reply, push_event): Change `ptid' argument's type to
8352 ptid_t.
8353 (discard_queued_stop_replies): Add `pid' argument.
8354 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8355 changes. Don't reference the `attached' global.
8356 (attach_inferior): Adjust to mywait interface changes.
8357 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8358 features. Handle and report "multiprocess+". Handle
8359 "qAttached:PID".
8360 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8361 changes.
8362 (handle_v_kill): New.
8363 (handle_v_stopped): Adjust to use target_pid_to_str.
8364 (handle_v_requests): Allow multiple attaches and runs when
8365 multiprocess extensions are in effect. Handle "vKill".
8366 (myresume): Adjust to use ptids.
8367 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8368 (handle_status): Adjust to discard_queued_stop_replies interface
8369 change.
8370 (first_thread_of, kill_inferior_callback)
8371 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8372 (main): Call initialize_inferiors. Adjust to use ptids, killing
8373 and detaching from all inferiors. Handle multiprocess packet
8374 variants.
8375 * linux-low.h: Include gdb_proc_service.h.
8376 (struct process_info_private): New.
8377 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8378 <lwpid_of>: Use ptid_get_lwp.
8379 (get_lwp_thread): Adjust.
8380 (struct lwp_info): Add `dead' member.
8381 (find_lwp_pid): Declare.
8382 * linux-low.c (thread_db_active): Delete.
8383 (new_inferior): Adjust comment.
8384 (inferior_pid): Delete.
8385 (linux_add_process): New.
8386 (handle_extended_wait): Adjust.
8387 (add_lwp): Change unsigned long to ptid.
8388 (linux_create_inferior): Add process to processes table. Adjust
8389 to use ptids. Don't set new_inferior here.
8390 (linux_attach_lwp): Rename to ...
8391 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8392 it. Adjust to use ptids.
8393 (linux_attach_lwp): New.
8394 (linux_attach): Add process to processes table. Don't set
8395 new_inferior here.
8396 (struct counter): New.
8397 (second_thread_of_pid_p, last_thread_of_process_p): New.
8398 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8399 multiple processes.
8400 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8401 processes. Remove process from process table.
8402 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8403 to multiple processes.
8404 (any_thread_of): New.
8405 (linux_detach): Add `pid' argument, and handle it. Remove process
8406 from processes table.
8407 (linux_join): Add `pid' argument. Handle it.
8408 (linux_thread_alive): Change unsighed long argument to ptid_t.
8409 Consider dead lwps as not being alive.
8410 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8411 threads we're not interested in.
8412 (same_lwp, find_lwp_pid): New.
8413 (linux_wait_for_lwp): Change `pid' argument's type from int to
8414 ptid_t. Adjust.
8415 (linux_wait_for_event): Rename to ...
8416 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8417 from int to ptid_t. Adjust.
8418 (linux_wait_for_event): New.
8419 (linux_wait_1): Add `ptid' argument. Change return type to
8420 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8421 that exit from the process table.
8422 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8423 Adjust.
8424 (mark_lwp_dead): New.
8425 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8426 stopping all threads, mark its main lwp as dead.
8427 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8428 ptids.
8429 (fetch_register, usr_store_inferior_registers)
8430 (regsets_fetch_inferior_registers)
8431 (regsets_store_inferior_registers, linux_read_memory)
8432 (linux_write_memory): Inline `inferior_pid'.
8433 (linux_look_up_symbols): Adjust to use per-process
8434 `thread_db_active'.
8435 (linux_request_interrupt): Adjust to use ptids.
8436 (linux_read_auxv): Inline `inferior_pid'.
8437 (initialize_low): Don't reference thread_db_active.
8438 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8439 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8440 (ps_getpid): Return the pid of the current inferior.
8441 * thread-db.c (proc_handle, thread_agent): Delete.
8442 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8443 per-process data.
8444 (find_one_thread): Change argument type to ptid_t. Adjust to
8445 per-process data.
8446 (maybe_attach_thread): Adjust to per-process data and ptids.
8447 (thread_db_find_new_threads): Ditto.
8448 (thread_db_init): Ditto.
8449 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8450 processes table. Adjust to use ptids.
8451 (spu_kill, spu_detach): Adjust interface. Remove process from
8452 processes table.
8453 (spu_join, spu_thread_alive): Adjust interface.
8454 (spu_wait): Adjust interface. Remove process from processes
8455 table. Adjust to use ptids.
8456 * win32-low.c (current_inferior_tid): Delete.
8457 (current_inferior_ptid): New.
8458 (debug_event_ptid): New.
8459 (thread_rec): Take a ptid. Adjust.
8460 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8461 (child_delete_thread): Ditto.
8462 (do_initial_child_stuff): Add `attached' argument. Add process to
8463 processes table.
8464 (child_fetch_inferior_registers, child_store_inferior_registers):
8465 Adjust.
8466 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8467 (win32_attach): Pass 1 to do_initial_child_stuff.
8468 (win32_kill): Adjust interface. Remove process from processes
8469 table.
8470 (win32_detach): Ditto.
8471 (win32_join): Adjust interface.
8472 (win32_thread_alive): Take a ptid.
8473 (win32_resume): Adjust to use ptids.
8474 (get_child_debug_event): Ditto.
8475 (win32_wait): Adjust interface. Remove exiting process from
8476 processes table.
8477
bd99dc85
PA
84782009-04-01 Pedro Alves <pedro@codesourcery.com>
8479
8480 Non-stop mode support.
8481
8482 * server.h (non_stop): Declare.
8483 (gdb_client_data, handler_func): Declare.
8484 (delete_file_handler, add_file_handler, start_event_loop):
8485 Declare.
8486 (handle_serial_event, handle_target_event, push_event)
8487 (putpkt_notif): Declare.
8488 * target.h (enum resume_kind): New.
8489 (struct thread_resume): Replace `step' field by `kind' field.
8490 (TARGET_WNOHANG): Define.
8491 (struct target_ops) <wait>: Add `options' argument.
8492 <supports_non_stop, async, start_non_stop>: New fields.
8493 (target_supports_non_stop, target_async): New.
8494 (start_non_stop): Declare.
8495 (mywait): Add `options' argument.
8496 * target.c (mywait): Add `options' argument. Print child exit
8497 notifications here.
8498 (start_non_stop): New.
8499 * server.c (non_stop, own_buf, mem_buf): New globals.
8500 (struct vstop_notif): New.
8501 (notif_queue): New global.
8502 (queue_stop_reply, push_event, discard_queued_stop_replies)
8503 (send_next_stop_reply): New.
8504 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8505 interface changes.
8506 (attach_inferior): In non-stop mode, don't wait for the target
8507 here.
8508 (handle_general_set): Handle QNonStop.
8509 (handle_query): When handling qC, return the current general
8510 thread, instead of the first thread of the list.
8511 (handle_query): If the backend supports non-stop mode, include
8512 QNonStop+ in the qSupported query response.
8513 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8514 and non-stop mode.
8515 (handle_v_attach, handle_v_run): Handle non-stop mode.
8516 (handle_v_stopped): New.
8517 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8518 (myresume): Adjust to use resume_kind. Handle non-stop.
8519 (queue_stop_reply_callback): New.
8520 (handle_status): Handle non-stop mode.
8521 (main): Clear non_stop flag on reconnection. Use the event-loop.
8522 Refactor serial protocol handling from here ...
8523 (process_serial_event): ... to this new function. When GDB
8524 selects any thread, select one here. In non-stop mode, wait until
8525 GDB acks all pending events before exiting.
8526 (handle_serial_event, handle_target_event): New.
8527 * remote-utils.c (remote_open): Install remote_desc in the event
8528 loop.
8529 (remote_close): Remove remote_desc from the event loop.
8530 (putpkt_binary): Rename to...
8531 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8532 (putpkt_binary): New as wrapper around putpkt_binary_1.
8533 (putpkt_notif): New.
8534 (prepare_resume_reply): In non-stop mode, don't change the
8535 general_thread.
8536 * event-loop.c: New.
8537 * Makefile.in (OBJ): Add event-loop.o.
8538 (event-loop.o): New rule.
8539
8540 * linux-low.h (pid_of): Moved here.
8541 (lwpid_of): New.
8542 (get_lwp_thread): Use lwpid_of.
8543 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8544 * linux-low.c (pid_of): Delete.
8545 (inferior_pid): Use lwpid_of.
8546 (linux_event_pipe): New.
8547 (target_is_async_p): New.
8548 (delete_lwp): New.
8549 (handle_extended_wait): Use lwpid_of.
8550 (add_lwp): Don't set lwpid field.
8551 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8552 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8553 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8554 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8555 first. Adjust to linux_wait_for_event interface changes. Use
8556 lwpid_of.
8557 (linux_detach): Don't delete the main lwp here.
8558 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8559 (status_pending_p): Don't consider explicitly suspended lwps.
8560 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8561 pointer. Add OPTIONS argument. Change return type to int. Use
8562 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8563 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8564 pointer. Add status pointer argument. Return a pid instead of a
8565 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8566 changes. In non-stop mode, don't switch to a random thread.
8567 (linux_wait): Rename to...
8568 (linux_wait_1): ... this. Add target_options argument, and handle
8569 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8570 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8571 clean exit and signal exit code. Don't stop all threads in
8572 non-stop mode. In all-stop mode, only stop all threads when
8573 reporting a stop to GDB. Handle explicit thread stop requests.
8574 (async_file_flush, async_file_mark): New.
8575 (linux_wait): New.
8576 (send_sigstop): Use lwpid_of.
8577 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8578 interface changes. In non-stop mode, don't switch to a random
8579 thread.
8580 (linux_resume_one_lwp): Use lwpid_of.
8581 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8582 (linux_resume_one_thread): ... this. Handle resume_stop. In
8583 non-stop mode, don't look for pending flag in all threads.
8584 (resume_status_pending_p): Don't consider explicitly suspended
8585 threads.
8586 (my_waitpid): Reimplement. Emulate __WALL.
8587 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8588 Use lwpid_of.
8589 (sigchld_handler, linux_supports_non_stop, linux_async)
8590 (linux_start_non_stop): New.
8591 (linux_target_ops): Register linux_supports_non_stop, linux_async
8592 and linux_start_non_stop.
8593 (initialize_low): Install SIGCHLD handler.
8594 * thread-db.c (thread_db_create_event, find_one_thread)
8595 (thread_db_get_tls_address): Use lwpid_of.
8596 * win32-low.c (win32_detach): Adjust to use resume_kind.
8597 (win32_wait): Add `options' argument.
8598 * spu-low.c (spu_resume): Adjust to use resume_kind.
8599 (spu_wait): Add `options' argument.
8600
5b1c542e
PA
86012009-04-01 Pedro Alves <pedro@codesourcery.com>
8602
8603 Decouple target code from remote protocol.
8604
8605 * target.h (enum target_waitkind): New.
8606 (struct target_waitstatus): New.
8607 (struct target_ops) <wait>: Return an unsigned long. Take a
8608 target_waitstatus pointer instead of a char pointer.
8609 (mywait): Likewise.
8610 * target.c (mywait): Change prototype to return an unsigned long.
8611 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8612 * server.h (thread_from_wait, old_thread_from_wait): Delete
8613 declarations.
8614 (prepare_resume_reply): Change prototype to take a
8615 target_waitstatus.
8616 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8617 (last_status, last_ptid): New.
8618 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8619 pid instead of a signal.
8620 (attach_inferior): Remove "status" and "signal" parameters.
8621 Adjust.
8622 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8623 not as an address.
8624 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8625 (handle_v_requests, myresume): Remove "status" and "signal"
8626 parameters. Adjust.
8627 (handle_status): New.
8628 (main): Delete local `status'. Adjust.
8629 * remote-utils.c: Include target.h.
8630 (prepare_resume_reply): Change prototype to take a
8631 target_waitstatus. Adjust.
8632
8633 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8634 interface.
8635 * spu-low.c (spu_wait): Adjust.
8636 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8637 Delete.
8638 (win32_wait): Adjust.
8639
2bd7c093
PA
86402009-04-01 Pedro Alves <pedro@codesourcery.com>
8641
8642 * target.h (struct thread_resume): Delete leave_stopped member.
8643 (struct target_ops): Add a `n' argument to the `resume' callback.
8644 * server.c (start_inferior): Adjust.
8645 (handle_v_cont, myresume): Adjust.
8646 * linux-low.c (check_removed_breakpoint): Adjust to resume
8647 interface change, and to removed leave_stopped field.
8648 (resume_ptr): Delete.
8649 (struct thread_resume_array): New.
8650 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8651 resume interface change.
8652 (linux_continue_one_thread, linux_queue_one_thread)
8653 (resume_status_pending_p): Check if the resume field is NULL
8654 instead of checking the leave_stopped member.
8655 (linux_resume): Adjust to the target resume interface change.
8656 * spu-low.c (spu_resume): Adjust to the target resume interface
8657 change.
8658 * win32-low.c (win32_detach, win32_resume): Ditto.
8659
c35fafde
PA
86602009-04-01 Pedro Alves <pedro@codesourcery.com>
8661
8662 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8663 flag.
8664 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8665 pending.
8666 (linux_continue_one_thread): Only preserve the stepping flag if
8667 there's a pending breakpoint.
8668
0a59d50b
PA
86692009-03-31 Pedro Alves <pedro@codesourcery.com>
8670
8671 * server.c (main): After the inferior having exited, call
8672 remote_close before exiting gdbserver.
8673
f04c6d38
TJB
86742009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8675
8676 Fix size of FPSCR in Power 7 processors.
8677 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8678 (PPC_FEATURE_HAS_DFP): New #define.
8679 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8680 size of the FPSCR.
8681
78e5cee6
PA
86822009-03-23 Pedro Alves <pedro@codesourcery.com>
8683
8684 * server.c (handle_query) Whitespace and formatting.
8685
1b3f6016
PA
86862009-03-22 Pedro Alves <pedro@codesourcery.com>
8687
8688 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8689 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8690 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8691 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8692 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8693 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8694 Makefile.in, configure.ac: Fix whitespace throughout.
8695 * configure: Regenerate.
8696
a07b2135
PA
86972009-03-22 Pedro Alves <pedro@codesourcery.com>
8698
8699 * inferiors.c (find_inferior): Make it safe for the callback
8700 function to delete the currently iterated inferior.
8701
67cc2626
PA
87022009-03-22 Pedro Alves <pedro@codesourcery.com>
8703
8704 * Makefile.in (linuw_low_h): Move higher.
8705 (thread-db.o): Depend on $(linux_low_h).
8706
54a0b537
PA
87072009-03-17 Pedro Alves <pedro@codesourcery.com>
8708
8709 Rename "process" to "lwp" throughout.
8710
8711 * linux-low.c (all_processes): Rename to...
8712 (all_lwps): ... this.
8713 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8714 (add_process): Rename to ...
8715 (add_lwp): ... this. Adjust.
8716 (linux_create_inferior): Adjust.
8717 (linux_attach_lwp): Adjust.
8718 (linux_attach): Adjust.
8719 (linux_kill_one_process): Rename to ...
8720 (linux_kill_one_lwp): ... this. Adjust.
8721 (linux_kill): Adjust.
8722 (linux_detach_one_process): Rename to ...
8723 (linux_detach_one_lwp): ... this. Adjust.
8724 (linux_detach): Adjust.
8725 (check_removed_breakpoint): Adjust.
8726 (status_pending_p): Adjust.
8727 (linux_wait_for_process): Rename to ...
8728 (linux_wait_for_lwp): ... this. Adjust.
8729 (linux_wait_for_event): Adjust.
8730 (send_sigstop): Adjust.
8731 (wait_for_sigstop): Adjust.
8732 (stop_all_processes): Rename to ...
8733 (stop_all_lwps): ... this.
8734 (linux_resume_one_process): Rename to ...
8735 (linux_resume_one_lwp): ... this. Adjust.
8736 (linux_set_resume_request, linux_continue_one_thread)
8737 (linux_queue_one_thread, resume_status_pending_p)
8738 (usr_store_inferior_registers, regsets_store_inferior_registers)
8739 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8740 Adjust.
8741 * linux-low.h (get_process): Rename to ...
8742 (get_lwp): ... this. Adjust.
8743 (get_thread_process): Rename to ...
8744 (get_thread_lwp): ... this. Adjust.
8745 (get_process_thread): Rename to ...
8746 (get_lwp_thread): ... this. Adjust.
8747 (struct process_info): Rename to ...
8748 (struct lwp_info): ... this.
8749 (all_processes): Rename to ...
8750 (all_lwps): ... this.
8751 * proc-service.c (ps_lgetregs): Adjust.
8752 * thread-db.c (thread_db_create_event, find_one_thread)
8753 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8754
0b16c5cf
PA
87552009-03-14 Pedro Alves <pedro@codesourcery.com>
8756
8757 * server.c (handle_query): Handle "qAttached".
8758
32de4b9d
NS
87592009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8760
8761 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8762 GPLv3, update license URL.
8763
2aecd87f
DE
87642009-03-01 Doug Evans <dje@google.com>
8765
93efd302 8766 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8767 (server_h): Add gdb_signals.h.
8768 (signals.o): Update.
8769 * server.h (target_signal_from_host,target_signal_to_host_p)
8770 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8771
86b1f9c5
PM
87722009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8773
8774 * remote-utils.c (getpkt): Also generate remote-debug
8775 information if noack_mode is set.
8776
4aa995e1
PA
87772009-02-06 Pedro Alves <pedro@codesourcery.com>
8778
8779 * server.c (handle_query): Report qXfer:siginfo:read and
8780 qXfer:siginfo:write as supported and handle them.
8781 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8782 * linux-low.c (linux_xfer_siginfo): New.
8783 (linux_target_ops): Set it.
8784
62709adf
PA
87852009-01-26 Pedro Alves <pedro@codesourcery.com>
8786
8787 * server.c (gdbserver_usage): Mention --remote-debug.
8788 (main): Accept '--remote-debug' switch.
8789
aef93bd7
DE
87902009-01-18 Doug Evans <dje@google.com>
8791
8792 * regcache.c (new_register_cache): No need to check result of xcalloc.
8793 * server.c (handle_search_memory): Back out calls to xmalloc,
8794 result is checked and error is returned to user upon failure.
8795 (handle_query): Ditto. Add more checks for result of malloc.
8796 (handle_v_cont): Check result of malloc, report error back to
8797 user upon failure.
8798 (handle_v_run): Ditto. Call freeargv.
8799 * server.h (freeargv): Declare.
8800 * utils.c (freeargv): New fn.
8801
54363045
DE
88022009-01-15 Doug Evans <dje@google.com>
8803
f626972c
DE
8804 * gdbreplay.c (perror_with_name): Make arg const char *.
8805 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8806 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8807 * utils.c (perror_with_name): Make arg const char *.
54363045 8808
18aae699
PA
88092009-01-14 Pedro Alves <pedro@codesourcery.com>
8810
8811 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8812 when handling a EXIT_PROCESS_DEBUG_EVENT.
8813
ff703abe
JB
88142009-01-06 Joel Brobecker <brobecker@adacore.com>
8815
8816 * gdbreplay.c (gdbreplay_version): Update copyright year.
8817 * server.c (gdbserver_version): Likewise.
8818
f21cc1a2 88192009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8820
8821 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8822 (handle_extended_wait): Improve comment.
0e21c1ec 8823
bca929d3
DE
88242008-12-13 Doug Evans <dje@google.com>
8825
8826 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8827 * server.h (ATTR_MALLOC): New macro.
8828 (xmalloc,xcalloc,xstrdup): Declare.
8829 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8830 * inferiors.c: Ditto.
8831 * linux-low.c: Ditto.
8832 * mem-break.c: Ditto.
8833 * regcache.c: Ditto.
8834 * remote-utils.c: Ditto.
8835 * server.c: Ditto.
8836 * target.c: Ditto.
8837 * win32-low.c: Ditto.
8838
97438e3f
DE
88392008-12-12 Doug Evans <dje@google.com>
8840
896c7fbb
DE
8841 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8842 in debugging printf.
8843
97438e3f
DE
8844 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8845
e3b886f8
DE
88462008-12-09 Doug Evans <dje@google.com>
8847
8848 * linux-low.h (struct process_info): Delete member tid, unused.
8849 * thread-db.c (find_one_thread): Update.
8850 (maybe_attach_thread): Update.
8851
07e059b5
VP
88522008-12-02 Pedro Alves <pedro@codesourcery.com>
8853
889bf7c5
PA
8854 * target.h (struct target_ops): Add qxfer_osdata member.
8855 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8856 and dirent.h.
8857 (linux_qxfer_osdata): New functions.
8858 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8859 callback.
8860 * server.c (handle_query): Handle "qXfer:osdata:read:".
8861 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8862 (buffer_xml_printf): New functions.
8863 * server.h (struct buffer): New.
8864 (buffer_grow_str, buffer_grow_str0): New macros.
8865 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8866 (buffer_xml_printf): Declare.
07e059b5 8867
4cab47ab
DE
88682008-11-24 Doug Evans <dje@google.com>
8869
8870 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8871
f142445f
DJ
88722008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8873
8874 * server.c (handle_v_run): Always use the supplied argument list.
8875
d0107bb6 88762008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8877
d0107bb6
BW
8878 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8879 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8880
2c4ad781
TJB
88812008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8882
8883 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8884 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8885 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8886 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8887 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8888 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8889 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8890 XML target descriptions.
8891 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8892 when inferior is running on an ISA 2.05 or later processor. Add
8893 special case to return offset for full 64-bit slot of FPSCR when
8894 in 32-bits.
8895
dfb64f85
DJ
88962008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8897
8898 * Makefile.in (SFILES, clean): Added sparc64 files.
8899 (reg-sparc64.o, reg-sparc64.c): New.
8900 * configure.srv (sparc*-*-linux*): New configuration.
8901 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8902 syscall arguments for SPARC.
8903 (regsets_store_inferior_registers): Likewise.
8904 * linux-sparc-low.c: New file.
8905
66b6e1dd
DE
89062008-10-21 Doug Evans <dje@google.com>
8907
8908 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8909 (READLINE_DIR,READLINE_DEP): Delete.
8910 (INTERNAL_CFLAGS): Update.
8911 (LINTFLAGS): Update.
8912
9b710a42
PA
89132008-10-10 Pedro Alves <pedro@codesourcery.com>
8914
8915 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8916 whole argv from the last run, not just argv[0].
8917
5822d809
PA
89182008-09-08 Pedro Alves <pedro@codesourcery.com>
8919
8920 * regcache.c (new_register_cache): Return NULL if the register
8921 cache size isn't known yet.
8922 (free_register_cache): Avoid dereferencing a NULL regcache.
8923
74aac56f
DJ
89242008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8925
8926 * configure.srv: Merge MIPS and MIPS64.
8927
400b20f5
MR
89282008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8929
8930 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8931
677c5bb1
LM
89322008-08-18 Luis Machado <luisgpm@br.ibm.com>
8933
8934 * Makefile.in: Add required vsx dependencies.
8935
8936 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8937 Declare init_registers_powerpc_vsx32l.
8938 Declare init_registers_powerpc_vsx64l.
8939 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8940 (ppc_arch_setup): Check for VSX in hwcap.
8941 (ppc_fill_vsxregset): New function.
8942 (ppc_store_vsxregset): New function.
8943 Add new VSX entry in regset_info target_regsets.
8944
8945 * configure.srv: Add new VSX dependencies.
8946
a6f3e723
SL
89472008-08-12 Pedro Alves <pedro@codesourcery.com>
8948
8949 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8950 (remote_open): Set or clear transport_is_reliable.
8951 (putpkt_binary): Don't expect acks in noack mode.
8952 (getpkt): Don't send ack/nac in noack mode.
8953 * server.c (handle_general_set): Handle QStartNoAckMode.
8954 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8955 qSupported.
8956 (main): Reset noack_mode on every connection.
8957 * server.h (noack_mode): Declare.
8958
a417dc56
RW
89592008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8960
8961 * Makefile.in (GDBREPLAY_OBS): New variable.
8962 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8963
3221518c
UW
89642008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8965 Daniel Jacobowitz <dan@codesourcery.com>
8966
8967 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8968 (usr_store_inferior_registers): Likewise.
8969 (regsets_store_inferior_registers): Likewise.
8970
ec56be1b
PA
89712008-07-31 Rolf Jansen <rj@surtec.com>
8972 Pedro Alves <pedro@codesourcery.com>
8973
8974 * configure.ac: Check for memmem declaration.
8975 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8976 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8977 (disable_packet_qfThreadInfo): Unconditionally compile.
8978 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8979 * configure, config.in: Regenerate.
8980
2fe5e3ff
DE
89812008-07-28 Doug Kwan <dougkwan@google.com>
8982
8983 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8984 (linux_write_memory): Remove declaration of errno.
8985
836acd6d
UW
89862008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8987
8988 * linux-low.c (handle_extended_wait): Do not use "status"
8989 variable uninitialized.
8990
aeba519e
PA
89912008-07-07 Pedro Alves <pedro@codesourcery.com>
8992
8993 * server.c (handle_v_attach): Inhibit reporting dll changes.
8994
db42f210
PA
89952008-06-27 Pedro Alves <pedro@codesourcery.com>
8996
8997 * remote-utils.c (prepare_resume_reply): If requested, don't
8998 output "thread:TID" in the T stop reply.
8999
9000 * server.c (disable_packet_vCont, disable_packet_Tthread)
9001 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9002 (handle_query): If requested, disable support for qC, qfThreadInfo
9003 and qsThreadInfo.
9004 (handle_v_requests): If requested, disable support for vCont.
9005 (gdbserver_show_disableable): New.
9006 (main): Handle --disable-packet and --disable-packet=LIST.
9007
9008 * server.h (disable_packet_vCont, disable_packet_Tthread)
9009 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9010
8e4c5421
CD
90112008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9012
9013 * server.c (gdbserver_usage): Mention --version.
9014
6e23a804
DJ
90152008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9016
9017 * Makefile.in (gdbreplay.o): New rule.
9018
90aa6a40
JM
90192008-06-06 Joseph Myers <joseph@codesourcery.com>
9020
9021 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9022 message, not gdbserver.
9023
c16158bc 90242008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9025 Nathan Sidwell <nathan@codesourcery.com>
9026 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9027
9028 * acinclude.m4: Include ../../config/acx.m4.
9029 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9030 * configure, config.in: Regenerate.
9031 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9032 * server.c (gdbserver_version): Print PKGVERSION.
9033 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9034 (main): Adjust gdbserver_usage calls.
9035 * gdbreplay.c (version, host_name): Add declarations.
9036 (gdbreplay_version, gdbreplay_usage): New.
9037 (main): Accept --version and --help options.
9038
aeb75bf5
DJ
90392008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9040
9041 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9042 (arm_breakpoint_at): Handle Thumb.
9043 (the_low_target): Add comment.
9044
76b233dd
UW
90452008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9046
9047 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9048
08388c79
DE
90492008-05-09 Doug Evans <dje@google.com>
9050
a3c83fae
DE
9051 * server.h (decode_search_memory_packet): Declare.
9052 * remote-utils.c (decode_search_memory_packet): New fn.
9053 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9054 (handle_search_memory): New fn.
9055 (handle_query): Process qSearch:memory packets.
9056
bb9c3d36
UW
90572008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9058
9059 * regcache.c (registers_length): Remove.
9060 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9061 full register packet.
9062 * regcache.h (registers_length): Remove prototype.
9063 * server.h (PBUFSIZ): Define to 16384.
9064
7284e1be
UW
90652008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9066
9067 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9068 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9069 powerpc-64l.o, and powerpc-altivec64l.o.
9070 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9071 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9072 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9073 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9074 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9075 to srv_xmlfiles.
9076
9077 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9078 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9079 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9080 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9081 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9082 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9083 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9084 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9085 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9086 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9087 (clean): Update.
9088
9089 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9090 (init_registers_powerpc_32l): ... this new prototype.
9091 (init_registers_powerpc_32): Remove, replace by ...
9092 (init_registers_powerpc_altivec32l): ... this new prototype.
9093 (init_registers_powerpc_e500): Remove, replace by ...
9094 (init_registers_powerpc_e500l): ... this new prototype.
9095 (init_registers_ppc64): Remove, replace by ...
9096 (init_registers_powerpc_64l): ... this new prototype.
9097 (init_registers_powerpc_64): Remove, replace by ...
9098 (init_registers_powerpc_altivec64l): ... this new prototype.
9099 (ppc_num_regs): Set to 73.
9100 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9101 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9102 (ppc_cannot_store_register): Handle orig_r3 and trap.
9103 (ppc_arch_setup): Update init_registers_... calls.
9104 (ppc_fill_gregset): Handle orig_r3 and trap.
9105
9106 * inferiors.c (clear_inferiors): Reset current_inferior.
9107
fdc59709
PB
91082008-04-23 Paolo Bonzini <bonzini@gnu.org>
9109
889bf7c5
PA
9110 * acinclude.m4: Add override.m4.
9111 * configure: Regenerate.
fdc59709 9112
c9b2f845
UW
91132008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9114
9115 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9116 initial call to init_register_ppc64.
9117
550512b8
UW
91182008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9119
43aaf8b6
PA
9120 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9121 single powerpc*-*-linux* case.
550512b8
UW
9122 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9123
b6430ec3
UW
91242008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9125
9126 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9127 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9128 from reg_xmlfiles.
9129 * linux-ppc-low.c: Include <elf.h>.
9130 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9131 (ppc_hwcap): New global variable.
9132 (ppc_regmap): Remove __SPE__ #ifdef sections.
9133 (ppc_regmap_e500): New global variable.
9134 (ppc_cannot_store_register): Update __SPE__ special case.
9135 (ppc_get_hwcap): New function.
9136 (ppc_arch_setup): Use it to determine whether inferior supports
9137 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9138 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9139 Do not access registers if target does not support AltiVec.
9140 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9141 Do not access registers if target does not support SPE.
9142 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9143
52fa2412
UW
91442008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9145
9146 * linux-low.c (disabled_regsets, num_regsets): New.
9147 (use_regsets_p): Delete.
9148 (linux_wait_for_process): Clear disabled_regsets.
9149 (regsets_fetch_inferior_registers): Check and set it.
9150 (regsets_store_inferior_registers): Likewise.
9151 (linux_fetch_registers, linux_store_registers): Do not use
9152 use_regsets_p.
9153 (initialize_low): Allocate disabled_regsets.
9154
e28b3332
DJ
91552008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9156
9157 * Makefile.in (LIBOBJS): New.
9158 (OBS): Use LIBOBJS.
9159 (memmem.o): New rule.
9160 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9161 * configure: Regenerated.
9162
4536995d
UW
91632008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9164
9165 * server.c (handle_query): Never return "unsupported" for
9166 qXfer:features:read queries.
9167
221c031f
UW
91682008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9169
9170 * server.c (get_features_xml): Fix inverted condition.
9171 (handle_query): Always support qXfer:feature:read.
9172
ccd213ac
DJ
91732008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9174
9175 * server.c (wrapper_argv): New.
9176 (start_inferior): Handle wrapper_argv. If set, expect an extra
9177 trap.
9178 (gdbserver_usage): Document --wrapper.
9179 (main): Parse --wrapper.
9180
6fe305f7
UW
91812008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9182
9183 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9184 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9185 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9186 (ppc_set_pc): Likewise.
9187 (ppc_arch_setup): New function.
9188 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9189 of collect_register.
889bf7c5 9190 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9191
5b0a002e
UW
91922008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9193
9194 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9195 instead of linux-ppc64-low.o.
9196 * linux-ppc64-low.c: Remove file.
9197 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9198 (linux-ppc64-low.o): Remove rule.
9199
9200 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9201 (init_registers_powerpc_64): Likewise.
9202 (ppc_regmap): Conditionally define depending on __powerpc64__.
9203 (ppc_cannot_store_register): Do not special-case "fpscr" when
9204 compiled on __powerpc64__.
9205 (ppc_collect_ptrace_register): New function.
9206 (ppc_supply_ptrace_register): New function.
9207 (ppc_breakpoint): Change type to "unsigned int".
9208 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9209 (the_low_target): Conditionally provide initializers for the
889bf7c5 9210 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9211 collect_ptrace_register and supply_ptrace_register members.
9212
9b4b61c8
UW
92132008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9214
9215 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9216 * server.c (gdbserver_xmltarget): Define.
9217 (get_features_xml): Use it to replace "target.xml" and arch_string.
9218
9219 * configure.srv: Remove srv_xmltarget. Add XML files that were
9220 mentioned there to srv_xmlfiles instead. Remove conditional tests
9221 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9222 srv_xmlfiles and srv_regobj to include all possible choices.
9223 * configure.ac (srv_xmltarget): Remove.
9224 (srv_xmlfiles): Do not add "target.xml".
9225 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9226 checks for supplementary target information.
9227 * configure: Regenerate.
9228 * Makefile.in (XML_TARGET): Remove.
9229 (target.xml): Remove rule.
9230 (clean): Do not clean up target.xml.
9231 (.PRECIOUS): Do not mention target.xml.
9232
9233 * target.h (struct target_ops): Remove arch_string member.
9234 * linux-low.c (linux_arch_string): Remove.
9235 (linux_target_ops): Remove arch_string initializer.
9236 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9237 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9238 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9239 * spu-low.c (spu_arch_string): Remove.
9240 (spu_target_ops): Remove arch_string initializer.
9241 * win32-low.c (win32_arch_string): Remove.
9242 (win32_target_ops): Remove arch_string initializer.
9243 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9244 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9245 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9246
ee1a7ae4
UW
92472008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9248
9249 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9250 by collect_ptrace_register and supply_ptrace_register hooks.
9251 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9252 instead of checking for the_low_target.left_pad_xfer.
9253 (usr_store_inferior_registers): Use collect_ptrace_register callback
9254 instead of checking for the_low_target.left_pad_xfer.
9255
9256 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9257 (s390_supply_ptrace_register): Likewise.
9258 (s390_fill_gregset): Call s390_collect_ptrace_register.
9259 (the_low_target): Update.
9260
9261 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9262 (ppc_supply_ptrace_register): Likewise.
9263 (the_low_target): Update.
9264
9265 * linux-i386-low.c (the_low_target): Update.
9266 * linux-x86-64-low.c (the_low_target): Update.
9267
d61ddec4
UW
92682008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9269
9270 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9271 reg-s390.o and reg-s390x.o.
9272
9273 * linux-low.c (new_inferior): New global variable.
9274 (linux_create_inferior, linux_attach): Set it.
9275 (linux_wait_for_process): Call the_low_target.arch_setup after the
9276 target has stopped for the first time.
9277 (initialize_low): Do not call the_low_target.arch_setup.
9278
9279 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9280 (s390_set_pc): Likewise.
9281 (s390_arch_setup): New function.
9282 (the_low_target): Use s390_arch_setup as arch_setup routine.
9283
9284 * regcache.c (realloc_register_cache): New function.
9285 (set_register_cache): Call it for each existing regcache.
9286
d05b4ac3
UW
92872008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9288
9289 * server.h (init_registers): Remove prototype.
9290
9291 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9292 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9293 instead of init_registers ().
9294 * linux-arm-low.c (init_registers_arm): Add prototype.
9295 (init_registers_arm_with_iwmmxt): Likewise.
9296 (the_low_target): Add initializer for arch_setup field.
9297 * linux-cris-low.c (init_registers_cris): Add prototype.
9298 (the_low_target): Add initializer for arch_setup field.
9299 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9300 (the_low_target): Add initializer for arch_setup field.
9301 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9302 (the_low_target): Add initializer for arch_setup field.
9303 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9304 (the_low_target): Add initializer for arch_setup field.
9305 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9306 (the_low_target): Add initializer for arch_setup field.
9307 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9308 (the_low_target): Add initializer for arch_setup field.
9309 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9310 (init_registers_mips64_linux): Likewise.
9311 (the_low_target): Add initializer for arch_setup field.
9312 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9313 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9314 (the_low_target): Add initializer for arch_setup field.
9315 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9316 (init_registers_powerpc_64): Likewise.
9317 (the_low_target): Add initializer for arch_setup field.
9318 * linux-s390-low.c (init_registers_s390): Add prototype.
9319 (init_registers_s390x): Likewise.
9320 (the_low_target): Add initializer for arch_setup field.
9321 * linux-sh-low.c (init_registers_sh): Add prototype.
9322 (the_low_target): Add initializer for arch_setup field.
9323 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9324 (the_low_target): Add initializer for arch_setup field.
9325 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9326 (the_low_target): Add initializer for arch_setup field.
9327
9328 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9329 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9330 instead of init_registers ().
9331 * win32-arm-low.c (init_registers_arm): Add prototype.
9332 (the_low_target): Add initializer for arch_setup field.
9333 * win32-i386-low.c (init_registers_i386): Add prototype.
9334 (the_low_target): Add initializer for arch_setup field.
9335
9336 * spu-low.c (init_registers_spu): Add prototype.
9337 (initialize_low): Call initialie_registers_spu () instead of
9338 initialize_registers ().
9339
fd96d250
PA
93402008-02-19 Pedro Alves <pedro@codesourcery.com>
9341
9342 * server.c (handle_v_requests): When handling the vRun and vAttach
9343 packets, if already debugging a process, don't kill it. Return an
9344 error instead.
9345
d41b6bb4
DJ
93462008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9347
9348 * server.c (handle_query): Correct length check.
9349
5ac588cf
PA
93502008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9351
9352 * win32-low.c (do_initial_child_stuff): Add process handle
9353 parameter. Set current_process_handle and current_process_id from the
9354 parameters. Clear globals.
9355 (win32_create_inferior): Don't set current_process_handle and
9356 current_process_id here. Instead pass them on the call to
9357 do_initial_child_stuff.
9358 (win32_attach): Likewise.
9359 (win32_clear_inferiors): New.
9360 (win32_kill): Don't close the current process handle or the
9361 current thread handle here. Instead call win32_clear_inferiors.
9362 (win32_detach): Don't open a new handle to the process. Call
9363 win32_clear_inferiors.
9364 (win32_join): Don't rely on current_process_handle; open a new
9365 handle using the process id.
9366 (win32_wait): Call win32_clear_inferiors when the inferior process
9367 has exited.
9368
ecd7ecbc
DJ
93692008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9370
9371 * server.c (monitor_show_help): Add "exit".
9372
1525d545
MG
93732008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9374
ecd7ecbc 9375 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9376 (clean): Add reg-xtensa.c.
9377 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9378 * configure.srv (xtensa*-*-linux*) New target.
9379 * linux-xtensa-low.c: New.
9380 * xtensa-xtregs.c: New.
1525d545 9381
59a016f0
PA
93822008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9383
9384 * hostio.c: Don't include errno.h.
9385 (errno_to_fileio_errno): Move to hostio-errno.
9386 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9387 error number outputting to the target->hostio_last_error callback.
9388 (hostio_packet_error): Use FILEIO_EINVAL directly.
9389 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9390 calls to hostio_error.
9391 * hostio-errno.c: New.
9392 * server.h (hostio_last_error_from_errno): Declare.
9393 * target.h (target_ops): Add hostio_last_error member.
9394 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9395 as hostio_last_error handler.
889bf7c5 9396 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9397 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9398 (wince_hostio_last_error): New functions.
9399 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9400 as hostio_last_error handler.
9401 (win32_target_ops) [!_WIN32_WCE]: Register
9402 hostio_last_error_from_errno as hostio_last_error handler.
9403 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9404 (hostio-errno.o): New rule.
9405 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9406 * configure.srv (srv_hostio_err_objs): New variable. Default to
9407 hostio-errno.o.
9408 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9409 * configure: Regenerate.
9410
2d717e4f
DJ
94112008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9412
9413 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9414 (linux_kill, linux_detach): Clean up the process list.
9415 * remote-utils.c (remote_open): Improve port number parsing.
9416 (putpkt_binary, input_interrupt): Only send interrupts if the target
9417 is running.
9418 * server.c (extended_protocol): Make static.
9419 (attached): Define earlier.
9420 (exit_requested, response_needed, program_argv): New variables.
9421 (target_running): New.
9422 (start_inferior): Clear attached here.
9423 (attach_inferior): Set attached here.
9424 (require_running): Define.
9425 (handle_query): Use require_running and target_running. Implement
9426 "monitor exit".
9427 (handle_v_attach, handle_v_run): New.
9428 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9429 (gdbserver_usage): Update.
9430 (main): Redo argument parsing. Handle --debug and --multi. Handle
9431 --attach along with other options or after the port. Save
9432 program_argv. Support no initial program. Resynchronize
9433 communication with GDB after an error. Handle "monitor exit".
9434 Use require_running and target_running. Always allow the extended
9435 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9436 restart in extended mode.
9437 * README: Refer to the GDB manual. Update --attach usage.
9438
7407e2de
AS
94392007-12-20 Andreas Schwab <schwab@suse.de>
9440
9441 * linux-low.c (STACK_SIZE): Define.
9442 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9443 (linux_test_for_tracefork): Likewise.
9444
b65d95c5
DJ
94452007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9446
9447 * linux-low.c (linux_wait_for_event): Update messages. Do not
9448 reinsert auto-delete breakpoints.
9449 * mem-break.c (struct breakpoint): Change return type of handler to
9450 int.
9451 (set_breakpoint_at): Update handler type.
9452 (reinsert_breakpoint_handler): Return 1 instead of calling
9453 delete_breakpoint.
9454 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9455 setting a new one.
9456 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9457 * mem-break.h (set_breakpoint_at): Update handler type.
9458 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9459 * win32-low.c (auto_delete_breakpoint): New.
9460 (get_child_debug_event): Use it.
9461
4e799345
DJ
94622007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9463
9464 * configure.ac: Check for pread and pwrite.
9465 * hostio.c (handle_pread): Fall back to lseek and read.
9466 (handle_pwrite): Fall back to lseek and write.
9467 * config.in, configure: Regenerated.
9468
27524b67
DJ
94692007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9470
9471 * server.c (myresume): Add own_buf argument.
9472 (main): Update calls.
9473
a20d5e98
DJ
94742007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9475
9476 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9477 * remote-utils.c (remote_open): Do not call disable_async_io.
9478 (block_async_io): Delete.
9479 (unblock_async_io): Make static.
9480 (initialize_async_io): New.
9481 * server.c (handle_v_cont): Handle async I/O here.
9482 (myresume): Likewise. Move other common resume tasks here...
9483 (main): ... from here. Call initialize_async_io. Disable async
9484 I/O before the main loop.
9485 * server.h (initialize_async_io): Declare.
9486 (block_async_io, unblock_async_io): Delete prototypes.
9487 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9488
b79d787e
DJ
94892007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9490
9491 * remote-utils.c (readchar): Allow binary data in received messages.
9492
d97903b2
PA
94932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9494
9495 * win32-low.c (attaching): New global.
9496 (win32_create_inferior): Clear the `attaching' global.
9497 (win32_attach): Set the `attaching' global.
9498 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9499 attaching. Only set a breakpoint at the entry point if not
9500 attaching.
9501
311de423
PA
95022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9503
9504 * server.c (main): Don't report dll events on the initial
9505 connection on attaches.
9506
6c2d16d2
PA
95072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9508
9509 * server.c (main): Relax numerical bases supported for the pid of
9510 the --attach command line argument.
9511
5ca906e6
PA
95122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9513
9514 * win32-low.c (win32_attach): Call OpenProcess before
9515 DebugActiveProcess, not after. Add last error output to error
9516 call.
9517
9c6c8194
PA
95182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9519
9520 * win32-low.c (win32_get_thread_context)
9521 (win32_set_thread_context): New functions.
9522 (thread_rec): Use win32_get_thread_context.
9523 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9524 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9525 field.
9526
4d5d1aaa
PA
95272007-12-03 Leo Zayas
9528 Pedro Alves <pedro_alves@portugalmail.pt>
9529
9530 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9531 global variables.
9532 (child_add_thread): Minor cleanup.
9533 (child_continue): Resume artificially suspended threads before
9534 calling ContinueDebugEvent.
9535 (suspend_one_thread): New.
9536 (fake_breakpoint_event): New.
9537 (get_child_debug_event): Change return type to int. Check here if
9538 gdb sent an interrupt request. If a soft interrupt was requested,
9539 fake a breakpoint event. Return 0 if there is no event to handle,
9540 and 1 otherwise.
9541 (win32_wait): Don't check here if gdb sent an interrupt request.
9542 Ensure there is a valid event to handle.
9543 (win32_request_interrupt): Add soft interruption method as last
9544 resort.
9545
c436e841
PA
95462007-12-03 Leo Zayas
9547 Pedro Alves <pedro_alves@portugalmail.pt>
9548
9549 * win32-low.h (win32_thread_info): Add descriptions to the
9550 structure members. Replace `suspend_count' counter by a
9551 `suspended' flag.
9552 * win32-low.c (thread_rec): Update condition of when to get the
9553 context from the inferior. Rely on ContextFlags being set if it
9554 has already been retrieved. Only suspend the inferior thread if
9555 we haven't already. Warn if that fails.
9556 (continue_one_thread): s/suspend_count/suspended/. Only call
9557 ResumeThread once. Warn if that fails.
9558
e7b5fa67
PA
95592007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9560
9561 * win32-low.c (win32_wait): Don't read from the inferior when it
9562 has already exited.
9563
a385171d
PA
95642007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9565
9566 * Makefile.in (win32_low_h): New variable.
9567 (win32-low.o): Add dependency on $(win32_low_h).
9568 (win32-arm-low.o, win32-i386-low.o): New rules.
9569
f80c84b3
DJ
95702007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9571
9572 * hostio.c: Correct copyright year.
9573
a6b151f1
DJ
95742007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9575
9576 * Makefile.in (OBS): Add hostio.o.
9577 (hostio.o): New rule.
9578 * server.h (handle_vFile): Declare.
9579 * hostio.c: New file.
9580 * server.c (handle_v_requests): Take packet_len and new_packet_len
9581 for binary packets. Call handle_vFile.
9582 (main): Update call to handle_v_requests.
9583
f9387fc3
DJ
95842007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9585
9586 * linux-low.c: Include <sched.h>.
9587
51c2684e
DJ
95882007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9589
9590 * linux-low.c (linux_tracefork_grandchild): New.
9591 (linux_tracefork_child): Use clone.
9592 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9593
75f83163
JB
95942007-10-31 Joel Brobecker <brobecker@adacore.com>
9595
9596 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9597
da5898ce
DJ
95982007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9599
9600 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9601
24a09b5f
DJ
96022007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9603
9604 * inferiors.c (change_inferior_id): Delete.
9605 (add_pid_to_list, pull_pid_from_list): New.
9606 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9607 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9608 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9609 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9610 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9611 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9612 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9613 (using_threads): Always set to 1.
9614 (handle_extended_wait): New.
9615 (add_process): Do not set TID.
9616 (linux_create_inferior): Set must_set_ptrace_flags.
9617 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9618 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9619 (linux_thread_alive): Rename TID argument to LWPID.
9620 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9621 (linux_wait_for_event): Do not use TID or check using_threads. Update
9622 call to dead_thread_notify. Call handle_extended_wait.
9623 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9624 (send_sigstop): Delete sigstop_sent.
9625 (wait_for_sigstop): Avoid TID.
9626 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9627 (linux_test_for_tracefork): New.
9628 (linux_lookup_signals): Use thread_db_active and
9629 linux_supports_tracefork_flag.
9630 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9631 * linux-low.h (get_process_thread): Avoid TID.
9632 (struct process_ifo): Move thread_known and tid to the end. Remove
9633 sigstop_sent.
9634 (linux_attach_lwp, thread_db_init): Update prototypes.
9635 * server.h (change_inferior_id): Delete prototype.
9636 (add_pid_to_list, pull_pid_from_list): New prototypes.
9637 * thread-db.c (thread_db_use_events): New.
9638 (find_first_thread): Rename to...
9639 (find_one_thread): ...this. Update callers and messages. Do not
9640 call fatal. Check thread_db_use_events. Do not call
9641 change_inferior_id or new_thread_notify.
9642 (maybe_attach_thread): Update. Do not call new_thread_notify.
9643 (thread_db_init): Set thread_db_use_events. Check use_events.
9644 * utils.c (fatal, warning): Correct message prefix.
9645
30ed0a8f
DJ
96462007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9647
9648 * Makefile.in (clean): Remove new files.
9649 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9650 (powerpc-64.o, powerpc-64.c): New rules.
9651 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9652 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9653 with SPE.
9654 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9655 SPE targets.
9656 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9657 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9658 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9659 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9660 (target_regsets): Add AltiVec and SPE register sets.
9661 * configure.ac: Check for AltiVec and SPE.
9662 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9663 (ppc_fill_vrregset, ppc_store_vrregset): New.
9664 (target_regsets): Add AltiVec register set.
9665 * configure: Regenerated.
9666
fd462a61
DJ
96672007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9668
9669 * linux-low.c (O_LARGEFILE): Define.
9670 (linux_read_memory): Use /proc/PID/mem.
9671 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9672 * configure, config.in: Regenerated.
9673
69f223ed
DJ
96742007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * linux-low.c (linux_wait_for_event): Do not pass signals while
9677 single-stepping.
9678
aec18585
PA
96792007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9680
9681 * win32-low.c (create_process): New.
9682 (win32_create_inferior): Use create_process instead of
9683 CreateProcess. If create_process failed retry appending an ".exe"
9684 suffix. Store the GetLastError result immediatelly after
9685 create_process calls and use it on the call to error.
9686
34d86ddd
PA
96872007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9688
9689 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9690
5a0e3bd0
JB
96912007-08-23 Joel Brobecker <brobecker@adacore.com>
9692
9693 * configure.ac: Switch license to GPLv3.
9694
f88c79e6
MS
96952007-08-01 Michael Snyder <msnyder@access-company.com>
9696
9697 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9698
6b3d9b83
PA
96992007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9700
9701 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9702 typedef.
9703 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9704 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9705 CloseToolhelp32Snapshot.
9706 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9707 CloseToolhelp32Snapshot.
9708
c588c53c
MS
97092007-07-27 Michael Snyder <michael.snyder@access-company.com>
9710
9711 * server.c (main): Check for inferior exit before main loop.
9712
aa0403d9
PA
97132007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9714
9715 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9716 instead of on tmp_desc.
9717
255e7678
DJ
97182007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9719 Daniel Jacobowitz <dan@codesourcery.com>
9720
9721 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9722 (add_thread): Minor cleanups.
9723 (clear_inferiors): Move lower in the file. Clear the DLL
9724 list.
9725 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9726 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9727 (xml_escape_text): New.
9728 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9729 for qSupported.
9730 (handle_v_cont): Report errors.
9731 (gdbserver_version): Update.
9732 (main): Correct size of own_buf. Do not report initial DLL events.
9733 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9734 (unloaded_dll, xml_escape_text): New.
9735 * win32-low.c (enum target_waitkind): Update comments.
9736 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9737 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9738 (win32_EnumProcessModules, win32_GetModuleInformation)
9739 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9740 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9741 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9742 (win32_Module32First, win32_Module32Next, load_toolhelp)
9743 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9744 (get_child_debug_event): Handle DLL events.
9745 (win32_wait): Likewise.
9746
0d37add9
DJ
97472007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9748
9749 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9750 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9751
45e2715e
PA
97522007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9753
9754 * win32-low.c (handle_output_debug_string): Ignore event if not
9755 waiting.
9756
c5674cf1
PA
97572007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9758
9759 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9760
2bbe3cc1
DJ
97612007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9762
9763 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9764
ae13219e
DJ
97652007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9766
9767 * inferiors.c (change_inferior_id): Add comment.
9768 * linux-low.c (check_removed_breakpoint): Add an early
9769 prototype. Improve debug output.
9770 (linux_attach): Doc update.
9771 (linux_detach_one_process, linux_detach): Clean up before releasing
9772 each process.
9773 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9774 * linux-low.h (struct process_info): Doc improvement.
9775 * mem-break.c (delete_all_breakpoints): New.
9776 * mem-break.h (delete_all_breakpoints): New prototype.
9777 * thread-db.c (find_first_thread): New.
9778 (thread_db_create_event): Call it instead of
9779 thread_db_find_new_threads. Clean up unused variables.
9780 (maybe_attach_thread): Remove first thread handling.
9781 (thread_db_find_new_threads): Use find_first_thread.
9782 (thread_db_get_tls_address): Likewise.
9783
4105de34
DJ
97842007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9785
9786 * thread-db.c (thread_db_find_new_threads): Add prototype.
9787 (thread_db_create_event): Check for the main thread before adding
9788 a new thread.
9789 (maybe_attach_thread): Only enable event reporting if TID == 0.
9790 (thread_db_get_tls_address): Check for new threads.
9791
2b876972
DJ
97922007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9793
9794 * linux-low.c (linux_create_inferior): Try execv before execvp.
9795 * spu-low.c (spu_create_inferior): Likewise.
9796
7a245884
DJ
97972007-06-13 Mike Frysinger <vapier@gentoo.org>
9798
9799 * linux-low.c (linux_create_inferior): Change execv to execvp.
9800 * spu-low.c (spu_create_inferior): Likewies.
9801
117ce543
DJ
98022007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9803
9804 * Makefile.in (clean): Clean new files instead of deleted ones.
9805 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9806 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9807 rules.
9808 * configure.srv: Specify XML files and new regformats for MIPS and
9809 MIPS64 GNU/Linux.
9810 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9811 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9812 an entry for the restart register.
9813 (mips_cannot_fetch_register, mips_cannot_store_register)
9814 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9815 register names to match the XML descriptions.
9816 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9817 restart register instead of $0.
9818
0e7f50da
UW
98192007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9820 Markus Deuling <deuling@de.ibm.com>
9821
9822 * remote-utils.c (decode_xfer_write): New function.
9823 * server.h (decode_xfer_write): Add prototype.
9824 * server.c (handle_query): Add PACKET_LEN argument. Support
9825 qXfer:spu:read and qXfer:spu:write packets.
9826 (main): Pass packet_len to handle_query.
9827 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9828 * target.h (target_ops): Add qxfer_spu.
9829
374c1d38
UW
98302007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9831
9832 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9833 accessing non-seekable spufs files.
9834
bb63802a
UW
98352007-05-16 Markus Deuling <deuling@de.ibm.com>
9836
889bf7c5 9837 * server.c (handle_query): Add reply for qC packet.
bb63802a 9838
7390519e
PA
98392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9840 Leo Zayas <lerele@champenstudios@com>
9841
9842 * server.h (check_remote_input_interrupt_request): New function.
9843 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9844 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9845 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9846 (check_remote_input_interrupt_request): New function.
9847 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9848 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9849 winapi_GenerateConsoleCtrlEvent): New typedefs.
9850 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9851 to 250 ms.
9852 (win32_wait): Check for remote interrupt request
9853 with check_remote_input_interrupt_request.
9854 (win32_request_interrupt): New function.
9855 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9856
34b34921
PA
98572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9858
9859 * win32-low.c (debug_registers_changed,
9860 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9861 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9862 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9863 (thread_rec): Get context using the low target.
9864 (child_add_thread): Call thread_added on the low target,
9865 which does the same thing.
9866 (regptr): Delete.
9867 (do_initial_child_stuff): Remove debug registers references.
9868 Set context using the low target. Resume threads after
9869 setting the contexts.
9870 (child_continue): Remove dead variable. Remove debug
9871 registers references.
9872 (child_fetch_inferior_registers): Go through the low target.
9873 (do_child_store_inferior_registers): Remove.
9874 (child_store_inferior_registers): Go through the low target.
9875 (win32_resume): Remove debug registers references.
9876 Set context using the low target.
9877 (handle_exception): Change return type to void. Don't record
9878 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9879 first chance exception.
889bf7c5 9880 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9881 goto loop. Always return after waiting for debug event.
9882 (win32_wait): Convert to switch statement. Handle spurious
9883 events.
9884
9885 * win32-i386-low.c (debug_registers_changed,
9886 debug_registers_used): New.
9887 (initial_stuff): Rename to ...
9888 (i386_initial_stuff): ... this. Clear debug registers
9889 state variables.
9890 (store_debug_registers): Delete.
9891 (i386_get_thread_context): New.
9892 (load_debug_registers): Delete.
9893 (i386_set_thread_context): New.
9894 (i386_thread_added): New.
9895 (single_step): Rename to ...
9896 (i386_single_step): ... this.
9897 (do_fetch_inferior_registers): Rename to ...
9898 (i386_fetch_inferior_register): ... this.
9899 (i386_store_inferior_register): New.
9900 (the_low_target): Adapt to new interface.
9901
9902 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9903 (arm_get_thread_context): New.
9904 (arm_set_thread_context): New.
9905 (regptr): New.
9906 (do_fetch_inferior_registers): Rename to ...
9907 (arm_fetch_inferior_register): ... this.
9908 (arm_store_inferior_register): New.
9909 (arm_wince_breakpoint): Reimplement as unsigned long.
9910 (arm_wince_breakpoint_len): Define.
9911 (the_low_target): Adapt to new interface.
9912
9913 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9914 load_debug_registers. Add get_thread_context, set_thread_context,
9915 thread_added and store_inferior_register. Rename
9916 fetch_inferior_registers to fetch_inferior_register.
9917 (regptr): Remove declaration.
9918
dd6953e1
PA
99192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9920
9921 * linux-low.c (linux_detach): Change return type to int. Return 0.
9922 * spu-low.c (spu_detach): Likewise.
9923
444d6139
PA
99242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9925
9926 * target.h (target_ops): Change return type of detach to int.
9927 Add join.
9928 (join_inferior): New.
9929 * server.c (main): Don't skip detach support on mingw32.
9930 If the inferior doesn't support detaching return error.
9931 Call join_inferior instead of using waitpid.
9932 * linux-low.c (linux_join): New.
9933 (linux_target_op): Add linux_join.
9934 * spu-low.c (spu_join): New.
9935 (spu_target_ops): Add spu_join.
9936 * win32-low.c (win32_detach): Adapt to new interface.
9937 Reopen current_process_handle before detaching. Issue a child
9938 resume before detaching.
9939 (win32_join): New.
9940 (win32_target_op): Add win32_join.
9941
1d5315fe
PA
99422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9943
9944 * win32-low.c (win32-attach): Fix return value.
9945 * target.h (target_ops): Describe ATTACH return values.
9946
bf914831
PA
99472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9948
9949 * win32-low.c (GETPROCADDRESS): Define.
9950 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9951 (winapi_DebugSetProcessKillOnExit): Likewise.
9952 (win32_create_inferior): Force usage of ansi CreateProcessA.
9953 (win32_attach): Use GETPROCADDRESS.
9954 (win32_detach): Likewise.
9955
f72f3e60
PA
99562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9957
9958 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9959
ed50f18f
PA
99602007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9961
9962 * win32-low.c: Commit leftover changes from 2007-03-29.
9963
0c2ead7e
DJ
99642007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9965
9966 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9967 fields short instead of int. Add explicit padding.
9968 (i387_cache_to_fsave): Remove unnecessary casts.
9969 (i387_fsave_to_cache): Doc fix.
9970 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9971
73725ff3
DJ
99722007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9973
9974 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9975 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9976
d99f33d8
PA
99772007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9978
9979 * configure.srv (arm*-*-mingw32ce*): Move near the other
9980 arm targets.
9981
68070c10
PA
99822007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9983
2482afc6 9984 * configure.ac: Add errno checking.
68070c10
PA
9985 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9986 sys/file.h and malloc.h.
9987 (AC_CHECK_DECLS): Add perror.
9988 (srv_mingwce): Handle.
2482afc6 9989 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9990 win32-i386-low.o to srv_tgtobj.
9991 (i[34567]86-*-mingw*): Likewise.
9992 (arm*-*-mingw32ce*): Add case.
9993 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9994 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9995 [__MINGW32CE__] (strerror): New function.
9996 [__MINGW32CE__] (errno): Define to GetLastError.
9997 [__MINGW32CE__] (COUNTOF): New macro.
9998 (remote_open): Remove extra close call.
9999 * mem-break.c (delete_breakpoint_at): New function.
10000 * mem-break.h (delete_breakpoint_at): Declare.
10001 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10002 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10003 [USE_WIN32API] (read, write): Add char* casts.
10004 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10005 * server.h: Include wincecompat.h on Windows CE.
10006 [HAVE_ERRNO_H]: Check.
10007 (perror): Declare if not declared.
10008 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10009 (perror_with_name): Remove errno declaration.
10010 * wincecompat.h: New.
10011 * wincecompat.c: New.
10012 * win32-low.h: New.
10013 * win32-arm-low.c: New.
10014 * win32-i386-low.c: New.
10015 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10016 (OUTMSG2): Make it safe.
10017 (_T): New macro.
10018 (COUNTOF): New macro.
10019 (NUM_REGS): Get it from the low target.
10020 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10021 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10022 (thread_rec): Let low target handle debug registers.
10023 (child_add_thread): Likewise.
10024 (child_init_thread_list): Likewise.
10025 (continue_one_thread): Likewise.
10026 (regptr): New.
10027 (do_child_fetch_inferior_registers): Move to ...
10028 * win32-i386-low.c: ... here, and rename to ...
10029 (do_fetch_inferior_registers): ... this.
889bf7c5 10030 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10031 Go through the low target.
10032 (do_child_store_inferior_registers): Use regptr.
10033 (strwinerror): New function.
10034 (win32_create_inferior): Handle Windows CE.
10035 Use strwinerror instead of strerror on Windows error
10036 codes. Add program to the error output.
10037 Don't close the main thread handle on Windows CE.
10038 (win32_attach): Use coredll.dll on Windows CE.
10039 (win32_kill): Close current process and current
10040 thread handles.
10041 (win32_detach): Use coredll.dll on Windows CE.
10042 (win32_resume): Let low target handle debug registers, and
10043 step request.
10044 (handle_exception): Add/Remove initial breakpoint. Avoid
10045 non-existant WSTOPSIG on Windows CE.
10046 (win32_read_inferior_memory): Cast to remove warning.
10047 (win32_arch_string): Go through the low target.
10048 (initialize_low): Call set_breakpoint_data with the low
10049 target's breakpoint.
10050 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10051 FOP_REGNUM, mappings): Move to ...
10052 * win32-i386-low.c: ... here.
10053 * win32-low.c (win32_thread_info): Move to ...
10054 * win32-low.h: ... here.
10055 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10056 win32-arm-low.c and wincecompat.c.
10057 (all:): Add $EXEEXT.
10058 (install-only:): Likewise.
10059 (gdbserver:): Likewise.
10060 (gdbreplay:): Likewise.
10061 * config.in: Regenerate.
10062 * configure: Regenerate.
10063
41093d81
PA
100642007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10065
10066 * win32-low.c: Rename typedef thread_info to
10067 win32_thread_info throughout.
10068
544afa54
PA
100692007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10070
10071 * win32-i386-low.c: Rename to ...
10072 * win32-low.c: ... this.
10073 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10074 * Makefile.in: Likewise.
10075
bce7165d
PA
100762007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10077
10078 * remote-utils.c (monitor_output): Constify msg parameter.
10079 * server.h (monitor_output): Likewise.
10080 * win32-i386-low.c (handle_output_debug_string): New.
10081 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10082 handle_output_debug_string.
10083 (get_child_debug_event): Likewise.
10084
506c7aa0
DJ
100852007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10086
10087 * server.c (main): Correct strtoul check.
10088
42c81e2a
DJ
100892007-03-27 Jon Ringle <jon@ringle.org>
10090
10091 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10092
9453113a
DJ
100932007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10094
10095 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10096
64a69107
DJ
100972007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10098
10099 * terminal.h: Check HAVE_SGTTY_H.
10100
101012007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10102
10103 * remote-utils.c (remote_open): Print out the assigned port number.
10104
c74d0ad8
DJ
101052007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10106
10107 * remote-utils.c (monitor_output): New function.
10108 * server.c (debug_threads): Define here.
10109 (monitor_show_help): New function.
10110 (handle_query): Handle qRcmd.
10111 (main): Do not handle 'd' packet.
10112 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10113 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10114 of debug_threads.
10115
de7c3b4a
PA
101162007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10117
10118 * Makefile.in (EXEEXT): New.
10119 (clean): Use $(EXEEXT).
10120
ef57601b
PA
101212007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10122
10123 * target.h (target_ops): Rename send_signal to request_interrupt,
10124 and remove enum target_signal parameter.
10125 * linux-low.c (linux_request_interrupt): Rename from
10126 linux_send_signal, and always send SIGINT.
10127 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10128 and always send SIGINT.
10129 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10130 of send_signal.
10131 (input_interrupt): Likewise.
10132
820f2bda
PA
101332007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10134
10135 * server.c (get_features_xml): Check if target implemented
10136 arch_string.
10137 * win32-i386-low.c (win32_arch_string): New.
10138 (win32_target_ops): Add win32_arch_string as arch_string member.
10139
ab39bf24
UW
101402007-02-22 Markus Deuling <deuling@de.ibm.com>
10141
10142 * spu-low.c (spu_arch_string): New.
10143 (spu_target_ops): Add spu_arch_string.
10144
61ff6e04
DJ
101452007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10146
10147 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10148 * configure.ac: Do not check for terminal.h.
10149 * configure, config.in: Regenerated.
10150
fb1e4ffc
DJ
101512007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10152
10153 * Makefile.in (OBS): Add $(XML_BUILTIN).
10154 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10155 (clean): Update.
10156 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10157 (arm-with-iwmmxt.c): New.
10158 * config.in, configure: Regenerate.
10159 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10160 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10161 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10162 (arm*-*-linux*): Add iWMMXt and regset support.
10163 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10164 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10165 (arm_store_wmmxregset, target_regsets): New.
10166 * server.c (get_features_xml): Take annex argument. Check builtin
10167 XML documents.
10168 (handle_query): Handle multiple annexes.
10169
0f48aa01
DJ
101702007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10171
10172 * remote-utils.c [USE_WIN32API] (read, write): Define.
10173 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10174 write.
10175
23181151
DJ
101762007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10177
10178 * linux-i386-low.c (the_low_target): Set arch_string.
10179 * linux-x86-64-low.c (the_low_target): Likewise.
10180 * linux-low.c (linux_arch_string): New.
10181 (linux_target_ops): Add it.
10182 * linux-low.h (struct linux_target_ops): Add arch_string.
10183 * server.c (write_qxfer_response): Use const void * for DATA.
10184 (get_features_xml): New.
10185 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10186 * target.h (struct target_ops): Add arch_string method.
10187
9d606399
DJ
101882007-01-03 Denis Pilat <denis.pilat@st.com>
10189 Daniel Jacobowitz <dan@codesourcery.com>
10190
10191 * linux-low.c (linux_kill): Handle being called with no threads.
10192 * win32-i386-low.c (win32_kill): Likewise.
10193 (get_child_debug_event): Clear current_process_handle.
10194
101952006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10196 Daniel Jacobowitz <dan@codesourcery.com>
10197
10198 * remote-utils.c (remote_open): Check the type of specified
10199 serial port devices before opening them.
10200 * server.c (main): Kill the inferior if an error occurs during
10201 the first remote_open.
10202
a5e13d24
DJ
102032006-12-05 Markus Deuling <deuling@de.ibm.com>
10204
10205 * README: Update supported targets.
10206
186947f7
DJ
102072006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10208
10209 * Makefile.in (clean): Remove reg-mips64.c.
10210 (reg-mips64.c, reg-mips64.o): New rules.
10211 * configure.srv: Handle mips64. Include regset support for mips.
10212 * linux-mips-low.c (union mips_register): New.
10213 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10214 (mips_breakpoint, mips_breakpoint_at): Use int.
10215 (mips_collect_register, mips_supply_register)
10216 (mips_collect_register_32bit, mips_supply_register_32bit)
10217 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10218 (mips_store_fpregset, target_regsets): New.
10219 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10220
a13e2c95
UW
102212006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10222
10223 * configure.srv: Add target "spu*-*-*".
10224 * Makefile.in (clean): Remove reg-spu.c.
10225 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10226 * spu-low.c: New file.
10227
cb7283db
DJ
102282006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10229
10230 * configure.ac: Correct td_thr_tls_get_addr test.
10231 * configure: Regenerated.
10232
89be2091
DJ
102332006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10234
10235 * linux-low.c (linux_wait_for_event): Reformat. Use the
10236 pass_signals array.
10237 * remote-utils.c (decode_address_to_semicolon): New.
10238 * server.c (pass_signals, handle_general_set): New.
10239 (handle_query): Mention QPassSignals for qSupported.
10240 (main): Call handle_general_set.
10241 * server.h (pass_signals, decode_address_to_semicolon): New.
10242
000ef4f0
DJ
102432006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10244
10245 * server.c (handle_query): Correct error handling for read_auxv.
10246
b7149293
UW
102472005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10248
10249 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10250 and srv_linux_thread_db to yes.
10251 * linux-s390-low.c (s390_fill_gregset): New function.
10252 (target_regsets): Define data structure.
10253
dae5f5cf
DJ
102542006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10255
10256 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10257 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10258 * config.in, configure: Regenerated.
10259 * inferiors.c (gdb_id_to_thread): New function.
10260 (gdb_id_to_thread_id): Use it.
10261 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10262 * linux-low.h (struct process_info): Add th member.
10263 (thread_db_get_tls_address): New prototype.
10264 * remote-utils.c (decode_address): Make non-static.
10265 * server.c (handle_query): Handle qGetTLSAddr.
10266 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10267 * target.h (struct target_ops): Add get_tls_address.
10268 * thread-db.c (maybe_attach_thread): Save the thread handle.
10269 (thread_db_get_tls_address): New.
10270
32ca6d61
DJ
102712006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10272
10273 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10274 (linux_resume_one_process): Take a siginfo_t *. Update all
10275 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10276 (struct pending_signals): Add a siginfo_t.
10277 (linux_wait_for_process): Always set last_status.
10278 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10279 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10280 * linux-low.h (struct process_info): Add last_status.
10281
5ffff7c1
DJ
102822006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10283
10284 * remote-utils.c (try_rle): New function.
10285 (putpkt_binary): Use it.
10286
8695c747
DJ
102872006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10288
10289 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10290 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10291 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10292 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10293 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10294 point registers.
10295
290fadea
RS
102962006-08-08 Richard Sandiford <richard@codesourcery.com>
10297
10298 * server.c (terminal_fd): New variable.
10299 (old_foreground_pgrp): Likewise.
10300 (restore_old_foreground_pgrp): New function.
10301 (start_inferior): Record the terminal file descriptor in terminal_fd
10302 and its original foreground group in old_foreground_pgrp. Register
10303 restore_old_foreground_pgrp with atexit().
10304
9f2e1e63
DJ
103052006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10306
10307 * server.c (handle_query): Correct qPart to qXfer.
10308
b80864fb
DJ
103092006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10310
10311 * configure.ac: Check for more headers which are missing on
10312 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10313 * configure.srv: Add Cygwin and mingw32.
10314 * remote-utils.c: Don't include headers unconditionally which
10315 are missing on mingw32. Include <winsock.h> for mingw32.
10316 (remote_open): Adjust for mingw32 support. Flush
10317 standard error after writing to it.
10318 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10319 (unblock_async_io, enable_async_io, disable_async_io)
10320 (readchar, getpkt): Update for Winsock support.
10321 (prepare_resume_reply): Expect a protocol signal number.
10322 * server.c: Disable <sys/wait.h> on mingw32.
10323 (start_inferior): Adjust for mingw32 support. Flush
10324 standard error after writing to it.
10325 (attach_inferior): Likewise. Use protocol signal
10326 numbers.
10327 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10328 and names.
10329 * win32-i386-low.c: New file.
10330 * Makefile.in (XM_CLIBS): Set.
10331 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10332 (win32-i386-low.o): New dependency rule.
10333 * linux-low.c (linux_wait): Use target signal numbers.
10334 * target.h (struct target_ops): Doc fix.
10335 * server.h (target_signal_to_name): New prototype.
10336 * gdbreplay.c: Don't include headers unconditionally which
10337 are missing on mingw32. Include <winsock.h> for mingw32.
10338 (remote_close, remote_open): Adjust for Winsock support.
10339 * configure, config.in: Regenerated.
10340
0876f84a
DJ
103412006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10342
10343 * server.c (decode_xfer_read, write_qxfer_response): New.
10344 (handle_query): Take a packet length argument. Handle
10345 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10346 the qSupported response.
10347 (main): Update call to handle_query.
10348
01f9e8fa
DJ
103492006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10350
10351 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10352 (putpkt_binary): Renamed from putpkt and adjusted for binary
10353 data.
10354 (putpkt): New wrapper for putpkt_binary.
10355 (readchar): Don't mask off the high bit.
10356 (decode_X_packet): New function.
10357 * server.c (main): Call putpkt_binary if a handler sets the packet
10358 length. Save the length of the incoming packet. Handle 'X'.
10359 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10360
be2a5f71
DJ
103612006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10362
10363 * server.c (handle_query): Handle qSupported.
10364
ea025f5f
DJ
103652006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10366
10367 * remote-utils.c (all_symbols_looked_up): New variable.
10368 (look_up_one_symbol): Check it.
10369 * server.h (look_up_one_symbol): New declaration.
10370 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10371
9308fc88
DJ
103722006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10373
10374 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10375 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10376 (PTRACE_GET_THREAD_AREA): Define.
10377 (ps_get_thread_area): New function.
10378
52fb6437
NS
103792006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10380
10381 * configure.srv (m68k*-*-uclinux*): New target.
10382 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10383 (linux_resume_one_process): Remove extraneous cast.
10384 (linux_read_offsets): New.
10385 (linux_target_op): Add linux_read_offsets on mmuless systems.
10386 * server.c (handle_query): Add qOffsets logic.
10387 * target.h (struct target_ops): Add read_offsets.
10388
21b0f40c
DJ
103892006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10390
10391 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10392 (PTRACE_GET_THREAD_AREA): Define.
10393 (ps_get_thread_area): New function.
10394 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10395 (linux-x86-64-low.o): Update.
10396
0050a760
DJ
103972006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10398
10399 * configure.ac: Remove checks for prfpregset_t.
10400 * gdb_proc_service.h: New file.
10401 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10402 new "gdb_proc_service.h".
10403 * proc-service.c: Likewise.
10404 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10405 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10406 * Makefile.in (gdb_proc_service_h): Updated.
10407 * configure, config.in: Regenerated.
10408
b92a518e
DJ
104092006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10410
10411 * remote-utils.c (prepare_resume_reply): Move declaration
10412 of gdb_id_from_wait to the top of the block.
10413
545587ee
DJ
104142006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10415
10416 * linux-low.c (regsets_store_inferior_registers): Read the regset
10417 from the target before filling it.
10418
9db87ebd
DJ
104192006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10420
10421 * server.c (attach_inferior): Return SIGTRAP for a successful
10422 attach.
10423
dd24457d
DJ
104242006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10425
10426 * Makefile.in (OBS): Add version.o.
10427 (STAGESTUFF): Delete.
10428 (version.o): Add dependencies.
10429 (version.c): Replace rule.
10430 (clean): Remove version.c.
10431 * server.c (gdbserver_version): New.
10432 (gdbserver_usage): Use printf.
10433 (main): Handle --version and --help.
10434 * server.h (version, host_name): Add declarations.
10435
6f0f660e
EZ
104362005-12-23 Eli Zaretskii <eliz@gnu.org>
10437
889bf7c5
PA
10438 * linux-arm-low.c:
10439 * linux-arm-low.c:
10440 * inferiors.c:
10441 * i387-fp.h:
10442 * i387-fp.c:
10443 * gdbreplay.c:
10444 * regcache.c:
10445 * proc-service.c:
10446 * mem-break.h:
10447 * mem-break.c:
10448 * linux-x86-64-low.c:
10449 * linux-sh-low.c:
10450 * linux-s390-low.c:
10451 * linux-ppc64-low.c:
10452 * linux-ppc-low.c:
10453 * linux-mips-low.c:
10454 * linux-m68k-low.c:
10455 * linux-m32r-low.c:
10456 * linux-low.h:
10457 * linux-low.c:
10458 * linux-ia64-low.c:
10459 * linux-i386-low.c:
10460 * linux-crisv32-low.c:
10461 * thread-db.c:
10462 * terminal.h:
10463 * target.h:
10464 * target.c:
10465 * server.h:
10466 * server.c:
10467 * remote-utils.c:
10468 * regcache.h:
10469 * utils.c:
10470 * Makefile.in:
10471 * configure.ac:
6f0f660e
EZ
10472 * gdbserver.1: Add (C) after Copyright. Update the FSF
10473 address.
10474
9d1fb177
DJ
104752005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10476
10477 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10478 (arm_breakpoint_at): Recognize both breakpoints.
10479 (the_low_target): Use the correct breakpoint instruction.
10480
011a70c2
DJ
104812005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10482
10483 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10484 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10485 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10486 (the_low_target): Update.
10487
7fb85e41
AS
104882005-10-25 Andreas Schwab <schwab@suse.de>
10489
10490 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10491
10492 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10493 (ia64_num_regs): Reduce to 462.
10494
3db0444b
DJ
104952005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10496
10497 * acinclude.m4: Correct quoting.
10498 * aclocal.m4: Regenerated.
10499
10500 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10501 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10502 (thread_db_init): Call thread_db_err_str.
10503 * configure.ac: Check for TD_VERSION.
10504 * config.in, configure: Regenerated.
10505
bee0189a
DJ
105062005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10507
10508 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10509
e9d25b98
DJ
105102005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10511
10512 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10513 is not available. Define HAVE_PTRACE_GETREGS if it is.
10514 * config.in, configure: Regenerated.
10515 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10516 * linux-i386-low.c, linux-m68k-low.c: Update to use
10517 HAVE_PTRACE_GETREGS.
10518 * linux-low.c (regsets_fetch_inferior_registers)
10519 (regsets_store_inferior_registers): Only return 0 if we processed
10520 GENERAL_REGS.
10521 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10522 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10523
a06660f7
DJ
105242005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10525
10526 * inferiors.c (struct thread_info): Add gdb_id.
10527 (add_thread): Add gdb_id argument.
10528 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10529 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10530 calls to add_thread.
10531 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10532 * server.c (handle_query): Use thread_to_gdb_id.
10533 (handle_v_cont, main): Use gdb_id_to_thread_id.
10534 * server.h (add_thread): Update prototype.
10535 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10536 prototypes.
10537
5a1f5858
DJ
105382005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10539
10540 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10541 left-padded registers.
10542 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10543 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10544
e122f1f5
SE
105452005-07-01 Steve Ellcey <sje@cup.hp.com>
10546
10547 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10548 * configure: Regenerate.
10549 * config.in: Regenerate.
10550 * server.h (NEED_DECLARATION_STRERROR):
10551 Replace with !HAVE_DECL_STRERROR.
10552
d592fa2f
DJ
105532005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10554
10555 * linux-low.c (linux_wait, linux_send_signal): Don't test
10556 an unsigned long variable for > 0 if it could be MAX_ULONG.
10557 * server.c (myresume): Likewise.
10558 * target.c (set_desired_inferior): Likewise.
10559
ccbd4912
MK
105602005-06-13 Mark Kettenis <kettenis@gnu.org>
10561
10562 * configure.ac: Simplify and improve check for socklen_t.
10563 * configure, config.in: Regenerate.
10564
f450004a
DJ
105652005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10566
10567 * acconfig.h: Remove.
10568 * configure.ac: Add a test for socklen_t. Use three-argument
10569 AC_DEFINE throughout.
10570 * config.in: Regenerated using autoheader 2.59.
10571 * configure: Regenerated.
10572
10573 * gdbreplay.c (socklen_t): Provide a default.
10574 (remote_open): Use socklen_t.
10575 * remote-utils.c (socklen_t): Provide a default.
10576 (remote_open): Use socklen_t.
10577 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10578 unsigned char.
10579
10580 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10581 char for buffers.
10582 * linux-low.c (linux_read_memory, linux_write_memory)
10583 (linux_read_auxv): Likewise.
10584 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10585 (check_mem_write): Likewise.
10586 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10587 Likewise.
10588 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10589 (registers_from_string, register_data): Likewise.
10590 * server.c (handle_query, main): Likewise.
10591 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10592 (decode_M_packet): Likewise.
10593 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10594 * target.h (struct target_ops): Update read_memory, write_memory,
10595 and read_auxv.
10596 (read_inferior_memory, write_inferior_memory): Update.
10597 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10598 to unsigned char *.
10599 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10600 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10601 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10602 linux-s390-low.c, linux-sh-low.c: Update for changes in
10603 read_inferior_memory and the_low_target->breakpoint.
10604
eee84df1
DJ
106052005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10606
10607 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10608 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10609 * configure.srv: Add powerpc64-*-linux*.
10610 * linux-ppc64-low.c: New file.
10611
45b134e5
OF
106122005-05-23 Orjan Friberg <orjanf@axis.com>
10613
10614 * linux-cris-low.c: New file with support for CRIS.
10615 * linux-crisv32-low.c: Ditto for CRISv32.
10616 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10617 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10618 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10619 reg-crisv32.o, and reg-crisv32.c to make rules.
10620 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10621 recognized targets.
10622
48d93c75
UW
106232005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10624
10625 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10626 of sizeof (PTRACE_XFER_TYPE).
10627 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10628
e013ee27
OF
106292005-05-12 Orjan Friberg <orjanf@axis.com>
10630
889bf7c5 10631 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10632 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10633 pointers for hardware watchpoint support.
10634 * linux-low.h (struct linux_target_ops): Ditto.
10635 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10636 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10637 to linux_target_ops.
10638 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10639 reply packet.
10640 * server.c (main): Recognize 'Z' and 'z' packets.
10641
b0ded00b
UW
106422005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10643
10644 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10645 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10646 (the_low_target): Add new members.
10647
8643e2ad
DJ
106482005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10649
10650 * proc-service.c (ps_lgetregs): Search all_processes instead of
10651 all_threads.
10652
fc620387
DJ
106532005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10654
10655 * server.c (start_inferior): Change return type to int.
10656 (attach_inferior): Change sigptr to int *.
10657 (handle_v_cont, handle_v_requests): Change signal to int *.
10658 (main): Change signal to int.
10659
106602005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10661
10662 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10663 * configure.srv: Add m32r*-*-linux*.
10664 * linux-m32r-low.c: New file.
10665
e0e76420
DJ
106662005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10667
10668 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10669
a1928bad
DJ
106702005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10671
10672 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10673 Take unsigned long arguments for PIDs.
10674 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10675 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10676 (wait_for_sigstop, linux_resume_one_process)
10677 (regsets_fetch_inferior_registers, linux_send_signal)
10678 (linux_read_auxv): Likewise. Update the types of variables holding
10679 PIDs. Update format string specifiers.
10680 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10681 * remote-utils.c (prepare_resume_reply): Likewise.
10682 * server.c (cont_thread, general_thread, step_thread)
10683 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10684 unsigned long.
10685 (handle_query): Update format specifiers.
10686 (handle_v_cont, main): Use strtoul for thread IDs.
10687 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10688 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10689 (general_thread, step_thread, thread_from_wait)
10690 (old_thread_from_wait): Update.
10691 * target.h (struct thread_resume): Use unsigned long for THREAD.
10692 (struct target_ops): Use unsigned long for arguments to attach and
10693 thread_alive.
10694
dcdb98d2
DJ
106952005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10696
10697 * acinclude.m4: Include bfd/bfd.m4 directly.
10698 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10699 <agriffis@toolchain.org>.
10700 * aclocal.m4, configure: Regenerated.
10701
bec39cab
AC
107022005-01-07 Andrew Cagney <cagney@gnu.org>
10703
10704 * configure.ac: Rename configure.in, require autoconf 2.59.
10705 * configure: Re-generate.
10706
434c4c77
DJ
107072004-12-08 Daniel Jacobowitz <dan@debian.org>
10708
10709 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10710 LIBS when finished.
10711 * aclocal.m4: Regenerated.
10712 * configure: Regenerated.
10713
db1d3e1b
AS
107142004-11-21 Andreas Schwab <schwab@suse.de>
10715
10716 * linux-m68k-low.c (m68k_num_gregs): Define.
10717 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10718 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10719 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10720 (m68k_breakpoint_at): New. Add to the_low_target.
10721
10722 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10723 srv_linux_thread_db to yes.
10724
43360365
JB
107252004-10-20 Joel Brobecker <brobecker@gnat.com>
10726
10727 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10728 (ARCH_SET_FS): Likewise.
10729 (ARCH_GET_FS): Likewise.
10730 (ARCH_GET_GS): Likewise.
10731
fd500816
DJ
107322004-10-16 Daniel Jacobowitz <dan@debian.org>
10733
10734 * linux-i386-low.c (ps_get_thread_area): New.
10735 * linux-x86-64-low.c (ps_get_thread_area): New.
10736 * linux-low.c: Include <sys/syscall.h>.
10737 (linux_kill_one_process): Don't kill the first thread here.
10738 (linux_kill): Kill the first thread here.
10739 (kill_lwp): New function.
10740 (send_sigstop, linux_send_signal): Use it.
10741 * proc-service.c: Clean up #ifdefs.
10742 (fpregset_info): Delete.
10743 (ps_lgetregs): Update and enable implementation.
10744 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10745 implementations.
10746 * remote-utils.c (struct sym_cache, symbol_cache): New.
10747 (input_interrupt): Print a clearer message.
10748 (async_io_enabled): New variable.
10749 (enable_async_io, disable_async_io): Use it. Update comments.
10750 (look_up_one_symbol): Use the symbol cache.
10751 * thread-db.c (thread_db_look_up_symbols): New function.
10752 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10753
f6de3c42
DJ
107542004-10-16 Daniel Jacobowitz <dan@debian.org>
10755
10756 * configure.in: Test for -rdynamic.
10757 * configure: Regenerated.
10758 * Makefile (INTERNAL_LDFLAGS): New.
10759 (gdbserver, gdbreplay): Use it.
10760
2c0fc042
AC
107612004-09-02 Andrew Cagney <cagney@gnu.org>
10762
10763 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10764
075b3282
DJ
107652004-03-23 Daniel Jacobowitz <drow@mvista.com>
10766
10767 * linux-low.c (linux_wait): Clear all_processes list also.
10768
fa6a77dc
DJ
107692004-03-12 Daniel Jacobowitz <drow@mvista.com>
10770
10771 * linux-low.c: Include <errno.h>. Remove extern declaration of
10772 errno.
10773
6d782a97
DJ
107742004-03-12 Daniel Jacobowitz <drow@mvista.com>
10775
10776 * gdbreplay.c, server.h, utils.c: Update copyright years.
10777
3a7fb99b
DJ
107782004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10779
10780 * server.c (main): Print child status or termination signal from
10781 variable 'signal', not 'sig'.
10782
c3e735a6
DJ
107832004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10784
10785 * linux-low.c (linux_read_memory): Change return type to
10786 int. Check for and return error from ptrace().
10787 * target.c (read_inferior_memory): Change return type to int. Pass
10788 back return status from the_target->read_memory().
10789 * target.h (struct target_ops): Adapt *read_memory() prototype.
10790 Update comment.
10791 (read_inferior_memory): Adapt prototype.
10792 * server.c (main): Return an error packet if
10793 read_inferior_memory() returns an error.
10794
a59d1c82
DJ
107952004-03-04 Daniel Jacobowitz <drow@mvista.com>
10796
10797 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10798 Unify with other clean targets.
10799
dc3f8883
DJ
108002004-02-29 Daniel Jacobowitz <drow@mvista.com>
10801
10802 * server.c (handle_v_cont): Call set_desired_inferior.
10803
89a208da
DJ
108042004-02-29 Daniel Jacobowitz <drow@mvista.com>
10805
10806 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10807
62ea82f5
DJ
108082004-02-29 Daniel Jacobowitz <drow@mvista.com>
10809
10810 * linux-low.c (linux_wait): Unblock async I/O.
10811 (linux_resume): Block and enable async I/O.
10812 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10813 * server.h (block_async_io, unblock_async_io): Add prototypes.
10814
6910d122
DJ
108152004-02-29 Daniel Jacobowitz <drow@mvista.com>
10816
10817 * remote-utils.c (remote_open): Print a status notice after
10818 opening a TCP port.
10819 * server.c (attach_inferior): Print a status notice after
10820 attaching.
10821
108222004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10823
10824 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10825
c89dc5d4
DJ
108262004-02-26 Daniel Jacobowitz <drow@mvista.com>
10827
10828 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10829 error packet.
10830 * server.c, target.h: Update copyright years.
10831
4b8dad4a
RM
108322004-02-25 Roland McGrath <roland@redhat.com>
10833
10834 * target.h (struct target_ops): New member `read_auxv'.
10835 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10836 * linux-low.c (linux_read_auxv): New function.
10837 (linux_target_ops): Initialize `read_auxv' member to that.
10838
d7446758
JB
108392004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10840
10841 Committed by Jim Blandy <jimb@redhat.com>.
10842
10843 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10844 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10845 instead of GPR_SIZE to distiguish s390 and s390x targets.
10846
5544ad89
DJ
108472004-01-31 Daniel Jacobowitz <drow@mvista.com>
10848
10849 * linux-low.c: Update copyright year.
10850 (check_removed_breakpoint): Clear pending_is_breakpoint.
10851 (linux_set_resume_request, linux_queue_one_thread)
10852 (resume_status_pending_p): New functions.
10853 (linux_continue_one_thread): Use process->resume.
10854 (linux_resume): Only resume threads if there are no pending events.
10855 * linux-low.h (struct process_info): Add resume request
10856 pointer.
10857
2a68b70e
DJ
108582004-01-30 Daniel Jacobowitz <drow@mvista.com>
10859
10860 * regcache.c (new_register_cache): Clear the allocated register
10861 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10862
64386c31
DJ
108632003-10-13 Daniel Jacobowitz <drow@mvista.com>
10864
10865 * linux-low.c (linux_resume): Take a struct thread_resume *
10866 argument.
10867 (linux_wait): Update call.
10868 (resume_ptr): New static variable.
10869 (linux_continue_one_thread): Renamed from
10870 linux_continue_one_process. Use resume_ptr.
10871 (linux_resume): Use linux_continue_one_thread.
10872 * server.c (handle_v_cont, handle_v_requests): New functions.
10873 (myresume): New function.
10874 (main): Handle 'v' case.
10875 * target.h (struct thread_resume): New type.
10876 (struct target_ops): Change argument of "resume" to struct
10877 thread_resume *.
10878 (myresume): Delete macro.
10879
c938e9b0
L
108802003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10881
10882 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10883 (uninstall): Support DESTDIR.
10884
7f313d07
BC
10885Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10886
10887 * configure.srv: Add xscale*linux copy of arm*linux entry.
10888
3b2fc2ea
DJ
108892003-07-24 Daniel Jacobowitz <drow@mvista.com>
10890
10891 * linux-arm-low.c (arm_reinsert_addr): New function.
10892 (the_low_target): Add arm_reinsert_addr.
10893
1c0a559e
MK
108942003-07-08 Mark Kettenis <kettenis@gnu.org>
10895
10896 * mem-break.c: Remove whitespace at end of file.
10897
43d5792c
DJ
108982003-06-28 Daniel Jacobowitz <drow@mvista.com>
10899
10900 * configure.in: Check whether we need to prototype strerror.
10901 * server.h: Optionally prototype strerror.
10902 * gdbreplay.c (perror_with_name): Use strerror.
10903 * linux-low.c (linux_attach_lwp): Use strerror.
10904 * utils.c (perror_with_name): Use strerror.
10905 * config.in, configure: Regenerated.
10906
c8a86edf
DJ
109072003-06-28 Daniel Jacobowitz <drow@mvista.com>
10908
10909 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10910 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10911
73d37363
DJ
109122003-06-20 Daniel Jacobowitz <drow@mvista.com>
10913
10914 * Makefile.in (SFILES): Update.
10915 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10916 low-sun3.c: Remove files.
10917
6ad8ae5c
DJ
109182003-06-17 Daniel Jacobowitz <drow@mvista.com>
10919
10920 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10921 (linux_detach_one_process, linux_detach): New functions.
10922 (linux_target_ops): Add linux_detach.
10923 * server.c (main): Handle 'D' packet.
10924 * target.h (struct target_ops): Add "detach" member.
10925 (detach_inferior): Define.
10926
1581182a
MK
109272003-06-13 Mark Kettenis <kettenis@gnu.org>
10928
10929 From Kelley Cook <kelleycook@wideopenwest.com>:
10930 * configure.srv: Accept i[34567]86 variants.
10931
e5379b03
DJ
109322003-06-05 Daniel Jacobowitz <drow@mvista.com>
10933
10934 * linux-low.c (linux_wait_for_event): Correct comment typos.
10935 (linux_resume_one_process): Call check_removed_breakpoint.
10936 (linux_send_signal): New function.
10937 (linux_target_ops): Add linux_send_signal.
10938 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10939 of kill.
10940 * target.h (struct target_ops): Add send_signal.
10941
2ff29de4
JB
109422003-05-29 Jim Blandy <jimb@redhat.com>
10943
10944 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10945 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10946 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10947 away part of the register's value.
10948
254787d4
DJ
109492003-03-26 Daniel Jacobowitz <drow@mvista.com>
10950
10951 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10952 (linux_wait_for_event, linux_init_signals): Likewise.
10953
94e10508
DJ
109542003-03-17 Daniel Jacobowitz <drow@mvista.com>
10955
10956 * configure.in: Check for stdlib.h.
10957 * configure: Regenerated.
10958 * config.in: Regenerated.
10959
4c0711e0
DJ
109602003-01-04 Andreas Schwab <schwab@suse.de>
10961
10962 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10963
ef66e766
AC
109642003-01-02 Andrew Cagney <ac131313@redhat.com>
10965
10966 * Makefile.in: Remove obsolete code.
10967
a1358604
DJ
109682002-11-20 Daniel Jacobowitz <drow@mvista.com>
10969
10970 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10971 defined(PT_FPR0_HI).
10972
23ce3b1c
DJ
109732002-11-17 Stuart Hughes <seh@zee2.com>
10974
10975 * linux-arm-low.c (arm_num_regs): Increase.
10976 (arm_regmap): Include status register.
10977
109782002-11-17 Daniel Jacobowitz <drow@mvista.com>
10979
10980 * linux-low.c (register_addr): Remove incorrect -1 check.
10981
a9fa9f7d
DJ
109822002-08-29 Daniel Jacobowitz <drow@mvista.com>
10983
10984 * linux-low.c (linux_create_inferior): Call setpgid. Return
10985 the new PID.
10986 (unstopped_p, linux_signal_pid): Remove.
10987 (linux_target_ops): Remove linux_signal_pid.
10988 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10989 global instead of target method.
10990 * target.h (struct target_ops): Remove signal_pid. Update comment
10991 for create_inferior.
10992 * server.c (signal_pid): New variable.
10993 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10994 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10995 (attach_inferior): Set signal_pid.
10996
17574093
DJ
109972002-08-23 Daniel Jacobowitz <drow@mvista.com>
10998
10999 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11000
110012002-08-20 Jim Blandy <jimb@redhat.com>
11002
11003 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11004 default for this.
11005
110062002-08-01 Andrew Cagney <cagney@redhat.com>
11007
11008 * Makefile.in: Make chill references obsolete.
11009
110102002-07-24 Kevin Buettner <kevinb@redhat.com>
11011
11012 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11013 * configure: Regenerate.
11014 * config.in: Regenerate.
11015
110162002-07-09 David O'Brien <obrien@FreeBSD.org>
11017
11018 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11019 (perror_with_name, remote_close, remote_open, expect, play): Static.
11020
110212002-07-04 Michal Ludvig <mludvig@suse.cz>
11022
4b8dad4a 11023 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11024 byte offsets instead of an array of indexes.
11025 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11026
110272002-06-13 Daniel Jacobowitz <drow@mvista.com>
11028
11029 * regcache.c: Add comment.
11030
110312002-06-11 Daniel Jacobowitz <drow@mvista.com>
11032
11033 * thread-db.c: New file.
11034 * proc-service.c: New file.
11035 * acinclude.m4: New file.
11036 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11037 proc-service.o, and thread-db.o.
11038 (linux-low.o): Add USE_THREAD_DB.
11039 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11040 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11041 * aclocal.m4: Regenerated.
11042 * config.in: Regenerated.
11043 * configure: Regenerated.
11044 * configure.in: Check for proc_service.h, sys/procfs.h,
11045 thread_db.h, and linux/elf.h headrs.
11046 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11047 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11048 Check for -lthread_db and thread support.
11049 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11050 PowerPC, and SuperH.
11051 * i387-fp.c: Constify arguments.
11052 * i387-fp.h: Likewise.
11053 * inferiors.c: (struct thread_info): Renamed from
11054 `struct inferior_info'. Remove PID member. Use generic inferior
11055 list header. All uses updated.
11056 (inferiors, signal_pid): Removed.
11057 (all_threads): New variable.
11058 (get_thread): Define.
11059 (add_inferior_to_list): New function.
11060 (for_each_inferior): New function.
11061 (change_inferior_id): New function.
11062 (add_inferior): Removed.
11063 (remove_inferior): New function.
11064 (add_thread): New function.
11065 (free_one_thread): New function.
11066 (remove_thread): New function.
11067 (clear_inferiors): Use for_each_inferior and free_one_thread.
11068 (find_inferior): New function.
11069 (find_inferior_id): New function.
11070 (inferior_target_data): Update argument type.
11071 (set_inferior_target_data): Likewise.
11072 (inferior_regcache_data): Likewise.
11073 (set_inferior_regcache_data): Likewise.
11074 * linux-low.c (linux_bp_reinsert): Remove.
11075 (all_processes, stopping_threads, using_thrads)
11076 (struct pending_signals, debug_threads, pid_of): New.
11077 (inferior_pid): Replace with macro.
11078 (struct inferior_linux_data): Remove.
11079 (get_stop_pc, add_process): New functions.
11080 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11081 Use add_process and add_thread.
11082 (linux_attach_lwp): New function, based on old linux_attach. Use
11083 add_process and add_thread. Set stop_expected for new threads.
11084 (linux_attach): New function.
11085 (linux_kill_one_process): New function.
11086 (linux_kill): Kill all LWPs.
11087 (linux_thread_alive): Use find_inferior_id.
11088 (check_removed_breakpoints, status_pending_p): New functions.
11089 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11090 Update. Use WNOHANG. Wait for cloned processes also. Update process
11091 struct for the found process.
11092 (linux_wait_for_event): New function.
11093 (linux_wait): Use it. Support LWPs.
11094 (send_sigstop, wait_for_sigstop, stop_all_processes)
11095 (linux_resume_one_process, linux_continue_one_process): New functions.
11096 (linux_resume): Support LWPs.
11097 (REGISTER_RAW_SIZE): Remove.
11098 (fetch_register): Use register_size instead. Call supply_register.
11099 (usr_store_inferior_registers): Likewise. Call collect_register.
11100 Fix recursive case.
11101 (regsets_fetch_inferior_registers): Improve error message.
11102 (regsets_store_inferior_registers): Add debugging.
11103 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11104 (unstopped_p, linux_signal_pid): New functions.
11105 (linux_target_ops): Add linux_signal_pid.
11106 (linux_init_signals): New function.
11107 (initialize_low): Call it. Initialize using_threads.
11108 * regcache.c (inferior_regcache_data): Add valid
11109 flag.
11110 (get_regcache): Fetch registers lazily. Add fetch argument
11111 and update all callers.
11112 (regcache_invalidate_one, regcache_invalidate): New
11113 functions.
11114 (new_register_cache): Renamed from create_register_cache.
11115 Return the new regcache.
11116 (free_register_cache): Change argument to a void *.
11117 (registers_to_string, registers_from_string): Call get_regcache
11118 with fetch flag set.
11119 (register_data): Make static. Pass fetch flag to get_regcache.
11120 (supply_register): Call get_regcache with fetch flag clear.
11121 (collect_register): Call get_regcache with fetch flag set.
11122 (collect_register_as_string): New function.
11123 * regcache.h: Update.
11124 * remote-utils.c (putpkt): Flush after debug output and use
11125 stderr.
11126 Handle input interrupts while waiting for an ACK.
11127 (input_interrupt): Use signal_pid method.
11128 (getpkt): Flush after debug output and use stderr.
11129 (outreg): Use collect_register_as_string.
11130 (new_thread_notify, dead_thread_notify): New functions.
11131 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11132 and general_thread.
11133 (look_up_one_symbol): Flush after debug output.
11134 * server.c (step_thread, server_waiting): New variables.
11135 (start_inferior): Don't use signal_pid. Update call to mywait.
11136 (attach_inferior): Update call to mywait.
11137 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11138 (main): Don't fetch/store registers explicitly. Use
11139 set_desired_inferior. Support proposed ``Hs'' packet. Update
11140 calls to mywait.
11141 * server.h: Update.
11142 (struct inferior_list, struct_inferior_list_entry): New.
11143 * target.c (set_desired_inferior): New.
11144 (write_inferior_memory): Constify.
11145 (mywait): New function.
11146 * target.h: Update.
11147 (struct target_ops): New signal_pid method.
11148 (mywait): Removed macro, added prototype.
11149
11150 * linux-low.h (regset_func): Removed.
11151 (regset_fill_func, regset_store_func): New.
11152 (enum regset_type): New.
11153 (struct regset_info): Add type field. Use new operation types.
11154 (struct linux_target_ops): stop_pc renamed to get_pc.
11155 Add decr_pc_after_break and breakpoint_at.
11156 (get_process, get_thread_proess, get_process_thread)
11157 (strut process_info, all_processes, linux_attach_lwp)
11158 (thread_db_init): New.
11159
11160 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11161 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11162 (the_low_target): Add new members.
11163 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11164 (i386_store_fpxregset): Constify.
11165 (target_regsets): Add new kind identifier.
11166 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11167 (i386_set_pc): Add debugging.
11168 (i386_breakpoint_at): New function.
11169 (the_low_target): Add new members.
11170 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11171 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11172 (mips_breakpoint_at): New.
11173 (the_low_target): Add new members.
11174 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11175 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11176 (the_low_target): Add new members.
11177 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11178 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11179 (the_low_target): Add new members.
11180 * linux-x86-64-low.c (target_regsets): Add new kind
11181 identifier.
11182
111832002-05-15 Daniel Jacobowitz <drow@mvista.com>
11184
11185 From Martin Pool <mbp@samba.org>:
11186 * server.c (gdbserver_usage): New function.
11187 (main): Call it.
11188
111892002-05-14 Daniel Jacobowitz <drow@mvista.com>
11190
11191 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11192 stop_at -> stop_pc.
11193
111942002-05-04 Andrew Cagney <ac131313@redhat.com>
11195
11196 * Makefile.in: Remove obsolete code.
11197
111982002-04-24 Michal Ludvig <mludvig@suse.cz>
11199
11200 * linux-low.c (regsets_fetch_inferior_registers),
11201 (regsets_store_inferior_registers): Removed cast to int from
11202 ptrace() calls.
11203 * regcache.h: Added declaration of struct inferior_info.
11204
112052002-04-20 Daniel Jacobowitz <drow@mvista.com>
11206
11207 * inferiors.c (struct inferior_info): Add regcache_data.
11208 (add_inferior): Call create_register_cache.
11209 (clear_inferiors): Call free_register_cache.
11210 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11211 * regcache.c (struct inferior_regcache_data): New.
11212 (registers): Remove.
11213 (get_regcache): New function.
11214 (create_register_cache, free_register_cache): New functions.
11215 (set_register_cache): Don't initialize the register cache here.
11216 (registers_to_string, registers_from_string, register_data): Call
11217 get_regcache.
11218 * regcache.h: Add prototypes.
11219 * server.h: Likewise.
11220
112212002-04-20 Daniel Jacobowitz <drow@mvista.com>
11222
11223 * mem-break.c: New file.
11224 * mem-break.h: New file.
11225 * Makefile.in: Add mem-break.o rule; update server.h
11226 dependencies.
11227 * inferiors.c (struct inferior_info): Add target_data
11228 member.
11229 (clear_inferiors): Free target_data member if set.
11230 (inferior_target_data, set_inferior_target_data): New functions.
11231 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11232 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11233 * linux-low.c (linux_bp_reinsert): New variable.
11234 (struct inferior_linux_data): New.
11235 (linux_create_inferior): Use set_inferior_target_data.
11236 (linux_attach): Likewise. Call add_inferior.
11237 (linux_wait_for_one_inferior): New function.
11238 (linux_wait): Call it.
11239 (linux_write_memory): Add const.
11240 (initialize_low): Call set_breakpoint_data.
11241 * linux-low.h (struct linux_target_ops): Add breakpoint
11242 handling members.
11243 * server.c (attach_inferior): Remove extra add_inferior
11244 call.
11245 * server.h: Include mem-break.h. Update inferior.c
11246 prototypes.
11247 * target.c (read_inferior_memory)
11248 (write_inferior_memory): New functions.
11249 * target.h (read_inferior_memory)
11250 (write_inferior_memory): Change macros to prototypes.
11251 (struct target_ops): Update comments. Add const to write_memory
11252 definition.
11253
112542002-04-11 Daniel Jacobowitz <drow@mvista.com>
11255
11256 * linux-low.c (usr_store_inferior_registers): Support
11257 registers which are allowed to fail to store.
11258 * linux-low.h (linux_target_ops): Likewise.
11259 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11260 (ppc_cannot_store_register): FPSCR may not be storable.
11261
112622002-04-09 Daniel Jacobowitz <drow@mvista.com>
11263
11264 * server.h: Include <string.h> if HAVE_STRING_H.
11265 * ChangeLog: Correct paths in last ChangeLog entry.
11266
112672002-04-09 Daniel Jacobowitz <drow@mvista.com>
11268
11269 * linux-low.h: Remove obsolete prototypes.
11270 (struct linux_target_ops): New.
11271 (extern the_low_target): New.
11272 * linux-low.c (num_regs, regmap): Remove declarations.
11273 (register_addr): Use the_low_target explicitly.
11274 (fetch_register): Likewise.
11275 (usr_fetch_inferior_registers): Likewise.
11276 (usr_store_inferior_registers): Likewise.
11277 * linux-arm-low.c (num_regs): Remove.
11278 (arm_num_regs): Define.
11279 (arm_regmap): Renamed from regmap, made static.
11280 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11281 made static.
11282 (arm_cannot_store_register): Renamed from cannot_store_register,
11283 made static.
11284 (the_low_target): New.
11285 * linux-i386-low.c (num_regs): Remove.
11286 (i386_num_regs): Define.
11287 (i386_regmap): Renamed from regmap, made static.
11288 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11289 made static.
11290 (i386_cannot_store_register): Renamed from cannot_store_register,
11291 made static.
11292 (the_low_target): New.
11293 * linux-ia64-low.c (num_regs): Remove.
11294 (ia64_num_regs): Define.
11295 (ia64_regmap): Renamed from regmap, made static.
11296 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11297 made static.
11298 (ia64_cannot_store_register): Renamed from cannot_store_register,
11299 made static.
11300 (the_low_target): New.
11301 * linux-m68k-low.c (num_regs): Remove.
11302 (m68k_num_regs): Define.
11303 (m68k_regmap): Renamed from regmap, made static.
11304 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11305 made static.
11306 (m68k_cannot_store_register): Renamed from cannot_store_register,
11307 made static.
11308 (the_low_target): New.
11309 * linux-mips-low.c (num_regs): Remove.
11310 (mips_num_regs): Define.
11311 (mips_regmap): Renamed from regmap, made static.
11312 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11313 made static.
11314 (mips_cannot_store_register): Renamed from cannot_store_register,
11315 made static.
11316 (the_low_target): New.
11317 * linux-ppc-low.c (num_regs): Remove.
11318 (ppc_num_regs): Define.
11319 (ppc_regmap): Renamed from regmap, made static.
11320 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11321 made static.
11322 (ppc_cannot_store_register): Renamed from cannot_store_register,
11323 made static.
11324 (the_low_target): New.
11325 * linux-s390-low.c (num_regs): Remove.
11326 (s390_num_regs): Define.
11327 (s390_regmap): Renamed from regmap, made static.
11328 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11329 made static.
11330 (s390_cannot_store_register): Renamed from cannot_store_register,
11331 made static.
11332 (the_low_target): New.
11333 * linux-sh-low.c (num_regs): Remove.
11334 (sh_num_regs): Define.
11335 (sh_regmap): Renamed from regmap, made static.
11336 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11337 made static.
11338 (sh_cannot_store_register): Renamed from cannot_store_register,
11339 made static.
11340 (the_low_target): New.
11341 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11342 (the_low_target): New.
11343
113442002-04-09 Daniel Jacobowitz <drow@mvista.com>
11345
11346 * Makefile.in: Add stamp-h target.
11347 * configure.in: Create stamp-h.
11348 * configure: Regenerated.
11349
113502002-04-09 Daniel Jacobowitz <drow@mvista.com>
11351
11352 * inferiors.c: New file.
11353 * target.c: New file.
11354 * target.h: New file.
11355 * Makefile.in: Add target.o and inferiors.o. Update
11356 dependencies.
11357 * linux-low.c (inferior_pid): New static variable,
11358 moved from server.c.
11359 (linux_create_inferior): Renamed from create_inferior.
11360 Call add_inferior. Return 0 on success instead of a PID.
11361 (linux_attach): Renamed from myattach.
11362 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11363 (linux_thread_alive): Renamed from mythread_alive.
11364 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11365 child dies.
11366 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11367 (regsets_store_inferior_registers): Correct error message.
11368 Add missing ``return 0''.
11369 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11370 (linux_store_registers): Renamed from store_inferior_registers.
11371 (linux_read_memory): Renamed from read_inferior_memory.
11372 (linux_write_memory): Renamed from write_inferior_memory.
11373 (linux_target_ops): New structure.
11374 (initialize_low): Call set_target_ops ().
11375 * remote-utils.c (unhexify): New function.
11376 (hexify): New function.
11377 (input_interrupt): Send signals to ``signal_pid''.
11378 * server.c (inferior_pid): Remove.
11379 (start_inferior): Update create_inferior call.
11380 (attach_inferior): Call add_inferior.
11381 (handle_query): New function.
11382 (main): Call handle_query for `q' packets.
11383 * server.h: Include "target.h". Remove obsolete prototypes.
11384 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11385
113862002-04-09 Daniel Jacobowitz <drow@mvista.com>
11387
11388 * Makefile.in: Add WARN_CFLAGS. Update configury
11389 dependencies.
11390 * configure.in: Check for <string.h>
11391 * configure: Regenerate.
11392 * config.in: Regenerate.
11393 * gdbreplay.c: Include needed system headers.
11394 (remote_open): Remove strchr prototype.
11395 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11396 * regcache.c (supply_register): Change buf argument to const void *.
11397 (supply_register_by_name): Likewise.
11398 (collect_register): Change buf argument to void *.
11399 (collect_register_by_name): Likewise.
11400 * regcache.h: Add missing prototypes.
11401 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11402 * server.c (handle_query): New function.
11403 (attached): New static variable, moved out of main.
11404 (main): Quiet longjmp clobber warnings.
11405 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11406 * utils.c (error): Remove NORETURN.
11407 (fatal): Likewise.
This page took 1.458955 seconds and 4 git commands to generate.