]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Move linux_find_memory_regions_full & co.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
9904185c
JK
12015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2 Jan Kratochvil <jan.kratochvil@redhat.com>
3
4 * target.c: Include target/target-utils.h and fcntl.h.
5 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6 (target_fileio_read_stralloc): New functions.
7
6e5b4429
JK
82015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9
10 * Makefile.in (OBS): Add gdb_regex.o.
11 (gdb_regex.o): New.
12 * config.in: Rebuilt.
13 * configure: Rebuilt.
14
ddc98fbf
JK
152015-07-15 Aleksandar Ristovski <aristovski@qnx.com
16 Jan Kratochvil <jan.kratochvil@redhat.com>
17
18 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
19 * Makefile.in (OBS): Add target-utils.o.
20 (linux-maps.o, target-utils.o): New.
21 * configure.srv (srv_linux_obj): Add linux-maps.o.
22
e57bb7a0
PL
232015-07-15 Pierre Langlois <pierre.langlois@arm.com>
24
25 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
26 function, return 1.
27 (the_low_target): Install it.
28
586b02a9
PA
292015-07-14 Pedro Alves <palves@redhat.com>
30
31 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
32 Instead, ignore ECHILD, and throw an error for other errnos.
33
58c1b36c
PA
342015-07-10 Pedro Alves <palves@redhat.com>
35
36 * event-loop.c (struct callback_event) <data>: Change type to
37 gdb_client_data instance instead of gdb_client_data pointer.
38 (append_callback_event): Adjust.
39
421530db
PL
402015-07-10 Pierre Langlois <pierre.langlois@arm.com>
41
42 * linux-aarch64-low.c: Add comments for each linux_target_ops
43 method. Remove comments already covered in target_ops and
44 linux_target_ops definitions.
45 (the_low_target): Add comments for each unimplemented method.
46
c2d65f38
YQ
472015-07-09 Yao Qi <yao.qi@linaro.org>
48
49 * linux-aarch64-low.c (aarch64_regmap): Remove.
50 (aarch64_usrregs_info): Remove.
51 (regs_info): Set field usrregs to NULL.
52
b20a6524
MM
532015-07-02 Markus Metzger <markus.t.metzger@intel.com>
54
55 * linux-low.c: Include "rsp-low.h"
56 (linux_low_encode_pt_config, linux_low_encode_raw): New.
57 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
58 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
59 (handle_btrace_enable_pt): New.
60 (handle_btrace_general_set): Support "pt".
61 (handle_btrace_conf_general_set): Support "pt:size".
62
96c97461
PL
632015-06-29 Pierre Langlois <pierre.langlois@arm.com>
64
65 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
66 Z_PACKET_SW_BP.
67
37d66942
PL
682015-06-29 Pierre Langlois <pierre.langlois@arm.com>
69
70 * linux-aarch64-low.c: Remove comment about endianness.
71 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
72 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
73 memcmp.
74
dc06243f
GB
752015-06-24 Gary Benson <gbenson@redhat.com>
76
77 * linux-i386-ipa.c (stdint.h): Do not include.
78 * lynx-i386-low.c (stdint.h): Likewise.
79 * lynx-ppc-low.c (stdint.h): Likewise.
80 * mem-break.c (stdint.h): Likewise.
81 * thread-db.c (stdint.h): Likewise.
82 * tracepoint.c (stdint.h): Likewise.
83 * win32-low.c (stdint.h): Likewise.
84
124e13d9
SM
852015-06-18 Simon Marchi <simon.marchi@ericsson.com>
86
87 * server.c (write_qxfer_response): Update call to
88 remote_escape_output.
89
909c2cda
JK
902015-06-15 Aleksandar Ristovski <aristovski@qnx.com
91 Jan Kratochvil <jan.kratochvil@redhat.com>
92
93 Merge multiple hex conversions.
94 * gdbreplay.c (tohex): Rename to 'fromhex'.
95 (logchar): Use fromhex.
96
24c05f46
JK
972015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
98
99 * server.c (handle_qxfer_libraries): Set `version' attribute for
100 <library-list>.
101
14d2069a
GB
1022015-06-10 Gary Benson <gbenson@redhat.com>
103
104 * target.h (struct target_ops) <multifs_open>: New field.
105 <multifs_unlink>: Likewise.
106 <multifs_readlink>: Likewise.
107 * linux-low.c (nat/linux-namespaces.h): New include.
108 (linux_target_ops): Initialize the_target->multifs_open,
109 the_target->multifs_unlink and the_target->multifs_readlink.
110 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
111 * hostio.c (hostio_fs_pid): New static variable.
112 (hostio_handle_new_gdb_connection): New function.
113 (handle_setfs): Likewise.
114 (handle_open): Use the_target->multifs_open as appropriate.
115 (handle_unlink): Use the_target->multifs_unlink as appropriate.
116 (handle_readlink): Use the_target->multifs_readlink as
117 appropriate.
118 (handle_vFile): Handle vFile:setfs packets.
119 * server.c (handle_query): Call hostio_handle_new_gdb_connection
120 after target_handle_new_gdb_connection.
121
4b8b5e72
GB
1222015-06-10 Gary Benson <gbenson@redhat.com>
123
124 * configure.ac (AC_CHECK_FUNCS): Add setns.
125 * config.in: Regenerate.
126 * configure: Likewise.
127 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
128 (linux-namespaces.o): New rule.
129 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
130
3ac2e371
GB
1312015-06-09 Gary Benson <gbenson@redhat.com>
132
133 * hostio.c (handle_open): Process mode argument with
134 fileio_to_host_mode.
135
ca9b78ce
YQ
1362015-06-01 Yao Qi <yao.qi@linaro.org>
137
138 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
139 * linux-x86-low.c: Likewise.
140
bfacd19d
DB
1412015-05-28 Don Breazeal <donb@codesourcery.com>
142
143 * linux-low.c (handle_extended_wait): Initialize
144 thread_info.last_resume_kind for new fork children.
145
452003ef
PA
1462015-05-15 Pedro Alves <palves@redhat.com>
147
148 * target.h (target_handle_new_gdb_connection): Rewrite using if
149 wrapped in do/while.
150
1041a03c
JB
1512015-05-14 Joel Brobecker <brobecker@adacore.com>
152
153 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
154 * configure, config.in: Regenerate.
155 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
156 Declare typedef.
157
c269dbdb
DB
1582015-05-12 Don Breazeal <donb@codesourcery.com>
159
160 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
161 PTRACE_EVENT_VFORK_DONE.
162 (linux_low_ptrace_options, extended_event_reported): Add vfork
163 events.
164 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
165 and "vforkdone" for RSP 'T' Stop Reply Packet.
166 * server.h (report_vfork_events): Declare
167 global variable.
168
3a8a0396
DB
1692015-05-12 Don Breazeal <donb@codesourcery.com>
170
171 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
172 (the_low_target) <new_fork>: Initialize new member.
173 * linux-arm-low.c (arm_new_fork): New function.
174 (the_low_target) <new_fork>: Initialize new member.
175 * linux-low.c (handle_extended_wait): Call new target function
176 new_fork.
177 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
178 * linux-mips-low.c (mips_add_watchpoint): New function
179 extracted from mips_insert_point.
180 (the_low_target) <new_fork>: Initialize new member.
181 (mips_linux_new_fork): New function.
182 (mips_insert_point): Call mips_add_watchpoint.
183 * linux-x86-low.c (x86_linux_new_fork): New function.
184 (the_low_target) <new_fork>: Initialize new member.
185
de0d863e
DB
1862015-05-12 Don Breazeal <donb@codesourcery.com>
187
188 * linux-low.c (handle_extended_wait): Implement return value,
189 rename argument 'event_child' to 'event_lwp', handle
190 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
191 (linux_low_ptrace_options): New function.
192 (linux_low_filter_event): Call linux_low_ptrace_options,
193 use different argument fo linux_enable_event_reporting,
194 use return value from handle_extended_wait.
195 (extended_event_reported): New function.
196 (linux_wait_1): Call extended_event_reported and set
197 status to report fork events.
198 (linux_write_memory): Add pid to debug message.
199 (reset_lwp_ptrace_options_callback): New function.
200 (linux_handle_new_gdb_connection): New function.
201 (linux_target_ops): Initialize new structure member.
202 * linux-low.h (struct lwp_info) <waitstatus>: New member.
203 * lynx-low.c: Initialize new structure member.
204 * remote-utils.c (prepare_resume_reply): Implement stop reason
205 "fork" for "T" stop message.
206 * server.c (handle_query): Call handle_new_gdb_connection.
207 * server.h (report_fork_events): Declare global flag.
208 * target.h (struct target_ops) <handle_new_gdb_connection>:
209 New member.
210 (target_handle_new_gdb_connection): New macro.
211 * win32-low.c: Initialize new structure member.
212
ddcbc397
DB
2132015-05-12 Don Breazeal <donb@codesourcery.com>
214
215 * mem-break.c (APPEND_TO_LIST): Define macro.
216 (clone_agent_expr): New function.
217 (clone_one_breakpoint): New function.
218 (clone_all_breakpoints): New function.
219 * mem-break.h: Declare new functions.
220
89245bc0
DB
2212015-05-12 Don Breazeal <donb@codesourcery.com>
222
223 * linux-low.c (linux_supports_fork_events): New function.
224 (linux_supports_vfork_events): New function.
225 (linux_target_ops): Initialize new structure members.
226 (initialize_low): Call linux_check_ptrace_features.
227 * lynx-low.c (lynx_target_ops): Initialize new structure
228 members.
229 * server.c (report_fork_events, report_vfork_events):
230 New global flags.
231 (handle_query): Add new features to qSupported packet and
232 response.
233 (captured_main): Initialize new global variables.
234 * target.h (struct target_ops) <supports_fork_events>:
235 New member.
236 <supports_vfork_events>: New member.
237 (target_supports_fork_events): New macro.
238 (target_supports_vfork_events): New macro.
239 * win32-low.c (win32_target_ops): Initialize new structure
240 members.
241
835205d0
GB
2422015-05-12 Gary Benson <gbenson@redhat.com>
243
244 * server.c (handle_qxfer_exec_file): Use current process
245 if annex is empty.
246
21e94bd9
SL
2472015-05-08 Sandra Loosemore <sandra@codesourcery.com>
248
249 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
250 Remove HAVE_PTRACE_GETREGS conditionals.
251 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
252 instead of PTRACE_GETREGS and PTRACE_SETREGS.
253
45614f15
YQ
2542015-05-08 Yao Qi <yao.qi@linaro.org>
255
256 * linux-low.c (linux_supports_conditional_breakpoints): New
257 function.
258 (linux_target_ops): Install new target method.
259 * lynx-low.c (lynx_target_ops): Install NULL hook for
260 supports_conditional_breakpoints.
261 * nto-low.c (nto_target_ops): Likewise.
262 * spu-low.c (spu_target_ops): Likewise.
263 * win32-low.c (win32_target_ops): Likewise.
264 * server.c (handle_query): Check
265 target_supports_conditional_breakpoints.
266 * target.h (struct target_ops) <supports_conditional_breakpoints>:
267 New field.
268 (target_supports_conditional_breakpoints): New macro.
269
80ad801e
PA
2702015-05-06 Pedro Alves <palves@redhat.com>
271
272 PR server/18081
273 * server.c (start_inferior): If the process exits, mourn it.
274
819843c7
GB
2752015-04-21 Gary Benson <gbenson@redhat.com>
276
277 * hostio.c (fileio_open_flags_to_host): Factored out to
278 fileio_to_host_openflags in common/fileio.c. Single use
279 updated.
280
a2d5a9d7
MF
2812015-04-17 Max Filippov <jcmvbkbc@gmail.com>
282
283 * linux-xtensa-low.c (xtensa_fill_gregset)
284 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
285 XCHAL_HAVE_LOOP.
286
deb44829
MF
2872015-04-17 Max Filippov <jcmvbkbc@gmail.com>
288
289 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
290 (regs_info): Replace usrregs pointer with NULL.
291
e57f1de3
GB
2922015-04-17 Gary Benson <gbenson@redhat.com>
293
294 * target.h (struct target_ops) <pid_to_exec_file>: New field.
295 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
296 * server.c (handle_qxfer_exec_file): New function.
297 (qxfer_packets): Add exec-file entry.
298 (handle_query): Report qXfer:exec-file:read as supported packet.
299
62828379
RN
3002015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
301
302 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
303
b88bb450
GB
3042015-04-09 Gary Benson <gbenson@redhat.com>
305
306 * hostio-errno.c (errno_to_fileio_error): Remove function.
307 Update caller to use remote_fileio_to_fio_error.
308
c8f4bfdd
YQ
3092015-04-09 Yao Qi <yao.qi@linaro.org>
310
311 * linux-low.c (linux_insert_point): Call
312 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
313 (linux_remove_point): Call remove_memory_breakpoint if type is
314 raw_bkpt_type_sw.
315 * linux-x86-low.c (x86_insert_point): Don't call
316 insert_memory_breakpoint.
317 (x86_remove_point): Don't call remove_memory_breakpoint.
318
41f98f02
PA
3192015-04-01 Pedro Alves <palves@redhat.com>
320 Cleber Rosa <crosa@redhat.com>
321
322 * server.c (gdbserver_usage): Reorganize and extend the usage
323 message.
324
2bf6fb9d
PA
3252015-03-24 Pedro Alves <palves@redhat.com>
326
327 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
328 output. Also dump TRAP_TRACE.
329 (linux_low_filter_event): In debug output, distinguish a
330 resume_stop SIGSTOP from a delayed SIGSTOP.
331
369f6daa
GB
3322015-03-24 Gary Benson <gbenson@redhat.com>
333
334 * linux-x86-low.c (x86_linux_new_thread): Moved to
335 nat/x86-linux.c.
336 (x86_linux_prepare_to_resume): Likewise.
337
8e5d4070
GB
3382015-03-24 Gary Benson <gbenson@redhat.com>
339
340 * Makefile.in (x86-linux-dregs.o): New rule.
341 * configure.srv: Add x86-linux-dregs.o to relevant targets.
342 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
343 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
344 (x86_linux_dr_get): Likewise.
345 (x86_linux_dr_set): Likewise.
346 (update_debug_registers_callback): Likewise.
347 (x86_linux_dr_set_addr): Likewise.
348 (x86_linux_dr_get_addr): Likewise.
349 (x86_linux_dr_set_control): Likewise.
350 (x86_linux_dr_get_control): Likewise.
351 (x86_linux_dr_get_status): Likewise.
352 (x86_linux_update_debug_registers): Likewise.
353
2b95d440
GB
3542015-03-24 Gary Benson <gbenson@redhat.com>
355
356 * linux-x86-low.c (x86_linux_update_debug_registers):
357 New function, factored out from...
358 (x86_linux_prepare_to_resume): ...this.
359
14b0bc68
GB
3602015-03-24 Gary Benson <gbenson@redhat.com>
361
362 * linux-x86-low.c (x86_linux_dr_get): Update comments.
363 (x86_linux_dr_set): Likewise.
364 (update_debug_registers_callback): Likewise.
365 (x86_linux_dr_set_addr): Likewise.
366 (x86_linux_dr_get_addr): Likewise.
367 (x86_linux_dr_set_control): Likewise.
368 (x86_linux_dr_get_control): Likewise.
369 (x86_linux_dr_get_status): Likewise.
370 (x86_linux_prepare_to_resume): Likewise.
371
5dfe6ca8
GB
3722015-03-24 Gary Benson <gbenson@redhat.com>
373
374 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
375 Use perror_with_name. Pass string through gettext.
376 (x86_linux_dr_set): Likewise.
377
d33472ad
GB
3782015-03-24 Gary Benson <gbenson@redhat.com>
379
380 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
381 (x86_linux_dr_set_addr): ...this.
382 (x86_dr_low_get_addr): Rename to...
383 (x86_linux_dr_get_addr): ...this.
384 (x86_dr_low_set_control): Rename to...
385 (x86_linux_dr_set_control): ...this.
386 (x86_dr_low_get_control): Rename to...
387 (x86_linux_dr_get_control): ...this.
388 (x86_dr_low_get_status): Rename to...
389 (x86_linux_dr_get_status): ...this.
390 (x86_dr_low): Update with new function names.
391
4b134ca1
GB
3922015-03-24 Gary Benson <gbenson@redhat.com>
393
394 * Makefile.in (x86-linux.o): New rule.
395 * configure.srv: Add x86-linux.o to relevant targets.
396 * linux-low.c (lwp_set_arch_private_info): New function.
397 (lwp_arch_private_info): Likewise.
398 * linux-x86-low.c: Include nat/x86-linux.h.
399 (arch_lwp_info): Removed structure.
400 (update_debug_registers_callback):
401 Use lwp_set_debug_registers_changed.
402 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
403 and lwp_set_debug_registers_changed.
404 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
405
34c703da
GB
4062015-03-24 Gary Benson <gbenson@redhat.com>
407
408 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
409 * linux-arm-low.c (arm_new_thread): Likewise.
410 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
411 * linux-mips-low.c (mips_linux_new_thread): Likewise.
412 * linux-x86-low.c (x86_linux_new_thread): Likewise.
413 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
414
cff068da
GB
4152015-03-24 Gary Benson <gbenson@redhat.com>
416
417 * linux-low.c (ptid_of_lwp): New function.
418 (lwp_is_stopped): Likewise.
419 (lwp_stop_reason): Likewise.
420 * linux-x86-low.c (update_debug_registers_callback):
421 Use lwp_is_stopped.
422 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
423 lwp_stop_reason.
424
b2f7c7e8
GB
4252015-03-24 Gary Benson <gbenson@redhat.com>
426
427 * linux-low.h (linux_stop_lwp): Remove declaration.
428
6d4ee8c6
GB
4292015-03-24 Gary Benson <gbenson@redhat.com>
430
431 * linux-low.h: Include nat/linux-nat.h.
432 * linux-low.c (iterate_over_lwps_args): New structure.
433 (iterate_over_lwps_filter): New function.
434 (iterate_over_lwps): Likewise.
435 * linux-x86-low.c (update_debug_registers_callback):
436 Update signature to what iterate_over_lwps expects.
437 Remove PID check that iterate_over_lwps now performs.
438 (x86_dr_low_set_addr): Use iterate_over_lwps.
439 (x86_dr_low_set_control): Likewise.
440
70a0bb6b
GB
4412015-03-24 Gary Benson <gbenson@redhat.com>
442
443 * linux-x86-low.c (x86_debug_reg_state): New function.
444 (x86_linux_prepare_to_resume): Use the above.
445
7b669087
GB
4462015-03-24 Gary Benson <gbenson@redhat.com>
447
448 * linux-low.c (current_lwp_ptid): New function.
449 * linux-x86-low.c: Include nat/linux-nat.h.
450 (x86_dr_low_get_addr): Use current_lwp_ptid.
451 (x86_dr_low_get_control): Likewise.
452 (x86_dr_low_get_status): Likewise.
453
eef49a3d
PA
4542015-03-20 Pedro Alves <palves@redhat.com>
455
456 * tracepoint.c (cmd_qtstatus): Make "str" const.
457
b2333d22
PA
4582015-03-20 Pedro Alves <palves@redhat.com>
459
460 * server.c (handle_general_set): Make "req_str" const.
461
23f238d3
PA
4622015-03-19 Pedro Alves <palves@redhat.com>
463
464 * linux-low.c (linux_resume_one_lwp): Rename to ...
465 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
466 instead call perror_with_name.
467 (check_ptrace_stopped_lwp_gone): New function.
468 (linux_resume_one_lwp): Reimplement as wrapper around
469 linux_resume_one_lwp_throw that swallows errors if the LWP is
470 gone.
471
91baf43f
PA
4722015-03-19 Pedro Alves <palves@redhat.com>
473
474 * linux-low.c (count_events_callback, select_event_lwp_callback):
475 No longer check whether the thread has resume_stop as last resume
476 kind.
477
8bf3b159
PA
4782015-03-19 Pedro Alves <palves@redhat.com>
479
480 * linux-low.c (count_events_callback, select_event_lwp_callback):
481 Use the lwp's status_pending_p field, not the thread's.
482
b90fc188
PA
4832015-03-19 Pedro Alves <palves@redhat.com>
484
485 * linux-low.c (select_event_lwp_callback): Update comments to
486 no longer mention SIGTRAP.
487
464b0089
GB
4882015-03-18 Gary Benson <gbenson@redhat.com>
489
490 * server.c (handle_query): Do not report vFile:fstat as supported.
491
aa9e327f
GB
4922015-03-11 Gary Benson <gbenson@redhat.com>
493
494 * hostio.c (sys/types.h): New include.
495 (sys/stat.h): Likewise.
496 (common-remote-fileio.h): Likewise.
497 (handle_fstat): New function.
498 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 499
791c0056
GB
5002015-03-11 Gary Benson <gbenson@redhat.com>
501
502 * configure.ac (AC_CHECK_MEMBERS): Add checks for
503 struct stat.st_blocks and struct stat.st_blksize.
504 * configure: Regenerate.
505 * config.in: Likewise.
506 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
507 (OBS): Add common-remote-fileio.o.
508 (common-remote-fileio.o): New rule.
509
9a9df970
PA
5102015-03-09 Pedro Alves <palves@redhat.com>
511
512 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
513 'struct sockaddr' pointer in 'accept' call.
514
9eb1356e
PA
5152015-03-09 Pedro Alves <palves@redhat.com>
516
517 Revert:
518 2015-03-07 Pedro Alves <palves@redhat.com>
519 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
520 or <winsock2.h> here. Instead include "gdb_socket.h".
521 (remote_open): Use union gdb_sockaddr_u.
522 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
523 or <winsock2.h> here. Instead include "gdb_socket.h".
524 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
525 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
526 or <sys/un.h>.
527 (init_named_socket, gdb_agent_helper_thread): Use union
528 gdb_sockaddr_u.
529
aac331e4
PA
5302015-03-07 Pedro Alves <palves@redhat.com>
531
532 * configure.ac (build_warnings): Move
533 -Wdeclaration-after-statement to the C-specific set.
534 * configure: Regenerate.
535
366c75fc
PA
5362015-03-07 Pedro Alves <palves@redhat.com>
537
538 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
539 or <winsock2.h> here. Instead include "gdb_socket.h".
540 (remote_open): Use union gdb_sockaddr_u.
541 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
542 or <winsock2.h> here. Instead include "gdb_socket.h".
543 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
544 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
545 or <sys/un.h>.
546 (init_named_socket, gdb_agent_helper_thread): Use union
547 gdb_sockaddr_u.
548
492d29ea
PA
5492015-03-07 Pedro Alves <palves@redhat.com>
550
551 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
552 instead.
553
60a191ed
YQ
5542015-03-06 Yao Qi <yao.qi@linaro.org>
555
556 * linux-aarch64-low.c (aarch64_insert_point): Use
557 show_debug_regs as a boolean.
558 (aarch64_remove_point): Likewise.
559
f5771b1d
PA
5602015-03-05 Pedro Alves <palves@redhat.com>
561
562 * lynx-low.c (lynx_target_ops): Install NULL hooks for
563 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
564 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
565 * nto-low.c (nto_target_ops): Likewise.
566 * spu-low.c (spu_target_ops): Likewise.
567 * win32-low.c (win32_target_ops): Likewise.
568
3e572f71
PA
5692015-03-04 Pedro Alves <palves@redhat.com>
570
571 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
572 Decide whether a breakpoint triggered based on the SIGTRAP's
573 siginfo.si_code.
574 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
575 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
576 (linux_low_filter_event): Check for breakpoints before checking
577 watchpoints.
578 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
579 siginfo.si_code.
580 (linux_stopped_by_sw_breakpoint)
581 (linux_supports_stopped_by_sw_breakpoint)
582 (linux_stopped_by_hw_breakpoint)
583 (linux_supports_stopped_by_hw_breakpoint): New functions.
584 (linux_target_ops): Install new target methods.
585
1ec68e26
PA
5862015-03-04 Pedro Alves <palves@redhat.com>
587
588 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
589 * server.c (swbreak_feature, hwbreak_feature): New globals.
590 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
591 (captured_main): Clear swbreak_feature and hwbreak_feature.
592 * server.h (swbreak_feature, hwbreak_feature): Declare.
593 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
594 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
595 supports_stopped_by_hw_breakpoint>: New fields.
596 (target_supports_stopped_by_sw_breakpoint)
597 (target_stopped_by_sw_breakpoint)
598 (target_supports_stopped_by_hw_breakpoint)
599 (target_stopped_by_hw_breakpoint): Declare.
600
15c66dd6
PA
6012015-03-04 Pedro Alves <palves@redhat.com>
602
603 enum lwp_stop_reason -> enum target_stop_reason
604 * linux-low.c (check_stopped_by_breakpoint): Adjust.
605 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
606 (linux_wait_1, stuck_in_jump_pad_callback)
607 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
608 (linux_stopped_by_watchpoint):
609 * linux-low.h (enum lwp_stop_reason): Delete.
610 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
611 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
612
98fc70d6
YQ
6132015-03-04 Yao Qi <yao.qi@linaro.org>
614
615 * Makefile.in (SFILES): Add linux-aarch64-low.c.
616
dd2ac174
GB
6172015-03-03 Gary Benson <gbenson@redhat.com>
618
619 * hostio.c (handle_vFile): Fix prefix lengths.
620
d68e53f4
MM
6212015-03-03 Markus Metzger <markus.t.metzger@intel.com>
622
623 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
624 ptr_bits.
625
bf2d68ab
AA
6262015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
627
628 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
629 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
630 (clean): Add "rm -f" for above C files.
631 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
632 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
633 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
634 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
635 * linux-s390-low.c (HWCAP_S390_VX): New macro.
636 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
637 (init_registers_s390x_vx_linux64)
638 (init_registers_s390x_tevx_linux64)
639 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
640 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
641 declarations.
642 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
643 (s390_store_vxrs_high): New functions.
644 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
645 NT_S390_VXRS_HIGH.
646 (s390_arch_setup): Add logic for selecting one of the new target
647 descriptions. Activate the new vector regsets if applicable.
648 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
649 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
650 and init_registers_s390x_tevx_linux64.
651
c966a859
PA
6522015-03-01 Pedro Alves <palves@redhat.com>
653
654 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
655 parameter.
656
4180215b
PA
6572015-02-27 Pedro Alves <palves@redhat.com>
658
659 * linux-x86-low.c (u_debugreg_offset): New function.
660 (x86_linux_dr_get, x86_linux_dr_set): Use it.
661
749bab01
PA
6622015-02-27 Pedro Alves <palves@redhat.com>
663
664 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
665 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
666 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
667 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
668 (ps_lsetfpregs, ps_getpid)
669 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
670 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
671 (ps_lsetxregs, ps_plog): Declare.
672
3c14e5a3
PA
6732015-02-27 Pedro Alves <palves@redhat.com>
674
675 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
676 IP_AGENT_EXPORT_FUNC.
677 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
678 IP_AGENT_EXPORT_FUNC.
679 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
680 (IP_AGENT_EXPORT): Delete.
681 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
682 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
683 (gdb_trampoline_buffer_error, collecting, gdb_collect)
684 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
685 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
686 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
687 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
688 (traceframe_read_count, traceframe_write_count)
689 (traceframes_created, trace_state_variables, get_raw_reg)
690 (get_trace_state_variable_value, set_trace_state_variable_value)
691 (ust_loaded, helper_thread_id, cmd_buf): Use
692 IPA_SYM_EXPORTED_NAME.
693 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
694 (tracepoints) Use IP_AGENT_EXPORT_VAR.
695 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
696 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
697 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
698 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
699 EXTERN_C_PUSH/EXTERN_C_POP.
700 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
701 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
702 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
703 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
704 (traceframe_write_count, traceframe_read_count)
705 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
706 (about_to_request_buffer_space, get_trace_state_variable_value)
707 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
708 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
709 EXTERN_C_PUSH/EXTERN_C_POP.
710 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
711 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
712 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
713 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
714 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
715 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
716 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
717 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
718 Define.
719 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
720 (IP_AGENT_EXPORT_VAR_DECL): Define.
721 (tracing): Declare.
722 (gdb_agent_get_raw_reg): Declare.
723
fe978cb0
PA
7242015-02-27 Tom Tromey <tromey@redhat.com>
725 Pedro Alves <palves@redhat.com>
726
727 Rename symbols whose names are reserved C++ keywords throughout.
728
3bc3d82a
PA
7292015-02-27 Pedro Alves <palves@redhat.com>
730
731 * Makefile.in (COMPILER): New, get it from autoconf.
732 (CXX): Get from autoconf instead.
733 (COMPILE.pre): Use COMPILER.
734 (CC-LD): Rename to ...
735 (CC_LD): ... this. Use COMPILER.
736 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
737 (CXX_FOR_TARGET): Default to g++ instead of gcc.
738 * acinclude.m4: Include build-with-cxx.m4.
739 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
740 Disable -Werror by default if building in C++ mode.
741 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
742 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
743 the C++ compiler. Save/restore CXXFLAGS too.
744 * configure: Regenerate.
745
07697489
PA
7462015-02-27 Pedro Alves <palves@redhat.com>
747
748 * acinclude.m4: Include libiberty.m4.
749 * configure.ac: Call libiberty_INIT.
750 * config.in, configure: Regenerate.
751
9beb7c4e
PA
7522015-02-26 Pedro Alves <palves@redhat.com>
753
754 * linux-low.c (linux_wait_1): When incrementing the PC past a
755 program breakpoint always use the_low_target.breakpoint_len as
756 increment, rather than the maximum between that and
757 the_low_target.decr_pc_after_break.
758
8090aef2
PA
7592015-02-23 Pedro Alves <palves@redhat.com>
760
761 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
762 thread was doing a step-over; always adjust the PC if
763 we stepped over a permanent breakpoint.
764 (linux_wait_1): If we stepped over breakpoint that was on top of a
765 permanent breakpoint, manually advance the PC past it.
766
bc9540e8
PA
7672015-02-23 Pedro Alves <palves@redhat.com>
768
769 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
770 modes.
771 (x86_fill_gregset, x86_store_gregset): Use it when handling
772 $orig_eax.
773
2db9a427
PA
7742015-02-20 Pedro Alves <palves@redhat.com>
775
776 * thread-db.c: Include "nat/linux-procfs.h".
777 (thread_db_init): Skip listing new threads if the kernel supports
778 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
779
afa8d396
PA
7802015-02-20 Pedro Alves <palves@redhat.com>
781
782 * linux-low.c (status_pending_p_callback): Use ptid_match.
783
c9587f88
AT
7842015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
785
786 PR breakpoints/16812
787 * linux-low.c (wstatus_maybe_breakpoint): Remove.
788 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
789 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
790
b05ec7a5
AT
7912015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
792
793 PR breakpoints/15956
794 * tracepoint.c (cmd_qtinit): Add check for current_thread.
795
d33501a5
MM
7962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
797
798 * linux-low.c (linux_low_btrace_conf): Print size.
799 * server.c (handle_btrace_conf_general_set): New.
800 (hanle_general_set): Call handle_btrace_conf_general_set.
801 (handle_query): Report Qbtrace-conf:bts:size as supported.
802
f4abbc16
MM
8032015-02-09 Markus Metzger <markus.t.metzger@intel.com>
804
805 * linux-low.c (linux_low_enable_btrace): Update parameters.
806 (linux_low_btrace_conf): New.
807 (linux_target_ops)<to_btrace_conf>: Initialize.
808 * server.c (current_btrace_conf): New.
809 (handle_btrace_enable): Rename to ...
810 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
811 to target_enable_btrace. Update comment. Update users.
812 (handle_qxfer_btrace_conf): New.
813 (qxfer_packets): Add btrace-conf entry.
814 (handle_query): Report qXfer:btrace-conf:read as supported packet.
815 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
816 (target_ops)<read_btrace_conf>: New.
817 (target_enable_btrace): Update parameters.
818 (target_read_btrace_conf): New.
819
043c3577
MM
8202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
821
822 * server.c (handle_btrace_general_set): Remove call to
823 target_supports_btrace.
824 (supported_btrace_packets): New.
825 (handle_query): Call supported_btrace_packets.
826 * target.h: include btrace-common.h.
827 (btrace_target_info): Removed.
828 (supports_btrace, target_supports_btrace): Update parameters.
829
734b0e4b
MM
8302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
831
832 * Makefile.in (SFILES): Add common/btrace-common.c.
833 (OBS): Add common/btrace-common.o.
834 (btrace-common.o): Add build rules.
835 * linux-low: Include btrace-common.h.
836 (linux_low_read_btrace): Use struct btrace_data. Call
837 btrace_data_init and btrace_data_fini.
838
d6c146e9
PA
8392015-02-06 Pedro Alves <palves@redhat.com>
840
841 * thread-db.c (find_new_threads_callback): Add debug output.
842
20ba1ce6
PA
8432015-02-04 Pedro Alves <palves@redhat.com>
844
845 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
846 (resume_stopped_resumed_lwps): New function.
847 (linux_wait_for_event_filtered): Use it.
848
8cc73a39
SDJ
8492015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
850
851 * Makefile.in (SFILES): Add linux-personality.c.
852 (linux-personality.o): New rule.
853 * configure.srv (srv_linux_obj): Add linux-personality.o to the
854 list of objects to be built.
855 * linux-low.c: Include nat/linux-personality.h.
856 (linux_create_inferior): Remove code to disable address space
857 randomization (moved to ../nat/linux-personality.c). Create
858 cleanup to disable address space randomization.
859
fb23d554
SDJ
8602015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
861
862 * Makefile.in (posix-strerror.o): New rule.
863 (mingw-strerror.o): Likewise.
864 * configure: Regenerated.
865 * configure.ac: Source file ../common/common.host. Initialize new
866 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
867
cdf43629
YQ
8682015-01-14 Yao Qi <yao@codesourcery.com>
869
870 * Makefile.in (SFILES): Add nat/ppc-linux.c.
871 (ppc-linux.o): New rule.
872 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
873 * configure.ac: AC_CHECK_FUNCS(getauxval).
874 * config.in: Re-generated.
875 * configure: Re-generated.
876 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
877 ppc64_64bit_inferior_p
878
514c5338
YQ
8792015-01-14 Yao Qi <yao@codesourcery.com>
880
881 * linux-ppc-low.c: Include "nat/ppc-linux.h".
882 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
883 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
884 (PT_ORIG_R3, PT_TRAP): Likewise.
885 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
886 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
887 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
888
3368c1e5
JB
8892015-01-10 Joel Brobecker <brobecker@adacore.com>
890
891 * i387-fp.c (i387_cache_to_xsave): In look over
892 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
893 zmmh_low_space field by use of zmmh_high_space.
894
582511be
PA
8952015-01-09 Pedro Alves <palves@redhat.com>
896
897 * linux-low.c (step_over_bkpt): Move higher up in the file.
898 (handle_extended_wait): Don't store the stop_pc here.
899 (get_stop_pc): Adjust comments and rename to ...
900 (check_stopped_by_breakpoint): ... this. Record whether the LWP
901 stopped for a software breakpoint or hardware breakpoint.
902 (thread_still_has_status_pending_p): New function.
903 (status_pending_p_callback): Use
904 thread_still_has_status_pending_p. If the event is no longer
905 interesting, resume the LWP.
906 (handle_tracepoints): Add assert.
907 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
908 (wstatus_maybe_breakpoint): New function.
909 (cancel_breakpoint): Delete function.
910 (check_stopped_by_watchpoint): New function, factored out from
911 linux_low_filter_event.
912 (lp_status_maybe_breakpoint): Delete function.
913 (linux_low_filter_event): Remove filter_ptid argument.
914 Leave thread group exits pending here. Store the LWP's stop PC.
915 Always leave events pending.
916 (linux_wait_for_event_filtered): Pull all events out of the
917 kernel, and leave them all pending.
918 (count_events_callback, select_event_lwp_callback): Consider all
919 events.
920 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
921 (select_event_lwp): Only give preference to the stepping LWP in
922 all-stop mode. Adjust comments.
923 (ignore_event): New function.
924 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
925 references to cancel_breakpoints. Adjust to renames. Also give
926 equal priority to all LWPs that have had events in non-stop mode.
927 If reporting a software breakpoint event, unadjust the LWP's PC.
928 (linux_wait): If linux_wait_1 returned an ignored event, retry.
929 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
930 Adjust.
931 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
932 (resume_status_pending_p): Use thread_still_has_status_pending_p.
933 (linux_stopped_by_watchpoint): Adjust.
934 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
935 * linux-low.h (enum lwp_stop_reason): New.
936 (struct lwp_info) <stop_pc>: Adjust comment.
937 <stopped_by_watchpoint>: Delete field.
938 <stop_reason>: New field.
939 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
940 * mem-break.c (software_breakpoint_inserted_here)
941 (hardware_breakpoint_inserted_here): New function.
942 * mem-break.h (software_breakpoint_inserted_here)
943 (hardware_breakpoint_inserted_here): Declare.
944 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
945 (cancel_breakpoints): Delete.
946 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
947 (upload_fast_traceframes): Remove references to
948 cancel_breakpoints.
949
a33e3959
PA
9502015-01-09 Pedro Alves <palves@redhat.com>
951
952 * thread-db.c (find_new_threads_callback): Ignore thread if the
953 kernel thread ID is -1.
954
8784d563
PA
9552015-01-09 Pedro Alves <palves@redhat.com>
956
957 * linux-low.c (linux_attach_fail_reason_string): Move to
958 nat/linux-ptrace.c, and rename.
959 (linux_attach_lwp): Update comment.
960 (attach_proc_task_lwp_callback): New function.
961 (linux_attach): Adjust to rename and use
962 linux_proc_attach_tgid_threads.
963 (linux_attach_fail_reason_string): Delete declaration.
964
76f2b779
JB
9652015-01-01 Joel Brobecker <brobecker@adacore.com>
966
967 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
968 * server.c (gdbserver_version): Likewise.
969
fafcc06a
SDJ
9702014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
971
972 * remote-utils.c: Include ctype.h.
973 (input_interrupt): Explicitly handle the case when the char
974 received is the NUL byte. Improve the printing of non-ASCII
975 characters.
976
beed38b8
JB
9772014-12-16 Joel Brobecker <brobecker@adacore.com>
978
979 * linux-low.c (linux_low_filter_event): Update call to
980 linux_enable_event_reporting following the addition of
981 a new parameter to that function.
982
bf330350
CU
9832014-12-16 Catalin Udma <catalin.udma@freescale.com>
984
985 PR server/17457
986 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
987 (AARCH64_FPCR_REGNO): Likewise.
988 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
989 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
990 (aarch64_store_fpregset): Likewise.
991
5227d625
JB
9922014-12-15 Joel Brobecker <brobecker@adacore.com>
993
994 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
995 Remove FIXME comment about assumption about N.
996
f93b65a0
JB
9972014-12-13 Joel Brobecker <brobecker@adacore.com>
998
999 * configure.ac: If large-file support is disabled in GDBserver,
1000 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1001 * configure: Regenerate.
1002
e5a9158d
AA
10032014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1004
1005 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1006 warning upon ENODATA from ptrace.
1007 * linux-s390-low.c (s390_store_tdb): New.
1008 (s390_regsets): Add regset for NT_S390_TDB.
1009
feea5f36
AA
10102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1011
1012 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1013 without a fill_function.
1014 * linux-s390-low.c (s390_fill_last_break): Remove.
1015 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1016 (s390_arch_setup): Use regset's size instead of fill_function for
1017 loop end condition.
1018
098dbe61
AA
10192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1020
1021 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1022 the regset's store function when ptrace returned an error.
1023 * regcache.c (get_thread_regcache): Invalidate register cache
1024 before fetching inferior's registers.
1025
28eef672
AA
10262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1027
1028 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1029 while-loop as for-loop.
1030 (regsets_store_inferior_registers): Likewise.
1031
bdca27a2
YQ
10322014-11-28 Yao Qi <yao@codesourcery.com>
1033
1034 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1035 * config.in, configure: Re-generate.
1036 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1037 is defined.
1038
9c232dda
YQ
10392014-11-21 Yao Qi <yao@codesourcery.com>
1040
1041 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1042 (AC_CHECK_HEADERS): Remove malloc.h.
1043 * configure: Re-generated.
1044 * config.in: Re-generated.
1045 * server.h: Don't include alloca.h and malloc.h.
1046 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1047 Don't include malloc.h.
1048
43968415
JB
10492014-11-17 Joel Brobecker <brobecker@adacore.com>
1050
1051 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1052 corresponding ERRNO check in same block.
1053
40e91bc7
PA
10542014-11-12 Pedro Alves <palves@redhat.com>
1055
1056 * server.c (cont_thread): Update comment.
1057 (start_inferior, attach_inferior): No longer clear cont_thread.
1058 (handle_v_cont): No longer set cont_thread.
1059 (captured_main): Clear cont_thread each time a GDB connects.
1060
c2c118cf
PA
10612014-11-12 Pedro Alves <palves@redhat.com>
1062
1063 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1064 thread, and don't resume all threads if the Hc thread has exited.
1065
78708b7c
PA
10662014-11-12 Pedro Alves <palves@redhat.com>
1067
1068 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1069 the process group instead of to a specific LWP.
1070
a2abc7de
PA
10712014-10-15 Pedro Alves <palves@redhat.com>
1072
1073 PR server/17487
1074 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1075 parameter.
1076 (arm_set_thread_context): Delete.
1077 (the_low_target): Adjust.
1078 * win32-i386-low.c (debug_registers_changed)
1079 (debug_registers_used): Delete.
1080 (update_debug_registers_callback): New function.
1081 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1082 needing to update their debug registers.
1083 (win32_get_current_dr): New function.
1084 (x86_dr_low_get_addr, x86_dr_low_get_control)
1085 (x86_dr_low_get_status): Fetch the debug register from the thread
1086 record's context.
1087 (i386_initial_stuff): Adjust.
1088 (i386_get_thread_context): Remove current_event parameter. Don't
1089 clear debug_registers_changed nor copy DR values to
1090 debug_reg_state.
1091 (i386_set_thread_context): Delete.
1092 (i386_prepare_to_resume): New function.
1093 (i386_thread_added): Mark the thread as needing to update irs
1094 debug registers.
1095 (the_low_target): Remove i386_set_thread_context and install
1096 i386_prepare_to_resume.
1097 * win32-low.c (win32_get_thread_context): Adjust.
1098 (win32_set_thread_context): Use SetThreadContext
1099 directly.
1100 (win32_prepare_to_resume): New function.
1101 (win32_require_context): New function, factored out from ...
1102 (thread_rec): ... this.
1103 (continue_one_thread): Call win32_prepare_to_resume on each thread
1104 we're about to continue.
1105 (win32_resume): Call win32_prepare_to_resume on the event thread.
1106 * win32-low.h (struct win32_thread_info)
1107 <debug_registers_changed>: New field.
1108 (struct win32_target_ops): Change prototype of set_thread_context,
1109 delete set_thread_context and add prepare_to_resume.
1110 (win32_require_context): New declaration.
1111
a442d071
GB
11122014-10-08 Gary Benson <gbenson@redhat.com>
1113
1114 * server.h: Do not include common-exceptions.h.
1115
6f1947e8
GB
11162014-10-08 Gary Benson <gbenson@redhat.com>
1117
1118 * server.h: Do not include cleanups.h.
1119
63b434a4
JH
11202014-09-30 James Hogan <james.hogan@imgtec.com>
1121
1122 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1123 mips64-dsp-linux.c.
1124
c4d9ceb6
YQ
11252014-09-23 Yao Qi <yao@codesourcery.com>
1126
1127 * linux-low.c (lp_status_maybe_breakpoint): New function.
1128 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1129 (count_events_callback): Likewise.
1130 (select_event_lwp_callback): Likewise.
1131 (cancel_breakpoints_callback): Likewise.
1132
89a5711c
DB
11332014-09-19 Don Breazeal <donb@codesourcery.com>
1134
1135 * linux-low.c (handle_extended_wait): Call
1136 linux_ptrace_get_extended_event.
1137 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1138 linux_is_extended_waitstatus.
1139
bffc0964
JB
11402014-09-16 Joel Brobecker <brobecker@adacore.com>
1141
1142 * Makefile.in (CPPFLAGS): Define.
1143 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1144 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1145
0bfdf32f
GB
11462014-09-16 Gary Benson <gbenson@redhat.com>
1147
1148 * inferiors.h (current_inferior): Renamed as...
1149 (current_thread): New variable. All uses updated.
1150 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1151 (maybe_move_out_of_jump_pad): Likewise.
1152 (cancel_breakpoint): Likewise.
1153 (linux_low_filter_event): Likewise.
1154 (wait_for_sigstop): Likewise.
1155 (linux_resume_one_lwp): Likewise.
1156 (need_step_over_p): Likewise.
1157 (start_step_over): Likewise.
1158 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1159 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1160 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1161 and save_inferior as saved_thread.
1162 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1163 saved_thread.
1164 (regcache_invalidate_thread): Likewise.
1165 * remote-utils.c (prepare_resume_reply): Likewise.
1166 * thread-db.c (thread_db_get_tls_address): Likewise.
1167 (disable_thread_event_reporting): Likewise.
1168 (remove_thread_event_breakpoints): Likewise.
1169 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1170 as saved_thread.
1171 * target.h (set_desired_inferior): Renamed as...
1172 (set_desired_thread): New declaration. All uses updated.
1173 * server.c (myresume): Updated comment to reference thread instead
1174 of inferior.
1175 (handle_serial_event): Likewise.
1176 (handle_target_event): Likewise.
1177
361c8ade
GB
11782014-09-12 Tom Tromey <tromey@redhat.com>
1179 Gary Benson <gbenson@redhat.com>
1180
1181 * regcache.h: Include common-regcache.h.
1182 (regcache_read_pc): Don't declare.
1183 * regcache.c (get_thread_regcache_for_ptid): New function.
1184
bd9269f7
GB
11852014-09-11 Tom Tromey <tromey@redhat.com>
1186 Gary Benson <gbenson@redhat.com>
1187
1188 * symbol.c: New file.
1189 * Makefile.in (SFILES): Add symbol.c.
1190 (OBS): Add symbol.o.
1191
f8c1d06b
GB
11922014-09-11 Gary Benson <gbenson@redhat.com>
1193
1194 * target.c (target_stop_ptid, target_continue_ptid): New
1195 functions.
1196
721ec300
GB
11972014-09-11 Tom Tromey <tromey@redhat.com>
1198 Gary Benson <gbenson@redhat.com>
1199
1200 * target.h: Include target/target.h.
1201 * target.c (target_read_memory, target_read_uint32)
1202 (target_write_memory): New functions.
1203
c5e92cca
GB
12042014-09-11 Gary Benson <gbenson@redhat.com>
1205
1206 * server.h (debug_hw_points): Don't declare.
1207 * server.c (debug_hw_points): Don't define. Replace all uses
1208 with show_debug_regs.
1209 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1210 all uses with show_debug_regs.
1211
2e4bb98a
EBM
12122014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1213
1214 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1215 endianness into account.
1216 (ppc_supply_ptrace_register): Likewise.
1217
ac740bc7
JH
12182014-09-03 James Hogan <james.hogan@imgtec.com>
1219
1220 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1221 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1222
97ea6506
GB
12232014-09-03 Gary Benson <gbenson@redhat.com>
1224
1225 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1226 ALL_DEBUG_ADDRESS_REGISTERS.
1227
df7e5265
GB
12282014-09-02 Gary Benson <gbenson@redhat.com>
1229
1230 * i386-low.h: Renamed as...
1231 * x86-low.h: New file. All type, function and variable name
1232 prefixes changed from "i386_" to "x86_". All references updated.
1233 * i386-low.c: Renamed as...
1234 * x86-low.c: New file. All type, function and variable name
1235 prefixes changed from "i386_" to "x86_". All references updated.
1236
ed859da7
GB
12372014-09-02 Gary Benson <gbenson@redhat.com>
1238
1239 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1240 (x86_linux_new_thread): Likewise.
1241
860789c7
GB
12422014-08-29 Gary Benson <gbenson@redhat.com>
1243
1244 * server.h (setjmp.h): Do not include.
1245 (toplevel): Do not declare.
1246 (common-exceptions.h): Include.
1247 (cleanups.h): Likewise.
1248 * server.c (toplevel): Do not define.
1249 (exit_code): New static global.
1250 (detach_or_kill_for_exit_cleanup): New function.
1251 (main): New function. Original main renamed to...
1252 (captured_main): New function.
1253 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1254
ff55e1b5
GB
12552014-08-29 Gary Benson <gbenson@redhat.com>
1256
1257 * Makefile.in (SFILES): Add common/common-exceptions.c.
1258 (OBS): Add common-exceptions.o.
1259 (common-exceptions.o): New rule.
1260 * utils.c (prepare_to_throw_exception): New function.
1261
e9bcb658
GB
12622014-08-29 Gary Benson <gbenson@redhat.com>
1263
1264 * config.in: Regenerate.
1265 * configure: Likewise.
1266
e3180625
GB
12672014-08-29 Gary Benson <gbenson@redhat.com>
1268
1269 * Makefile.in (SFILES): Add common/cleanups.c.
1270 (OBS): cleanups.o.
1271 (cleanups.o): New rule.
1272
e3d6ba5d
GB
12732014-08-29 Gary Benson <gbenson@redhat.com>
1274
1275 * utils.c (internal_vwarning): New function.
1276
7096e886
GB
12772014-08-28 Gary Benson <gbenson@redhat.com>
1278
1279 * utils.h (fatal): Remove declaration.
1280 * utils.c (fatal): Remove function.
1281
14ce3192
GB
12822014-08-28 Gary Benson <gbenson@redhat.com>
1283
1284 * tracepoint.c (gdb_agent_init): Replace fatal with
1285 perror_with_name.
1286 (initialize_tracepoint): Likewise.
1287
50278d59
GB
12882014-08-28 Gary Benson <gbenson@redhat.com>
1289
1290 * remote-utils.c (remote_prepare): Replace fatal with error.
1291
aa96c426
GB
12922014-08-28 Gary Benson <gbenson@redhat.com>
1293
1294 * linux-low.c (linux_async): Replace fatal with warning.
1295 Tidy up and return.
1296 (linux_start_non_stop): Return -1 if linux_async failed.
1297
f7160e97
GB
12982014-08-28 Gary Benson <gbenson@redhat.com>
1299
1300 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1301 gdb_assert.
1302 (i386_dr_low_get_addr): Remove vague comment.
1303 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1304 gdb_assert.
1305
38e08fca
GB
13062014-08-28 Gary Benson <gbenson@redhat.com>
1307
1308 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1309 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1310 internal_error.
1311 (linux_resume_one_lwp): Likewise.
1312 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1313 gdb_assert.
1314 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1315 with internal_error.
1316 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1317 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1318 (find_register_by_name): Replace fatal with internal_error.
1319 (find_regno): Likewise.
1320 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1321 * thread-db.c (thread_db_create_event): Likewise.
1322 (thread_db_load_search): Likewise.
1323 (try_thread_db_load_1): Likewise.
1324 * tracepoint.c (get_jump_space_head): Replace fatal with
1325 internal_error.
1326 (claim_trampoline_space): Likewise.
1327 (have_fast_tracepoint_trampoline_buffer): Likewise.
1328 (cmd_qtstart): Likewise.
1329 (stop_tracing): Likewise.
1330 (fast_tracepoint_collecting): Likewise.
1331 (target_malloc): Likewise.
1332 (download_tracepoint): Likewise.
1333 (download_trace_state_variables): Replace check with gdb_assert.
1334 (upload_fast_traceframes): Replace fatal with internal_error.
1335
34abf635
GB
13362014-08-19 Tom Tromey <tromey@redhat.com>
1337 Gary Benson <gbenson@redhat.com>
1338
1339 * Makefile.in (SFILES): Add common/common-debug.c.
1340 (OBS): Add common-debug.o.
1341 (common-debug.o): New rule.
1342 * debug.h (debug_printf): Don't declare.
1343 * debug.c (debug_printf): Renamed and rewritten as...
1344 (debug_vprintf): New function.
1345
f6e94d78
GB
13462014-08-19 Gary Benson <gbenson@redhat.com>
1347
1348 * utils.h: Do not include print-utils.h.
1349
9239eeab
GB
13502014-08-19 Tom Tromey <tromey@redhat.com>
1351 Gary Benson <gbenson@redhat.com>
1352
1353 * server.h: Add static assertion.
1354 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1355
ef87c8bb
GB
13562014-08-19 Tom Tromey <tromey@redhat.com>
1357 Gary Benson <gbenson@redhat.com>
1358
1359 * Makefile.in (SFILES): Add common/errors.c.
1360 (OBS): Add errors.o.
1361 (IPA_OBS): Add errors-ipa.o.
1362 (errors.o): New rule.
1363 (errors-ipa.o): Likewise.
1364 * utils.h (perror_with_name, error, warning): Don't declare.
1365 * utils.c (warning): Renamed and rewritten as...
1366 (vwarning): New function.
1367 (error): Renamed and rewritten as...
1368 (verror): New function.
1369 (internal_error): Renamed and rewritten as...
1370 (internal_verror): New function.
1371
bb974a24
GB
13722014-08-07 Gary Benson <gbenson@redhat.com>
1373
1374 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1375 * configure: Regenerate.
1376 * config.in: Likewise.
1377 * server.h: Do not include errno.h.
1378 * event-loop.c: Likewise.
1379 * hostio-errno.c: Likewise.
1380 * linux-low.c: Likewise.
1381 * remote-utils.c: Likewise.
1382 * spu-low.c: Likewise.
1383 * utils.c: Likewise.
1384 * gdbreplay.c: Unconditionally include errno.h.
1385
6d3d12eb
GB
13862014-08-07 Gary Benson <gbenson@redhat.com>
1387
1388 * server.h: Do not include string.h.
1389 * event-loop.c: Likewise.
1390 * linux-low.c: Likewise.
1391 * regcache.c: Likewise.
1392 * remote-utils.c: Likewise.
1393 * spu-low.c: Likewise.
1394 * utils.c: Likewise.
1395
dccbb609
GB
13962014-08-07 Gary Benson <gbenson@redhat.com>
1397
1398 * server.h: Do not include gdb_assert.h.
1399
e76df0d0
GB
14002014-08-07 Gary Benson <gbenson@redhat.com>
1401
1402 * server.h: Do not include common-utils.h.
1403
4cb9c816
GB
14042014-08-07 Gary Benson <gbenson@redhat.com>
1405
1406 * server.h: Do not include ptid.h.
1407 * notif.h: Likewise.
1408
3995eeee
GB
14092014-08-07 Gary Benson <gbenson@redhat.com>
1410
1411 * server.h: Do not include gdb_locale.h.
1412
cb9f1a9b
GB
14132014-08-07 Gary Benson <gbenson@redhat.com>
1414
1415 * server.h: Do not include gdb/signals.h.
1416 * win32-low.c: Likewise.
1417
a5fceff8
GB
14182014-08-07 Gary Benson <gbenson@redhat.com>
1419
1420 * server.h: Do not include pathmax.h.
1421
b9391142
GB
14222014-08-07 Gary Benson <gbenson@redhat.com>
1423
1424 * server.h: Do not include libiberty.h.
1425 * linux-bfin-low.c: Likewise.
1426
0e443c87
GB
14272014-08-07 Gary Benson <gbenson@redhat.com>
1428
1429 * server.h: Do not include ansidecl.h.
1430
8ebb3f56
GB
14312014-08-07 Gary Benson <gbenson@redhat.com>
1432
1433 * linux-x86-low.c: Do not include stddef.h.
1434 * lynx-ppc-low.c: Likewise.
1435 * tracepoint.c: Likewise.
1436
8980bdf6
GB
14372014-08-07 Gary Benson <gbenson@redhat.com>
1438
1439 * server.h: Do not include stdarg.h.
1440 * nto-low.c: Likewise.
1441
d7096f71
GB
14422014-08-07 Gary Benson <gbenson@redhat.com>
1443
1444 * server.h: Do not include stdlib.h.
1445 * inferiors.c: Likewise.
1446 * linux-low.c: Likewise.
1447 * regcache.c: Likewise.
1448 * spu-low.c: Likewise.
1449 * tracepoint.c: Likewise.
1450 * utils.c: Likewise.
1451
d02f550d
GB
14522014-08-07 Gary Benson <gbenson@redhat.com>
1453
1454 * server.h: Do not include stdio.h.
1455 * linux-low.c: Likewise.
1456 * remote-utils.c: Likewise.
1457 * spu-low.c: Likewise.
1458 * utils.c: Likewise.
1459 * wincecompat.c: Likewise.
1460
87f6c4e3
GB
14612014-08-06 Gary Benson <gbenson@redhat.com>
1462
1463 * regcache.c (init_register_cache): Move conditionals inside if.
1464
7089dca4
GB
14652014-08-06 Gary Benson <gbenson@redhat.com>
1466
1467 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1468
462f517e
GB
14692014-07-31 Gary Benson <gbenson@redhat.com>
1470
1471 * ax.h: Do not include server.h.
1472 * gdbthread.h: Likewise.
1473 * lynx-low.h: Likewise.
1474 * notif.h: Likewise.
1475
976411d6
GB
14762014-07-30 Gary Benson <gbenson@redhat.com>
1477
1478 * server.h: Include common-defs.h.
1479 Do not include config.h or build-gnulib-gdbserver/config.h.
1480
d41f6d8e
GB
14812014-07-30 Gary Benson <gbenson@redhat.com>
1482
1483 * hostio-errno.c: Move server.h to top of includes list.
1484 * inferiors.c: Likewise.
1485 * linux-x86-low.c: Likewise.
1486 * notif.c: Include server.h.
1487
314c6a35
TT
14882014-07-24 Tom Tromey <tromey@redhat.com>
1489 Gary Benson <gbenson@redhat.com>
1490
1491 * server.h (CORE_ADDR): Now unsigned.
1492
69ff6be5
PA
14932014-07-16 Pedro Alves <palves@redhat.com>
1494
1495 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1496
ce9e3fe7
PA
14972014-07-15 Pedro Alves <palves@redhat.com>
1498
1499 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1500 copy.
1501
e76126e8
PA
15022014-07-11 Pedro Alves <palves@redhat.com>
1503
1504 * linux-low.c (kill_wait_lwp): New function, based on
1505 kill_one_lwp_callback, but use my_waitpid directly.
1506 (kill_one_lwp_callback, linux_kill): Use it.
1507
8e9db26e
PA
15082014-06-23 Pedro Alves <palves@redhat.com>
1509
1510 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1511 before setting DR0..DR3.
1512
698b3e08
GB
15132014-06-20 Gary Benson <gbenson@redhat.com>
1514
1515 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1516 * configure: Regenerated.
1517 * config.in: Likewise.
1518
125f8a3d
GB
15192014-06-20 Gary Benson <gbenson@redhat.com>
1520
1521 * Makefile.in (SFILES): Update locations for files moved
1522 from common to nat.
1523 (object file files): Reordered.
1524
42995dbd
GB
15252014-06-20 Gary Benson <gbenson@redhat.com>
1526
1527 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1528 (i386_dr_low_set_addr): Likewise.
1529 (i386_dr_low_get_addr): Likewise.
1530 (i386_dr_low_can_set_control): Likewise.
1531 (i386_dr_low_set_control): Likewise.
1532 (i386_dr_low_get_control): Likewise.
1533 (i386_dr_low_get_status): Likewise.
1534 (i386_get_debug_register_length): Likewise.
1535 * linux-x86-low.c (i386_dr_low_set_addr):
1536 Changed signature. Made static.
1537 (i386_dr_low_get_addr): Likewise.
1538 (i386_dr_low_set_control): Likewise.
1539 (i386_dr_low_get_control): Likewise.
1540 (i386_dr_low_get_status): Likewise.
1541 (i386_dr_low): New global variable.
1542 * win32-i386-low.c (i386_dr_low_set_addr):
1543 Changed signature. Made static.
1544 (i386_dr_low_get_addr): Likewise.
1545 (i386_dr_low_set_control): Likewise.
1546 (i386_dr_low_get_control): Likewise.
1547 (i386_dr_low_get_status): Likewise.
1548 (i386_dr_low): New global variable.
1549
e1d2394b
MS
15502014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1551
1552 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1553 * Makefile.in (AR, AR_FLAGS): Define.
1554 * configure: Regenerate.
1555
3a8ee006
GB
15562014-06-19 Gary Benson <gbenson@redhat.com>
1557
1558 * Makefile.in (i386-dregs.o): New rule.
1559 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1560 * i386-low.c (target.h): Remove include.
1561 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1562 (DR_CONTROL_SHIFT): Likewise.
1563 (DR_CONTROL_SIZE): Likewise.
1564 (DR_RW_EXECUTE): Likewise.
1565 (DR_RW_WRITE): Likewise.
1566 (DR_RW_READ): Likewise.
1567 (DR_RW_IORW): Likewise.
1568 (DR_LEN_1): Likewise.
1569 (DR_LEN_2): Likewise.
1570 (DR_LEN_4): Likewise.
1571 (DR_LEN_8): Likewise.
1572 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1573 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1574 (DR_ENABLE_SIZE): Likewise.
1575 (DR_LOCAL_SLOWDOWN): Likewise.
1576 (DR_GLOBAL_SLOWDOWN): Likewise.
1577 (DR_CONTROL_RESERVED): Likewise.
1578 (I386_DR_CONTROL_MASK): Likewise.
1579 (I386_DR_VACANT): Likewise.
1580 (I386_DR_LOCAL_ENABLE): Likewise.
1581 (I386_DR_GLOBAL_ENABLE): Likewise.
1582 (I386_DR_DISABLE): Likewise.
1583 (I386_DR_SET_RW_LEN): Likewise.
1584 (I386_DR_GET_RW_LEN): Likewise.
1585 (I386_DR_WATCH_HIT): Likewise.
1586 (i386_wp_op_t): Likewise.
1587 (i386_show_dr): Likewise.
1588 (i386_length_and_rw_bits): Likewise.
1589 (i386_insert_aligned_watchpoint): Likewise.
1590 (i386_remove_aligned_watchpoint): Likewise.
1591 (i386_handle_nonaligned_watchpoint): Likewise.
1592 i386_update_inferior_debug_regs(): Likewise.
1593 (i386_dr_insert_watchpoint): Likewise.
1594 (i386_dr_remove_watchpoint): Likewise.
1595 (i386_dr_region_ok_for_watchpoint): Likewise.
1596 (i386_dr_stopped_data_address): Likewise.
1597 (i386_dr_stopped_by_watchpoint): Likewise.
1598
8f26655c
GB
15992014-06-19 Gary Benson <gbenson@redhat.com>
1600
1601 * i386-low.c (i386_dr_show): Renamed to
1602 i386_show_dr and made static. All uses updated.
1603 (i386_dr_length_and_rw_bits): Renamed to
1604 i386_length_and_rw_bits and made static.
1605 All uses updated.
1606 (i386_dr_insert_aligned_watchpoint): Renamed to
1607 i386_insert_aligned_watchpoint and made static.
1608 All uses updated.
1609 (i386_dr_remove_aligned_watchpoint): Renamed to
1610 i386_remove_aligned_watchpoint and made static.
1611 All uses updated.
1612 (i386_dr_update_inferior_debug_regs): Renamed to
1613 i386_update_inferior_debug_regs and made static.
1614 All uses updated.
1615
b9228891
GB
16162014-06-18 Gary Benson <gbenson@redhat.com>
1617
5171def3
GB
1618 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1619 (i386_dr_low_can_set_control): Likewise.
1620 (i386_get_debug_register_length): Likewise.
1621 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1622 (i386_dr_low_can_set_control): Likewise.
1623 (i386_get_debug_register_length): Likewise.
1624
16252014-06-17 Gary Benson <gbenson@redhat.com>
1626
b9228891
GB
1627 * i386-low.h (i386-dregs.h): New include.
1628 (DR_FIRSTADDR): Now in i386-dregs.h.
1629 (DR_LASTADDR): Likewise.
1630 (DR_NADDR): Likewise.
1631 (DR_STATUS): Likewise.
1632 (DR_CONTROL): Likewise.
1633 (i386_debug_reg_state): Likewise.
1634 (i386_dr_insert_watchpoint): Likewise.
1635 (i386_dr_remove_watchpoint): Likewise.
1636 (i386_dr_region_ok_for_watchpoint): Likewise.
1637 (i386_dr_stopped_data_address): Likewise.
1638 (i386_dr_stopped_by_watchpoint): Likewise.
1639 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1640
4be83cc2
GB
16412014-06-18 Gary Benson <gbenson@redhat.com>
1642
1643 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1644 i386_dr_insert_watchpoint.
1645 (i386_low_remove_watchpoint): Renamed to
1646 i386_dr_remove_watchpoint.
1647 (i386_low_region_ok_for_watchpoint): Renamed to
1648 i386_dr_region_ok_for_watchpoint.
1649 (i386_low_stopped_data_address): Renamed to
1650 i386_dr_stopped_data_address.
1651 (i386_low_stopped_by_watchpoint): Renamed to
1652 i386_dr_stopped_by_watchpoint.
1653 * i386-low.c (i386_show_dr): Renamed to
1654 i386_dr_show and made nonstatic. All uses updated.
1655 (i386_length_and_rw_bits): Renamed to
1656 i386_dr_length_and_rw_bits and made nonstatic.
1657 All uses updated.
1658 (i386_insert_aligned_watchpoint): Renamed to
1659 i386_dr_insert_aligned_watchpoint and made nonstatic.
1660 All uses updated.
1661 (i386_remove_aligned_watchpoint): Renamed to
1662 i386_dr_remove_aligned_watchpoint and made nonstatic.
1663 All uses updated.
1664 (i386_update_inferior_debug_regs): Renamed to
1665 i386_dr_update_inferior_debug_regs and made nonstatic.
1666 All uses updated.
1667 (i386_low_insert_watchpoint): Renamed to
1668 i386_dr_insert_watchpoint. All uses updated.
1669 (i386_low_remove_watchpoint): Renamed to
1670 i386_dr_remove_watchpoint. All uses updated.
1671 (i386_low_region_ok_for_watchpoint): Renamed to
1672 i386_dr_region_ok_for_watchpoint. All uses updated.
1673 (i386_low_stopped_data_address): Renamed to
1674 i386_dr_stopped_data_address. All uses updated.
1675 (i386_low_stopped_by_watchpoint): Renamed to
1676 i386_dr_stopped_by_watchpoint. All uses updated.
1677
131aa0d4
GB
16782014-06-18 Gary Benson <gbenson@redhat.com>
1679
1680 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1681 (i386_dr_low_can_set_control): Likewise.
1682 (i386_insert_aligned_watchpoint): New check.
1683
d9305f7f
GB
16842014-06-18 Gary Benson <gbenson@redhat.com>
1685
1686 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1687 Renamed to state.
1688
e927c9fc
GB
16892014-06-18 Gary Benson <gbenson@redhat.com>
1690
1691 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1692 instead of fatal and error.
1693 (i386_handle_nonaligned_watchpoint): Likewise.
1694
1b6d4134
GB
16952014-06-18 Gary Benson <gbenson@redhat.com>
1696
1697 * i386-low.c (i386_get_debug_register_length): New macro.
1698 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1699 (i386_show_dr): Use debug_printf instead of fprintf. Use
1700 phex to format values.
1701
6e62758f
GB
17022014-06-18 Gary Benson <gbenson@redhat.com>
1703
1704 * i386-low.h: Comment changes.
1705 * i386-low.c: Likewise.
1706
fc6e2f03
GB
17072014-06-18 Gary Benson <gbenson@redhat.com>
1708
1709 * i386-low.c: Whitespace changes.
1710
f9d1eeed
TT
17112014-06-12 Tom Tromey <tromey@redhat.com>
1712
1713 * utils.c (freeargv): Remove.
1714
0b04e523
TT
17152014-06-12 Tom Tromey <tromey@redhat.com>
1716
1717 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1718 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1719 (parse_debug_format_options): Likewise.
1720 (gdbserver_usage): Likewise.
1721 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1722 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1723 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1724 against libiberty.
1725 ($(LIBGNU)): Depend on libiberty.
1726 (all-lib): Recurse into all subdirs.
1727 (install-only): Invoke "install" target in subdirs.
1728 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1729 targets.
1730 * configure: Rebuild.
1731 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1732 for vasprintf, vsnprintf, or gettimeofday.
1733 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1734 srv_tgtobj.
1735
270c9937
JB
17362014-06-05 Joel Brobecker <brobecker@adacore.com>
1737
1738 * development.sh: Delete.
1739 * Makefile.in (config.status): Adjust dependency on development.sh.
1740 * configure.ac: Adjust development.sh source call.
1741 * configure: Regenerate.
1742
0a261ed8
PA
17432014-06-02 Pedro Alves <palves@redhat.com>
1744
1745 * ax.c (gdb_free_agent_expr): New function.
1746 * ax.h (gdb_free_agent_expr): New declaration.
1747 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1748 list.
1749 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1750 static.
1751 (clear_breakpoint_conditions_and_commands): New function.
1752 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1753 (clear_breakpoint_conditions_and_commands): New declaration.
1754
e9dae05e
RR
17552014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1756
1757 * linux-aarch64-low.c (asm/ptrace.h): Include.
1758
5876f503
JK
17592014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1760
1761 Fix TLS access for -static -pthread.
1762 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1763 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1764 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1765
802e8e6d
PA
17662014-05-20 Pedro Alves <palves@redhat.com>
1767
1768 * linux-aarch64-low.c (aarch64_insert_point)
1769 (aarch64_remove_point): No longer check whether the type is
1770 supported here. Adjust to new interface.
1771 (the_low_target): Install aarch64_supports_z_point_type as
1772 supports_z_point_type method.
1773 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1774 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1775 instead of a Z packet char. Adjust.
1776 (arm_supports_z_point_type): New function.
1777 (arm_insert_point, arm_remove_point): Adjust to new interface.
1778 (the_low_target): Install arm_supports_z_point_type.
1779 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1780 (cris_insert_point, cris_remove_point): Adjust to new interface.
1781 Don't check whether the type is supported here.
1782 (the_low_target): Install cris_supports_z_point_type.
1783 * linux-low.c (linux_supports_z_point_type): New function.
1784 (linux_insert_point, linux_remove_point): Adjust to new interface.
1785 * linux-low.h (struct linux_target_ops) <insert_point,
1786 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1787 raw_breakpoint pointer parameter.
1788 <supports_z_point_type>: New method.
1789 * linux-mips-low.c (mips_supports_z_point_type): New function.
1790 (mips_insert_point, mips_remove_point): Adjust to new interface.
1791 Use mips_supports_z_point_type.
1792 (the_low_target): Install mips_supports_z_point_type.
1793 * linux-ppc-low.c (the_low_target): Install NULL as
1794 supports_z_point_type method.
1795 * linux-s390-low.c (the_low_target): Install NULL as
1796 supports_z_point_type method.
1797 * linux-sparc-low.c (the_low_target): Install NULL as
1798 supports_z_point_type method.
1799 * linux-x86-low.c (x86_supports_z_point_type): New function.
1800 (x86_insert_point): Adjust to new insert_point interface. Use
1801 insert_memory_breakpoint. Adjust to new
1802 i386_low_insert_watchpoint interface.
1803 (x86_remove_point): Adjust to remove_point interface. Use
1804 remove_memory_breakpoint. Adjust to new
1805 i386_low_remove_watchpoint interface.
1806 (the_low_target): Install x86_supports_z_point_type.
1807 * lynx-low.c (lynx_target_ops): Install NULL as
1808 supports_z_point_type callback.
1809 * nto-low.c (nto_supports_z_point_type): New.
1810 (nto_insert_point, nto_remove_point): Adjust to new interface.
1811 (nto_target_ops): Install nto_supports_z_point_type.
1812 * mem-break.c: Adjust intro comment.
1813 (struct raw_breakpoint) <raw_type, size>: New fields.
1814 <inserted>: Update comment.
1815 <shlib_disabled>: Delete field.
1816 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1817 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1818 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1819 (raw_bkpt_type_to_target_hw_bp_type): New function.
1820 (find_enabled_raw_code_breakpoint_at): New function.
1821 (find_raw_breakpoint_at): New type and size parameters. Use them.
1822 (insert_memory_breakpoint): New function, based off
1823 set_raw_breakpoint_at.
1824 (remove_memory_breakpoint): New function.
1825 (set_raw_breakpoint_at): Reimplement.
1826 (set_breakpoint): New, based on set_breakpoint_at.
1827 (set_breakpoint_at): Reimplement.
1828 (delete_raw_breakpoint): Go through the_target->remove_point
1829 instead of assuming memory breakpoints.
1830 (find_gdb_breakpoint_at): Delete.
1831 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1832 (find_gdb_breakpoint): New function.
1833 (set_gdb_breakpoint_at): Delete.
1834 (z_type_supported): New function.
1835 (set_gdb_breakpoint_1): New function, loosely based off
1836 set_gdb_breakpoint_at.
1837 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1838 (delete_gdb_breakpoint_at): Delete.
1839 (delete_gdb_breakpoint_1): New function, loosely based off
1840 delete_gdb_breakpoint_at.
1841 (delete_gdb_breakpoint): New function.
1842 (clear_gdb_breakpoint_conditions): Rename to ...
1843 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1844 breakpoint.
1845 (add_condition_to_breakpoint): Make static.
1846 (add_breakpoint_condition): Take a struct breakpoint pointer
1847 instead of an address. Adjust.
1848 (gdb_condition_true_at_breakpoint): Rename to ...
1849 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1850 z_type parameter.
1851 (gdb_condition_true_at_breakpoint): Reimplement.
1852 (add_breakpoint_commands): Take a struct breakpoint pointer
1853 instead of an address. Adjust.
1854 (gdb_no_commands_at_breakpoint): Rename to ...
1855 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1856 parameter. Return true if no breakpoint was found. Change debug
1857 output.
1858 (gdb_no_commands_at_breakpoint): Reimplement.
1859 (run_breakpoint_commands): Rename to ...
1860 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1861 and change return type to boolean.
1862 (run_breakpoint_commands): New function.
1863 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1864 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1865 breakpoint. Go through the_target->remove_point instead of
1866 assuming memory breakpoint.
1867 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1868 software and hardware breakpoints.
1869 (reinsert_raw_breakpoint): Go through the_target->insert_point
1870 instead of assuming memory breakpoint.
1871 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1872 software and hardware breakpoints.
1873 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1874 Check both software and hardware breakpoints.
1875 (validate_inserted_breakpoint): Assert the breakpoint is a
1876 software breakpoint. Set the inserted flag to -1 instead of
1877 setting shlib_disabled.
1878 (delete_disabled_breakpoints): Adjust.
1879 (validate_breakpoints): Only validate software breakpoints.
1880 Adjust to inserted flag change.
1881 (check_mem_read, check_mem_write): Skip breakpoint types other
1882 than software breakpoints. Adjust to inserted flag change.
1883 * mem-break.h (enum raw_bkpt_type): New enum.
1884 (raw_breakpoint, struct process_info): Forward declare.
1885 (Z_packet_to_target_hw_bp_type): Delete declaration.
1886 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1887 (set_gdb_breakpoint, delete_gdb_breakpoint)
1888 (clear_breakpoint_conditions): New declarations.
1889 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1890 (breakpoint_inserted_here): Update comment.
1891 (add_breakpoint_condition, add_breakpoint_commands): Replace
1892 address parameter with a breakpoint pointer parameter.
1893 (gdb_breakpoint_here): Update comment.
1894 (delete_gdb_breakpoint_at): Delete.
1895 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1896 * server.c (process_point_options): Take a struct breakpoint
1897 pointer instead of an address. Adjust.
1898 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1899 delete_gdb_breakpoint.
1900 * spu-low.c (spu_target_ops): Install NULL as
1901 supports_z_point_type method.
1902 * target.h: Include mem-break.h.
1903 (struct target_ops) <prepare_to_access_memory>: Update comment.
1904 <supports_z_point_type>: New field.
1905 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1906 instead of a char. Also take a raw breakpoint pointer.
1907 * win32-arm-low.c (the_low_target): Install NULL as
1908 supports_z_point_type.
1909 * win32-i386-low.c (i386_supports_z_point_type): New function.
1910 (i386_insert_point, i386_remove_point): Adjust to new interface.
1911 (the_low_target): Install i386_supports_z_point_type.
1912 * win32-low.c (win32_supports_z_point_type): New function.
1913 (win32_insert_point, win32_remove_point): Adjust to new interface.
1914 (win32_target_ops): Install win32_supports_z_point_type.
1915 * win32-low.h (struct win32_target_ops):
1916 <supports_z_point_type>: New method.
1917 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1918 instead of a char. Also take a raw breakpoint pointer.
1919
932539e3
PA
19202014-05-20 Pedro Alves <palves@redhat.com>
1921
1922 * mem-break.h: Include break-common.h.
1923 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1924 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1925 (Z_packet_to_target_hw_bp_type): New declaration.
1926 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1927 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1928 (Z_PACKET_ACCESS_WP): Delete macros.
1929 (Z_packet_to_hw_type): Delete function.
1930 * i386-low.h: Don't include break-common.h here.
1931 (Z_packet_to_hw_type): Delete declaration.
1932 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1933 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1934 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1935 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1936 * linux-aarch64-low.c: Don't include break-common.h here.
1937 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1938 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1939 (Z_packet_to_target_hw_bp_type): Delete function.
1940 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1941 function.
1942 (mips_insert_point, mips_remove_point): Use
1943 Z_packet_to_target_hw_bp_type.
1944
4ff0d3d8
PA
19452014-05-20 Pedro Alves <palves@redhat.com>
1946
1947 * linux-aarch64-low.c: Include break-common.h.
1948 (enum target_point_type): Delete.
1949 (Z_packet_to_point_type): Rename to ...
1950 (Z_packet_to_target_hw_bp_type): ... this, and return a
1951 target_hw_bp_type instead.
1952 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1953 instead of an enum target_point_type.
1954 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1955 breakpoint type.
1956 (aarch64_dr_state_insert_one_point)
1957 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1958 (aarch64_handle_aligned_watchpoint)
1959 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1960 Take an enum target_hw_bp_type instead of an enum
1961 target_point_type.
1962 (aarch64_supports_z_point_type): New function.
1963 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1964 use Z_packet_to_target_hw_bp_type.
1965
786dc519
JB
19662014-05-20 Joel Brobecker <brobecker@adacore.com>
1967
1968 * configure.ac: Only use -Werror by default when DEVELOPMENT
1969 is true.
1970 * configure: Regenerate.
1971
9e0aa64f
JK
19722014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1973
1974 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1975 * linux-x86-low.c (X86_64_USER_REGS): New.
1976 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1977
2b577b92
YQ
19782014-04-28 Yao Qi <yao@codesourcery.com>
1979
1980 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1981 name.
1982
94611da2
PA
19832014-04-25 Pedro Alves <palves@redhat.com>
1984
1985 PR server/16255
1986 * linux-low.c (linux_attach_fail_reason_string): New function.
1987 (linux_attach_lwp): Delete.
1988 (linux_attach_lwp_1): Rename to ...
1989 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1990 argument. Remove "initial" parameter. Return int instead of
1991 void. Don't error or warn here.
1992 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1993 failure to attach to the tgid. Call warning when failing to
1994 attach to an lwp.
1995 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1996 argument. Remove "initial" parameter. Return int instead of
1997 void. Don't error or warn here.
1998 (linux_attach_fail_reason_string): New declaration.
1999 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2000 interface change. Use linux_attach_fail_reason_string.
2001
01f9f808
MS
20022014-04-24 Michael Sturm <michael.sturm@mintel.com>
2003 Walfred Tedeschi <walfred.tedeschi@intel.com>
2004
2005 * Makefile.in: Added rules to handle new files
2006 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2007 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2008 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2009 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2010 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2011 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2012 x32-avx512-linux.o.
2013 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2014 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2015 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2016 i386/x32-avx512.xml.
2017 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2018 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2019 i386/x32-avx512-linux.xml.
2020 * i387-fp.c (num_avx512_k_registers): New constant for number
2021 of K registers.
2022 (num_avx512_zmmh_low_registers): New constant for number of
2023 lower ZMM registers (0-15).
2024 (num_avx512_zmmh_high_registers): New constant for number of
2025 higher ZMM registers (16-31).
2026 (num_avx512_ymmh_registers): New contant for number of higher
2027 YMM registers (ymm16-31 added by avx521 on x86_64).
2028 (num_avx512_xmm_registers): New constant for number of higher
2029 XMM registers (xmm16-31 added by AVX512 on x86_64).
2030 (struct i387_xsave): Add space for AVX512 registers.
2031 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2032 Add code to handle AVX512 registers.
2033 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2034 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2035 prototypei from generated file.
2036 (tdesc_amd64_avx512_linux): Likewise.
2037 (init_registers_x32_avx512_linux): Likewise.
2038 (tdesc_x32_avx512_linux): Likewise.
2039 (init_registers_i386_avx512_linux): Likewise.
2040 (tdesc_i386_avx512_linux): Likewise.
2041 (x86_64_regmap): Add AVX512 registers.
2042 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2043 mask.
2044 (initialize_low_arch): Add code to initialize AVX512 registers.
2045
51aa91f9
PA
20462014-04-23 Pedro Alves <palves@redhat.com>
2047
2048 * mem-break.c (find_gdb_breakpoint_at): Make static.
2049 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2050
a4165e94
PA
20512014-04-23 Pedro Alves <palves@redhat.com>
2052
2053 * i386-low.c: Don't include break-common.h here.
2054 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2055 prototype to take target_hw_bp_type as argument instead of a Z
2056 packet char.
2057 * i386-low.h: Include break-common.h here.
2058 (Z_packet_to_hw_type): Declare.
2059 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2060 prototypes.
2061 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2062 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2063 (x86_remove_point): Convert the packet number to a
2064 target_hw_bp_type before calling i386_low_remove_watchpoint.
2065 * win32-i386-low.c (i386_insert_point): Convert the packet number
2066 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2067 (i386_remove_point): Convert the packet number to a
2068 target_hw_bp_type before calling i386_low_remove_watchpoint.
2069
b8acf843
PA
20702014-04-23 Pedro Alves <palves@redhat.com>
2071
2072 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2073
d708bcd1
PA
20742014-04-10 Pedro Alves <palves@redhat.com>
2075
2076 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2077 Check if the condition or command is NULL before checking if the
2078 breakpoint is known. On success, return true.
2079 * mem-break.h (add_breakpoint_condition): Document return.
2080 (add_breakpoint_commands): Add describing comment.
2081 * server.c (skip_to_semicolon): New function.
2082 (process_point_options): Use it.
2083
2eec7d5b
PA
20842014-04-09 Pedro Alves <palves@redhat.com>
2085
2086 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2087 to lwpid_of.
2088
fa96cb38
PA
20892014-02-27 Pedro Alves <palves@redhat.com>
2090
2091 PR 12702
2092 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2093 macros.
2094 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2095 output.
2096 (last_thread_of_process_p): Take a PID argument instead of a
2097 thread pointer.
2098 (linux_wait_for_lwp): Delete.
2099 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2100 functions.
2101 (linux_low_filter_event): New function, party factored out from
2102 linux_wait_for_event.
2103 (linux_wait_for_event): Rename to ...
2104 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2105 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2106 sigsuspend. Check for zombie leaders.
2107 (linux_wait_for_event): Reimplement as wrapper around
2108 linux_wait_for_event_filtered.
2109 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2110 a normal or signal exit is seen, it's the whole process exiting.
2111 (wait_for_sigstop): No longer a for_each_inferior callback.
2112 Rewrite on top of linux_wait_for_event_filtered.
2113 (stop_all_lwps): Call wait_for_sigstop directly.
2114 * server.c (resume, handle_target_event): Handle
2115 TARGET_WAITKIND_NO_RESUMED.
2116
d763de10
JB
21172014-02-26 Joel Brobecker <brobecker@adacore.com>
2118
2119 * win32-low.c (psapi_get_dll_name,
2120 * win32_CreateToolhelp32Snapshot): Delete.
2121 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2122 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2123 Delete.
2124 (handle_load_dll): Add function description.
2125 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2126
850a0f76
JB
21272014-02-26 Joel Brobecker <brobecker@adacore.com>
2128
2129 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2130 Add comment.
2131 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2132 base address when calling win32_add_one_solib.
2133 (handle_load_dll): Delete local variable load_addr.
2134 Remove 0x1000 offset applied to DLL base address when calling
2135 win32_add_one_solib.
2136 (handle_unload_dll): Add comment.
2137
f25b3fc3
JB
21382014-02-26 Joel Brobecker <brobecker@adacore.com>
2139
2140 * win32-low.c (win32_add_all_dlls): Renames
2141 win32_ensure_ntdll_loaded. Rewrite function documentation.
2142 Adjust implementation to always load all DLLs.
2143 Add 0x1000 offset to DLL base address when calling
2144 win32_add_one_solib.
2145 (child_initialization_done): New static global.
2146 (do_initial_child_stuff): Set child_initialization_done to
2147 zero during child initialization, and 1 after. Replace call
2148 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2149 Add comment.
2150 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2151 (handle_unload_dll): Add function documentation.
2152 (get_child_debug_event): Ignore load and unload DLL events
2153 during child initialization.
2154
d86d4aaf
DE
21552014-02-20 Doug Evans <dje@google.com>
2156
3bc32da3 2157 Remove global all_lwps.
d86d4aaf
DE
2158 * inferiors.h (ptid_of): Move here from linux-low.h.
2159 (pid_of, lwpid_of): Ditto.
2160 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2161 parameter is a struct thread_info * now.
2162 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2163 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2164 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2165 directly.
2166 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2167 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2168 * linux-arm-low.c (update_registers_callback): Update, "entry"
2169 parameter is a struct thread_info * now.
2170 Fetch lwpid from current_inferior directly.
2171 (arm_insert_point): Pass &all_threads to find_inferior instead of
2172 &all_lwps.
2173 (arm_remove_point): Ditto.
2174 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2175 (arm_prepare_to_resume): Fetch pid from thread.
2176 (arm_read_description): Fetch lwpid from current_inferior directly.
2177 * linux-low.c (all_lwps): Delete.
2178 (delete_lwp): Delete call to remove_inferior.
2179 (handle_extended_wait): Fetch lwpid from thread.
2180 (add_lwp): Don't set lwp->entry.id. Remove call to
2181 add_inferior_to_list.
2182 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2183 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2184 (kill_one_lwp_callback): Ditto.
2185 (linux_kill): Don't dereference NULL pointer.
2186 Fetch ptid,lwpid from thread.
2187 (get_detach_signal): Fetch ptid from thread.
2188 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2189 Simplify call to regcache_invalidate_thread.
2190 (delete_lwp_callback): Update, "entry" parameter is a
2191 struct thread_info * now. Fetch pid from thread.
2192 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2193 (status_pending_p_callback): Update, "entry" parameter is a
2194 struct thread_info * now. Fetch ptid from thread.
2195 (find_lwp_pid): Update, "entry" parameter is a
2196 struct thread_info * now.
2197 (linux_wait_for_lwp): Fetch pid from thread.
2198 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2199 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2200 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2201 (dequeue_one_deferred_signal): Ditto.
2202 (cancel_breakpoint): Fetch ptid from current_inferior.
2203 (linux_wait_for_event): Pass &all_threads to find_inferior,
2204 not &all_lwps. Fetch ptid, lwpid from thread.
2205 (count_events_callback): Update, "entry" parameter is a
2206 struct thread_info * now.
2207 (select_singlestep_lwp_callback): Ditto.
2208 (select_event_lwp_callback): Ditto.
2209 (cancel_breakpoints_callback): Ditto.
2210 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2211 not &all_lwps.
2212 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2213 (unsuspend_one_lwp): Update, "entry" parameter is a
2214 struct thread_info * now.
2215 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2216 not &all_lwps.
2217 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2218 Fetch lwpid from thread, not lwp.
2219 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2220 Pass &all_threads to find_inferior, not &all_lwps.
2221 (send_sigstop): Fetch lwpid from thread, not lwp.
2222 (send_sigstop_callback): Update, "entry" parameter is a
2223 struct thread_info * now.
2224 (suspend_and_send_sigstop_callback): Ditto.
2225 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2226 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2227 struct thread_info * now.
2228 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2229 from thread, lwp.
2230 (lwp_running): Update, "entry" parameter is a
2231 struct thread_info * now.
2232 (stop_all_lwps): Fetch ptid from thread.
2233 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2234 (linux_resume_one_lwp): Fetch lwpid from thread.
2235 (linux_set_resume_request): Update, "entry" parameter is a
2236 struct thread_info * now. Fetch pid, lwpid from thread.
2237 (resume_status_pending_p): Update, "entry" parameter is a
2238 struct thread_info * now.
2239 (need_step_over_p): Ditto. Fetch lwpid from thread.
2240 (start_step_over): Fetch lwpid from thread.
2241 (linux_resume_one_thread): Update, "entry" parameter is a
2242 struct thread_info * now. Fetch lwpid from thread.
2243 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2244 (proceed_one_lwp): Update, "entry" parameter is a
2245 struct thread_info * now. Fetch lwpid from thread.
2246 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2247 struct thread_info * now.
2248 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2249 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2250 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2251 directly.
2252 (regsets_store_inferior_registers): Ditto.
2253 (fetch_register, store_register): Ditto.
2254 (linux_read_memory, linux_write_memory): Ditto.
2255 (linux_request_interrupt): Ditto.
2256 (linux_read_auxv): Ditto.
2257 (linux_xfer_siginfo): Ditto.
2258 (linux_qxfer_spu): Ditto.
2259 (linux_qxfer_libraries_svr4): Ditto.
2260 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2261 moved to inferiors.h.
2262 (get_lwp): Delete.
2263 (get_thread_lwp): Update.
2264 (struct lwp_info): Delete member "entry". Simplify comment for
2265 member "thread".
2266 (all_lwps): Delete.
2267 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2268 current_inferior directly.
2269 (update_watch_registers_callback): Update, "entry" parameter is a
2270 struct thread_info * now. Fetch pid from thread.
2271 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2272 (mips_insert_point): Fetch lwpid from current_inferior.
2273 Pass &all_threads to find_inferior, not &all_lwps.
2274 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2275 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2276 directly.
2277 (mips_stopped_data_address): Ditto.
2278 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2279 directly.
2280 * linux-tile-low.c (tile_arch_setup): Ditto.
2281 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2282 (update_debug_registers_callback): Update, "entry" parameter is a
2283 struct thread_info * now. Fetch pid from thread.
2284 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2285 Pass &all_threads to find_inferior, not &all_lwps.
2286 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2287 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2288 Pass &all_threads to find_inferior, not &all_lwps.
2289 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2290 (i386_dr_low_get_status): Ditto.
2291 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2292 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2293 (x86_linux_read_description): Ditto.
2294 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2295
3b8361aa
DE
22962014-02-20 Doug Evans <dje@google.com>
2297
2298 * inferiors.c (get_first_inferior): Fix buglet.
2299
f7667f0d
DE
23002014-02-19 Doug Evans <dje@google.com>
2301
2302 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2303 * inferiors.c (add_thread): Change result type to struct thread_info *.
2304 All callers updated.
2305 (add_lwp): Call add_thread here instead of in callers.
2306 All callers updated.
2307 * linux-low.h (get_lwp_thread): Rewrite.
2308 (struct lwp_info): New member "thread".
2309
b3312d80
DE
23102014-02-19 Doug Evans <dje@google.com>
2311
2312 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2313 All callers updated.
2314
ecc6f45c
DE
23152014-02-19 Doug Evans <dje@google.com>
2316
2317 * inferiors.c (add_thread): Fix whitespace.
2318
649ebbca
DE
23192014-02-19 Doug Evans <dje@google.com>
2320
2321 * dll.c (clear_dlls): Replace accessing list implemention details
2322 with API function.
2323 * gdbthread.h (get_first_thread): Declare.
2324 * inferiors.c (for_each_inferior_with_data): New function.
2325 (get_first_thread): New function.
2326 (find_thread_ptid): Simplify.
2327 (get_first_inferior): New function.
2328 (clear_list): Delete.
2329 (one_inferior_p): New function.
2330 (clear_inferior_list): New function.
2331 (clear_inferiors): Update.
2332 * inferiors.h (for_each_inferior_with_data): Declare.
2333 (clear_inferior_list): Declare.
2334 (one_inferior_p): Declare.
2335 (get_first_inferior): Declare.
2336 * linux-low.c (linux_wait_for_event): Replace accessing list
2337 implemention details with API function.
2338 * server.c (target_running): Ditto.
2339 (accumulate_file_name_length): New function.
2340 (emit_dll_description): New function.
2341 (handle_qxfer_libraries): Replace accessing list implemention
2342 details with API function.
2343 (handle_qxfer_threads_worker): New function.
2344 (handle_qxfer_threads_proper): Replace accessing list implemention
2345 details with API function.
2346 (handle_query): Ditto.
2347 (visit_actioned_threads_callback_ftype): New typedef.
2348 (visit_actioned_threads_data): New struct.
2349 (visit_actioned_threads): Rewrite to be find_inferior callback.
2350 (resume): Call find_inferior.
2351 (handle_status): Replace accessing list implemention
2352 details with API function.
2353 (process_serial_event): Replace accessing list implemention details
2354 with API function.
2355 * target.c (set_desired_inferior): Replace accessing list implemention
2356 details with API function.
2357 * tracepoint.c (same_process_p): New function.
2358 (gdb_agent_about_to_close): Replace accessing list implemention
2359 details with API function.
2360 * win32-low.c (child_delete_thread): Replace accessing list
2361 implemention details with API function.
2362 (match_dll_by_basename): New function.
2363 (dll_is_loaded_by_basename): New function.
2364 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2365 details call to dll_is_loaded_by_basename.
2366
80894984
DE
23672014-02-19 Doug Evans <dje@google.com>
2368
2369 * dll.h (struct dll_info): Add comment.
2370 * gdbthread.h (struct thread_info): Add comment.
2371 (current_ptid): Simplify.
2372 * inferiors.c (add_process): Update.
2373 (remove_process): Update.
2374 * inferiors.h (struct process_info): Rename member "head" to "entry".
2375 * linux-low.c (delete_lwp): Update.
2376 (add_lwp): Update.
2377 (last_thread_of_process_p): Update.
2378 (kill_one_lwp_callback, linux_kill): Update.
2379 (status_pending_p_callback): Update.
2380 (wait_for_sigstop): Update. Simplify read of ptid.
2381 (start_step_over): Update.
2382 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2383 (get_lwp_thread): Update.
2384 (struct lwp_info): Rename member "head" to "entry".
2385 * regcache.h (inferior_list_entry): Delete.
2386 * server.c (kill_inferior_callback): Update.
2387 (detach_or_kill_inferior_callback): Update.
2388 (print_started_pid): Update.
2389 (print_attached_pid): Update.
2390 (process_serial_event): Simplify read of ptid.
2391 * thread-db.c (thread_db_create_event): Update.
2392 (thread_db_get_tls_address): Update.
2393 * win32-low.c (current_inferior_ptid): Simplify.
2394
46917d26
TT
23952014-02-19 Tom Tromey <tromey@redhat.com>
2396
2397 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2398 argument.
2399 (target_supports_btrace): Update.
2400
0759a81e
YQ
24012014-02-14 Yao Qi <yao@codesourcery.com>
2402
2403 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2404 (rsp-low-ipa.o): New target.
2405
a7191e8b
TT
24062014-02-12 Tom Tromey <tromey@redhat.com>
2407
2408 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2409 convert_ascii_to_int.
2410 * regcache.c (registers_to_string): Likewise.
2411 * remote-utils.c (decode_M_packet): Likewise.
2412 * server.c (process_serial_event): Likewise.
2413
ff0e980e
TT
24142014-02-12 Tom Tromey <tromey@redhat.com>
2415
2416 * server.c (handle_query, handle_v_run): Use hex2bin, not
2417 unhexify.
2418 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2419
e9371aff
TT
24202014-02-12 Tom Tromey <tromey@redhat.com>
2421
2422 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2423 convert_int_to_ascii.
2424 * regcache.c (registers_to_string, collect_register_as_string):
2425 Likewise.
2426 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2427 Likewise.
2428 * server.c (process_serial_event): Likewise.
2429 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2430 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2431
971dc0b8
TT
24322014-02-12 Tom Tromey <tromey@redhat.com>
2433
2434 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2435 bin2hex, not hexify.
2436 * tracepoint.c (cmd_qtstatus): Likewise.
2437
0a822afb
TT
24382014-02-12 Tom Tromey <tromey@redhat.com>
2439
2440 * remote-utils.c (monitor_output): Pass explicit length to
2441 hexify.
2442
9c3d6531
TT
24432014-02-12 Tom Tromey <tromey@redhat.com>
2444
2445 * tracepoint.c: Include rsp-low.h.
2446 * server.c: Include rsp-low.h.
2447 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2448 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2449 declare.
2450 * remote-utils.c: Include rsp-low.h.
2451 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2452 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2453 (convert_int_to_ascii, convert_ascii_to_int): Move to
2454 common/rsp-low.c.
2455 * regcache.c: Include rsp-low.h.
2456 * ax.c: Include rsp-low.h.
2457 * Makefile.in (SFILES): Add common/rsp-low.c.
2458 (OBS): Add rsp-low.o.
2459 (rsp-low.o): New target.
2460
01fd3ea5
TT
24612014-02-12 Tom Tromey <tromey@redhat.com>
2462
2463 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2464 Include print-utils.h.
2465 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2466 (plongest, thirty_two, phex_nz): Remove.
2467 * Makefile.in (SFILES): Add common/print-utils.c.
2468 (OBS): Add print-utils.o.
2469 (print-utils-ipa.o): New target.
2470 (print-utils.o): New target.
2471 (IPA_OBJS): Add print-utils-ipa.o.
2472
e99dc820
TT
24732014-02-06 Tom Tromey <tromey@redhat.com>
2474
2475 * Makefile.in (SFILES): Fix indentation.
2476
ee1e2d4f
DE
24772014-02-05 Doug Evans <dje@google.com>
2478
2479 * linux-low.c (linux_wait_for_event): Improve comment.
2480 (linux_wait_1): Keep current_inferior in sync with event_child.
2481
f5a02773
DE
24822014-01-22 Doug Evans <dje@google.com>
2483
2484 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2485
87ce2a04
DE
24862014-01-22 Doug Evans <dje@google.com>
2487
2488 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2489 * configure: Regenerate.
2490 * config.in: Regenerate.
2491 * Makefile.in (SFILES): Add debug.c.
2492 (OBS): Add debug.o.
2493 * debug.c: New file.
2494 * debug.h: New file.
2495 * linux-aarch64-low.c (*): Update all debugging printfs to use
2496 debug_printf instead of fprintf.
2497 * linux-arm-low.c (*): Ditto.
2498 * linux-cris-low.c (*): Ditto.
2499 * linux-crisv32-low.c (*): Ditto.
2500 * linux-m32r-low.c (*): Ditto.
2501 * linux-sparc-low.c (*): Ditto.
2502 * linux-x86.c (*): Ditto.
2503 * linux-low.c (*): Ditto.
2504 (linux_wait_1): Add calls to debug_enter, debug_exit.
2505 (linux_wait): Remove redundant debugging printf.
2506 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2507 (linux_resume, unstop_all_lwps): Ditto.
2508 * mem-break.c (*): Update all debugging printfs to use
2509 debug_printf instead of fprintf.
2510 * remote-utils.c (*): Ditto.
2511 * thread-db.c (*): Ditto.
2512 * server.c #include <ctype.h>, "gdb_vecs.h".
2513 (debug_threads): Moved to debug.c.
2514 (*): Update all debugging printfs to use debug_printf instead of
2515 fprintf.
2516 (start_inferior): Replace call to fflush with call to debug_flush.
2517 (monitor_show_help): Mention set debug-format.
2518 (parse_debug_format_options): New function.
2519 (handle_monitor_command): Handle "monitor set debug-format".
2520 (gdbserver_usage): Mention --debug-format.
2521 (main): Parse --debug-format.
2522 * server.h (debug_threads): Declaration moved to debug.h.
2523 #include "debug.h".
2524 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2525 trace_debug_1 that uses debug_printf.
2526 (tracepoint_look_up_symbols): Update all debugging printfs to use
2527 debug_printf instead of fprintf.
2528
e671835b
BS
25292014-01-20 Baruch Siach <baruch@tkos.co.il>
2530
2531 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2532 sys/ptrace.h.
2533
b5737fa9
PA
25342014-01-17 Pedro Alves <palves@redhat.com>
2535
ea38d2a9 2536 PR build/16445
c7faa97a
PA
2537 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2538 defined after including gdb_proc_service.h.
b5737fa9 2539
40ed484e
DE
25402014-01-16 Doug Evans <dje@google.com>
2541
2542 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2543 (match_dll): Use it.
2544
969c39fb
MM
25452014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2546
2547 * target.h (target_ops) <read_btrace>: Change parameters and
2548 return type to allow error reporting.
2549 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2550 trace reading errors on.
2551 * linux-low.c (linux_low_read_btrace): Pass trace reading
2552 errors on.
2553 (linux_low_disable_btrace): New.
2554
ab7f45ba
DE
25552014-01-15 Doug Evans <dje@google.com>
2556
2557 * inferiors.c (thread_id_to_gdb_id): Delete.
2558 * inferiors.h (thread_id_to_gdb_id): Delete.
2559
66af0f44
EZ
25602014-01-13 Eli Zaretskii <eliz@gnu.org>
2561
2562 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2563 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2564 versions.
2565
9939e131
PA
25662014-01-08 Pedro Alves <palves@redhat.com>
2567
2568 * server.c (handle_status): Don't discard previous queued stop
2569 replies or thread's pending status here.
2570 (main) <disconnection>: Do it here instead.
2571
b7ea362b
PA
25722014-01-08 Pedro Alves <palves@redhat.com>
2573
2574 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2575 * server.c (visit_actioned_threads, handle_pending_status): New
2576 function.
2577 (handle_v_cont): Factor out parts to ...
2578 (resume): ... this new function. If in all-stop, and a thread
2579 being resumed has a pending status, report it without actually
2580 resuming.
2581 (myresume): Adjust to use the new 'resume' function.
2582 (clear_pending_status_callback, set_pending_status_callback)
2583 (find_status_pending_thread_callback): New functions.
2584 (handle_status): Handle the case of multiple threads having
2585 interesting statuses to report. Report threads' real last signal
2586 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2587 with an interesting thread to report the status for, instead of
2588 always reporting the status of the first thread.
2589
28498c42
JB
25902014-01-01 Joel Brobecker <brobecker@adacore.com>
2591
2592 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2593 * gdbreplay.c (gdbreplay_version): Likewise.
2594
f45c82da
YZ
25952013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2596
2597 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2598 iov.iov_len with the real length in use.
2599
379a5e2d
JB
26002013-12-13 Joel Brobecker <brobecker@adacore.com>
2601
2602 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2603 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2604 for all targets that use win32-low.c.
2605 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2606 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2607
4210d83e
PA
26082013-12-13 Pedro Alves <palves@redhat.com>
2609
2610 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2611 if equal to TARGET_WAITKIND_LOADED.
2612 * win32-low.c (cached_status): New static global.
2613 (win32_wait): Add declaration.
2614 (do_initial_child_stuff): Flush all initial pending debug events
2615 up to the initial breakpoint.
2616 (win32_wait): If CACHED_STATUS was set, return that instead
2617 of doing a real wait. Remove the code resuming the execution
2618 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2619 during the initial phase. Also remove the code changing
2620 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2621 TARGET_WAITKIND_STOPPED.
2622
e7f0d979
YQ
26232013-12-11 Yao Qi <yao@codesourcery.com>
2624
2625 * notif.c (handle_notif_ack): Return 0 if no notification
2626 matches.
2627
ebcf782c
DE
26282013-11-20 Doug Evans <dje@google.com>
2629
2630 * linux-low.c (linux_set_resume_request): Fix comment.
2631
20ad9378
DE
26322013-11-20 Doug Evans <dje@google.com>
2633
2634 * linux-low.c (resume_status_pending_p): Tweak comment.
2635
a196ebeb
WT
26362013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2637
2638 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2639 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2640 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2641 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2642 (srv_amd64_regobj): Add amd64-mpx.o.
2643 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2644 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2645 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2646 * i387-fp.c (num_pl_bnd_register) Added constant.
2647 (num_pl_bnd_cfg_registers) Added constant.
2648 (struct i387_xsave) Added reserved area and MPX fields.
2649 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2650 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2651 function.
2652 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2653 (init_registers_amd64_mpx_linux): Declare new function.
2654 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2655 (x86_64_regmap): Add MPX registers.
2656 (x86_linux_read_description): Add MPX case.
2657 (initialize_low_arch): Initialize MPX targets.
2658
0080a2f6
TT
26592013-11-18 Tom Tromey <tromey@redhat.com>
2660
2661 * configure: Rebuild.
2662 * configure.ac: Don't check for stdlib.h.
2663 * gdbreplay.c: Unconditionally include stdlib.h.
2664
2978b111
TT
26652013-11-18 Tom Tromey <tromey@redhat.com>
2666
2667 * config.in: Rebuild.
2668 * configure: Rebuild.
2669 * configure.ac: Don't use AC_HEADER_DIRENT.
2670
a3d08894
TT
26712013-11-18 Tom Tromey <tromey@redhat.com>
2672
2673 * server.h: Don't check HAVE_STRING_H.
2674 * gdbreplay.c: Don't check HAVE_STRING_H.
2675 * configure: Rebuild.
2676
0a5dd17d
TT
26772013-11-18 Tom Tromey <tromey@redhat.com>
2678
2679 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2680 LIBGNU.
2681
1bd2f0ba
TT
26822013-11-08 Tom Tromey <tromey@redhat.com>
2683
2684 * configure, config.in: Rebuild.
2685 * configure.ac: Remove unused configury.
2686
3266f10b
TT
26872013-11-08 Tom Tromey <tromey@redhat.com>
2688
2689 * acinclude.m4: Include common.m4, codeset.m4.
2690 * configure, config.in: Rebuild.
2691 * configure.ac: Use GDB_AC_COMMON.
2692
6682d959
AA
26932013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2694
2695 * linux-s390-low.c (HWCAP_S390_TE): New define.
2696 (s390_arch_setup): Consider the TE field in the HWCAP for
2697 determining 'have_regset_tdb'.
2698
fd0a4d76
SDJ
26992013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2700
2701 PR gdb/16014
2702 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2703 call to sizeof.
2704
1a3d890b
PA
27052013-10-02 Pedro Alves <palves@redhat.com>
2706
2707 * server.c (process_serial_event): Don't output "GDBserver
2708 exiting" if GDB is connected through stdio.
2709 * target.c (mywait): Likewise, be silent if GDB is connected
2710 through stdio.
2711
97ad4581
JB
27122013-10-01 Joel Brobecker <brobecker@adacore.com>
2713
2714 * lynx-low.c (lynx_add_threads_after_attach): New function.
2715 (lynx_attach): Remove call to add_thread. Add call to
2716 lynx_add_threads_after_attach instead.
2717
5b4e221c
MF
27182013-09-28 Mike Frysinger <vapier@gentoo.org>
2719
2720 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2721 * config.in, configure: Regenerated.
2722
ee47b2f8
YQ
27232013-09-18 Yao Qi <yao@codesourcery.com>
2724
2725 PR server/15959
2726 * server.c (start_inferior): Clear 'resume_info'.
2727
d6707650 27282013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2729
d6707650
JW
2730 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2731 for each register.
2732
9243dd0e 27332013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2734
9243dd0e
JW
2735 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2736 linux-tile-low.o to srv_tgtobj.
2737
c623a6ef
WN
27382013-09-16 Will Newton <will.newton@linaro.org>
2739
2740 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2741 out regs.
2742
fb71d39e
PA
27432013-09-06 Pedro Alves <palves@redhat.com>
2744
2745 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2746 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2747 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2748 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2749 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2750 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2751
8e7e9910
PA
27522013-09-06 Pedro Alves <palves@redhat.com>
2753
2754 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2755 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2756
7c3a12ca
PA
27572013-09-06 Pedro Alves <palves@redhat.com>
2758
2759 * linux-amd64-ipa.c: Include tracepoint.h.
2760 * linux-i386-ipa.c: Include tracepoint.h.
2761
8eb3d7b6
RW
27622013-09-06 Ricard Wanderlof <ricardw@axis.com>
2763
2764 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2765 (ps_get_thread_area): New function.
2766
eddddb9d
RW
27672013-09-06 Ricard Wanderlof <ricardw@axis.com>
2768
2769 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2770 (initialize_low_arch): Call init_registers_crisv32 rather than
2771 init_register_crisv32.
2772
533b0600
PA
27732013-09-05 Pedro Alves <palves@redhat.com>
2774
2775 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2776 to ...
2777 * hostio.h: ... this new file.
2778 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2779 win32-low.c: Include hostio.h.
2780
0ce3d3b5
PA
27812013-09-05 Pedro Alves <palves@redhat.com>
2782
2783 * server.h (gdb_client_data, handler_func, callback_handler_func)
2784 (delete_file_handler, add_file_handler, append_callback_event)
2785 (delete_callback_event, start_event_loop, initialize_event_loop):
2786 Move to event-loop.h and include it.
2787 * event-loop.h: New file.
2788
799cdc37
PA
27892013-09-05 Pedro Alves <palves@redhat.com>
2790
2791 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2792 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2793 (loaded_dll, unloaded_dll): Move to ...
2794 * dll.h: ... this new file.
2795 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2796
6a6bbd9d
PA
27972013-09-05 Pedro Alves <palves@redhat.com>
2798
2799 * server.h (current_process, get_thread_process, all_processes)
2800 (add_inferior_to_list, for_each_inferior, current_inferior)
2801 (remove_inferior, add_process, remove_process, find_process_pid)
2802 (have_started_inferiors_p, have_attached_inferiors_p)
2803 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2804 (clear_inferiors, find_inferior, find_inferior_id)
2805 (inferior_target_data, set_inferior_target_data)
2806 (inferior_regcache_data, set_inferior_regcache_data): Move to
2807 inferiors.h, and include it.
2808 * inferiors.h: New file.
2809
f699aaba
PA
28102013-09-05 Pedro Alves <palves@redhat.com>
2811
2812 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2813 Move ...
2814 * ax.h: ... here.
2815
c144c7a0
PA
28162013-09-05 Pedro Alves <palves@redhat.com>
2817
2818 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2819 tracepoint.h.
2820 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2821 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2822 (handle_tracepoint_general_set, handle_tracepoint_query)
2823 (tracepoint_finished_step, tracepoint_was_hit)
2824 (release_while_stepping_state_list, current_traceframe)
2825 (in_readonly_region, traceframe_read_mem)
2826 (fetch_traceframe_registers, traceframe_read_sdata)
2827 (traceframe_read_info, struct fast_tpoint_collect_status)
2828 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2829 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2830 (supply_fast_tracepoint_registers)
2831 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2832 (ipa_tdesc, claim_trampoline_space)
2833 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2834 (agent_mem_read, agent_get_trace_state_variable_value)
2835 (agent_set_trace_state_variable_value, agent_tsv_read)
2836 (agent_mem_read_string, get_raw_reg_func_addr)
2837 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2838 * tracepoint.h: ... this new file.
2839
ff42e6ab
PA
28402013-09-05 Pedro Alves <palves@redhat.com>
2841
2842 * server.h (perror_with_name, error, fatal, warning, paddress)
2843 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2844 include it.
2845 * utils.h: New file.
2846
541af0f4
PA
28472013-09-05 Pedro Alves <palves@redhat.com>
2848
2849 * server.h (remote_debug, noack_mode, transport_is_reliable)
2850 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2851 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2852 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2853 (write_enn, initialize_async_io, enable_async_io)
2854 (disable_async_io, check_remote_input_interrupt_request)
2855 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2856 (dead_thread_notify, prepare_resume_reply)
2857 (decode_address_to_semicolon, decode_address, decode_m_packet)
2858 (decode_M_packet, decode_X_packet, decode_xfer_write)
2859 (decode_search_memory_packet, unhexify, hexify)
2860 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2861 (look_up_one_symbol, relocate_instruction)
2862 (monitor_output): Move to remote-utils.h, and include it.
2863 * remote-utils.h: New file.
2864
eebdf26b
PA
28652013-09-05 Pedro Alves <palves@redhat.com>
2866
2867 * server.h (_): Delete.
2868
3aafd2ff
PA
28692013-09-02 Pedro Alves <palves@redhat.com>
2870
2871 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2872 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2873 allocated.
2874 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2875
cee83bcb
PM
28762013-09-02 Pierre Muller <muller@sourceware.org>
2877
2878 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2879 or WriteProcessMemory complete successfully and handle
2880 ERROR_PARTIAL_COPY error.
2881
9a13b2fa
PA
28822013-09-02 Pedro Alves <palves@redhat.com>
2883
2884 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2885 error instead of EIO.
2886
602e3198
JK
28872013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2888
2889 PR server/15604
2890 * linux-low.c: Include filestuff.h.
2891 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2892 * lynx-low.c: Include filestuff.h.
2893 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2894 * server.c: Include filestuff.h.
2895 (main): Call notice_open_fds.
2896 * spu-low.c: Include filestuff.h.
2897 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2898
96d7229d
LM
28992013-08-22 Luis Machado <lgustavo@codesourcery.com>
2900
2901 * Makefile.in: Explain why ../target and ../nat are not
2902 listed as include file search paths.
2903 (linux-waitpid.o): New object file rule.
2904 * configure.srv (srv_native_linux_obj): New variable.
2905 Replace all occurrences of linux native object files with
2906 $srv_native_linux_obj.
2907 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2908 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2909 (linux_enable_event_reporting): Remove declaration.
2910 (my_waitpid): Moved to common/linux-waitpid.c.
2911 (linux_wait_for_event): Pass ptid when calling
2912 linux_enable_event_reporting.
2913 (linux_supports_tracefork_flag): Remove.
2914 (linux_enable_event_reporting): Likewise.
2915 (linux_tracefork_grandchild): Remove.
2916 (STACK_SIZE): Moved to common/linux-ptrace.c.
2917 (linux_tracefork_child): Remove.
2918 (linux_test_for_tracefork): Remove.
2919 (linux_look_up_symbols): Call linux_supports_traceclone.
2920 (initialize_low): Remove call to linux_test_for_tracefork.
2921 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2922 common/linux-ptrace.h.
2923 (PTRACE_TYPE_ARG4): Likewise.
2924 Include linux-ptrace.h.
2925
32940073
PA
29262013-08-21 Pedro Alves <palves@redhat.com>
2927
2928 * config.in: Renegerate.
2929
33b60d58 29302013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2931
33b60d58
LM
2932 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2933 (SFILES): Remove $(srcdir)/common/target-common.c and
2934 add $(srcdir)/target/waitstatus.c.
2935 (OBS): Remove target-common.o and add waitstatus.o.
2936 (server_h): Remove $(srcdir)/../common/target-common.h and
2937 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2938 and $(srcdir)/../target/waitstatus.h.
2939 (target-common.o): Remove.
2940 (waitstatus.o): New target object file.
2941 * target.h: Do not include target-common.h and
2942 include target/resume.h, target/wait.h and
2943 target/waitstatus.h.
2944
b8e1b30e
LM
29452013-08-13 Luis Machado <lgustavo@codesourcery.com>
2946
2947 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2948 to PTRACE_TYPE_ARG3.
2949 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2950 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2951 PTRACE_TYPE_ARG4.
2952 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2953 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2954
7a60ad40
YQ
29552013-07-27 Jie Zhang <jie@codesourcery.com>
2956 Daniel Jacobowitz <dan@codesourcery.com>
2957 Yao Qi <yao@codesourcery.com>
2958
2959 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2960 (mips-linux-watch.o): New rule.
2961 (mips_linux_watch_h): New variable.
2962 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2963 srv_tgtobj.
2964 * linux-mips-low.c: Include mips-linux-watch.h.
2965 (struct arch_process_info, struct arch_lwp_info): New.
2966 (update_watch_registers_callback): New function.
2967 (mips_linux_new_process, mips_linux_new_thread) New functions.
2968 (mips_linux_prepare_to_resume, mips_insert_point): New
2969 functions.
2970 (mips_remove_point, mips_stopped_by_watchpoint): New
2971 functions.
2972 (rsp_bp_type_to_target_hw_bp_type): New function.
2973 (mips_stopped_data_address): New function.
2974 (the_low_target): Add watchpoint support functions.
2975
de6f69ad
YQ
29762013-07-27 Yao Qi <yao@codesourcery.com>
2977
2978 * i386-low.c: Include break-common.h.
2979 (enum target_hw_bp_type): Remove.
2980
3360c0bf
LM
29812013-07-24 Luis Machado <lgustavo@codesourcery.com>
2982
2983 * Makefile.in (SFILES): /common/target-common.c.
2984 (OBS): Add target-common.o.
2985 (server_h): Add $(srcdir)/../common/target-common.h.
2986 (target-common.o): New target.
2987 * server.c (queue_stop_reply_callback): Free
2988 status string after use.
2989 * target.c (target_waitstatus_to_string): Remove.
2990 * target.h: Include target-common.h.
2991 (resume_kind): Likewise.
2992 (target_waitkind): Likewise.
2993 (target_waitstatus): Likewise.
2994 (TARGET_WNOHANG): Likewise.
2995
bd885420
YQ
29962013-07-04 Yao Qi <yao@codesourcery.com>
2997
2998 * Makefile.in (host_alias): Use @host_noncanonical@.
2999 (target_alias): Use @target_noncanonical@.
3000 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3001 ACX_NONCANONICAL_HOST.
3002 * configure: Regenerated.
3003
3004 Revert:
3005 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3006
3007 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3008 * configure: Rebuild.
3009 * Makefile.in (version_host, version_target): Get from configure.
3010 (version.c): Use $(version_host) and $(version_target).
3011
17ef446e
PA
30122013-07-03 Pedro Alves <palves@redhat.com>
3013
3014 * Makefile.in (config.status): Depend on development.sh.
3015 * acinclude.m4: Include libmcheck.m4.
3016 * configure: Regenerate.
3017
7a9a7487
MG
30182013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3019
3020 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3021 attribute inside the parentheses.
3022 (winapi_DebugSetProcessKillOnExit): Ditto.
3023 (winapi_DebugBreakProcess): Ditto.
3024 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3025
49b64de6
MG
30262013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3027
3028 * notif.h (notif_event): Add a dummy member to avoid compiler
3029 errors.
3030
d5749ee7
PA
30312013-07-01 Pedro Alves <palves@redhat.com>
3032
3033 * hostio.c (HOSTIO_PATH_MAX): Define.
3034 (require_filename, handle_open, handle_unlink, handle_readlink):
3035 Use it.
3036
d8d2a3ee
PA
30372013-07-01 Pedro Alves <palves@redhat.com>
3038
3039 * server.h: Include "pathmax.h".
3040 * linux-low.c: Don't include sys/param.h.
3041 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3042 MAXPATHLEN.
3043 * win32-low.c: Don't include sys/param.h.
3044 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3045
bc7dea8d
PA
30462013-07-01 Pedro Alves <palves@redhat.com>
3047
3048 * event-loop.c: Don't check HAVE_UNISTD_H before including
3049 <unistd.h>.
3050 * gdbreplay.c: Likewise.
3051 * remote-utils.c: Likewise.
3052 * server.c: Likewise.
3053 * configure.ac: Don't check for unistd.h.
3054 * configure: Regenerate.
3055
d6c2da54
TT
30562013-06-28 Tom Tromey <tromey@redhat.com>
3057
3058 * Makefile.in (version.c): Use version.in, not
3059 common/version.in.
3060
257b6bec
MG
30612013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3062
3063 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3064 * configure: Rebuild.
3065 * Makefile.in (version_host, version_target): Get from configure.
3066 (version.c): Use $(version_host) and $(version_target).
3067
86ebe149
DK
30682013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3069
3070 Fix trace-status to output user name without trailing colon.
3071 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3072
f30aa5af
DK
30732013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3074
3075 Fix trace-status to output proper start-time and stop-time.
3076 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3077 output start time and stop time in hex as gdb expects.
3078
28a93511
YQ
30792013-06-26 Pedro Alves <pedro@codesourcery.com>
3080
3081 * tracepoint.c (build_traceframe_info_xml): Output trace state
3082 variables present in the trace buffer.
3083
01208463
TT
30842013-06-24 Tom Tromey <tromey@redhat.com>
3085
3086 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3087 create-version.sh.
3088 (version.o): Remove.
3089 * gdbreplay.c: Include version.h.
3090 (version, host_name): Don't declare.
3091 * server.h: Include version.h.
3092 (version, host_name): Don't declare.
3093
760256f9
PA
30942013-06-12 Pedro Alves <palves@redhat.com>
3095
3096 * linux-x86-low.c (linux_is_elf64): Delete global.
3097 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3098 with local linux_pid_exe_is_elf_64_file use.
3099
030031ee
PA
31002013-06-11 Pedro Alves <palves@redhat.com>
3101
3102 * linux-low.c (regset_disabled, disable_regset): New functions.
3103 (regsets_fetch_inferior_registers)
3104 (regsets_store_inferior_registers): Use them.
3105 (initialize_regsets_info); Don't allocate the disabled_regsets
3106 array here.
3107 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3108 comment.
3109
5da6eb0a
PA
31102013-06-11 Pedro Alves <palves@redhat.com>
3111
3112 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3113 xmalloc.
3114
7e5aaa09
PA
31152013-06-11 Pedro Alves <palves@redhat.com>
3116
3117 * linux-x86-low.c (initialize_low_arch): Call
3118 init_registers_x32_avx_linux.
3119
d878444c
JK
31202013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3121
3122 Fix compatibility with Android Bionic.
3123 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3124 it is not empty.
3125
3aee8918
PA
31262013-06-07 Pedro Alves <palves@redhat.com>
3127
5f2b57b5 3128 PR server/14823
3aee8918
PA
3129 * Makefile.in (OBS): Add tdesc.o.
3130 (IPA_OBJS): Add tdesc-ipa.o.
3131 (tdesc-ipa.o): New rule.
3132 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3133 interface.
3134 * linux-low.c (new_inferior): Delete.
3135 (disabled_regsets, num_regsets): Delete.
3136 (linux_add_process): Adjust to set the new per-process
3137 new_inferior flag.
3138 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3139 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3140 was a stop. When calling arch_setup, switch the current inferior
3141 to the thread that got an event.
3142 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3143 (regsets_fetch_inferior_registers)
3144 (regsets_store_inferior_registers): New regsets_info parameter.
3145 Adjust to use it.
3146 (linux_register_in_regsets): New regs_info parameter. Adjust to
3147 use it.
3148 (register_addr, fetch_register, store_register): New usrregs_info
3149 parameter. Adjust to use it.
3150 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3151 parameter regs_info. Adjust to use it.
3152 (linux_fetch_registers): Get the current inferior's regs_info, and
3153 adjust to use it.
3154 (linux_store_registers): Ditto.
3155 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3156 (initialize_low): Don't initialize the target_regsets here. Call
3157 initialize_low_arch.
3158 * linux-low.h (target_regsets): Delete declaration.
3159 (struct regsets_info): New.
3160 (struct usrregs_info): New.
3161 (struct regs_info): New.
3162 (struct process_info_private) <new_inferior>: New field.
3163 (struct linux_target_ops): Delete the num_regs, regmap, and
3164 regset_bitmap fields. New field regs_info.
3165 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3166 * i387-fp.c (num_xmm_registers): Delete.
3167 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3168 calls to new interface.
3169 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3170 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3171 Infer the number of xmm registers from the regcache's target
3172 description.
3173 * i387-fp.h (num_xmm_registers): Delete.
3174 * inferiors.c (add_thread): Don't install the thread's regcache
3175 here.
3176 * proc-service.c (gregset_info): Fetch the current inferior's
3177 regs_info. Adjust to use it.
3178 * regcache.c: Include tdesc.h.
3179 (register_bytes, reg_defs, num_registers)
3180 (gdbserver_expedite_regs): Delete.
3181 (get_thread_regcache): If the thread doesn't have a regcache yet,
3182 create one, instead of aborting gdbserver.
3183 (regcache_invalidate_one): Rename to ...
3184 (regcache_invalidate_thread): ... this.
3185 (regcache_invalidate_one): New.
3186 (regcache_invalidate): Only invalidate registers of the current
3187 process.
3188 (init_register_cache): Add target_desc parameter, and use it.
3189 (new_register_cache): Ditto. Assert the target description has a
3190 non zero registers_size.
3191 (regcache_cpy): Add assertions. Adjust.
3192 (realloc_register_cache, set_register_cache): Delete.
3193 (registers_to_string, registers_from_string): Adjust.
3194 (find_register_by_name, find_regno, find_register_by_number)
3195 (register_cache_size): Add target_desc parameter, and use it.
3196 (free_register_cache_thread, free_register_cache_thread_one)
3197 (regcache_release, register_cache_size): New.
3198 (register_size): Add target_desc parameter, and use it.
3199 (register_data, supply_register, supply_register_zeroed)
3200 (supply_regblock, supply_register_by_name, collect_register)
3201 (collect_register_as_string, collect_register_by_name): Adjust.
3202 * regcache.h (struct target_desc): Forward declare.
3203 (struct regcache) <tdesc>: New field.
3204 (init_register_cache, new_register_cache): Add target_desc
3205 parameter.
3206 (regcache_invalidate_thread): Declare.
3207 (regcache_invalidate_one): Delete declaration.
3208 (regcache_release): Declare.
3209 (find_register_by_number, register_cache_size, register_size)
3210 (find_regno): Add target_desc parameter.
3211 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3212 declarations.
3213 * remote-utils.c: Include tdesc.h.
3214 (outreg, prepare_resume_reply): Adjust.
3215 * server.c: Include tdesc.h.
3216 (gdbserver_xmltarget): Delete declaration.
3217 (get_features_xml, process_serial_event): Adjust.
3218 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3219 declare.
3220 (struct process_info) <tdesc>: New field.
3221 (ipa_tdesc): Declare.
3222 * tdesc.c: New file.
3223 * tdesc.h: New file.
3224 * tracepoint.c: Include tdesc.h.
3225 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3226 (get_context_regcache): Adjust to pass ipa_tdesc down.
3227 (do_action_at_tracepoint): Adjust to get the register cache size
3228 from the context regcache's description.
3229 (traceframe_walk_blocks): Adjust to get the register cache size
3230 from the current trace frame's description.
3231 (traceframe_get_pc): Adjust to get current trace frame's
3232 description and pass it down.
3233 (gdb_collect): Adjust to get the register cache size from the
3234 IPA's description.
3235 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3236 (gdbserver_xmltarget): Delete.
3237 (initialize_low_tracepoint): Set the ipa's target description.
3238 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3239 (initialize_low_tracepoint): Set the ipa's target description.
3240 * linux-x86-low.c: Include tdesc.h.
3241 [__x86_64__] (is_64bit_tdesc): New.
3242 (ps_get_thread_area, x86_get_thread_area): Use it.
3243 (i386_cannot_store_register): Rename to ...
3244 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3245 (i386_cannot_fetch_register): Rename to ...
3246 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3247 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3248 to new interface.
3249 (target_regsets): Rename to ...
3250 (x86_regsets): ... this.
3251 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3252 interface.
3253 (x86_siginfo_fixup): Use is_64bit_tdesc.
3254 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3255 (tdesc_x32_avx_linux, tdesc_x32_linux)
3256 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3257 Declare.
3258 (x86_linux_update_xmltarget): Delete.
3259 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3260 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3261 (AMD64_LINUX_USER64_CS): New.
3262 (x86_linux_read_description): New, based on
3263 x86_linux_update_xmltarget.
3264 (same_process_callback): New.
3265 (x86_arch_setup_process_callback): New.
3266 (x86_linux_update_xmltarget): New.
3267 (x86_regsets_info): New.
3268 (amd64_linux_regs_info): New.
3269 (i386_linux_usrregs_info): New.
3270 (i386_linux_regs_info): New.
3271 (x86_linux_regs_info): New.
3272 (x86_arch_setup): Reimplement.
3273 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3274 (x86_emit_ops): Ditto.
3275 (the_low_target): Adjust. Install x86_linux_regs_info,
3276 x86_cannot_fetch_register, and x86_cannot_store_register.
3277 (initialize_low_arch): New.
3278 * linux-ia64-low.c (tdesc_ia64): Declare.
3279 (ia64_fetch_register): Adjust.
3280 (ia64_usrregs_info, regs_info): New globals.
3281 (ia64_regs_info): New function.
3282 (the_low_target): Adjust.
3283 (initialize_low_arch): New function.
3284 * linux-sparc-low.c (tdesc_sparc64): Declare.
3285 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3286 Adjust.
3287 (sparc_arch_setup): New function.
3288 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3289 (the_low_target): Adjust.
3290 (initialize_low_arch): New function.
3291 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3292 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3293 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3294 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3295 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3296 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3297 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3298 (tdesc_powerpc_isa205_vsx64l): Declare.
3299 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3300 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3301 (ppc_set_pc, ppc_get_hwcap): Adjust.
3302 (ppc_usrregs_info): Forward declare.
3303 (!__powerpc64__) ppc_regmap_adjusted: New global.
3304 (ppc_arch_setup): Adjust to the current process'es target
3305 description.
3306 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3307 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3308 (ppc_store_evrregset): Adjust.
3309 (target_regsets): Rename to ...
3310 (ppc_regsets): ... this, and make static.
3311 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3312 (ppc_regs_info): New function.
3313 (the_low_target): Adjust.
3314 (initialize_low_arch): New function.
3315 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3316 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3317 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3318 (tdesc_s390x_linux64v2): Declare.
3319 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3320 (s390_fill_gregset, s390_store_last_break): Adjust.
3321 (target_regsets): Rename to ...
3322 (s390_regsets): ... this, and make static.
3323 (s390_get_pc, s390_set_pc): Adjust.
3324 (s390_get_hwcap): New target_desc parameter, and use it.
3325 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3326 (s390_arch_setup): Adjust to set the current process'es target
3327 description. Don't adjust the regmap.
3328 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3329 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3330 (regs_info_3264): New globals.
3331 (s390_regs_info): New function.
3332 (the_low_target): Adjust.
3333 (initialize_low_arch): New function.
3334 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3335 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3336 [__mips64] (init_registers_mips_linux)
3337 (init_registers_mips_dsp_linux): Delete defines.
3338 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3339 (have_dsp): New global.
3340 (mips_read_description): New, based on mips_arch_setup.
3341 (mips_arch_setup): Reimplement.
3342 (get_usrregs_info): New function.
3343 (mips_cannot_fetch_register, mips_cannot_store_register)
3344 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3345 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3346 (target_regsets): Rename to ...
3347 (mips_regsets): ... this, and make static.
3348 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3349 (dsp_regs_info, regs_info): New globals.
3350 (mips_regs_info): New function.
3351 (the_low_target): Adjust.
3352 (initialize_low_arch): New function.
3353 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3354 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3355 Declare.
3356 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3357 (arm_read_description): New, with bits factored from
3358 arm_arch_setup.
3359 (arm_arch_setup): Reimplement.
3360 (target_regsets): Rename to ...
3361 (arm_regsets): ... this, and make static.
3362 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3363 (arm_regs_info): New function.
3364 (the_low_target): Adjust.
3365 (initialize_low_arch): New function.
3366 * linux-m68k-low.c (tdesc_m68k): Declare.
3367 (target_regsets): Rename to ...
3368 (m68k_regsets): ... this, and make static.
3369 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3370 (m68k_regs_info): New function.
3371 (m68k_arch_setup): New function.
3372 (the_low_target): Adjust.
3373 (initialize_low_arch): New function.
3374 * linux-sh-low.c (tdesc_sharch): Declare.
3375 (target_regsets): Rename to ...
3376 (sh_regsets): ... this, and make static.
3377 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3378 (sh_regs_info, sh_arch_setup): New functions.
3379 (the_low_target): Adjust.
3380 (initialize_low_arch): New function.
3381 * linux-bfin-low.c (tdesc_bfin): Declare.
3382 (bfin_arch_setup): New function.
3383 (bfin_usrregs_info, regs_info): New globals.
3384 (bfin_regs_info): New function.
3385 (the_low_target): Adjust.
3386 (initialize_low_arch): New function.
3387 * linux-cris-low.c (tdesc_cris): Declare.
3388 (cris_arch_setup): New function.
3389 (cris_usrregs_info, regs_info): New globals.
3390 (cris_regs_info): New function.
3391 (the_low_target): Adjust.
3392 (initialize_low_arch): New function.
3393 * linux-cris-low.c (tdesc_crisv32): Declare.
3394 (cris_arch_setup): New function.
3395 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3396 (cris_regs_info): New function.
3397 (the_low_target): Adjust.
3398 (initialize_low_arch): New function.
3399 * linux-m32r-low.c (tdesc_m32r): Declare.
3400 (m32r_arch_setup): New function.
3401 (m32r_usrregs_info, regs_info): New globals.
3402 (m32r_regs_info): Adjust.
3403 (initialize_low_arch): New function.
3404 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3405 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3406 (tic6x_usrregs_info): Forward declare.
3407 (tic6x_read_description): New function, based on ...
3408 (tic6x_arch_setup): ... this. Reimplement.
3409 (target_regsets): Rename to ...
3410 (tic6x_regsets): ... this, and make static.
3411 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3412 (tic6x_regs_info): New function.
3413 (the_low_target): Adjust.
3414 (initialize_low_arch): New function.
3415 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3416 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3417 (target_regsets): Rename to ...
3418 (xtensa_regsets): ... this, and make static.
3419 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3420 globals.
3421 (xtensa_arch_setup, xtensa_regs_info): New functions.
3422 (the_low_target): Adjust.
3423 (initialize_low_arch): New function.
3424 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3425 (nios2_arch_setup): Set the current process'es tdesc.
3426 (target_regsets): Rename to ...
3427 (nios2_regsets): ... this.
3428 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3429 (nios2_regs_info): New function.
3430 (the_low_target): Adjust.
3431 (initialize_low_arch): New function.
a261b8f5
PA
3432 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3433 (aarch64_arch_setup): Set the current process'es tdesc.
3434 (target_regsets): Rename to ...
3435 (aarch64_regsets): ... this.
3436 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3437 (aarch64_regs_info): New function.
3438 (the_low_target): Adjust.
3439 (initialize_low_arch): New function.
3aee8918
PA
3440 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3441 globals.
3442 (target_regsets): Rename to ...
3443 (tile_regsets): ... this.
3444 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3445 (tile_regs_info): New function.
3446 (tile_arch_setup): Set the current process'es tdesc.
3447 (the_low_target): Adjust.
3448 (initialize_low_arch): New function.
3449 * spu-low.c (tdesc_spu): Declare.
3450 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3451 * win32-arm-low.c (tdesc_arm): Declare.
3452 (arm_arch_setup): New function.
3453 (the_low_target): Install arm_arch_setup instead of
3454 init_registers_arm.
3455 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3456 (init_windows_x86): Rename to ...
3457 (i386_arch_setup): ... this. Set `win32_tdesc'.
3458 (the_low_target): Adjust.
3459 * win32-low.c (win32_tdesc): New global.
3460 (child_add_thread): Don't create the thread cache here.
3461 (do_initial_child_stuff): Set the new process'es tdesc.
3462 * win32-low.h (struct target_desc): Forward declare.
3463 (win32_tdesc): Declare.
3464 * lynx-i386-low.c (tdesc_i386): Declare global.
3465 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3466 * lynx-low.c (lynx_tdesc): New global.
3467 (lynx_add_process): Set the new process'es tdesc.
3468 * lynx-low.h (struct target_desc): Forward declare.
3469 (lynx_tdesc): Declare global.
3470 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3471 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3472 * nto-low.c (nto_tdesc): New global.
3473 (do_attach): Set the new process'es tdesc.
3474 * nto-low.h (struct target_desc): Forward declare.
3475 (nto_tdesc): Declare.
3476 * nto-x86-low.c (tdesc_i386): Declare.
3477 (nto_x86_arch_setup): Set `nto_tdesc'.
3478
b1fbec62
GB
34792013-06-04 Gary Benson <gbenson@redhat.com>
3480
3481 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3482 to qSupported response when appropriate.
3483 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3484 with nonzero-length annex.
3485 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3486 arguments supplied in annex.
3487
d1ec4ce7
DE
34882013-05-31 Doug Evans <dje@google.com>
3489
ac44adcb 3490 PR server/15594
d1ec4ce7
DE
3491 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3492 64 bits in 64-cross-32 environment.
3493
9b25f2d3
PA
34942013-05-28 Pedro Alves <palves@redhat.com>
3495
3496 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3497 (aarch64-without-fpu.c): Delete rule.
3498 * configure.srv (aarch64*-*-linux*): Remove references to
3499 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3500 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3501 declaration.
3502
6740dc9c
PA
35032013-05-24 Pedro Alves <palves@redhat.com>
3504
3505 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3506 instead of strchr/decode_address. Error if the range isn't split
3507 with a ','. Don't assume there's be a ':' in the action.
3508
c2d6af84
PA
35092013-05-23 Yao Qi <yao@codesourcery.com>
3510 Pedro Alves <palves@redhat.com>
3511
3512 * linux-low.c (lwp_in_step_range): New function.
3513 (linux_wait_1): If the thread was range stepping and stopped
3514 outside the stepping range, report the stop to GDB. Otherwise,
3515 continue stepping. Add range stepping debug output.
3516 (linux_set_resume_request): Copy the step range from the resume
3517 request to the lwp.
3518 (linux_supports_range_stepping): New.
3519 (linux_target_ops) <supports_range_stepping>: Set to
3520 linux_supports_range_stepping.
3521 * linux-low.h (struct linux_target_ops)
3522 <supports_range_stepping>: New field.
3523 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3524 * linux-x86-low.c (x86_supports_range_stepping): New.
3525 (the_low_target) <supports_range_stepping>: Set to
3526 x86_supports_range_stepping.
3527 * server.c (handle_v_cont): Handle 'r' action.
3528 (handle_v_requests): Append ";r" if the target supports range
3529 stepping.
3530 * target.h (struct thread_resume) <step_range_start,
3531 step_range_end>: New fields.
3532 (struct target_ops) <supports_range_stepping>:
3533 New field.
3534 (target_supports_range_stepping): New macro.
3535
58794e1a
JB
35362013-05-17 Joel Brobecker <brobecker@adacore.com>
3537
3538 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3539 confusion in comment.
3540
d631c5a7
JB
35412013-05-17 Joel Brobecker <brobecker@adacore.com>
3542
3543 * lynx-low.c (struct process_info_private): New type.
3544 (lynx_add_process): New function.
3545 (lynx_create_inferior, lynx_attach): Replace calls to
3546 add_process by calls to lynx_add_process.
3547 (lynx_resume): If PTID is null, then try using
3548 current_process()->private->last_wait_event_ptid.
3549 Add comments.
3550 (lynx_clear_inferiors): Delete. The contents of that function
3551 has been inlined in lynx_mourn;
3552 (lynx_wait_1): Save the ptid in the process's private data.
3553 (lynx_mourn): Free the process' private data. Replace call
3554 to lynx_clear_inferiors by call to clear_inferiors.
3555
96f7a20f
YQ
35562013-05-17 Yao Qi <yao@codesourcery.com>
3557
3558 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3559 the right place.
3560
db0dfaa0
LM
35612013-05-16 Luis Machado <lgustavo@codesourcery.com>
3562
3563 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3564 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3565 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3566 PT_TEXT_END_ADDR guards. Update comments.
3567 (linux_target_op) <read_offsets>: Conditionally define to
3568 linux_read_offsets if the target is UCLIBC and if it defines
3569 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3570
68f5f838
SL
35712013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3572 Andrew Jenner <andrew@codesourcery.com>
3573
3574 * Makefile.in (SFILES): Add linux-nios2-low.c.
3575 (clean): Add action to delete nios2-linux.c.
3576 (nios2-linux.c): New rule.
3577 * configure.srv: Add nios2*-*-linux*.
3578 * linux-nios2-low.c: New.
3579
1ebff1fd
HAQ
35802013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3581
3582 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3583
f6150862
HZ
35842013-04-25 Hui Zhu <hui@codesourcery.com>
3585
3586 PR gdb/15186
f6150862
HZ
3587 * ax.c (ax_printf): Add fflush.
3588
614c279d
TT
35892013-04-22 Tom Tromey <tromey@redhat.com>
3590
3591 * Makefile.in (SFILES): Add filestuff.c.
3592 (OBS): Add filestuff.o.
3593 (filestuff.o): New target.
3594 * config.in, configure: Rebuild.
3595 * configure.ac: Check for fdwalk, pipe2.
3596
7d4e5717
PA
35972013-04-17 Pedro Alves <palves@redhat.com>
3598
3599 * configure.ac (USE_THREAD_DB): Delete variable.
3600 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3601 Don't AC_SUBST USE_THREAD_DB.
3602 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3603 * config.in, configure: Regenerate.
3604
d5c93e41
PA
36052013-04-16 Pedro Alves <palves@redhat.com>
3606
3607 * linux-low.h (struct lwp_info) <thread_known>: Move under
3608 the USE_THREAD_DB #ifdef.
3609
04f5fe89
PA
36102013-04-16 Pedro Alves <palves@redhat.com>
3611
3612 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3613 (linux-low.o): Delete rule.
3614 * linux-low.h: Always include "gdb_thread_db.h" instead of
3615 conditionally including thread_db.h.
3616 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3617 HAVE_THREAD_DB_H.
3618
480b27bf
JK
36192013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3620
3621 * Makefile.in (install-only): Fix make install regression.
3622
43662968
JK
36232013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3624
3625 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3626 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3627 installation.
3628 * gdbserver.1: Remove.
3629
3e74e146
PA
36302013-03-22 Pedro Alves <palves@redhat.com>
3631
3632 * linux-low.c (handle_extended_wait): Don't call
3633 linux_enable_event_reporting.
3634
a8347a2a
TT
36352013-03-15 Tony Theodore <tonyt@logyst.com>
3636
3637 PR build/9098:
3638 * Makefile.in (SHELL): Use @SHELL@.
3639
eeb56fa7
SDJ
36402013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3641
3642 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3643 compiler warning.
3644
4fa7e2ff
JB
36452013-03-13 Joel Brobecker <brobecker@adacore.com>
3646
3647 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3648 Remove extraneous NULL element.
3649
8ddb1965
YQ
36502013-03-13 Yao Qi <yao@codesourcery.com>
3651
3652 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3653 'V' block in trace frame.
3654
9accd112
MM
36552013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3656
3657 * target.h (struct target_ops): Add btrace ops.
3658 (target_supports_btrace): New macro.
3659 (target_enable_btrace): New macro.
3660 (target_disable_btrace): New macro.
3661 (target_read_btrace): New macro.
3662 * gdbthread.h (struct thread_info): Add btrace field.
3663 * server.c: Include btrace-common.h.
3664 (handle_btrace_general_set): New function.
3665 (handle_btrace_enable): New function.
3666 (handle_btrace_disable): New function.
3667 (handle_general_set): Call handle_btrace_general_set.
3668 (handle_qxfer_btrace): New function.
3669 (struct qxfer qxfer_packets[]): Add btrace entry.
3670 * inferiors.c (remove_thread): Disable btrace.
3671 * linux-low: Include linux-btrace.h.
3672 (linux_low_enable_btrace): New function.
3673 (linux_low_read_btrace): New function.
3674 (linux_target_ops): Add btrace ops.
3675 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3676 Add srv_linux_btrace=yes.
3677 (x86_64-*-linux*): Add linux-btrace.o.
3678 Add srv_linux_btrace=yes.
3679 * configure.ac: Define HAVE_LINUX_BTRACE.
3680 * config.in: Regenerated.
3681 * configure: Regenerated.
3682
5cc22e4c
MM
36832013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3684
3685 * server.c (handle_qxfer): Preserve error message if -3 is
3686 returned.
3687 (qxfer): Document the -3 return value.
3688
7c97f91e
MM
36892013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3690
3691 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3692 (linux_btrace_h): New variable.
3693 (linux-btrace.o): New rule.
3694
be9a119c 36952013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3696 Hafiz Abid Qadeer <abidh@codesourcery.com>
3697
3698 * tracepoint.c (trace_buffer_size): New global.
3699 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3700 (init_trace_buffer): Change to one-argument function. Allocate
3701 trace buffer memory.
3702 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3703 handle QTBuffer:size packet.
3704 (cmd_bigqtbuffer_size): New function.
3705 (initialize_tracepoint): Call init_trace_buffer with
3706 DEFAULT_TRACE_BUFFER_SIZE.
3707 * server.c (handle_query): Add QTBuffer:size in the
3708 supported packets.
3709
e64f7499
YQ
37102013-03-07 Yao Qi <yao@codesourcery.com>
3711
3712 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3713 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3714 of -1.
3715 (cmd_qtsp): Adjust condition. Do post increment.
3716 Set cur_action and cur_step_action back to 0.
3717
f0ae6fc3
PA
37182013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3719
3720 PR server/15236
3721 * linux-low.c (linux_write_memory): Return early success if LEN is
3722 zero.
3723
b5b0b0af
CV
37242013-03-05 Corinna Vinschen <vinschen@redhat.de>
3725
334ad4a8 3726 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3727
589bc927
TT
37282013-02-28 Tom Tromey <tromey@redhat.com>
3729
3730 * configure.ac: Invoke AC_SYS_LARGEFILE.
3731 * configure, config.in: Rebuild.
3732
dfe07582
CV
37332013-02-28 Corinna Vinschen <vinschen@redhat.com>
3734
3735 * win32-low.c: Throughout, fix format strings and casts of
3736 printf-like functions to avoid type related warnings on all
3737 platforms.
3738 (get_child_debug_event): Print dwDebugEventCode as hex since
3739 that's how it's usually documented.
3740
736cd585
YQ
37412013-02-28 Yao Qi <yao@codesourcery.com>
3742
3743 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3744 pulongest.
3745
e1f58301
JW
37462013-02-27 Jiong Wang <jiwang@tilera.com>
3747
3748 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3749 (reg-tilegx32.c): New rule.
3750 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3751 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3752 different register info initializer according to elf class.
3753 (init_registers_tilgx32): New function. The tilegx32 register info
3754 initializer.
3755 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3756 (tile_store_gregset): Likewise.
3757
d171ca78
YQ
37582013-02-27 Yao Qi <yao@codesourcery.com>
3759
3760 * server.c (process_point_options): Print debug message when
3761 debug_threads is true.
3762
282bbdf3
YQ
37632013-02-26 Yao Qi <yao@codesourcery.com>
3764
3765 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3766
aca22551
PA
37672013-02-19 Pedro Alves <palves@redhat.com>
3768 Kai Tietz <ktietz@redhat.com>
3769
3770 PR gdb/15161
3771
3772 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3773 instead of strtoul to extract address from packet.
3774 (process_serial_event) <'z'>: Likewise.
3775
4f3cee1c
YQ
37762013-02-18 Yao Qi <yao@codesourcery.com>
3777
3778 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3779
8e1d55a3
PA
37802013-02-14 Pedro Alves <palves@redhat.com>
3781
3782 Plug memory leak.
3783
3784 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3785 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3786
458820da
PA
37872013-02-14 Pedro Alves <palves@redhat.com>
3788
3789 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3790
baea0dae
PA
37912013-02-14 Pedro Alves <palves@redhat.com>
3792
3793 * tracepoint.c (save_string): Delete.
3794 (add_tracepoint_action): Use savestring instead of save_string.
3795
0b1afbb3
PA
37962013-02-12 Pedro Alves <palves@redhat.com>
3797
3798 * linux-xtensa-low.c: Ditto.
3799 * xtensa-xtregs.c: Ditto.
3800
8a4ac37e
PA
38012013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3802
3803 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3804 thread_db.
3805
148de6bb
MS
38062013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3807
3808 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3809 aarch64_num_wp_regs and aarch64_num_bp_regs to
3810 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3811
55fac6e0
MS
38122013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3813
3814 * linux-aarch64-low.c (ps_get_thread_area): Replace
3815 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3816
176eb98c
MS
38172013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3818 Marcus Shawcroft <marcus.shawcroft@arm.com>
3819 Nigel Stephens <nigel.stephens@arm.com>
3820 Yufeng Zhang <yufeng.zhang@arm.com>
3821
3822 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3823 (aarch64.c, aarch64-without-fpu.c): New targets.
3824 * configure.srv (aarch64*-*-linux*): New.
3825 * linux-aarch64-low.c: New file.
3826
56f7af9c
MS
38272013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3828
43aaf8b6 3829 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3830 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3831 (dequeue_one_deferred_signal, linux_resume_one_thread)
3832 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3833 (linux_tracefork_grandchild, linux_test_for_tracefork)
3834 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3835 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3836 where the argument is 0.
3837
60f662b0
YQ
38382013-01-25 Yao Qi <yao@codesourcery.com>
3839
3840 * event-loop.c: Include "queue.h".
3841 (gdb_event_p): New typedef.
3842 (struct gdb_event) <next_event>: Remove.
3843 (event_queue): Change to QUEUE(gdb_event_p).
3844 (async_queue_event): Remove.
3845 (gdb_event_xfree): New.
3846 (initialize_event_loop): New.
3847 (process_event): Use API from QUEUE.
3848 (wait_for_event): Likewise.
3849 * server.c (main): Call initialize_event_loop.
3850 * server.h (initialize_event_loop): Declare.
3851
5ae4861a
YQ
38522013-01-18 Yao Qi <yao@codesourcery.com>
3853
3854 * ax.h (struct eval_agent_expr_context): New.
3855 (gdb_eval_agent_expr): Update declaration.
3856 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3857 TFRAME. Add new argument CTX.
3858 * server.h (struct eval_agent_expr_context): Declare.
3859 (agent_mem_read, agent_tsv_read): Update declaration.
3860 (agent_mem_read_string): Likewise.
3861 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3862 (add_traceframe_block): Add new argument TPOINT.
3863 Increase TPOINT->traceframe_usage.
3864 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3865 eval_tracepoint_agent_expr.
3866 (condition_true_at_tracepoint): Likewise.
3867 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3868 (agent_mem_read_string, agent_tsv_read): Likewise.
3869
85e00e85
YQ
38702013-01-16 Yao Qi <yao@codesourcery.com>
3871
3872 * linux-low.c (linux_resume_one_lwp): Don't check
3873 'lwp->bp_reinsert != 0'.
3874
4039cf45
JB
38752013-01-07 Joel Brobecker <brobecker@adacore.com>
3876 Pedro Alves <palves@redhat.com>
3877
3878 * lynx-low.c (ptrace_request_to_str): Define a temporary
3879 macro and use it to simplify this function's implementation.
3880
9044dee2
JB
38812013-01-07 Joel Brobecker <brobecker@adacore.com>
3882
3883 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3884 sets errno.
3885
e6352c8f
JB
38862013-01-07 Joel Brobecker <brobecker@adacore.com>
3887
3888 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3889
50681a27
JB
38902013-01-07 Joel Brobecker <brobecker@adacore.com>
3891
3892 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3893
3f6e77ef
JB
38942013-01-07 Joel Brobecker <brobecker@adacore.com>
3895
3896 * lynx-low.c (lynx_resume): Use the resume_info parameter
3897 to determine the ptid for the lynx_ptrace call, unless
3898 it is equal to minus_one_ptid, in which case we use the
3899 ptid of the current_inferior.
3900 (lynx_wait_1): After having received a thread create/exit
3901 event, resume the inferior's execution using the signaling
3902 thread's ptid, rather than the old ptid.
3903
7fda33ae
JB
39042013-01-07 Joel Brobecker <brobecker@adacore.com>
3905
3906 * lynx-low.c (lynx_resume): Delete variable ret.
3907
b9786c74
JB
39082013-01-01 Joel Brobecker <brobecker@adacore.com>
3909
3910 * gdbreplay.c (gdbreplay_version): Update copyright year.
3911 * server.c (gdbserver_version): Likewise.
3912
8b93d60f
JB
39132012-12-17 Joel Brobecker <brobecker@adacore.com>
3914
3915 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3916 new thread.
3917
037335a7
JB
39182012-12-17 Joel Brobecker <brobecker@adacore.com>
3919
3920 * lynx-low.c (ptrace_request_to_str): Add handling for
3921 PTRACE_GETTRACESIG.
3922
52d4cbd8
JB
39232012-12-17 Joel Brobecker <brobecker@adacore.com>
3924
3925 * lynx-low.c (lynx_attach): Delete variable new_process.
3926
ab8f6ca9
JB
39272012-12-17 Joel Brobecker <brobecker@adacore.com>
3928
3929 * lynx-low.c (lynx_create_inferior): Delete variable
3930 new_process.
3931
78cbc024
JB
39322012-12-17 Joel Brobecker <brobecker@adacore.com>
3933
3934 * lynx-low.c (ptrace_request_to_str): Do not handle
3935 PTRACE_GETTHREADLIST if this macro does not exist.
3936
14a00470
YQ
39372012-12-15 Yao Qi <yao@codesourcery.com>
3938
3939 * Makefile.in (OBS): Add notif.o.
3940 * notif.c, notif.h: New.
3941 * server.c: Include "notif.h".
3942 (struct vstop_notif) <next>: Remove.
3943 <base>: New field.
3944 (queue_stop_reply): Update.
3945 (push_event, send_next_stop_reply): Remove.
3946 (discard_queued_stop_replies): Update.
3947 (notif_stop): New variable.
3948 (handle_v_stopped): Remove.
3949 (handle_v_requests): Don't call handle_v_stopped. Call
3950 handle_ack_notif instead.
3951 (queue_stop_reply_callback): Call notif_event_enque instead
3952 of queue_stop_reply.
3953 (handle_status): Don't call send_next_stop_reply, call
3954 notif_write_event instead.
3955 (kill_inferior_callback): Likewise.
3956 (detach_or_kill_inferior_callback): Likewise.
3957 (main): Call initialize_notif.
3958 (process_serial_event): Call QUEUE_is_empty.
3959 (handle_target_event): Call notif_push instead of push event.
3960 * server.h (push_event): Remove declaration.
3961
61c125b9
TT
39622012-12-10 Tom Tromey <tromey@redhat.com>
3963
3964 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3965 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3966 macros.
3967 (.c.o): Rewrite.
3968 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3969 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3970 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3971 (amd64-linux-ipa.o, ax.o): Rewrite.
3972 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3973 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3974 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3975 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3976 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3977 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3978 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3979 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3980 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3981 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3982 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3983 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3984 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3985 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3986 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3987 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3988 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3989 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3990 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3991 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3992 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3993 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3994 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3995 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3996 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3997 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3998 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3999 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4000 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4001 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4002 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4003 (reg-tilegx.o): Remove.
4004 (all_object_files): New macro.
4005 Include .deps files.
4006 * aclocal.m4, configure: Rebuild.
4007 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4008 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4009 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4010
e90e9ad9
TT
40112012-12-05 Tom Tromey <tromey@redhat.com>
4012
4013 PR gdb/14917:
4014 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4015
02d403bf 40162012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4017
4018 * configure.ac: Check for linux/perf_event.h.
4019 * config.in: Regenerated.
4020 * configure: Regenerated.
4021
0270a750
PA
40222012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4023
4024 * hostio.c (handle_readlink): Decrease buffer size
4025 parameter passed to readlink by one byte.
4026
8c29b58e
YQ
40272012-11-26 Yao Qi <yao@codesourcery.com>
4028
4029 * configure.ac (build_warnings): Append '-Wempty-body'.
4030 * configure: Regenerated.
4031 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4032 body.
4033
8bdce1ff
PM
40342012-11-15 Pierre Muller <muller@sourceware.org>
4035
4036 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4037 * config.in: Regenerate.
4038 * configure: Regenerate.
4039 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4040 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4041 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4042 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4043 header.
4044 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4045 instead of <sys/wait.h> header.
4046 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4047
02d403bf 40482012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4049
4050 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4051 (various make rules): Remove -DGDBSERVER
4052
fbd5db48
YQ
40532012-11-09 Yao Qi <yao@codesourcery.com>
4054
4055 * spu-low.c (current_ptid): Move it to ..
4056 * gdbthread.h: ... here. New.
4057 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4058 * server.c (myresume, process_serial_event): Likewise.
4059 * thread-db.c (thread_db_find_new_threads): Likewise.
4060 * tracepoint.c (run_inferior_command): Likewise.
4061
b3dc46ff
AB
40622012-10-01 Andrew Burgess <aburgess@broadcom.com>
4063
4064 * server.c (handle_search_memory_1): Include access length in
4065 warning message.
4066
07c04788
HPN
40672012-09-05 Michael Brandt <michael.brandt@axis.com>
4068
4069 * linux-crisv32-low.c: Fix compile errors.
4070
918d227b
YQ
40712012-09-04 Yao Qi <yao@codesourcery.com>
4072
4073 * tracepoint.c (cmd_qtsv): Adjust debug message.
4074 Don't check CUR_TPOINT.
4075
18c1b81a
YQ
40762012-08-28 Yao Qi <yao@codesourcery.com>
4077
4078 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4079 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4080 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4081 Remove declarations of xmalloc, xreallloc, xstrdup and
4082 freeargv.
4083 * Makefile.in (libiberty_h): New.
4084 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4085 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4086
dc82f37b
YQ
40872012-08-23 Yao Qi <yao@codesourcery.com>
4088
4089 * server.h: Remove declaration of 'xsnprintf'.
4090
406b1477
KS
40912012-08-22 Keith Seitz <keiths@redhat.com>
4092
4093 * server.h: Include build-gnulib-gbserver/config.h.
4094 * gdbreplay.c: Likewise.
4095
e6712ff1
DE
40962012-08-08 Doug Evans <dje@google.com>
4097
4098 * Makefile.in (SFILES): Add gdb_vecs.c.
4099 (OBS): Add gdb_vecs.o.
4100 (gdb_vecs_h, host_defs_h): New variables.
4101 (thread-db.o): Add $(gdb_vecs_h) dependency.
4102 (gdb_vecs.o): New rule.
4103 * thread-db.c: #include "gdb_vecs.h".
4104 (thread_db_load_search): Use a vector to iterate over path elements.
4105 Handle text appearing after "$pdir".
4106
4107 * configure.ac: Add check for strstr.
4108 * config.in: Regenerate.
4109 * configure: Regenerate.
4110
7c3270ae
UW
41112012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4112
4113 * hostio.c (handle_pread): If pread fails, fall back to attempting
4114 lseek/read.
4115 (handle_pwrite): Likewise for pwrite.
4116
b62e2b27
UW
41172012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4118
4119 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4120 between unsupported TYPE and unimplementable ADDR/LEN combination.
4121 (arm_insert_point): Act on new return value.
4122
78a99e91
PA
41232012-07-31 Pedro Alves <palves@redhat.com>
4124
4125 * server.c (process_point_options): Only skip tokens if we find
4126 one that is unrecognized. Don't treat 'X' specially while
4127 skipping unrecognized tokens.
4128
fcf303ab
UW
41292012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4130
4131 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4132 to 4-byte-align HW breakpoint addresses for Thumb.
4133
7255706c
YQ
41342012-07-27 Yao Qi <yao@codesourcery.com>
4135
4136 PR remote/14161.
4137
4138 * server.h: Declare gdb_agent_about_to_close.
4139 * target.c (kill_inferior): Include "agent.h".
4140 New. Send command 'kill'.
4141 * target.h (kill_inferior): Removed macro.
4142 * tracepoint.c (gdb_agent_about_to_close): New.
4143 (gdb_agent_helper_thread): Handle command 'close'.
4144 Wait endlessly until the inferior stops.
4145 Install gdb_agent_remove_socket to atexit hook.
4146 (agent_socket_name): New static variable.
4147 (gdb_agent_socket_init): Replace local variable 'name' with
4148 'agent_socket_name'.
4149 (gdb_agent_remove_socket): New.
4150
5a3f286f
YQ
41512012-07-27 Yao Qi <yao@codesourcery.com>
4152
4153 * server.c (process_point_options): Stop at 'X' when parsing.
4154
961bd387
ME
41552012-07-19 Michael Eager <eager@eagercon.com>
4156
a261b8f5 4157 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4158 to hw_execute.
4159 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4160 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4161 hardware breakpoint.
4162
aa7c7447
JK
41632012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4164
4165 * gdbserver/linux-low.c (initialize_low): Call
4166 linux_ptrace_init_warnings.
4167
7f216e7c
DE
41682012-07-02 Doug Evans <dje@google.com>
4169
4170 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4171 pointer to int.
4172
d3ce09f5
SS
41732012-07-02 Stan Shebs <stan@codesourcery.com>
4174
4175 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4176 (ax.o): Add it to build rule.
4177 (ax-ipa.o): Ditto.
4178 (OBS): Add format.o.
4179 (IPA_OBS): Add format.o.
4180 * server.c (handle_query): Claim support for breakpoint commands.
4181 (process_point_options): Add command case.
4182 (process_serial_event): Leave running if there are printfs in
4183 effect.
4184 * mem-break.h (any_persistent_commands): Declare.
4185 (add_breakpoint_commands): Declare.
4186 (gdb_no_commands_at_breakpoint): Declare.
4187 (run_breakpoint_commands): Declare.
4188 * mem-break.c (struct point_command_list): New struct.
4189 (struct breakpoint): New field command_list.
4190 (any_persistent_commands): New function.
4191 (add_commands_to_breakpoint): New function.
4192 (add_breakpoint_commands): New function.
4193 (gdb_no_commands_at_breakpoint): New function.
4194 (run_breakpoint_commands): New function.
4195 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4196 locally.
4197 * ax.c: Include format.h.
4198 (ax_printf): New function.
4199 (gdb_eval_agent_expr): Add printf opcode.
4200
2f8f6aed
YQ
42012012-06-13 Yao Qi <yao@codesourcery.com>
4202
4203 * server.c (start_inferior): Remove duplicated writes to fields
4204 'last_resume_kind' and 'last_status' of 'current_inferior'.
4205
0c9070b3
YQ
42062012-06-12 Yao Qi <yao@codesourcery.com>
4207 Pedro Alves <palves@redhat.com>
4208
4209 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4210 comment.
4211 * server.c (handle_v_cont): Extend comment.
4212
c52daf70
YQ
42132012-06-11 Yao Qi <yao@codesourcery.com>
4214
4215 * linux-low.c (linux_attach): Add 'static'.
4216
d38bbb0a
YQ
42172012-06-06 Yao Qi <yao@codesourcery.com>
4218
4219 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4220
89dc0afd
JK
42212012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4222
4223 Fix gcc -flto compilation warning.
4224 * server.c (main): Make variable multi_mode and attach volatile.
4225
75f62ce7
TJB
42262012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4227
4228 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4229 if the platform doesn't know about it.
4230
65f479b6
PA
42312012-05-30 Jeff Kenton <jkenton@tilera.com>
4232
4233 * Makefile.in (SFILES): Add linux-tile-low.c.
4234 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4235 * configure.srv: Handle tilegx-*-linux*.
4236 * linux-tile-low.c: New file.
4237
0c5bf5a9
JK
42382012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4239
4240 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4241
a493e3e2
PA
42422012-05-24 Pedro Alves <palves@redhat.com>
4243
4244 PR gdb/7205
4245
43aaf8b6 4246 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4247
2ea28649
PA
42482012-05-24 Pedro Alves <palves@redhat.com>
4249
4250 PR gdb/7205
4251
4252 Replace target_signal with gdb_signal throughout.
4253
8d409d16
MR
42542012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4255
4256 * linux-low.c (linux_store_registers): Avoid the copying sequence
4257 when no data has been retrieved by ptrace.
4258
23512c01
MGD
42592012-05-22 Will Deacon <will.deacon@arm.com>
4260
4261 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4262 Include asm/ptrace.h.
4263 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4264 already defined.
4265
4934b29e
MR
42662012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4267
4268 * linux-low.c (linux_store_registers): Don't re-retrieve data
4269 with ptrace that has already been obtained from /proc. Always
4270 copy any data retrieved with ptrace to the buffer supplied.
4271
bde24c0a
PA
42722012-05-11 Yao Qi <yao@codesourcery.com>
4273 Pedro Alves <palves@redhat.com>
4274
4275 * linux-low.c (enum stopping_threads_kind): New.
4276 (stopping_threads): Change type to `enum stopping_threads_kind'.
4277 (handle_extended_wait): If stopping and suspending threads, leave
4278 the new_lwp suspended too.
4279 (linux_wait_for_event): Adjust.
4280 (stop_all_lwps): Set `stopping_threads' to
4281 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4282 whether we're suspending threads or just stopping them. Assert no
4283 recursion happens.
4284
623b6bdf
YQ
42852012-04-29 Yao Qi <yao@codesourcery.com>
4286
4287 * server.h: Move some code to ...
4288 * gdbthread.h: ... here. New.
4289 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4290 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4291 (nto-low.o, win32-low.o): Likewise.
4292 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4293 * regcache.c, remote-utils.c, server.c: Likewise.
4294 * target.c, tracepoint.c, win32-low.c: Likewise.
4295
f15f9948
TJB
42962012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4297
4298 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4299 (PTRACE_ARG4_TYPE): Likewise.
4300 (PTRACE_XFER_TYPE): Likewise.
4301 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4302 ptrace to PTRACE_ARG3_TYPE.
4303 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4304 (PTRACE_ARG4_TYPE): Likewise.
4305 (PTRACE_XFER_TYPE): Likewise.
4306 (linux_detach_one_lwp): Cast fourth argument of
4307 ptrace to long then PTRACE_ARG4_TYPE.
4308 (regsets_fetch_inferior_registers): Cast third argument of
4309 ptrace to long then PTRACE_ARG3_TYPE.
4310 (regsets_store_inferior_registers): Likewise.
4311
38ea300a
PA
43122012-04-20 Pedro Alves <palves@redhat.com>
4313
4314 * configure: Regenerate.
4315
c971b7fa
PA
43162012-04-19 Pedro Alves <palves@redhat.com>
4317
43aaf8b6 4318 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4319 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4320 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4321 (all, install-only, uninstall, clean-info, all-lib, clean): No
4322 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4323 (maintainer-clean realclean distclean): Use subdir_do.
4324 (subdir_do): New.
4325 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4326 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4327 * acinclude.m4: Include acx_configure_dir.m4.
4328 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4329 calls. Call AC_PROG_RANLIB. Configure gnulib using
4330 ACX_CONFIGURE_DIR.
4331 (GNULIB): New.
4332 (GNULIB_STDINT_H): Adjust.
4333 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4334 * gdbreplay.c: Include build-gnulib/config.h.
4335 * server.h: Likewise.
4336 * aclocal.m4: Regenerate.
4337 * config.in: Regenerate.
4338 * configure: Regenerate.
c971b7fa 4339
809277f8
PA
43402012-04-19 Pedro Alves <palves@redhat.com>
4341
4342 * Makefile.in (LIBGNU, INCGNU): Adjust.
4343 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4344 (all, install-only, uninstall, clean-info, all-lib, clean)
4345 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4346 * configure.ac: Adjust AC_OUTPUT output.
4347 * aclocal.m4: Regenerate.
4348 * configure: Regenerate.
4349
fd9bb8b8
PA
43502012-04-19 Pedro Alves <palves@redhat.com>
4351
4352 * Makefile.in (generated_files): New.
4353 (server_h): Remove the explicit dependency on config.h, and depend
4354 on $generated_files.
4355
1c298c66
PA
43562012-04-19 Pedro Alves <palves@redhat.com>
4357
4358 * Makefile.in (INCGNU): Add -Ignulib.
4359
57c4b50b
PA
43602012-04-19 Pedro Alves <palves@redhat.com>
4361
4362 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4363 (INCGNU): ... this, and spell out -I here.
4364 (GNULIB_LIB): Rename to ...
4365 (LIBGNU): ... this.
4366 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4367
1030e047
PA
43682012-04-19 Pedro Alves <palves@redhat.com>
4369
4370 * config.in: Regenerate.
4371
447d4319
PA
43722012-04-19 Pedro Alves <palves@redhat.com>
4373
4374 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4375 * server.h (memmem): Remove declaration.
4376 * config.in: Regenerate.
4377 * configure: Regenerate.
4378
aad9eab9
YQ
43792012-04-19 Yao Qi <yao@codesourcery.com>
4380
4381 * Makefile.in (SFILES): Add common/vec.c.
4382 (OBS): Add vec.o.
4383 (vec.o): New rule.
4384
3e10640f
YQ
43852012-04-19 Yao Qi <yao@codesourcery.com>
4386
4387 * remote-utils.c (prepare_resume_reply): Replace with macro
4388 target_core_of_thread.
4389 * server.c (handle_qxfer_threads_proper): Likewise.
4390 * target.h (traget_core_of_thread): New macro.
4391
71622373
PA
43922012-04-18 Pedro Alves <palves@redhat.com>
4393
4394 * aclocal.m4: Regenerate.
4395 * configure: Regenerate.
4396
80d26939
YQ
43972012-04-16 Yao Qi <yao@codesourcery.com>
4398
4399 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4400 duplicated on address.
4401
42476b70
YQ
44022012-04-16 Yao Qi <yao@codesourcery.com>
4403
4404 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4405 (struct tracepoint_action_ops) <send>: New field.
4406 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4407 (agent_expr_send, x_tracepoint_action_send): New.
4408 (l_tracepoint_action_send): New.
4409 (cmd_qtdp): Download and install tracepoint
4410 according to `use_agent'.
4411 (run_inferior_command): Add one more parameter `len'.
4412 Update callers.
4413 (tracepoint_send_agent): New.
4414 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4415
7bc83639
YQ
44162012-04-16 Yao Qi <yao@codesourcery.com>
4417
4418 * tracepoint.c (download_tracepoints): Moved to ...
4419 (cmd_qtstart): ... here.
4420
5f18041e
YQ
44212012-04-14 Yao Qi <yao@codesourcery.com>
4422
4423 * tracepoint.c: Include inttypes.h.
4424 (struct collect_memory_action): Use sized types.
4425 (struct tracepoint): Likewise.
4426 (cmd_qtdp, stop_tracing): Update print specifiers.
4427 (cmd_qtp, response_tracepoint): Likewise.
4428 (collect_data_at_tracepoint): Likewise.
4429 (collect_data_at_step): Likewise.
4430
55a8c076
YQ
44312012-04-14 Yao Qi <yao@codesourcery.com>
4432
4433 Import gnulib module inttypes.
4434 * aclocal.m4, config.in, configure: Regenerated.
4435
dc750257
YQ
44362012-04-14 Yao Qi <yao@codesourcery.com>
4437
4438 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4439 Makefile and config.status at last.
4440
0ab5faf9
YQ
44412012-04-13 Yao Qi <yao@codesourcery.com>
4442
4443 * tracepoint.c: Include stdint.h unconditionally.
4444
18f5fd81
TJB
44452012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4446
4447 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4448 on BFD_HAVE_SYS_PROCFS_TYPE.
4449 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4450 * configure: Regenerate.
4451 * config.in: Likewise.
4452
4d47af5c
L
44532012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4454
4455 * Makefile.in (clean): Also remove x32.c x32-linux.c
4456 x32-avx.c x32-avx-linux.c.
4457 (x32.o): New target.
4458 (x32.c): Likewise.
4459 (x32-linux.o): Likewise.
4460 (x32-linux.c): Likewise.
4461 (x32-avx.o): Likewise.
4462 (x32-avx.c): Likewise.
4463 (x32-avx-linux.o): Likewise.
4464 (x32-avx-linux.c): Likewise.
4465
4466 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4467 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4468 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4469 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4470 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4471 i386/x32-avx-linux.xml.
4472
4473 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4474 (init_registers_x32_avx_linux): Likwise.
4475 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4476 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4477
ecedbe58
PA
44782012-04-13 Pedro Alves <palves@redhat.com>
4479
4480 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4481 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4482 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4483 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4484 the sub-make.
4485
c92b5177
L
44862012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4487
4488 * linux-x86-low.c (compat_x32_clock_t): New.
4489 (compat_x32_siginfo_t): Likewise.
4490 (compat_x32_siginfo_from_siginfo): Likewise.
4491 (siginfo_from_compat_x32_siginfo): Likewise.
4492 (linux_is_elf64): Likewise.
4493 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4494 and siginfo_from_compat_x32_siginfo for x32.
4495 (x86_arch_setup): Set linux_is_elf64.
4496
214d508e
L
44972012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4498
4499 PR gdb/13969
4500 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4501 e_machine field.
4502 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4503 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4504 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4505 compatible with process.
4506
c9a1864a
YQ
45072012-04-12 Yao Qi <yao@codesourcery.com>
4508
4509 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4510 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4511 (install-only, install-info, clean): Handle sub dir gnulib.
4512 (all-lib, am--refresh): New targets.
4513 (memmem.o): Remove target.
4514 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4515 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4516 (AC_REPLACE_FUNCS): Remove memmem.
4517 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4518 (AC_OUTPUT): Generate Makefile in gnulib/.
4519 * aclocal.m4, config.in, configure: Regenerated.
4520
367ba2c2
MR
45212012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4522
4523 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4524
9d236627
PA
45252012-04-05 Pedro Alves <palves@redhat.com>
4526
4527 -Werror=strict-aliasing
4528
4529 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4530 pointer.
4531
111217b3
PA
45322012-04-04 Pedro Alves <palves@redhat.com>
4533
4534 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4535 (sparc_store_gregset_from_stack, sparc_store_gregset)
4536 (sparc_breakpoint_at): Fix formatting.
4537
8365dcf5
TJB
45382012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4539
4540 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4541 are available.
4542 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4543 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4544 * config.in: Regenerate.
4545 * configure: Likewise.
4546
689cc2ae
PA
45472012-03-29 Pedro Alves <palves@redhat.com>
4548
4549 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4550 Correct ptrace arguments.
4551
c14dfd32
PA
45522012-03-28 Pedro Alves <palves@redhat.com>
4553
4554 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4555 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4556 (IA64_FR1_REGNUM): New defines.
4557 (ia64_fetch_register): New.
4558 (the_low_target): Install it.
4559 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4560 field.
4561 * linux-low.c (linux_fetch_registers): Try the
4562 the_low_target.fetch_register hook first.
4563
4564 * linux-arm-low.c (the_low_target): Adjust.
4565 * linux-bfin-low.c (the_low_target): Adjust.
4566 * linux-cris-low.c (the_low_target): Adjust.
4567 * linux-crisv32-low.c (the_low_target): Adjust.
4568 * linux-m32r-low.c (the_low_target): Adjust.
4569 * linux-m68k-low.c (the_low_target): Adjust.
4570 * linux-mips-low.c (the_low_target): Adjust.
4571 * linux-ppc-low.c (the_low_target): Adjust.
4572 * linux-s390-low.c (the_low_target): Adjust.
4573 * linux-sh-low.c (the_low_target): Adjust.
4574 * linux-sparc-low.c (the_low_target): Adjust.
4575 * linux-tic6x-low.c (the_low_target): Adjust.
4576 * linux-x86-low.c (the_low_target): Adjust.
4577 * linux-xtensa-low.c (the_low_target): Adjust.
4578
63c88e13
PA
45792012-03-26 Pedro Alves <palves@redhat.com>
4580
4581 * server.c (handle_qxfer_libraries): Don't bail early if
4582 the_target->qxfer_libraries_svr4 is not NULL.
4583
fb723180
PA
45842012-03-26 Pedro Alves <palves@redhat.com>
4585
4586 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4587
0afae3cf
PA
45882012-03-23 Pedro Alves <palves@redhat.com>
4589
4590 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4591 "library-list-svr4" element's start tag when the the DSO list is
4592 empty.
4593
485f1ee4
PA
45942012-03-23 Pedro Alves <palves@redhat.com>
4595
4596 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4597 a variable whose type size is the same as the inferior's pointer
4598 size.
4599
a5362b9a
TS
46002012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4601
4602 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4603 struct siginfo.
4604 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4605 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4606 * linux-low.h: Include <signal.h>.
4607 (struct siginfo): Remove forward declaration.
4608 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4609 struct siginfo.
4610
d226c142
MF
46112012-03-21 Mike Frysinger <vapier@gentoo.org>
4612
4613 * .gitignore: Ignore more files.
4614
122f36ef
PA
46152012-03-19 Pedro Alves <palves@redhat.com>
4616 Jan Kratochvil <jan.kratochvil@redhat.com>
4617
4618 * server.c (cont_thread, general_thread): Add describing comments.
4619 (start_inferior): Clear `cont_thread'.
4620 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4621 of a process.
4622
fc3e5175
YQ
46232012-03-15 Yao Qi <yao@codesourcery.com>
4624
4625 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4626 handling to ...
4627 (cmd_qtdp): ... here.
4628
8d0d92cd
YQ
46292012-03-15 Yao Qi <yao@codesourcery.com>
4630
4631 * tracepoint.c (struct tracepoint_action_ops): New.
4632 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4633 (m_tracepoint_action_download): New.
4634 (r_tracepoint_action_download): New.
4635 (x_tracepoint_action_download): New.
4636 (l_tracepoint_action_download): New.
4637 (add_tracepoint_action): Install `action->ops' according type.
4638 (download_tracepoint_1): Move code `download' function pointer
4639 of various tracepoint_action_ops.
4640
87b0bb13
JK
46412012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4642
4643 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4644 linux_ptrace_attach_warnings.
4645
5f572dec
JK
46462012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4647
4648 * Makefile.in (linux-ptrace.o): New.
4649 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4650 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4651 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4652 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4653 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4654 of these targets.
4655 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4656
f4647387
YQ
46572012-03-08 Yao Qi <yao@codesourcery.com>
4658 Pedro Alves <palves@redhat.com>
4659
4660 Fix PR server/13392.
4661 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4662 offset of JMP insn.
4663 * tracepoint.c (remove_tracepoint): New.
4664 (cmd_qtdp): Call remove_tracepoint when failed to install.
4665
9b224c5e
PA
46662012-03-07 Pedro Alves <palves@redhat.com>
4667
4668 * linux-low.c (get_detach_signal): New.
4669 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4670 Pass on pending signals to PTRACE_DETACH. Check the result of the
4671 ptrace call.
4672 * server.c (program_signals, program_signals_p): New.
4673 (handle_general_set): Handle QProgramSignals.
4674 * server.h (program_signals, program_signals_p): Declare.
4675
e237a7e2
JK
46762012-03-05 Pedro Alves <palves@redhat.com>
4677 Jan Kratochvil <jan.kratochvil@redhat.com>
4678
4679 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4680 New comment why.
4681
5808517f
YQ
46822012-03-03 Yao Qi <yao@codesourcery.com>
4683
4684 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4685 agent_look_up_symbols.
4686
58b4daa5
YQ
46872012-03-03 Yao Qi <yao@codesourcery.com>
4688
4689 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4690 (linux-x86-low.o): Likewise.
4691 * server.h: Remove in_process_agent_loaded.
4692 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4693 common/agent.c.
4694 Update callers.
4695
8ffcbaaf
YQ
46962012-03-03 Yao Qi <yao@codesourcery.com>
4697
4698 * tracepoint.c (gdb_agent_capability): New global.
4699 (in_process_agent_loaded_ust): Renamed to
4700 `in_process_agent_supports_ust'.
4701 Update callers.
4702 (in_process_agent_supports_ust): Call agent_capability_check.
4703 (clear_installed_tracepoints): Assert that agent supports
4704 agent.
4705
d1feda86
YQ
47062012-03-03 Yao Qi <yao@codesourcery.com>
4707
4708 * linux-low.c (linux_supports_agent): New.
4709 (linux_target_ops): Initialize field `supports_agent' with
4710 linux_supports_agent.
4711 * target.h (struct target_ops) <supports_agent>: New.
4712 (target_supports_agent): New macro.
4713 * server.c (handle_general_set): Handle packet 'QAgent'.
4714 (handle_query): Send `QAgent+'.
4715 * Makefile.in (server.o): Depends on agent.h.
4716
2fa291ac
YQ
47172012-03-03 Yao Qi <yao@codesourcery.com>
4718
4719 * Makefile.in (OBS): Add agent.o.
4720 Add new rule for agent.o.
4721 Track dependence of tracepoint.c on agent.h.
4722 * tracepoint.c (run_inferior_command_1):
4723 (run_inferior_command): Call agent_run_command.
4724 (gdb_ust_connect_sync_socket): Deleted. Move it to
4725 common/agent.c.
4726 (resume_thread, stop_thread): Likewise.
4727 (gdb_ust_socket_init): Renamed to ...
4728 (gdb_agent_socket_init): ... New.
4729 (gdb_ust_thread): Renamed to ...
4730 (gdb_agent_helper_thread): ... New.
4731 (gdb_ust_init): Move some code to ...
4732 (gdb_agent_init): ... here. New.
4733 [HAVE_UST]: Call gdb_ust_init.
4734 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4735 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4736 * config.in, configure: Regenerated.
4737
05044653
PA
47382012-03-02 Pedro Alves <palves@redhat.com>
4739
4740 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4741 * linux-low.c (struct simple_pid_list): New.
4742 (stopped_pids): New a struct simple_pid_list pointer.
4743 (add_to_pid_list, pull_pid_from_list): New.
4744 (handle_extended_wait): Don't assume the first signal new children
4745 report is SIGSTOP. Adjust call to pull_pid_from_list.
4746 (linux_wait_for_lwp): Adjust.
4747
8d00225b
YQ
47482012-03-02 Yao Qi <yao@codesourcery.com>
4749
4750 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4751 debug log.
4752
19560ba5
YQ
47532012-03-02 Yao Qi <yao@codesourcery.com>
4754
4755 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4756 `stop_pc' and `tpoint'. Update caller.
4757
1faeff08
MR
47582012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4759
4760 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4761 * linux-low.c (use_linux_regsets): New macro.
4762 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4763 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4764 (linux_register_in_regsets): New function.
4765 (usr_fetch_inferior_registers): Skip registers covered by
4766 regsets.
4767 (usr_store_inferior_registers): Likewise.
4768 (usr_fetch_inferior_registers): New macro.
4769 (usr_store_inferior_registers): Likewise.
4770 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4771 (linux_store_registers): Likewise.
4772 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4773 prototype.
4774 (init_registers_mips64_dsp_linux): Likewise.
4775 (init_registers_mips_linux): New macro.
4776 (init_registers_mips_dsp_linux): Likewise.
4777 (mips_dsp_num_regs): Likewise.
4778 (DSP_BASE, DSP_CONTROL): New fallback macros.
4779 (mips_base_regs): New macro.
4780 (mips_regmap): Use it. Fix the size.
4781 (mips_dsp_regmap): New variable.
4782 (mips_dsp_regset_bitmap): Likewise.
4783 (mips_arch_setup): New function.
4784 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4785 than mips_regmap.
4786 (mips_cannot_store_register): Likewise.
4787 (the_low_target): Update .arch_setup, .num_regs and .regmap
4788 initializers. Add .regset_bitmap initializer.
4789 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4790 initializer.
4791 * linux-bfin-low.c (the_low_target): Likewise.
4792 * linux-cris-low.c (the_low_target): Likewise.
4793 * linux-crisv32-low.c (the_low_target): Likewise.
4794 * linux-ia64-low.c (the_low_target): Likewise.
4795 * linux-m32r-low.c (the_low_target): Likewise.
4796 * linux-m68k-low.c (the_low_target): Likewise.
4797 * linux-ppc-low.c (the_low_target): Likewise.
4798 * linux-s390-low.c (the_low_target): Likewise.
4799 * linux-sh-low.c (the_low_target): Likewise.
4800 * linux-sparc-low.c (the_low_target): Likewise.
4801 * linux-tic6x-low.c (the_low_target): Likewise.
4802 * linux-x86-low.c (the_low_target): Likewise.
4803 * linux-xtensa-low.c (the_low_target): Likewise.
4804 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4805 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4806 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4807 srv_xmlfiles.
4808 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4809 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4810
c03e6ccc
YQ
48112012-02-29 Yao Qi <yao@codesourcery.com>
4812 Pedro Alves <palves@redhat.com>
4813
4814 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4815 `step_over_finished' is true.
4816
644cebc9
PA
48172012-02-27 Pedro Alves <palves@redhat.com>
4818
4819 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4820 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4821
c14d7ab2
PA
48222012-02-27 Pedro Alves <palves@redhat.com>
4823
4824 PR server/9684
4825 * linux-low.c (pid_is_stopped): New.
4826 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4827
412c89dd
LM
48282012-02-25 Luis Machado <lgustavo@codesourcery.com>
4829
4830 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4831 of conditions.
4832
b745defe
MR
48332012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4834
4835 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4836
9f3a5c85
LM
48372012-02-24 Luis Machado <lgustavo@codesourcery>
4838
4839 * server.c (handle_query): Advertise support for target-side
4840 breakpoint condition evaluation.
4841 (process_point_options): New function.
4842 (process_serial_event): When inserting a breakpoint, check for
4843 a target-side condition that should be evaluated.
4844
4845 * mem-break.c: Include regcache.h and ax.h.
4846 (point_cond_list_t): New data structure.
4847 (breakpoint) <cond_list>: New field.
4848 (find_gdb_breakpoint_at): Make non-static.
4849 (delete_gdb_breakpoint_at): Clear any target-side
4850 conditions.
4851 (clear_gdb_breakpoint_conditions): New function.
4852 (add_condition_to_breakpoint): Likewise.
4853 (add_breakpoint_condition): Likewise.
4854 (gdb_condition_true_at_breakpoint): Likewise.
4855 (gdb_breakpoint_here): Return result directly instead
4856 of going through a local variable.
4857
4858 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4859 (clear_gdb_breakpoint_conditions): Likewise.
4860 (add_breakpoint_condition): Likewise.
4861 (gdb_condition_true_at_breakpoint): Likewise.
4862
4863 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4864 (need_step_over_p): Take target-side breakpoint condition into
4865 consideration.
4866
5e1dc496
LM
48672012-02-24 Luis Machado <lgustavo@codesourcery>
4868
4869 * server.h: Include tracepoint.h.
4870 (agent_mem_read, agent_get_trace_state_variable_value,
4871 agent_set_trace_state_variable_value,
4872 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4873 get_set_tsv_func_addr): New prototypes.
4874
4875 * ax.h: New include file.
4876 * ax.c: New source file.
4877
4878 * tracepoint.c: Include ax.h.
4879 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4880 agent_expr, eval_result_type): Move to ax.h.
4881 (parse_agent_expr): Rename to ...
4882 (gdb_parse_agent_expr): ... this, make it non-static and move
4883 to ax.h.
4884 (unparse_agent_expr) Rename to ...
4885 (gdb_unparse_agent_expr): ... this, make it non-static and move
4886 to ax.h.
4887 (eval_agent_expr): Rename to ...
4888 (eval_tracepoint_agent_expr): ... this.
4889 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4890 forward declarations.
4891 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4892 (agent_get_trace_state_variable_value): New function.
4893 (agent_set_trace_state_variable_value): New function.
4894 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4895 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4896 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4897 (condition_true_at_tracepoint): Likewise.
4898 (parse_agent_expr): Rename to ...
4899 (gdb_parse_agent_expr): ... this and move to ax.c.
4900 (unparse_agent_expr): Rename to ...
4901 (gdb_unparse_agent_expr): ... this and move to ax.c.
4902 (gdb_agent_op_name): Move to ax.c.
4903 (eval_agent_expr): Rename to ...
4904 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4905 and move to ax.c.
4906 (eval_tracepoint_agent_expr): New function.
4907 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4908 non-static.
5e1dc496
LM
4909 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4910 ax.c.
4911 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4912 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4913 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4914 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4915 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4916 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4917 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4918 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4919 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4920 (compile_bytecodes): Remove forward declaration.
4921 (is_goto_target): Move to ax.c.
4922 (compile_bytecodes): Move to ax.c and call
4923 agent_get_trace_state_variable_value (...) and
4924 agent_set_trace_state_variable_value (...).
4925
4926 * Makefile.in: Update ax.c and IPA dependencies.
4927
277e4e52
PA
49282012-02-24 Pedro Alves <palves@redhat.com>
4929
4930 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4931 (cmd_bigqtbuffer_circular): ... this. Only handle
4932 'QTBuffer:circular:'.
4933 (handle_tracepoint_general_set): Adjust.
4934
bf4c19f7
YQ
49352012-02-16 Yao Qi <yao@codesourcery.com>
4936
4937 * inferiors.c: Move code to ...
4938 * dll.c: .... here. New.
4939 * server.h: Declare clear_dlls.
4940 * Makefile.in (SFILES): Add dll.c.
4941 (OBS): Add dll.o
4942 (dll.o): New rule.
4943
d73f2619
YQ
49442012-02-11 Yao Qi <yao@codesourcery.com>
4945
4946 * server.c: (handle_monitor_command): Add a new parameter
4947 `own_buf'.
4948 (handle_query): Update caller.
4949
f8255c2a
JB
49502012-02-09 Joel Brobecker <brobecker@adacore.com>
4951
4952 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4953 * configure, config.in: Regenerate.
4954 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4955 is not defined.
4956
da84f473
PA
49572012-02-02 Pedro Alves <palves@redhat.com>
4958
4959 Try SIGKILL first, then PTRACE_KILL.
4960 * linux-low.c (linux_kill_one_lwp): New.
4961 (linux_kill_one_lwp): Rename to ...
4962 (kill_one_lwp_callback): ... this. Use the new
4963 linux_kill_one_lwp.
4964
e886a173
PA
49652012-02-02 Pedro Alves <palves@redhat.com>
4966
4967 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4968 inferior.
4969
be07f1a2
PA
49702012-01-27 Pedro Alves <palves@redhat.com>
4971
4972 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4973 (elf_64_file_p): Make static.
4974 (linux_pid_exe_is_elf_64_file): New.
4975 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4976 Delete declarations.
4977 (linux_pid_exe_is_elf_64_file): Declare.
4978 * linux-x86-low.c (x86_arch_setup): Use
4979 linux_pid_exe_is_elf_64_file.
4980
d8301ad1
JK
49812012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4982
4983 * linux-low.c (linux_wait_for_event_1): Rename to ...
4984 (linux_wait_for_event): ... here and merge it with former
4985 linux_wait_for_event - new variable wait_ptid, use it.
4986 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4987
01b17894
PA
49882012-01-23 Pedro Alves <palves@redhat.com>
4989
4990 * server.c (main): Avoid yet another case of infinite loop while
4991 detaching/killing after a longjmp.
4992
e825046f
JK
49932012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4994
4995 Code cleanup.
4996 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4997
b9e7b9c3
UW
49982012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4999
5000 * hostio.c (handle_readlink): New function.
5001 (handle_vFile): Call it to handle "vFile:readlink" packets.
5002
901f9912
UW
50032012-01-20 Pedro Alves <palves@redhat.com>
5004 Ulrich Weigand <ulrich.weigand@linaro.org>
5005
5006 * server.c (handle_v_requests): Only support vAttach and vRun to
5007 start multiple processes when in extended protocol mode.
5008
fc1ab1a0
PA
50092012-01-17 Pedro Alves <palves@redhat.com>
5010
5011 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5012 memalign plus mprotect to allocate the scratch buffer.
5013
7d5d4e98
PA
50142012-01-13 Pedro Alves <palves@redhat.com>
5015
5016 * server.c (attach_inferior): Clear `cont_thread'.
5017
f128d5e9
PA
50182012-01-13 Pedro Alves <palves@redhat.com>
5019
5020 * server.c (main): Avoid infinite loop while detaching/killing
5021 after a longjmp.
5022
06db92f0
DE
50232012-01-09 Doug Evans <dje@google.com>
5024
5025 * server.c (start_inferior): Set last_ptid in --wrapper case.
5026
32d92999
YQ
50272012-01-06 Yao Qi <yao@codesourcery.com>
5028
5029 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5030 defined.
5031 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5032
5e0a92a9
YQ
50332012-01-04 Yao Qi <yao@codesourcery.com>
5034
5035 * tracepoint.c (cmd_qtdp): Print debug message
5036 for static tracepoint.
5037
ae639e8c
YQ
50382012-01-04 Yao Qi <yao@codesourcery.com>
5039
5040 * tracepoint.c (trace_vdebug): Differentiate debug message
5041 between gdbserver and IPA.
5042
f72429c5
YQ
50432012-01-03 Yao Qi <yao@codesourcery.com>
5044
5045 * tracepoint.c (tracepoint_was_hit): Don't collect for
5046 static tracepoint.
5047
12c3e59c
JB
50482012-01-02 Joel Brobecker <brobecker@adacore.com>
5049
5050 * terminal.h: Reformat copyright header.
5051
67827812
JB
50522012-01-02 Joel Brobecker <brobecker@adacore.com>
5053
5054 * server.c (gdbserver_version): Update copyright year.
5055 * gdbreplay.c (gdbreplay_version): Likewise.
5056
3e52c33d
JK
50572011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5058
5059 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5060
5061 Revert:
5062 2011-12-18 Hui Zhu <teawater@gmail.com>
5063 * linux-low.c (linux_create_inferior): Save return value to ret.
5064
66f1260e
HZ
50652011-12-18 Hui Zhu <teawater@gmail.com>
5066
5067 * linux-low.c (linux_create_inferior): Save return value to ret.
5068
e77616d7
DE
50692011-12-16 Doug Evans <dje@google.com>
5070
e7b06c57
DE
5071 * linux-low.c (linux_create_inferior): If stdio connection,
5072 redirect stdin from /dev/null, stdout to stderr.
5073 * remote-utils.c (remote_is_stdio): New static global.
5074 (remote_connection_is_stdio): New function.
5075 (remote_prepare): Handle stdio connection.
5076 (remote_open): Ditto.
5077 (remote_close): Don't close stdin for stdio connections.
5078 (read_prim,write_prim): New functions. Replace all calls to
5079 read/write to these.
5080 * server.c (main): Watch for "-" argument. Move call to
5081 remote_prepare before start_inferior.
5082 * server.h (STDIO_CONNECTION_NAME): New macro.
5083 (remote_connection_is_stdio): Declare.
5084
e77616d7
DE
5085 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5086 in debugging output.
5087
82067193
YQ
50882011-12-15 Yao Qi <yao@codesourcery.com>
5089
5090 * tracepoint.c: Include sys/syscall.h.
5091 (gdb_ust_thread): Remove preprocessor conditional.
5092
82bfbe7e
PA
50932011-12-14 Pedro Alves <pedro@codesourcery.com>
5094
5095 * linux-low.c (linux_detach_one_lwp): Call
5096 the_low_target.prepare_to_resume before detaching.
5097
712c6575
YQ
50982011-12-14 Yao Qi <yao@codesourcery.com>
5099
5100 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5101 of write.
5102
d54d1edf
YQ
51032011-12-14 Yao Qi <yao@codesourcery.com>
5104
5105 * i386-low.c (i386_low_stopped_data_address): Initialize local
5106 variable `control'.
5107
6210a125
PA
51082011-12-13 Pedro Alves <pedro@codesourcery.com>
5109
5110 PR remote/13492
5111
5112 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5113 DR_CONTROL unless necessary. Extend comments.
5114 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5115 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5116
2ece8244
YQ
51172011-12-13 Yao Qi <yao@codesourcery.com>
5118
5119 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5120 macros.
5121 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5122
784867a5
JK
51232011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5124
5125 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5126 Print new debug message for such case.
5127
6bf36717
JK
51282011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5129
5130 Fix overlapping memcpy.
5131 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5132 the read_inferior_memory transfer.
5133 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5134 write_inferior_memory transfer.
5135 (set_fast_tracepoint_jump): New variable buf. Use it for the
5136 read_inferior_memory and write_inferior_memory transfers.
5137 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5138 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5139 Use it for the write_inferior_memory transfer.
5140 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5141 buffers.
5142
50275556
MR
51432011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5144
5145 * linux-low.c (fetch_register, store_register): Make code
5146 consistent, fix formatting.
5147
7325beb4
MR
51482011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5149
5150 * linux-low.c (usr_store_inferior_registers): Factor out code
5151 to handle individual registers into...
5152 (store_register): ... this new function.
5153
c642a434
UW
51542011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5155
5156 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5157 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5158 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5159 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5160 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5161 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5162 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5163 (srv_xmlfiles): Add new XML files.
5164
5165 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5166 and <sys/uio.h>.
5167 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5168 (init_registers_s390_linux32v1): Add prototype.
5169 (init_registers_s390_linux32v2): Likewise.
5170 (init_registers_s390_linux64v1): Likewise.
5171 (init_registers_s390_linux64v2): Likewise.
5172 (init_registers_s390x_linux64v1): Likewise.
5173 (init_registers_s390x_linux64v2): Likewise.
5174 (s390_num_regs): Increment to 52.
5175 (s390_regmap): Add orig_r2 register.
5176 (s390_num_regs_3264): Increment to 68.
5177 (s390_regmap_3264): Add orig_r2 register.
5178 (s390_collect_ptrace_register): Handle orig_r2 register.
5179 (s390_supply_ptrace_register): Likewise.
5180 (s390_fill_last_break): New function.
5181 (s390_store_last_break): Likewise.
5182 (s390_fill_system_call): New function.
5183 (s390_store_system_call): Likewise.
5184 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5185 register sets.
5186 (s390_check_regset): New function.
5187 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5188 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5189 Update target_regsets for available register sets.
5190
2268b414
JK
51912011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5192 Jan Kratochvil <jan.kratochvil@redhat.com>
5193
5194 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5195 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5196 New.
5197 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5198 * linux-low.h (struct process_info_private): New member r_debug.
5199 * server.c (handle_qxfer_libraries): Call
5200 the_target->qxfer_libraries_svr4.
5201 (handle_qxfer_libraries_svr4): New function.
5202 (qxfer_packets): New entry "libraries-svr4".
5203 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5204 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5205 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5206 PACKET_qXfer_libraries_svr4.
5207
d6db1fab
UW
52082011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5209
5210 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5211 PSW address/mask between 8-byte and 16-byte formats.
5212 (s390_supply_ptrace_register): Likewise.
5213 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5214 basic addressing mode bit.
5215
242f5f1c
SS
52162011-11-24 Stan Shebs <stan@codesourcery.com>
5217
5218 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5219
f196051f
SS
52202011-11-17 Stan Shebs <stan@codesourcery.com>
5221
5222 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5223 (tracing_start_time): New global.
5224 (tracing_stop_time): New global.
5225 (tracing_user_name): New global.
5226 (tracing_notes): New global.
5227 (tracing_stop_note): New global.
5228 (cmd_qtstart): Set traceframe_usage, start_time.
5229 (stop_tracing): Set stop_time.
5230 (cmd_qtstatus): Report additional status.
5231 (cmd_qtp): New function.
5232 (handle_tracepoint_query): Call it.
5233 (cmd_qtnotes): New function.
5234 (handle_tracepoint_general_set): Call it.
5235 (get_timestamp): Rename from tsv_get_timestamp.
5236
405f8e94
SS
52372011-11-14 Stan Shebs <stan@codesourcery.com>
5238 Kwok Cheung Yeung <kcy@codesourcery.com>
5239
5240 * linux-x86-low.c (small_jump_insn): New.
5241 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5242 trampoline and error message, build a trampoline and issue a small
5243 jump instruction to it.
5244 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5245 trampoline and error message.
5246 (x86_get_min_fast_tracepoint_insn_len): New.
5247 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5248 * linux-low.h (struct linux_target_ops): Add arguments to
5249 install_fast_tracepoint_jump_pad operation, add new operation.
5250 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5251 arguments.
5252 (linux_get_min_fast_tracepoint_insn_len): New function.
5253 (linux_target_op): Add new operation.
5254 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5255 (gdb_trampoline_buffer_end): Ditto.
5256 (gdb_trampoline_buffer_error): Ditto.
5257 (struct ipa_sym_addresses): Add fields for new IPA variables.
5258 (symbol_list): Add entries for new IPA variables.
5259 (struct tracepoint): Add fields to hold the address range of the
5260 trampoline used by the tracepoint.
5261 (trampoline_buffer_head): New static variable.
5262 (trampoline_buffer_tail): Ditto.
5263 (claim_trampoline_space): New function.
5264 (have_fast_tracepoint_trampoline_buffer): New function.
5265 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5266 structure.
5267 (install_fast_tracepoint): Ditto, also add error buffer argument.
5268 (cmd_qtminftpilen): New function.
5269 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5270 (fast_tracepoint_from_trampoline_address): New function.
5271 (fast_tracepoint_collecting): Handle trampoline as part of jump
5272 pad space.
5273 (set_trampoline_buffer_space): New function.
5274 (initialize_tracepoint): Initialize new IPA variables.
5275 * target.h (struct target_ops): Add arguments to
5276 install_fast_tracepoint_jump_pad operation, add new
5277 get_min_fast_tracepoint_insn_len operation.
5278 (target_get_min_fast_tracepoint_insn_len): New.
5279 (install_fast_tracepoint_jump_pad): Add arguments.
5280 * server.h (IPA_BUFSIZ): Define.
5281 * linux-i386-ipa.c: Include extra header files.
5282 (initialize_fast_tracepoint_trampoline_buffer): New function.
5283 (initialize_low_tracepoint): Call it.
5284 * server.h (set_trampoline_buffer_space): Declare.
5285 (claim_trampoline_space): Ditto.
5286 (have_fast_tracepoint_trampoline_buffer): Ditto.
5287
1e4d1764
YQ
52882011-11-14 Yao Qi <yao@codesourcery.com>
5289
5290 * server.c (handle_query): Handle InstallInTrace for qSupported.
5291 * tracepoint.c (add_tracepoint): Sort list.
5292 (install_tracepoint, download_tracepoint): New.
5293 (cmd_qtdp): Call them to install and download tracepoints.
5294 (sort_tracepoints): Removed.
5295 (cmd_qtstart): Update.
5296
5c73ff4e
YQ
52972011-11-14 Yao Qi <yao@codesourcery.com>
5298
5299 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5300 * mem-break.h: Declare.
5301 * tracepoint.c (cmd_qtstart): Move some code to ...
5302 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5303 New.
5304 (download_tracepoints): Move some code to ...
5305 (download_tracepoint_1): ... here. New.
5306
86a30030
YQ
53072011-11-08 Yao Qi <yao@codesourcery.com>
5308
5309 * remote-utils.c (relocate_instruction): A comment fix.
5310
8d26e50c
JB
53112011-11-07 Joel Brobecker <brobecker@adacore.com>
5312
5313 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5314 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5315 dr_status_mirror and dr_control_mirror from debug_reg_state.
5316 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5317 (i386_initial_stuff): Remove use of deleted globals.
5318 (i386_get_thread_context, i386_set_thread_context,
5319 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5320 from debug_reg_state.
5321
a59306a3
YQ
53222011-11-05 Yao Qi <yao@codesourcery.com>
5323
5324 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5325 address as TPOINT's.
5326
3065dfb6
SS
53272011-11-02 Stan Shebs <stan@codesourcery.com>
5328
5329 * tracepoint.c (agent_mem_read_string): New function.
5330 (eval_agent_expr): Call it for tracenz.
5331 * server.c (handle_query): Report support for tracenz.
5332
fd0d8c7c
YQ
53332011-11-02 Yao Qi <yao@codesourcery.com>
5334
5335 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5336
609086b1
YQ
53372011-11-02 Yao Qi <yao@codesourcery.com>
5338
5339 * target.h: Fix a typo in comment.
5340
b9fd1791
PA
53412011-10-31 Pedro Alves <pedro@codesourcery.com>
5342
5343 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5344 clobber the breakpoints' shadows with fast tracepoint jumps.
5345 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5346 * target.c (write_inferior_memory): Also pass MYADDR down to
5347 check_mem_write.
5348
03583c20
UW
53492011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5350
5351 * configure.ac: Check support for personality routine.
5352 * configure: Regenerate.
5353 * config.in: Likewise.
5354 * linux-low.c: Include <sys/personality.h>.
5355 Define ADDR_NO_RANDOMIZE if necessary.
5356 (linux_create_inferior): Disable address space randomization when
5357 forking inferior, if requested.
5358 (linux_supports_disable_randomization): New function.
5359 (linux_target_ops): Install it.
5360 * server.h (disable_randomization): Declare.
5361 * server.c (disable_randomization): New global variable.
5362 (handle_general_set): Handle QDisableRandomization.
5363 (handle_query): Likewise for qSupported.
5364 (main): Support --disable-randomization and --no-disable-randomization
5365 command line arguments.
5366 * target.h (struct target_ops): Add supports_disable_randomization.
5367 (target_supports_disable_randomization): New macro.
5368
723b724b
MF
53692011-09-29 Mike Frysinger <vapier@gentoo.org>
5370
5371 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5372 ifdef check.
5373 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5374 [!PT_GETDSBT] (target_loadmap): New definition.
5375 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5376 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5377 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5378 and PT_GETDSBT to LINUX_LOADMAP.
5379 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5380 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5381
55329a5c 53822011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5383
5384 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5385 (arm_linux_hwbp_cap): New static variable.
5386 (arm_linux_get_hwbp_cap): Replace by ...
5387 (arm_linux_init_hwbp_cap): ... this new function.
5388 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5389 (arm_linux_get_hw_watchpoint_count): Likewise.
5390 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5391 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5392 (arm_prepare_to_resume): Use perror_with_name instead of error.
5393
55329a5c 53942011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5395
5396 * linux-arm-low.c: Include <signal.h>.
5397 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5398 (struct arm_linux_hwbp_cap): New data type.
5399 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5400 (struct arm_linux_hw_breakpoint): New data type.
5401 (MAX_BPTS, MAX_WPTS): Define.
5402 (struct arch_process_info, struct arch_lwp_info): New data types.
5403 (arm_linux_get_hwbp_cap): New function.
5404 (arm_linux_get_hw_breakpoint_count): Likewise.
5405 (arm_linux_get_hw_watchpoint_count): Likewise.
5406 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5407 (arm_hwbp_control_initialize): Likewise.
5408 (arm_hwbp_control_is_enabled): Likewise.
5409 (arm_hwbp_control_is_initialized): Likewise.
5410 (arm_hwbp_control_disable): Likewise.
5411 (arm_linux_hw_breakpoint_equal): Likewise.
5412 (arm_linux_hw_point_initialize): Likewise.
5413 (struct update_registers_data): New data structure.
5414 (update_registers_callback: New function.
5415 (arm_insert_point): Likewise.
5416 (arm_remove_point): Likewise.
5417 (arm_stopped_by_watchpoint): Likewise.
5418 (arm_stopped_data_address): Likewise.
5419 (arm_new_process): Likewise.
5420 (arm_new_thread): Likewise.
5421 (arm_prepare_to_resume): Likewise.
5422 (the_low_target): Register arm_insert_point, arm_remove_point,
5423 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5424 arm_new_thread, and arm_prepare_to_resume.
5425
6b9801d4
SS
54262011-09-15 Stan Shebs <stan@codesourcery.com>
5427
5428 * server.h (struct emit_ops): Add compare-goto fields.
5429 * tracepoint.c (gdb_agent_op_sizes): New table.
5430 (emit_eq_goto): New function.
5431 (emit_ne_goto): New function.
5432 (emit_lt_goto): New function.
5433 (emit_le_goto): New function.
5434 (emit_gt_goto): New function.
5435 (emit_ge_goto): New function.
5436 (is_goto_target): New function.
5437 (compile_bytecodes): Recognize special cases of compare-goto
5438 combinations and call specialized emitters for them.
5439 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5440 (amd64_emit_ne_goto): New function.
5441 (amd64_emit_lt_goto): New function.
5442 (amd64_emit_le_goto): New function.
5443 (amd64_emit_gt_goto): New function.
5444 (amd64_emit_ge_goto): New function.
5445 (amd64_emit_ops): Add the new functions.
5446 (i386_emit_eq_goto): New function.
5447 (i386_emit_ne_goto): New function.
5448 (i386_emit_lt_goto): New function.
5449 (i386_emit_le_goto): New function.
5450 (i386_emit_gt_goto): New function.
5451 (i386_emit_ge_goto): New function.
5452 (i386_emit_ops): Add the new functions.
5453
bf15cbda
SS
54542011-09-08 Stan Shebs <stan@codesourcery.com>
5455
5456 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5457 (i386_emit_epilogue): Restore %ebx.
5458
943ca1dd
JZ
54592011-08-31 Jie Zhang <jzhang918@gmail.com>
5460
5461 * server.c (step_thread): Remove definition.
5462 (process_serial_event): Don't handle Hs.
5463 * server.h (step_thread): Remove declaration.
5464 * target.c (set_desired_inferior): Remove use of step_thread.
5465
e3deef73
LM
54662011-08-24 Luis Machado <lgustavo@codesourcery.com>
5467
5468 * linux-low.c: Include linux-procfs.h.
5469 (linux_attach_lwp_1): Update comments.
5470 (linux_attach): Scan for existing threads when attaching to a
5471 process that is the tgid.
5472 * Makefile.in: Update dependencies.
5473
13da1c97
LM
54742011-08-24 Luis Machado <lgustavo@codesourcery.com>
5475
5476 * configure.srv: Add linux-procfs.o dependencies.
5477
881127c9
YQ
54782011-08-14 Yao Qi <yao@codesourcery.com>
5479
5480 * target.h (struct target_ops): Fix indent.
5481 * win32-low.c (win32_target_ops): Fix comment.
5482
58dbd541
YQ
54832011-08-14 Andrew Jenner <andrew@codesourcery.com>
5484 Yao Qi <yao@codesourcery.com>
5485
5486 * Makefile.in (clean): Remove tic6x-*.c files.
5487 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5488 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5489 (tic6x-c64xp-linux.c): Likewise.
5490 * configure.srv: Add support for tic6x-*-uclinux.
5491 * linux-tic6x-low.c: New.
5492 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5493
78d85199
YQ
54942011-08-14 Andrew Stubbs <ams@codesourcery.com>
5495 Yao Qi <yao@codesourcery.com>
5496
5497 * target.h (struct target_ops): Add read_loadmap.
5498 * linux-low.c (struct target_loadseg): New type.
5499 (struct target_loadmap): New type.
5500 (linux_read_loadmap): New function.
5501 (linux_target_ops): Add linux_read_loadmap.
5502 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5503 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5504 to NULL.
78d85199 5505
a959a88d
EZ
55062011-08-05 Eli Zaretskii <eliz@gnu.org>
5507
5508 * win32-low.c: Include <stdint.h>.
5509
1ced966e
PA
55102011-07-22 Pedro Alves <pedro@codesourcery.com>
5511
5512 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5513 to the inferior here.
5514 (i386_remove_aligned_watchpoint): Ditto.
5515 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5516 fit part of the watchpoint in the debug registers.
5517 (i386_update_inferior_debug_regs): New.
5518 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5519 registers, and only update the inferior on success.
5520 (i386_low_remove_watchpoint): Ditto.
5521
d26e3629
KY
55222011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5523
5524 * linux-low.c (compare_ints, unique, list_threads, show_process,
5525 linux_core_of_thread): Delete.
5526 (linux_target_ops): Change linux_core_of_thread to
5527 linux_common_core_of_thread.
5528 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5529 * utils.c (malloc_failure): Change type of argument.
5530 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5531 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5532 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5533 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5534 (IPA_OBJS): Add common-utils-ipa.o.
5535 (ptid_h, linux_osdata_h): New macros.
5536 (server_h): Add common/common-utils.h, common/xml-utils.h,
5537 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5538 common/ptid.h.
5539 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5540 ptid.o, buffer.o): New rules.
5541 (linux-low.o): Add common/linux-osdata.h as a dependency.
5542 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5543 * configure.ac: Add AC_HEADER_DIRENT check.
5544 * config.in: Regenerate.
5545 * configure: Regenerate.
5546 * remote-utils.c (xml_escape_text): Delete.
5547 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5548 buffer_xml_printf): Move to common/buffer.c.
5549 * server.c (main): Remove call to initialize_inferiors.
5550 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5551 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5552 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5553 internal_error, gdb_assert, gdb_assert_fail): Delete.
5554 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5555 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5556 common/buffer.h.
5557 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5558 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5559 initialize_inferiors): Delete.
5560
2275a1a7
PA
55612011-07-20 Pedro Alves <pedro@codesourcery.com>
5562
5563 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5564 symbol error.
5565
0a5b1e09
PA
55662011-05-31 Pedro Alves <pedro@codesourcery.com>
5567
5568 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5569 assertion.
5570 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5571
6938fd34
YQ
55722011-05-26 Yao Qi <yao@codesourcery.com>
5573
5574 * Makefile.in (thread-db.o): Track dependence to
5575 common/gdb_thread_db.h.
5576 * thread-db.c: include gdb_thread_db.h from right place.
5577
b481f9e0
TT
55782011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5579
5580 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5581 __FILE__ and __LINE__ to internal_error.
5582
98a5dd13
DE
55832011-05-13 Doug Evans <dje@google.com>
5584
5585 * thread-db.c (try_thread_db_load_from_sdir): New function.
5586 (try_thread_db_load_from_dir): New function.
5587 (thread_db_load_search): Handle $sdir, ignore $pdir.
5588 Remove trying of system directories if search of
5589 libthread-db-search-path fails, that is now done via $sdir.
5590
d248b706
KY
55912011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5592
5593 * server.c (handle_query): Add EnableDisableTracepoints to the list
5594 of supported features.
43aaf8b6 5595 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5596 tracepoints.
43aaf8b6
PA
5597 (cmd_qtenable_disable): New.
5598 (cmd_qtstart): Install tracepoints even if disabled.
5599 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5600 receiving a QTEnable or QTDisable packet.
5601 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5602 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5603 tracepoints.
5604 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5605
84e578fb
DE
56062011-05-10 Doug Evans <dje@google.com>
5607
5608 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5609
71f55dd8
DE
56102011-05-04 Doug Evans <dje@google.com>
5611
5612 * linux-low.c (linux_join): Skip process lookup.
5613 * spu-low.c (spu_join): Ditto.
5614 * server.c (join_inferiors_callback): Delete.
5615 (process_serial_event): For 'D' packet (detach) call join_inferior
5616 directly.
5617
4d393d60
JM
56182011-05-04 Joseph Myers <joseph@codesourcery.com>
5619
5620 * README: Don't mention xscale*-*-linux*.
5621 * configure.srv (xscale*-*-linux*): Don't handle target.
5622
b00ad6ff
NF
56232011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5624
5625 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5626 casting pointers.
5627 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5628 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5629 (i386_emit_void_call_2): Likewise.
5630
af96c192
YQ
56312011-04-26 Yao Qi <yao@codesourcery.com>
5632
43aaf8b6
PA
5633 * linux-low.c: Move common macros to linux-ptrace.h.
5634 Include linux-ptrace.h.
af96c192
YQ
5635 * Makefile.in (linux_ptrace_h): New.
5636 (linux-low.o): Depends on linux-ptrace.h.
5637
03f2bd59
JK
56382011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5639
5640 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5641 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5642 (remote_prepare): New function with most of the TCP code from ...
5643 (remote_open): ... here. Detect PORT here unconditionally. Move also
5644 setting transport_is_reliable.
5645 * server.c (run_once): New variable.
5646 (gdbserver_usage): Document it.
5647 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5648 the first run if RUN_ONCE.
5649 * server.h (run_once, remote_prepare): New declarations.
5650
7a9dd1b2
TT
56512011-04-19 Tom Tromey <tromey@redhat.com>
5652
5653 * win32-low.c (handle_load_dll): Remove duplicate "the".
5654
81239425
PM
56552011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5656
5657 Remove support for old Cygwin 1.5 versions.
5658 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5659 function to avoid warning.
5660 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5661 warning.
5662
9e0627f1
PM
56632011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5664
5665 * gdbserver/server.h (Macro _): Define it if not available.
5666
588eebee
MS
56672011-03-14 Michael Snyder <msnyder@vmware.com>
5668
348af9f7 5669 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5670
43f70d4c
JB
56712011-03-10 Joel Brobecker <brobecker@adacore.com>
5672
5673 * Makefile.in (maintainer-clean realclean distclean): Remove
5674 "make ... subdir_do" command.
5675
348af9f7
MS
56762011-03-10 Michael Snyder <msnyder@vmware.com>
5677
5678 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5679
5680 * server.c (handle_v_run): Free alloced buffer on early return.
5681
e637a4f5
YQ
56822011-03-09 Yao Qi <yao@codesourcery.com>
5683
5684 Revert:
5685 2011-03-04 Yao Qi <yao@codesourcery.com>
5686
5687 * Makefile.in: Remove GNU make feature --directory.
5688
5689 2011-03-05 Yao Qi <yao@codesourcery.com>
5690
5691 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5692 (subdir_do): New make target. Copied from gdb/Makefile.
5693 (maintainer-clean, realclean, distclean, clean): Call corresponding
5694 make targets in common/Makefile.
5695
5696 2011-02-11 Yao Qi <yao@codesourcery.com>
5697
5698 * configure.ac: Call AC_PROG_RANLIB.
5699 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5700 * configure: Regenerate.
5701
e6edda56
JK
57022011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5703
5704 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5705
e5141119
JB
57062011-03-06 Yao Qi <yao@codesourcery.com>
5707
5708 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5709
64794aa4
JB
57102011-03-05 Yao Qi <yao@codesourcery.com>
5711
5712 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5713 (subdir_do): New make target. Copied from gdb/Makefile.
5714 (maintainer-clean, realclean, distclean, clean): Call corresponding
5715 make targets in common/Makefile.
5716
7a762829
YQ
57172011-03-04 Yao Qi <yao@codesourcery.com>
5718
5719 * Makefile.in: Remove GNU make feature --directory.
5720
348af9f7
MS
57212011-03-04 Michael Snyder <msnyder@vmware.com>
5722
5723 * server.c (queue_stop_reply): Call xmalloc not malloc.
5724
57252011-03-02 Michael Snyder <msnyder@vmware.com>
5726
5727 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5728
9f72fee2
MS
57292011-02-28 Michael Snyder <msnyder@vmware.com>
5730
588eebee
MS
5731 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5732 (cmd_qtframe): Ditto.
5733 (cmd_qtbuffer): Ditto.
5734 (cmd_bigqtbuffer): Ditto.
5735
9f72fee2
MS
5736 * utils.c (decimal2str): Initialize 'width' to nine, then
5737 don't mess with it.
5738
8040bd49
UW
57392011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5740
5741 * hostio.c (require_data): Free *data, not data.
5742
7e52cbd0
JK
57432011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5744
5745 * hostio.c (require_data): Use free, not xfree.
5746
9130f83e
MS
57472011-02-27 Michael Snyder <msnyder@vmware.com>
5748
4b812f4e
MS
5749 * server.c (handle_query): Discard unused value.
5750
9130f83e
MS
5751 * hostio.c (require_data): Free malloc memory before returning
5752 error.
5753
69d37113
MS
57542011-02-26 Michael Snyder <msnyder@vmware.com>
5755
5756 * linux-low.c (list_threads): Call closedir for dirent.
5757
35f5825a
MS
57582011-02-27 Michael Snyder <msnyder@vmware.com>
5759
2a589cef
MS
5760 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5761 a case statement falls through.
5762
0adea5f7
MS
5763 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5764
35f5825a
MS
5765 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5766 in comparison.
5767
238f1c74
MS
57682011-02-26 Michael Snyder <msnyder@vmware.com>
5769
5770 * utils.c (decimal2str): Eliminate dead code and dead param.
5771 (pulongest): Drop dead param from call to decimal2str.
5772 (plongest): Ditto.
5773
633ff500
JB
57742011-02-24 Joel Brobecker <brobecker@adacore.com>
5775
5776 Revert the following patch (not approved yet):
5777 2011-02-21 Hui Zhu <teawater@gmail.com>
5778 * tracepoint.c (tp_printf): New function.
5779 (eval_agent_expr): Handle gdb_agent_op_printf.
5780
f9c6ff72
HZ
57812011-02-21 Hui Zhu <teawater@gmail.com>
5782
5783 * tracepoint.c (tp_printf): New function.
5784 (eval_agent_expr): Handle gdb_agent_op_printf.
5785
94d5e490
TT
57862011-02-18 Tom Tromey <tromey@redhat.com>
5787
5788 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5789 (tracepoint.o): Likewise.
5790 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5791 (gdb_agent_op_names): Likewise.
5792
c7f96d2b
TT
57932011-02-18 Tom Tromey <tromey@redhat.com>
5794
5795 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5796 gdb_agent_op_rot>: New constants.
5797 (gdb_agent_op_names): Add pick and roll.
5798 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5799 cases.
5800
0feedb2c
JK
58012011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5802
5803 * aclocal.m4: Regenerated with aclocal-1.11.1.
5804
b3b9301e
PA
58052011-02-14 Pedro Alves <pedro@codesourcery.com>
5806
5807 * server.c (handle_qxfer_traceframe_info): New.
5808 (qxfer_packets): Register "traceframe-info".
5809 (handle_query): Report support for qXfer:traceframe-info:read+.
5810 * tracepoint.c (match_blocktype): New.
5811 (traceframe_find_block_type): Rename to ...
5812 (traceframe_walk_blocks): ... this. Add callback filter argument,
5813 and use it.
5814 (traceframe_find_block_type): New, reimplemented on top of
5815 traceframe_walk_blocks.
5816 (build_traceframe_info_xml): New.
5817 (traceframe_read_info): New.
5818 * server.h (traceframe_read_info): Declare.
5819
4f3e6fb7
YQ
58202011-02-11 Yao Qi <yao@codesourcery.com>
5821
5822 * configure.ac: Call AC_PROG_RANLIB.
5823 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5824 * configure: Regenerate.
5825
764880b7
PA
58262011-02-07 Pedro Alves <pedro@codesourcery.com>
5827
5828 * server.c (gdb_read_memory): Change return semantics to allow
5829 partial transfers.
5830 (handle_search_memory_1): Adjust.
5831 (process_serial_event) <'m' packet>: Handle partial transfers.
5832 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5833
1c79eb8a
PA
58342011-01-28 Pedro Alves <pedro@codesourcery.com>
5835
5836 * regcache.c (init_register_cache): Initialize
5837 regcache->register_status.
5838 (free_register_cache): Release regcache->register_status.
5839 (regcache_cpy): Copy register_status.
5840 (registers_to_string): Print 'x's for unavailable registers.
5841 (supply_register): Mark the register's status valid or
5842 unavailable, depending on whether a buffer was passed in or not.
5843 (supply_register_zeroed): New.
5844 (supply_regblock): Mark the registers' status valid or
5845 unavailable, depending on whether a buffer was passed in or not.
5846 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5847 (struct regcache): New `register_status' field.
5848 (supply_register_zeroed): Declare.
5849 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5850 supply_register_zeroed, rather than passing a NULL buffer to
5851 supply_register.
5852 * tracepoint.c (fetch_traceframe_registers): Update comment.
5853
85724a0e
PA
58542011-01-28 Pedro Alves <pedro@codesourcery.com>
5855
5856 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5857 buffer explicit.
5858
d08aafef
PA
58592011-01-25 Pedro Alves <pedro@codesourcery.com>
5860
5861 * server.h (decode_xfer_write): Change prototype.
5862 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5863 and don't extract the annex here.
5864 * server.c (decode_xfer_read): Remove `annex' parameter,
5865 and don't extract the annex here.
5866 (decode_xfer): New.
5867 (struct qxfer): New.
5868 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5869 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5870 (handle_qxfer_statictrace): New functions, abstracted out from
5871 handle_query, and made to use the struct qxfer interface.
5872 (handle_threads_qxfer_proper): Rename to ...
5873 (handle_qxfer_threads_proper): ... this.
5874 (handle_threads_qxfer): Rename to ...
5875 (handle_qxfer_threads): ... this. Adjust.
5876 (qxfer_packets): New array.
5877 (handle_qxfer): New function.
5878 (handle_query): Use handle_qxfer.
5879
493e2a69
MS
58802011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5881
5882 * gdbreplay.c: Shorten lines of >= 80 columns.
5883 * linux-low.c: Ditto.
5884 * linux-ppc-low.c: Ditto.
5885 * linux-s390-low.c: Ditto.
5886 * linux-sparc-low.c: Ditto.
5887 * linux-x86-low.c: Ditto.
5888 * linux-xtensa-low.c: Ditto.
5889 * mem-break.c: Ditto.
5890 * nto-low.c: Ditto.
5891 * regcache.h: Ditto.
5892 * remote-utils.c: Ditto.
5893 * server.c: Ditto.
5894 * server.h: Ditto.
5895 * thread-db.c: Ditto.
5896 * tracepoint.c: Ditto.
5897 * utils.c: Ditto.
5898 * win32-low.h: Ditto.
5899
44944448
JB
59002011-01-05 Joel Brobecker <brobecker@adacore.com>
5901
5902 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5903 update.
5904
71ce852c
JB
59052011-01-01 Joel Brobecker <brobecker@adacore.com>
5906
5907 * server.c (gdbserver_version): Update copyright year in version
5908 output.
5909 * gdbreplay.c (gdbreplay_version): Ditto.
5910
eb826dc6
MF
59112010-12-29 Jie Zhang <jie.zhang@analog.com>
5912
5913 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5914 * linux-bfin-low.c: New file.
5915 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5916 PT_DATA_ADDR for BFIN targets.
5917 * Makefile.in (SFILES): Add linux-bfin-low.c.
5918 (clean): Remove reg-bfin.c.
5919 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5920 * README: Mention supported Blackfin targets.
5921
39ab222a
MF
59222010-12-23 Mike Frysinger <vapier@gentoo.org>
5923
5924 * .gitignore: New file.
5925
a1f2ce7d
MF
59262010-11-16 Mike Frysinger <vapier@gentoo.org>
5927
5928 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5929
f474844c
JZ
59302010-10-22 Jie Zhang <jie@codesourcery.com>
5931
5932 * Makefile.in: Add FLAGS_TO_PASS variable.
5933 (install): Remove dependency of install-only and recursively
5934 invoke make for install-only.
5935
f1048712
DE
59362010-10-04 Doug Evans <dje@google.com>
5937
5938 * Makefile.in (uninstall): Use $(DESTDIR).
5939
b53a1623
PA
59402010-09-24 Pedro Alves <pedro@codesourcery.com>
5941
e6ee044d
PA
5942 PR gdb/11842
5943
b53a1623
PA
5944 * linux-x86-low.c (compat_siginfo_from_siginfo)
5945 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5946 si_code is < 0. Check for si_code == SI_TIMER before checking for
5947 si_code < 0.
5948
fa1bd1e4
JB
59492010-09-13 Joel Brobecker <brobecker@adacore.com>
5950
5951 * lynx-i386-low.c: New file.
5952 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5953
47fac8f8
JB
59542010-09-13 Joel Brobecker <brobecker@adacore.com>
5955
5956 * lynx-low.c (ptrace_request_to_str): Remove handling for
5957 request values that have been removed in LynxOS 5.x.
5958
1adfc54d
JB
59592010-09-13 Joel Brobecker <brobecker@adacore.com>
5960
5961 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5962 <ptrace.h>
5963
c2a66c29
NS
59642010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5965
5966 * configure.ac: Add --enable-inprocess-agent option.
5967 * configure: Rebuilt.
5968
32fcada3
YQ
59692010-09-06 Yao Qi <yao@codesourcery.com>
5970
5971 * linux-low.c (linux_kill): Remove unused variable.
5972 (linux_stabilize_threads): Likewise.
5973 * server.c (start_inferior): Likewise.
5974 (queue_stop_reply_callback): Likewise.
5975 * tracepoint.c (do_action_at_tracepoint): Likewise.
5976
0cccb683
YQ
59772010-09-06 Yao Qi <yao@codesourcery.com>
5978
5979 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5980 on return.
5981
423ec54c
JK
59822010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5983
5984 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5985
12ac6819
PA
59862010-09-06 Pedro Alves <pedro@codesourcery.com>
5987
5988 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5989 "$(IPA_DEPFILES)".
5990
8ed54b31
JB
59912010-09-01 Joel Brobecker <brobecker@adacore.com>
5992
5993 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5994 gdbserver/lynx-ppc-low.c: New files.
5995 * Makefile.in (lynx_low_h): New variable.
5996 (lynx-low.o, lynx-ppc-low.o): New rules.
5997 * configure.ac: On LynxOS, link with -lnetinet.
5998 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5999 * configure: regenerate.
6000
bb0116a4
JB
60012010-09-01 Joel Brobecker <brobecker@adacore.com>
6002
6003 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6004 * configure.ac: Add check for vasprintf and vsnprintf.
6005 * configure, config.in: Regenerate.
6006 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6007
a778ab81 60082010-09-01 Joel Brobecker <brobecker@adacore.com>
6009
6010 * gdbreplay.c: Move include of alloca.h up, next to include of
6011 malloc.h.
6012 * server.h: Add include of malloc.h.
6013 * mem-break.c: Remove include of malloc.h.
6014 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6015
8b034a19 60162010-09-01 Joel Brobecker <brobecker@adacore.com>
6017
6018 * Makefile.in (memmem.o): Build with -Wno-error.
6019
60202010-09-01 Joel Brobecker <brobecker@adacore.com>
6021
6022 * utils.c (xsnprintf): Make non-static.
6023 * server.h: Add xsnprintf declaration.
6024 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6025 replace calls to snprintf by calls to xsnprintf throughout.
6026
60272010-09-01 Joel Brobecker <brobecker@adacore.com>
6028
6029 * configure.ac: Add configure check for alloca.
6030 * configure, config.in: Regenerate.
6031 * server.h: Include alloca.h if it exists.
6032 * gdbreplay.c: Include alloca.h if it exists.
6033
1a981360
PA
60342010-08-28 Pedro Alves <pedro@codesourcery.com>
6035
6036 * linux-low.c (__SIGRTMIN): Define if not already defined.
6037 (linux_create_inferior): Check for __ANDROID__ rather than
6038 __SIGRTMIN.
6039 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6040 are already deferred.
6041 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6042 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6043 stopped and already has a pending signal to report.
6044 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6045 a pending signal to report or is moving out of a jump pad.
6046 (linux_init_signals): Check for __ANDROID__ rather than
6047 __SIGRTMIN.
6048
b4d51a55
PA
60492010-08-28 Pedro Alves <pedro@codesourcery.com>
6050
6051 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6052 debug_threads check. Avoid a linear search when not doing debug
6053 output.
6054
ec48365d
PA
60552010-08-27 Pedro Alves <pedro@codesourcery.com>
6056
6057 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6058 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6059 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6060 (process_event): Change local fd's type to gdb_fildes_t.
6061 (create_file_handler): Adjust prototype.
6062 (delete_file_handler): Adjust prototype.
6063 (handle_file_event): Adjust prototype. Use pfildes.
6064 (create_file_event): Adjsut prototype.
6065 * remote-utils.c (remote_desc, listen_desc): Change type to
6066 gdb_fildes_t.
6067 * server.h: New gdb_fildes_t typedef.
6068 [USE_WIN32API]: Include winsock2.h.
6069 (delete_file_handler, add_file_handler): Adjust prototypes.
6070 (pfildes): Declare.
6071 * utils.c (pfildes): New.
6072
854d88f0
PA
60732010-08-27 Pedro Alves <pedro@codesourcery.com>
6074
6075 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6076 * configure: Regenerate.
6077
0146f85b
PA
60782010-08-27 Pedro Alves <pedro@codesourcery.com>
6079
6080 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6081 (linux_done_accessing_memory): ... this.
6082 (linux_target_ops): Adjust.
6083 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6084 * nto-low.c (nto_target_ops): Adjust comment.
6085 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6086 * spu-low.c (spu_target_ops): Adjust comment.
6087 * target.h (target_ops): Rename unprepare_to_access_memory field
6088 to done_accessing_memory.
6089 (unprepare_to_access_memory): Rename to ...
6090 (done_accessing_memory): ... this.
6091
90d74c30
PA
60922010-08-26 Pedro Alves <pedro@codesourcery.com>
6093
6094 * linux-low.c (linux_prepare_to_access_memory): New.
6095 (linux_unprepare_to_access_memory): New.
6096 (linux_target_ops): Install them.
6097 * server.c (read_memory): Rename to ...
6098 (gdb_read_memory): ... this. Use
6099 prepare_to_access_memory/prepare_to_access_memory.
6100 (write_memory): Rename to ...
6101 (gdb_write_memory): ... this. Use
6102 prepare_to_access_memory/prepare_to_access_memory.
6103 (handle_search_memory_1): Adjust.
6104 (process_serial_event): Adjust.
6105 * target.h (struct target_ops): New fields
6106 prepare_to_access_memory and unprepare_to_access_memory.
6107 (prepare_to_access_memory, unprepare_to_access_memory): New.
6108 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6109 prepare_to_access_memory/prepare_to_access_memory.
6110 * nto-low.c (nto_target_ops): Adjust.
6111 * spu-low.c (spu_target_ops): Adjust.
6112 * win32-low.c (win32_target_ops): Adjust.
6113
fd467969
PA
61142010-08-26 Pedro Alves <pedro@codesourcery.com>
6115
6116 * Makefile.in (WARN_CFLAGS): Get it from configure.
6117 (WERROR_CFLAGS): New.
6118 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6119 * configure.ac: Introduce --enable-werror, which adds -Werror to
6120 the compiler command line. Enabled by default. Disable with
6121 --disable-werror. Add -Wdeclaration-after-statement
6122 Wpointer-arith and -Wformat-nonliteral to warning flags.
6123 * configure: Regenerate.
6124
331e2f5f
PA
61252010-08-26 Pedro Alves <pedro@codesourcery.com>
6126
6127 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6128
e581f2b4
PA
61292010-08-26 Pedro Alves <pedro@codesourcery.com>
6130
6131 * gdbreplay.c (remote_error): New.
6132 (gdbchar): New.
6133 (expect): Use gdbchar. Check for error reading from GDB.
6134 Clarify sync error output.
6135 (play): Check for errors writing to GDB.
6136 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6137 * remote-utils.c (getpkt): Check for errors writing to the remote
6138 descriptor.
6139
3c11dd79
PA
61402010-08-25 Pedro Alves <pedro@codesourcery.com>
6141
6142 * linux-low.c (linux_wait_1): Move non-debugging code out of
6143 `debug_threads' control.
6144
d20a8ad9
PA
61452010-08-25 Pedro Alves <pedro@codesourcery.com>
6146
6147 * linux-low.c (linux_wait_1): Don't set last_status here.
6148 * server.c (push_event, queue_stop_reply_callback): Assert we're
6149 not pushing a TARGET_WAITKIND_IGNORE event.
6150 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6151 (myresume, handle_target_event): Set the thread's last_resume_kind
6152 and last_status from the target returned status.
6153
964e4306
PA
61542010-08-25 Pedro Alves <pedro@codesourcery.com>
6155
6156 PR threads/10729
6157
6158 * linux-x86-low.c (update_debug_registers_callback): New.
6159 (i386_dr_low_set_addr): Use it.
6160 (i386_dr_low_get_addr): New.
6161 (i386_dr_low_set_control): Use update_debug_registers_callback.
6162 (i386_dr_low_get_control): New.
6163 (i386_dr_low_get_status): Adjust.
6164 * linux-low.c (linux_stop_lwp): New.
6165 * linux-low.h (linux_stop_lwp): Declare.
6166
6167 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6168 argument instead of a i386_debug_reg_state.
6169 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6170 a i386_debug_reg_state.
6171 (i386_insert_aligned_watchpoint): Adjust.
6172 (i386_remove_aligned_watchpoint): Adjust.
6173 (i386_low_stopped_data_address): Read the debug registers from the
6174 inferior instead of from the mirrors.
6175 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6176 (i386_dr_low_get_addr): Declare.
6177 (i386_dr_low_get_control): Declare.
6178 (i386_dr_low_get_status): Change prototype.
6179
6180 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6181 (i386_dr_low_get_addr): New.
6182 (i386_dr_low_get_control): New.
6183 (i386_dr_low_get_status): Adjust prototype. Return
6184 dr_status_mirror.
6185 (i386_initial_stuff): Clear dr_status_mirror and
6186 dr_control_mirror.
6187 (i386_get_thread_context): Adjust.
6188 (i386_set_thread_context): Adjust.
6189 (i386_thread_added): Adjust.
6190
5f21a75b
PA
61912010-08-24 Pedro Alves <pedro@codesourcery.com>
6192
6193 * linux-low.h (linux_thread_area): Delete declaration.
6194
3e4c1235
TS
61952010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6196
6197 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6198 after its termination.
6199
1971b033
PA
62002010-08-09 Pedro Alves <pedro@codesourcery.com>
6201
6202 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6203 (gdb_wants_all_stopped): Delete.
6204 (linux_wait_1): Don't call them.
6205 * server.c (handle_v_cont): Tag all threads as want-stopped.
6206 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6207 stopped as "client-wants-stopped".
6208
310444ac
PA
62092010-07-31 Pedro Alves <pedro@codesourcery.com>
6210
6211 * Makefile.in (signals_h): New.
6212 (server_h): Depend on it.
6213 (server.o): Don't depend on $(signals_def).
6214 (signals.o): Depend on $(signals_def).
6215
a19cae16
JK
62162010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6217
6218 * Makefile.in (signals_def): New.
6219 (server_h): Append include/gdb/signals.h and signals_def.
6220 (server.o): Append signals_def.
6221
30d50328
JK
62222010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6223
6224 * server.c (handle_target_event): Use target_signal_to_host for
6225 resume_info.sig initialization.
6226 * target.h (struct thread_resume) <sig>: New comment.
6227
5c3216e2
OS
62282010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6229
c6f46ca0
OS
6230 * server.c (handle_query): strcpy() the returned string from paddress()
6231 instead of sprintf().
5c3216e2
OS
6232 * utils.c (paddress): Return phex_nz().
6233
6bd31874
JB
62342010-07-07 Joel Brobecker <brobecker@adacore.com>
6235
6236 * server.c (handle_v_cont): Call mourn_inferior if process
6237 just exited.
6238 (myresume): Likewise.
6239
0fb4aa4b
PA
62402010-07-01 Pedro Alves <pedro@codesourcery.com>
6241
6242 Static tracepoints, and integration with UST.
6243
6244 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6245 * mem-break.c (uninsert_all_breakpoints)
6246 (reinsert_all_breakpoints): New.
6247 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6248 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6249 (gdb_agent_ust_loaded, helper_thread_id)
6250 (gdb_agent_helper_thread_id): New macros.
6251 (struct ipa_sym_addresses): Add addr_ust_loaded,
6252 addr_helper_thread_id, addr_cmd_buf.
6253 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6254 (in_process_agent_loaded_ust): New.
6255 (write_e_ust_not_loaded): New.
6256 (maybe_write_ipa_ust_not_loaded): New.
6257 (struct collect_static_trace_data_action): New.
6258 (enum tracepoint_type) <static_tracepoint>: New.
6259 (struct tracepoint) <handle>: Mention static tracepoints.
6260 (struct static_tracepoint_ctx): New.
6261 (CMD_BUF_SIZE): New.
6262 (add_tracepoint_action): Handle static tracepoint actions.
6263 (unprobe_marker_at): New.
6264 (clear_installed_tracepoints): Handle static tracepoints.
6265 (cmd_qtdp): Handle static tracepoints.
6266 (probe_marker_at): New.
6267 (cmd_qtstart): Handle static tracepoints.
6268 (response_tracepoint): Handle static tracepoints.
6269 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6270 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6271 (get_context_regcache): Handle static tracepoints.
6272 (do_action_at_tracepoint): Handle static tracepoint actions.
6273 (traceframe_find_block_type): Handle static trace data blocks.
6274 (traceframe_read_sdata): New.
6275 (download_tracepoints): Download static tracepoint actions.
6276 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6277 (GDB_PROBE_NAME): New.
6278 (ust_ops): New.
6279 (GET_UST_SYM): New.
6280 (USTF): New.
6281 (dlsym_ust): New.
6282 (ust_marker_to_static_tracepoint): New.
6283 (gdb_probe): New.
6284 (collect_ust_data_at_tracepoint): New.
6285 (gdb_ust_probe): New.
6286 (UNIX_PATH_MAX, SOCK_DIR): New.
6287 (gdb_ust_connect_sync_socket): New.
6288 (resume_thread, stop_thread): New.
6289 (run_inferior_command): New.
6290 (init_named_socket): New.
6291 (gdb_ust_socket_init): New.
6292 (cstr_to_hexstr): New.
6293 (next_st): New.
6294 (first_marker, next_marker): New.
6295 (response_ust_marker): New.
6296 (cmd_qtfstm, cmd_qtsstm): New.
6297 (unprobe_marker_at, probe_marker_at): New.
6298 (cmd_qtstmat, gdb_ust_thread): New.
6299 (gdb_ust_init): New.
6300 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6301 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6302 (ST_REGENTRY): New.
6303 (x86_64_st_collect_regmap): New.
6304 (X86_64_NUM_ST_COLLECT_GREGS): New.
6305 (AMD64_RIP_REGNUM): New.
6306 (supply_static_tracepoint_registers): New.
6307 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6308 (ST_REGENTRY): New.
6309 (i386_st_collect_regmap): New.
6310 (i386_NUM_ST_COLLECT_GREGS): New.
6311 (supply_static_tracepoint_registers): New.
6312 * server.c (handle_query): Handle qXfer:statictrace:read.
6313 <qSupported>: Report support for StaticTracepoints, and
6314 qXfer:statictrace:read features.
6315 * server.h (traceframe_read_sdata)
6316 (supply_static_tracepoint_registers): Declare.
6317 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6318 (unpack_varlen_hex): Include in IPA build.
6319 * Makefile.in (ustlibs, ustinc): New.
6320 (IPA_OBJS): Add remote-utils-ipa.o.
6321 ($(IPA_LIB)): Link -ldl and -lpthread.
6322 (UST_CFLAGS): New.
6323 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6324 * config.in, configure: Regenerate.
6325
9e4344e5
PA
63262010-06-20 Ian Lance Taylor <iant@google.com>
6327 Pedro Alves <pedro@codesourcery.com>
6328
6329 * linux-x86-low.c (always_true): Delete.
6330 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6331 trying to fool the compiler with always_true.
6332
c6beb2cb
PA
63332010-06-20 Pedro Alves <pedro@codesourcery.com>
6334
6335 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6336 conditions in gdbserver.
6337
d2ed6730
UW
63382010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6339
6340 * spu-low.c (spu_read_memory): Wrap around local store limit.
6341 (spu_write_memory): Likewise.
6342
4e29fb54
PA
63432010-06-15 Pedro Alves <pedro@codesourcery.com>
6344
6345 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6346 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6347 LONGEST uses.
6348 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6349 uses.
6350 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6351 uses with LONGEST uses.
6352
6a271cae
PA
63532010-06-14 Stan Shebs <stan@codesourcery.com>
6354 Pedro Alves <pedro@codesourcery.com>
6355
6356 Bytecode compiler.
6357
6358 * linux-x86-low.c: Include limits.h.
6359 (add_insns): New.
6360 (always_true): New.
6361 (EMIT_ASM): New.
6362 (EMIT_ASM32): New.
6363 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6364 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6365 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6366 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6367 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6368 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6369 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6370 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6371 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6372 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6373 (amd64_emit_void_call_2): New.
6374 (amd64_emit_ops): New.
6375 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6376 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6377 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6378 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6379 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6380 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6381 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6382 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6383 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6384 (i386_emit_stack_adjust, i386_emit_int_call_1)
6385 (i386_emit_void_call_2): New.
6386 (i386_emit_ops): New.
6387 (x86_emit_ops): New.
6388 (the_low_target): Install x86_emit_ops.
6389 * server.h (struct emit_ops): New.
6390 (get_raw_reg_func_addr): Declare.
6391 (current_insn_ptr, emit_error): Declare.
6392 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6393 (set_trace_state_variable_value): New defines.
6394 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6395 addr_get_trace_state_variable_value and
6396 addr_set_trace_state_variable_value.
6397 (symbol_list): New fields for get_raw_reg,
6398 get_trace_state_variable_value and set_trace_state_variable_value.
6399 (condfn): New typedef.
6400 (struct tracepoint): New field `compiled_cond'.
6401 (do_action_at_tracepoint): Clear compiled_cond.
6402 (get_trace_state_variable_value, set_trace_state_variable_value):
6403 Export in the IPA.
6404 (condition_true_at_tracepoint): If there's a compiled condition,
6405 run that.
6406 (current_insn_ptr, emit_error): New globals.
6407 (struct bytecode_address): New.
6408 (get_raw_reg_func_addr): New.
6409 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6410 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6411 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6412 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6413 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6414 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6415 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6416 (compile_tracepoint_condition, compile_bytecodes): New.
6417 * target.h (emit_ops): Forward declare.
6418 (struct target_ops): New field emit_ops.
6419 (target_emit_ops): New.
6420 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6421 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6422 * linux-low.c (linux_emit_ops): New.
6423 (linux_target_ops): Install it.
6424 * linux-low.h (struct linux_target_ops): New field emit_ops.
6425
92b72907
UW
64262010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6427
6428 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6429 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6430
fa593d66
PA
64312010-06-01 Pedro Alves <pedro@codesourcery.com>
6432 Stan Shebs <stan@codesourcery.com>
6433
6434 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6435 (all): Depend on $(extra_libraries).
6436 (install-only): Install the IPA.
6437 (IPA_OBJS, IPA_LIB): New.
6438 (clean): Remove the IPA lib.
6439 (IPAGENT_CFLAGS): New.
6440 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6441 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6442 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6443 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6444 * configure.ac: Check for atomic builtins support in the compiler.
6445 (IPA_DEPFILES, extra_libraries): Define.
6446 * configure.srv (ipa_obj): Add description.
6447 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6448 (i[34567]86-*-linux*): Set ipa_obj.
6449 (x86_64-*-linux*): Set ipa_obj.
6450 * linux-low.c (stabilizing_threads): New.
6451 (supports_fast_tracepoints): New.
6452 (linux_detach): Stabilize threads before detaching.
6453 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6454 the lwp is either not stabilizing, or is moving out of a jump pad.
6455 (linux_fast_tracepoint_collecting): New.
6456 (maybe_move_out_of_jump_pad): New.
6457 (enqueue_one_deferred_signal): New.
6458 (dequeue_one_deferred_signal): New.
6459 (linux_wait_for_event_1): If moving out of a jump pad, defer
6460 pending signals to later.
6461 (linux_stabilize_threads): New.
6462 (linux_wait_1): Check if threads need moving out of jump pads, and
6463 do it if so.
6464 (stuck_in_jump_pad_callback): New.
6465 (move_out_of_jump_pad_callback): New.
6466 (lwp_running): New.
6467 (linux_resume_one_lwp): Handle moving out of jump pads.
6468 (linux_set_resume_request): Dequeue deferred signals.
6469 (need_step_over_p): Also step over fast tracepoint jumps.
6470 (start_step_over): Also uninsert fast tracepoint jumps.
6471 (finish_step_over): Also reinsert fast tracepoint jumps.
6472 (linux_install_fast_tracepoint_jump): New.
6473 (linux_target_ops): Install linux_stabilize_threads and
6474 linux_install_fast_tracepoint_jump_pad.
6475 * linux-low.h (linux_target_ops) <get_thread_area,
6476 install_fast_tracepoint_jump_pad>: New fields.
6477 (struct lwp_info) <collecting_fast_tracepoint,
6478 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6479 (linux_get_thread_area): Declare.
6480 * linux-x86-low.c (jump_insn): New.
6481 (x86_get_thread_area): New.
6482 (append_insns): New.
6483 (push_opcode): New.
6484 (amd64_install_fast_tracepoint_jump_pad): New.
6485 (i386_install_fast_tracepoint_jump_pad): New.
6486 (x86_install_fast_tracepoint_jump_pad): New.
6487 (the_low_target): Install x86_get_thread_area and
6488 x86_install_fast_tracepoint_jump_pad.
6489 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6490 (struct fast_tracepoint_jump): New.
6491 (fast_tracepoint_jump_insn): New.
6492 (fast_tracepoint_jump_shadow): New.
6493 (find_fast_tracepoint_jump_at): New.
6494 (fast_tracepoint_jump_here): New.
6495 (delete_fast_tracepoint_jump): New.
6496 (set_fast_tracepoint_jump): New.
6497 (uninsert_fast_tracepoint_jumps_at): New.
6498 (reinsert_fast_tracepoint_jumps_at): New.
6499 (set_breakpoint_at): Use write_inferior_memory.
6500 (uninsert_raw_breakpoint): Use write_inferior_memory.
6501 (check_mem_read): Mask out fast tracepoint jumps.
6502 (check_mem_write): Mask out fast tracepoint jumps.
6503 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6504 (set_fast_tracepoint_jump): Declare.
6505 (delete_fast_tracepoint_jump)
6506 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6507 (reinsert_fast_tracepoint_jumps_at): Declare.
6508 * regcache.c: Don't compile many functions when building the
6509 in-process agent library.
6510 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6511 the register buffer in the heap.
6512 (free_register_cache): If the register buffer isn't owned by the
6513 regcache, don't free it.
6514 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6515 pre-existing register caches.
6516 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6517 type.
6518 (convert_ascii_to_int): : Constify `from' parameter type.
6519 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6520 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6521 the needed buffer in-place.
6522 (relocate_instruction): New.
6523 * server.c (handle_query) <qSymbols>: If the target supports
6524 tracepoints, give it a chance of looking up symbols. Report
6525 support for fast tracepoints.
6526 (handle_status): Stabilize threads.
6527 (process_serial_event): Adjust.
6528 * server.h (struct fast_tracepoint_jump): Forward declare.
6529 (struct process_info) <fast_tracepoint_jumps>: New field.
6530 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6531 (decode_X_packet, decode_M_packet): Adjust.
6532 (relocate_instruction): Declare.
6533 (in_process_agent_loaded): Declare.
6534 (tracepoint_look_up_symbols): Declare.
6535 (struct fast_tpoint_collect_status): Declare.
6536 (fast_tracepoint_collecting): Declare.
6537 (force_unlock_trace_buffer): Declare.
6538 (handle_tracepoint_bkpts): Declare.
6539 (initialize_low_tracepoint)
6540 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6541 * target.h (struct target_ops) <stabilize_threads,
6542 install_fast_tracepoint_jump_pad>: New fields.
6543 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6544 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6545 [HAVE_STDINT_H]: Include stdint.h.
6546 (trace_debug_1): Rename to ...
6547 (trace_vdebug): ... this.
6548 (trace_debug): Rename to ...
6549 (trace_debug_1): ... this. Add `level' parameter.
6550 (trace_debug): New.
6551 (ATTR_USED, ATTR_NOINLINE): New.
6552 (IP_AGENT_EXPORT): New.
6553 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6554 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6555 (about_to_request_buffer_space, trace_buffer_is_full)
6556 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6557 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6558 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6559 (traceframe_write_count, traceframes_created)
6560 (trace_state_variables)
6561 New renaming defines.
6562 (struct ipa_sym_addresses): New.
6563 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6564 (symbol_list): New.
6565 (ipa_sym_addrs): New.
6566 (all_tracepoint_symbols_looked_up): New.
6567 (in_process_agent_loaded): New.
6568 (write_e_ipa_not_loaded): New.
6569 (maybe_write_ipa_not_loaded): New.
6570 (tracepoint_look_up_symbols): New.
6571 (debug_threads) [IN_PROCESS_AGENT]: New.
6572 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6573 (UNKNOWN_SIDE_EFFECTS): New.
6574 (stop_tracing): New.
6575 (flush_trace_buffer): New.
6576 (stop_tracing_bkpt): New.
6577 (flush_trace_buffer_bkpt): New.
6578 (read_inferior_integer): New.
6579 (read_inferior_uinteger): New.
6580 (read_inferior_data_pointer): New.
6581 (write_inferior_data_pointer): New.
6582 (write_inferior_integer): New.
6583 (write_inferior_uinteger): New.
6584 (struct collect_static_trace_data_action): Delete.
6585 (enum tracepoint_type): New.
6586 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6587 <actions_str, step_actions, step_actions_str>: Only include in
6588 GDBserver.
fa593d66
PA
6589 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6590 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6591 (tracepoints): Use IP_AGENT_EXPORT.
6592 (last_tracepoint): Don't include in the IPA.
6593 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6594 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6595 (alloced_trace_state_variables): New.
6596 (trace_state_variables): Use IP_AGENT_EXPORT.
6597 (traceframe_t): Delete unused variable.
6598 (circular_trace_buffer): Don't include in the IPA.
6599 (trace_buffer_start): Delete.
6600 (struct trace_buffer_control): New.
6601 (trace_buffer_free): Delete.
6602 (struct ipa_trace_buffer_control): New.
6603 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6604 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6605 New.
6606 (trace_buffer_ctrl): New.
6607 (TRACE_BUFFER_CTRL_CURR): New.
6608 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6609 Reimplement as macros.
6610 (trace_buffer_wrap): Delete.
6611 (traceframe_write_count, traceframe_read_count)
6612 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6613 (struct tracepoint_hit_ctx) <type>: New field.
6614 (struct fast_tracepoint_ctx): New.
6615 (memory_barrier): New.
6616 (cmpxchg): New.
6617 (record_tracepoint_error): Update atomically in the IPA.
6618 (clear_inferior_trace_buffer): New.
6619 (about_to_request_buffer_space): New.
6620 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6621 updating the same buffer.
6622 (add_tracepoint): Default the tracepoint's type to trap
6623 tracepoint, and orig_size to -1.
6624 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6625 internal variables.
6626 (create_trace_state_variable): New parameter `gdb'. Handle it.
6627 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6628 (cmd_qtdp): Handle fast tracepoints.
6629 (cmd_qtdv): Adjust.
6630 (max_jump_pad_size): New.
6631 (gdb_jump_pad_head): New.
6632 (get_jump_space_head): New.
6633 (claim_jump_space): New.
6634 (sort_tracepoints): New.
6635 (MAX_JUMP_SIZE): New.
6636 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6637 IPA.
6638 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6639 support. Upload fast traceframes, and delete internal IPA
6640 breakpoints.
6641 (stop_tracing_handler): New.
6642 (flush_trace_buffer_handler): New.
6643 (cmd_qtstop): Upload fast tracepoints.
6644 (response_tracepoint): Handle fast tracepoints.
6645 (tracepoint_finished_step): Upload fast traceframes. Set the
6646 tracepoint hit context's tracepoint type.
6647 (handle_tracepoint_bkpts): New.
6648 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6649 type. Add comment about fast tracepoints.
6650 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6651 non-existing action_str field.
6652 (get_context_regcache): Handle fast tracepoints.
6653 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6654 to the regcache.
6655 (fast_tracepoint_from_jump_pad_address): New.
6656 (fast_tracepoint_from_ipa_tpoint_address): New.
6657 (collecting_t): New.
6658 (force_unlock_trace_buffer): New.
6659 (fast_tracepoint_collecting): New.
6660 (collecting): New.
6661 (gdb_collect): New.
6662 (write_inferior_data_ptr): New.
6663 (target_tp_heap): New.
6664 (target_malloc): New.
6665 (download_agent_expr): New.
6666 (UALIGN): New.
6667 (download_tracepoints): New.
6668 (download_trace_state_variables): New.
6669 (upload_fast_traceframes): New.
6670 (IPA_FIRST_TRACEFRAME): New.
6671 (IPA_NEXT_TRACEFRAME_1): New.
6672 (IPA_NEXT_TRACEFRAME): New.
6673 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6674 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6675 (gdb_jump_pad_buffer_end): New.
6676 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6677 (initialize_tracepoint): Adjust.
6678 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6679 buffer. Initialize the low module.
6680 * utils.c (PREFIX, TOOLNAME): New.
6681 (malloc_failure): Use PREFIX.
6682 (error): In the IPA, an error causes an exit.
6683 (fatal, warning): Use PREFIX.
6684 (internal_error): Use TOOLNAME.
6685 (NUMCELLS): Increase to 10.
6686 * configure, config.in: Regenerate.
6687
d149dd1d
PA
66882010-06-01 Pedro Alves <pedro@codesourcery.com>
6689
6690 * server.c (handle_query) <qSupported>: Do two passes over the
6691 qSupported string to avoid nesting strtok.
6692
f6528abd
JK
66932010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6694
6695 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6696 (CDEPS): New.
6697 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6698 -Wl,--dynamic-list.
6699 * configure: Regenerate.
6700 * proc-service.list: New.
6701
ca2a87a0
JK
67022010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6703
6704 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6705 New comment.
6706
363a6e9f
OS
67072010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6708
6709 * gdbreplay.c (remote_open): Check error return from socket() call by
6710 its equality to -1 not by it being negative.
6711 * remote-utils.c (remote_open): Likewise.
6712
d23b6cb1
PA
67132010-05-23 Pedro Alves <pedro@codesourcery.com>
6714
6715 * config.h: Regenerate.
6716
28d3cf85
MK
67172010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6718
6719 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6720 doesn't provide PTRACE_GET_THREAD_AREA.
6721
fea36a59
MK
67222010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6723
6724 * linux-m68k-low.c: Include <asm/ptrace.h>
6725 (ps_get_thread_area): Implement.
6726
24b066ba
DE
67272010-05-03 Doug Evans <dje@google.com>
6728
6729 * event-loop.c (struct callback_event): New struct.
6730 (callback_list): New global.
6731 (append_callback_event, delete_callback_event): New functions.
6732 (process_callback): New function.
6733 (start_event_loop): Call it.
6734 * remote-utils.c (NOT_SCHEDULED): Define.
6735 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6736 moved out of readchar.
6737 (readchar): Rewrite. Call reschedule before returning.
6738 (reset_readchar): New function.
6739 (remote_close): Call it.
6740 (process_remaining, reschedule): New functions.
6741 * server.h (callback_handler_func): New typedef.
6742 (append_callback_event, delete_callback_event): Declare.
6743
9836d6ea
PA
67442010-05-03 Pedro Alves <pedro@codesourcery.com>
6745
6746 * proc-service.c (ps_pglobal_lookup): Use
6747 thread_db_look_up_one_symbol.
6748 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6749 parameter. Use it instead of all_symbols_looked_up.
6750 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6751 field.
6752 (all_symbols_looked_up): Don't declare.
6753 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6754 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6755 field.
6756 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6757 Set all_symbols_looked_up here.
6758 (thread_db_look_up_one_symbol): New.
6759 (thread_db_get_tls_address): Adjust.
6760 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6761 thread_db object on the heap, and tentatively set it in the
6762 process structure.
6763 (thread_db_init): Don't set all_symbols_looked_up here.
6764 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6765
7984d532
PA
67662010-05-03 Pedro Alves <pedro@codesourcery.com>
6767
6768 * linux-low.c (linux_kill, linux_detach): Adjust.
6769 (status_pending_p_callback): Remove redundant statement. Check
6770 for !TARGET_WAITIKIND_IGNORE, instead of
6771 TARGET_WAITKIND_STOPPED.
6772 (handle_tracepoints): Make sure LWP is locked. Adjust.
6773 (linux_wait_for_event_1): Adjust.
6774 (linux_cancel_breakpoints): New.
6775 (unsuspend_one_lwp): New.
6776 (unsuspend_all_lwps): New.
6777 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6778 (send_sigstop_callback): Change return type to int, add new
6779 `except' parameter and handle it.
6780 (suspend_and_send_sigstop_callback): New.
6781 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6782 pass them down. If SUSPEND, also increment the lwp's suspend
6783 count.
6784 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6785 (need_step_over_p): Don't consider suspended LWPs.
6786 (start_step_over): Adjust.
6787 (proceed_one_lwp): Change return type to int, add new `except'
6788 parameter and handle it.
6789 (unsuspend_and_proceed_one_lwp): New.
6790 (proceed_all_lwps): Use find_inferior instead of
6791 for_each_inferior.
6792 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6793 also decrement the suspend count of LWPs. Pass `except' down,
6794 instead of hacking its suspend count.
6795 (linux_pause_all): Add `freeze' parameter. Adjust.
6796 (linux_unpause_all): New.
6797 (linux_target_ops): Install linux_unpause_all.
6798 * server.c (handle_status): Adjust.
6799 * target.h (struct target_ops): New fields `unpause_all' and
6800 `cancel_breakpoints'. Add new parameter to `pause_all'.
6801 (pause_all): Add new `freeze' parameter.
6802 (unpause_all): New.
6803 (cancel_breakpoints): New.
6804 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6805 cancel breakpoints.
6806 (cmd_qtstart): Pause threads.
6807 (stop_tracing): Pause threads, and cancel breakpoints.
6808 * win32-low.c (win32_target_ops): Adjust.
6809
e471f25b
PA
68102010-05-03 Pedro Alves <pedro@codesourcery.com>
6811
6812 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6813 the inferior right away from here...
6814 (linux_wait_1): ... to here, and adjust to check the thread's
6815 last_resume_kind instead of the lwp's step or stop_expected flags.
6816
1915ef4f
PA
68172010-05-02 Pedro Alves <pedro@codesourcery.com>
6818
6819 * README: Use consistent `GDB' and `GDBserver' spellings.
6820
f9e39928
PA
68212010-05-02 Pedro Alves <pedro@codesourcery.com>
6822
6823 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6824 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6825 (linux_detach_one_lwp): Assume the lwp is stopped.
6826 (any_thread_of): Delete.
6827 (linux_detach): Stop all lwps here. Don't blindly delete all
6828 breakpoints.
6829 (delete_lwp_callback): New.
6830 (linux_mourn): Delete all lwps of the process that is gone.
6831 (linux_wait_1): Don't delete the last lwp of the process here.
6832 * mem-break.h (mark_breakpoints_out): Declare.
6833 * mem-break.c (mark_breakpoints_out): New.
6834 (free_all_breakpoints): Use it.
6835 * server.c (handle_target_event): If the process is gone, mark
6836 breakpoints out.
6837 * thread-db.c (struct thread_db) <create_bp>: New field.
6838 (thread_db_enable_reporting): Fix prototype. Store a thread event
6839 breakpoint reference in the thread_db struct.
6840 (thread_db_load_search): Clear the thread_db object.
6841 (try_thread_db_load_1): Ditto.
6842 (switch_to_process): New.
6843 (disable_thread_event_reporting): Use it.
6844 (remove_thread_event_breakpoints): New.
6845 (thread_db_detach, thread_db_mourn): Use it.
6846
1e7fc18c
PA
68472010-05-01 Pedro Alves <pedro@codesourcery.com>
6848
6849 * linux-low.c (linux_enable_event_reporting): New.
6850 (linux_wait_for_event_1, handle_extended_wait): Use it.
6851
02fc4de7
PA
68522010-04-30 Pedro Alves <pedro@codesourcery.com>
6853
6854 * linux-low.c (linux_kill_one_lwp, linux_kill)
6855 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6856 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6857 SIGSTOP even if the LWP is stopped.
6858 (send_sigstop_callback): New.
6859 (stop_all_lwps): Use send_sigstop_callback instead.
6860 (linux_resume_one_thread): Adjust.
6861 (proceed_one_lwp): Still proceed an LWP that the client has
6862 requested to stop, if we haven't reported it as stopped yet. Make
6863 sure that LWPs the client want stopped, have a pending SIGSTOP.
6864
bc3b5632
DE
68652010-04-26 Doug Evans <dje@google.com>
6866
ae1ada35
DE
6867 * server.c (handle_general_set): Make static.
6868
bc3b5632
DE
6869 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6870 Print received char after testing for error/eof instead of before.
6871 (input_interrupt): Tweak comment.
6872
65730243
DE
68732010-04-23 Doug Evans <dje@google.com>
6874
6875 * server.c (start_inferior): Print inferior argv if --debug.
6876
a8ae7dc0
AR
68772010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6878
6879 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6880 * nto-x86-low.c: Include server.h
6881
1c07cc19
PM
68822010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6883
6884 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6885 be consistent with other sources of this directory.
6886 (init_registers_amd64): Correct name of source file of this function
6887 in the comment.
6888
e0a61e09
PM
68892010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6890
6891 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6892 64-bit executables.
6893
54709339
PM
68942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6895
6896 * win32-i386-low.c: Add 64-bit support.
6897 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6898 (init_registers_amd64): Declare.
6899 (mappings): Add 64-bit version of array.
6900 (init_windows_x86): New function.
6901 (the_low_target): Change init_arch field to init_windows_x86.
6902
e8f0053d
PM
69032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6904
6905 * win32-low.c: Adapt to support also 64-bit architecture.
6906 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6907 (get_image_name): Use SIZE_T type for local variable `done'.
6908 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6909 (toolhelp_get_dll_name): Idem.
6910 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6911 Use uintptr_t typecast to avoid warning.
6912 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6913 (handle_exception): Use phex_nz to avoid warning.
6914 (win32_wait): Remove unused local variable `process'.
6915
c481e77e
PM
69162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6917
6918 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6919 `amd64-avx.o'.
6920
12ea4b69
PM
69212010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6922
6923 * configure.ac: Use `ws2_32' library for srv_mingw.
6924 * configure: Regenerate.
6925 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6926 * remote-utils.c: Likewise.
6927
f6d1620c
L
69282010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6929
6930 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6931 if __x86_64__ is defined.
6932
8e642873
PM
69332010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6934
6935 * configure: Regenerate.
6936
711e434b
PM
69372010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6938
6939 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6940 * target.h (target_ops): New get_tib_address field.
6941 * win32-low.h (win32_thread_info): Add thread_local_base field.
6942 * win32-low.c (child_add_thread): Add tlb argument.
6943 Set thread_local_base field to TLB.
6944 (get_child_debug_event): Adapt to child_add_thread change.
6945 (win32_get_tib_address): New function.
6946 (win32_target_ops): Set get_tib_address field to
6947 win32_get_tib_address.
6948 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6949
505106cd
PA
69502010-04-12 Pedro Alves <pedro@codesourcery.com>
6951
505106cd
PA
6952 * linux-low.c (linux_mourn): Also remove the process.
6953 * server.c (handle_target_event): Don't remove the process here.
6954 * nto-low.c (nto_mourn): New.
6955 (nto_target_ops): Install it.
6956 * spu-low.c (spu_mourn): New.
6957 (spu_target_ops): Install it.
6958 * win32-low.c (win32_mourn): New.
6959 (win32_target_ops): Install it.
6960
e8470a06
PA
69612010-04-12 Pedro Alves <pedro@codesourcery.com>
6962
6963 * server.h (buffer_xml_printf): Remove redundant `;'.
6964
45ba0d02
PA
69652010-04-12 Pedro Alves <pedro@codesourcery.com>
6966
6967 * regcache.c (set_register_cache): Invalidate regcaches before
6968 changing the register cache layout.
6969 (regcache_invalidate_one): Allow a NULL regcache.
6970 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6971 regcaches before changing the register cache layout or the target
6972 regsets.
6973
59e04013
L
69742010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6975
6976 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6977 variable warning on Linux/x86-64.
6978
8336d594
PA
69792010-04-11 Pedro Alves <pedro@codesourcery.com>
6980
6981 GDBserver disconnected tracing support.
6982
6983 * linux-low.c (linux_remove_process): Delete.
6984 (add_lwp): Don't set last_resume_kind here.
6985 (linux_kill): Use `mourn'.
6986 (linux_detach): Use `thread_db_detach', and `mourn'.
6987 (linux_mourn): New.
6988 (linux_attach_lwp_1): Adjust comment.
6989 (linux_attach): last_resume_kind moved the thread_info; adjust.
6990 (status_pending_p_callback): Adjust.
6991 (linux_wait_for_event_1): Adjust.
6992 (count_events_callback, select_singlestep_lwp_callback)
6993 (select_event_lwp_callback, cancel_breakpoints_callback)
6994 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6995 (proceed_one_lwp): Adjust.
6996 (linux_async): Add debug output.
6997 (linux_thread_stopped): New.
6998 (linux_pause_all): New.
6999 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7000 linux_pause_all.
7001 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7002 (thread_db_free): Delete declaration.
7003 (thread_db_detach, thread_db_mourn): Declare.
7004 * thread-db.c (thread_db_init): Use thread_db_mourn.
7005 (thread_db_free): Delete, split in two.
7006 (disable_thread_event_reporting): New.
7007 (thread_db_detach): New.
7008 (thread_db_mourn): New.
7009
7010 * server.h (struct thread_info) <last_resume_kind>: New field.
7011 <attached>: Add comment.
7012 <gdb_detached>: New field.
7013 (handler_func): Change return type to int.
7014 (handle_serial_event, handle_target_event): Ditto.
7015 (gdb_connected): Declare.
7016 (tracing): Delete.
7017 (disconnected_tracing): Declare.
7018 (stop_tracing): Declare.
7019
7020 * server.c (handle_query) <qSupported>: Report support for
7021 disconnected tracing.
7022 (queue_stop_reply_callback): Account for running threads.
7023 (gdb_wants_thread_stopped): New.
7024 (gdb_wants_all_threads_stopped): New.
7025 (gdb_reattached_process): New.
7026 (handle_status): Clear the `gdb_detached' flag of all processes.
7027 In all-stop, stop all threads.
7028 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7029 (process_serial_event): If the remote connection breaks, or if an
7030 exit was forced with "monitor exit", force an event loop exit.
7031 Handle disconnected tracing on detach.
7032 (handle_serial_event): Adjust.
7033 (handle_target_event): If GDB isn't connected, forward events back
7034 to the inferior, unless the last process exited, in which case,
7035 exit gdbserver. Adjust interface.
7036
7037 * remote-utils.c (remote_open): Don't block in accept. Instead
7038 register an event loop source on the listen socket file
7039 descriptor. Refactor bits into ...
7040 (listen_desc): ... this new global.
7041 (gdb_connected): ... this new function.
7042 (enable_async_notification): ... this new function.
7043 (handle_accept_event): ... this new function.
7044 (remote_close): Clear remote_desc.
7045
7046 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7047
7048 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7049 New fields.
7050 (mourn_inferior): Define.
7051 (target_process_qsupported): Avoid the dangling else problem.
7052 (thread_stopped): Define.
7053 (pause_all): Define.
7054 (target_waitstatus_to_string): Declare.
7055 * target.c (target_waitstatus_to_string): New.
7056
7057 * tracepoint.c (tracing): Make extern.
7058 (disconnected_tracing): New.
7059 (stop_tracing): Make extern. Handle tracing stops due to GDB
7060 disconnecting.
7061 (cmd_qtdisconnected): New.
7062 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7063 (handle_tracepoint_general_set): Handle QTDisconnected.
7064
7065 * event-loop.c (event_handler_func): Change return type to int.
7066 (process_event): Bail out if the event handler wants the event
7067 loop to stop.
7068 (handle_file_event): Ditto.
7069 (start_event_loop): Bail out if the event handler wants the event
7070 loop to stop.
7071
7072 * nto-low.c (nto_target_ops): Adjust.
7073 * spu-low.c (spu_wait): Don't remove the process here.
7074 (spu_target_ops): Adjust.
7075 * win32-low.c (win32_wait): Don't remove the process here.
7076 (win32_target_ops): Adjust.
7077
5d267c4c
PA
70782010-04-11 Pedro Alves <pedro@codesourcery.com>
7079
7080 * regcache.c (realloc_register_cache): Invalidate inferior's
7081 regcache before recreating it.
7082
623ccd72
PA
70832010-04-09 Pedro Alves <pedro@codesourcery.com>
7084
7085 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7086
219f2f23
PA
70872010-04-09 Stan Shebs <stan@codesourcery.com>
7088 Pedro Alves <pedro@codesourcery.com>
7089
7090 * server.h (LONGEST): New.
7091 (struct thread_info) <while_stepping>: New field.
7092 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7093 Declare.
7094 (initialize_tracepoint, handle_tracepoint_general_set)
7095 (handle_tracepoint_query, tracepoint_finished_step)
7096 (tracepoint_was_hit, release_while_stepping_state_list):
7097 (current_traceframe): Declare.
7098 * server.c (handle_general_set): Handle tracepoint packets.
7099 (read_memory): New.
7100 (write_memory): New.
7101 (handle_search_memory_1): Use read_memory.
7102 (handle_query): Report support for conditional tracepoints, trace
7103 state variables, and tracepoint sources. Handle tracepoint
7104 queries.
7105 (main): Initialize the tracepoints module.
7106 (process_serial_event): Handle traceframe reads/writes.
7107
7108 * linux-low.c (handle_tracepoints): New.
7109 (linux_wait_1): Call it.
7110 (linux_resume_one_lwp): Handle while-stepping.
7111 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7112 (linux_target_ops): Install them.
7113 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7114 New field.
7115 * linux-x86-low.c (x86_supports_tracepoints): New.
7116 (the_low_target). Install it.
7117
7118 * mem-break.h (delete_breakpoint): Declare.
7119 * mem-break.c (delete_breakpoint): Make external.
7120
7121 * target.h (struct target_ops): Add `supports_tracepoints',
7122 `read_pc', and `write_pc' fields.
7123 (target_supports_tracepoints): Define.
7124 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7125 (phex_nz): New.
7126
7127 * regcache.h (struct regcache) <registers_owned>: New field.
7128 (init_register_cache, regcache_cpy): Declare.
7129 (regcache_read_pc, regcache_write_pc): Declare.
7130 (register_cache_size): Declare.
7131 (supply_regblock): Declare.
7132 * regcache.c (init_register_cache): New.
7133 (new_register_cache): Use it.
7134 (regcache_cpy): New.
7135 (register_cache_size): New.
7136 (supply_regblock): New.
7137 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7138
219f2f23
PA
7139 * tracepoint.c: New.
7140
7141 * Makefile.in (OBS): Add tracepoint.o.
7142 (tracepoint.o): New rule.
7143
3a13a53b
L
71442010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7145
7146 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7147 (i386-mmx.o): New.
7148 (i386-mmx.c): Likewise.
7149 (i386-mmx-linux.o): Likewise.
7150 (i386-mmx-linux.c): Likewise.
7151
7152 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7153 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7154 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7155 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7156
7157 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7158 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7159 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7160
1570b33e
L
71612010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7162
7163 * Makefile.in (clean): Updated.
7164 (i386-avx.o): New.
7165 (i386-avx.c): Likewise.
7166 (i386-avx-linux.o): Likewise.
7167 (i386-avx-linux.c): Likewise.
7168 (amd64-avx.o): Likewise.
7169 (amd64-avx.c): Likewise.
7170 (amd64-avx-linux.o): Likewise.
7171 (amd64-avx-linux.c): Likewise.
7172
7173 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7174 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7175 (srv_amd64_regobj): Add amd64-avx.o.
7176 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7177 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7178 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7179 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7180 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7181 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7182 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7183
7184 * i387-fp.c: Include "i386-xstate.h".
7185 (i387_xsave): New.
7186 (i387_cache_to_xsave): Likewise.
7187 (i387_xsave_to_cache): Likewise.
7188 (x86_xcr0): Likewise.
7189
7190 * i387-fp.h (i387_cache_to_xsave): Likewise.
7191 (i387_xsave_to_cache): Likewise.
7192 (x86_xcr0): Likewise.
7193
7194 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7195 * linux-crisv32-low.c (target_regsets): Likewise.
7196 * linux-m68k-low.c (target_regsets): Likewise.
7197 * linux-mips-low.c (target_regsets): Likewise.
7198 * linux-ppc-low.c (target_regsets): Likewise.
7199 * linux-s390-low.c (target_regsets): Likewise.
7200 * linux-sh-low.c (target_regsets): Likewise.
7201 * linux-sparc-low.c (target_regsets): Likewise.
7202 * linux-xtensa-low.c (target_regsets): Likewise.
7203
7204 * linux-low.c: Include <sys/uio.h>.
7205 (regsets_fetch_inferior_registers): Support nt_type.
7206 (regsets_store_inferior_registers): Likewise.
7207 (linux_process_qsupported): New.
7208 (linux_target_ops): Add linux_process_qsupported.
7209
7210 * linux-low.h (regset_info): Add nt_type.
7211 (linux_target_ops): Add process_qsupported.
7212
7213 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7214 and <sys/uio.h>.
7215 (init_registers_i386_avx_linux): New.
7216 (init_registers_amd64_avx_linux): Likewise.
7217 (xmltarget_i386_linux_no_xml): Likewise.
7218 (xmltarget_amd64_linux_no_xml): Likewise.
7219 (PTRACE_GETREGSET): Likewise.
7220 (PTRACE_SETREGSET): Likewise.
7221 (x86_fill_xstateregset): Likewise.
7222 (x86_store_xstateregset): Likewise.
7223 (use_xml): Likewise.
7224 (x86_linux_update_xmltarget): Likewise.
7225 (x86_linux_process_qsupported): Likewise.
7226 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7227 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7228 init_registers_i386_linux here. Call
7229 x86_linux_update_xmltarget.
7230 (the_low_target): Add x86_linux_process_qsupported.
7231
7232 * server.c (handle_query): Call target_process_qsupported.
7233
7234 * target.h (target_ops): Add process_qsupported.
7235 (target_process_qsupported): New.
7236
fc7238bb
PA
72372010-04-03 Pedro Alves <pedro@codesourcery.com>
7238
7239 * inferiors.c (add_thread): Set last_status kind to
7240 TARGET_WAITKIND_IGNORE.
7241 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7242 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7243 (linux_wait_1): Move `thread' local definition to block that uses
7244 it. Don't NULL initialize `event_child'.
7245 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7246 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7247 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7248
bdabb078
PA
72492010-04-01 Pedro Alves <pedro@codesourcery.com>
7250
7251 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7252 an extended waitstatus, or by a watchpoint.
7253 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7254 thread was stepping or has been stopped by a watchpoint.
7255
d3bbe7a0
PA
72562010-04-01 Pedro Alves <pedro@codesourcery.com>
7257
7258 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7259 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7260 of another, then delete the previous, and validate all
7261 breakpoints.
7262 (validate_inserted_breakpoint): New.
7263 (delete_disabled_breakpoints): New.
7264 (validate_breakpoints): New.
7265 (check_mem_read): Validate breakpoints before trusting their
7266 shadow. Delete disabled breakpoints.
7267 (check_mem_write): Validate breakpoints before trusting they
7268 should be inserted. Delete disabled breakpoints.
7269 * mem-break.h (validate_breakpoints):
7270 * server.c (handle_query): Validate breakpoints when we see a
7271 qSymbol query.
7272
8b07ae33
PA
72732010-04-01 Pedro Alves <pedro@codesourcery.com>
7274
7275 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7276 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7277 if we could tell there's a GDB breakpoint at stop_pc.
7278 (need_step_over_p): Don't do a step over if we find a GDB
7279 breakpoint at the resume PC.
7280
7281 * mem-break.c (struct raw_breakpoint): New.
7282 (enum bkpt_type): New type `gdb_breakpoint'.
7283 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7284 fields. New field `raw'.
7285 (find_raw_breakpoint_at): New.
7286 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7287 breakpoint instead.
7288 (set_breakpoint_at): Adjust.
7289 (delete_raw_breakpoint): New.
7290 (release_breakpoint): New.
7291 (delete_breakpoint): Rename to...
7292 (delete_breakpoint_1): ... this. Add proc parameter. Use
7293 release_breakpoint. Return ENOENT.
7294 (delete_breakpoint): Reimplement.
7295 (find_breakpoint_at): Delete.
7296 (find_gdb_breakpoint_at): New.
7297 (delete_breakpoint_at): Delete.
7298 (set_gdb_breakpoint_at): New.
7299 (delete_gdb_breakpoint_at): New.
7300 (gdb_breakpoint_here): New.
7301 (set_reinsert_breakpoint): Use release_breakpoint.
7302 (uninsert_breakpoint): Rename to ...
7303 (uninsert_raw_breakpoint): ... this.
7304 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7305 (reinsert_raw_breakpoint): Change parameter type to
7306 raw_breakpoint.
7307 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7308 instead.
7309 (check_breakpoints): Adjust. Use release_breakpoint.
7310 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7311 (breakpoint_inserted_here): Ditto.
7312 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7313 Don't trust the breakpoint's shadow if it is not inserted.
7314 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7315 (delete_all_breakpoints): Adjust.
7316 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7317 use delete_breakpoint_1.
7318
7319 * mem-break.h (breakpoints_supported): Delete declaration.
7320 (set_gdb_breakpoint_at): Declare.
7321 (gdb_breakpoint_here): Declare.
7322 (delete_breakpoint_at): Delete.
7323 (delete_gdb_breakpoint_at): Declare.
7324
7325 * server.h (struct raw_breakpoint): Forward declare.
7326 (struct process_info): New field `raw_breakpoints'.
7327
7328 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7329 breakpoints.
7330
6bf5e0ba
PA
73312010-03-24 Pedro Alves <pedro@codesourcery.com>
7332
7333 * linux-low.c (status_pending_p_callback): Fix comment.
7334 (linux_wait_for_event_1): Move most of the internal breakpoint
7335 handling from here...
7336 (linux_wait_1): ... to here.
7337 (count_events_callback): New.
7338 (select_singlestep_lwp_callback): New.
7339 (select_event_lwp_callback): New.
7340 (cancel_breakpoints_callback): New.
7341 (select_event_lwp): New.
7342 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7343 priority to all LWPs that have had events that should be reported
7344 to the client. Cancel breakpoints when about to reporting the
7345 event to the client, not while stopping lwps. No longer cancel
7346 finished single-steps here.
7347 (cancel_finished_single_step): Delete.
7348 (cancel_finished_single_steps): Delete.
7349
414a389f
PA
73502010-03-24 Pedro Alves <pedro@codesourcery.com>
7351
7352 * mem-break.c (enum bkpt_type): New.
7353 (struct breakpoint): New field `type'.
7354 (set_breakpoint_at): Change return type to struct breakpoint
7355 pointer. Set type to `other_breakpoint' by default.
7356 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7357 in the breakpoint list.
7358 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7359 (reinsert_breakpoint): Rename to ...
7360 (reinsert_raw_breakpoint): ... this.
7361 (reinsert_breakpoints_at): Adjust.
7362 * mem-break.h (struct breakpoint): Declare.
7363 (set_breakpoint_at): Change return type to struct breakpoint
7364 pointer.
7365
2280c721
PA
73662010-03-24 Pedro Alves <pedro@codesourcery.com>
7367
7368 * server.c (handle_query): Assign, not compare.
7369
d50171e4
PA
73702010-03-24 Pedro Alves <pedro@codesourcery.com>
7371
7372 Teach linux gdbserver to step-over-breakpoints.
7373
7374 * linux-low.c (can_hardware_single_step): New.
7375 (supports_breakpoints): New.
7376 (handle_extended_wait): If stopping threads, read the stop pc of
7377 the new cloned LWP.
7378 (get_pc): New.
7379 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7380 low target doesn't support retrieving the PC.
7381 (add_lwp): Set last_resume_kind to resume_continue.
7382 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7383 (linux_attach): Don't clear stop_expected. Set the lwp's
7384 last_resume_kind to resume_stop.
7385 (linux_detach_one_lwp): Don't check for removed breakpoints.
7386 (check_removed_breakpoint): Delete.
7387 (status_pending_p): Rename to ...
7388 (status_pending_p_callback): ... this. Don't check for removed
7389 breakpoints. Don't consider threads that are stopped from GDB's
7390 perspective.
7391 (linux_wait_for_lwp): Always read the stop_pc here.
7392 (cancel_breakpoint): New.
7393 (step_over_bkpt): New global.
7394 (linux_wait_for_event_1): Implement stepping over breakpoints.
7395 (gdb_wants_lwp_stopped): New.
7396 (gdb_wants_all_stopped): New.
7397 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7398 single-step traps here. Store the thread's last reported target
7399 wait status.
7400 (send_sigstop): Don't clear stop_expected. Always set it,
7401 instead.
7402 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7403 (cancel_finished_single_step): New.
7404 (cancel_finished_single_steps): New.
7405 (wait_for_sigstop): Don't cancel finished single-step traps here.
7406 (linux_resume_one_lwp): Don't check for removed breakpoints.
7407 Don't set `step' on non-hardware step archs.
7408 (linux_set_resume_request): Ignore resume_stop requests if already
7409 stopping or stopped. Set the lwp's last_resume_kind.
7410 (resume_status_pending_p): Don't check for removed breakpoints.
7411 (need_step_over_p): New.
7412 (start_step_over): New.
7413 (finish_step_over): New.
7414 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7415 requests. Clear the thread's last reported target waitstatus.
7416 Don't use the `suspended' flag. Don't consider pending breakpoints.
7417 (linux_resume): Start a step-over if necessary.
7418 (proceed_one_lwp): New.
7419 (proceed_all_lwps): New.
7420 (unstop_all_lwps): New.
7421 * linux-low.h (struct lwp_info): Rewrite comment for the
7422 `suspended' flag. Add the `stop_pc' field. Delete the
7423 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7424 Add `'last_resume_kind' and `need_step_over' fields.
7425 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7426 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7427 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7428 (set_raw_breakpoint_at): New.
7429 (set_breakpoint_at): Rewrite to use it.
7430 (reinsert_breakpoint_handler): Delete.
7431 (set_reinsert_breakpoint): New.
7432 (reinsert_breakpoint_by_bp): Delete.
7433 (delete_reinsert_breakpoints): New.
7434 (uninsert_breakpoint): Rewrite.
7435 (uninsert_breakpoints_at): New.
7436 (reinsert_breakpoint): Rewrite.
7437 (reinsert_breakpoints_at): New.
7438 (check_breakpoints): Rewrite.
7439 (breakpoint_here): New.
7440 (breakpoint_inserted_here): New.
7441 (check_mem_read): Adjust.
7442 * mem-break.h (breakpoints_supported, breakpoint_here)
7443 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7444 (reinsert_breakpoint_by_bp): Delete declaration.
7445 (delete_reinsert_breakpoints): Declare.
7446 (reinsert_breakpoint): Delete declaration.
7447 (reinsert_breakpoints_at): Declare.
7448 (uninsert_breakpoint): Delete declaration.
7449 (uninsert_breakpoints_at): Declare.
7450 (check_breakpoints): Adjust prototype.
7451 * server.h: Adjust include order.
7452 (struct thread_info): Declare here. Add a `last_status' field.
7453
30ba68cb
MS
74542010-03-23 Michael Snyder <msnyder@vmware.com>
7455
7456 * server.c (crc32): New function.
7457 (handle_query): Add handling for 'qCRC:' request.
7458
b9a881c2
PA
74592010-03-23 Pedro Alves <pedro@codesourcery.com>
7460
7461 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7462 lwp had been stopped by a watchpoint.
7463
e92d13d5
PA
74642010-03-16 Pedro Alves <pedro@codesourcery.com>
7465
7466 * server.h (internal_error): Declare.
7467 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7468 * utils.c (internal_error): New function.
7469
64daa791
AS
74702010-03-15 Andreas Schwab <schwab@redhat.com>
7471
7472 * configure.srv: Fix typo setting srv_regobj.
7473
f52cd8cd
PA
74742010-03-15 Pedro Alves <pedro@codesourcery.com>
7475
7476 * linux-low.c (fetch_register): Avoid passing a non string literal
7477 format to `error'.
7478 (usr_store_inferior_registers): Ditto.
7479
93ae6fdc
PA
74802010-03-14 Pedro Alves <pedro@codesourcery.com>
7481
7482 * linux-low.c (linux_write_memory): Bail out early if peeking
7483 memory failed.
7484
c3adc08c
PA
74852010-03-14 Pedro Alves <pedro@codesourcery.com>
7486
7487 * linux-low.h (struct lwp_info): New fields
7488 `stopped_by_watchpoint' and `stopped_data_address'.
7489 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7490 here, and cache them in the lwp object.
7491 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7492 directly.
7493 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7494 field.
7495 (linux_stopped_by_watchpoint): Rewrite.
7496 (linux_stopped_data_address): Rewrite.
7497
bce522a2
PA
74982010-03-06 Simo Melenius <simo.melenius@iki.fi>
7499
7500 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7501 switching the current inferior, not before.
7502
90884b2b
L
75032010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7504
7505 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7506 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7507 i386-linux.c and amd64-linux.c.
7508 (reg-i386.o): Removed.
7509 (reg-i386.c): Likewise.
7510 (reg-i386-linux.o): Likewise.
7511 (reg-i386-linux.c): Likewise.
7512 (reg-x86-64.o): Likewise.
7513 (reg-x86-64.c): Likewise.
7514 (reg-x86-64-linux.o): Likewise.
7515 (reg-x86-64-linux.c): Likewise.
7516 (i386.o): New.
7517 (i386.c): Likewise.
7518 (i386-linux.o): Likewise.
7519 (i386-linux.c): Likewise.
7520 (amd64.o): Likewise.
7521 (amd64.c): Likewise.
7522 (amd64-linux.o): Likewise.
7523 (amd64-linux.c): Likewise.
7524
7525 * configure.srv (srv_i386_regobj): New.
7526 (srv_i386_linux_regobj): Likewise.
7527 (srv_amd64_regobj): Likewise.
7528 (srv_amd64_linux_regobj): Likewise.
7529 (srv_i386_32bit_xmlfiles): Likewise.
7530 (srv_i386_64bit_xmlfiles): Likewise.
7531 (srv_i386_xmlfiles): Likewise.
7532 (srv_amd64_xmlfiles): Likewise.
7533 (srv_i386_linux_xmlfiles): Likewise.
7534 (srv_amd64_linux_xmlfiles): Likewise.
7535 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7536 srv_xmlfiles to $srv_i386_xmlfiles.
7537 (i[34567]86-*-mingw32ce*): Likewise.
7538 (i[34567]86-*-mingw*): Likewise.
7539 (i[34567]86-*-nto*): Likewise.
7540 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7541 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7542 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7543 (x86_64-*-linux*): Likewise.
7544
7545 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7546 (init_registers_amd64_linux): New.
7547 (x86_arch_setup): Replace init_registers_x86_64_linux with
7548 init_registers_amd64_linux.
7549
193f13e6
MK
75502010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7551
7552 * configure.ac: Check for libdl. If it is not available link against
7553 static libthread_db.
7554 * configure: Regenerate.
7555
85d721b8
PA
75562010-02-22 Pedro Alves <pedro@codesourcery.com>
7557
7558 PR9605
7559
7560 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7561 handing a read watchpoint.
7562 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7563
6076632b
DE
75642010-02-12 Doug Evans <dje@google.com>
7565
7566 * linux-low.c (linux_supports_tracefork_flag): Document.
7567 (linux_look_up_symbols): Add comment.
7568
3327ccf7
L
75692010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7570
7571 * regcache.c (supply_register): Clear regcache if buf is NULL.
7572
0718675c 75732010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7574 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7575
7576 * inferiors.c (find_inferior): Add function documentation.
7577 (unloaded_dll): Handle the case where the unloaded dll has not
7578 been previously registered in the dll list.
7579
177321bd
DJ
75802010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7581
7582 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7583 (thumb2_breakpoint): New.
7584 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7585
2b009048
DJ
75862010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7587
7588 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7589 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7590 breakpoints.
7591
3be029c7
PA
75922010-01-21 Pedro Alves <pedro@codesourcery.com>
7593
7594 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7595
18f5de3b
JK
75962010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7597
7598 * linux-s390-low.c (s390_collect_ptrace_register)
7599 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7600
3743bb4f
DE
76012010-01-21 Doug Evans <dje@google.com>
7602
14ce3065
DE
7603 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7604 (PTRACE_ARG4_TYPE): New macro.
7605 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7606 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7607 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7608 (usr_store_inferior_registers): Ditto.
7609 (linux_read_memory, linux_write_memory): Ditto.
7610 (linux_test_for_tracefork): Ditto.
7611
3743bb4f
DE
7612 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7613 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7614
8b315be5
PA
76152010-01-21 Pedro Alves <pedro@codesourcery.com>
7616
7617 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7618 target.
7619
85492558
PA
76202010-01-21 Pedro Alves <pedro@codesourcery.com>
7621
7622 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7623 prototype to take a regcache. Adjust.
7624
442ea881
PA
76252010-01-20 Pedro Alves <pedro@codesourcery.com>
7626
7627 * regcache.h (struct thread_info): Forward declare.
7628 (struct regcache): New.
7629 (new_register_cache): Adjust prototype.
7630 (get_thread_regcache): Declare.
7631 (free_register_cache): Adjust prototype.
7632 (registers_to_string, registers_from_string): Ditto.
7633 (supply_register, supply_register_by_name, collect_register)
7634 (collect_register_as_string, collect_register_by_name): Ditto.
7635 * regcache.c (struct inferior_regcache_data): Delete.
7636 (get_regcache): Rename to ...
7637 (get_thread_regcache): ... this. Adjust. Switch inferior before
7638 fetching registers.
7639 (regcache_invalidate_one): Adjust.
7640 (regcache_invalidate): Fix prototype.
7641 (new_register_cache): Return the new register cache.
7642 (free_register_cache): Change prototype.
7643 (realloc_register_cache): Adjust.
7644 (registers_to_string): Change prototype to take a regcache. Adjust.
7645 (registers_from_string): Ditto.
7646 (register_data): Ditto.
7647 (supply_register): Ditto.
7648 (supply_register_by_name): Ditto.
7649 (collect_register): Ditto.
7650 (collect_register_as_string): Ditto.
7651 (collect_register_by_name): Ditto.
7652 * server.c (process_serial_event): Adjust.
7653 * linux-low.h (regset_fill_func, regset_store_func): Change
7654 prototype.
7655 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7656 Change prototype.
7657 * linux-low.c (get_stop_pc): Adjust.
7658 (check_removed_breakpoint): Adjust.
7659 (linux_wait_for_event): Adjust.
7660 (linux_resume_one_lwp): Adjust.
7661 (fetch_register): Add regcache parameter. Adjust.
7662 (usr_store_inferior_registers): Ditto.
7663 (regsets_fetch_inferior_registers): Ditto.
7664 (regsets_store_inferior_registers): Ditto.
7665 (linux_fetch_registers, linux_store_registers): Ditto.
7666 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7667 regcache. Adjust.
43aaf8b6
PA
7668 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7669 Ditto.
442ea881
PA
7670 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7671 prototype to take a regcache.
7672 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7673 * remote-utils.c (convert_ascii_to_int, outreg)
7674 (prepare_resume_reply): Change prototype to take a regcache.
7675 Adjust.
7676 * target.h (struct target_ops) <fetch_registers, store_registers>:
7677 Change prototype to take a regcache.
7678 (fetch_inferior_registers, store_inferior_registers): Change
7679 prototype to take a regcache. Adjust.
7680 * proc-service.c (ps_lgetregs): Adjust.
7681 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7682 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7683 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7684 take a regcache. Adjust.
7685 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7686 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7687 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7688 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7689 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7690 (cris_cannot_fetch_register):
7691 (cris_breakpoint_at): Change prototype to take a regcache.
7692 Adjust.
7693 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7694 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7695 to take a regcache. Adjust.
7696 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7697 Adjust.
7698 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7699 take a regcache. Adjust.
7700 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7701 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7702 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7703 * linux-mips-low.c (mips_get_pc):
7704 (mips_set_pc): Change prototype to take a regcache. Adjust.
7705 (mips_reinsert_addr): Adjust.
7706 (mips_collect_register): Change prototype to take a regcache.
7707 Adjust.
7708 (mips_supply_register):
7709 (mips_collect_register_32bit, mips_supply_register_32bit)
7710 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7711 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7712 * linux-ppc-low.c (ppc_supply_ptrace_register)
7713 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7714 (parse_spufs_run): Adjust.
7715 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7716 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7717 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7718 take a regcache. Adjust.
7719 * linux-s390-low.c (s390_collect_ptrace_register)
7720 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7721 (s390_set_pc): Change prototype to take a regcache. Adjust.
7722 (s390_arch_setup): Adjust.
7723 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7724 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7725 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7726 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7727 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7728 regcache. Adjust.
7729 (sparc_breakpoint_at): Adjust.
7730 * linux-xtensa-low.c (xtensa_fill_gregset):
7731 (xtensa_store_gregset):
7732 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7733 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7734 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7735 prototype to take a regcache. Adjust.
7736 * win32-arm-low.c (arm_fetch_inferior_register)
7737 (arm_store_inferior_register): Change prototype to take a
7738 regcache. Adjust.
7739 * win32-i386-low.c (i386_fetch_inferior_register)
7740 (i386_store_inferior_register): Change prototype to take a
7741 regcache. Adjust.
7742 * win32-low.c (child_fetch_inferior_registers)
7743 (child_store_inferior_registers): Change prototype to take a
7744 regcache. Adjust.
7745 (win32_wait): Adjust.
7746 (win32_fetch_inferior_registers): Change prototype to take a
7747 regcache. Adjust.
7748 (win32_store_inferior_registers): Adjust.
7749 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7750 store_inferior_register>: Change prototype to take a regcache.
7751
60c3d7b0
DE
77522010-01-20 Doug Evans <dje@google.com>
7753
7754 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7755 #ifdef.
7756 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7757 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7758
dc146f7c
VP
77592010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7760
7761 * linux-low.c (linux_core_of_thread): New.
7762 (compare_ints, show_process, list_threads): New.
7763 (linux_qxfer_osdata): Report threads and cores.
7764 (linux_target_op): Register linux_core_of_thread.
7765 * remote-utils.c (prepare_resume_reply): Report the core.
7766 (buffer_xml_printf): Support %d specifier.
7767 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7768 New.
7769 (handle_query): Handle qXfer:threads. Announce availability
7770 thereof.
7771 * target.h (struct target_ops): New field core_of_thread.
7772
7803799a
UW
77732010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7774
7775 * Makefile.in (clean): Remove new generated files.
7776 (reg-s390.o, reg-s390.c): Remove rules.
7777 (reg-s390x.o, reg-s390x.c): Likewise.
7778 (s390-linux32.o, s390-linux32.c): Add rules.
7779 (s390-linux64.o, s390-linux64.c): Likewise.
7780 (s390x-linux64.o, s390x-linux64.c): Likewise.
7781 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7782 * linux-s390-low.c: Include <elf.h>.
7783 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7784 (init_registers_s390): Remove prototype.
7785 (init_registers_s390x): Likewise.
7786 (init_registers_s390_linux32): Add prototype.
7787 (init_registers_s390_linux64): Likewise.
7788 (init_registers_s390x_linux64): Likewise.
7789 (s390_num_regs_3264): New define.
7790 (s390_regmap_3264): New global variable.
7791 (s390_cannot_fetch_register): Remove obsolete check.
7792 (s390_cannot_store_register): Likewise.
7793 (s390_collect_ptrace_register): Handle upper/lower register halves.
7794 (s390_supply_ptrace_register): Likewise.
7795 (s390_fill_gregset): Update to register number changes.
7796 (s390_get_hwcap): New routine.
7797 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7798 Install appropriate regmap and register set.
7799
6e7ffa39
JB
78002010-01-01 Joel Brobecker <brobecker@adacore.com>
7801
7802 * server.c (gdbserver_version): Update copyright year to 2010.
7803 * gdbreplay.c (gdbreplay_version): Likewise.
7804
957f3f49
DE
78052009-12-28 Doug Evans <dje@google.com>
7806
7807 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7808 elf/external.h. Include <elf.h> instead but only if necessary.
7809
ca5c370d
PA
78102009-12-28 Pedro Alves <pedro@codesourcery.com>
7811
7812 * linux-low.c (linux_remove_process): Remove `detaching'
7813 parameter. Don't release/detach from thread_db here.
7814 (linux_kill): Release/detach from thread_db here, ...
7815 (linux_detach): ... and here, before actually detaching.
7816 (linux_wait_1): ... and here, when a process exits.
7817 * thread-db.c (any_thread_of): New.
7818 (thread_db_free): Switch the current inferior to a thread of the
7819 passed in process.
7820
4ee62156
DE
78212009-12-21 Doug Evans <dje@google.com>
7822
d90e6a88
DE
7823 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7824
c5f62d5f
DE
7825 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7826 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7827 warning ifndef __NR_tkill. Move setting of errno there too.
7828 Delete unnecessary resetting of errno after syscall.
7829 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7830
10e86dd7
DE
7831 * configure.ac: Check for dladdr.
7832 * config.in: Regenerate.
7833 * configure: Regenerate.
7834 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7835 (try_thread_db_load): Update.
7836
4ee62156
DE
7837 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7838
00f515da
DE
78392009-12-18 Doug Evans <dje@google.com>
7840
e9464885
DE
7841 * event-loop.c: Include unistd.h if it exists.
7842
07d4f67e
DE
7843 * linux-low.c (my_waitpid): Move definition away from being in
7844 between linux_tracefork_child/linux_test_for_tracefork.
7845
00f515da
DE
7846 * gdb_proc_service.h (psaddr_t): Fix type.
7847 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7848 signature to match glibc.
7849
1de1badb
DE
78502009-12-16 Doug Evans <dje@google.com>
7851
7852 * linux-low.c (linux_read_memory): Fix argument to read.
7853
aeeb81d1
PA
78542009-11-26 Pedro Alves <pedro@codesourcery.com>
7855
7856 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7857 events, don't leave current_inferior pointing at null.
7858
10357975
PA
78592009-11-26 Pedro Alves <pedro@codesourcery.com>
7860
7861 * win32-low.c (LOG): Delete.
7862 (OUTMSG): Output to stderr.
7863 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7864 on compile time LOG macro.
7865 (win32_wait): Fix debug output.
7866
cf6e3471
PA
78672009-11-26 Pedro Alves <pedro@codesourcery.com>
7868
7869 * win32-low.c (win32_add_one_solib): If the dll name is
7870 "ntdll.dll", prepend the system directory to the dll path.
7871
0c85e18e
MK
78722009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7873
7874 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7875
9ac544ce 78762009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7877 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7878
7879 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7880 * configure.ac: Check for __mcoldfire__ and set
7881 gdb_cv_m68k_is_coldfire.
7882 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7883 reg-cf.o and reg-m68k.o.
7884 * configure: Regenerated.
7885
fd7dd3e6
PA
78862009-11-16 Pedro Alves <pedro@codesourcery.com>
7887
7888 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7889 Pass it to thread_db_free.
7890 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7891 proper `detaching' argument to linux_remove_process.
7892 * linux-low.h (thread_db_free): Add `detaching' parameter.
7893 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7894 to thread_db_free.
7895 (thread_db_free): Add `detaching' parameter. Only
7896 call td_ta_clear_event if detaching from process.
7897
75aa492e
MK
78982009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7899
7900 * thread-db.c (thread_db_free): Fix typo.
7901
21e1bee4
PP
79022009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7903
7904 PR gdb/10838
7905 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7906
8838b45e
NS
79072009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7908
7909 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7910 with an i686 compiler.
7911 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7912 needed.
7913 * configure: Rebuilt.
7914
8a35fb51
SL
79152009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7916
7917 PR gdb/10783
7918
7919 * server.c (handle_search_memory_1): Correct read_addr initialization
7920 in loop for searching subsequent chunks.
7921
96f15937
PP
79222009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7923
7924 * configure.ac: New --with-libthread-db option.
7925 * thread-db.c: Allow direct dependence on libthread_db.
7926 (thread_db_free): Adjust.
7927 * config.in: Regenerate.
7928 * configure: Likewise.
889bf7c5 7929
5f7d1694
PP
79302009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7931
7932 PR gdb/10757
7933 * thread-db.c (attach_thread): New function.
7934 (maybe_attach_thread): Return success/failure.
7935 (find_new_threads_callback): Adjust.
889bf7c5
PA
7936 (thread_db_find_new_threads): Loop until no new threads.
7937
88e3b899
PA
79382009-10-13 Pedro Alves <pedro@codesourcery.com>
7939
7940 * proc-service.c (ps_lgetregs): Formatting.
7941
cdbfd419
PP
79422009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7943
7944 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7945 * configure.ac: Adjust.
7946 * linux-low.h (struct process_info_private): Move members to struct
7947 thread_db.
7948 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7949 * linux-low.c (linux_remove_process): Adjust.
7950 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7951 * server.c (handle_query): Move code ...
7952 (handle_monitor_command): ... here. New function.
7953 * target.h (struct target_ops): New member.
7954 * thread-db.c (struct thread_db): New.
7955 (libthread_db_search_path): New variable.
7956 (thread_db_create_event, thread_db_enable_reporting)
7957 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7958 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7959 (try_thread_db_load_1, dladdr_to_soname): New functions.
7960 (try_thread_db_load, thread_db_load_search): New functions.
7961 (thread_db_init): Search for libthread_db.
7962 (thread_db_free): New function.
7963 (thread_db_handle_monitor_command): Likewise.
7964 * config.in: Regenerate.
7965 * configure: Regenerate.
889bf7c5 7966
4168d2d6
UW
79672009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7968
7969 * spu-low.c (spu_kill): Wait for inferior to terminate.
7970 Call clear_inferiors.
7971 (spu_detach): Call clear_inferiors.
7972
81ecdfbb
RW
79732009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7974
7975 * aclocal.m4: Regenerate.
7976 * config.in: Likewise.
7977 * configure: Likewise.
7978
0b9ff2c0
UW
79792009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7980
7981 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7982 (parse_spufs_run): New function.
7983 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7984 (ppc_breakpoint_at): Handle SPU breakpoints.
7985
efcbbd14
UW
79862009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7987
7988 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7989 (SPUFS_MAGIC): Define.
7990 (spu_enumerate_spu_ids): New function.
7991 (linux_qxfer_spu): New function.
7992 (linux_target_ops): Install linux_qxfer_spu.
7993
f4d9bade
UW
79942009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7995
7996 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7997 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7998 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7999 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8000 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8001 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8002 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8003 (init_registers_powerpc_cell32l): Add prototype.
8004 (init_registers_powerpc_cell64l): Likewise.
8005 (ppc_arch_setup): Detect Cell/B.E. architecture.
8006
96e946ca
RW
80072009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8008
8009 * Makefile.in (datarootdir): New variable.
8010
58d6951d
DJ
80112009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8012
8013 * linux-low.c (linux_write_memory): Update debugging output.
8014 * Makefile.in (clean): Add new descriptions.
8015 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8016 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8017 * configure.srv: Add new files for arm*-*-linux*.
8018 * linux-arm-low.c: Add new declarations.
8019 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8020 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8021 (HWCAP_VFPv3D16): New.
8022 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8023 instead of __IWMMXT__.
8024 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8025 (arm_arch_setup): New.
8026 (target_regsets): Remove #ifdef. Add VFP regset.
8027 (the_low_target): Use arm_arch_setup.
8028
12b42a12
DJ
80292009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8030
8031 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8032 the main thread again.
8033
ac8c974e
AR
80342009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8035
8036 Adding Neutrino gdbserver.
8037 * configure: Regenerated.
8038 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8039 * configure.srv (i[34567]86-*-nto*): New target.
8040 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8041 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8042 (nto_comctrl) [__QNX__]: New function.
8043 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8044
4424e0c3 80452009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8046
8047 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8048 srv_tgtobj.
8049
912cf4ba
PA
80502009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8051 Pedro Alves <pedro@codesourcery.com>
8052
8053 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8054 don't support CONTEXT_EXTENDED_REGISTERS.
8055 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8056 (the_low_target): Install them.
8057 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8058 failing with ERROR_PIPE_NOT_CONNECTED.
8059
aa5ca48f
DE
80602009-06-30 Doug Evans <dje@google.com>
8061 Pierre Muller <muller@ics.u-strasbg.fr>
8062
8063 Add h/w watchpoint support to x86-linux, win32-i386.
8064 * Makefile.in (SFILES): Add i386-low.c
8065 (i386_low_h): Define.
8066 (i386-low.o): Add dependencies.
8067 (linux-x86-low.o): Add i386-low.h dependency.
8068 (win32-i386-low.o): Ditto.
8069 * i386-low.c: New file.
8070 * i386-low.h: New file.
8071 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8072 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8073 * linux-low.c (linux_add_process): Initialize arch_private.
8074 (linux_remove_process): Free arch_private.
8075 (add_lwp): Initialize arch_private.
8076 (delete_lwp): Free arch_private.
8077 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8078 provided.
8079 * linux-low.h (process_info_private): New member arch_private.
8080 (lwp_info): New member arch_private.
8081 (linux_target_ops): New members new_process, new_thread,
8082 prepare_to_resume.
8083 (ptid_of): New macro.
8084 * linux-x86-low.c: Include stddef.h, i386-low.h.
8085 (arch_process_info): New struct.
8086 (arch_lwp_info): New struct.
8087 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8088 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8089 (i386_dr_low_get_status): New function.
8090 (x86_insert_point, x86_remove_point): New functions.
8091 (x86_stopped_by_watchpoint): New function.
8092 (x86_stopped_data_address): New function.
8093 (x86_linux_new_process, x86_linux_new_thread): New functions.
8094 (x86_linux_prepare_to_resume): New function.
8095 (the_low_target): Add entries for insert_point, remove_point,
8096 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8097 prepare_to_resume.
8098 * server.c (debug_hw_points): New global.
8099 (monitor_show_help): Document set debug-hw-points.
8100 (handle_query): Process "set debug-hw-points".
8101 * server.h (debug_hw_points): Declare.
8102 (paddress): Declare.
8103 * utils.c (NUMCELLS, CELLSIZE): New macros.
8104 (get_sell, xsnprintf, paddress): New functions.
8105 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8106 remove_point, stopped_by_watchpoint, stopped_data_address.
8107 * win32-i386-low.c: Include i386-low.h.
8108 (debug_reg_state): Replaces dr.
8109 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8110 (i386_dr_low_get_status): New function.
8111 (i386_insert_point, i386_remove_point): New functions.
8112 (i386_stopped_by_watchpoint): New function.
8113 (i386_stopped_data_address): New function.
8114 (i386_initial_stuff): Update.
8115 (get_thread_context,set_thread_context,i386_thread_added): Update.
8116 (the_low_target): Add entries for insert_point,
8117 remove_point, stopped_by_watchpoint, stopped_data_address.
8118 * win32-low.c (win32_insert_watchpoint): New function.
8119 (win32_remove_watchpoint): New function.
8120 (win32_stopped_by_watchpoint): New function.
8121 (win32_stopped_data_address): New function.
8122 (win32_target_ops): Add entries for insert_watchpoint,
8123 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8124 * win32-low.h (win32_target_ops): New members insert_point,
8125 remove_point, stopped_by_watchpoint, stopped_data_address.
8126
d993e290
PA
81272009-06-25 Pedro Alves <pedro@codesourcery.com>
8128
8129 * server.c (process_serial_event): Re-return unsupported, not
8130 error, if the type isn't recognized. Re-allow supporting only
8131 insert or remove packets. Also call require_running for
8132 breakpoints. Add missing break statement to default case. Tidy.
8133 * target.h (struct target_ops): Rename insert_watchpoint to
8134 insert_point, and remove_watchpoint to remove_point.
8135
8136 * linux-low.h (struct linux_target_ops): Likewise.
8137 * linux-low.c (linux_insert_watchpoint): Rename to ...
8138 (linux_insert_point): ... this. Adjust.
8139 (linux_remove_watchpoint): Rename to ...
8140 (linux_remove_point): ... this. Adjust.
8141 (linux_target_ops): Adjust.
8142 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8143 (cris_insert_point): ... this.
8144 (cris_remove_watchpoint): Rename to ...
8145 (cris_remove_point): ... this.
8146 (the_low_target): Adjust.
8147
0f54c268
PM
81482009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8149
8150 * server.c (handle_v_kill): Pass signal_pid to
8151 kill_inferior if multi_process is zero.
8152
c6314022
AR
81532009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8154
8155 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8156 * target.h (target_ops): Comment for *_watchpoint to make it clear
8157 the functions can get types '0' and '1'.
8158
4463ce24
AR
81592009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8160
8161 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8162 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8163 * regcache.c (get_regcache): Likewise.
8164 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8165 * win32-low.c (child_fetch_inferior_registers): Remove check for
8166 regno 0.
8167
cf8fd78b
PA
81682009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8169 Pedro Alves <pedro@codesourcery.com>
8170
8171 * target.h (struct target_ops) <supports_multi_process>: New
8172 callback.
8173 (target_supports_multi_process): New.
8174 * server.c (handle_query): Even if GDB reports support, only
8175 enable multi-process if the target also supports it. Report
8176 multi-process support only if the target backend supports it.
8177 * linux-low.c (linux_supports_multi_process): New function.
8178 (linux_target_ops): Install it as target_supports_multi_process
8179 callback.
8180
47c0c975
DE
81812009-05-24 Doug Evans <dje@google.com>
8182
e09875d4
DE
8183 Global renaming of find_thread_pid to find_thread_ptid.
8184 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8185 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8186 All callers updated.
8187
e27d73f6
DE
8188 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8189 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8190 directly.
8191
47c0c975
DE
8192 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8193 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8194 (linux_resume_one_lwp): Ditto.
8195
2acc282a
DE
81962009-05-23 Doug Evans <dje@google.com>
8197
8198 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8199 from struct inferior_list_entry * to struct lwp_info *.
8200 All callers updated.
8201
9f1036c1
DE
82022009-05-13 Doug Evans <dje@google.com>
8203
8204 * linux-x86-low.c: Don't include assert.h.
8205 (x86_siginfo_fixup): Use fatal, not assert.
8206 (x86_arch_setup): Fix comment.
8207
d0722149
DE
82082009-05-12 Doug Evans <dje@google.com>
8209
8210 Biarch support for i386/amd64 gdbserver.
8211 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8212 Add linux-x86-low.c.
8213 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8214 (linux-x86-low.o): Add.
8215 * linux-x86-64-low.c: Delete.
8216 * linux-i386-low.c: Delete.
8217 * linux-x86-low.c: New file.
8218 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8219 linux-x86-low.o.
8220 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8221 linux-x86-low.o.
8222 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8223 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8224 (linux_child_pid_to_exec_file): New function.
8225 (elf_64_header_p, elf_64_file_p): New functions.
8226 (siginfo_fixup): New function.
8227 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8228 give target a chance to convert layout.
8229 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8230 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8231
fdeb2a12
DE
82322009-05-07 Doug Evans <dje@google.com>
8233
8234 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8235 (regsets_store_inferior_registers): Ditto.
8236
a6dbe5df
PA
82372009-05-06 Pedro Alves <pedro@codesourcery.com>
8238
8239 PR server/10048
8240
8241 * linux-low.c (must_set_ptrace_flags): Delete.
8242 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8243 of the global.
8244 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8245 `lwp->must_set_ptrace_flags' instead.
ba42693b 8246 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8247 (linux_wait_1): ... not here.
8248
5091eb23
DE
82492009-04-30 Doug Evans <dje@google.com>
8250
9f767825
DE
8251 * inferiors.c (started_inferior_callback): New function.
8252 (attached_inferior_callback): New function.
8253 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8254 * server.c (print_started_pid, print_attached_pid): New functions.
8255 (detach_or_kill_for_exit): New function.
8256 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8257 * server.h (have_started_inferiors_p): Declare.
8258 (have_attached_inferiors_p): Declare.
8259
5091eb23
DE
8260 * inferiors.c (remove_process): Fix memory leak, free process.
8261 * linux-low.c (linux_remove_process): New function.
8262 (linux_kill): Call it instead of remove_process.
8263 (linux_detach, linux_wait_1): Ditto.
8264
155c8968
PA
82652009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8266
8267 * configure.srv: Add x86 Windows CE target.
8268
7fe519cb
UW
82692009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8270
8271 * inferiors.c (get_thread_process): Make global.
8272 * server.h (get_thread_process): Add prototype.
8273 * thread-db.c (find_one_thread): Use get_thread_process
8274 instead of current_process.
8275 (thread_db_get_tls_address): Do not crash if called when
8276 thread layer is not yet initialized.
8277
5472f405
UW
82782009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8279
8280 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8281 * spu-low.c (current_tid): Rename to ...
8282 (current_ptid): ... this.
8283 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8284 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8285 ptid_get_lwp (current_ptid) instead of current_tid.
8286 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8287 instead of current_tid. Use find_process_pid to verify pid
8288 argument is valid. Pass proper argument to remove_process.
8289 (spu_thread_alive): Compare current_ptid instead of current_tid.
8290 (spu_resume): Likewise.
8291
55ac2b99
PA
82922009-04-02 Pedro Alves <pedro@codesourcery.com>
8293
8294 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8295 variable.
8296
95954743
PA
82972009-04-01 Pedro Alves <pedro@codesourcery.com>
8298
8299 Implement the multiprocess extensions, and add linux multiprocess
8300 support.
8301
8302 * server.h (ULONGEST): Declare.
8303 (struct ptid, ptid_t): New.
8304 (minus_one_ptid, null_ptid): Declare.
8305 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8306 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8307 (struct inferior_list_entry): Change `id' type from unsigned from
8308 to ptid_t.
8309 (struct sym_cache, struct breakpoint, struct
8310 process_info_private): Forward declare.
8311 (struct process_info): Declare.
8312 (current_process): Declare.
8313 (all_processes): Declare.
8314 (initialize_inferiors): Declare.
8315 (add_thread): Adjust to use ptid_t.
8316 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8317 (add_process, remove_process, find_thread_pid): Declare.
8318 (find_inferior_id): Adjust to use ptid_t.
8319 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8320 (multi_process): Declare.
8321 (push_event): Adjust to use ptid_t.
8322 (read_ptid, write_ptid): Declare.
8323 (prepare_resume_reply): Adjust to use ptid_t.
8324 (clear_symbol_cache): Declare.
8325 * inferiors.c (all_processes): New.
8326 (null_ptid, minus_one_ptid): New.
8327 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8328 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8329 (add_thread): Change unsigned long to ptid. Remove gdb_id
8330 parameter. Adjust.
8331 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8332 (gdb_id_to_thread): Rename to ...
8333 (find_thread_pid): ... this. Change unsigned long to ptid.
8334 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8335 (loaded_dll, pull_pid_from_list): Adjust.
8336 (add_process, remove_process, find_process_pid)
8337 (get_thread_process, current_process, initialize_inferiors): New.
8338 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8339 (struct target_waitstatus) <related_pid>: Ditto.
8340 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8341 return type to int.
8342 (struct target_ops) <join>: Add `pid' argument.
8343 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8344 (struct target_ops) <wait>: Add `ptid' field. Change return type
8345 to ptid.
8346 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8347 (mywait): Add `ptid' argument. Change return type to ptid_t.
8348 (target_pid_to_str): Declare.
8349 * target.c (set_desired_inferior): Adjust to use ptids.
8350 (mywait): Add new `ptid' argument. Adjust.
8351 (target_pid_to_str): New.
8352 * mem-break.h (free_all_breakpoints): Declare.
8353 * mem-break.c (breakpoints): Delelete.
8354 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8355 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8356 to use per-process breakpoint list.
8357 (free_all_breakpoints): New.
8358 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8359 (symbol_cache, all_symbols_looked_up): Delete.
8360 (hexchars): New.
8361 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8362 read_ptid): New.
8363 (prepare_resume_reply): Change ptid argument's type from unsigned
8364 long to ptid_t. Adjust. Implement W;process and X;process.
8365 (free_sym_cache, clear_symbol_cache): New.
8366 (look_up_one_symbol): Adjust to per-process symbol cache. *
8367 * server.c (cont_thread, general_thread, step_thread): Change type
8368 to ptid_t.
8369 (attached): Delete.
8370 (multi_process): New.
8371 (last_ptid): Change type to ptid_t.
8372 (struct vstop_notif) <ptid>: Change type to ptid_t.
8373 (queue_stop_reply, push_event): Change `ptid' argument's type to
8374 ptid_t.
8375 (discard_queued_stop_replies): Add `pid' argument.
8376 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8377 changes. Don't reference the `attached' global.
8378 (attach_inferior): Adjust to mywait interface changes.
8379 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8380 features. Handle and report "multiprocess+". Handle
8381 "qAttached:PID".
8382 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8383 changes.
8384 (handle_v_kill): New.
8385 (handle_v_stopped): Adjust to use target_pid_to_str.
8386 (handle_v_requests): Allow multiple attaches and runs when
8387 multiprocess extensions are in effect. Handle "vKill".
8388 (myresume): Adjust to use ptids.
8389 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8390 (handle_status): Adjust to discard_queued_stop_replies interface
8391 change.
8392 (first_thread_of, kill_inferior_callback)
8393 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8394 (main): Call initialize_inferiors. Adjust to use ptids, killing
8395 and detaching from all inferiors. Handle multiprocess packet
8396 variants.
8397 * linux-low.h: Include gdb_proc_service.h.
8398 (struct process_info_private): New.
8399 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8400 <lwpid_of>: Use ptid_get_lwp.
8401 (get_lwp_thread): Adjust.
8402 (struct lwp_info): Add `dead' member.
8403 (find_lwp_pid): Declare.
8404 * linux-low.c (thread_db_active): Delete.
8405 (new_inferior): Adjust comment.
8406 (inferior_pid): Delete.
8407 (linux_add_process): New.
8408 (handle_extended_wait): Adjust.
8409 (add_lwp): Change unsigned long to ptid.
8410 (linux_create_inferior): Add process to processes table. Adjust
8411 to use ptids. Don't set new_inferior here.
8412 (linux_attach_lwp): Rename to ...
8413 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8414 it. Adjust to use ptids.
8415 (linux_attach_lwp): New.
8416 (linux_attach): Add process to processes table. Don't set
8417 new_inferior here.
8418 (struct counter): New.
8419 (second_thread_of_pid_p, last_thread_of_process_p): New.
8420 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8421 multiple processes.
8422 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8423 processes. Remove process from process table.
8424 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8425 to multiple processes.
8426 (any_thread_of): New.
8427 (linux_detach): Add `pid' argument, and handle it. Remove process
8428 from processes table.
8429 (linux_join): Add `pid' argument. Handle it.
8430 (linux_thread_alive): Change unsighed long argument to ptid_t.
8431 Consider dead lwps as not being alive.
8432 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8433 threads we're not interested in.
8434 (same_lwp, find_lwp_pid): New.
8435 (linux_wait_for_lwp): Change `pid' argument's type from int to
8436 ptid_t. Adjust.
8437 (linux_wait_for_event): Rename to ...
8438 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8439 from int to ptid_t. Adjust.
8440 (linux_wait_for_event): New.
8441 (linux_wait_1): Add `ptid' argument. Change return type to
8442 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8443 that exit from the process table.
8444 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8445 Adjust.
8446 (mark_lwp_dead): New.
8447 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8448 stopping all threads, mark its main lwp as dead.
8449 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8450 ptids.
8451 (fetch_register, usr_store_inferior_registers)
8452 (regsets_fetch_inferior_registers)
8453 (regsets_store_inferior_registers, linux_read_memory)
8454 (linux_write_memory): Inline `inferior_pid'.
8455 (linux_look_up_symbols): Adjust to use per-process
8456 `thread_db_active'.
8457 (linux_request_interrupt): Adjust to use ptids.
8458 (linux_read_auxv): Inline `inferior_pid'.
8459 (initialize_low): Don't reference thread_db_active.
8460 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8461 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8462 (ps_getpid): Return the pid of the current inferior.
8463 * thread-db.c (proc_handle, thread_agent): Delete.
8464 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8465 per-process data.
8466 (find_one_thread): Change argument type to ptid_t. Adjust to
8467 per-process data.
8468 (maybe_attach_thread): Adjust to per-process data and ptids.
8469 (thread_db_find_new_threads): Ditto.
8470 (thread_db_init): Ditto.
8471 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8472 processes table. Adjust to use ptids.
8473 (spu_kill, spu_detach): Adjust interface. Remove process from
8474 processes table.
8475 (spu_join, spu_thread_alive): Adjust interface.
8476 (spu_wait): Adjust interface. Remove process from processes
8477 table. Adjust to use ptids.
8478 * win32-low.c (current_inferior_tid): Delete.
8479 (current_inferior_ptid): New.
8480 (debug_event_ptid): New.
8481 (thread_rec): Take a ptid. Adjust.
8482 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8483 (child_delete_thread): Ditto.
8484 (do_initial_child_stuff): Add `attached' argument. Add process to
8485 processes table.
8486 (child_fetch_inferior_registers, child_store_inferior_registers):
8487 Adjust.
8488 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8489 (win32_attach): Pass 1 to do_initial_child_stuff.
8490 (win32_kill): Adjust interface. Remove process from processes
8491 table.
8492 (win32_detach): Ditto.
8493 (win32_join): Adjust interface.
8494 (win32_thread_alive): Take a ptid.
8495 (win32_resume): Adjust to use ptids.
8496 (get_child_debug_event): Ditto.
8497 (win32_wait): Adjust interface. Remove exiting process from
8498 processes table.
8499
bd99dc85
PA
85002009-04-01 Pedro Alves <pedro@codesourcery.com>
8501
8502 Non-stop mode support.
8503
8504 * server.h (non_stop): Declare.
8505 (gdb_client_data, handler_func): Declare.
8506 (delete_file_handler, add_file_handler, start_event_loop):
8507 Declare.
8508 (handle_serial_event, handle_target_event, push_event)
8509 (putpkt_notif): Declare.
8510 * target.h (enum resume_kind): New.
8511 (struct thread_resume): Replace `step' field by `kind' field.
8512 (TARGET_WNOHANG): Define.
8513 (struct target_ops) <wait>: Add `options' argument.
8514 <supports_non_stop, async, start_non_stop>: New fields.
8515 (target_supports_non_stop, target_async): New.
8516 (start_non_stop): Declare.
8517 (mywait): Add `options' argument.
8518 * target.c (mywait): Add `options' argument. Print child exit
8519 notifications here.
8520 (start_non_stop): New.
8521 * server.c (non_stop, own_buf, mem_buf): New globals.
8522 (struct vstop_notif): New.
8523 (notif_queue): New global.
8524 (queue_stop_reply, push_event, discard_queued_stop_replies)
8525 (send_next_stop_reply): New.
8526 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8527 interface changes.
8528 (attach_inferior): In non-stop mode, don't wait for the target
8529 here.
8530 (handle_general_set): Handle QNonStop.
8531 (handle_query): When handling qC, return the current general
8532 thread, instead of the first thread of the list.
8533 (handle_query): If the backend supports non-stop mode, include
8534 QNonStop+ in the qSupported query response.
8535 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8536 and non-stop mode.
8537 (handle_v_attach, handle_v_run): Handle non-stop mode.
8538 (handle_v_stopped): New.
8539 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8540 (myresume): Adjust to use resume_kind. Handle non-stop.
8541 (queue_stop_reply_callback): New.
8542 (handle_status): Handle non-stop mode.
8543 (main): Clear non_stop flag on reconnection. Use the event-loop.
8544 Refactor serial protocol handling from here ...
8545 (process_serial_event): ... to this new function. When GDB
8546 selects any thread, select one here. In non-stop mode, wait until
8547 GDB acks all pending events before exiting.
8548 (handle_serial_event, handle_target_event): New.
8549 * remote-utils.c (remote_open): Install remote_desc in the event
8550 loop.
8551 (remote_close): Remove remote_desc from the event loop.
8552 (putpkt_binary): Rename to...
8553 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8554 (putpkt_binary): New as wrapper around putpkt_binary_1.
8555 (putpkt_notif): New.
8556 (prepare_resume_reply): In non-stop mode, don't change the
8557 general_thread.
8558 * event-loop.c: New.
8559 * Makefile.in (OBJ): Add event-loop.o.
8560 (event-loop.o): New rule.
8561
8562 * linux-low.h (pid_of): Moved here.
8563 (lwpid_of): New.
8564 (get_lwp_thread): Use lwpid_of.
8565 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8566 * linux-low.c (pid_of): Delete.
8567 (inferior_pid): Use lwpid_of.
8568 (linux_event_pipe): New.
8569 (target_is_async_p): New.
8570 (delete_lwp): New.
8571 (handle_extended_wait): Use lwpid_of.
8572 (add_lwp): Don't set lwpid field.
8573 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8574 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8575 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8576 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8577 first. Adjust to linux_wait_for_event interface changes. Use
8578 lwpid_of.
8579 (linux_detach): Don't delete the main lwp here.
8580 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8581 (status_pending_p): Don't consider explicitly suspended lwps.
8582 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8583 pointer. Add OPTIONS argument. Change return type to int. Use
8584 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8585 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8586 pointer. Add status pointer argument. Return a pid instead of a
8587 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8588 changes. In non-stop mode, don't switch to a random thread.
8589 (linux_wait): Rename to...
8590 (linux_wait_1): ... this. Add target_options argument, and handle
8591 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8592 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8593 clean exit and signal exit code. Don't stop all threads in
8594 non-stop mode. In all-stop mode, only stop all threads when
8595 reporting a stop to GDB. Handle explicit thread stop requests.
8596 (async_file_flush, async_file_mark): New.
8597 (linux_wait): New.
8598 (send_sigstop): Use lwpid_of.
8599 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8600 interface changes. In non-stop mode, don't switch to a random
8601 thread.
8602 (linux_resume_one_lwp): Use lwpid_of.
8603 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8604 (linux_resume_one_thread): ... this. Handle resume_stop. In
8605 non-stop mode, don't look for pending flag in all threads.
8606 (resume_status_pending_p): Don't consider explicitly suspended
8607 threads.
8608 (my_waitpid): Reimplement. Emulate __WALL.
8609 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8610 Use lwpid_of.
8611 (sigchld_handler, linux_supports_non_stop, linux_async)
8612 (linux_start_non_stop): New.
8613 (linux_target_ops): Register linux_supports_non_stop, linux_async
8614 and linux_start_non_stop.
8615 (initialize_low): Install SIGCHLD handler.
8616 * thread-db.c (thread_db_create_event, find_one_thread)
8617 (thread_db_get_tls_address): Use lwpid_of.
8618 * win32-low.c (win32_detach): Adjust to use resume_kind.
8619 (win32_wait): Add `options' argument.
8620 * spu-low.c (spu_resume): Adjust to use resume_kind.
8621 (spu_wait): Add `options' argument.
8622
5b1c542e
PA
86232009-04-01 Pedro Alves <pedro@codesourcery.com>
8624
8625 Decouple target code from remote protocol.
8626
8627 * target.h (enum target_waitkind): New.
8628 (struct target_waitstatus): New.
8629 (struct target_ops) <wait>: Return an unsigned long. Take a
8630 target_waitstatus pointer instead of a char pointer.
8631 (mywait): Likewise.
8632 * target.c (mywait): Change prototype to return an unsigned long.
8633 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8634 * server.h (thread_from_wait, old_thread_from_wait): Delete
8635 declarations.
8636 (prepare_resume_reply): Change prototype to take a
8637 target_waitstatus.
8638 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8639 (last_status, last_ptid): New.
8640 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8641 pid instead of a signal.
8642 (attach_inferior): Remove "status" and "signal" parameters.
8643 Adjust.
8644 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8645 not as an address.
8646 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8647 (handle_v_requests, myresume): Remove "status" and "signal"
8648 parameters. Adjust.
8649 (handle_status): New.
8650 (main): Delete local `status'. Adjust.
8651 * remote-utils.c: Include target.h.
8652 (prepare_resume_reply): Change prototype to take a
8653 target_waitstatus. Adjust.
8654
8655 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8656 interface.
8657 * spu-low.c (spu_wait): Adjust.
8658 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8659 Delete.
8660 (win32_wait): Adjust.
8661
2bd7c093
PA
86622009-04-01 Pedro Alves <pedro@codesourcery.com>
8663
8664 * target.h (struct thread_resume): Delete leave_stopped member.
8665 (struct target_ops): Add a `n' argument to the `resume' callback.
8666 * server.c (start_inferior): Adjust.
8667 (handle_v_cont, myresume): Adjust.
8668 * linux-low.c (check_removed_breakpoint): Adjust to resume
8669 interface change, and to removed leave_stopped field.
8670 (resume_ptr): Delete.
8671 (struct thread_resume_array): New.
8672 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8673 resume interface change.
8674 (linux_continue_one_thread, linux_queue_one_thread)
8675 (resume_status_pending_p): Check if the resume field is NULL
8676 instead of checking the leave_stopped member.
8677 (linux_resume): Adjust to the target resume interface change.
8678 * spu-low.c (spu_resume): Adjust to the target resume interface
8679 change.
8680 * win32-low.c (win32_detach, win32_resume): Ditto.
8681
c35fafde
PA
86822009-04-01 Pedro Alves <pedro@codesourcery.com>
8683
8684 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8685 flag.
8686 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8687 pending.
8688 (linux_continue_one_thread): Only preserve the stepping flag if
8689 there's a pending breakpoint.
8690
0a59d50b
PA
86912009-03-31 Pedro Alves <pedro@codesourcery.com>
8692
8693 * server.c (main): After the inferior having exited, call
8694 remote_close before exiting gdbserver.
8695
f04c6d38
TJB
86962009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8697
8698 Fix size of FPSCR in Power 7 processors.
8699 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8700 (PPC_FEATURE_HAS_DFP): New #define.
8701 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8702 size of the FPSCR.
8703
78e5cee6
PA
87042009-03-23 Pedro Alves <pedro@codesourcery.com>
8705
8706 * server.c (handle_query) Whitespace and formatting.
8707
1b3f6016
PA
87082009-03-22 Pedro Alves <pedro@codesourcery.com>
8709
8710 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8711 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8712 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8713 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8714 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8715 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8716 Makefile.in, configure.ac: Fix whitespace throughout.
8717 * configure: Regenerate.
8718
a07b2135
PA
87192009-03-22 Pedro Alves <pedro@codesourcery.com>
8720
8721 * inferiors.c (find_inferior): Make it safe for the callback
8722 function to delete the currently iterated inferior.
8723
67cc2626
PA
87242009-03-22 Pedro Alves <pedro@codesourcery.com>
8725
8726 * Makefile.in (linuw_low_h): Move higher.
8727 (thread-db.o): Depend on $(linux_low_h).
8728
54a0b537
PA
87292009-03-17 Pedro Alves <pedro@codesourcery.com>
8730
8731 Rename "process" to "lwp" throughout.
8732
8733 * linux-low.c (all_processes): Rename to...
8734 (all_lwps): ... this.
8735 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8736 (add_process): Rename to ...
8737 (add_lwp): ... this. Adjust.
8738 (linux_create_inferior): Adjust.
8739 (linux_attach_lwp): Adjust.
8740 (linux_attach): Adjust.
8741 (linux_kill_one_process): Rename to ...
8742 (linux_kill_one_lwp): ... this. Adjust.
8743 (linux_kill): Adjust.
8744 (linux_detach_one_process): Rename to ...
8745 (linux_detach_one_lwp): ... this. Adjust.
8746 (linux_detach): Adjust.
8747 (check_removed_breakpoint): Adjust.
8748 (status_pending_p): Adjust.
8749 (linux_wait_for_process): Rename to ...
8750 (linux_wait_for_lwp): ... this. Adjust.
8751 (linux_wait_for_event): Adjust.
8752 (send_sigstop): Adjust.
8753 (wait_for_sigstop): Adjust.
8754 (stop_all_processes): Rename to ...
8755 (stop_all_lwps): ... this.
8756 (linux_resume_one_process): Rename to ...
8757 (linux_resume_one_lwp): ... this. Adjust.
8758 (linux_set_resume_request, linux_continue_one_thread)
8759 (linux_queue_one_thread, resume_status_pending_p)
8760 (usr_store_inferior_registers, regsets_store_inferior_registers)
8761 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8762 Adjust.
8763 * linux-low.h (get_process): Rename to ...
8764 (get_lwp): ... this. Adjust.
8765 (get_thread_process): Rename to ...
8766 (get_thread_lwp): ... this. Adjust.
8767 (get_process_thread): Rename to ...
8768 (get_lwp_thread): ... this. Adjust.
8769 (struct process_info): Rename to ...
8770 (struct lwp_info): ... this.
8771 (all_processes): Rename to ...
8772 (all_lwps): ... this.
8773 * proc-service.c (ps_lgetregs): Adjust.
8774 * thread-db.c (thread_db_create_event, find_one_thread)
8775 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8776
0b16c5cf
PA
87772009-03-14 Pedro Alves <pedro@codesourcery.com>
8778
8779 * server.c (handle_query): Handle "qAttached".
8780
32de4b9d
NS
87812009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8782
8783 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8784 GPLv3, update license URL.
8785
2aecd87f
DE
87862009-03-01 Doug Evans <dje@google.com>
8787
93efd302 8788 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8789 (server_h): Add gdb_signals.h.
8790 (signals.o): Update.
8791 * server.h (target_signal_from_host,target_signal_to_host_p)
8792 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8793
86b1f9c5
PM
87942009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8795
8796 * remote-utils.c (getpkt): Also generate remote-debug
8797 information if noack_mode is set.
8798
4aa995e1
PA
87992009-02-06 Pedro Alves <pedro@codesourcery.com>
8800
8801 * server.c (handle_query): Report qXfer:siginfo:read and
8802 qXfer:siginfo:write as supported and handle them.
8803 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8804 * linux-low.c (linux_xfer_siginfo): New.
8805 (linux_target_ops): Set it.
8806
62709adf
PA
88072009-01-26 Pedro Alves <pedro@codesourcery.com>
8808
8809 * server.c (gdbserver_usage): Mention --remote-debug.
8810 (main): Accept '--remote-debug' switch.
8811
aef93bd7
DE
88122009-01-18 Doug Evans <dje@google.com>
8813
8814 * regcache.c (new_register_cache): No need to check result of xcalloc.
8815 * server.c (handle_search_memory): Back out calls to xmalloc,
8816 result is checked and error is returned to user upon failure.
8817 (handle_query): Ditto. Add more checks for result of malloc.
8818 (handle_v_cont): Check result of malloc, report error back to
8819 user upon failure.
8820 (handle_v_run): Ditto. Call freeargv.
8821 * server.h (freeargv): Declare.
8822 * utils.c (freeargv): New fn.
8823
54363045
DE
88242009-01-15 Doug Evans <dje@google.com>
8825
f626972c
DE
8826 * gdbreplay.c (perror_with_name): Make arg const char *.
8827 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8828 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8829 * utils.c (perror_with_name): Make arg const char *.
54363045 8830
18aae699
PA
88312009-01-14 Pedro Alves <pedro@codesourcery.com>
8832
8833 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8834 when handling a EXIT_PROCESS_DEBUG_EVENT.
8835
ff703abe
JB
88362009-01-06 Joel Brobecker <brobecker@adacore.com>
8837
8838 * gdbreplay.c (gdbreplay_version): Update copyright year.
8839 * server.c (gdbserver_version): Likewise.
8840
f21cc1a2 88412009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8842
8843 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8844 (handle_extended_wait): Improve comment.
0e21c1ec 8845
bca929d3
DE
88462008-12-13 Doug Evans <dje@google.com>
8847
8848 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8849 * server.h (ATTR_MALLOC): New macro.
8850 (xmalloc,xcalloc,xstrdup): Declare.
8851 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8852 * inferiors.c: Ditto.
8853 * linux-low.c: Ditto.
8854 * mem-break.c: Ditto.
8855 * regcache.c: Ditto.
8856 * remote-utils.c: Ditto.
8857 * server.c: Ditto.
8858 * target.c: Ditto.
8859 * win32-low.c: Ditto.
8860
97438e3f
DE
88612008-12-12 Doug Evans <dje@google.com>
8862
896c7fbb
DE
8863 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8864 in debugging printf.
8865
97438e3f
DE
8866 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8867
e3b886f8
DE
88682008-12-09 Doug Evans <dje@google.com>
8869
8870 * linux-low.h (struct process_info): Delete member tid, unused.
8871 * thread-db.c (find_one_thread): Update.
8872 (maybe_attach_thread): Update.
8873
07e059b5
VP
88742008-12-02 Pedro Alves <pedro@codesourcery.com>
8875
889bf7c5
PA
8876 * target.h (struct target_ops): Add qxfer_osdata member.
8877 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8878 and dirent.h.
8879 (linux_qxfer_osdata): New functions.
8880 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8881 callback.
8882 * server.c (handle_query): Handle "qXfer:osdata:read:".
8883 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8884 (buffer_xml_printf): New functions.
8885 * server.h (struct buffer): New.
8886 (buffer_grow_str, buffer_grow_str0): New macros.
8887 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8888 (buffer_xml_printf): Declare.
07e059b5 8889
4cab47ab
DE
88902008-11-24 Doug Evans <dje@google.com>
8891
8892 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8893
f142445f
DJ
88942008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8895
8896 * server.c (handle_v_run): Always use the supplied argument list.
8897
d0107bb6 88982008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8899
d0107bb6
BW
8900 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8901 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8902
2c4ad781
TJB
89032008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8904
8905 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8906 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8907 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8908 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8909 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8910 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8911 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8912 XML target descriptions.
8913 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8914 when inferior is running on an ISA 2.05 or later processor. Add
8915 special case to return offset for full 64-bit slot of FPSCR when
8916 in 32-bits.
8917
dfb64f85
DJ
89182008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8919
8920 * Makefile.in (SFILES, clean): Added sparc64 files.
8921 (reg-sparc64.o, reg-sparc64.c): New.
8922 * configure.srv (sparc*-*-linux*): New configuration.
8923 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8924 syscall arguments for SPARC.
8925 (regsets_store_inferior_registers): Likewise.
8926 * linux-sparc-low.c: New file.
8927
66b6e1dd
DE
89282008-10-21 Doug Evans <dje@google.com>
8929
8930 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8931 (READLINE_DIR,READLINE_DEP): Delete.
8932 (INTERNAL_CFLAGS): Update.
8933 (LINTFLAGS): Update.
8934
9b710a42
PA
89352008-10-10 Pedro Alves <pedro@codesourcery.com>
8936
8937 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8938 whole argv from the last run, not just argv[0].
8939
5822d809
PA
89402008-09-08 Pedro Alves <pedro@codesourcery.com>
8941
8942 * regcache.c (new_register_cache): Return NULL if the register
8943 cache size isn't known yet.
8944 (free_register_cache): Avoid dereferencing a NULL regcache.
8945
74aac56f
DJ
89462008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8947
8948 * configure.srv: Merge MIPS and MIPS64.
8949
400b20f5
MR
89502008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8951
8952 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8953
677c5bb1
LM
89542008-08-18 Luis Machado <luisgpm@br.ibm.com>
8955
8956 * Makefile.in: Add required vsx dependencies.
8957
8958 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8959 Declare init_registers_powerpc_vsx32l.
8960 Declare init_registers_powerpc_vsx64l.
8961 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8962 (ppc_arch_setup): Check for VSX in hwcap.
8963 (ppc_fill_vsxregset): New function.
8964 (ppc_store_vsxregset): New function.
8965 Add new VSX entry in regset_info target_regsets.
8966
8967 * configure.srv: Add new VSX dependencies.
8968
a6f3e723
SL
89692008-08-12 Pedro Alves <pedro@codesourcery.com>
8970
8971 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8972 (remote_open): Set or clear transport_is_reliable.
8973 (putpkt_binary): Don't expect acks in noack mode.
8974 (getpkt): Don't send ack/nac in noack mode.
8975 * server.c (handle_general_set): Handle QStartNoAckMode.
8976 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8977 qSupported.
8978 (main): Reset noack_mode on every connection.
8979 * server.h (noack_mode): Declare.
8980
a417dc56
RW
89812008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8982
8983 * Makefile.in (GDBREPLAY_OBS): New variable.
8984 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8985
3221518c
UW
89862008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8987 Daniel Jacobowitz <dan@codesourcery.com>
8988
8989 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8990 (usr_store_inferior_registers): Likewise.
8991 (regsets_store_inferior_registers): Likewise.
8992
ec56be1b
PA
89932008-07-31 Rolf Jansen <rj@surtec.com>
8994 Pedro Alves <pedro@codesourcery.com>
8995
8996 * configure.ac: Check for memmem declaration.
8997 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8998 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8999 (disable_packet_qfThreadInfo): Unconditionally compile.
9000 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9001 * configure, config.in: Regenerate.
9002
2fe5e3ff
DE
90032008-07-28 Doug Kwan <dougkwan@google.com>
9004
9005 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9006 (linux_write_memory): Remove declaration of errno.
9007
836acd6d
UW
90082008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9009
9010 * linux-low.c (handle_extended_wait): Do not use "status"
9011 variable uninitialized.
9012
aeba519e
PA
90132008-07-07 Pedro Alves <pedro@codesourcery.com>
9014
9015 * server.c (handle_v_attach): Inhibit reporting dll changes.
9016
db42f210
PA
90172008-06-27 Pedro Alves <pedro@codesourcery.com>
9018
9019 * remote-utils.c (prepare_resume_reply): If requested, don't
9020 output "thread:TID" in the T stop reply.
9021
9022 * server.c (disable_packet_vCont, disable_packet_Tthread)
9023 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9024 (handle_query): If requested, disable support for qC, qfThreadInfo
9025 and qsThreadInfo.
9026 (handle_v_requests): If requested, disable support for vCont.
9027 (gdbserver_show_disableable): New.
9028 (main): Handle --disable-packet and --disable-packet=LIST.
9029
9030 * server.h (disable_packet_vCont, disable_packet_Tthread)
9031 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9032
8e4c5421
CD
90332008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9034
9035 * server.c (gdbserver_usage): Mention --version.
9036
6e23a804
DJ
90372008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9038
9039 * Makefile.in (gdbreplay.o): New rule.
9040
90aa6a40
JM
90412008-06-06 Joseph Myers <joseph@codesourcery.com>
9042
9043 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9044 message, not gdbserver.
9045
c16158bc 90462008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9047 Nathan Sidwell <nathan@codesourcery.com>
9048 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9049
9050 * acinclude.m4: Include ../../config/acx.m4.
9051 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9052 * configure, config.in: Regenerate.
9053 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9054 * server.c (gdbserver_version): Print PKGVERSION.
9055 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9056 (main): Adjust gdbserver_usage calls.
9057 * gdbreplay.c (version, host_name): Add declarations.
9058 (gdbreplay_version, gdbreplay_usage): New.
9059 (main): Accept --version and --help options.
9060
aeb75bf5
DJ
90612008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9062
9063 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9064 (arm_breakpoint_at): Handle Thumb.
9065 (the_low_target): Add comment.
9066
76b233dd
UW
90672008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9068
9069 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9070
08388c79
DE
90712008-05-09 Doug Evans <dje@google.com>
9072
a3c83fae
DE
9073 * server.h (decode_search_memory_packet): Declare.
9074 * remote-utils.c (decode_search_memory_packet): New fn.
9075 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9076 (handle_search_memory): New fn.
9077 (handle_query): Process qSearch:memory packets.
9078
bb9c3d36
UW
90792008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9080
9081 * regcache.c (registers_length): Remove.
9082 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9083 full register packet.
9084 * regcache.h (registers_length): Remove prototype.
9085 * server.h (PBUFSIZ): Define to 16384.
9086
7284e1be
UW
90872008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9088
9089 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9090 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9091 powerpc-64l.o, and powerpc-altivec64l.o.
9092 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9093 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9094 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9095 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9096 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9097 to srv_xmlfiles.
9098
9099 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9100 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9101 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9102 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9103 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9104 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9105 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9106 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9107 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9108 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9109 (clean): Update.
9110
9111 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9112 (init_registers_powerpc_32l): ... this new prototype.
9113 (init_registers_powerpc_32): Remove, replace by ...
9114 (init_registers_powerpc_altivec32l): ... this new prototype.
9115 (init_registers_powerpc_e500): Remove, replace by ...
9116 (init_registers_powerpc_e500l): ... this new prototype.
9117 (init_registers_ppc64): Remove, replace by ...
9118 (init_registers_powerpc_64l): ... this new prototype.
9119 (init_registers_powerpc_64): Remove, replace by ...
9120 (init_registers_powerpc_altivec64l): ... this new prototype.
9121 (ppc_num_regs): Set to 73.
9122 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9123 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9124 (ppc_cannot_store_register): Handle orig_r3 and trap.
9125 (ppc_arch_setup): Update init_registers_... calls.
9126 (ppc_fill_gregset): Handle orig_r3 and trap.
9127
9128 * inferiors.c (clear_inferiors): Reset current_inferior.
9129
fdc59709
PB
91302008-04-23 Paolo Bonzini <bonzini@gnu.org>
9131
889bf7c5
PA
9132 * acinclude.m4: Add override.m4.
9133 * configure: Regenerate.
fdc59709 9134
c9b2f845
UW
91352008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9136
9137 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9138 initial call to init_register_ppc64.
9139
550512b8
UW
91402008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9141
43aaf8b6
PA
9142 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9143 single powerpc*-*-linux* case.
550512b8
UW
9144 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9145
b6430ec3
UW
91462008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9147
9148 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9149 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9150 from reg_xmlfiles.
9151 * linux-ppc-low.c: Include <elf.h>.
9152 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9153 (ppc_hwcap): New global variable.
9154 (ppc_regmap): Remove __SPE__ #ifdef sections.
9155 (ppc_regmap_e500): New global variable.
9156 (ppc_cannot_store_register): Update __SPE__ special case.
9157 (ppc_get_hwcap): New function.
9158 (ppc_arch_setup): Use it to determine whether inferior supports
9159 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9160 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9161 Do not access registers if target does not support AltiVec.
9162 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9163 Do not access registers if target does not support SPE.
9164 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9165
52fa2412
UW
91662008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9167
9168 * linux-low.c (disabled_regsets, num_regsets): New.
9169 (use_regsets_p): Delete.
9170 (linux_wait_for_process): Clear disabled_regsets.
9171 (regsets_fetch_inferior_registers): Check and set it.
9172 (regsets_store_inferior_registers): Likewise.
9173 (linux_fetch_registers, linux_store_registers): Do not use
9174 use_regsets_p.
9175 (initialize_low): Allocate disabled_regsets.
9176
e28b3332
DJ
91772008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9178
9179 * Makefile.in (LIBOBJS): New.
9180 (OBS): Use LIBOBJS.
9181 (memmem.o): New rule.
9182 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9183 * configure: Regenerated.
9184
4536995d
UW
91852008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9186
9187 * server.c (handle_query): Never return "unsupported" for
9188 qXfer:features:read queries.
9189
221c031f
UW
91902008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9191
9192 * server.c (get_features_xml): Fix inverted condition.
9193 (handle_query): Always support qXfer:feature:read.
9194
ccd213ac
DJ
91952008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9196
9197 * server.c (wrapper_argv): New.
9198 (start_inferior): Handle wrapper_argv. If set, expect an extra
9199 trap.
9200 (gdbserver_usage): Document --wrapper.
9201 (main): Parse --wrapper.
9202
6fe305f7
UW
92032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9204
9205 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9206 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9207 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9208 (ppc_set_pc): Likewise.
9209 (ppc_arch_setup): New function.
9210 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9211 of collect_register.
889bf7c5 9212 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9213
5b0a002e
UW
92142008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9215
9216 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9217 instead of linux-ppc64-low.o.
9218 * linux-ppc64-low.c: Remove file.
9219 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9220 (linux-ppc64-low.o): Remove rule.
9221
9222 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9223 (init_registers_powerpc_64): Likewise.
9224 (ppc_regmap): Conditionally define depending on __powerpc64__.
9225 (ppc_cannot_store_register): Do not special-case "fpscr" when
9226 compiled on __powerpc64__.
9227 (ppc_collect_ptrace_register): New function.
9228 (ppc_supply_ptrace_register): New function.
9229 (ppc_breakpoint): Change type to "unsigned int".
9230 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9231 (the_low_target): Conditionally provide initializers for the
889bf7c5 9232 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9233 collect_ptrace_register and supply_ptrace_register members.
9234
9b4b61c8
UW
92352008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9236
9237 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9238 * server.c (gdbserver_xmltarget): Define.
9239 (get_features_xml): Use it to replace "target.xml" and arch_string.
9240
9241 * configure.srv: Remove srv_xmltarget. Add XML files that were
9242 mentioned there to srv_xmlfiles instead. Remove conditional tests
9243 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9244 srv_xmlfiles and srv_regobj to include all possible choices.
9245 * configure.ac (srv_xmltarget): Remove.
9246 (srv_xmlfiles): Do not add "target.xml".
9247 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9248 checks for supplementary target information.
9249 * configure: Regenerate.
9250 * Makefile.in (XML_TARGET): Remove.
9251 (target.xml): Remove rule.
9252 (clean): Do not clean up target.xml.
9253 (.PRECIOUS): Do not mention target.xml.
9254
9255 * target.h (struct target_ops): Remove arch_string member.
9256 * linux-low.c (linux_arch_string): Remove.
9257 (linux_target_ops): Remove arch_string initializer.
9258 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9259 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9260 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9261 * spu-low.c (spu_arch_string): Remove.
9262 (spu_target_ops): Remove arch_string initializer.
9263 * win32-low.c (win32_arch_string): Remove.
9264 (win32_target_ops): Remove arch_string initializer.
9265 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9266 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9267 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9268
ee1a7ae4
UW
92692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9270
9271 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9272 by collect_ptrace_register and supply_ptrace_register hooks.
9273 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9274 instead of checking for the_low_target.left_pad_xfer.
9275 (usr_store_inferior_registers): Use collect_ptrace_register callback
9276 instead of checking for the_low_target.left_pad_xfer.
9277
9278 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9279 (s390_supply_ptrace_register): Likewise.
9280 (s390_fill_gregset): Call s390_collect_ptrace_register.
9281 (the_low_target): Update.
9282
9283 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9284 (ppc_supply_ptrace_register): Likewise.
9285 (the_low_target): Update.
9286
9287 * linux-i386-low.c (the_low_target): Update.
9288 * linux-x86-64-low.c (the_low_target): Update.
9289
d61ddec4
UW
92902008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9291
9292 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9293 reg-s390.o and reg-s390x.o.
9294
9295 * linux-low.c (new_inferior): New global variable.
9296 (linux_create_inferior, linux_attach): Set it.
9297 (linux_wait_for_process): Call the_low_target.arch_setup after the
9298 target has stopped for the first time.
9299 (initialize_low): Do not call the_low_target.arch_setup.
9300
9301 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9302 (s390_set_pc): Likewise.
9303 (s390_arch_setup): New function.
9304 (the_low_target): Use s390_arch_setup as arch_setup routine.
9305
9306 * regcache.c (realloc_register_cache): New function.
9307 (set_register_cache): Call it for each existing regcache.
9308
d05b4ac3
UW
93092008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9310
9311 * server.h (init_registers): Remove prototype.
9312
9313 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9314 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9315 instead of init_registers ().
9316 * linux-arm-low.c (init_registers_arm): Add prototype.
9317 (init_registers_arm_with_iwmmxt): Likewise.
9318 (the_low_target): Add initializer for arch_setup field.
9319 * linux-cris-low.c (init_registers_cris): Add prototype.
9320 (the_low_target): Add initializer for arch_setup field.
9321 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9322 (the_low_target): Add initializer for arch_setup field.
9323 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9324 (the_low_target): Add initializer for arch_setup field.
9325 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9326 (the_low_target): Add initializer for arch_setup field.
9327 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9328 (the_low_target): Add initializer for arch_setup field.
9329 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9330 (the_low_target): Add initializer for arch_setup field.
9331 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9332 (init_registers_mips64_linux): Likewise.
9333 (the_low_target): Add initializer for arch_setup field.
9334 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9335 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9336 (the_low_target): Add initializer for arch_setup field.
9337 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9338 (init_registers_powerpc_64): Likewise.
9339 (the_low_target): Add initializer for arch_setup field.
9340 * linux-s390-low.c (init_registers_s390): Add prototype.
9341 (init_registers_s390x): Likewise.
9342 (the_low_target): Add initializer for arch_setup field.
9343 * linux-sh-low.c (init_registers_sh): Add prototype.
9344 (the_low_target): Add initializer for arch_setup field.
9345 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9346 (the_low_target): Add initializer for arch_setup field.
9347 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9348 (the_low_target): Add initializer for arch_setup field.
9349
9350 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9351 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9352 instead of init_registers ().
9353 * win32-arm-low.c (init_registers_arm): Add prototype.
9354 (the_low_target): Add initializer for arch_setup field.
9355 * win32-i386-low.c (init_registers_i386): Add prototype.
9356 (the_low_target): Add initializer for arch_setup field.
9357
9358 * spu-low.c (init_registers_spu): Add prototype.
9359 (initialize_low): Call initialie_registers_spu () instead of
9360 initialize_registers ().
9361
fd96d250
PA
93622008-02-19 Pedro Alves <pedro@codesourcery.com>
9363
9364 * server.c (handle_v_requests): When handling the vRun and vAttach
9365 packets, if already debugging a process, don't kill it. Return an
9366 error instead.
9367
d41b6bb4
DJ
93682008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9369
9370 * server.c (handle_query): Correct length check.
9371
5ac588cf
PA
93722008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9373
9374 * win32-low.c (do_initial_child_stuff): Add process handle
9375 parameter. Set current_process_handle and current_process_id from the
9376 parameters. Clear globals.
9377 (win32_create_inferior): Don't set current_process_handle and
9378 current_process_id here. Instead pass them on the call to
9379 do_initial_child_stuff.
9380 (win32_attach): Likewise.
9381 (win32_clear_inferiors): New.
9382 (win32_kill): Don't close the current process handle or the
9383 current thread handle here. Instead call win32_clear_inferiors.
9384 (win32_detach): Don't open a new handle to the process. Call
9385 win32_clear_inferiors.
9386 (win32_join): Don't rely on current_process_handle; open a new
9387 handle using the process id.
9388 (win32_wait): Call win32_clear_inferiors when the inferior process
9389 has exited.
9390
ecd7ecbc
DJ
93912008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9392
9393 * server.c (monitor_show_help): Add "exit".
9394
1525d545
MG
93952008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9396
ecd7ecbc 9397 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9398 (clean): Add reg-xtensa.c.
9399 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9400 * configure.srv (xtensa*-*-linux*) New target.
9401 * linux-xtensa-low.c: New.
9402 * xtensa-xtregs.c: New.
1525d545 9403
59a016f0
PA
94042008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9405
9406 * hostio.c: Don't include errno.h.
9407 (errno_to_fileio_errno): Move to hostio-errno.
9408 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9409 error number outputting to the target->hostio_last_error callback.
9410 (hostio_packet_error): Use FILEIO_EINVAL directly.
9411 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9412 calls to hostio_error.
9413 * hostio-errno.c: New.
9414 * server.h (hostio_last_error_from_errno): Declare.
9415 * target.h (target_ops): Add hostio_last_error member.
9416 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9417 as hostio_last_error handler.
889bf7c5 9418 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9419 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9420 (wince_hostio_last_error): New functions.
9421 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9422 as hostio_last_error handler.
9423 (win32_target_ops) [!_WIN32_WCE]: Register
9424 hostio_last_error_from_errno as hostio_last_error handler.
9425 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9426 (hostio-errno.o): New rule.
9427 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9428 * configure.srv (srv_hostio_err_objs): New variable. Default to
9429 hostio-errno.o.
9430 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9431 * configure: Regenerate.
9432
2d717e4f
DJ
94332008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9434
9435 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9436 (linux_kill, linux_detach): Clean up the process list.
9437 * remote-utils.c (remote_open): Improve port number parsing.
9438 (putpkt_binary, input_interrupt): Only send interrupts if the target
9439 is running.
9440 * server.c (extended_protocol): Make static.
9441 (attached): Define earlier.
9442 (exit_requested, response_needed, program_argv): New variables.
9443 (target_running): New.
9444 (start_inferior): Clear attached here.
9445 (attach_inferior): Set attached here.
9446 (require_running): Define.
9447 (handle_query): Use require_running and target_running. Implement
9448 "monitor exit".
9449 (handle_v_attach, handle_v_run): New.
9450 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9451 (gdbserver_usage): Update.
9452 (main): Redo argument parsing. Handle --debug and --multi. Handle
9453 --attach along with other options or after the port. Save
9454 program_argv. Support no initial program. Resynchronize
9455 communication with GDB after an error. Handle "monitor exit".
9456 Use require_running and target_running. Always allow the extended
9457 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9458 restart in extended mode.
9459 * README: Refer to the GDB manual. Update --attach usage.
9460
7407e2de
AS
94612007-12-20 Andreas Schwab <schwab@suse.de>
9462
9463 * linux-low.c (STACK_SIZE): Define.
9464 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9465 (linux_test_for_tracefork): Likewise.
9466
b65d95c5
DJ
94672007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9468
9469 * linux-low.c (linux_wait_for_event): Update messages. Do not
9470 reinsert auto-delete breakpoints.
9471 * mem-break.c (struct breakpoint): Change return type of handler to
9472 int.
9473 (set_breakpoint_at): Update handler type.
9474 (reinsert_breakpoint_handler): Return 1 instead of calling
9475 delete_breakpoint.
9476 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9477 setting a new one.
9478 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9479 * mem-break.h (set_breakpoint_at): Update handler type.
9480 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9481 * win32-low.c (auto_delete_breakpoint): New.
9482 (get_child_debug_event): Use it.
9483
4e799345
DJ
94842007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9485
9486 * configure.ac: Check for pread and pwrite.
9487 * hostio.c (handle_pread): Fall back to lseek and read.
9488 (handle_pwrite): Fall back to lseek and write.
9489 * config.in, configure: Regenerated.
9490
27524b67
DJ
94912007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9492
9493 * server.c (myresume): Add own_buf argument.
9494 (main): Update calls.
9495
a20d5e98
DJ
94962007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9497
9498 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9499 * remote-utils.c (remote_open): Do not call disable_async_io.
9500 (block_async_io): Delete.
9501 (unblock_async_io): Make static.
9502 (initialize_async_io): New.
9503 * server.c (handle_v_cont): Handle async I/O here.
9504 (myresume): Likewise. Move other common resume tasks here...
9505 (main): ... from here. Call initialize_async_io. Disable async
9506 I/O before the main loop.
9507 * server.h (initialize_async_io): Declare.
9508 (block_async_io, unblock_async_io): Delete prototypes.
9509 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9510
b79d787e
DJ
95112007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9512
9513 * remote-utils.c (readchar): Allow binary data in received messages.
9514
d97903b2
PA
95152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9516
9517 * win32-low.c (attaching): New global.
9518 (win32_create_inferior): Clear the `attaching' global.
9519 (win32_attach): Set the `attaching' global.
9520 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9521 attaching. Only set a breakpoint at the entry point if not
9522 attaching.
9523
311de423
PA
95242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9525
9526 * server.c (main): Don't report dll events on the initial
9527 connection on attaches.
9528
6c2d16d2
PA
95292007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9530
9531 * server.c (main): Relax numerical bases supported for the pid of
9532 the --attach command line argument.
9533
5ca906e6
PA
95342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9535
9536 * win32-low.c (win32_attach): Call OpenProcess before
9537 DebugActiveProcess, not after. Add last error output to error
9538 call.
9539
9c6c8194
PA
95402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9541
9542 * win32-low.c (win32_get_thread_context)
9543 (win32_set_thread_context): New functions.
9544 (thread_rec): Use win32_get_thread_context.
9545 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9546 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9547 field.
9548
4d5d1aaa
PA
95492007-12-03 Leo Zayas
9550 Pedro Alves <pedro_alves@portugalmail.pt>
9551
9552 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9553 global variables.
9554 (child_add_thread): Minor cleanup.
9555 (child_continue): Resume artificially suspended threads before
9556 calling ContinueDebugEvent.
9557 (suspend_one_thread): New.
9558 (fake_breakpoint_event): New.
9559 (get_child_debug_event): Change return type to int. Check here if
9560 gdb sent an interrupt request. If a soft interrupt was requested,
9561 fake a breakpoint event. Return 0 if there is no event to handle,
9562 and 1 otherwise.
9563 (win32_wait): Don't check here if gdb sent an interrupt request.
9564 Ensure there is a valid event to handle.
9565 (win32_request_interrupt): Add soft interruption method as last
9566 resort.
9567
c436e841
PA
95682007-12-03 Leo Zayas
9569 Pedro Alves <pedro_alves@portugalmail.pt>
9570
9571 * win32-low.h (win32_thread_info): Add descriptions to the
9572 structure members. Replace `suspend_count' counter by a
9573 `suspended' flag.
9574 * win32-low.c (thread_rec): Update condition of when to get the
9575 context from the inferior. Rely on ContextFlags being set if it
9576 has already been retrieved. Only suspend the inferior thread if
9577 we haven't already. Warn if that fails.
9578 (continue_one_thread): s/suspend_count/suspended/. Only call
9579 ResumeThread once. Warn if that fails.
9580
e7b5fa67
PA
95812007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9582
9583 * win32-low.c (win32_wait): Don't read from the inferior when it
9584 has already exited.
9585
a385171d
PA
95862007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9587
9588 * Makefile.in (win32_low_h): New variable.
9589 (win32-low.o): Add dependency on $(win32_low_h).
9590 (win32-arm-low.o, win32-i386-low.o): New rules.
9591
f80c84b3
DJ
95922007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9593
9594 * hostio.c: Correct copyright year.
9595
a6b151f1
DJ
95962007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9597
9598 * Makefile.in (OBS): Add hostio.o.
9599 (hostio.o): New rule.
9600 * server.h (handle_vFile): Declare.
9601 * hostio.c: New file.
9602 * server.c (handle_v_requests): Take packet_len and new_packet_len
9603 for binary packets. Call handle_vFile.
9604 (main): Update call to handle_v_requests.
9605
f9387fc3
DJ
96062007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9607
9608 * linux-low.c: Include <sched.h>.
9609
51c2684e
DJ
96102007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9611
9612 * linux-low.c (linux_tracefork_grandchild): New.
9613 (linux_tracefork_child): Use clone.
9614 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9615
75f83163
JB
96162007-10-31 Joel Brobecker <brobecker@adacore.com>
9617
9618 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9619
da5898ce
DJ
96202007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9621
9622 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9623
24a09b5f
DJ
96242007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9625
9626 * inferiors.c (change_inferior_id): Delete.
9627 (add_pid_to_list, pull_pid_from_list): New.
9628 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9629 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9630 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9631 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9632 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9633 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9634 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9635 (using_threads): Always set to 1.
9636 (handle_extended_wait): New.
9637 (add_process): Do not set TID.
9638 (linux_create_inferior): Set must_set_ptrace_flags.
9639 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9640 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9641 (linux_thread_alive): Rename TID argument to LWPID.
9642 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9643 (linux_wait_for_event): Do not use TID or check using_threads. Update
9644 call to dead_thread_notify. Call handle_extended_wait.
9645 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9646 (send_sigstop): Delete sigstop_sent.
9647 (wait_for_sigstop): Avoid TID.
9648 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9649 (linux_test_for_tracefork): New.
9650 (linux_lookup_signals): Use thread_db_active and
9651 linux_supports_tracefork_flag.
9652 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9653 * linux-low.h (get_process_thread): Avoid TID.
9654 (struct process_ifo): Move thread_known and tid to the end. Remove
9655 sigstop_sent.
9656 (linux_attach_lwp, thread_db_init): Update prototypes.
9657 * server.h (change_inferior_id): Delete prototype.
9658 (add_pid_to_list, pull_pid_from_list): New prototypes.
9659 * thread-db.c (thread_db_use_events): New.
9660 (find_first_thread): Rename to...
9661 (find_one_thread): ...this. Update callers and messages. Do not
9662 call fatal. Check thread_db_use_events. Do not call
9663 change_inferior_id or new_thread_notify.
9664 (maybe_attach_thread): Update. Do not call new_thread_notify.
9665 (thread_db_init): Set thread_db_use_events. Check use_events.
9666 * utils.c (fatal, warning): Correct message prefix.
9667
30ed0a8f
DJ
96682007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9669
9670 * Makefile.in (clean): Remove new files.
9671 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9672 (powerpc-64.o, powerpc-64.c): New rules.
9673 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9674 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9675 with SPE.
9676 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9677 SPE targets.
9678 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9679 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9680 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9681 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9682 (target_regsets): Add AltiVec and SPE register sets.
9683 * configure.ac: Check for AltiVec and SPE.
9684 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9685 (ppc_fill_vrregset, ppc_store_vrregset): New.
9686 (target_regsets): Add AltiVec register set.
9687 * configure: Regenerated.
9688
fd462a61
DJ
96892007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9690
9691 * linux-low.c (O_LARGEFILE): Define.
9692 (linux_read_memory): Use /proc/PID/mem.
9693 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9694 * configure, config.in: Regenerated.
9695
69f223ed
DJ
96962007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9697
9698 * linux-low.c (linux_wait_for_event): Do not pass signals while
9699 single-stepping.
9700
aec18585
PA
97012007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9702
9703 * win32-low.c (create_process): New.
9704 (win32_create_inferior): Use create_process instead of
9705 CreateProcess. If create_process failed retry appending an ".exe"
9706 suffix. Store the GetLastError result immediatelly after
9707 create_process calls and use it on the call to error.
9708
34d86ddd
PA
97092007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9710
9711 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9712
5a0e3bd0
JB
97132007-08-23 Joel Brobecker <brobecker@adacore.com>
9714
9715 * configure.ac: Switch license to GPLv3.
9716
f88c79e6
MS
97172007-08-01 Michael Snyder <msnyder@access-company.com>
9718
9719 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9720
6b3d9b83
PA
97212007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9722
9723 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9724 typedef.
9725 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9726 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9727 CloseToolhelp32Snapshot.
9728 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9729 CloseToolhelp32Snapshot.
9730
c588c53c
MS
97312007-07-27 Michael Snyder <michael.snyder@access-company.com>
9732
9733 * server.c (main): Check for inferior exit before main loop.
9734
aa0403d9
PA
97352007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9736
9737 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9738 instead of on tmp_desc.
9739
255e7678
DJ
97402007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9741 Daniel Jacobowitz <dan@codesourcery.com>
9742
9743 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9744 (add_thread): Minor cleanups.
9745 (clear_inferiors): Move lower in the file. Clear the DLL
9746 list.
9747 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9748 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9749 (xml_escape_text): New.
9750 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9751 for qSupported.
9752 (handle_v_cont): Report errors.
9753 (gdbserver_version): Update.
9754 (main): Correct size of own_buf. Do not report initial DLL events.
9755 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9756 (unloaded_dll, xml_escape_text): New.
9757 * win32-low.c (enum target_waitkind): Update comments.
9758 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9759 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9760 (win32_EnumProcessModules, win32_GetModuleInformation)
9761 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9762 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9763 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9764 (win32_Module32First, win32_Module32Next, load_toolhelp)
9765 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9766 (get_child_debug_event): Handle DLL events.
9767 (win32_wait): Likewise.
9768
0d37add9
DJ
97692007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9770
9771 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9772 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9773
45e2715e
PA
97742007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9775
9776 * win32-low.c (handle_output_debug_string): Ignore event if not
9777 waiting.
9778
c5674cf1
PA
97792007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9780
9781 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9782
2bbe3cc1
DJ
97832007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9784
9785 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9786
ae13219e
DJ
97872007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9788
9789 * inferiors.c (change_inferior_id): Add comment.
9790 * linux-low.c (check_removed_breakpoint): Add an early
9791 prototype. Improve debug output.
9792 (linux_attach): Doc update.
9793 (linux_detach_one_process, linux_detach): Clean up before releasing
9794 each process.
9795 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9796 * linux-low.h (struct process_info): Doc improvement.
9797 * mem-break.c (delete_all_breakpoints): New.
9798 * mem-break.h (delete_all_breakpoints): New prototype.
9799 * thread-db.c (find_first_thread): New.
9800 (thread_db_create_event): Call it instead of
9801 thread_db_find_new_threads. Clean up unused variables.
9802 (maybe_attach_thread): Remove first thread handling.
9803 (thread_db_find_new_threads): Use find_first_thread.
9804 (thread_db_get_tls_address): Likewise.
9805
4105de34
DJ
98062007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9807
9808 * thread-db.c (thread_db_find_new_threads): Add prototype.
9809 (thread_db_create_event): Check for the main thread before adding
9810 a new thread.
9811 (maybe_attach_thread): Only enable event reporting if TID == 0.
9812 (thread_db_get_tls_address): Check for new threads.
9813
2b876972
DJ
98142007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9815
9816 * linux-low.c (linux_create_inferior): Try execv before execvp.
9817 * spu-low.c (spu_create_inferior): Likewise.
9818
7a245884
DJ
98192007-06-13 Mike Frysinger <vapier@gentoo.org>
9820
9821 * linux-low.c (linux_create_inferior): Change execv to execvp.
9822 * spu-low.c (spu_create_inferior): Likewies.
9823
117ce543
DJ
98242007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9825
9826 * Makefile.in (clean): Clean new files instead of deleted ones.
9827 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9828 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9829 rules.
9830 * configure.srv: Specify XML files and new regformats for MIPS and
9831 MIPS64 GNU/Linux.
9832 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9833 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9834 an entry for the restart register.
9835 (mips_cannot_fetch_register, mips_cannot_store_register)
9836 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9837 register names to match the XML descriptions.
9838 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9839 restart register instead of $0.
9840
0e7f50da
UW
98412007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9842 Markus Deuling <deuling@de.ibm.com>
9843
9844 * remote-utils.c (decode_xfer_write): New function.
9845 * server.h (decode_xfer_write): Add prototype.
9846 * server.c (handle_query): Add PACKET_LEN argument. Support
9847 qXfer:spu:read and qXfer:spu:write packets.
9848 (main): Pass packet_len to handle_query.
9849 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9850 * target.h (target_ops): Add qxfer_spu.
9851
374c1d38
UW
98522007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9853
9854 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9855 accessing non-seekable spufs files.
9856
bb63802a
UW
98572007-05-16 Markus Deuling <deuling@de.ibm.com>
9858
889bf7c5 9859 * server.c (handle_query): Add reply for qC packet.
bb63802a 9860
7390519e
PA
98612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9862 Leo Zayas <lerele@champenstudios@com>
9863
9864 * server.h (check_remote_input_interrupt_request): New function.
9865 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9866 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9867 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9868 (check_remote_input_interrupt_request): New function.
9869 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9870 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9871 winapi_GenerateConsoleCtrlEvent): New typedefs.
9872 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9873 to 250 ms.
9874 (win32_wait): Check for remote interrupt request
9875 with check_remote_input_interrupt_request.
9876 (win32_request_interrupt): New function.
9877 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9878
34b34921
PA
98792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9880
9881 * win32-low.c (debug_registers_changed,
9882 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9883 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9884 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9885 (thread_rec): Get context using the low target.
9886 (child_add_thread): Call thread_added on the low target,
9887 which does the same thing.
9888 (regptr): Delete.
9889 (do_initial_child_stuff): Remove debug registers references.
9890 Set context using the low target. Resume threads after
9891 setting the contexts.
9892 (child_continue): Remove dead variable. Remove debug
9893 registers references.
9894 (child_fetch_inferior_registers): Go through the low target.
9895 (do_child_store_inferior_registers): Remove.
9896 (child_store_inferior_registers): Go through the low target.
9897 (win32_resume): Remove debug registers references.
9898 Set context using the low target.
9899 (handle_exception): Change return type to void. Don't record
9900 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9901 first chance exception.
889bf7c5 9902 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9903 goto loop. Always return after waiting for debug event.
9904 (win32_wait): Convert to switch statement. Handle spurious
9905 events.
9906
9907 * win32-i386-low.c (debug_registers_changed,
9908 debug_registers_used): New.
9909 (initial_stuff): Rename to ...
9910 (i386_initial_stuff): ... this. Clear debug registers
9911 state variables.
9912 (store_debug_registers): Delete.
9913 (i386_get_thread_context): New.
9914 (load_debug_registers): Delete.
9915 (i386_set_thread_context): New.
9916 (i386_thread_added): New.
9917 (single_step): Rename to ...
9918 (i386_single_step): ... this.
9919 (do_fetch_inferior_registers): Rename to ...
9920 (i386_fetch_inferior_register): ... this.
9921 (i386_store_inferior_register): New.
9922 (the_low_target): Adapt to new interface.
9923
9924 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9925 (arm_get_thread_context): New.
9926 (arm_set_thread_context): New.
9927 (regptr): New.
9928 (do_fetch_inferior_registers): Rename to ...
9929 (arm_fetch_inferior_register): ... this.
9930 (arm_store_inferior_register): New.
9931 (arm_wince_breakpoint): Reimplement as unsigned long.
9932 (arm_wince_breakpoint_len): Define.
9933 (the_low_target): Adapt to new interface.
9934
9935 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9936 load_debug_registers. Add get_thread_context, set_thread_context,
9937 thread_added and store_inferior_register. Rename
9938 fetch_inferior_registers to fetch_inferior_register.
9939 (regptr): Remove declaration.
9940
dd6953e1
PA
99412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9942
9943 * linux-low.c (linux_detach): Change return type to int. Return 0.
9944 * spu-low.c (spu_detach): Likewise.
9945
444d6139
PA
99462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9947
9948 * target.h (target_ops): Change return type of detach to int.
9949 Add join.
9950 (join_inferior): New.
9951 * server.c (main): Don't skip detach support on mingw32.
9952 If the inferior doesn't support detaching return error.
9953 Call join_inferior instead of using waitpid.
9954 * linux-low.c (linux_join): New.
9955 (linux_target_op): Add linux_join.
9956 * spu-low.c (spu_join): New.
9957 (spu_target_ops): Add spu_join.
9958 * win32-low.c (win32_detach): Adapt to new interface.
9959 Reopen current_process_handle before detaching. Issue a child
9960 resume before detaching.
9961 (win32_join): New.
9962 (win32_target_op): Add win32_join.
9963
1d5315fe
PA
99642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9965
9966 * win32-low.c (win32-attach): Fix return value.
9967 * target.h (target_ops): Describe ATTACH return values.
9968
bf914831
PA
99692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9970
9971 * win32-low.c (GETPROCADDRESS): Define.
9972 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9973 (winapi_DebugSetProcessKillOnExit): Likewise.
9974 (win32_create_inferior): Force usage of ansi CreateProcessA.
9975 (win32_attach): Use GETPROCADDRESS.
9976 (win32_detach): Likewise.
9977
f72f3e60
PA
99782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9979
9980 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9981
ed50f18f
PA
99822007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9983
9984 * win32-low.c: Commit leftover changes from 2007-03-29.
9985
0c2ead7e
DJ
99862007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9987
9988 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9989 fields short instead of int. Add explicit padding.
9990 (i387_cache_to_fsave): Remove unnecessary casts.
9991 (i387_fsave_to_cache): Doc fix.
9992 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9993
73725ff3
DJ
99942007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9995
9996 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9997 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9998
d99f33d8
PA
99992007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10000
10001 * configure.srv (arm*-*-mingw32ce*): Move near the other
10002 arm targets.
10003
68070c10
PA
100042007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10005
2482afc6 10006 * configure.ac: Add errno checking.
68070c10
PA
10007 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10008 sys/file.h and malloc.h.
10009 (AC_CHECK_DECLS): Add perror.
10010 (srv_mingwce): Handle.
2482afc6 10011 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10012 win32-i386-low.o to srv_tgtobj.
10013 (i[34567]86-*-mingw*): Likewise.
10014 (arm*-*-mingw32ce*): Add case.
10015 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10016 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10017 [__MINGW32CE__] (strerror): New function.
10018 [__MINGW32CE__] (errno): Define to GetLastError.
10019 [__MINGW32CE__] (COUNTOF): New macro.
10020 (remote_open): Remove extra close call.
10021 * mem-break.c (delete_breakpoint_at): New function.
10022 * mem-break.h (delete_breakpoint_at): Declare.
10023 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10024 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10025 [USE_WIN32API] (read, write): Add char* casts.
10026 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10027 * server.h: Include wincecompat.h on Windows CE.
10028 [HAVE_ERRNO_H]: Check.
10029 (perror): Declare if not declared.
10030 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10031 (perror_with_name): Remove errno declaration.
10032 * wincecompat.h: New.
10033 * wincecompat.c: New.
10034 * win32-low.h: New.
10035 * win32-arm-low.c: New.
10036 * win32-i386-low.c: New.
10037 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10038 (OUTMSG2): Make it safe.
10039 (_T): New macro.
10040 (COUNTOF): New macro.
10041 (NUM_REGS): Get it from the low target.
10042 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10043 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10044 (thread_rec): Let low target handle debug registers.
10045 (child_add_thread): Likewise.
10046 (child_init_thread_list): Likewise.
10047 (continue_one_thread): Likewise.
10048 (regptr): New.
10049 (do_child_fetch_inferior_registers): Move to ...
10050 * win32-i386-low.c: ... here, and rename to ...
10051 (do_fetch_inferior_registers): ... this.
889bf7c5 10052 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10053 Go through the low target.
10054 (do_child_store_inferior_registers): Use regptr.
10055 (strwinerror): New function.
10056 (win32_create_inferior): Handle Windows CE.
10057 Use strwinerror instead of strerror on Windows error
10058 codes. Add program to the error output.
10059 Don't close the main thread handle on Windows CE.
10060 (win32_attach): Use coredll.dll on Windows CE.
10061 (win32_kill): Close current process and current
10062 thread handles.
10063 (win32_detach): Use coredll.dll on Windows CE.
10064 (win32_resume): Let low target handle debug registers, and
10065 step request.
10066 (handle_exception): Add/Remove initial breakpoint. Avoid
10067 non-existant WSTOPSIG on Windows CE.
10068 (win32_read_inferior_memory): Cast to remove warning.
10069 (win32_arch_string): Go through the low target.
10070 (initialize_low): Call set_breakpoint_data with the low
10071 target's breakpoint.
10072 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10073 FOP_REGNUM, mappings): Move to ...
10074 * win32-i386-low.c: ... here.
10075 * win32-low.c (win32_thread_info): Move to ...
10076 * win32-low.h: ... here.
10077 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10078 win32-arm-low.c and wincecompat.c.
10079 (all:): Add $EXEEXT.
10080 (install-only:): Likewise.
10081 (gdbserver:): Likewise.
10082 (gdbreplay:): Likewise.
10083 * config.in: Regenerate.
10084 * configure: Regenerate.
10085
41093d81
PA
100862007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10087
10088 * win32-low.c: Rename typedef thread_info to
10089 win32_thread_info throughout.
10090
544afa54
PA
100912007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10092
10093 * win32-i386-low.c: Rename to ...
10094 * win32-low.c: ... this.
10095 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10096 * Makefile.in: Likewise.
10097
bce7165d
PA
100982007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10099
10100 * remote-utils.c (monitor_output): Constify msg parameter.
10101 * server.h (monitor_output): Likewise.
10102 * win32-i386-low.c (handle_output_debug_string): New.
10103 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10104 handle_output_debug_string.
10105 (get_child_debug_event): Likewise.
10106
506c7aa0
DJ
101072007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10108
10109 * server.c (main): Correct strtoul check.
10110
42c81e2a
DJ
101112007-03-27 Jon Ringle <jon@ringle.org>
10112
10113 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10114
9453113a
DJ
101152007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10116
10117 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10118
64a69107
DJ
101192007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10120
10121 * terminal.h: Check HAVE_SGTTY_H.
10122
101232007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10124
10125 * remote-utils.c (remote_open): Print out the assigned port number.
10126
c74d0ad8
DJ
101272007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10128
10129 * remote-utils.c (monitor_output): New function.
10130 * server.c (debug_threads): Define here.
10131 (monitor_show_help): New function.
10132 (handle_query): Handle qRcmd.
10133 (main): Do not handle 'd' packet.
10134 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10135 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10136 of debug_threads.
10137
de7c3b4a
PA
101382007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10139
10140 * Makefile.in (EXEEXT): New.
10141 (clean): Use $(EXEEXT).
10142
ef57601b
PA
101432007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10144
10145 * target.h (target_ops): Rename send_signal to request_interrupt,
10146 and remove enum target_signal parameter.
10147 * linux-low.c (linux_request_interrupt): Rename from
10148 linux_send_signal, and always send SIGINT.
10149 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10150 and always send SIGINT.
10151 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10152 of send_signal.
10153 (input_interrupt): Likewise.
10154
820f2bda
PA
101552007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10156
10157 * server.c (get_features_xml): Check if target implemented
10158 arch_string.
10159 * win32-i386-low.c (win32_arch_string): New.
10160 (win32_target_ops): Add win32_arch_string as arch_string member.
10161
ab39bf24
UW
101622007-02-22 Markus Deuling <deuling@de.ibm.com>
10163
10164 * spu-low.c (spu_arch_string): New.
10165 (spu_target_ops): Add spu_arch_string.
10166
61ff6e04
DJ
101672007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10168
10169 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10170 * configure.ac: Do not check for terminal.h.
10171 * configure, config.in: Regenerated.
10172
fb1e4ffc
DJ
101732007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10174
10175 * Makefile.in (OBS): Add $(XML_BUILTIN).
10176 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10177 (clean): Update.
10178 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10179 (arm-with-iwmmxt.c): New.
10180 * config.in, configure: Regenerate.
10181 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10182 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10183 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10184 (arm*-*-linux*): Add iWMMXt and regset support.
10185 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10186 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10187 (arm_store_wmmxregset, target_regsets): New.
10188 * server.c (get_features_xml): Take annex argument. Check builtin
10189 XML documents.
10190 (handle_query): Handle multiple annexes.
10191
0f48aa01
DJ
101922007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10193
10194 * remote-utils.c [USE_WIN32API] (read, write): Define.
10195 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10196 write.
10197
23181151
DJ
101982007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10199
10200 * linux-i386-low.c (the_low_target): Set arch_string.
10201 * linux-x86-64-low.c (the_low_target): Likewise.
10202 * linux-low.c (linux_arch_string): New.
10203 (linux_target_ops): Add it.
10204 * linux-low.h (struct linux_target_ops): Add arch_string.
10205 * server.c (write_qxfer_response): Use const void * for DATA.
10206 (get_features_xml): New.
10207 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10208 * target.h (struct target_ops): Add arch_string method.
10209
9d606399
DJ
102102007-01-03 Denis Pilat <denis.pilat@st.com>
10211 Daniel Jacobowitz <dan@codesourcery.com>
10212
10213 * linux-low.c (linux_kill): Handle being called with no threads.
10214 * win32-i386-low.c (win32_kill): Likewise.
10215 (get_child_debug_event): Clear current_process_handle.
10216
102172006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10218 Daniel Jacobowitz <dan@codesourcery.com>
10219
10220 * remote-utils.c (remote_open): Check the type of specified
10221 serial port devices before opening them.
10222 * server.c (main): Kill the inferior if an error occurs during
10223 the first remote_open.
10224
a5e13d24
DJ
102252006-12-05 Markus Deuling <deuling@de.ibm.com>
10226
10227 * README: Update supported targets.
10228
186947f7
DJ
102292006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10230
10231 * Makefile.in (clean): Remove reg-mips64.c.
10232 (reg-mips64.c, reg-mips64.o): New rules.
10233 * configure.srv: Handle mips64. Include regset support for mips.
10234 * linux-mips-low.c (union mips_register): New.
10235 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10236 (mips_breakpoint, mips_breakpoint_at): Use int.
10237 (mips_collect_register, mips_supply_register)
10238 (mips_collect_register_32bit, mips_supply_register_32bit)
10239 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10240 (mips_store_fpregset, target_regsets): New.
10241 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10242
a13e2c95
UW
102432006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10244
10245 * configure.srv: Add target "spu*-*-*".
10246 * Makefile.in (clean): Remove reg-spu.c.
10247 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10248 * spu-low.c: New file.
10249
cb7283db
DJ
102502006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10251
10252 * configure.ac: Correct td_thr_tls_get_addr test.
10253 * configure: Regenerated.
10254
89be2091
DJ
102552006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10256
10257 * linux-low.c (linux_wait_for_event): Reformat. Use the
10258 pass_signals array.
10259 * remote-utils.c (decode_address_to_semicolon): New.
10260 * server.c (pass_signals, handle_general_set): New.
10261 (handle_query): Mention QPassSignals for qSupported.
10262 (main): Call handle_general_set.
10263 * server.h (pass_signals, decode_address_to_semicolon): New.
10264
000ef4f0
DJ
102652006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10266
10267 * server.c (handle_query): Correct error handling for read_auxv.
10268
b7149293
UW
102692005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10270
10271 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10272 and srv_linux_thread_db to yes.
10273 * linux-s390-low.c (s390_fill_gregset): New function.
10274 (target_regsets): Define data structure.
10275
dae5f5cf
DJ
102762006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10277
10278 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10279 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10280 * config.in, configure: Regenerated.
10281 * inferiors.c (gdb_id_to_thread): New function.
10282 (gdb_id_to_thread_id): Use it.
10283 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10284 * linux-low.h (struct process_info): Add th member.
10285 (thread_db_get_tls_address): New prototype.
10286 * remote-utils.c (decode_address): Make non-static.
10287 * server.c (handle_query): Handle qGetTLSAddr.
10288 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10289 * target.h (struct target_ops): Add get_tls_address.
10290 * thread-db.c (maybe_attach_thread): Save the thread handle.
10291 (thread_db_get_tls_address): New.
10292
32ca6d61
DJ
102932006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10294
10295 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10296 (linux_resume_one_process): Take a siginfo_t *. Update all
10297 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10298 (struct pending_signals): Add a siginfo_t.
10299 (linux_wait_for_process): Always set last_status.
10300 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10301 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10302 * linux-low.h (struct process_info): Add last_status.
10303
5ffff7c1
DJ
103042006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10305
10306 * remote-utils.c (try_rle): New function.
10307 (putpkt_binary): Use it.
10308
8695c747
DJ
103092006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10310
10311 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10312 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10313 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10314 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10315 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10316 point registers.
10317
290fadea
RS
103182006-08-08 Richard Sandiford <richard@codesourcery.com>
10319
10320 * server.c (terminal_fd): New variable.
10321 (old_foreground_pgrp): Likewise.
10322 (restore_old_foreground_pgrp): New function.
10323 (start_inferior): Record the terminal file descriptor in terminal_fd
10324 and its original foreground group in old_foreground_pgrp. Register
10325 restore_old_foreground_pgrp with atexit().
10326
9f2e1e63
DJ
103272006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10328
10329 * server.c (handle_query): Correct qPart to qXfer.
10330
b80864fb
DJ
103312006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10332
10333 * configure.ac: Check for more headers which are missing on
10334 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10335 * configure.srv: Add Cygwin and mingw32.
10336 * remote-utils.c: Don't include headers unconditionally which
10337 are missing on mingw32. Include <winsock.h> for mingw32.
10338 (remote_open): Adjust for mingw32 support. Flush
10339 standard error after writing to it.
10340 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10341 (unblock_async_io, enable_async_io, disable_async_io)
10342 (readchar, getpkt): Update for Winsock support.
10343 (prepare_resume_reply): Expect a protocol signal number.
10344 * server.c: Disable <sys/wait.h> on mingw32.
10345 (start_inferior): Adjust for mingw32 support. Flush
10346 standard error after writing to it.
10347 (attach_inferior): Likewise. Use protocol signal
10348 numbers.
10349 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10350 and names.
10351 * win32-i386-low.c: New file.
10352 * Makefile.in (XM_CLIBS): Set.
10353 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10354 (win32-i386-low.o): New dependency rule.
10355 * linux-low.c (linux_wait): Use target signal numbers.
10356 * target.h (struct target_ops): Doc fix.
10357 * server.h (target_signal_to_name): New prototype.
10358 * gdbreplay.c: Don't include headers unconditionally which
10359 are missing on mingw32. Include <winsock.h> for mingw32.
10360 (remote_close, remote_open): Adjust for Winsock support.
10361 * configure, config.in: Regenerated.
10362
0876f84a
DJ
103632006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10364
10365 * server.c (decode_xfer_read, write_qxfer_response): New.
10366 (handle_query): Take a packet length argument. Handle
10367 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10368 the qSupported response.
10369 (main): Update call to handle_query.
10370
01f9e8fa
DJ
103712006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10372
10373 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10374 (putpkt_binary): Renamed from putpkt and adjusted for binary
10375 data.
10376 (putpkt): New wrapper for putpkt_binary.
10377 (readchar): Don't mask off the high bit.
10378 (decode_X_packet): New function.
10379 * server.c (main): Call putpkt_binary if a handler sets the packet
10380 length. Save the length of the incoming packet. Handle 'X'.
10381 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10382
be2a5f71
DJ
103832006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10384
10385 * server.c (handle_query): Handle qSupported.
10386
ea025f5f
DJ
103872006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10388
10389 * remote-utils.c (all_symbols_looked_up): New variable.
10390 (look_up_one_symbol): Check it.
10391 * server.h (look_up_one_symbol): New declaration.
10392 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10393
9308fc88
DJ
103942006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10395
10396 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10397 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10398 (PTRACE_GET_THREAD_AREA): Define.
10399 (ps_get_thread_area): New function.
10400
52fb6437
NS
104012006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10402
10403 * configure.srv (m68k*-*-uclinux*): New target.
10404 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10405 (linux_resume_one_process): Remove extraneous cast.
10406 (linux_read_offsets): New.
10407 (linux_target_op): Add linux_read_offsets on mmuless systems.
10408 * server.c (handle_query): Add qOffsets logic.
10409 * target.h (struct target_ops): Add read_offsets.
10410
21b0f40c
DJ
104112006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10412
10413 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10414 (PTRACE_GET_THREAD_AREA): Define.
10415 (ps_get_thread_area): New function.
10416 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10417 (linux-x86-64-low.o): Update.
10418
0050a760
DJ
104192006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10420
10421 * configure.ac: Remove checks for prfpregset_t.
10422 * gdb_proc_service.h: New file.
10423 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10424 new "gdb_proc_service.h".
10425 * proc-service.c: Likewise.
10426 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10427 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10428 * Makefile.in (gdb_proc_service_h): Updated.
10429 * configure, config.in: Regenerated.
10430
b92a518e
DJ
104312006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10432
10433 * remote-utils.c (prepare_resume_reply): Move declaration
10434 of gdb_id_from_wait to the top of the block.
10435
545587ee
DJ
104362006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10437
10438 * linux-low.c (regsets_store_inferior_registers): Read the regset
10439 from the target before filling it.
10440
9db87ebd
DJ
104412006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10442
10443 * server.c (attach_inferior): Return SIGTRAP for a successful
10444 attach.
10445
dd24457d
DJ
104462006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10447
10448 * Makefile.in (OBS): Add version.o.
10449 (STAGESTUFF): Delete.
10450 (version.o): Add dependencies.
10451 (version.c): Replace rule.
10452 (clean): Remove version.c.
10453 * server.c (gdbserver_version): New.
10454 (gdbserver_usage): Use printf.
10455 (main): Handle --version and --help.
10456 * server.h (version, host_name): Add declarations.
10457
6f0f660e
EZ
104582005-12-23 Eli Zaretskii <eliz@gnu.org>
10459
889bf7c5
PA
10460 * linux-arm-low.c:
10461 * linux-arm-low.c:
10462 * inferiors.c:
10463 * i387-fp.h:
10464 * i387-fp.c:
10465 * gdbreplay.c:
10466 * regcache.c:
10467 * proc-service.c:
10468 * mem-break.h:
10469 * mem-break.c:
10470 * linux-x86-64-low.c:
10471 * linux-sh-low.c:
10472 * linux-s390-low.c:
10473 * linux-ppc64-low.c:
10474 * linux-ppc-low.c:
10475 * linux-mips-low.c:
10476 * linux-m68k-low.c:
10477 * linux-m32r-low.c:
10478 * linux-low.h:
10479 * linux-low.c:
10480 * linux-ia64-low.c:
10481 * linux-i386-low.c:
10482 * linux-crisv32-low.c:
10483 * thread-db.c:
10484 * terminal.h:
10485 * target.h:
10486 * target.c:
10487 * server.h:
10488 * server.c:
10489 * remote-utils.c:
10490 * regcache.h:
10491 * utils.c:
10492 * Makefile.in:
10493 * configure.ac:
6f0f660e
EZ
10494 * gdbserver.1: Add (C) after Copyright. Update the FSF
10495 address.
10496
9d1fb177
DJ
104972005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10498
10499 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10500 (arm_breakpoint_at): Recognize both breakpoints.
10501 (the_low_target): Use the correct breakpoint instruction.
10502
011a70c2
DJ
105032005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10504
10505 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10506 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10507 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10508 (the_low_target): Update.
10509
7fb85e41
AS
105102005-10-25 Andreas Schwab <schwab@suse.de>
10511
10512 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10513
10514 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10515 (ia64_num_regs): Reduce to 462.
10516
3db0444b
DJ
105172005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10518
10519 * acinclude.m4: Correct quoting.
10520 * aclocal.m4: Regenerated.
10521
10522 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10523 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10524 (thread_db_init): Call thread_db_err_str.
10525 * configure.ac: Check for TD_VERSION.
10526 * config.in, configure: Regenerated.
10527
bee0189a
DJ
105282005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10529
10530 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10531
e9d25b98
DJ
105322005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10533
10534 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10535 is not available. Define HAVE_PTRACE_GETREGS if it is.
10536 * config.in, configure: Regenerated.
10537 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10538 * linux-i386-low.c, linux-m68k-low.c: Update to use
10539 HAVE_PTRACE_GETREGS.
10540 * linux-low.c (regsets_fetch_inferior_registers)
10541 (regsets_store_inferior_registers): Only return 0 if we processed
10542 GENERAL_REGS.
10543 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10544 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10545
a06660f7
DJ
105462005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10547
10548 * inferiors.c (struct thread_info): Add gdb_id.
10549 (add_thread): Add gdb_id argument.
10550 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10551 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10552 calls to add_thread.
10553 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10554 * server.c (handle_query): Use thread_to_gdb_id.
10555 (handle_v_cont, main): Use gdb_id_to_thread_id.
10556 * server.h (add_thread): Update prototype.
10557 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10558 prototypes.
10559
5a1f5858
DJ
105602005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10561
10562 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10563 left-padded registers.
10564 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10565 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10566
e122f1f5
SE
105672005-07-01 Steve Ellcey <sje@cup.hp.com>
10568
10569 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10570 * configure: Regenerate.
10571 * config.in: Regenerate.
10572 * server.h (NEED_DECLARATION_STRERROR):
10573 Replace with !HAVE_DECL_STRERROR.
10574
d592fa2f
DJ
105752005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10576
10577 * linux-low.c (linux_wait, linux_send_signal): Don't test
10578 an unsigned long variable for > 0 if it could be MAX_ULONG.
10579 * server.c (myresume): Likewise.
10580 * target.c (set_desired_inferior): Likewise.
10581
ccbd4912
MK
105822005-06-13 Mark Kettenis <kettenis@gnu.org>
10583
10584 * configure.ac: Simplify and improve check for socklen_t.
10585 * configure, config.in: Regenerate.
10586
f450004a
DJ
105872005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10588
10589 * acconfig.h: Remove.
10590 * configure.ac: Add a test for socklen_t. Use three-argument
10591 AC_DEFINE throughout.
10592 * config.in: Regenerated using autoheader 2.59.
10593 * configure: Regenerated.
10594
10595 * gdbreplay.c (socklen_t): Provide a default.
10596 (remote_open): Use socklen_t.
10597 * remote-utils.c (socklen_t): Provide a default.
10598 (remote_open): Use socklen_t.
10599 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10600 unsigned char.
10601
10602 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10603 char for buffers.
10604 * linux-low.c (linux_read_memory, linux_write_memory)
10605 (linux_read_auxv): Likewise.
10606 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10607 (check_mem_write): Likewise.
10608 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10609 Likewise.
10610 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10611 (registers_from_string, register_data): Likewise.
10612 * server.c (handle_query, main): Likewise.
10613 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10614 (decode_M_packet): Likewise.
10615 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10616 * target.h (struct target_ops): Update read_memory, write_memory,
10617 and read_auxv.
10618 (read_inferior_memory, write_inferior_memory): Update.
10619 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10620 to unsigned char *.
10621 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10622 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10623 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10624 linux-s390-low.c, linux-sh-low.c: Update for changes in
10625 read_inferior_memory and the_low_target->breakpoint.
10626
eee84df1
DJ
106272005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10628
10629 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10630 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10631 * configure.srv: Add powerpc64-*-linux*.
10632 * linux-ppc64-low.c: New file.
10633
45b134e5
OF
106342005-05-23 Orjan Friberg <orjanf@axis.com>
10635
10636 * linux-cris-low.c: New file with support for CRIS.
10637 * linux-crisv32-low.c: Ditto for CRISv32.
10638 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10639 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10640 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10641 reg-crisv32.o, and reg-crisv32.c to make rules.
10642 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10643 recognized targets.
10644
48d93c75
UW
106452005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10646
10647 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10648 of sizeof (PTRACE_XFER_TYPE).
10649 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10650
e013ee27
OF
106512005-05-12 Orjan Friberg <orjanf@axis.com>
10652
889bf7c5 10653 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10654 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10655 pointers for hardware watchpoint support.
10656 * linux-low.h (struct linux_target_ops): Ditto.
10657 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10658 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10659 to linux_target_ops.
10660 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10661 reply packet.
10662 * server.c (main): Recognize 'Z' and 'z' packets.
10663
b0ded00b
UW
106642005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10665
10666 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10667 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10668 (the_low_target): Add new members.
10669
8643e2ad
DJ
106702005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10671
10672 * proc-service.c (ps_lgetregs): Search all_processes instead of
10673 all_threads.
10674
fc620387
DJ
106752005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10676
10677 * server.c (start_inferior): Change return type to int.
10678 (attach_inferior): Change sigptr to int *.
10679 (handle_v_cont, handle_v_requests): Change signal to int *.
10680 (main): Change signal to int.
10681
106822005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10683
10684 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10685 * configure.srv: Add m32r*-*-linux*.
10686 * linux-m32r-low.c: New file.
10687
e0e76420
DJ
106882005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10689
10690 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10691
a1928bad
DJ
106922005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10693
10694 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10695 Take unsigned long arguments for PIDs.
10696 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10697 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10698 (wait_for_sigstop, linux_resume_one_process)
10699 (regsets_fetch_inferior_registers, linux_send_signal)
10700 (linux_read_auxv): Likewise. Update the types of variables holding
10701 PIDs. Update format string specifiers.
10702 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10703 * remote-utils.c (prepare_resume_reply): Likewise.
10704 * server.c (cont_thread, general_thread, step_thread)
10705 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10706 unsigned long.
10707 (handle_query): Update format specifiers.
10708 (handle_v_cont, main): Use strtoul for thread IDs.
10709 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10710 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10711 (general_thread, step_thread, thread_from_wait)
10712 (old_thread_from_wait): Update.
10713 * target.h (struct thread_resume): Use unsigned long for THREAD.
10714 (struct target_ops): Use unsigned long for arguments to attach and
10715 thread_alive.
10716
dcdb98d2
DJ
107172005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10718
10719 * acinclude.m4: Include bfd/bfd.m4 directly.
10720 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10721 <agriffis@toolchain.org>.
10722 * aclocal.m4, configure: Regenerated.
10723
bec39cab
AC
107242005-01-07 Andrew Cagney <cagney@gnu.org>
10725
10726 * configure.ac: Rename configure.in, require autoconf 2.59.
10727 * configure: Re-generate.
10728
434c4c77
DJ
107292004-12-08 Daniel Jacobowitz <dan@debian.org>
10730
10731 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10732 LIBS when finished.
10733 * aclocal.m4: Regenerated.
10734 * configure: Regenerated.
10735
db1d3e1b
AS
107362004-11-21 Andreas Schwab <schwab@suse.de>
10737
10738 * linux-m68k-low.c (m68k_num_gregs): Define.
10739 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10740 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10741 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10742 (m68k_breakpoint_at): New. Add to the_low_target.
10743
10744 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10745 srv_linux_thread_db to yes.
10746
43360365
JB
107472004-10-20 Joel Brobecker <brobecker@gnat.com>
10748
10749 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10750 (ARCH_SET_FS): Likewise.
10751 (ARCH_GET_FS): Likewise.
10752 (ARCH_GET_GS): Likewise.
10753
fd500816
DJ
107542004-10-16 Daniel Jacobowitz <dan@debian.org>
10755
10756 * linux-i386-low.c (ps_get_thread_area): New.
10757 * linux-x86-64-low.c (ps_get_thread_area): New.
10758 * linux-low.c: Include <sys/syscall.h>.
10759 (linux_kill_one_process): Don't kill the first thread here.
10760 (linux_kill): Kill the first thread here.
10761 (kill_lwp): New function.
10762 (send_sigstop, linux_send_signal): Use it.
10763 * proc-service.c: Clean up #ifdefs.
10764 (fpregset_info): Delete.
10765 (ps_lgetregs): Update and enable implementation.
10766 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10767 implementations.
10768 * remote-utils.c (struct sym_cache, symbol_cache): New.
10769 (input_interrupt): Print a clearer message.
10770 (async_io_enabled): New variable.
10771 (enable_async_io, disable_async_io): Use it. Update comments.
10772 (look_up_one_symbol): Use the symbol cache.
10773 * thread-db.c (thread_db_look_up_symbols): New function.
10774 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10775
f6de3c42
DJ
107762004-10-16 Daniel Jacobowitz <dan@debian.org>
10777
10778 * configure.in: Test for -rdynamic.
10779 * configure: Regenerated.
10780 * Makefile (INTERNAL_LDFLAGS): New.
10781 (gdbserver, gdbreplay): Use it.
10782
2c0fc042
AC
107832004-09-02 Andrew Cagney <cagney@gnu.org>
10784
10785 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10786
075b3282
DJ
107872004-03-23 Daniel Jacobowitz <drow@mvista.com>
10788
10789 * linux-low.c (linux_wait): Clear all_processes list also.
10790
fa6a77dc
DJ
107912004-03-12 Daniel Jacobowitz <drow@mvista.com>
10792
10793 * linux-low.c: Include <errno.h>. Remove extern declaration of
10794 errno.
10795
6d782a97
DJ
107962004-03-12 Daniel Jacobowitz <drow@mvista.com>
10797
10798 * gdbreplay.c, server.h, utils.c: Update copyright years.
10799
3a7fb99b
DJ
108002004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10801
10802 * server.c (main): Print child status or termination signal from
10803 variable 'signal', not 'sig'.
10804
c3e735a6
DJ
108052004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10806
10807 * linux-low.c (linux_read_memory): Change return type to
10808 int. Check for and return error from ptrace().
10809 * target.c (read_inferior_memory): Change return type to int. Pass
10810 back return status from the_target->read_memory().
10811 * target.h (struct target_ops): Adapt *read_memory() prototype.
10812 Update comment.
10813 (read_inferior_memory): Adapt prototype.
10814 * server.c (main): Return an error packet if
10815 read_inferior_memory() returns an error.
10816
a59d1c82
DJ
108172004-03-04 Daniel Jacobowitz <drow@mvista.com>
10818
10819 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10820 Unify with other clean targets.
10821
dc3f8883
DJ
108222004-02-29 Daniel Jacobowitz <drow@mvista.com>
10823
10824 * server.c (handle_v_cont): Call set_desired_inferior.
10825
89a208da
DJ
108262004-02-29 Daniel Jacobowitz <drow@mvista.com>
10827
10828 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10829
62ea82f5
DJ
108302004-02-29 Daniel Jacobowitz <drow@mvista.com>
10831
10832 * linux-low.c (linux_wait): Unblock async I/O.
10833 (linux_resume): Block and enable async I/O.
10834 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10835 * server.h (block_async_io, unblock_async_io): Add prototypes.
10836
6910d122
DJ
108372004-02-29 Daniel Jacobowitz <drow@mvista.com>
10838
10839 * remote-utils.c (remote_open): Print a status notice after
10840 opening a TCP port.
10841 * server.c (attach_inferior): Print a status notice after
10842 attaching.
10843
108442004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10845
10846 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10847
c89dc5d4
DJ
108482004-02-26 Daniel Jacobowitz <drow@mvista.com>
10849
10850 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10851 error packet.
10852 * server.c, target.h: Update copyright years.
10853
4b8dad4a
RM
108542004-02-25 Roland McGrath <roland@redhat.com>
10855
10856 * target.h (struct target_ops): New member `read_auxv'.
10857 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10858 * linux-low.c (linux_read_auxv): New function.
10859 (linux_target_ops): Initialize `read_auxv' member to that.
10860
d7446758
JB
108612004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10862
10863 Committed by Jim Blandy <jimb@redhat.com>.
10864
10865 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10866 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10867 instead of GPR_SIZE to distiguish s390 and s390x targets.
10868
5544ad89
DJ
108692004-01-31 Daniel Jacobowitz <drow@mvista.com>
10870
10871 * linux-low.c: Update copyright year.
10872 (check_removed_breakpoint): Clear pending_is_breakpoint.
10873 (linux_set_resume_request, linux_queue_one_thread)
10874 (resume_status_pending_p): New functions.
10875 (linux_continue_one_thread): Use process->resume.
10876 (linux_resume): Only resume threads if there are no pending events.
10877 * linux-low.h (struct process_info): Add resume request
10878 pointer.
10879
2a68b70e
DJ
108802004-01-30 Daniel Jacobowitz <drow@mvista.com>
10881
10882 * regcache.c (new_register_cache): Clear the allocated register
10883 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10884
64386c31
DJ
108852003-10-13 Daniel Jacobowitz <drow@mvista.com>
10886
10887 * linux-low.c (linux_resume): Take a struct thread_resume *
10888 argument.
10889 (linux_wait): Update call.
10890 (resume_ptr): New static variable.
10891 (linux_continue_one_thread): Renamed from
10892 linux_continue_one_process. Use resume_ptr.
10893 (linux_resume): Use linux_continue_one_thread.
10894 * server.c (handle_v_cont, handle_v_requests): New functions.
10895 (myresume): New function.
10896 (main): Handle 'v' case.
10897 * target.h (struct thread_resume): New type.
10898 (struct target_ops): Change argument of "resume" to struct
10899 thread_resume *.
10900 (myresume): Delete macro.
10901
c938e9b0
L
109022003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10903
10904 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10905 (uninstall): Support DESTDIR.
10906
7f313d07
BC
10907Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10908
10909 * configure.srv: Add xscale*linux copy of arm*linux entry.
10910
3b2fc2ea
DJ
109112003-07-24 Daniel Jacobowitz <drow@mvista.com>
10912
10913 * linux-arm-low.c (arm_reinsert_addr): New function.
10914 (the_low_target): Add arm_reinsert_addr.
10915
1c0a559e
MK
109162003-07-08 Mark Kettenis <kettenis@gnu.org>
10917
10918 * mem-break.c: Remove whitespace at end of file.
10919
43d5792c
DJ
109202003-06-28 Daniel Jacobowitz <drow@mvista.com>
10921
10922 * configure.in: Check whether we need to prototype strerror.
10923 * server.h: Optionally prototype strerror.
10924 * gdbreplay.c (perror_with_name): Use strerror.
10925 * linux-low.c (linux_attach_lwp): Use strerror.
10926 * utils.c (perror_with_name): Use strerror.
10927 * config.in, configure: Regenerated.
10928
c8a86edf
DJ
109292003-06-28 Daniel Jacobowitz <drow@mvista.com>
10930
10931 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10932 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10933
73d37363
DJ
109342003-06-20 Daniel Jacobowitz <drow@mvista.com>
10935
10936 * Makefile.in (SFILES): Update.
10937 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10938 low-sun3.c: Remove files.
10939
6ad8ae5c
DJ
109402003-06-17 Daniel Jacobowitz <drow@mvista.com>
10941
10942 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10943 (linux_detach_one_process, linux_detach): New functions.
10944 (linux_target_ops): Add linux_detach.
10945 * server.c (main): Handle 'D' packet.
10946 * target.h (struct target_ops): Add "detach" member.
10947 (detach_inferior): Define.
10948
1581182a
MK
109492003-06-13 Mark Kettenis <kettenis@gnu.org>
10950
10951 From Kelley Cook <kelleycook@wideopenwest.com>:
10952 * configure.srv: Accept i[34567]86 variants.
10953
e5379b03
DJ
109542003-06-05 Daniel Jacobowitz <drow@mvista.com>
10955
10956 * linux-low.c (linux_wait_for_event): Correct comment typos.
10957 (linux_resume_one_process): Call check_removed_breakpoint.
10958 (linux_send_signal): New function.
10959 (linux_target_ops): Add linux_send_signal.
10960 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10961 of kill.
10962 * target.h (struct target_ops): Add send_signal.
10963
2ff29de4
JB
109642003-05-29 Jim Blandy <jimb@redhat.com>
10965
10966 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10967 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10968 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10969 away part of the register's value.
10970
254787d4
DJ
109712003-03-26 Daniel Jacobowitz <drow@mvista.com>
10972
10973 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10974 (linux_wait_for_event, linux_init_signals): Likewise.
10975
94e10508
DJ
109762003-03-17 Daniel Jacobowitz <drow@mvista.com>
10977
10978 * configure.in: Check for stdlib.h.
10979 * configure: Regenerated.
10980 * config.in: Regenerated.
10981
4c0711e0
DJ
109822003-01-04 Andreas Schwab <schwab@suse.de>
10983
10984 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10985
ef66e766
AC
109862003-01-02 Andrew Cagney <ac131313@redhat.com>
10987
10988 * Makefile.in: Remove obsolete code.
10989
a1358604
DJ
109902002-11-20 Daniel Jacobowitz <drow@mvista.com>
10991
10992 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10993 defined(PT_FPR0_HI).
10994
23ce3b1c
DJ
109952002-11-17 Stuart Hughes <seh@zee2.com>
10996
10997 * linux-arm-low.c (arm_num_regs): Increase.
10998 (arm_regmap): Include status register.
10999
110002002-11-17 Daniel Jacobowitz <drow@mvista.com>
11001
11002 * linux-low.c (register_addr): Remove incorrect -1 check.
11003
a9fa9f7d
DJ
110042002-08-29 Daniel Jacobowitz <drow@mvista.com>
11005
11006 * linux-low.c (linux_create_inferior): Call setpgid. Return
11007 the new PID.
11008 (unstopped_p, linux_signal_pid): Remove.
11009 (linux_target_ops): Remove linux_signal_pid.
11010 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11011 global instead of target method.
11012 * target.h (struct target_ops): Remove signal_pid. Update comment
11013 for create_inferior.
11014 * server.c (signal_pid): New variable.
11015 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11016 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11017 (attach_inferior): Set signal_pid.
11018
17574093
DJ
110192002-08-23 Daniel Jacobowitz <drow@mvista.com>
11020
11021 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11022
110232002-08-20 Jim Blandy <jimb@redhat.com>
11024
11025 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11026 default for this.
11027
110282002-08-01 Andrew Cagney <cagney@redhat.com>
11029
11030 * Makefile.in: Make chill references obsolete.
11031
110322002-07-24 Kevin Buettner <kevinb@redhat.com>
11033
11034 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11035 * configure: Regenerate.
11036 * config.in: Regenerate.
11037
110382002-07-09 David O'Brien <obrien@FreeBSD.org>
11039
11040 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11041 (perror_with_name, remote_close, remote_open, expect, play): Static.
11042
110432002-07-04 Michal Ludvig <mludvig@suse.cz>
11044
4b8dad4a 11045 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11046 byte offsets instead of an array of indexes.
11047 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11048
110492002-06-13 Daniel Jacobowitz <drow@mvista.com>
11050
11051 * regcache.c: Add comment.
11052
110532002-06-11 Daniel Jacobowitz <drow@mvista.com>
11054
11055 * thread-db.c: New file.
11056 * proc-service.c: New file.
11057 * acinclude.m4: New file.
11058 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11059 proc-service.o, and thread-db.o.
11060 (linux-low.o): Add USE_THREAD_DB.
11061 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11062 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11063 * aclocal.m4: Regenerated.
11064 * config.in: Regenerated.
11065 * configure: Regenerated.
11066 * configure.in: Check for proc_service.h, sys/procfs.h,
11067 thread_db.h, and linux/elf.h headrs.
11068 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11069 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11070 Check for -lthread_db and thread support.
11071 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11072 PowerPC, and SuperH.
11073 * i387-fp.c: Constify arguments.
11074 * i387-fp.h: Likewise.
11075 * inferiors.c: (struct thread_info): Renamed from
11076 `struct inferior_info'. Remove PID member. Use generic inferior
11077 list header. All uses updated.
11078 (inferiors, signal_pid): Removed.
11079 (all_threads): New variable.
11080 (get_thread): Define.
11081 (add_inferior_to_list): New function.
11082 (for_each_inferior): New function.
11083 (change_inferior_id): New function.
11084 (add_inferior): Removed.
11085 (remove_inferior): New function.
11086 (add_thread): New function.
11087 (free_one_thread): New function.
11088 (remove_thread): New function.
11089 (clear_inferiors): Use for_each_inferior and free_one_thread.
11090 (find_inferior): New function.
11091 (find_inferior_id): New function.
11092 (inferior_target_data): Update argument type.
11093 (set_inferior_target_data): Likewise.
11094 (inferior_regcache_data): Likewise.
11095 (set_inferior_regcache_data): Likewise.
11096 * linux-low.c (linux_bp_reinsert): Remove.
11097 (all_processes, stopping_threads, using_thrads)
11098 (struct pending_signals, debug_threads, pid_of): New.
11099 (inferior_pid): Replace with macro.
11100 (struct inferior_linux_data): Remove.
11101 (get_stop_pc, add_process): New functions.
11102 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11103 Use add_process and add_thread.
11104 (linux_attach_lwp): New function, based on old linux_attach. Use
11105 add_process and add_thread. Set stop_expected for new threads.
11106 (linux_attach): New function.
11107 (linux_kill_one_process): New function.
11108 (linux_kill): Kill all LWPs.
11109 (linux_thread_alive): Use find_inferior_id.
11110 (check_removed_breakpoints, status_pending_p): New functions.
11111 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11112 Update. Use WNOHANG. Wait for cloned processes also. Update process
11113 struct for the found process.
11114 (linux_wait_for_event): New function.
11115 (linux_wait): Use it. Support LWPs.
11116 (send_sigstop, wait_for_sigstop, stop_all_processes)
11117 (linux_resume_one_process, linux_continue_one_process): New functions.
11118 (linux_resume): Support LWPs.
11119 (REGISTER_RAW_SIZE): Remove.
11120 (fetch_register): Use register_size instead. Call supply_register.
11121 (usr_store_inferior_registers): Likewise. Call collect_register.
11122 Fix recursive case.
11123 (regsets_fetch_inferior_registers): Improve error message.
11124 (regsets_store_inferior_registers): Add debugging.
11125 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11126 (unstopped_p, linux_signal_pid): New functions.
11127 (linux_target_ops): Add linux_signal_pid.
11128 (linux_init_signals): New function.
11129 (initialize_low): Call it. Initialize using_threads.
11130 * regcache.c (inferior_regcache_data): Add valid
11131 flag.
11132 (get_regcache): Fetch registers lazily. Add fetch argument
11133 and update all callers.
11134 (regcache_invalidate_one, regcache_invalidate): New
11135 functions.
11136 (new_register_cache): Renamed from create_register_cache.
11137 Return the new regcache.
11138 (free_register_cache): Change argument to a void *.
11139 (registers_to_string, registers_from_string): Call get_regcache
11140 with fetch flag set.
11141 (register_data): Make static. Pass fetch flag to get_regcache.
11142 (supply_register): Call get_regcache with fetch flag clear.
11143 (collect_register): Call get_regcache with fetch flag set.
11144 (collect_register_as_string): New function.
11145 * regcache.h: Update.
11146 * remote-utils.c (putpkt): Flush after debug output and use
11147 stderr.
11148 Handle input interrupts while waiting for an ACK.
11149 (input_interrupt): Use signal_pid method.
11150 (getpkt): Flush after debug output and use stderr.
11151 (outreg): Use collect_register_as_string.
11152 (new_thread_notify, dead_thread_notify): New functions.
11153 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11154 and general_thread.
11155 (look_up_one_symbol): Flush after debug output.
11156 * server.c (step_thread, server_waiting): New variables.
11157 (start_inferior): Don't use signal_pid. Update call to mywait.
11158 (attach_inferior): Update call to mywait.
11159 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11160 (main): Don't fetch/store registers explicitly. Use
11161 set_desired_inferior. Support proposed ``Hs'' packet. Update
11162 calls to mywait.
11163 * server.h: Update.
11164 (struct inferior_list, struct_inferior_list_entry): New.
11165 * target.c (set_desired_inferior): New.
11166 (write_inferior_memory): Constify.
11167 (mywait): New function.
11168 * target.h: Update.
11169 (struct target_ops): New signal_pid method.
11170 (mywait): Removed macro, added prototype.
11171
11172 * linux-low.h (regset_func): Removed.
11173 (regset_fill_func, regset_store_func): New.
11174 (enum regset_type): New.
11175 (struct regset_info): Add type field. Use new operation types.
11176 (struct linux_target_ops): stop_pc renamed to get_pc.
11177 Add decr_pc_after_break and breakpoint_at.
11178 (get_process, get_thread_proess, get_process_thread)
11179 (strut process_info, all_processes, linux_attach_lwp)
11180 (thread_db_init): New.
11181
11182 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11183 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11184 (the_low_target): Add new members.
11185 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11186 (i386_store_fpxregset): Constify.
11187 (target_regsets): Add new kind identifier.
11188 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11189 (i386_set_pc): Add debugging.
11190 (i386_breakpoint_at): New function.
11191 (the_low_target): Add new members.
11192 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11193 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11194 (mips_breakpoint_at): New.
11195 (the_low_target): Add new members.
11196 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11197 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11198 (the_low_target): Add new members.
11199 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11200 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11201 (the_low_target): Add new members.
11202 * linux-x86-64-low.c (target_regsets): Add new kind
11203 identifier.
11204
112052002-05-15 Daniel Jacobowitz <drow@mvista.com>
11206
11207 From Martin Pool <mbp@samba.org>:
11208 * server.c (gdbserver_usage): New function.
11209 (main): Call it.
11210
112112002-05-14 Daniel Jacobowitz <drow@mvista.com>
11212
11213 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11214 stop_at -> stop_pc.
11215
112162002-05-04 Andrew Cagney <ac131313@redhat.com>
11217
11218 * Makefile.in: Remove obsolete code.
11219
112202002-04-24 Michal Ludvig <mludvig@suse.cz>
11221
11222 * linux-low.c (regsets_fetch_inferior_registers),
11223 (regsets_store_inferior_registers): Removed cast to int from
11224 ptrace() calls.
11225 * regcache.h: Added declaration of struct inferior_info.
11226
112272002-04-20 Daniel Jacobowitz <drow@mvista.com>
11228
11229 * inferiors.c (struct inferior_info): Add regcache_data.
11230 (add_inferior): Call create_register_cache.
11231 (clear_inferiors): Call free_register_cache.
11232 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11233 * regcache.c (struct inferior_regcache_data): New.
11234 (registers): Remove.
11235 (get_regcache): New function.
11236 (create_register_cache, free_register_cache): New functions.
11237 (set_register_cache): Don't initialize the register cache here.
11238 (registers_to_string, registers_from_string, register_data): Call
11239 get_regcache.
11240 * regcache.h: Add prototypes.
11241 * server.h: Likewise.
11242
112432002-04-20 Daniel Jacobowitz <drow@mvista.com>
11244
11245 * mem-break.c: New file.
11246 * mem-break.h: New file.
11247 * Makefile.in: Add mem-break.o rule; update server.h
11248 dependencies.
11249 * inferiors.c (struct inferior_info): Add target_data
11250 member.
11251 (clear_inferiors): Free target_data member if set.
11252 (inferior_target_data, set_inferior_target_data): New functions.
11253 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11254 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11255 * linux-low.c (linux_bp_reinsert): New variable.
11256 (struct inferior_linux_data): New.
11257 (linux_create_inferior): Use set_inferior_target_data.
11258 (linux_attach): Likewise. Call add_inferior.
11259 (linux_wait_for_one_inferior): New function.
11260 (linux_wait): Call it.
11261 (linux_write_memory): Add const.
11262 (initialize_low): Call set_breakpoint_data.
11263 * linux-low.h (struct linux_target_ops): Add breakpoint
11264 handling members.
11265 * server.c (attach_inferior): Remove extra add_inferior
11266 call.
11267 * server.h: Include mem-break.h. Update inferior.c
11268 prototypes.
11269 * target.c (read_inferior_memory)
11270 (write_inferior_memory): New functions.
11271 * target.h (read_inferior_memory)
11272 (write_inferior_memory): Change macros to prototypes.
11273 (struct target_ops): Update comments. Add const to write_memory
11274 definition.
11275
112762002-04-11 Daniel Jacobowitz <drow@mvista.com>
11277
11278 * linux-low.c (usr_store_inferior_registers): Support
11279 registers which are allowed to fail to store.
11280 * linux-low.h (linux_target_ops): Likewise.
11281 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11282 (ppc_cannot_store_register): FPSCR may not be storable.
11283
112842002-04-09 Daniel Jacobowitz <drow@mvista.com>
11285
11286 * server.h: Include <string.h> if HAVE_STRING_H.
11287 * ChangeLog: Correct paths in last ChangeLog entry.
11288
112892002-04-09 Daniel Jacobowitz <drow@mvista.com>
11290
11291 * linux-low.h: Remove obsolete prototypes.
11292 (struct linux_target_ops): New.
11293 (extern the_low_target): New.
11294 * linux-low.c (num_regs, regmap): Remove declarations.
11295 (register_addr): Use the_low_target explicitly.
11296 (fetch_register): Likewise.
11297 (usr_fetch_inferior_registers): Likewise.
11298 (usr_store_inferior_registers): Likewise.
11299 * linux-arm-low.c (num_regs): Remove.
11300 (arm_num_regs): Define.
11301 (arm_regmap): Renamed from regmap, made static.
11302 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11303 made static.
11304 (arm_cannot_store_register): Renamed from cannot_store_register,
11305 made static.
11306 (the_low_target): New.
11307 * linux-i386-low.c (num_regs): Remove.
11308 (i386_num_regs): Define.
11309 (i386_regmap): Renamed from regmap, made static.
11310 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11311 made static.
11312 (i386_cannot_store_register): Renamed from cannot_store_register,
11313 made static.
11314 (the_low_target): New.
11315 * linux-ia64-low.c (num_regs): Remove.
11316 (ia64_num_regs): Define.
11317 (ia64_regmap): Renamed from regmap, made static.
11318 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11319 made static.
11320 (ia64_cannot_store_register): Renamed from cannot_store_register,
11321 made static.
11322 (the_low_target): New.
11323 * linux-m68k-low.c (num_regs): Remove.
11324 (m68k_num_regs): Define.
11325 (m68k_regmap): Renamed from regmap, made static.
11326 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11327 made static.
11328 (m68k_cannot_store_register): Renamed from cannot_store_register,
11329 made static.
11330 (the_low_target): New.
11331 * linux-mips-low.c (num_regs): Remove.
11332 (mips_num_regs): Define.
11333 (mips_regmap): Renamed from regmap, made static.
11334 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11335 made static.
11336 (mips_cannot_store_register): Renamed from cannot_store_register,
11337 made static.
11338 (the_low_target): New.
11339 * linux-ppc-low.c (num_regs): Remove.
11340 (ppc_num_regs): Define.
11341 (ppc_regmap): Renamed from regmap, made static.
11342 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11343 made static.
11344 (ppc_cannot_store_register): Renamed from cannot_store_register,
11345 made static.
11346 (the_low_target): New.
11347 * linux-s390-low.c (num_regs): Remove.
11348 (s390_num_regs): Define.
11349 (s390_regmap): Renamed from regmap, made static.
11350 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11351 made static.
11352 (s390_cannot_store_register): Renamed from cannot_store_register,
11353 made static.
11354 (the_low_target): New.
11355 * linux-sh-low.c (num_regs): Remove.
11356 (sh_num_regs): Define.
11357 (sh_regmap): Renamed from regmap, made static.
11358 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11359 made static.
11360 (sh_cannot_store_register): Renamed from cannot_store_register,
11361 made static.
11362 (the_low_target): New.
11363 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11364 (the_low_target): New.
11365
113662002-04-09 Daniel Jacobowitz <drow@mvista.com>
11367
11368 * Makefile.in: Add stamp-h target.
11369 * configure.in: Create stamp-h.
11370 * configure: Regenerated.
11371
113722002-04-09 Daniel Jacobowitz <drow@mvista.com>
11373
11374 * inferiors.c: New file.
11375 * target.c: New file.
11376 * target.h: New file.
11377 * Makefile.in: Add target.o and inferiors.o. Update
11378 dependencies.
11379 * linux-low.c (inferior_pid): New static variable,
11380 moved from server.c.
11381 (linux_create_inferior): Renamed from create_inferior.
11382 Call add_inferior. Return 0 on success instead of a PID.
11383 (linux_attach): Renamed from myattach.
11384 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11385 (linux_thread_alive): Renamed from mythread_alive.
11386 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11387 child dies.
11388 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11389 (regsets_store_inferior_registers): Correct error message.
11390 Add missing ``return 0''.
11391 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11392 (linux_store_registers): Renamed from store_inferior_registers.
11393 (linux_read_memory): Renamed from read_inferior_memory.
11394 (linux_write_memory): Renamed from write_inferior_memory.
11395 (linux_target_ops): New structure.
11396 (initialize_low): Call set_target_ops ().
11397 * remote-utils.c (unhexify): New function.
11398 (hexify): New function.
11399 (input_interrupt): Send signals to ``signal_pid''.
11400 * server.c (inferior_pid): Remove.
11401 (start_inferior): Update create_inferior call.
11402 (attach_inferior): Call add_inferior.
11403 (handle_query): New function.
11404 (main): Call handle_query for `q' packets.
11405 * server.h: Include "target.h". Remove obsolete prototypes.
11406 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11407
114082002-04-09 Daniel Jacobowitz <drow@mvista.com>
11409
11410 * Makefile.in: Add WARN_CFLAGS. Update configury
11411 dependencies.
11412 * configure.in: Check for <string.h>
11413 * configure: Regenerate.
11414 * config.in: Regenerate.
11415 * gdbreplay.c: Include needed system headers.
11416 (remote_open): Remove strchr prototype.
11417 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11418 * regcache.c (supply_register): Change buf argument to const void *.
11419 (supply_register_by_name): Likewise.
11420 (collect_register): Change buf argument to void *.
11421 (collect_register_by_name): Likewise.
11422 * regcache.h: Add missing prototypes.
11423 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11424 * server.c (handle_query): New function.
11425 (attached): New static variable, moved out of main.
11426 (main): Quiet longjmp clobber warnings.
11427 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11428 * utils.c (error): Remove NORETURN.
11429 (fatal): Likewise.