]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
btrace: fix case label in btrace_data_append
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
554717a3
YQ
12015-07-17 Yao Qi <yao.qi@linaro.org>
2
3 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8 (AARCH64_HWP_ALIGNMENT): Likewise.
9 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
11 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
12 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
13 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
14 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
15 (struct aarch64_debug_reg_state): Likewise.
16 (struct arch_lwp_info): Likewise.
17 (aarch64_align_watchpoint): Likewise.
18 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
19 (aarch64_watchpoint_length): Likewise.
20 (aarch64_point_encode_ctrl_reg): Likewise
21 (aarch64_point_is_aligned): Likewise.
22 (aarch64_align_watchpoint): Likewise.
23 (aarch64_linux_set_debug_regs):
24 (aarch64_dr_state_insert_one_point): Likewise.
25 (aarch64_dr_state_remove_one_point): Likewise.
26 (aarch64_handle_breakpoint): Likewise.
27 (aarch64_handle_aligned_watchpoint): Likewise.
28 (aarch64_handle_unaligned_watchpoint): Likewise.
29 (aarch64_handle_watchpoint): Likewise.
30
c67ca4de
YQ
312015-07-17 Yao Qi <yao.qi@linaro.org>
32
33 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
34 and don't aarch64_get_debug_reg_state. All callers update.
35 (aarch64_handle_aligned_watchpoint): Likewise.
36 (aarch64_handle_unaligned_watchpoint): Likewise.
37 (aarch64_handle_watchpoint): Likewise.
38 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
39 (aarch64_remove_point): Likewise.
40
25abf979
YQ
412015-07-17 Yao Qi <yao.qi@linaro.org>
42
43 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
44 debug_printf.
45 (aarch64_handle_unaligned_watchpoint): Likewise.
46
db1ff28b
JK
472015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
48
49 Revert the previous 3 commits:
50 Move gdb_regex* to common/
51 Move linux_find_memory_regions_full & co.
52 gdbserver build-id attribute generator
53
700ca40f
JK
542015-07-15 Aleksandar Ristovski <aristovski@qnx.com
55 Jan Kratochvil <jan.kratochvil@redhat.com>
56
57 gdbserver build-id attribute generator.
58 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
59 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
60 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
61 (find_phdr): New.
62 (get_dynamic): Use find_pdhr to traverse program headers.
63 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
64 (compare_mapping_entry_range, struct find_memory_region_callback_data)
65 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
66 (get_hex_build_id): New.
67 (linux_qxfer_libraries_svr4): Add optional build-id attribute
68 to reply XML document.
69
9904185c
JK
702015-07-15 Aleksandar Ristovski <aristovski@qnx.com
71 Jan Kratochvil <jan.kratochvil@redhat.com>
72
73 * target.c: Include target/target-utils.h and fcntl.h.
74 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
75 (target_fileio_read_stralloc): New functions.
76
6e5b4429
JK
772015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
78
79 * Makefile.in (OBS): Add gdb_regex.o.
80 (gdb_regex.o): New.
81 * config.in: Rebuilt.
82 * configure: Rebuilt.
83
ddc98fbf
JK
842015-07-15 Aleksandar Ristovski <aristovski@qnx.com
85 Jan Kratochvil <jan.kratochvil@redhat.com>
86
87 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
88 * Makefile.in (OBS): Add target-utils.o.
89 (linux-maps.o, target-utils.o): New.
90 * configure.srv (srv_linux_obj): Add linux-maps.o.
91
e57bb7a0
PL
922015-07-15 Pierre Langlois <pierre.langlois@arm.com>
93
94 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
95 function, return 1.
96 (the_low_target): Install it.
97
586b02a9
PA
982015-07-14 Pedro Alves <palves@redhat.com>
99
100 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
101 Instead, ignore ECHILD, and throw an error for other errnos.
102
58c1b36c
PA
1032015-07-10 Pedro Alves <palves@redhat.com>
104
105 * event-loop.c (struct callback_event) <data>: Change type to
106 gdb_client_data instance instead of gdb_client_data pointer.
107 (append_callback_event): Adjust.
108
421530db
PL
1092015-07-10 Pierre Langlois <pierre.langlois@arm.com>
110
111 * linux-aarch64-low.c: Add comments for each linux_target_ops
112 method. Remove comments already covered in target_ops and
113 linux_target_ops definitions.
114 (the_low_target): Add comments for each unimplemented method.
115
c2d65f38
YQ
1162015-07-09 Yao Qi <yao.qi@linaro.org>
117
118 * linux-aarch64-low.c (aarch64_regmap): Remove.
119 (aarch64_usrregs_info): Remove.
120 (regs_info): Set field usrregs to NULL.
121
b20a6524
MM
1222015-07-02 Markus Metzger <markus.t.metzger@intel.com>
123
124 * linux-low.c: Include "rsp-low.h"
125 (linux_low_encode_pt_config, linux_low_encode_raw): New.
126 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
127 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
128 (handle_btrace_enable_pt): New.
129 (handle_btrace_general_set): Support "pt".
130 (handle_btrace_conf_general_set): Support "pt:size".
131
96c97461
PL
1322015-06-29 Pierre Langlois <pierre.langlois@arm.com>
133
134 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
135 Z_PACKET_SW_BP.
136
37d66942
PL
1372015-06-29 Pierre Langlois <pierre.langlois@arm.com>
138
139 * linux-aarch64-low.c: Remove comment about endianness.
140 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
141 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
142 memcmp.
143
dc06243f
GB
1442015-06-24 Gary Benson <gbenson@redhat.com>
145
146 * linux-i386-ipa.c (stdint.h): Do not include.
147 * lynx-i386-low.c (stdint.h): Likewise.
148 * lynx-ppc-low.c (stdint.h): Likewise.
149 * mem-break.c (stdint.h): Likewise.
150 * thread-db.c (stdint.h): Likewise.
151 * tracepoint.c (stdint.h): Likewise.
152 * win32-low.c (stdint.h): Likewise.
153
124e13d9
SM
1542015-06-18 Simon Marchi <simon.marchi@ericsson.com>
155
156 * server.c (write_qxfer_response): Update call to
157 remote_escape_output.
158
909c2cda
JK
1592015-06-15 Aleksandar Ristovski <aristovski@qnx.com
160 Jan Kratochvil <jan.kratochvil@redhat.com>
161
162 Merge multiple hex conversions.
163 * gdbreplay.c (tohex): Rename to 'fromhex'.
164 (logchar): Use fromhex.
165
24c05f46
JK
1662015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
167
168 * server.c (handle_qxfer_libraries): Set `version' attribute for
169 <library-list>.
170
14d2069a
GB
1712015-06-10 Gary Benson <gbenson@redhat.com>
172
173 * target.h (struct target_ops) <multifs_open>: New field.
174 <multifs_unlink>: Likewise.
175 <multifs_readlink>: Likewise.
176 * linux-low.c (nat/linux-namespaces.h): New include.
177 (linux_target_ops): Initialize the_target->multifs_open,
178 the_target->multifs_unlink and the_target->multifs_readlink.
179 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
180 * hostio.c (hostio_fs_pid): New static variable.
181 (hostio_handle_new_gdb_connection): New function.
182 (handle_setfs): Likewise.
183 (handle_open): Use the_target->multifs_open as appropriate.
184 (handle_unlink): Use the_target->multifs_unlink as appropriate.
185 (handle_readlink): Use the_target->multifs_readlink as
186 appropriate.
187 (handle_vFile): Handle vFile:setfs packets.
188 * server.c (handle_query): Call hostio_handle_new_gdb_connection
189 after target_handle_new_gdb_connection.
190
4b8b5e72
GB
1912015-06-10 Gary Benson <gbenson@redhat.com>
192
193 * configure.ac (AC_CHECK_FUNCS): Add setns.
194 * config.in: Regenerate.
195 * configure: Likewise.
196 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
197 (linux-namespaces.o): New rule.
198 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
199
3ac2e371
GB
2002015-06-09 Gary Benson <gbenson@redhat.com>
201
202 * hostio.c (handle_open): Process mode argument with
203 fileio_to_host_mode.
204
ca9b78ce
YQ
2052015-06-01 Yao Qi <yao.qi@linaro.org>
206
207 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
208 * linux-x86-low.c: Likewise.
209
bfacd19d
DB
2102015-05-28 Don Breazeal <donb@codesourcery.com>
211
212 * linux-low.c (handle_extended_wait): Initialize
213 thread_info.last_resume_kind for new fork children.
214
452003ef
PA
2152015-05-15 Pedro Alves <palves@redhat.com>
216
217 * target.h (target_handle_new_gdb_connection): Rewrite using if
218 wrapped in do/while.
219
1041a03c
JB
2202015-05-14 Joel Brobecker <brobecker@adacore.com>
221
222 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
223 * configure, config.in: Regenerate.
224 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
225 Declare typedef.
226
c269dbdb
DB
2272015-05-12 Don Breazeal <donb@codesourcery.com>
228
229 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
230 PTRACE_EVENT_VFORK_DONE.
231 (linux_low_ptrace_options, extended_event_reported): Add vfork
232 events.
233 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
234 and "vforkdone" for RSP 'T' Stop Reply Packet.
235 * server.h (report_vfork_events): Declare
236 global variable.
237
3a8a0396
DB
2382015-05-12 Don Breazeal <donb@codesourcery.com>
239
240 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
241 (the_low_target) <new_fork>: Initialize new member.
242 * linux-arm-low.c (arm_new_fork): New function.
243 (the_low_target) <new_fork>: Initialize new member.
244 * linux-low.c (handle_extended_wait): Call new target function
245 new_fork.
246 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
247 * linux-mips-low.c (mips_add_watchpoint): New function
248 extracted from mips_insert_point.
249 (the_low_target) <new_fork>: Initialize new member.
250 (mips_linux_new_fork): New function.
251 (mips_insert_point): Call mips_add_watchpoint.
252 * linux-x86-low.c (x86_linux_new_fork): New function.
253 (the_low_target) <new_fork>: Initialize new member.
254
de0d863e
DB
2552015-05-12 Don Breazeal <donb@codesourcery.com>
256
257 * linux-low.c (handle_extended_wait): Implement return value,
258 rename argument 'event_child' to 'event_lwp', handle
259 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
260 (linux_low_ptrace_options): New function.
261 (linux_low_filter_event): Call linux_low_ptrace_options,
262 use different argument fo linux_enable_event_reporting,
263 use return value from handle_extended_wait.
264 (extended_event_reported): New function.
265 (linux_wait_1): Call extended_event_reported and set
266 status to report fork events.
267 (linux_write_memory): Add pid to debug message.
268 (reset_lwp_ptrace_options_callback): New function.
269 (linux_handle_new_gdb_connection): New function.
270 (linux_target_ops): Initialize new structure member.
271 * linux-low.h (struct lwp_info) <waitstatus>: New member.
272 * lynx-low.c: Initialize new structure member.
273 * remote-utils.c (prepare_resume_reply): Implement stop reason
274 "fork" for "T" stop message.
275 * server.c (handle_query): Call handle_new_gdb_connection.
276 * server.h (report_fork_events): Declare global flag.
277 * target.h (struct target_ops) <handle_new_gdb_connection>:
278 New member.
279 (target_handle_new_gdb_connection): New macro.
280 * win32-low.c: Initialize new structure member.
281
ddcbc397
DB
2822015-05-12 Don Breazeal <donb@codesourcery.com>
283
284 * mem-break.c (APPEND_TO_LIST): Define macro.
285 (clone_agent_expr): New function.
286 (clone_one_breakpoint): New function.
287 (clone_all_breakpoints): New function.
288 * mem-break.h: Declare new functions.
289
89245bc0
DB
2902015-05-12 Don Breazeal <donb@codesourcery.com>
291
292 * linux-low.c (linux_supports_fork_events): New function.
293 (linux_supports_vfork_events): New function.
294 (linux_target_ops): Initialize new structure members.
295 (initialize_low): Call linux_check_ptrace_features.
296 * lynx-low.c (lynx_target_ops): Initialize new structure
297 members.
298 * server.c (report_fork_events, report_vfork_events):
299 New global flags.
300 (handle_query): Add new features to qSupported packet and
301 response.
302 (captured_main): Initialize new global variables.
303 * target.h (struct target_ops) <supports_fork_events>:
304 New member.
305 <supports_vfork_events>: New member.
306 (target_supports_fork_events): New macro.
307 (target_supports_vfork_events): New macro.
308 * win32-low.c (win32_target_ops): Initialize new structure
309 members.
310
835205d0
GB
3112015-05-12 Gary Benson <gbenson@redhat.com>
312
313 * server.c (handle_qxfer_exec_file): Use current process
314 if annex is empty.
315
21e94bd9
SL
3162015-05-08 Sandra Loosemore <sandra@codesourcery.com>
317
318 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
319 Remove HAVE_PTRACE_GETREGS conditionals.
320 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
321 instead of PTRACE_GETREGS and PTRACE_SETREGS.
322
45614f15
YQ
3232015-05-08 Yao Qi <yao.qi@linaro.org>
324
325 * linux-low.c (linux_supports_conditional_breakpoints): New
326 function.
327 (linux_target_ops): Install new target method.
328 * lynx-low.c (lynx_target_ops): Install NULL hook for
329 supports_conditional_breakpoints.
330 * nto-low.c (nto_target_ops): Likewise.
331 * spu-low.c (spu_target_ops): Likewise.
332 * win32-low.c (win32_target_ops): Likewise.
333 * server.c (handle_query): Check
334 target_supports_conditional_breakpoints.
335 * target.h (struct target_ops) <supports_conditional_breakpoints>:
336 New field.
337 (target_supports_conditional_breakpoints): New macro.
338
80ad801e
PA
3392015-05-06 Pedro Alves <palves@redhat.com>
340
341 PR server/18081
342 * server.c (start_inferior): If the process exits, mourn it.
343
819843c7
GB
3442015-04-21 Gary Benson <gbenson@redhat.com>
345
346 * hostio.c (fileio_open_flags_to_host): Factored out to
347 fileio_to_host_openflags in common/fileio.c. Single use
348 updated.
349
a2d5a9d7
MF
3502015-04-17 Max Filippov <jcmvbkbc@gmail.com>
351
352 * linux-xtensa-low.c (xtensa_fill_gregset)
353 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
354 XCHAL_HAVE_LOOP.
355
deb44829
MF
3562015-04-17 Max Filippov <jcmvbkbc@gmail.com>
357
358 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
359 (regs_info): Replace usrregs pointer with NULL.
360
e57f1de3
GB
3612015-04-17 Gary Benson <gbenson@redhat.com>
362
363 * target.h (struct target_ops) <pid_to_exec_file>: New field.
364 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
365 * server.c (handle_qxfer_exec_file): New function.
366 (qxfer_packets): Add exec-file entry.
367 (handle_query): Report qXfer:exec-file:read as supported packet.
368
62828379
RN
3692015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
370
371 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
372
b88bb450
GB
3732015-04-09 Gary Benson <gbenson@redhat.com>
374
375 * hostio-errno.c (errno_to_fileio_error): Remove function.
376 Update caller to use remote_fileio_to_fio_error.
377
c8f4bfdd
YQ
3782015-04-09 Yao Qi <yao.qi@linaro.org>
379
380 * linux-low.c (linux_insert_point): Call
381 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
382 (linux_remove_point): Call remove_memory_breakpoint if type is
383 raw_bkpt_type_sw.
384 * linux-x86-low.c (x86_insert_point): Don't call
385 insert_memory_breakpoint.
386 (x86_remove_point): Don't call remove_memory_breakpoint.
387
41f98f02
PA
3882015-04-01 Pedro Alves <palves@redhat.com>
389 Cleber Rosa <crosa@redhat.com>
390
391 * server.c (gdbserver_usage): Reorganize and extend the usage
392 message.
393
2bf6fb9d
PA
3942015-03-24 Pedro Alves <palves@redhat.com>
395
396 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
397 output. Also dump TRAP_TRACE.
398 (linux_low_filter_event): In debug output, distinguish a
399 resume_stop SIGSTOP from a delayed SIGSTOP.
400
369f6daa
GB
4012015-03-24 Gary Benson <gbenson@redhat.com>
402
403 * linux-x86-low.c (x86_linux_new_thread): Moved to
404 nat/x86-linux.c.
405 (x86_linux_prepare_to_resume): Likewise.
406
8e5d4070
GB
4072015-03-24 Gary Benson <gbenson@redhat.com>
408
409 * Makefile.in (x86-linux-dregs.o): New rule.
410 * configure.srv: Add x86-linux-dregs.o to relevant targets.
411 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
412 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
413 (x86_linux_dr_get): Likewise.
414 (x86_linux_dr_set): Likewise.
415 (update_debug_registers_callback): Likewise.
416 (x86_linux_dr_set_addr): Likewise.
417 (x86_linux_dr_get_addr): Likewise.
418 (x86_linux_dr_set_control): Likewise.
419 (x86_linux_dr_get_control): Likewise.
420 (x86_linux_dr_get_status): Likewise.
421 (x86_linux_update_debug_registers): Likewise.
422
2b95d440
GB
4232015-03-24 Gary Benson <gbenson@redhat.com>
424
425 * linux-x86-low.c (x86_linux_update_debug_registers):
426 New function, factored out from...
427 (x86_linux_prepare_to_resume): ...this.
428
14b0bc68
GB
4292015-03-24 Gary Benson <gbenson@redhat.com>
430
431 * linux-x86-low.c (x86_linux_dr_get): Update comments.
432 (x86_linux_dr_set): Likewise.
433 (update_debug_registers_callback): Likewise.
434 (x86_linux_dr_set_addr): Likewise.
435 (x86_linux_dr_get_addr): Likewise.
436 (x86_linux_dr_set_control): Likewise.
437 (x86_linux_dr_get_control): Likewise.
438 (x86_linux_dr_get_status): Likewise.
439 (x86_linux_prepare_to_resume): Likewise.
440
5dfe6ca8
GB
4412015-03-24 Gary Benson <gbenson@redhat.com>
442
443 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
444 Use perror_with_name. Pass string through gettext.
445 (x86_linux_dr_set): Likewise.
446
d33472ad
GB
4472015-03-24 Gary Benson <gbenson@redhat.com>
448
449 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
450 (x86_linux_dr_set_addr): ...this.
451 (x86_dr_low_get_addr): Rename to...
452 (x86_linux_dr_get_addr): ...this.
453 (x86_dr_low_set_control): Rename to...
454 (x86_linux_dr_set_control): ...this.
455 (x86_dr_low_get_control): Rename to...
456 (x86_linux_dr_get_control): ...this.
457 (x86_dr_low_get_status): Rename to...
458 (x86_linux_dr_get_status): ...this.
459 (x86_dr_low): Update with new function names.
460
4b134ca1
GB
4612015-03-24 Gary Benson <gbenson@redhat.com>
462
463 * Makefile.in (x86-linux.o): New rule.
464 * configure.srv: Add x86-linux.o to relevant targets.
465 * linux-low.c (lwp_set_arch_private_info): New function.
466 (lwp_arch_private_info): Likewise.
467 * linux-x86-low.c: Include nat/x86-linux.h.
468 (arch_lwp_info): Removed structure.
469 (update_debug_registers_callback):
470 Use lwp_set_debug_registers_changed.
471 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
472 and lwp_set_debug_registers_changed.
473 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
474
34c703da
GB
4752015-03-24 Gary Benson <gbenson@redhat.com>
476
477 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
478 * linux-arm-low.c (arm_new_thread): Likewise.
479 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
480 * linux-mips-low.c (mips_linux_new_thread): Likewise.
481 * linux-x86-low.c (x86_linux_new_thread): Likewise.
482 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
483
cff068da
GB
4842015-03-24 Gary Benson <gbenson@redhat.com>
485
486 * linux-low.c (ptid_of_lwp): New function.
487 (lwp_is_stopped): Likewise.
488 (lwp_stop_reason): Likewise.
489 * linux-x86-low.c (update_debug_registers_callback):
490 Use lwp_is_stopped.
491 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
492 lwp_stop_reason.
493
b2f7c7e8
GB
4942015-03-24 Gary Benson <gbenson@redhat.com>
495
496 * linux-low.h (linux_stop_lwp): Remove declaration.
497
6d4ee8c6
GB
4982015-03-24 Gary Benson <gbenson@redhat.com>
499
500 * linux-low.h: Include nat/linux-nat.h.
501 * linux-low.c (iterate_over_lwps_args): New structure.
502 (iterate_over_lwps_filter): New function.
503 (iterate_over_lwps): Likewise.
504 * linux-x86-low.c (update_debug_registers_callback):
505 Update signature to what iterate_over_lwps expects.
506 Remove PID check that iterate_over_lwps now performs.
507 (x86_dr_low_set_addr): Use iterate_over_lwps.
508 (x86_dr_low_set_control): Likewise.
509
70a0bb6b
GB
5102015-03-24 Gary Benson <gbenson@redhat.com>
511
512 * linux-x86-low.c (x86_debug_reg_state): New function.
513 (x86_linux_prepare_to_resume): Use the above.
514
7b669087
GB
5152015-03-24 Gary Benson <gbenson@redhat.com>
516
517 * linux-low.c (current_lwp_ptid): New function.
518 * linux-x86-low.c: Include nat/linux-nat.h.
519 (x86_dr_low_get_addr): Use current_lwp_ptid.
520 (x86_dr_low_get_control): Likewise.
521 (x86_dr_low_get_status): Likewise.
522
eef49a3d
PA
5232015-03-20 Pedro Alves <palves@redhat.com>
524
525 * tracepoint.c (cmd_qtstatus): Make "str" const.
526
b2333d22
PA
5272015-03-20 Pedro Alves <palves@redhat.com>
528
529 * server.c (handle_general_set): Make "req_str" const.
530
23f238d3
PA
5312015-03-19 Pedro Alves <palves@redhat.com>
532
533 * linux-low.c (linux_resume_one_lwp): Rename to ...
534 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
535 instead call perror_with_name.
536 (check_ptrace_stopped_lwp_gone): New function.
537 (linux_resume_one_lwp): Reimplement as wrapper around
538 linux_resume_one_lwp_throw that swallows errors if the LWP is
539 gone.
540
91baf43f
PA
5412015-03-19 Pedro Alves <palves@redhat.com>
542
543 * linux-low.c (count_events_callback, select_event_lwp_callback):
544 No longer check whether the thread has resume_stop as last resume
545 kind.
546
8bf3b159
PA
5472015-03-19 Pedro Alves <palves@redhat.com>
548
549 * linux-low.c (count_events_callback, select_event_lwp_callback):
550 Use the lwp's status_pending_p field, not the thread's.
551
b90fc188
PA
5522015-03-19 Pedro Alves <palves@redhat.com>
553
554 * linux-low.c (select_event_lwp_callback): Update comments to
555 no longer mention SIGTRAP.
556
464b0089
GB
5572015-03-18 Gary Benson <gbenson@redhat.com>
558
559 * server.c (handle_query): Do not report vFile:fstat as supported.
560
aa9e327f
GB
5612015-03-11 Gary Benson <gbenson@redhat.com>
562
563 * hostio.c (sys/types.h): New include.
564 (sys/stat.h): Likewise.
565 (common-remote-fileio.h): Likewise.
566 (handle_fstat): New function.
567 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 568
791c0056
GB
5692015-03-11 Gary Benson <gbenson@redhat.com>
570
571 * configure.ac (AC_CHECK_MEMBERS): Add checks for
572 struct stat.st_blocks and struct stat.st_blksize.
573 * configure: Regenerate.
574 * config.in: Likewise.
575 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
576 (OBS): Add common-remote-fileio.o.
577 (common-remote-fileio.o): New rule.
578
9a9df970
PA
5792015-03-09 Pedro Alves <palves@redhat.com>
580
581 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
582 'struct sockaddr' pointer in 'accept' call.
583
9eb1356e
PA
5842015-03-09 Pedro Alves <palves@redhat.com>
585
586 Revert:
587 2015-03-07 Pedro Alves <palves@redhat.com>
588 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
589 or <winsock2.h> here. Instead include "gdb_socket.h".
590 (remote_open): Use union gdb_sockaddr_u.
591 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
592 or <winsock2.h> here. Instead include "gdb_socket.h".
593 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
594 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
595 or <sys/un.h>.
596 (init_named_socket, gdb_agent_helper_thread): Use union
597 gdb_sockaddr_u.
598
aac331e4
PA
5992015-03-07 Pedro Alves <palves@redhat.com>
600
601 * configure.ac (build_warnings): Move
602 -Wdeclaration-after-statement to the C-specific set.
603 * configure: Regenerate.
604
366c75fc
PA
6052015-03-07 Pedro Alves <palves@redhat.com>
606
607 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
608 or <winsock2.h> here. Instead include "gdb_socket.h".
609 (remote_open): Use union gdb_sockaddr_u.
610 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
611 or <winsock2.h> here. Instead include "gdb_socket.h".
612 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
613 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
614 or <sys/un.h>.
615 (init_named_socket, gdb_agent_helper_thread): Use union
616 gdb_sockaddr_u.
617
492d29ea
PA
6182015-03-07 Pedro Alves <palves@redhat.com>
619
620 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
621 instead.
622
60a191ed
YQ
6232015-03-06 Yao Qi <yao.qi@linaro.org>
624
625 * linux-aarch64-low.c (aarch64_insert_point): Use
626 show_debug_regs as a boolean.
627 (aarch64_remove_point): Likewise.
628
f5771b1d
PA
6292015-03-05 Pedro Alves <palves@redhat.com>
630
631 * lynx-low.c (lynx_target_ops): Install NULL hooks for
632 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
633 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
634 * nto-low.c (nto_target_ops): Likewise.
635 * spu-low.c (spu_target_ops): Likewise.
636 * win32-low.c (win32_target_ops): Likewise.
637
3e572f71
PA
6382015-03-04 Pedro Alves <palves@redhat.com>
639
640 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
641 Decide whether a breakpoint triggered based on the SIGTRAP's
642 siginfo.si_code.
643 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
644 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
645 (linux_low_filter_event): Check for breakpoints before checking
646 watchpoints.
647 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
648 siginfo.si_code.
649 (linux_stopped_by_sw_breakpoint)
650 (linux_supports_stopped_by_sw_breakpoint)
651 (linux_stopped_by_hw_breakpoint)
652 (linux_supports_stopped_by_hw_breakpoint): New functions.
653 (linux_target_ops): Install new target methods.
654
1ec68e26
PA
6552015-03-04 Pedro Alves <palves@redhat.com>
656
657 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
658 * server.c (swbreak_feature, hwbreak_feature): New globals.
659 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
660 (captured_main): Clear swbreak_feature and hwbreak_feature.
661 * server.h (swbreak_feature, hwbreak_feature): Declare.
662 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
663 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
664 supports_stopped_by_hw_breakpoint>: New fields.
665 (target_supports_stopped_by_sw_breakpoint)
666 (target_stopped_by_sw_breakpoint)
667 (target_supports_stopped_by_hw_breakpoint)
668 (target_stopped_by_hw_breakpoint): Declare.
669
15c66dd6
PA
6702015-03-04 Pedro Alves <palves@redhat.com>
671
672 enum lwp_stop_reason -> enum target_stop_reason
673 * linux-low.c (check_stopped_by_breakpoint): Adjust.
674 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
675 (linux_wait_1, stuck_in_jump_pad_callback)
676 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
677 (linux_stopped_by_watchpoint):
678 * linux-low.h (enum lwp_stop_reason): Delete.
679 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
680 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
681
98fc70d6
YQ
6822015-03-04 Yao Qi <yao.qi@linaro.org>
683
684 * Makefile.in (SFILES): Add linux-aarch64-low.c.
685
dd2ac174
GB
6862015-03-03 Gary Benson <gbenson@redhat.com>
687
688 * hostio.c (handle_vFile): Fix prefix lengths.
689
d68e53f4
MM
6902015-03-03 Markus Metzger <markus.t.metzger@intel.com>
691
692 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
693 ptr_bits.
694
bf2d68ab
AA
6952015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
696
697 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
698 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
699 (clean): Add "rm -f" for above C files.
700 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
701 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
702 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
703 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
704 * linux-s390-low.c (HWCAP_S390_VX): New macro.
705 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
706 (init_registers_s390x_vx_linux64)
707 (init_registers_s390x_tevx_linux64)
708 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
709 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
710 declarations.
711 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
712 (s390_store_vxrs_high): New functions.
713 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
714 NT_S390_VXRS_HIGH.
715 (s390_arch_setup): Add logic for selecting one of the new target
716 descriptions. Activate the new vector regsets if applicable.
717 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
718 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
719 and init_registers_s390x_tevx_linux64.
720
c966a859
PA
7212015-03-01 Pedro Alves <palves@redhat.com>
722
723 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
724 parameter.
725
4180215b
PA
7262015-02-27 Pedro Alves <palves@redhat.com>
727
728 * linux-x86-low.c (u_debugreg_offset): New function.
729 (x86_linux_dr_get, x86_linux_dr_set): Use it.
730
749bab01
PA
7312015-02-27 Pedro Alves <palves@redhat.com>
732
733 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
734 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
735 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
736 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
737 (ps_lsetfpregs, ps_getpid)
738 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
739 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
740 (ps_lsetxregs, ps_plog): Declare.
741
3c14e5a3
PA
7422015-02-27 Pedro Alves <palves@redhat.com>
743
744 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
745 IP_AGENT_EXPORT_FUNC.
746 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
747 IP_AGENT_EXPORT_FUNC.
748 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
749 (IP_AGENT_EXPORT): Delete.
750 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
751 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
752 (gdb_trampoline_buffer_error, collecting, gdb_collect)
753 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
754 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
755 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
756 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
757 (traceframe_read_count, traceframe_write_count)
758 (traceframes_created, trace_state_variables, get_raw_reg)
759 (get_trace_state_variable_value, set_trace_state_variable_value)
760 (ust_loaded, helper_thread_id, cmd_buf): Use
761 IPA_SYM_EXPORTED_NAME.
762 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
763 (tracepoints) Use IP_AGENT_EXPORT_VAR.
764 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
765 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
766 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
767 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
768 EXTERN_C_PUSH/EXTERN_C_POP.
769 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
770 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
771 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
772 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
773 (traceframe_write_count, traceframe_read_count)
774 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
775 (about_to_request_buffer_space, get_trace_state_variable_value)
776 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
777 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
778 EXTERN_C_PUSH/EXTERN_C_POP.
779 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
780 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
781 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
782 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
783 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
784 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
785 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
786 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
787 Define.
788 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
789 (IP_AGENT_EXPORT_VAR_DECL): Define.
790 (tracing): Declare.
791 (gdb_agent_get_raw_reg): Declare.
792
fe978cb0
PA
7932015-02-27 Tom Tromey <tromey@redhat.com>
794 Pedro Alves <palves@redhat.com>
795
796 Rename symbols whose names are reserved C++ keywords throughout.
797
3bc3d82a
PA
7982015-02-27 Pedro Alves <palves@redhat.com>
799
800 * Makefile.in (COMPILER): New, get it from autoconf.
801 (CXX): Get from autoconf instead.
802 (COMPILE.pre): Use COMPILER.
803 (CC-LD): Rename to ...
804 (CC_LD): ... this. Use COMPILER.
805 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
806 (CXX_FOR_TARGET): Default to g++ instead of gcc.
807 * acinclude.m4: Include build-with-cxx.m4.
808 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
809 Disable -Werror by default if building in C++ mode.
810 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
811 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
812 the C++ compiler. Save/restore CXXFLAGS too.
813 * configure: Regenerate.
814
07697489
PA
8152015-02-27 Pedro Alves <palves@redhat.com>
816
817 * acinclude.m4: Include libiberty.m4.
818 * configure.ac: Call libiberty_INIT.
819 * config.in, configure: Regenerate.
820
9beb7c4e
PA
8212015-02-26 Pedro Alves <palves@redhat.com>
822
823 * linux-low.c (linux_wait_1): When incrementing the PC past a
824 program breakpoint always use the_low_target.breakpoint_len as
825 increment, rather than the maximum between that and
826 the_low_target.decr_pc_after_break.
827
8090aef2
PA
8282015-02-23 Pedro Alves <palves@redhat.com>
829
830 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
831 thread was doing a step-over; always adjust the PC if
832 we stepped over a permanent breakpoint.
833 (linux_wait_1): If we stepped over breakpoint that was on top of a
834 permanent breakpoint, manually advance the PC past it.
835
bc9540e8
PA
8362015-02-23 Pedro Alves <palves@redhat.com>
837
838 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
839 modes.
840 (x86_fill_gregset, x86_store_gregset): Use it when handling
841 $orig_eax.
842
2db9a427
PA
8432015-02-20 Pedro Alves <palves@redhat.com>
844
845 * thread-db.c: Include "nat/linux-procfs.h".
846 (thread_db_init): Skip listing new threads if the kernel supports
847 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
848
afa8d396
PA
8492015-02-20 Pedro Alves <palves@redhat.com>
850
851 * linux-low.c (status_pending_p_callback): Use ptid_match.
852
c9587f88
AT
8532015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
854
855 PR breakpoints/16812
856 * linux-low.c (wstatus_maybe_breakpoint): Remove.
857 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
858 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
859
b05ec7a5
AT
8602015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
861
862 PR breakpoints/15956
863 * tracepoint.c (cmd_qtinit): Add check for current_thread.
864
d33501a5
MM
8652015-02-09 Markus Metzger <markus.t.metzger@intel.com>
866
867 * linux-low.c (linux_low_btrace_conf): Print size.
868 * server.c (handle_btrace_conf_general_set): New.
869 (hanle_general_set): Call handle_btrace_conf_general_set.
870 (handle_query): Report Qbtrace-conf:bts:size as supported.
871
f4abbc16
MM
8722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
873
874 * linux-low.c (linux_low_enable_btrace): Update parameters.
875 (linux_low_btrace_conf): New.
876 (linux_target_ops)<to_btrace_conf>: Initialize.
877 * server.c (current_btrace_conf): New.
878 (handle_btrace_enable): Rename to ...
879 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
880 to target_enable_btrace. Update comment. Update users.
881 (handle_qxfer_btrace_conf): New.
882 (qxfer_packets): Add btrace-conf entry.
883 (handle_query): Report qXfer:btrace-conf:read as supported packet.
884 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
885 (target_ops)<read_btrace_conf>: New.
886 (target_enable_btrace): Update parameters.
887 (target_read_btrace_conf): New.
888
043c3577
MM
8892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
890
891 * server.c (handle_btrace_general_set): Remove call to
892 target_supports_btrace.
893 (supported_btrace_packets): New.
894 (handle_query): Call supported_btrace_packets.
895 * target.h: include btrace-common.h.
896 (btrace_target_info): Removed.
897 (supports_btrace, target_supports_btrace): Update parameters.
898
734b0e4b
MM
8992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
900
901 * Makefile.in (SFILES): Add common/btrace-common.c.
902 (OBS): Add common/btrace-common.o.
903 (btrace-common.o): Add build rules.
904 * linux-low: Include btrace-common.h.
905 (linux_low_read_btrace): Use struct btrace_data. Call
906 btrace_data_init and btrace_data_fini.
907
d6c146e9
PA
9082015-02-06 Pedro Alves <palves@redhat.com>
909
910 * thread-db.c (find_new_threads_callback): Add debug output.
911
20ba1ce6
PA
9122015-02-04 Pedro Alves <palves@redhat.com>
913
914 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
915 (resume_stopped_resumed_lwps): New function.
916 (linux_wait_for_event_filtered): Use it.
917
8cc73a39
SDJ
9182015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
919
920 * Makefile.in (SFILES): Add linux-personality.c.
921 (linux-personality.o): New rule.
922 * configure.srv (srv_linux_obj): Add linux-personality.o to the
923 list of objects to be built.
924 * linux-low.c: Include nat/linux-personality.h.
925 (linux_create_inferior): Remove code to disable address space
926 randomization (moved to ../nat/linux-personality.c). Create
927 cleanup to disable address space randomization.
928
fb23d554
SDJ
9292015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
930
931 * Makefile.in (posix-strerror.o): New rule.
932 (mingw-strerror.o): Likewise.
933 * configure: Regenerated.
934 * configure.ac: Source file ../common/common.host. Initialize new
935 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
936
cdf43629
YQ
9372015-01-14 Yao Qi <yao@codesourcery.com>
938
939 * Makefile.in (SFILES): Add nat/ppc-linux.c.
940 (ppc-linux.o): New rule.
941 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
942 * configure.ac: AC_CHECK_FUNCS(getauxval).
943 * config.in: Re-generated.
944 * configure: Re-generated.
945 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
946 ppc64_64bit_inferior_p
947
514c5338
YQ
9482015-01-14 Yao Qi <yao@codesourcery.com>
949
950 * linux-ppc-low.c: Include "nat/ppc-linux.h".
951 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
952 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
953 (PT_ORIG_R3, PT_TRAP): Likewise.
954 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
955 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
956 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
957
3368c1e5
JB
9582015-01-10 Joel Brobecker <brobecker@adacore.com>
959
960 * i387-fp.c (i387_cache_to_xsave): In look over
961 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
962 zmmh_low_space field by use of zmmh_high_space.
963
582511be
PA
9642015-01-09 Pedro Alves <palves@redhat.com>
965
966 * linux-low.c (step_over_bkpt): Move higher up in the file.
967 (handle_extended_wait): Don't store the stop_pc here.
968 (get_stop_pc): Adjust comments and rename to ...
969 (check_stopped_by_breakpoint): ... this. Record whether the LWP
970 stopped for a software breakpoint or hardware breakpoint.
971 (thread_still_has_status_pending_p): New function.
972 (status_pending_p_callback): Use
973 thread_still_has_status_pending_p. If the event is no longer
974 interesting, resume the LWP.
975 (handle_tracepoints): Add assert.
976 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
977 (wstatus_maybe_breakpoint): New function.
978 (cancel_breakpoint): Delete function.
979 (check_stopped_by_watchpoint): New function, factored out from
980 linux_low_filter_event.
981 (lp_status_maybe_breakpoint): Delete function.
982 (linux_low_filter_event): Remove filter_ptid argument.
983 Leave thread group exits pending here. Store the LWP's stop PC.
984 Always leave events pending.
985 (linux_wait_for_event_filtered): Pull all events out of the
986 kernel, and leave them all pending.
987 (count_events_callback, select_event_lwp_callback): Consider all
988 events.
989 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
990 (select_event_lwp): Only give preference to the stepping LWP in
991 all-stop mode. Adjust comments.
992 (ignore_event): New function.
993 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
994 references to cancel_breakpoints. Adjust to renames. Also give
995 equal priority to all LWPs that have had events in non-stop mode.
996 If reporting a software breakpoint event, unadjust the LWP's PC.
997 (linux_wait): If linux_wait_1 returned an ignored event, retry.
998 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
999 Adjust.
1000 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1001 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1002 (linux_stopped_by_watchpoint): Adjust.
1003 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1004 * linux-low.h (enum lwp_stop_reason): New.
1005 (struct lwp_info) <stop_pc>: Adjust comment.
1006 <stopped_by_watchpoint>: Delete field.
1007 <stop_reason>: New field.
1008 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1009 * mem-break.c (software_breakpoint_inserted_here)
1010 (hardware_breakpoint_inserted_here): New function.
1011 * mem-break.h (software_breakpoint_inserted_here)
1012 (hardware_breakpoint_inserted_here): Declare.
1013 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1014 (cancel_breakpoints): Delete.
1015 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1016 (upload_fast_traceframes): Remove references to
1017 cancel_breakpoints.
1018
a33e3959
PA
10192015-01-09 Pedro Alves <palves@redhat.com>
1020
1021 * thread-db.c (find_new_threads_callback): Ignore thread if the
1022 kernel thread ID is -1.
1023
8784d563
PA
10242015-01-09 Pedro Alves <palves@redhat.com>
1025
1026 * linux-low.c (linux_attach_fail_reason_string): Move to
1027 nat/linux-ptrace.c, and rename.
1028 (linux_attach_lwp): Update comment.
1029 (attach_proc_task_lwp_callback): New function.
1030 (linux_attach): Adjust to rename and use
1031 linux_proc_attach_tgid_threads.
1032 (linux_attach_fail_reason_string): Delete declaration.
1033
76f2b779
JB
10342015-01-01 Joel Brobecker <brobecker@adacore.com>
1035
1036 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1037 * server.c (gdbserver_version): Likewise.
1038
fafcc06a
SDJ
10392014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1040
1041 * remote-utils.c: Include ctype.h.
1042 (input_interrupt): Explicitly handle the case when the char
1043 received is the NUL byte. Improve the printing of non-ASCII
1044 characters.
1045
beed38b8
JB
10462014-12-16 Joel Brobecker <brobecker@adacore.com>
1047
1048 * linux-low.c (linux_low_filter_event): Update call to
1049 linux_enable_event_reporting following the addition of
1050 a new parameter to that function.
1051
bf330350
CU
10522014-12-16 Catalin Udma <catalin.udma@freescale.com>
1053
1054 PR server/17457
1055 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1056 (AARCH64_FPCR_REGNO): Likewise.
1057 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1058 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1059 (aarch64_store_fpregset): Likewise.
1060
5227d625
JB
10612014-12-15 Joel Brobecker <brobecker@adacore.com>
1062
1063 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1064 Remove FIXME comment about assumption about N.
1065
f93b65a0
JB
10662014-12-13 Joel Brobecker <brobecker@adacore.com>
1067
1068 * configure.ac: If large-file support is disabled in GDBserver,
1069 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1070 * configure: Regenerate.
1071
e5a9158d
AA
10722014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1073
1074 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1075 warning upon ENODATA from ptrace.
1076 * linux-s390-low.c (s390_store_tdb): New.
1077 (s390_regsets): Add regset for NT_S390_TDB.
1078
feea5f36
AA
10792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1080
1081 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1082 without a fill_function.
1083 * linux-s390-low.c (s390_fill_last_break): Remove.
1084 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1085 (s390_arch_setup): Use regset's size instead of fill_function for
1086 loop end condition.
1087
098dbe61
AA
10882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1089
1090 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1091 the regset's store function when ptrace returned an error.
1092 * regcache.c (get_thread_regcache): Invalidate register cache
1093 before fetching inferior's registers.
1094
28eef672
AA
10952014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1096
1097 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1098 while-loop as for-loop.
1099 (regsets_store_inferior_registers): Likewise.
1100
bdca27a2
YQ
11012014-11-28 Yao Qi <yao@codesourcery.com>
1102
1103 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1104 * config.in, configure: Re-generate.
1105 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1106 is defined.
1107
9c232dda
YQ
11082014-11-21 Yao Qi <yao@codesourcery.com>
1109
1110 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1111 (AC_CHECK_HEADERS): Remove malloc.h.
1112 * configure: Re-generated.
1113 * config.in: Re-generated.
1114 * server.h: Don't include alloca.h and malloc.h.
1115 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1116 Don't include malloc.h.
1117
43968415
JB
11182014-11-17 Joel Brobecker <brobecker@adacore.com>
1119
1120 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1121 corresponding ERRNO check in same block.
1122
40e91bc7
PA
11232014-11-12 Pedro Alves <palves@redhat.com>
1124
1125 * server.c (cont_thread): Update comment.
1126 (start_inferior, attach_inferior): No longer clear cont_thread.
1127 (handle_v_cont): No longer set cont_thread.
1128 (captured_main): Clear cont_thread each time a GDB connects.
1129
c2c118cf
PA
11302014-11-12 Pedro Alves <palves@redhat.com>
1131
1132 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1133 thread, and don't resume all threads if the Hc thread has exited.
1134
78708b7c
PA
11352014-11-12 Pedro Alves <palves@redhat.com>
1136
1137 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1138 the process group instead of to a specific LWP.
1139
a2abc7de
PA
11402014-10-15 Pedro Alves <palves@redhat.com>
1141
1142 PR server/17487
1143 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1144 parameter.
1145 (arm_set_thread_context): Delete.
1146 (the_low_target): Adjust.
1147 * win32-i386-low.c (debug_registers_changed)
1148 (debug_registers_used): Delete.
1149 (update_debug_registers_callback): New function.
1150 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1151 needing to update their debug registers.
1152 (win32_get_current_dr): New function.
1153 (x86_dr_low_get_addr, x86_dr_low_get_control)
1154 (x86_dr_low_get_status): Fetch the debug register from the thread
1155 record's context.
1156 (i386_initial_stuff): Adjust.
1157 (i386_get_thread_context): Remove current_event parameter. Don't
1158 clear debug_registers_changed nor copy DR values to
1159 debug_reg_state.
1160 (i386_set_thread_context): Delete.
1161 (i386_prepare_to_resume): New function.
1162 (i386_thread_added): Mark the thread as needing to update irs
1163 debug registers.
1164 (the_low_target): Remove i386_set_thread_context and install
1165 i386_prepare_to_resume.
1166 * win32-low.c (win32_get_thread_context): Adjust.
1167 (win32_set_thread_context): Use SetThreadContext
1168 directly.
1169 (win32_prepare_to_resume): New function.
1170 (win32_require_context): New function, factored out from ...
1171 (thread_rec): ... this.
1172 (continue_one_thread): Call win32_prepare_to_resume on each thread
1173 we're about to continue.
1174 (win32_resume): Call win32_prepare_to_resume on the event thread.
1175 * win32-low.h (struct win32_thread_info)
1176 <debug_registers_changed>: New field.
1177 (struct win32_target_ops): Change prototype of set_thread_context,
1178 delete set_thread_context and add prepare_to_resume.
1179 (win32_require_context): New declaration.
1180
a442d071
GB
11812014-10-08 Gary Benson <gbenson@redhat.com>
1182
1183 * server.h: Do not include common-exceptions.h.
1184
6f1947e8
GB
11852014-10-08 Gary Benson <gbenson@redhat.com>
1186
1187 * server.h: Do not include cleanups.h.
1188
63b434a4
JH
11892014-09-30 James Hogan <james.hogan@imgtec.com>
1190
1191 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1192 mips64-dsp-linux.c.
1193
c4d9ceb6
YQ
11942014-09-23 Yao Qi <yao@codesourcery.com>
1195
1196 * linux-low.c (lp_status_maybe_breakpoint): New function.
1197 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1198 (count_events_callback): Likewise.
1199 (select_event_lwp_callback): Likewise.
1200 (cancel_breakpoints_callback): Likewise.
1201
89a5711c
DB
12022014-09-19 Don Breazeal <donb@codesourcery.com>
1203
1204 * linux-low.c (handle_extended_wait): Call
1205 linux_ptrace_get_extended_event.
1206 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1207 linux_is_extended_waitstatus.
1208
bffc0964
JB
12092014-09-16 Joel Brobecker <brobecker@adacore.com>
1210
1211 * Makefile.in (CPPFLAGS): Define.
1212 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1213 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1214
0bfdf32f
GB
12152014-09-16 Gary Benson <gbenson@redhat.com>
1216
1217 * inferiors.h (current_inferior): Renamed as...
1218 (current_thread): New variable. All uses updated.
1219 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1220 (maybe_move_out_of_jump_pad): Likewise.
1221 (cancel_breakpoint): Likewise.
1222 (linux_low_filter_event): Likewise.
1223 (wait_for_sigstop): Likewise.
1224 (linux_resume_one_lwp): Likewise.
1225 (need_step_over_p): Likewise.
1226 (start_step_over): Likewise.
1227 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1228 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1229 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1230 and save_inferior as saved_thread.
1231 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1232 saved_thread.
1233 (regcache_invalidate_thread): Likewise.
1234 * remote-utils.c (prepare_resume_reply): Likewise.
1235 * thread-db.c (thread_db_get_tls_address): Likewise.
1236 (disable_thread_event_reporting): Likewise.
1237 (remove_thread_event_breakpoints): Likewise.
1238 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1239 as saved_thread.
1240 * target.h (set_desired_inferior): Renamed as...
1241 (set_desired_thread): New declaration. All uses updated.
1242 * server.c (myresume): Updated comment to reference thread instead
1243 of inferior.
1244 (handle_serial_event): Likewise.
1245 (handle_target_event): Likewise.
1246
361c8ade
GB
12472014-09-12 Tom Tromey <tromey@redhat.com>
1248 Gary Benson <gbenson@redhat.com>
1249
1250 * regcache.h: Include common-regcache.h.
1251 (regcache_read_pc): Don't declare.
1252 * regcache.c (get_thread_regcache_for_ptid): New function.
1253
bd9269f7
GB
12542014-09-11 Tom Tromey <tromey@redhat.com>
1255 Gary Benson <gbenson@redhat.com>
1256
1257 * symbol.c: New file.
1258 * Makefile.in (SFILES): Add symbol.c.
1259 (OBS): Add symbol.o.
1260
f8c1d06b
GB
12612014-09-11 Gary Benson <gbenson@redhat.com>
1262
1263 * target.c (target_stop_ptid, target_continue_ptid): New
1264 functions.
1265
721ec300
GB
12662014-09-11 Tom Tromey <tromey@redhat.com>
1267 Gary Benson <gbenson@redhat.com>
1268
1269 * target.h: Include target/target.h.
1270 * target.c (target_read_memory, target_read_uint32)
1271 (target_write_memory): New functions.
1272
c5e92cca
GB
12732014-09-11 Gary Benson <gbenson@redhat.com>
1274
1275 * server.h (debug_hw_points): Don't declare.
1276 * server.c (debug_hw_points): Don't define. Replace all uses
1277 with show_debug_regs.
1278 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1279 all uses with show_debug_regs.
1280
2e4bb98a
EBM
12812014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1282
1283 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1284 endianness into account.
1285 (ppc_supply_ptrace_register): Likewise.
1286
ac740bc7
JH
12872014-09-03 James Hogan <james.hogan@imgtec.com>
1288
1289 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1290 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1291
97ea6506
GB
12922014-09-03 Gary Benson <gbenson@redhat.com>
1293
1294 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1295 ALL_DEBUG_ADDRESS_REGISTERS.
1296
df7e5265
GB
12972014-09-02 Gary Benson <gbenson@redhat.com>
1298
1299 * i386-low.h: Renamed as...
1300 * x86-low.h: New file. All type, function and variable name
1301 prefixes changed from "i386_" to "x86_". All references updated.
1302 * i386-low.c: Renamed as...
1303 * x86-low.c: New file. All type, function and variable name
1304 prefixes changed from "i386_" to "x86_". All references updated.
1305
ed859da7
GB
13062014-09-02 Gary Benson <gbenson@redhat.com>
1307
1308 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1309 (x86_linux_new_thread): Likewise.
1310
860789c7
GB
13112014-08-29 Gary Benson <gbenson@redhat.com>
1312
1313 * server.h (setjmp.h): Do not include.
1314 (toplevel): Do not declare.
1315 (common-exceptions.h): Include.
1316 (cleanups.h): Likewise.
1317 * server.c (toplevel): Do not define.
1318 (exit_code): New static global.
1319 (detach_or_kill_for_exit_cleanup): New function.
1320 (main): New function. Original main renamed to...
1321 (captured_main): New function.
1322 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1323
ff55e1b5
GB
13242014-08-29 Gary Benson <gbenson@redhat.com>
1325
1326 * Makefile.in (SFILES): Add common/common-exceptions.c.
1327 (OBS): Add common-exceptions.o.
1328 (common-exceptions.o): New rule.
1329 * utils.c (prepare_to_throw_exception): New function.
1330
e9bcb658
GB
13312014-08-29 Gary Benson <gbenson@redhat.com>
1332
1333 * config.in: Regenerate.
1334 * configure: Likewise.
1335
e3180625
GB
13362014-08-29 Gary Benson <gbenson@redhat.com>
1337
1338 * Makefile.in (SFILES): Add common/cleanups.c.
1339 (OBS): cleanups.o.
1340 (cleanups.o): New rule.
1341
e3d6ba5d
GB
13422014-08-29 Gary Benson <gbenson@redhat.com>
1343
1344 * utils.c (internal_vwarning): New function.
1345
7096e886
GB
13462014-08-28 Gary Benson <gbenson@redhat.com>
1347
1348 * utils.h (fatal): Remove declaration.
1349 * utils.c (fatal): Remove function.
1350
14ce3192
GB
13512014-08-28 Gary Benson <gbenson@redhat.com>
1352
1353 * tracepoint.c (gdb_agent_init): Replace fatal with
1354 perror_with_name.
1355 (initialize_tracepoint): Likewise.
1356
50278d59
GB
13572014-08-28 Gary Benson <gbenson@redhat.com>
1358
1359 * remote-utils.c (remote_prepare): Replace fatal with error.
1360
aa96c426
GB
13612014-08-28 Gary Benson <gbenson@redhat.com>
1362
1363 * linux-low.c (linux_async): Replace fatal with warning.
1364 Tidy up and return.
1365 (linux_start_non_stop): Return -1 if linux_async failed.
1366
f7160e97
GB
13672014-08-28 Gary Benson <gbenson@redhat.com>
1368
1369 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1370 gdb_assert.
1371 (i386_dr_low_get_addr): Remove vague comment.
1372 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1373 gdb_assert.
1374
38e08fca
GB
13752014-08-28 Gary Benson <gbenson@redhat.com>
1376
1377 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1378 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1379 internal_error.
1380 (linux_resume_one_lwp): Likewise.
1381 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1382 gdb_assert.
1383 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1384 with internal_error.
1385 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1386 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1387 (find_register_by_name): Replace fatal with internal_error.
1388 (find_regno): Likewise.
1389 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1390 * thread-db.c (thread_db_create_event): Likewise.
1391 (thread_db_load_search): Likewise.
1392 (try_thread_db_load_1): Likewise.
1393 * tracepoint.c (get_jump_space_head): Replace fatal with
1394 internal_error.
1395 (claim_trampoline_space): Likewise.
1396 (have_fast_tracepoint_trampoline_buffer): Likewise.
1397 (cmd_qtstart): Likewise.
1398 (stop_tracing): Likewise.
1399 (fast_tracepoint_collecting): Likewise.
1400 (target_malloc): Likewise.
1401 (download_tracepoint): Likewise.
1402 (download_trace_state_variables): Replace check with gdb_assert.
1403 (upload_fast_traceframes): Replace fatal with internal_error.
1404
34abf635
GB
14052014-08-19 Tom Tromey <tromey@redhat.com>
1406 Gary Benson <gbenson@redhat.com>
1407
1408 * Makefile.in (SFILES): Add common/common-debug.c.
1409 (OBS): Add common-debug.o.
1410 (common-debug.o): New rule.
1411 * debug.h (debug_printf): Don't declare.
1412 * debug.c (debug_printf): Renamed and rewritten as...
1413 (debug_vprintf): New function.
1414
f6e94d78
GB
14152014-08-19 Gary Benson <gbenson@redhat.com>
1416
1417 * utils.h: Do not include print-utils.h.
1418
9239eeab
GB
14192014-08-19 Tom Tromey <tromey@redhat.com>
1420 Gary Benson <gbenson@redhat.com>
1421
1422 * server.h: Add static assertion.
1423 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1424
ef87c8bb
GB
14252014-08-19 Tom Tromey <tromey@redhat.com>
1426 Gary Benson <gbenson@redhat.com>
1427
1428 * Makefile.in (SFILES): Add common/errors.c.
1429 (OBS): Add errors.o.
1430 (IPA_OBS): Add errors-ipa.o.
1431 (errors.o): New rule.
1432 (errors-ipa.o): Likewise.
1433 * utils.h (perror_with_name, error, warning): Don't declare.
1434 * utils.c (warning): Renamed and rewritten as...
1435 (vwarning): New function.
1436 (error): Renamed and rewritten as...
1437 (verror): New function.
1438 (internal_error): Renamed and rewritten as...
1439 (internal_verror): New function.
1440
bb974a24
GB
14412014-08-07 Gary Benson <gbenson@redhat.com>
1442
1443 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1444 * configure: Regenerate.
1445 * config.in: Likewise.
1446 * server.h: Do not include errno.h.
1447 * event-loop.c: Likewise.
1448 * hostio-errno.c: Likewise.
1449 * linux-low.c: Likewise.
1450 * remote-utils.c: Likewise.
1451 * spu-low.c: Likewise.
1452 * utils.c: Likewise.
1453 * gdbreplay.c: Unconditionally include errno.h.
1454
6d3d12eb
GB
14552014-08-07 Gary Benson <gbenson@redhat.com>
1456
1457 * server.h: Do not include string.h.
1458 * event-loop.c: Likewise.
1459 * linux-low.c: Likewise.
1460 * regcache.c: Likewise.
1461 * remote-utils.c: Likewise.
1462 * spu-low.c: Likewise.
1463 * utils.c: Likewise.
1464
dccbb609
GB
14652014-08-07 Gary Benson <gbenson@redhat.com>
1466
1467 * server.h: Do not include gdb_assert.h.
1468
e76df0d0
GB
14692014-08-07 Gary Benson <gbenson@redhat.com>
1470
1471 * server.h: Do not include common-utils.h.
1472
4cb9c816
GB
14732014-08-07 Gary Benson <gbenson@redhat.com>
1474
1475 * server.h: Do not include ptid.h.
1476 * notif.h: Likewise.
1477
3995eeee
GB
14782014-08-07 Gary Benson <gbenson@redhat.com>
1479
1480 * server.h: Do not include gdb_locale.h.
1481
cb9f1a9b
GB
14822014-08-07 Gary Benson <gbenson@redhat.com>
1483
1484 * server.h: Do not include gdb/signals.h.
1485 * win32-low.c: Likewise.
1486
a5fceff8
GB
14872014-08-07 Gary Benson <gbenson@redhat.com>
1488
1489 * server.h: Do not include pathmax.h.
1490
b9391142
GB
14912014-08-07 Gary Benson <gbenson@redhat.com>
1492
1493 * server.h: Do not include libiberty.h.
1494 * linux-bfin-low.c: Likewise.
1495
0e443c87
GB
14962014-08-07 Gary Benson <gbenson@redhat.com>
1497
1498 * server.h: Do not include ansidecl.h.
1499
8ebb3f56
GB
15002014-08-07 Gary Benson <gbenson@redhat.com>
1501
1502 * linux-x86-low.c: Do not include stddef.h.
1503 * lynx-ppc-low.c: Likewise.
1504 * tracepoint.c: Likewise.
1505
8980bdf6
GB
15062014-08-07 Gary Benson <gbenson@redhat.com>
1507
1508 * server.h: Do not include stdarg.h.
1509 * nto-low.c: Likewise.
1510
d7096f71
GB
15112014-08-07 Gary Benson <gbenson@redhat.com>
1512
1513 * server.h: Do not include stdlib.h.
1514 * inferiors.c: Likewise.
1515 * linux-low.c: Likewise.
1516 * regcache.c: Likewise.
1517 * spu-low.c: Likewise.
1518 * tracepoint.c: Likewise.
1519 * utils.c: Likewise.
1520
d02f550d
GB
15212014-08-07 Gary Benson <gbenson@redhat.com>
1522
1523 * server.h: Do not include stdio.h.
1524 * linux-low.c: Likewise.
1525 * remote-utils.c: Likewise.
1526 * spu-low.c: Likewise.
1527 * utils.c: Likewise.
1528 * wincecompat.c: Likewise.
1529
87f6c4e3
GB
15302014-08-06 Gary Benson <gbenson@redhat.com>
1531
1532 * regcache.c (init_register_cache): Move conditionals inside if.
1533
7089dca4
GB
15342014-08-06 Gary Benson <gbenson@redhat.com>
1535
1536 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1537
462f517e
GB
15382014-07-31 Gary Benson <gbenson@redhat.com>
1539
1540 * ax.h: Do not include server.h.
1541 * gdbthread.h: Likewise.
1542 * lynx-low.h: Likewise.
1543 * notif.h: Likewise.
1544
976411d6
GB
15452014-07-30 Gary Benson <gbenson@redhat.com>
1546
1547 * server.h: Include common-defs.h.
1548 Do not include config.h or build-gnulib-gdbserver/config.h.
1549
d41f6d8e
GB
15502014-07-30 Gary Benson <gbenson@redhat.com>
1551
1552 * hostio-errno.c: Move server.h to top of includes list.
1553 * inferiors.c: Likewise.
1554 * linux-x86-low.c: Likewise.
1555 * notif.c: Include server.h.
1556
314c6a35
TT
15572014-07-24 Tom Tromey <tromey@redhat.com>
1558 Gary Benson <gbenson@redhat.com>
1559
1560 * server.h (CORE_ADDR): Now unsigned.
1561
69ff6be5
PA
15622014-07-16 Pedro Alves <palves@redhat.com>
1563
1564 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1565
ce9e3fe7
PA
15662014-07-15 Pedro Alves <palves@redhat.com>
1567
1568 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1569 copy.
1570
e76126e8
PA
15712014-07-11 Pedro Alves <palves@redhat.com>
1572
1573 * linux-low.c (kill_wait_lwp): New function, based on
1574 kill_one_lwp_callback, but use my_waitpid directly.
1575 (kill_one_lwp_callback, linux_kill): Use it.
1576
8e9db26e
PA
15772014-06-23 Pedro Alves <palves@redhat.com>
1578
1579 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1580 before setting DR0..DR3.
1581
698b3e08
GB
15822014-06-20 Gary Benson <gbenson@redhat.com>
1583
1584 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1585 * configure: Regenerated.
1586 * config.in: Likewise.
1587
125f8a3d
GB
15882014-06-20 Gary Benson <gbenson@redhat.com>
1589
1590 * Makefile.in (SFILES): Update locations for files moved
1591 from common to nat.
1592 (object file files): Reordered.
1593
42995dbd
GB
15942014-06-20 Gary Benson <gbenson@redhat.com>
1595
1596 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1597 (i386_dr_low_set_addr): Likewise.
1598 (i386_dr_low_get_addr): Likewise.
1599 (i386_dr_low_can_set_control): Likewise.
1600 (i386_dr_low_set_control): Likewise.
1601 (i386_dr_low_get_control): Likewise.
1602 (i386_dr_low_get_status): Likewise.
1603 (i386_get_debug_register_length): Likewise.
1604 * linux-x86-low.c (i386_dr_low_set_addr):
1605 Changed signature. Made static.
1606 (i386_dr_low_get_addr): Likewise.
1607 (i386_dr_low_set_control): Likewise.
1608 (i386_dr_low_get_control): Likewise.
1609 (i386_dr_low_get_status): Likewise.
1610 (i386_dr_low): New global variable.
1611 * win32-i386-low.c (i386_dr_low_set_addr):
1612 Changed signature. Made static.
1613 (i386_dr_low_get_addr): Likewise.
1614 (i386_dr_low_set_control): Likewise.
1615 (i386_dr_low_get_control): Likewise.
1616 (i386_dr_low_get_status): Likewise.
1617 (i386_dr_low): New global variable.
1618
e1d2394b
MS
16192014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1620
1621 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1622 * Makefile.in (AR, AR_FLAGS): Define.
1623 * configure: Regenerate.
1624
3a8ee006
GB
16252014-06-19 Gary Benson <gbenson@redhat.com>
1626
1627 * Makefile.in (i386-dregs.o): New rule.
1628 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1629 * i386-low.c (target.h): Remove include.
1630 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1631 (DR_CONTROL_SHIFT): Likewise.
1632 (DR_CONTROL_SIZE): Likewise.
1633 (DR_RW_EXECUTE): Likewise.
1634 (DR_RW_WRITE): Likewise.
1635 (DR_RW_READ): Likewise.
1636 (DR_RW_IORW): Likewise.
1637 (DR_LEN_1): Likewise.
1638 (DR_LEN_2): Likewise.
1639 (DR_LEN_4): Likewise.
1640 (DR_LEN_8): Likewise.
1641 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1642 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1643 (DR_ENABLE_SIZE): Likewise.
1644 (DR_LOCAL_SLOWDOWN): Likewise.
1645 (DR_GLOBAL_SLOWDOWN): Likewise.
1646 (DR_CONTROL_RESERVED): Likewise.
1647 (I386_DR_CONTROL_MASK): Likewise.
1648 (I386_DR_VACANT): Likewise.
1649 (I386_DR_LOCAL_ENABLE): Likewise.
1650 (I386_DR_GLOBAL_ENABLE): Likewise.
1651 (I386_DR_DISABLE): Likewise.
1652 (I386_DR_SET_RW_LEN): Likewise.
1653 (I386_DR_GET_RW_LEN): Likewise.
1654 (I386_DR_WATCH_HIT): Likewise.
1655 (i386_wp_op_t): Likewise.
1656 (i386_show_dr): Likewise.
1657 (i386_length_and_rw_bits): Likewise.
1658 (i386_insert_aligned_watchpoint): Likewise.
1659 (i386_remove_aligned_watchpoint): Likewise.
1660 (i386_handle_nonaligned_watchpoint): Likewise.
1661 i386_update_inferior_debug_regs(): Likewise.
1662 (i386_dr_insert_watchpoint): Likewise.
1663 (i386_dr_remove_watchpoint): Likewise.
1664 (i386_dr_region_ok_for_watchpoint): Likewise.
1665 (i386_dr_stopped_data_address): Likewise.
1666 (i386_dr_stopped_by_watchpoint): Likewise.
1667
8f26655c
GB
16682014-06-19 Gary Benson <gbenson@redhat.com>
1669
1670 * i386-low.c (i386_dr_show): Renamed to
1671 i386_show_dr and made static. All uses updated.
1672 (i386_dr_length_and_rw_bits): Renamed to
1673 i386_length_and_rw_bits and made static.
1674 All uses updated.
1675 (i386_dr_insert_aligned_watchpoint): Renamed to
1676 i386_insert_aligned_watchpoint and made static.
1677 All uses updated.
1678 (i386_dr_remove_aligned_watchpoint): Renamed to
1679 i386_remove_aligned_watchpoint and made static.
1680 All uses updated.
1681 (i386_dr_update_inferior_debug_regs): Renamed to
1682 i386_update_inferior_debug_regs and made static.
1683 All uses updated.
1684
b9228891
GB
16852014-06-18 Gary Benson <gbenson@redhat.com>
1686
5171def3
GB
1687 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1688 (i386_dr_low_can_set_control): Likewise.
1689 (i386_get_debug_register_length): Likewise.
1690 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1691 (i386_dr_low_can_set_control): Likewise.
1692 (i386_get_debug_register_length): Likewise.
1693
16942014-06-17 Gary Benson <gbenson@redhat.com>
1695
b9228891
GB
1696 * i386-low.h (i386-dregs.h): New include.
1697 (DR_FIRSTADDR): Now in i386-dregs.h.
1698 (DR_LASTADDR): Likewise.
1699 (DR_NADDR): Likewise.
1700 (DR_STATUS): Likewise.
1701 (DR_CONTROL): Likewise.
1702 (i386_debug_reg_state): Likewise.
1703 (i386_dr_insert_watchpoint): Likewise.
1704 (i386_dr_remove_watchpoint): Likewise.
1705 (i386_dr_region_ok_for_watchpoint): Likewise.
1706 (i386_dr_stopped_data_address): Likewise.
1707 (i386_dr_stopped_by_watchpoint): Likewise.
1708 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1709
4be83cc2
GB
17102014-06-18 Gary Benson <gbenson@redhat.com>
1711
1712 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1713 i386_dr_insert_watchpoint.
1714 (i386_low_remove_watchpoint): Renamed to
1715 i386_dr_remove_watchpoint.
1716 (i386_low_region_ok_for_watchpoint): Renamed to
1717 i386_dr_region_ok_for_watchpoint.
1718 (i386_low_stopped_data_address): Renamed to
1719 i386_dr_stopped_data_address.
1720 (i386_low_stopped_by_watchpoint): Renamed to
1721 i386_dr_stopped_by_watchpoint.
1722 * i386-low.c (i386_show_dr): Renamed to
1723 i386_dr_show and made nonstatic. All uses updated.
1724 (i386_length_and_rw_bits): Renamed to
1725 i386_dr_length_and_rw_bits and made nonstatic.
1726 All uses updated.
1727 (i386_insert_aligned_watchpoint): Renamed to
1728 i386_dr_insert_aligned_watchpoint and made nonstatic.
1729 All uses updated.
1730 (i386_remove_aligned_watchpoint): Renamed to
1731 i386_dr_remove_aligned_watchpoint and made nonstatic.
1732 All uses updated.
1733 (i386_update_inferior_debug_regs): Renamed to
1734 i386_dr_update_inferior_debug_regs and made nonstatic.
1735 All uses updated.
1736 (i386_low_insert_watchpoint): Renamed to
1737 i386_dr_insert_watchpoint. All uses updated.
1738 (i386_low_remove_watchpoint): Renamed to
1739 i386_dr_remove_watchpoint. All uses updated.
1740 (i386_low_region_ok_for_watchpoint): Renamed to
1741 i386_dr_region_ok_for_watchpoint. All uses updated.
1742 (i386_low_stopped_data_address): Renamed to
1743 i386_dr_stopped_data_address. All uses updated.
1744 (i386_low_stopped_by_watchpoint): Renamed to
1745 i386_dr_stopped_by_watchpoint. All uses updated.
1746
131aa0d4
GB
17472014-06-18 Gary Benson <gbenson@redhat.com>
1748
1749 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1750 (i386_dr_low_can_set_control): Likewise.
1751 (i386_insert_aligned_watchpoint): New check.
1752
d9305f7f
GB
17532014-06-18 Gary Benson <gbenson@redhat.com>
1754
1755 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1756 Renamed to state.
1757
e927c9fc
GB
17582014-06-18 Gary Benson <gbenson@redhat.com>
1759
1760 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1761 instead of fatal and error.
1762 (i386_handle_nonaligned_watchpoint): Likewise.
1763
1b6d4134
GB
17642014-06-18 Gary Benson <gbenson@redhat.com>
1765
1766 * i386-low.c (i386_get_debug_register_length): New macro.
1767 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1768 (i386_show_dr): Use debug_printf instead of fprintf. Use
1769 phex to format values.
1770
6e62758f
GB
17712014-06-18 Gary Benson <gbenson@redhat.com>
1772
1773 * i386-low.h: Comment changes.
1774 * i386-low.c: Likewise.
1775
fc6e2f03
GB
17762014-06-18 Gary Benson <gbenson@redhat.com>
1777
1778 * i386-low.c: Whitespace changes.
1779
f9d1eeed
TT
17802014-06-12 Tom Tromey <tromey@redhat.com>
1781
1782 * utils.c (freeargv): Remove.
1783
0b04e523
TT
17842014-06-12 Tom Tromey <tromey@redhat.com>
1785
1786 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1787 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1788 (parse_debug_format_options): Likewise.
1789 (gdbserver_usage): Likewise.
1790 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1791 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1792 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1793 against libiberty.
1794 ($(LIBGNU)): Depend on libiberty.
1795 (all-lib): Recurse into all subdirs.
1796 (install-only): Invoke "install" target in subdirs.
1797 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1798 targets.
1799 * configure: Rebuild.
1800 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1801 for vasprintf, vsnprintf, or gettimeofday.
1802 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1803 srv_tgtobj.
1804
270c9937
JB
18052014-06-05 Joel Brobecker <brobecker@adacore.com>
1806
1807 * development.sh: Delete.
1808 * Makefile.in (config.status): Adjust dependency on development.sh.
1809 * configure.ac: Adjust development.sh source call.
1810 * configure: Regenerate.
1811
0a261ed8
PA
18122014-06-02 Pedro Alves <palves@redhat.com>
1813
1814 * ax.c (gdb_free_agent_expr): New function.
1815 * ax.h (gdb_free_agent_expr): New declaration.
1816 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1817 list.
1818 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1819 static.
1820 (clear_breakpoint_conditions_and_commands): New function.
1821 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1822 (clear_breakpoint_conditions_and_commands): New declaration.
1823
e9dae05e
RR
18242014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1825
1826 * linux-aarch64-low.c (asm/ptrace.h): Include.
1827
5876f503
JK
18282014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1829
1830 Fix TLS access for -static -pthread.
1831 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1832 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1833 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1834
802e8e6d
PA
18352014-05-20 Pedro Alves <palves@redhat.com>
1836
1837 * linux-aarch64-low.c (aarch64_insert_point)
1838 (aarch64_remove_point): No longer check whether the type is
1839 supported here. Adjust to new interface.
1840 (the_low_target): Install aarch64_supports_z_point_type as
1841 supports_z_point_type method.
1842 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1843 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1844 instead of a Z packet char. Adjust.
1845 (arm_supports_z_point_type): New function.
1846 (arm_insert_point, arm_remove_point): Adjust to new interface.
1847 (the_low_target): Install arm_supports_z_point_type.
1848 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1849 (cris_insert_point, cris_remove_point): Adjust to new interface.
1850 Don't check whether the type is supported here.
1851 (the_low_target): Install cris_supports_z_point_type.
1852 * linux-low.c (linux_supports_z_point_type): New function.
1853 (linux_insert_point, linux_remove_point): Adjust to new interface.
1854 * linux-low.h (struct linux_target_ops) <insert_point,
1855 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1856 raw_breakpoint pointer parameter.
1857 <supports_z_point_type>: New method.
1858 * linux-mips-low.c (mips_supports_z_point_type): New function.
1859 (mips_insert_point, mips_remove_point): Adjust to new interface.
1860 Use mips_supports_z_point_type.
1861 (the_low_target): Install mips_supports_z_point_type.
1862 * linux-ppc-low.c (the_low_target): Install NULL as
1863 supports_z_point_type method.
1864 * linux-s390-low.c (the_low_target): Install NULL as
1865 supports_z_point_type method.
1866 * linux-sparc-low.c (the_low_target): Install NULL as
1867 supports_z_point_type method.
1868 * linux-x86-low.c (x86_supports_z_point_type): New function.
1869 (x86_insert_point): Adjust to new insert_point interface. Use
1870 insert_memory_breakpoint. Adjust to new
1871 i386_low_insert_watchpoint interface.
1872 (x86_remove_point): Adjust to remove_point interface. Use
1873 remove_memory_breakpoint. Adjust to new
1874 i386_low_remove_watchpoint interface.
1875 (the_low_target): Install x86_supports_z_point_type.
1876 * lynx-low.c (lynx_target_ops): Install NULL as
1877 supports_z_point_type callback.
1878 * nto-low.c (nto_supports_z_point_type): New.
1879 (nto_insert_point, nto_remove_point): Adjust to new interface.
1880 (nto_target_ops): Install nto_supports_z_point_type.
1881 * mem-break.c: Adjust intro comment.
1882 (struct raw_breakpoint) <raw_type, size>: New fields.
1883 <inserted>: Update comment.
1884 <shlib_disabled>: Delete field.
1885 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1886 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1887 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1888 (raw_bkpt_type_to_target_hw_bp_type): New function.
1889 (find_enabled_raw_code_breakpoint_at): New function.
1890 (find_raw_breakpoint_at): New type and size parameters. Use them.
1891 (insert_memory_breakpoint): New function, based off
1892 set_raw_breakpoint_at.
1893 (remove_memory_breakpoint): New function.
1894 (set_raw_breakpoint_at): Reimplement.
1895 (set_breakpoint): New, based on set_breakpoint_at.
1896 (set_breakpoint_at): Reimplement.
1897 (delete_raw_breakpoint): Go through the_target->remove_point
1898 instead of assuming memory breakpoints.
1899 (find_gdb_breakpoint_at): Delete.
1900 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1901 (find_gdb_breakpoint): New function.
1902 (set_gdb_breakpoint_at): Delete.
1903 (z_type_supported): New function.
1904 (set_gdb_breakpoint_1): New function, loosely based off
1905 set_gdb_breakpoint_at.
1906 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1907 (delete_gdb_breakpoint_at): Delete.
1908 (delete_gdb_breakpoint_1): New function, loosely based off
1909 delete_gdb_breakpoint_at.
1910 (delete_gdb_breakpoint): New function.
1911 (clear_gdb_breakpoint_conditions): Rename to ...
1912 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1913 breakpoint.
1914 (add_condition_to_breakpoint): Make static.
1915 (add_breakpoint_condition): Take a struct breakpoint pointer
1916 instead of an address. Adjust.
1917 (gdb_condition_true_at_breakpoint): Rename to ...
1918 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1919 z_type parameter.
1920 (gdb_condition_true_at_breakpoint): Reimplement.
1921 (add_breakpoint_commands): Take a struct breakpoint pointer
1922 instead of an address. Adjust.
1923 (gdb_no_commands_at_breakpoint): Rename to ...
1924 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1925 parameter. Return true if no breakpoint was found. Change debug
1926 output.
1927 (gdb_no_commands_at_breakpoint): Reimplement.
1928 (run_breakpoint_commands): Rename to ...
1929 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1930 and change return type to boolean.
1931 (run_breakpoint_commands): New function.
1932 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1933 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1934 breakpoint. Go through the_target->remove_point instead of
1935 assuming memory breakpoint.
1936 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1937 software and hardware breakpoints.
1938 (reinsert_raw_breakpoint): Go through the_target->insert_point
1939 instead of assuming memory breakpoint.
1940 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1941 software and hardware breakpoints.
1942 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1943 Check both software and hardware breakpoints.
1944 (validate_inserted_breakpoint): Assert the breakpoint is a
1945 software breakpoint. Set the inserted flag to -1 instead of
1946 setting shlib_disabled.
1947 (delete_disabled_breakpoints): Adjust.
1948 (validate_breakpoints): Only validate software breakpoints.
1949 Adjust to inserted flag change.
1950 (check_mem_read, check_mem_write): Skip breakpoint types other
1951 than software breakpoints. Adjust to inserted flag change.
1952 * mem-break.h (enum raw_bkpt_type): New enum.
1953 (raw_breakpoint, struct process_info): Forward declare.
1954 (Z_packet_to_target_hw_bp_type): Delete declaration.
1955 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1956 (set_gdb_breakpoint, delete_gdb_breakpoint)
1957 (clear_breakpoint_conditions): New declarations.
1958 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1959 (breakpoint_inserted_here): Update comment.
1960 (add_breakpoint_condition, add_breakpoint_commands): Replace
1961 address parameter with a breakpoint pointer parameter.
1962 (gdb_breakpoint_here): Update comment.
1963 (delete_gdb_breakpoint_at): Delete.
1964 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1965 * server.c (process_point_options): Take a struct breakpoint
1966 pointer instead of an address. Adjust.
1967 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1968 delete_gdb_breakpoint.
1969 * spu-low.c (spu_target_ops): Install NULL as
1970 supports_z_point_type method.
1971 * target.h: Include mem-break.h.
1972 (struct target_ops) <prepare_to_access_memory>: Update comment.
1973 <supports_z_point_type>: New field.
1974 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1975 instead of a char. Also take a raw breakpoint pointer.
1976 * win32-arm-low.c (the_low_target): Install NULL as
1977 supports_z_point_type.
1978 * win32-i386-low.c (i386_supports_z_point_type): New function.
1979 (i386_insert_point, i386_remove_point): Adjust to new interface.
1980 (the_low_target): Install i386_supports_z_point_type.
1981 * win32-low.c (win32_supports_z_point_type): New function.
1982 (win32_insert_point, win32_remove_point): Adjust to new interface.
1983 (win32_target_ops): Install win32_supports_z_point_type.
1984 * win32-low.h (struct win32_target_ops):
1985 <supports_z_point_type>: New method.
1986 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1987 instead of a char. Also take a raw breakpoint pointer.
1988
932539e3
PA
19892014-05-20 Pedro Alves <palves@redhat.com>
1990
1991 * mem-break.h: Include break-common.h.
1992 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1993 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1994 (Z_packet_to_target_hw_bp_type): New declaration.
1995 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1996 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1997 (Z_PACKET_ACCESS_WP): Delete macros.
1998 (Z_packet_to_hw_type): Delete function.
1999 * i386-low.h: Don't include break-common.h here.
2000 (Z_packet_to_hw_type): Delete declaration.
2001 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2002 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2003 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2004 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2005 * linux-aarch64-low.c: Don't include break-common.h here.
2006 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2007 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2008 (Z_packet_to_target_hw_bp_type): Delete function.
2009 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2010 function.
2011 (mips_insert_point, mips_remove_point): Use
2012 Z_packet_to_target_hw_bp_type.
2013
4ff0d3d8
PA
20142014-05-20 Pedro Alves <palves@redhat.com>
2015
2016 * linux-aarch64-low.c: Include break-common.h.
2017 (enum target_point_type): Delete.
2018 (Z_packet_to_point_type): Rename to ...
2019 (Z_packet_to_target_hw_bp_type): ... this, and return a
2020 target_hw_bp_type instead.
2021 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2022 instead of an enum target_point_type.
2023 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2024 breakpoint type.
2025 (aarch64_dr_state_insert_one_point)
2026 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2027 (aarch64_handle_aligned_watchpoint)
2028 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2029 Take an enum target_hw_bp_type instead of an enum
2030 target_point_type.
2031 (aarch64_supports_z_point_type): New function.
2032 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2033 use Z_packet_to_target_hw_bp_type.
2034
786dc519
JB
20352014-05-20 Joel Brobecker <brobecker@adacore.com>
2036
2037 * configure.ac: Only use -Werror by default when DEVELOPMENT
2038 is true.
2039 * configure: Regenerate.
2040
9e0aa64f
JK
20412014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2042
2043 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2044 * linux-x86-low.c (X86_64_USER_REGS): New.
2045 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2046
2b577b92
YQ
20472014-04-28 Yao Qi <yao@codesourcery.com>
2048
2049 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2050 name.
2051
94611da2
PA
20522014-04-25 Pedro Alves <palves@redhat.com>
2053
2054 PR server/16255
2055 * linux-low.c (linux_attach_fail_reason_string): New function.
2056 (linux_attach_lwp): Delete.
2057 (linux_attach_lwp_1): Rename to ...
2058 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2059 argument. Remove "initial" parameter. Return int instead of
2060 void. Don't error or warn here.
2061 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2062 failure to attach to the tgid. Call warning when failing to
2063 attach to an lwp.
2064 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2065 argument. Remove "initial" parameter. Return int instead of
2066 void. Don't error or warn here.
2067 (linux_attach_fail_reason_string): New declaration.
2068 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2069 interface change. Use linux_attach_fail_reason_string.
2070
01f9f808
MS
20712014-04-24 Michael Sturm <michael.sturm@mintel.com>
2072 Walfred Tedeschi <walfred.tedeschi@intel.com>
2073
2074 * Makefile.in: Added rules to handle new files
2075 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2076 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2077 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2078 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2079 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2080 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2081 x32-avx512-linux.o.
2082 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2083 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2084 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2085 i386/x32-avx512.xml.
2086 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2087 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2088 i386/x32-avx512-linux.xml.
2089 * i387-fp.c (num_avx512_k_registers): New constant for number
2090 of K registers.
2091 (num_avx512_zmmh_low_registers): New constant for number of
2092 lower ZMM registers (0-15).
2093 (num_avx512_zmmh_high_registers): New constant for number of
2094 higher ZMM registers (16-31).
2095 (num_avx512_ymmh_registers): New contant for number of higher
2096 YMM registers (ymm16-31 added by avx521 on x86_64).
2097 (num_avx512_xmm_registers): New constant for number of higher
2098 XMM registers (xmm16-31 added by AVX512 on x86_64).
2099 (struct i387_xsave): Add space for AVX512 registers.
2100 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2101 Add code to handle AVX512 registers.
2102 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2103 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2104 prototypei from generated file.
2105 (tdesc_amd64_avx512_linux): Likewise.
2106 (init_registers_x32_avx512_linux): Likewise.
2107 (tdesc_x32_avx512_linux): Likewise.
2108 (init_registers_i386_avx512_linux): Likewise.
2109 (tdesc_i386_avx512_linux): Likewise.
2110 (x86_64_regmap): Add AVX512 registers.
2111 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2112 mask.
2113 (initialize_low_arch): Add code to initialize AVX512 registers.
2114
51aa91f9
PA
21152014-04-23 Pedro Alves <palves@redhat.com>
2116
2117 * mem-break.c (find_gdb_breakpoint_at): Make static.
2118 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2119
a4165e94
PA
21202014-04-23 Pedro Alves <palves@redhat.com>
2121
2122 * i386-low.c: Don't include break-common.h here.
2123 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2124 prototype to take target_hw_bp_type as argument instead of a Z
2125 packet char.
2126 * i386-low.h: Include break-common.h here.
2127 (Z_packet_to_hw_type): Declare.
2128 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2129 prototypes.
2130 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2131 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2132 (x86_remove_point): Convert the packet number to a
2133 target_hw_bp_type before calling i386_low_remove_watchpoint.
2134 * win32-i386-low.c (i386_insert_point): Convert the packet number
2135 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2136 (i386_remove_point): Convert the packet number to a
2137 target_hw_bp_type before calling i386_low_remove_watchpoint.
2138
b8acf843
PA
21392014-04-23 Pedro Alves <palves@redhat.com>
2140
2141 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2142
d708bcd1
PA
21432014-04-10 Pedro Alves <palves@redhat.com>
2144
2145 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2146 Check if the condition or command is NULL before checking if the
2147 breakpoint is known. On success, return true.
2148 * mem-break.h (add_breakpoint_condition): Document return.
2149 (add_breakpoint_commands): Add describing comment.
2150 * server.c (skip_to_semicolon): New function.
2151 (process_point_options): Use it.
2152
2eec7d5b
PA
21532014-04-09 Pedro Alves <palves@redhat.com>
2154
2155 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2156 to lwpid_of.
2157
fa96cb38
PA
21582014-02-27 Pedro Alves <palves@redhat.com>
2159
2160 PR 12702
2161 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2162 macros.
2163 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2164 output.
2165 (last_thread_of_process_p): Take a PID argument instead of a
2166 thread pointer.
2167 (linux_wait_for_lwp): Delete.
2168 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2169 functions.
2170 (linux_low_filter_event): New function, party factored out from
2171 linux_wait_for_event.
2172 (linux_wait_for_event): Rename to ...
2173 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2174 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2175 sigsuspend. Check for zombie leaders.
2176 (linux_wait_for_event): Reimplement as wrapper around
2177 linux_wait_for_event_filtered.
2178 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2179 a normal or signal exit is seen, it's the whole process exiting.
2180 (wait_for_sigstop): No longer a for_each_inferior callback.
2181 Rewrite on top of linux_wait_for_event_filtered.
2182 (stop_all_lwps): Call wait_for_sigstop directly.
2183 * server.c (resume, handle_target_event): Handle
2184 TARGET_WAITKIND_NO_RESUMED.
2185
d763de10
JB
21862014-02-26 Joel Brobecker <brobecker@adacore.com>
2187
2188 * win32-low.c (psapi_get_dll_name,
2189 * win32_CreateToolhelp32Snapshot): Delete.
2190 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2191 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2192 Delete.
2193 (handle_load_dll): Add function description.
2194 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2195
850a0f76
JB
21962014-02-26 Joel Brobecker <brobecker@adacore.com>
2197
2198 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2199 Add comment.
2200 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2201 base address when calling win32_add_one_solib.
2202 (handle_load_dll): Delete local variable load_addr.
2203 Remove 0x1000 offset applied to DLL base address when calling
2204 win32_add_one_solib.
2205 (handle_unload_dll): Add comment.
2206
f25b3fc3
JB
22072014-02-26 Joel Brobecker <brobecker@adacore.com>
2208
2209 * win32-low.c (win32_add_all_dlls): Renames
2210 win32_ensure_ntdll_loaded. Rewrite function documentation.
2211 Adjust implementation to always load all DLLs.
2212 Add 0x1000 offset to DLL base address when calling
2213 win32_add_one_solib.
2214 (child_initialization_done): New static global.
2215 (do_initial_child_stuff): Set child_initialization_done to
2216 zero during child initialization, and 1 after. Replace call
2217 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2218 Add comment.
2219 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2220 (handle_unload_dll): Add function documentation.
2221 (get_child_debug_event): Ignore load and unload DLL events
2222 during child initialization.
2223
d86d4aaf
DE
22242014-02-20 Doug Evans <dje@google.com>
2225
3bc32da3 2226 Remove global all_lwps.
d86d4aaf
DE
2227 * inferiors.h (ptid_of): Move here from linux-low.h.
2228 (pid_of, lwpid_of): Ditto.
2229 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2230 parameter is a struct thread_info * now.
2231 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2232 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2233 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2234 directly.
2235 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2236 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2237 * linux-arm-low.c (update_registers_callback): Update, "entry"
2238 parameter is a struct thread_info * now.
2239 Fetch lwpid from current_inferior directly.
2240 (arm_insert_point): Pass &all_threads to find_inferior instead of
2241 &all_lwps.
2242 (arm_remove_point): Ditto.
2243 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2244 (arm_prepare_to_resume): Fetch pid from thread.
2245 (arm_read_description): Fetch lwpid from current_inferior directly.
2246 * linux-low.c (all_lwps): Delete.
2247 (delete_lwp): Delete call to remove_inferior.
2248 (handle_extended_wait): Fetch lwpid from thread.
2249 (add_lwp): Don't set lwp->entry.id. Remove call to
2250 add_inferior_to_list.
2251 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2252 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2253 (kill_one_lwp_callback): Ditto.
2254 (linux_kill): Don't dereference NULL pointer.
2255 Fetch ptid,lwpid from thread.
2256 (get_detach_signal): Fetch ptid from thread.
2257 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2258 Simplify call to regcache_invalidate_thread.
2259 (delete_lwp_callback): Update, "entry" parameter is a
2260 struct thread_info * now. Fetch pid from thread.
2261 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2262 (status_pending_p_callback): Update, "entry" parameter is a
2263 struct thread_info * now. Fetch ptid from thread.
2264 (find_lwp_pid): Update, "entry" parameter is a
2265 struct thread_info * now.
2266 (linux_wait_for_lwp): Fetch pid from thread.
2267 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2268 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2269 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2270 (dequeue_one_deferred_signal): Ditto.
2271 (cancel_breakpoint): Fetch ptid from current_inferior.
2272 (linux_wait_for_event): Pass &all_threads to find_inferior,
2273 not &all_lwps. Fetch ptid, lwpid from thread.
2274 (count_events_callback): Update, "entry" parameter is a
2275 struct thread_info * now.
2276 (select_singlestep_lwp_callback): Ditto.
2277 (select_event_lwp_callback): Ditto.
2278 (cancel_breakpoints_callback): Ditto.
2279 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2280 not &all_lwps.
2281 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2282 (unsuspend_one_lwp): Update, "entry" parameter is a
2283 struct thread_info * now.
2284 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2285 not &all_lwps.
2286 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2287 Fetch lwpid from thread, not lwp.
2288 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2289 Pass &all_threads to find_inferior, not &all_lwps.
2290 (send_sigstop): Fetch lwpid from thread, not lwp.
2291 (send_sigstop_callback): Update, "entry" parameter is a
2292 struct thread_info * now.
2293 (suspend_and_send_sigstop_callback): Ditto.
2294 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2295 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2296 struct thread_info * now.
2297 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2298 from thread, lwp.
2299 (lwp_running): Update, "entry" parameter is a
2300 struct thread_info * now.
2301 (stop_all_lwps): Fetch ptid from thread.
2302 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2303 (linux_resume_one_lwp): Fetch lwpid from thread.
2304 (linux_set_resume_request): Update, "entry" parameter is a
2305 struct thread_info * now. Fetch pid, lwpid from thread.
2306 (resume_status_pending_p): Update, "entry" parameter is a
2307 struct thread_info * now.
2308 (need_step_over_p): Ditto. Fetch lwpid from thread.
2309 (start_step_over): Fetch lwpid from thread.
2310 (linux_resume_one_thread): Update, "entry" parameter is a
2311 struct thread_info * now. Fetch lwpid from thread.
2312 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2313 (proceed_one_lwp): Update, "entry" parameter is a
2314 struct thread_info * now. Fetch lwpid from thread.
2315 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2316 struct thread_info * now.
2317 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2318 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2319 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2320 directly.
2321 (regsets_store_inferior_registers): Ditto.
2322 (fetch_register, store_register): Ditto.
2323 (linux_read_memory, linux_write_memory): Ditto.
2324 (linux_request_interrupt): Ditto.
2325 (linux_read_auxv): Ditto.
2326 (linux_xfer_siginfo): Ditto.
2327 (linux_qxfer_spu): Ditto.
2328 (linux_qxfer_libraries_svr4): Ditto.
2329 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2330 moved to inferiors.h.
2331 (get_lwp): Delete.
2332 (get_thread_lwp): Update.
2333 (struct lwp_info): Delete member "entry". Simplify comment for
2334 member "thread".
2335 (all_lwps): Delete.
2336 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2337 current_inferior directly.
2338 (update_watch_registers_callback): Update, "entry" parameter is a
2339 struct thread_info * now. Fetch pid from thread.
2340 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2341 (mips_insert_point): Fetch lwpid from current_inferior.
2342 Pass &all_threads to find_inferior, not &all_lwps.
2343 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2344 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2345 directly.
2346 (mips_stopped_data_address): Ditto.
2347 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2348 directly.
2349 * linux-tile-low.c (tile_arch_setup): Ditto.
2350 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2351 (update_debug_registers_callback): Update, "entry" parameter is a
2352 struct thread_info * now. Fetch pid from thread.
2353 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2354 Pass &all_threads to find_inferior, not &all_lwps.
2355 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2356 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2357 Pass &all_threads to find_inferior, not &all_lwps.
2358 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2359 (i386_dr_low_get_status): Ditto.
2360 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2361 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2362 (x86_linux_read_description): Ditto.
2363 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2364
3b8361aa
DE
23652014-02-20 Doug Evans <dje@google.com>
2366
2367 * inferiors.c (get_first_inferior): Fix buglet.
2368
f7667f0d
DE
23692014-02-19 Doug Evans <dje@google.com>
2370
2371 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2372 * inferiors.c (add_thread): Change result type to struct thread_info *.
2373 All callers updated.
2374 (add_lwp): Call add_thread here instead of in callers.
2375 All callers updated.
2376 * linux-low.h (get_lwp_thread): Rewrite.
2377 (struct lwp_info): New member "thread".
2378
b3312d80
DE
23792014-02-19 Doug Evans <dje@google.com>
2380
2381 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2382 All callers updated.
2383
ecc6f45c
DE
23842014-02-19 Doug Evans <dje@google.com>
2385
2386 * inferiors.c (add_thread): Fix whitespace.
2387
649ebbca
DE
23882014-02-19 Doug Evans <dje@google.com>
2389
2390 * dll.c (clear_dlls): Replace accessing list implemention details
2391 with API function.
2392 * gdbthread.h (get_first_thread): Declare.
2393 * inferiors.c (for_each_inferior_with_data): New function.
2394 (get_first_thread): New function.
2395 (find_thread_ptid): Simplify.
2396 (get_first_inferior): New function.
2397 (clear_list): Delete.
2398 (one_inferior_p): New function.
2399 (clear_inferior_list): New function.
2400 (clear_inferiors): Update.
2401 * inferiors.h (for_each_inferior_with_data): Declare.
2402 (clear_inferior_list): Declare.
2403 (one_inferior_p): Declare.
2404 (get_first_inferior): Declare.
2405 * linux-low.c (linux_wait_for_event): Replace accessing list
2406 implemention details with API function.
2407 * server.c (target_running): Ditto.
2408 (accumulate_file_name_length): New function.
2409 (emit_dll_description): New function.
2410 (handle_qxfer_libraries): Replace accessing list implemention
2411 details with API function.
2412 (handle_qxfer_threads_worker): New function.
2413 (handle_qxfer_threads_proper): Replace accessing list implemention
2414 details with API function.
2415 (handle_query): Ditto.
2416 (visit_actioned_threads_callback_ftype): New typedef.
2417 (visit_actioned_threads_data): New struct.
2418 (visit_actioned_threads): Rewrite to be find_inferior callback.
2419 (resume): Call find_inferior.
2420 (handle_status): Replace accessing list implemention
2421 details with API function.
2422 (process_serial_event): Replace accessing list implemention details
2423 with API function.
2424 * target.c (set_desired_inferior): Replace accessing list implemention
2425 details with API function.
2426 * tracepoint.c (same_process_p): New function.
2427 (gdb_agent_about_to_close): Replace accessing list implemention
2428 details with API function.
2429 * win32-low.c (child_delete_thread): Replace accessing list
2430 implemention details with API function.
2431 (match_dll_by_basename): New function.
2432 (dll_is_loaded_by_basename): New function.
2433 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2434 details call to dll_is_loaded_by_basename.
2435
80894984
DE
24362014-02-19 Doug Evans <dje@google.com>
2437
2438 * dll.h (struct dll_info): Add comment.
2439 * gdbthread.h (struct thread_info): Add comment.
2440 (current_ptid): Simplify.
2441 * inferiors.c (add_process): Update.
2442 (remove_process): Update.
2443 * inferiors.h (struct process_info): Rename member "head" to "entry".
2444 * linux-low.c (delete_lwp): Update.
2445 (add_lwp): Update.
2446 (last_thread_of_process_p): Update.
2447 (kill_one_lwp_callback, linux_kill): Update.
2448 (status_pending_p_callback): Update.
2449 (wait_for_sigstop): Update. Simplify read of ptid.
2450 (start_step_over): Update.
2451 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2452 (get_lwp_thread): Update.
2453 (struct lwp_info): Rename member "head" to "entry".
2454 * regcache.h (inferior_list_entry): Delete.
2455 * server.c (kill_inferior_callback): Update.
2456 (detach_or_kill_inferior_callback): Update.
2457 (print_started_pid): Update.
2458 (print_attached_pid): Update.
2459 (process_serial_event): Simplify read of ptid.
2460 * thread-db.c (thread_db_create_event): Update.
2461 (thread_db_get_tls_address): Update.
2462 * win32-low.c (current_inferior_ptid): Simplify.
2463
46917d26
TT
24642014-02-19 Tom Tromey <tromey@redhat.com>
2465
2466 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2467 argument.
2468 (target_supports_btrace): Update.
2469
0759a81e
YQ
24702014-02-14 Yao Qi <yao@codesourcery.com>
2471
2472 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2473 (rsp-low-ipa.o): New target.
2474
a7191e8b
TT
24752014-02-12 Tom Tromey <tromey@redhat.com>
2476
2477 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2478 convert_ascii_to_int.
2479 * regcache.c (registers_to_string): Likewise.
2480 * remote-utils.c (decode_M_packet): Likewise.
2481 * server.c (process_serial_event): Likewise.
2482
ff0e980e
TT
24832014-02-12 Tom Tromey <tromey@redhat.com>
2484
2485 * server.c (handle_query, handle_v_run): Use hex2bin, not
2486 unhexify.
2487 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2488
e9371aff
TT
24892014-02-12 Tom Tromey <tromey@redhat.com>
2490
2491 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2492 convert_int_to_ascii.
2493 * regcache.c (registers_to_string, collect_register_as_string):
2494 Likewise.
2495 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2496 Likewise.
2497 * server.c (process_serial_event): Likewise.
2498 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2499 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2500
971dc0b8
TT
25012014-02-12 Tom Tromey <tromey@redhat.com>
2502
2503 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2504 bin2hex, not hexify.
2505 * tracepoint.c (cmd_qtstatus): Likewise.
2506
0a822afb
TT
25072014-02-12 Tom Tromey <tromey@redhat.com>
2508
2509 * remote-utils.c (monitor_output): Pass explicit length to
2510 hexify.
2511
9c3d6531
TT
25122014-02-12 Tom Tromey <tromey@redhat.com>
2513
2514 * tracepoint.c: Include rsp-low.h.
2515 * server.c: Include rsp-low.h.
2516 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2517 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2518 declare.
2519 * remote-utils.c: Include rsp-low.h.
2520 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2521 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2522 (convert_int_to_ascii, convert_ascii_to_int): Move to
2523 common/rsp-low.c.
2524 * regcache.c: Include rsp-low.h.
2525 * ax.c: Include rsp-low.h.
2526 * Makefile.in (SFILES): Add common/rsp-low.c.
2527 (OBS): Add rsp-low.o.
2528 (rsp-low.o): New target.
2529
01fd3ea5
TT
25302014-02-12 Tom Tromey <tromey@redhat.com>
2531
2532 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2533 Include print-utils.h.
2534 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2535 (plongest, thirty_two, phex_nz): Remove.
2536 * Makefile.in (SFILES): Add common/print-utils.c.
2537 (OBS): Add print-utils.o.
2538 (print-utils-ipa.o): New target.
2539 (print-utils.o): New target.
2540 (IPA_OBJS): Add print-utils-ipa.o.
2541
e99dc820
TT
25422014-02-06 Tom Tromey <tromey@redhat.com>
2543
2544 * Makefile.in (SFILES): Fix indentation.
2545
ee1e2d4f
DE
25462014-02-05 Doug Evans <dje@google.com>
2547
2548 * linux-low.c (linux_wait_for_event): Improve comment.
2549 (linux_wait_1): Keep current_inferior in sync with event_child.
2550
f5a02773
DE
25512014-01-22 Doug Evans <dje@google.com>
2552
2553 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2554
87ce2a04
DE
25552014-01-22 Doug Evans <dje@google.com>
2556
2557 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2558 * configure: Regenerate.
2559 * config.in: Regenerate.
2560 * Makefile.in (SFILES): Add debug.c.
2561 (OBS): Add debug.o.
2562 * debug.c: New file.
2563 * debug.h: New file.
2564 * linux-aarch64-low.c (*): Update all debugging printfs to use
2565 debug_printf instead of fprintf.
2566 * linux-arm-low.c (*): Ditto.
2567 * linux-cris-low.c (*): Ditto.
2568 * linux-crisv32-low.c (*): Ditto.
2569 * linux-m32r-low.c (*): Ditto.
2570 * linux-sparc-low.c (*): Ditto.
2571 * linux-x86.c (*): Ditto.
2572 * linux-low.c (*): Ditto.
2573 (linux_wait_1): Add calls to debug_enter, debug_exit.
2574 (linux_wait): Remove redundant debugging printf.
2575 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2576 (linux_resume, unstop_all_lwps): Ditto.
2577 * mem-break.c (*): Update all debugging printfs to use
2578 debug_printf instead of fprintf.
2579 * remote-utils.c (*): Ditto.
2580 * thread-db.c (*): Ditto.
2581 * server.c #include <ctype.h>, "gdb_vecs.h".
2582 (debug_threads): Moved to debug.c.
2583 (*): Update all debugging printfs to use debug_printf instead of
2584 fprintf.
2585 (start_inferior): Replace call to fflush with call to debug_flush.
2586 (monitor_show_help): Mention set debug-format.
2587 (parse_debug_format_options): New function.
2588 (handle_monitor_command): Handle "monitor set debug-format".
2589 (gdbserver_usage): Mention --debug-format.
2590 (main): Parse --debug-format.
2591 * server.h (debug_threads): Declaration moved to debug.h.
2592 #include "debug.h".
2593 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2594 trace_debug_1 that uses debug_printf.
2595 (tracepoint_look_up_symbols): Update all debugging printfs to use
2596 debug_printf instead of fprintf.
2597
e671835b
BS
25982014-01-20 Baruch Siach <baruch@tkos.co.il>
2599
2600 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2601 sys/ptrace.h.
2602
b5737fa9
PA
26032014-01-17 Pedro Alves <palves@redhat.com>
2604
ea38d2a9 2605 PR build/16445
c7faa97a
PA
2606 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2607 defined after including gdb_proc_service.h.
b5737fa9 2608
40ed484e
DE
26092014-01-16 Doug Evans <dje@google.com>
2610
2611 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2612 (match_dll): Use it.
2613
969c39fb
MM
26142014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2615
2616 * target.h (target_ops) <read_btrace>: Change parameters and
2617 return type to allow error reporting.
2618 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2619 trace reading errors on.
2620 * linux-low.c (linux_low_read_btrace): Pass trace reading
2621 errors on.
2622 (linux_low_disable_btrace): New.
2623
ab7f45ba
DE
26242014-01-15 Doug Evans <dje@google.com>
2625
2626 * inferiors.c (thread_id_to_gdb_id): Delete.
2627 * inferiors.h (thread_id_to_gdb_id): Delete.
2628
66af0f44
EZ
26292014-01-13 Eli Zaretskii <eliz@gnu.org>
2630
2631 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2632 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2633 versions.
2634
9939e131
PA
26352014-01-08 Pedro Alves <palves@redhat.com>
2636
2637 * server.c (handle_status): Don't discard previous queued stop
2638 replies or thread's pending status here.
2639 (main) <disconnection>: Do it here instead.
2640
b7ea362b
PA
26412014-01-08 Pedro Alves <palves@redhat.com>
2642
2643 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2644 * server.c (visit_actioned_threads, handle_pending_status): New
2645 function.
2646 (handle_v_cont): Factor out parts to ...
2647 (resume): ... this new function. If in all-stop, and a thread
2648 being resumed has a pending status, report it without actually
2649 resuming.
2650 (myresume): Adjust to use the new 'resume' function.
2651 (clear_pending_status_callback, set_pending_status_callback)
2652 (find_status_pending_thread_callback): New functions.
2653 (handle_status): Handle the case of multiple threads having
2654 interesting statuses to report. Report threads' real last signal
2655 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2656 with an interesting thread to report the status for, instead of
2657 always reporting the status of the first thread.
2658
28498c42
JB
26592014-01-01 Joel Brobecker <brobecker@adacore.com>
2660
2661 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2662 * gdbreplay.c (gdbreplay_version): Likewise.
2663
f45c82da
YZ
26642013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2665
2666 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2667 iov.iov_len with the real length in use.
2668
379a5e2d
JB
26692013-12-13 Joel Brobecker <brobecker@adacore.com>
2670
2671 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2672 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2673 for all targets that use win32-low.c.
2674 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2675 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2676
4210d83e
PA
26772013-12-13 Pedro Alves <palves@redhat.com>
2678
2679 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2680 if equal to TARGET_WAITKIND_LOADED.
2681 * win32-low.c (cached_status): New static global.
2682 (win32_wait): Add declaration.
2683 (do_initial_child_stuff): Flush all initial pending debug events
2684 up to the initial breakpoint.
2685 (win32_wait): If CACHED_STATUS was set, return that instead
2686 of doing a real wait. Remove the code resuming the execution
2687 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2688 during the initial phase. Also remove the code changing
2689 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2690 TARGET_WAITKIND_STOPPED.
2691
e7f0d979
YQ
26922013-12-11 Yao Qi <yao@codesourcery.com>
2693
2694 * notif.c (handle_notif_ack): Return 0 if no notification
2695 matches.
2696
ebcf782c
DE
26972013-11-20 Doug Evans <dje@google.com>
2698
2699 * linux-low.c (linux_set_resume_request): Fix comment.
2700
20ad9378
DE
27012013-11-20 Doug Evans <dje@google.com>
2702
2703 * linux-low.c (resume_status_pending_p): Tweak comment.
2704
a196ebeb
WT
27052013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2706
2707 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2708 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2709 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2710 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2711 (srv_amd64_regobj): Add amd64-mpx.o.
2712 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2713 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2714 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2715 * i387-fp.c (num_pl_bnd_register) Added constant.
2716 (num_pl_bnd_cfg_registers) Added constant.
2717 (struct i387_xsave) Added reserved area and MPX fields.
2718 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2719 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2720 function.
2721 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2722 (init_registers_amd64_mpx_linux): Declare new function.
2723 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2724 (x86_64_regmap): Add MPX registers.
2725 (x86_linux_read_description): Add MPX case.
2726 (initialize_low_arch): Initialize MPX targets.
2727
0080a2f6
TT
27282013-11-18 Tom Tromey <tromey@redhat.com>
2729
2730 * configure: Rebuild.
2731 * configure.ac: Don't check for stdlib.h.
2732 * gdbreplay.c: Unconditionally include stdlib.h.
2733
2978b111
TT
27342013-11-18 Tom Tromey <tromey@redhat.com>
2735
2736 * config.in: Rebuild.
2737 * configure: Rebuild.
2738 * configure.ac: Don't use AC_HEADER_DIRENT.
2739
a3d08894
TT
27402013-11-18 Tom Tromey <tromey@redhat.com>
2741
2742 * server.h: Don't check HAVE_STRING_H.
2743 * gdbreplay.c: Don't check HAVE_STRING_H.
2744 * configure: Rebuild.
2745
0a5dd17d
TT
27462013-11-18 Tom Tromey <tromey@redhat.com>
2747
2748 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2749 LIBGNU.
2750
1bd2f0ba
TT
27512013-11-08 Tom Tromey <tromey@redhat.com>
2752
2753 * configure, config.in: Rebuild.
2754 * configure.ac: Remove unused configury.
2755
3266f10b
TT
27562013-11-08 Tom Tromey <tromey@redhat.com>
2757
2758 * acinclude.m4: Include common.m4, codeset.m4.
2759 * configure, config.in: Rebuild.
2760 * configure.ac: Use GDB_AC_COMMON.
2761
6682d959
AA
27622013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2763
2764 * linux-s390-low.c (HWCAP_S390_TE): New define.
2765 (s390_arch_setup): Consider the TE field in the HWCAP for
2766 determining 'have_regset_tdb'.
2767
fd0a4d76
SDJ
27682013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2769
2770 PR gdb/16014
2771 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2772 call to sizeof.
2773
1a3d890b
PA
27742013-10-02 Pedro Alves <palves@redhat.com>
2775
2776 * server.c (process_serial_event): Don't output "GDBserver
2777 exiting" if GDB is connected through stdio.
2778 * target.c (mywait): Likewise, be silent if GDB is connected
2779 through stdio.
2780
97ad4581
JB
27812013-10-01 Joel Brobecker <brobecker@adacore.com>
2782
2783 * lynx-low.c (lynx_add_threads_after_attach): New function.
2784 (lynx_attach): Remove call to add_thread. Add call to
2785 lynx_add_threads_after_attach instead.
2786
5b4e221c
MF
27872013-09-28 Mike Frysinger <vapier@gentoo.org>
2788
2789 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2790 * config.in, configure: Regenerated.
2791
ee47b2f8
YQ
27922013-09-18 Yao Qi <yao@codesourcery.com>
2793
2794 PR server/15959
2795 * server.c (start_inferior): Clear 'resume_info'.
2796
d6707650 27972013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2798
d6707650
JW
2799 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2800 for each register.
2801
9243dd0e 28022013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2803
9243dd0e
JW
2804 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2805 linux-tile-low.o to srv_tgtobj.
2806
c623a6ef
WN
28072013-09-16 Will Newton <will.newton@linaro.org>
2808
2809 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2810 out regs.
2811
fb71d39e
PA
28122013-09-06 Pedro Alves <palves@redhat.com>
2813
2814 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2815 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2816 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2817 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2818 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2819 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2820
8e7e9910
PA
28212013-09-06 Pedro Alves <palves@redhat.com>
2822
2823 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2824 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2825
7c3a12ca
PA
28262013-09-06 Pedro Alves <palves@redhat.com>
2827
2828 * linux-amd64-ipa.c: Include tracepoint.h.
2829 * linux-i386-ipa.c: Include tracepoint.h.
2830
8eb3d7b6
RW
28312013-09-06 Ricard Wanderlof <ricardw@axis.com>
2832
2833 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2834 (ps_get_thread_area): New function.
2835
eddddb9d
RW
28362013-09-06 Ricard Wanderlof <ricardw@axis.com>
2837
2838 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2839 (initialize_low_arch): Call init_registers_crisv32 rather than
2840 init_register_crisv32.
2841
533b0600
PA
28422013-09-05 Pedro Alves <palves@redhat.com>
2843
2844 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2845 to ...
2846 * hostio.h: ... this new file.
2847 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2848 win32-low.c: Include hostio.h.
2849
0ce3d3b5
PA
28502013-09-05 Pedro Alves <palves@redhat.com>
2851
2852 * server.h (gdb_client_data, handler_func, callback_handler_func)
2853 (delete_file_handler, add_file_handler, append_callback_event)
2854 (delete_callback_event, start_event_loop, initialize_event_loop):
2855 Move to event-loop.h and include it.
2856 * event-loop.h: New file.
2857
799cdc37
PA
28582013-09-05 Pedro Alves <palves@redhat.com>
2859
2860 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2861 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2862 (loaded_dll, unloaded_dll): Move to ...
2863 * dll.h: ... this new file.
2864 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2865
6a6bbd9d
PA
28662013-09-05 Pedro Alves <palves@redhat.com>
2867
2868 * server.h (current_process, get_thread_process, all_processes)
2869 (add_inferior_to_list, for_each_inferior, current_inferior)
2870 (remove_inferior, add_process, remove_process, find_process_pid)
2871 (have_started_inferiors_p, have_attached_inferiors_p)
2872 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2873 (clear_inferiors, find_inferior, find_inferior_id)
2874 (inferior_target_data, set_inferior_target_data)
2875 (inferior_regcache_data, set_inferior_regcache_data): Move to
2876 inferiors.h, and include it.
2877 * inferiors.h: New file.
2878
f699aaba
PA
28792013-09-05 Pedro Alves <palves@redhat.com>
2880
2881 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2882 Move ...
2883 * ax.h: ... here.
2884
c144c7a0
PA
28852013-09-05 Pedro Alves <palves@redhat.com>
2886
2887 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2888 tracepoint.h.
2889 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2890 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2891 (handle_tracepoint_general_set, handle_tracepoint_query)
2892 (tracepoint_finished_step, tracepoint_was_hit)
2893 (release_while_stepping_state_list, current_traceframe)
2894 (in_readonly_region, traceframe_read_mem)
2895 (fetch_traceframe_registers, traceframe_read_sdata)
2896 (traceframe_read_info, struct fast_tpoint_collect_status)
2897 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2898 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2899 (supply_fast_tracepoint_registers)
2900 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2901 (ipa_tdesc, claim_trampoline_space)
2902 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2903 (agent_mem_read, agent_get_trace_state_variable_value)
2904 (agent_set_trace_state_variable_value, agent_tsv_read)
2905 (agent_mem_read_string, get_raw_reg_func_addr)
2906 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2907 * tracepoint.h: ... this new file.
2908
ff42e6ab
PA
29092013-09-05 Pedro Alves <palves@redhat.com>
2910
2911 * server.h (perror_with_name, error, fatal, warning, paddress)
2912 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2913 include it.
2914 * utils.h: New file.
2915
541af0f4
PA
29162013-09-05 Pedro Alves <palves@redhat.com>
2917
2918 * server.h (remote_debug, noack_mode, transport_is_reliable)
2919 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2920 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2921 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2922 (write_enn, initialize_async_io, enable_async_io)
2923 (disable_async_io, check_remote_input_interrupt_request)
2924 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2925 (dead_thread_notify, prepare_resume_reply)
2926 (decode_address_to_semicolon, decode_address, decode_m_packet)
2927 (decode_M_packet, decode_X_packet, decode_xfer_write)
2928 (decode_search_memory_packet, unhexify, hexify)
2929 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2930 (look_up_one_symbol, relocate_instruction)
2931 (monitor_output): Move to remote-utils.h, and include it.
2932 * remote-utils.h: New file.
2933
eebdf26b
PA
29342013-09-05 Pedro Alves <palves@redhat.com>
2935
2936 * server.h (_): Delete.
2937
3aafd2ff
PA
29382013-09-02 Pedro Alves <palves@redhat.com>
2939
2940 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2941 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2942 allocated.
2943 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2944
cee83bcb
PM
29452013-09-02 Pierre Muller <muller@sourceware.org>
2946
2947 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2948 or WriteProcessMemory complete successfully and handle
2949 ERROR_PARTIAL_COPY error.
2950
9a13b2fa
PA
29512013-09-02 Pedro Alves <palves@redhat.com>
2952
2953 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2954 error instead of EIO.
2955
602e3198
JK
29562013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2957
2958 PR server/15604
2959 * linux-low.c: Include filestuff.h.
2960 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2961 * lynx-low.c: Include filestuff.h.
2962 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2963 * server.c: Include filestuff.h.
2964 (main): Call notice_open_fds.
2965 * spu-low.c: Include filestuff.h.
2966 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2967
96d7229d
LM
29682013-08-22 Luis Machado <lgustavo@codesourcery.com>
2969
2970 * Makefile.in: Explain why ../target and ../nat are not
2971 listed as include file search paths.
2972 (linux-waitpid.o): New object file rule.
2973 * configure.srv (srv_native_linux_obj): New variable.
2974 Replace all occurrences of linux native object files with
2975 $srv_native_linux_obj.
2976 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2977 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2978 (linux_enable_event_reporting): Remove declaration.
2979 (my_waitpid): Moved to common/linux-waitpid.c.
2980 (linux_wait_for_event): Pass ptid when calling
2981 linux_enable_event_reporting.
2982 (linux_supports_tracefork_flag): Remove.
2983 (linux_enable_event_reporting): Likewise.
2984 (linux_tracefork_grandchild): Remove.
2985 (STACK_SIZE): Moved to common/linux-ptrace.c.
2986 (linux_tracefork_child): Remove.
2987 (linux_test_for_tracefork): Remove.
2988 (linux_look_up_symbols): Call linux_supports_traceclone.
2989 (initialize_low): Remove call to linux_test_for_tracefork.
2990 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2991 common/linux-ptrace.h.
2992 (PTRACE_TYPE_ARG4): Likewise.
2993 Include linux-ptrace.h.
2994
32940073
PA
29952013-08-21 Pedro Alves <palves@redhat.com>
2996
2997 * config.in: Renegerate.
2998
33b60d58 29992013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3000
33b60d58
LM
3001 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3002 (SFILES): Remove $(srcdir)/common/target-common.c and
3003 add $(srcdir)/target/waitstatus.c.
3004 (OBS): Remove target-common.o and add waitstatus.o.
3005 (server_h): Remove $(srcdir)/../common/target-common.h and
3006 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3007 and $(srcdir)/../target/waitstatus.h.
3008 (target-common.o): Remove.
3009 (waitstatus.o): New target object file.
3010 * target.h: Do not include target-common.h and
3011 include target/resume.h, target/wait.h and
3012 target/waitstatus.h.
3013
b8e1b30e
LM
30142013-08-13 Luis Machado <lgustavo@codesourcery.com>
3015
3016 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3017 to PTRACE_TYPE_ARG3.
3018 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3019 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3020 PTRACE_TYPE_ARG4.
3021 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3022 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3023
7a60ad40
YQ
30242013-07-27 Jie Zhang <jie@codesourcery.com>
3025 Daniel Jacobowitz <dan@codesourcery.com>
3026 Yao Qi <yao@codesourcery.com>
3027
3028 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3029 (mips-linux-watch.o): New rule.
3030 (mips_linux_watch_h): New variable.
3031 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3032 srv_tgtobj.
3033 * linux-mips-low.c: Include mips-linux-watch.h.
3034 (struct arch_process_info, struct arch_lwp_info): New.
3035 (update_watch_registers_callback): New function.
3036 (mips_linux_new_process, mips_linux_new_thread) New functions.
3037 (mips_linux_prepare_to_resume, mips_insert_point): New
3038 functions.
3039 (mips_remove_point, mips_stopped_by_watchpoint): New
3040 functions.
3041 (rsp_bp_type_to_target_hw_bp_type): New function.
3042 (mips_stopped_data_address): New function.
3043 (the_low_target): Add watchpoint support functions.
3044
de6f69ad
YQ
30452013-07-27 Yao Qi <yao@codesourcery.com>
3046
3047 * i386-low.c: Include break-common.h.
3048 (enum target_hw_bp_type): Remove.
3049
3360c0bf
LM
30502013-07-24 Luis Machado <lgustavo@codesourcery.com>
3051
3052 * Makefile.in (SFILES): /common/target-common.c.
3053 (OBS): Add target-common.o.
3054 (server_h): Add $(srcdir)/../common/target-common.h.
3055 (target-common.o): New target.
3056 * server.c (queue_stop_reply_callback): Free
3057 status string after use.
3058 * target.c (target_waitstatus_to_string): Remove.
3059 * target.h: Include target-common.h.
3060 (resume_kind): Likewise.
3061 (target_waitkind): Likewise.
3062 (target_waitstatus): Likewise.
3063 (TARGET_WNOHANG): Likewise.
3064
bd885420
YQ
30652013-07-04 Yao Qi <yao@codesourcery.com>
3066
3067 * Makefile.in (host_alias): Use @host_noncanonical@.
3068 (target_alias): Use @target_noncanonical@.
3069 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3070 ACX_NONCANONICAL_HOST.
3071 * configure: Regenerated.
3072
3073 Revert:
3074 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3075
3076 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3077 * configure: Rebuild.
3078 * Makefile.in (version_host, version_target): Get from configure.
3079 (version.c): Use $(version_host) and $(version_target).
3080
17ef446e
PA
30812013-07-03 Pedro Alves <palves@redhat.com>
3082
3083 * Makefile.in (config.status): Depend on development.sh.
3084 * acinclude.m4: Include libmcheck.m4.
3085 * configure: Regenerate.
3086
7a9a7487
MG
30872013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3088
3089 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3090 attribute inside the parentheses.
3091 (winapi_DebugSetProcessKillOnExit): Ditto.
3092 (winapi_DebugBreakProcess): Ditto.
3093 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3094
49b64de6
MG
30952013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3096
3097 * notif.h (notif_event): Add a dummy member to avoid compiler
3098 errors.
3099
d5749ee7
PA
31002013-07-01 Pedro Alves <palves@redhat.com>
3101
3102 * hostio.c (HOSTIO_PATH_MAX): Define.
3103 (require_filename, handle_open, handle_unlink, handle_readlink):
3104 Use it.
3105
d8d2a3ee
PA
31062013-07-01 Pedro Alves <palves@redhat.com>
3107
3108 * server.h: Include "pathmax.h".
3109 * linux-low.c: Don't include sys/param.h.
3110 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3111 MAXPATHLEN.
3112 * win32-low.c: Don't include sys/param.h.
3113 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3114
bc7dea8d
PA
31152013-07-01 Pedro Alves <palves@redhat.com>
3116
3117 * event-loop.c: Don't check HAVE_UNISTD_H before including
3118 <unistd.h>.
3119 * gdbreplay.c: Likewise.
3120 * remote-utils.c: Likewise.
3121 * server.c: Likewise.
3122 * configure.ac: Don't check for unistd.h.
3123 * configure: Regenerate.
3124
d6c2da54
TT
31252013-06-28 Tom Tromey <tromey@redhat.com>
3126
3127 * Makefile.in (version.c): Use version.in, not
3128 common/version.in.
3129
257b6bec
MG
31302013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3131
3132 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3133 * configure: Rebuild.
3134 * Makefile.in (version_host, version_target): Get from configure.
3135 (version.c): Use $(version_host) and $(version_target).
3136
86ebe149
DK
31372013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3138
3139 Fix trace-status to output user name without trailing colon.
3140 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3141
f30aa5af
DK
31422013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3143
3144 Fix trace-status to output proper start-time and stop-time.
3145 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3146 output start time and stop time in hex as gdb expects.
3147
28a93511
YQ
31482013-06-26 Pedro Alves <pedro@codesourcery.com>
3149
3150 * tracepoint.c (build_traceframe_info_xml): Output trace state
3151 variables present in the trace buffer.
3152
01208463
TT
31532013-06-24 Tom Tromey <tromey@redhat.com>
3154
3155 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3156 create-version.sh.
3157 (version.o): Remove.
3158 * gdbreplay.c: Include version.h.
3159 (version, host_name): Don't declare.
3160 * server.h: Include version.h.
3161 (version, host_name): Don't declare.
3162
760256f9
PA
31632013-06-12 Pedro Alves <palves@redhat.com>
3164
3165 * linux-x86-low.c (linux_is_elf64): Delete global.
3166 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3167 with local linux_pid_exe_is_elf_64_file use.
3168
030031ee
PA
31692013-06-11 Pedro Alves <palves@redhat.com>
3170
3171 * linux-low.c (regset_disabled, disable_regset): New functions.
3172 (regsets_fetch_inferior_registers)
3173 (regsets_store_inferior_registers): Use them.
3174 (initialize_regsets_info); Don't allocate the disabled_regsets
3175 array here.
3176 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3177 comment.
3178
5da6eb0a
PA
31792013-06-11 Pedro Alves <palves@redhat.com>
3180
3181 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3182 xmalloc.
3183
7e5aaa09
PA
31842013-06-11 Pedro Alves <palves@redhat.com>
3185
3186 * linux-x86-low.c (initialize_low_arch): Call
3187 init_registers_x32_avx_linux.
3188
d878444c
JK
31892013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3190
3191 Fix compatibility with Android Bionic.
3192 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3193 it is not empty.
3194
3aee8918
PA
31952013-06-07 Pedro Alves <palves@redhat.com>
3196
5f2b57b5 3197 PR server/14823
3aee8918
PA
3198 * Makefile.in (OBS): Add tdesc.o.
3199 (IPA_OBJS): Add tdesc-ipa.o.
3200 (tdesc-ipa.o): New rule.
3201 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3202 interface.
3203 * linux-low.c (new_inferior): Delete.
3204 (disabled_regsets, num_regsets): Delete.
3205 (linux_add_process): Adjust to set the new per-process
3206 new_inferior flag.
3207 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3208 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3209 was a stop. When calling arch_setup, switch the current inferior
3210 to the thread that got an event.
3211 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3212 (regsets_fetch_inferior_registers)
3213 (regsets_store_inferior_registers): New regsets_info parameter.
3214 Adjust to use it.
3215 (linux_register_in_regsets): New regs_info parameter. Adjust to
3216 use it.
3217 (register_addr, fetch_register, store_register): New usrregs_info
3218 parameter. Adjust to use it.
3219 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3220 parameter regs_info. Adjust to use it.
3221 (linux_fetch_registers): Get the current inferior's regs_info, and
3222 adjust to use it.
3223 (linux_store_registers): Ditto.
3224 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3225 (initialize_low): Don't initialize the target_regsets here. Call
3226 initialize_low_arch.
3227 * linux-low.h (target_regsets): Delete declaration.
3228 (struct regsets_info): New.
3229 (struct usrregs_info): New.
3230 (struct regs_info): New.
3231 (struct process_info_private) <new_inferior>: New field.
3232 (struct linux_target_ops): Delete the num_regs, regmap, and
3233 regset_bitmap fields. New field regs_info.
3234 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3235 * i387-fp.c (num_xmm_registers): Delete.
3236 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3237 calls to new interface.
3238 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3239 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3240 Infer the number of xmm registers from the regcache's target
3241 description.
3242 * i387-fp.h (num_xmm_registers): Delete.
3243 * inferiors.c (add_thread): Don't install the thread's regcache
3244 here.
3245 * proc-service.c (gregset_info): Fetch the current inferior's
3246 regs_info. Adjust to use it.
3247 * regcache.c: Include tdesc.h.
3248 (register_bytes, reg_defs, num_registers)
3249 (gdbserver_expedite_regs): Delete.
3250 (get_thread_regcache): If the thread doesn't have a regcache yet,
3251 create one, instead of aborting gdbserver.
3252 (regcache_invalidate_one): Rename to ...
3253 (regcache_invalidate_thread): ... this.
3254 (regcache_invalidate_one): New.
3255 (regcache_invalidate): Only invalidate registers of the current
3256 process.
3257 (init_register_cache): Add target_desc parameter, and use it.
3258 (new_register_cache): Ditto. Assert the target description has a
3259 non zero registers_size.
3260 (regcache_cpy): Add assertions. Adjust.
3261 (realloc_register_cache, set_register_cache): Delete.
3262 (registers_to_string, registers_from_string): Adjust.
3263 (find_register_by_name, find_regno, find_register_by_number)
3264 (register_cache_size): Add target_desc parameter, and use it.
3265 (free_register_cache_thread, free_register_cache_thread_one)
3266 (regcache_release, register_cache_size): New.
3267 (register_size): Add target_desc parameter, and use it.
3268 (register_data, supply_register, supply_register_zeroed)
3269 (supply_regblock, supply_register_by_name, collect_register)
3270 (collect_register_as_string, collect_register_by_name): Adjust.
3271 * regcache.h (struct target_desc): Forward declare.
3272 (struct regcache) <tdesc>: New field.
3273 (init_register_cache, new_register_cache): Add target_desc
3274 parameter.
3275 (regcache_invalidate_thread): Declare.
3276 (regcache_invalidate_one): Delete declaration.
3277 (regcache_release): Declare.
3278 (find_register_by_number, register_cache_size, register_size)
3279 (find_regno): Add target_desc parameter.
3280 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3281 declarations.
3282 * remote-utils.c: Include tdesc.h.
3283 (outreg, prepare_resume_reply): Adjust.
3284 * server.c: Include tdesc.h.
3285 (gdbserver_xmltarget): Delete declaration.
3286 (get_features_xml, process_serial_event): Adjust.
3287 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3288 declare.
3289 (struct process_info) <tdesc>: New field.
3290 (ipa_tdesc): Declare.
3291 * tdesc.c: New file.
3292 * tdesc.h: New file.
3293 * tracepoint.c: Include tdesc.h.
3294 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3295 (get_context_regcache): Adjust to pass ipa_tdesc down.
3296 (do_action_at_tracepoint): Adjust to get the register cache size
3297 from the context regcache's description.
3298 (traceframe_walk_blocks): Adjust to get the register cache size
3299 from the current trace frame's description.
3300 (traceframe_get_pc): Adjust to get current trace frame's
3301 description and pass it down.
3302 (gdb_collect): Adjust to get the register cache size from the
3303 IPA's description.
3304 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3305 (gdbserver_xmltarget): Delete.
3306 (initialize_low_tracepoint): Set the ipa's target description.
3307 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3308 (initialize_low_tracepoint): Set the ipa's target description.
3309 * linux-x86-low.c: Include tdesc.h.
3310 [__x86_64__] (is_64bit_tdesc): New.
3311 (ps_get_thread_area, x86_get_thread_area): Use it.
3312 (i386_cannot_store_register): Rename to ...
3313 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3314 (i386_cannot_fetch_register): Rename to ...
3315 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3316 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3317 to new interface.
3318 (target_regsets): Rename to ...
3319 (x86_regsets): ... this.
3320 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3321 interface.
3322 (x86_siginfo_fixup): Use is_64bit_tdesc.
3323 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3324 (tdesc_x32_avx_linux, tdesc_x32_linux)
3325 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3326 Declare.
3327 (x86_linux_update_xmltarget): Delete.
3328 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3329 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3330 (AMD64_LINUX_USER64_CS): New.
3331 (x86_linux_read_description): New, based on
3332 x86_linux_update_xmltarget.
3333 (same_process_callback): New.
3334 (x86_arch_setup_process_callback): New.
3335 (x86_linux_update_xmltarget): New.
3336 (x86_regsets_info): New.
3337 (amd64_linux_regs_info): New.
3338 (i386_linux_usrregs_info): New.
3339 (i386_linux_regs_info): New.
3340 (x86_linux_regs_info): New.
3341 (x86_arch_setup): Reimplement.
3342 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3343 (x86_emit_ops): Ditto.
3344 (the_low_target): Adjust. Install x86_linux_regs_info,
3345 x86_cannot_fetch_register, and x86_cannot_store_register.
3346 (initialize_low_arch): New.
3347 * linux-ia64-low.c (tdesc_ia64): Declare.
3348 (ia64_fetch_register): Adjust.
3349 (ia64_usrregs_info, regs_info): New globals.
3350 (ia64_regs_info): New function.
3351 (the_low_target): Adjust.
3352 (initialize_low_arch): New function.
3353 * linux-sparc-low.c (tdesc_sparc64): Declare.
3354 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3355 Adjust.
3356 (sparc_arch_setup): New function.
3357 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3358 (the_low_target): Adjust.
3359 (initialize_low_arch): New function.
3360 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3361 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3362 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3363 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3364 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3365 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3366 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3367 (tdesc_powerpc_isa205_vsx64l): Declare.
3368 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3369 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3370 (ppc_set_pc, ppc_get_hwcap): Adjust.
3371 (ppc_usrregs_info): Forward declare.
3372 (!__powerpc64__) ppc_regmap_adjusted: New global.
3373 (ppc_arch_setup): Adjust to the current process'es target
3374 description.
3375 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3376 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3377 (ppc_store_evrregset): Adjust.
3378 (target_regsets): Rename to ...
3379 (ppc_regsets): ... this, and make static.
3380 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3381 (ppc_regs_info): New function.
3382 (the_low_target): Adjust.
3383 (initialize_low_arch): New function.
3384 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3385 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3386 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3387 (tdesc_s390x_linux64v2): Declare.
3388 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3389 (s390_fill_gregset, s390_store_last_break): Adjust.
3390 (target_regsets): Rename to ...
3391 (s390_regsets): ... this, and make static.
3392 (s390_get_pc, s390_set_pc): Adjust.
3393 (s390_get_hwcap): New target_desc parameter, and use it.
3394 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3395 (s390_arch_setup): Adjust to set the current process'es target
3396 description. Don't adjust the regmap.
3397 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3398 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3399 (regs_info_3264): New globals.
3400 (s390_regs_info): New function.
3401 (the_low_target): Adjust.
3402 (initialize_low_arch): New function.
3403 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3404 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3405 [__mips64] (init_registers_mips_linux)
3406 (init_registers_mips_dsp_linux): Delete defines.
3407 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3408 (have_dsp): New global.
3409 (mips_read_description): New, based on mips_arch_setup.
3410 (mips_arch_setup): Reimplement.
3411 (get_usrregs_info): New function.
3412 (mips_cannot_fetch_register, mips_cannot_store_register)
3413 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3414 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3415 (target_regsets): Rename to ...
3416 (mips_regsets): ... this, and make static.
3417 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3418 (dsp_regs_info, regs_info): New globals.
3419 (mips_regs_info): New function.
3420 (the_low_target): Adjust.
3421 (initialize_low_arch): New function.
3422 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3423 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3424 Declare.
3425 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3426 (arm_read_description): New, with bits factored from
3427 arm_arch_setup.
3428 (arm_arch_setup): Reimplement.
3429 (target_regsets): Rename to ...
3430 (arm_regsets): ... this, and make static.
3431 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3432 (arm_regs_info): New function.
3433 (the_low_target): Adjust.
3434 (initialize_low_arch): New function.
3435 * linux-m68k-low.c (tdesc_m68k): Declare.
3436 (target_regsets): Rename to ...
3437 (m68k_regsets): ... this, and make static.
3438 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3439 (m68k_regs_info): New function.
3440 (m68k_arch_setup): New function.
3441 (the_low_target): Adjust.
3442 (initialize_low_arch): New function.
3443 * linux-sh-low.c (tdesc_sharch): Declare.
3444 (target_regsets): Rename to ...
3445 (sh_regsets): ... this, and make static.
3446 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3447 (sh_regs_info, sh_arch_setup): New functions.
3448 (the_low_target): Adjust.
3449 (initialize_low_arch): New function.
3450 * linux-bfin-low.c (tdesc_bfin): Declare.
3451 (bfin_arch_setup): New function.
3452 (bfin_usrregs_info, regs_info): New globals.
3453 (bfin_regs_info): New function.
3454 (the_low_target): Adjust.
3455 (initialize_low_arch): New function.
3456 * linux-cris-low.c (tdesc_cris): Declare.
3457 (cris_arch_setup): New function.
3458 (cris_usrregs_info, regs_info): New globals.
3459 (cris_regs_info): New function.
3460 (the_low_target): Adjust.
3461 (initialize_low_arch): New function.
3462 * linux-cris-low.c (tdesc_crisv32): Declare.
3463 (cris_arch_setup): New function.
3464 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3465 (cris_regs_info): New function.
3466 (the_low_target): Adjust.
3467 (initialize_low_arch): New function.
3468 * linux-m32r-low.c (tdesc_m32r): Declare.
3469 (m32r_arch_setup): New function.
3470 (m32r_usrregs_info, regs_info): New globals.
3471 (m32r_regs_info): Adjust.
3472 (initialize_low_arch): New function.
3473 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3474 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3475 (tic6x_usrregs_info): Forward declare.
3476 (tic6x_read_description): New function, based on ...
3477 (tic6x_arch_setup): ... this. Reimplement.
3478 (target_regsets): Rename to ...
3479 (tic6x_regsets): ... this, and make static.
3480 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3481 (tic6x_regs_info): New function.
3482 (the_low_target): Adjust.
3483 (initialize_low_arch): New function.
3484 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3485 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3486 (target_regsets): Rename to ...
3487 (xtensa_regsets): ... this, and make static.
3488 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3489 globals.
3490 (xtensa_arch_setup, xtensa_regs_info): New functions.
3491 (the_low_target): Adjust.
3492 (initialize_low_arch): New function.
3493 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3494 (nios2_arch_setup): Set the current process'es tdesc.
3495 (target_regsets): Rename to ...
3496 (nios2_regsets): ... this.
3497 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3498 (nios2_regs_info): New function.
3499 (the_low_target): Adjust.
3500 (initialize_low_arch): New function.
a261b8f5
PA
3501 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3502 (aarch64_arch_setup): Set the current process'es tdesc.
3503 (target_regsets): Rename to ...
3504 (aarch64_regsets): ... this.
3505 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3506 (aarch64_regs_info): New function.
3507 (the_low_target): Adjust.
3508 (initialize_low_arch): New function.
3aee8918
PA
3509 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3510 globals.
3511 (target_regsets): Rename to ...
3512 (tile_regsets): ... this.
3513 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3514 (tile_regs_info): New function.
3515 (tile_arch_setup): Set the current process'es tdesc.
3516 (the_low_target): Adjust.
3517 (initialize_low_arch): New function.
3518 * spu-low.c (tdesc_spu): Declare.
3519 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3520 * win32-arm-low.c (tdesc_arm): Declare.
3521 (arm_arch_setup): New function.
3522 (the_low_target): Install arm_arch_setup instead of
3523 init_registers_arm.
3524 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3525 (init_windows_x86): Rename to ...
3526 (i386_arch_setup): ... this. Set `win32_tdesc'.
3527 (the_low_target): Adjust.
3528 * win32-low.c (win32_tdesc): New global.
3529 (child_add_thread): Don't create the thread cache here.
3530 (do_initial_child_stuff): Set the new process'es tdesc.
3531 * win32-low.h (struct target_desc): Forward declare.
3532 (win32_tdesc): Declare.
3533 * lynx-i386-low.c (tdesc_i386): Declare global.
3534 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3535 * lynx-low.c (lynx_tdesc): New global.
3536 (lynx_add_process): Set the new process'es tdesc.
3537 * lynx-low.h (struct target_desc): Forward declare.
3538 (lynx_tdesc): Declare global.
3539 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3540 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3541 * nto-low.c (nto_tdesc): New global.
3542 (do_attach): Set the new process'es tdesc.
3543 * nto-low.h (struct target_desc): Forward declare.
3544 (nto_tdesc): Declare.
3545 * nto-x86-low.c (tdesc_i386): Declare.
3546 (nto_x86_arch_setup): Set `nto_tdesc'.
3547
b1fbec62
GB
35482013-06-04 Gary Benson <gbenson@redhat.com>
3549
3550 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3551 to qSupported response when appropriate.
3552 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3553 with nonzero-length annex.
3554 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3555 arguments supplied in annex.
3556
d1ec4ce7
DE
35572013-05-31 Doug Evans <dje@google.com>
3558
ac44adcb 3559 PR server/15594
d1ec4ce7
DE
3560 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3561 64 bits in 64-cross-32 environment.
3562
9b25f2d3
PA
35632013-05-28 Pedro Alves <palves@redhat.com>
3564
3565 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3566 (aarch64-without-fpu.c): Delete rule.
3567 * configure.srv (aarch64*-*-linux*): Remove references to
3568 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3569 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3570 declaration.
3571
6740dc9c
PA
35722013-05-24 Pedro Alves <palves@redhat.com>
3573
3574 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3575 instead of strchr/decode_address. Error if the range isn't split
3576 with a ','. Don't assume there's be a ':' in the action.
3577
c2d6af84
PA
35782013-05-23 Yao Qi <yao@codesourcery.com>
3579 Pedro Alves <palves@redhat.com>
3580
3581 * linux-low.c (lwp_in_step_range): New function.
3582 (linux_wait_1): If the thread was range stepping and stopped
3583 outside the stepping range, report the stop to GDB. Otherwise,
3584 continue stepping. Add range stepping debug output.
3585 (linux_set_resume_request): Copy the step range from the resume
3586 request to the lwp.
3587 (linux_supports_range_stepping): New.
3588 (linux_target_ops) <supports_range_stepping>: Set to
3589 linux_supports_range_stepping.
3590 * linux-low.h (struct linux_target_ops)
3591 <supports_range_stepping>: New field.
3592 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3593 * linux-x86-low.c (x86_supports_range_stepping): New.
3594 (the_low_target) <supports_range_stepping>: Set to
3595 x86_supports_range_stepping.
3596 * server.c (handle_v_cont): Handle 'r' action.
3597 (handle_v_requests): Append ";r" if the target supports range
3598 stepping.
3599 * target.h (struct thread_resume) <step_range_start,
3600 step_range_end>: New fields.
3601 (struct target_ops) <supports_range_stepping>:
3602 New field.
3603 (target_supports_range_stepping): New macro.
3604
58794e1a
JB
36052013-05-17 Joel Brobecker <brobecker@adacore.com>
3606
3607 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3608 confusion in comment.
3609
d631c5a7
JB
36102013-05-17 Joel Brobecker <brobecker@adacore.com>
3611
3612 * lynx-low.c (struct process_info_private): New type.
3613 (lynx_add_process): New function.
3614 (lynx_create_inferior, lynx_attach): Replace calls to
3615 add_process by calls to lynx_add_process.
3616 (lynx_resume): If PTID is null, then try using
3617 current_process()->private->last_wait_event_ptid.
3618 Add comments.
3619 (lynx_clear_inferiors): Delete. The contents of that function
3620 has been inlined in lynx_mourn;
3621 (lynx_wait_1): Save the ptid in the process's private data.
3622 (lynx_mourn): Free the process' private data. Replace call
3623 to lynx_clear_inferiors by call to clear_inferiors.
3624
96f7a20f
YQ
36252013-05-17 Yao Qi <yao@codesourcery.com>
3626
3627 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3628 the right place.
3629
db0dfaa0
LM
36302013-05-16 Luis Machado <lgustavo@codesourcery.com>
3631
3632 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3633 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3634 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3635 PT_TEXT_END_ADDR guards. Update comments.
3636 (linux_target_op) <read_offsets>: Conditionally define to
3637 linux_read_offsets if the target is UCLIBC and if it defines
3638 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3639
68f5f838
SL
36402013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3641 Andrew Jenner <andrew@codesourcery.com>
3642
3643 * Makefile.in (SFILES): Add linux-nios2-low.c.
3644 (clean): Add action to delete nios2-linux.c.
3645 (nios2-linux.c): New rule.
3646 * configure.srv: Add nios2*-*-linux*.
3647 * linux-nios2-low.c: New.
3648
1ebff1fd
HAQ
36492013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3650
3651 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3652
f6150862
HZ
36532013-04-25 Hui Zhu <hui@codesourcery.com>
3654
3655 PR gdb/15186
f6150862
HZ
3656 * ax.c (ax_printf): Add fflush.
3657
614c279d
TT
36582013-04-22 Tom Tromey <tromey@redhat.com>
3659
3660 * Makefile.in (SFILES): Add filestuff.c.
3661 (OBS): Add filestuff.o.
3662 (filestuff.o): New target.
3663 * config.in, configure: Rebuild.
3664 * configure.ac: Check for fdwalk, pipe2.
3665
7d4e5717
PA
36662013-04-17 Pedro Alves <palves@redhat.com>
3667
3668 * configure.ac (USE_THREAD_DB): Delete variable.
3669 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3670 Don't AC_SUBST USE_THREAD_DB.
3671 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3672 * config.in, configure: Regenerate.
3673
d5c93e41
PA
36742013-04-16 Pedro Alves <palves@redhat.com>
3675
3676 * linux-low.h (struct lwp_info) <thread_known>: Move under
3677 the USE_THREAD_DB #ifdef.
3678
04f5fe89
PA
36792013-04-16 Pedro Alves <palves@redhat.com>
3680
3681 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3682 (linux-low.o): Delete rule.
3683 * linux-low.h: Always include "gdb_thread_db.h" instead of
3684 conditionally including thread_db.h.
3685 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3686 HAVE_THREAD_DB_H.
3687
480b27bf
JK
36882013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3689
3690 * Makefile.in (install-only): Fix make install regression.
3691
43662968
JK
36922013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3693
3694 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3695 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3696 installation.
3697 * gdbserver.1: Remove.
3698
3e74e146
PA
36992013-03-22 Pedro Alves <palves@redhat.com>
3700
3701 * linux-low.c (handle_extended_wait): Don't call
3702 linux_enable_event_reporting.
3703
a8347a2a
TT
37042013-03-15 Tony Theodore <tonyt@logyst.com>
3705
3706 PR build/9098:
3707 * Makefile.in (SHELL): Use @SHELL@.
3708
eeb56fa7
SDJ
37092013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3710
3711 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3712 compiler warning.
3713
4fa7e2ff
JB
37142013-03-13 Joel Brobecker <brobecker@adacore.com>
3715
3716 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3717 Remove extraneous NULL element.
3718
8ddb1965
YQ
37192013-03-13 Yao Qi <yao@codesourcery.com>
3720
3721 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3722 'V' block in trace frame.
3723
9accd112
MM
37242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3725
3726 * target.h (struct target_ops): Add btrace ops.
3727 (target_supports_btrace): New macro.
3728 (target_enable_btrace): New macro.
3729 (target_disable_btrace): New macro.
3730 (target_read_btrace): New macro.
3731 * gdbthread.h (struct thread_info): Add btrace field.
3732 * server.c: Include btrace-common.h.
3733 (handle_btrace_general_set): New function.
3734 (handle_btrace_enable): New function.
3735 (handle_btrace_disable): New function.
3736 (handle_general_set): Call handle_btrace_general_set.
3737 (handle_qxfer_btrace): New function.
3738 (struct qxfer qxfer_packets[]): Add btrace entry.
3739 * inferiors.c (remove_thread): Disable btrace.
3740 * linux-low: Include linux-btrace.h.
3741 (linux_low_enable_btrace): New function.
3742 (linux_low_read_btrace): New function.
3743 (linux_target_ops): Add btrace ops.
3744 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3745 Add srv_linux_btrace=yes.
3746 (x86_64-*-linux*): Add linux-btrace.o.
3747 Add srv_linux_btrace=yes.
3748 * configure.ac: Define HAVE_LINUX_BTRACE.
3749 * config.in: Regenerated.
3750 * configure: Regenerated.
3751
5cc22e4c
MM
37522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3753
3754 * server.c (handle_qxfer): Preserve error message if -3 is
3755 returned.
3756 (qxfer): Document the -3 return value.
3757
7c97f91e
MM
37582013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3759
3760 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3761 (linux_btrace_h): New variable.
3762 (linux-btrace.o): New rule.
3763
be9a119c 37642013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3765 Hafiz Abid Qadeer <abidh@codesourcery.com>
3766
3767 * tracepoint.c (trace_buffer_size): New global.
3768 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3769 (init_trace_buffer): Change to one-argument function. Allocate
3770 trace buffer memory.
3771 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3772 handle QTBuffer:size packet.
3773 (cmd_bigqtbuffer_size): New function.
3774 (initialize_tracepoint): Call init_trace_buffer with
3775 DEFAULT_TRACE_BUFFER_SIZE.
3776 * server.c (handle_query): Add QTBuffer:size in the
3777 supported packets.
3778
e64f7499
YQ
37792013-03-07 Yao Qi <yao@codesourcery.com>
3780
3781 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3782 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3783 of -1.
3784 (cmd_qtsp): Adjust condition. Do post increment.
3785 Set cur_action and cur_step_action back to 0.
3786
f0ae6fc3
PA
37872013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3788
3789 PR server/15236
3790 * linux-low.c (linux_write_memory): Return early success if LEN is
3791 zero.
3792
b5b0b0af
CV
37932013-03-05 Corinna Vinschen <vinschen@redhat.de>
3794
334ad4a8 3795 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3796
589bc927
TT
37972013-02-28 Tom Tromey <tromey@redhat.com>
3798
3799 * configure.ac: Invoke AC_SYS_LARGEFILE.
3800 * configure, config.in: Rebuild.
3801
dfe07582
CV
38022013-02-28 Corinna Vinschen <vinschen@redhat.com>
3803
3804 * win32-low.c: Throughout, fix format strings and casts of
3805 printf-like functions to avoid type related warnings on all
3806 platforms.
3807 (get_child_debug_event): Print dwDebugEventCode as hex since
3808 that's how it's usually documented.
3809
736cd585
YQ
38102013-02-28 Yao Qi <yao@codesourcery.com>
3811
3812 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3813 pulongest.
3814
e1f58301
JW
38152013-02-27 Jiong Wang <jiwang@tilera.com>
3816
3817 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3818 (reg-tilegx32.c): New rule.
3819 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3820 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3821 different register info initializer according to elf class.
3822 (init_registers_tilgx32): New function. The tilegx32 register info
3823 initializer.
3824 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3825 (tile_store_gregset): Likewise.
3826
d171ca78
YQ
38272013-02-27 Yao Qi <yao@codesourcery.com>
3828
3829 * server.c (process_point_options): Print debug message when
3830 debug_threads is true.
3831
282bbdf3
YQ
38322013-02-26 Yao Qi <yao@codesourcery.com>
3833
3834 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3835
aca22551
PA
38362013-02-19 Pedro Alves <palves@redhat.com>
3837 Kai Tietz <ktietz@redhat.com>
3838
3839 PR gdb/15161
3840
3841 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3842 instead of strtoul to extract address from packet.
3843 (process_serial_event) <'z'>: Likewise.
3844
4f3cee1c
YQ
38452013-02-18 Yao Qi <yao@codesourcery.com>
3846
3847 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3848
8e1d55a3
PA
38492013-02-14 Pedro Alves <palves@redhat.com>
3850
3851 Plug memory leak.
3852
3853 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3854 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3855
458820da
PA
38562013-02-14 Pedro Alves <palves@redhat.com>
3857
3858 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3859
baea0dae
PA
38602013-02-14 Pedro Alves <palves@redhat.com>
3861
3862 * tracepoint.c (save_string): Delete.
3863 (add_tracepoint_action): Use savestring instead of save_string.
3864
0b1afbb3
PA
38652013-02-12 Pedro Alves <palves@redhat.com>
3866
3867 * linux-xtensa-low.c: Ditto.
3868 * xtensa-xtregs.c: Ditto.
3869
8a4ac37e
PA
38702013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3871
3872 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3873 thread_db.
3874
148de6bb
MS
38752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3876
3877 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3878 aarch64_num_wp_regs and aarch64_num_bp_regs to
3879 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3880
55fac6e0
MS
38812013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3882
3883 * linux-aarch64-low.c (ps_get_thread_area): Replace
3884 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3885
176eb98c
MS
38862013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3887 Marcus Shawcroft <marcus.shawcroft@arm.com>
3888 Nigel Stephens <nigel.stephens@arm.com>
3889 Yufeng Zhang <yufeng.zhang@arm.com>
3890
3891 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3892 (aarch64.c, aarch64-without-fpu.c): New targets.
3893 * configure.srv (aarch64*-*-linux*): New.
3894 * linux-aarch64-low.c: New file.
3895
56f7af9c
MS
38962013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3897
43aaf8b6 3898 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3899 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3900 (dequeue_one_deferred_signal, linux_resume_one_thread)
3901 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3902 (linux_tracefork_grandchild, linux_test_for_tracefork)
3903 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3904 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3905 where the argument is 0.
3906
60f662b0
YQ
39072013-01-25 Yao Qi <yao@codesourcery.com>
3908
3909 * event-loop.c: Include "queue.h".
3910 (gdb_event_p): New typedef.
3911 (struct gdb_event) <next_event>: Remove.
3912 (event_queue): Change to QUEUE(gdb_event_p).
3913 (async_queue_event): Remove.
3914 (gdb_event_xfree): New.
3915 (initialize_event_loop): New.
3916 (process_event): Use API from QUEUE.
3917 (wait_for_event): Likewise.
3918 * server.c (main): Call initialize_event_loop.
3919 * server.h (initialize_event_loop): Declare.
3920
5ae4861a
YQ
39212013-01-18 Yao Qi <yao@codesourcery.com>
3922
3923 * ax.h (struct eval_agent_expr_context): New.
3924 (gdb_eval_agent_expr): Update declaration.
3925 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3926 TFRAME. Add new argument CTX.
3927 * server.h (struct eval_agent_expr_context): Declare.
3928 (agent_mem_read, agent_tsv_read): Update declaration.
3929 (agent_mem_read_string): Likewise.
3930 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3931 (add_traceframe_block): Add new argument TPOINT.
3932 Increase TPOINT->traceframe_usage.
3933 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3934 eval_tracepoint_agent_expr.
3935 (condition_true_at_tracepoint): Likewise.
3936 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3937 (agent_mem_read_string, agent_tsv_read): Likewise.
3938
85e00e85
YQ
39392013-01-16 Yao Qi <yao@codesourcery.com>
3940
3941 * linux-low.c (linux_resume_one_lwp): Don't check
3942 'lwp->bp_reinsert != 0'.
3943
4039cf45
JB
39442013-01-07 Joel Brobecker <brobecker@adacore.com>
3945 Pedro Alves <palves@redhat.com>
3946
3947 * lynx-low.c (ptrace_request_to_str): Define a temporary
3948 macro and use it to simplify this function's implementation.
3949
9044dee2
JB
39502013-01-07 Joel Brobecker <brobecker@adacore.com>
3951
3952 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3953 sets errno.
3954
e6352c8f
JB
39552013-01-07 Joel Brobecker <brobecker@adacore.com>
3956
3957 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3958
50681a27
JB
39592013-01-07 Joel Brobecker <brobecker@adacore.com>
3960
3961 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3962
3f6e77ef
JB
39632013-01-07 Joel Brobecker <brobecker@adacore.com>
3964
3965 * lynx-low.c (lynx_resume): Use the resume_info parameter
3966 to determine the ptid for the lynx_ptrace call, unless
3967 it is equal to minus_one_ptid, in which case we use the
3968 ptid of the current_inferior.
3969 (lynx_wait_1): After having received a thread create/exit
3970 event, resume the inferior's execution using the signaling
3971 thread's ptid, rather than the old ptid.
3972
7fda33ae
JB
39732013-01-07 Joel Brobecker <brobecker@adacore.com>
3974
3975 * lynx-low.c (lynx_resume): Delete variable ret.
3976
b9786c74
JB
39772013-01-01 Joel Brobecker <brobecker@adacore.com>
3978
3979 * gdbreplay.c (gdbreplay_version): Update copyright year.
3980 * server.c (gdbserver_version): Likewise.
3981
8b93d60f
JB
39822012-12-17 Joel Brobecker <brobecker@adacore.com>
3983
3984 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3985 new thread.
3986
037335a7
JB
39872012-12-17 Joel Brobecker <brobecker@adacore.com>
3988
3989 * lynx-low.c (ptrace_request_to_str): Add handling for
3990 PTRACE_GETTRACESIG.
3991
52d4cbd8
JB
39922012-12-17 Joel Brobecker <brobecker@adacore.com>
3993
3994 * lynx-low.c (lynx_attach): Delete variable new_process.
3995
ab8f6ca9
JB
39962012-12-17 Joel Brobecker <brobecker@adacore.com>
3997
3998 * lynx-low.c (lynx_create_inferior): Delete variable
3999 new_process.
4000
78cbc024
JB
40012012-12-17 Joel Brobecker <brobecker@adacore.com>
4002
4003 * lynx-low.c (ptrace_request_to_str): Do not handle
4004 PTRACE_GETTHREADLIST if this macro does not exist.
4005
14a00470
YQ
40062012-12-15 Yao Qi <yao@codesourcery.com>
4007
4008 * Makefile.in (OBS): Add notif.o.
4009 * notif.c, notif.h: New.
4010 * server.c: Include "notif.h".
4011 (struct vstop_notif) <next>: Remove.
4012 <base>: New field.
4013 (queue_stop_reply): Update.
4014 (push_event, send_next_stop_reply): Remove.
4015 (discard_queued_stop_replies): Update.
4016 (notif_stop): New variable.
4017 (handle_v_stopped): Remove.
4018 (handle_v_requests): Don't call handle_v_stopped. Call
4019 handle_ack_notif instead.
4020 (queue_stop_reply_callback): Call notif_event_enque instead
4021 of queue_stop_reply.
4022 (handle_status): Don't call send_next_stop_reply, call
4023 notif_write_event instead.
4024 (kill_inferior_callback): Likewise.
4025 (detach_or_kill_inferior_callback): Likewise.
4026 (main): Call initialize_notif.
4027 (process_serial_event): Call QUEUE_is_empty.
4028 (handle_target_event): Call notif_push instead of push event.
4029 * server.h (push_event): Remove declaration.
4030
61c125b9
TT
40312012-12-10 Tom Tromey <tromey@redhat.com>
4032
4033 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4034 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4035 macros.
4036 (.c.o): Rewrite.
4037 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4038 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4039 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4040 (amd64-linux-ipa.o, ax.o): Rewrite.
4041 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4042 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4043 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4044 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4045 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4046 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4047 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4048 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4049 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4050 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4051 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4052 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4053 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4054 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4055 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4056 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4057 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4058 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4059 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4060 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4061 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4062 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4063 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4064 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4065 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4066 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4067 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4068 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4069 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4070 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4071 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4072 (reg-tilegx.o): Remove.
4073 (all_object_files): New macro.
4074 Include .deps files.
4075 * aclocal.m4, configure: Rebuild.
4076 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4077 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4078 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4079
e90e9ad9
TT
40802012-12-05 Tom Tromey <tromey@redhat.com>
4081
4082 PR gdb/14917:
4083 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4084
02d403bf 40852012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4086
4087 * configure.ac: Check for linux/perf_event.h.
4088 * config.in: Regenerated.
4089 * configure: Regenerated.
4090
0270a750
PA
40912012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4092
4093 * hostio.c (handle_readlink): Decrease buffer size
4094 parameter passed to readlink by one byte.
4095
8c29b58e
YQ
40962012-11-26 Yao Qi <yao@codesourcery.com>
4097
4098 * configure.ac (build_warnings): Append '-Wempty-body'.
4099 * configure: Regenerated.
4100 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4101 body.
4102
8bdce1ff
PM
41032012-11-15 Pierre Muller <muller@sourceware.org>
4104
4105 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4106 * config.in: Regenerate.
4107 * configure: Regenerate.
4108 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4109 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4110 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4111 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4112 header.
4113 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4114 instead of <sys/wait.h> header.
4115 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4116
02d403bf 41172012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4118
4119 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4120 (various make rules): Remove -DGDBSERVER
4121
fbd5db48
YQ
41222012-11-09 Yao Qi <yao@codesourcery.com>
4123
4124 * spu-low.c (current_ptid): Move it to ..
4125 * gdbthread.h: ... here. New.
4126 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4127 * server.c (myresume, process_serial_event): Likewise.
4128 * thread-db.c (thread_db_find_new_threads): Likewise.
4129 * tracepoint.c (run_inferior_command): Likewise.
4130
b3dc46ff
AB
41312012-10-01 Andrew Burgess <aburgess@broadcom.com>
4132
4133 * server.c (handle_search_memory_1): Include access length in
4134 warning message.
4135
07c04788
HPN
41362012-09-05 Michael Brandt <michael.brandt@axis.com>
4137
4138 * linux-crisv32-low.c: Fix compile errors.
4139
918d227b
YQ
41402012-09-04 Yao Qi <yao@codesourcery.com>
4141
4142 * tracepoint.c (cmd_qtsv): Adjust debug message.
4143 Don't check CUR_TPOINT.
4144
18c1b81a
YQ
41452012-08-28 Yao Qi <yao@codesourcery.com>
4146
4147 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4148 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4149 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4150 Remove declarations of xmalloc, xreallloc, xstrdup and
4151 freeargv.
4152 * Makefile.in (libiberty_h): New.
4153 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4154 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4155
dc82f37b
YQ
41562012-08-23 Yao Qi <yao@codesourcery.com>
4157
4158 * server.h: Remove declaration of 'xsnprintf'.
4159
406b1477
KS
41602012-08-22 Keith Seitz <keiths@redhat.com>
4161
4162 * server.h: Include build-gnulib-gbserver/config.h.
4163 * gdbreplay.c: Likewise.
4164
e6712ff1
DE
41652012-08-08 Doug Evans <dje@google.com>
4166
4167 * Makefile.in (SFILES): Add gdb_vecs.c.
4168 (OBS): Add gdb_vecs.o.
4169 (gdb_vecs_h, host_defs_h): New variables.
4170 (thread-db.o): Add $(gdb_vecs_h) dependency.
4171 (gdb_vecs.o): New rule.
4172 * thread-db.c: #include "gdb_vecs.h".
4173 (thread_db_load_search): Use a vector to iterate over path elements.
4174 Handle text appearing after "$pdir".
4175
4176 * configure.ac: Add check for strstr.
4177 * config.in: Regenerate.
4178 * configure: Regenerate.
4179
7c3270ae
UW
41802012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4181
4182 * hostio.c (handle_pread): If pread fails, fall back to attempting
4183 lseek/read.
4184 (handle_pwrite): Likewise for pwrite.
4185
b62e2b27
UW
41862012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4187
4188 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4189 between unsupported TYPE and unimplementable ADDR/LEN combination.
4190 (arm_insert_point): Act on new return value.
4191
78a99e91
PA
41922012-07-31 Pedro Alves <palves@redhat.com>
4193
4194 * server.c (process_point_options): Only skip tokens if we find
4195 one that is unrecognized. Don't treat 'X' specially while
4196 skipping unrecognized tokens.
4197
fcf303ab
UW
41982012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4199
4200 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4201 to 4-byte-align HW breakpoint addresses for Thumb.
4202
7255706c
YQ
42032012-07-27 Yao Qi <yao@codesourcery.com>
4204
4205 PR remote/14161.
4206
4207 * server.h: Declare gdb_agent_about_to_close.
4208 * target.c (kill_inferior): Include "agent.h".
4209 New. Send command 'kill'.
4210 * target.h (kill_inferior): Removed macro.
4211 * tracepoint.c (gdb_agent_about_to_close): New.
4212 (gdb_agent_helper_thread): Handle command 'close'.
4213 Wait endlessly until the inferior stops.
4214 Install gdb_agent_remove_socket to atexit hook.
4215 (agent_socket_name): New static variable.
4216 (gdb_agent_socket_init): Replace local variable 'name' with
4217 'agent_socket_name'.
4218 (gdb_agent_remove_socket): New.
4219
5a3f286f
YQ
42202012-07-27 Yao Qi <yao@codesourcery.com>
4221
4222 * server.c (process_point_options): Stop at 'X' when parsing.
4223
961bd387
ME
42242012-07-19 Michael Eager <eager@eagercon.com>
4225
a261b8f5 4226 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4227 to hw_execute.
4228 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4229 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4230 hardware breakpoint.
4231
aa7c7447
JK
42322012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4233
4234 * gdbserver/linux-low.c (initialize_low): Call
4235 linux_ptrace_init_warnings.
4236
7f216e7c
DE
42372012-07-02 Doug Evans <dje@google.com>
4238
4239 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4240 pointer to int.
4241
d3ce09f5
SS
42422012-07-02 Stan Shebs <stan@codesourcery.com>
4243
4244 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4245 (ax.o): Add it to build rule.
4246 (ax-ipa.o): Ditto.
4247 (OBS): Add format.o.
4248 (IPA_OBS): Add format.o.
4249 * server.c (handle_query): Claim support for breakpoint commands.
4250 (process_point_options): Add command case.
4251 (process_serial_event): Leave running if there are printfs in
4252 effect.
4253 * mem-break.h (any_persistent_commands): Declare.
4254 (add_breakpoint_commands): Declare.
4255 (gdb_no_commands_at_breakpoint): Declare.
4256 (run_breakpoint_commands): Declare.
4257 * mem-break.c (struct point_command_list): New struct.
4258 (struct breakpoint): New field command_list.
4259 (any_persistent_commands): New function.
4260 (add_commands_to_breakpoint): New function.
4261 (add_breakpoint_commands): New function.
4262 (gdb_no_commands_at_breakpoint): New function.
4263 (run_breakpoint_commands): New function.
4264 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4265 locally.
4266 * ax.c: Include format.h.
4267 (ax_printf): New function.
4268 (gdb_eval_agent_expr): Add printf opcode.
4269
2f8f6aed
YQ
42702012-06-13 Yao Qi <yao@codesourcery.com>
4271
4272 * server.c (start_inferior): Remove duplicated writes to fields
4273 'last_resume_kind' and 'last_status' of 'current_inferior'.
4274
0c9070b3
YQ
42752012-06-12 Yao Qi <yao@codesourcery.com>
4276 Pedro Alves <palves@redhat.com>
4277
4278 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4279 comment.
4280 * server.c (handle_v_cont): Extend comment.
4281
c52daf70
YQ
42822012-06-11 Yao Qi <yao@codesourcery.com>
4283
4284 * linux-low.c (linux_attach): Add 'static'.
4285
d38bbb0a
YQ
42862012-06-06 Yao Qi <yao@codesourcery.com>
4287
4288 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4289
89dc0afd
JK
42902012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4291
4292 Fix gcc -flto compilation warning.
4293 * server.c (main): Make variable multi_mode and attach volatile.
4294
75f62ce7
TJB
42952012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4296
4297 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4298 if the platform doesn't know about it.
4299
65f479b6
PA
43002012-05-30 Jeff Kenton <jkenton@tilera.com>
4301
4302 * Makefile.in (SFILES): Add linux-tile-low.c.
4303 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4304 * configure.srv: Handle tilegx-*-linux*.
4305 * linux-tile-low.c: New file.
4306
0c5bf5a9
JK
43072012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4308
4309 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4310
a493e3e2
PA
43112012-05-24 Pedro Alves <palves@redhat.com>
4312
4313 PR gdb/7205
4314
43aaf8b6 4315 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4316
2ea28649
PA
43172012-05-24 Pedro Alves <palves@redhat.com>
4318
4319 PR gdb/7205
4320
4321 Replace target_signal with gdb_signal throughout.
4322
8d409d16
MR
43232012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4324
4325 * linux-low.c (linux_store_registers): Avoid the copying sequence
4326 when no data has been retrieved by ptrace.
4327
23512c01
MGD
43282012-05-22 Will Deacon <will.deacon@arm.com>
4329
4330 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4331 Include asm/ptrace.h.
4332 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4333 already defined.
4334
4934b29e
MR
43352012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4336
4337 * linux-low.c (linux_store_registers): Don't re-retrieve data
4338 with ptrace that has already been obtained from /proc. Always
4339 copy any data retrieved with ptrace to the buffer supplied.
4340
bde24c0a
PA
43412012-05-11 Yao Qi <yao@codesourcery.com>
4342 Pedro Alves <palves@redhat.com>
4343
4344 * linux-low.c (enum stopping_threads_kind): New.
4345 (stopping_threads): Change type to `enum stopping_threads_kind'.
4346 (handle_extended_wait): If stopping and suspending threads, leave
4347 the new_lwp suspended too.
4348 (linux_wait_for_event): Adjust.
4349 (stop_all_lwps): Set `stopping_threads' to
4350 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4351 whether we're suspending threads or just stopping them. Assert no
4352 recursion happens.
4353
623b6bdf
YQ
43542012-04-29 Yao Qi <yao@codesourcery.com>
4355
4356 * server.h: Move some code to ...
4357 * gdbthread.h: ... here. New.
4358 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4359 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4360 (nto-low.o, win32-low.o): Likewise.
4361 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4362 * regcache.c, remote-utils.c, server.c: Likewise.
4363 * target.c, tracepoint.c, win32-low.c: Likewise.
4364
f15f9948
TJB
43652012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4366
4367 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4368 (PTRACE_ARG4_TYPE): Likewise.
4369 (PTRACE_XFER_TYPE): Likewise.
4370 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4371 ptrace to PTRACE_ARG3_TYPE.
4372 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4373 (PTRACE_ARG4_TYPE): Likewise.
4374 (PTRACE_XFER_TYPE): Likewise.
4375 (linux_detach_one_lwp): Cast fourth argument of
4376 ptrace to long then PTRACE_ARG4_TYPE.
4377 (regsets_fetch_inferior_registers): Cast third argument of
4378 ptrace to long then PTRACE_ARG3_TYPE.
4379 (regsets_store_inferior_registers): Likewise.
4380
38ea300a
PA
43812012-04-20 Pedro Alves <palves@redhat.com>
4382
4383 * configure: Regenerate.
4384
c971b7fa
PA
43852012-04-19 Pedro Alves <palves@redhat.com>
4386
43aaf8b6 4387 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4388 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4389 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4390 (all, install-only, uninstall, clean-info, all-lib, clean): No
4391 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4392 (maintainer-clean realclean distclean): Use subdir_do.
4393 (subdir_do): New.
4394 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4395 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4396 * acinclude.m4: Include acx_configure_dir.m4.
4397 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4398 calls. Call AC_PROG_RANLIB. Configure gnulib using
4399 ACX_CONFIGURE_DIR.
4400 (GNULIB): New.
4401 (GNULIB_STDINT_H): Adjust.
4402 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4403 * gdbreplay.c: Include build-gnulib/config.h.
4404 * server.h: Likewise.
4405 * aclocal.m4: Regenerate.
4406 * config.in: Regenerate.
4407 * configure: Regenerate.
c971b7fa 4408
809277f8
PA
44092012-04-19 Pedro Alves <palves@redhat.com>
4410
4411 * Makefile.in (LIBGNU, INCGNU): Adjust.
4412 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4413 (all, install-only, uninstall, clean-info, all-lib, clean)
4414 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4415 * configure.ac: Adjust AC_OUTPUT output.
4416 * aclocal.m4: Regenerate.
4417 * configure: Regenerate.
4418
fd9bb8b8
PA
44192012-04-19 Pedro Alves <palves@redhat.com>
4420
4421 * Makefile.in (generated_files): New.
4422 (server_h): Remove the explicit dependency on config.h, and depend
4423 on $generated_files.
4424
1c298c66
PA
44252012-04-19 Pedro Alves <palves@redhat.com>
4426
4427 * Makefile.in (INCGNU): Add -Ignulib.
4428
57c4b50b
PA
44292012-04-19 Pedro Alves <palves@redhat.com>
4430
4431 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4432 (INCGNU): ... this, and spell out -I here.
4433 (GNULIB_LIB): Rename to ...
4434 (LIBGNU): ... this.
4435 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4436
1030e047
PA
44372012-04-19 Pedro Alves <palves@redhat.com>
4438
4439 * config.in: Regenerate.
4440
447d4319
PA
44412012-04-19 Pedro Alves <palves@redhat.com>
4442
4443 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4444 * server.h (memmem): Remove declaration.
4445 * config.in: Regenerate.
4446 * configure: Regenerate.
4447
aad9eab9
YQ
44482012-04-19 Yao Qi <yao@codesourcery.com>
4449
4450 * Makefile.in (SFILES): Add common/vec.c.
4451 (OBS): Add vec.o.
4452 (vec.o): New rule.
4453
3e10640f
YQ
44542012-04-19 Yao Qi <yao@codesourcery.com>
4455
4456 * remote-utils.c (prepare_resume_reply): Replace with macro
4457 target_core_of_thread.
4458 * server.c (handle_qxfer_threads_proper): Likewise.
4459 * target.h (traget_core_of_thread): New macro.
4460
71622373
PA
44612012-04-18 Pedro Alves <palves@redhat.com>
4462
4463 * aclocal.m4: Regenerate.
4464 * configure: Regenerate.
4465
80d26939
YQ
44662012-04-16 Yao Qi <yao@codesourcery.com>
4467
4468 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4469 duplicated on address.
4470
42476b70
YQ
44712012-04-16 Yao Qi <yao@codesourcery.com>
4472
4473 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4474 (struct tracepoint_action_ops) <send>: New field.
4475 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4476 (agent_expr_send, x_tracepoint_action_send): New.
4477 (l_tracepoint_action_send): New.
4478 (cmd_qtdp): Download and install tracepoint
4479 according to `use_agent'.
4480 (run_inferior_command): Add one more parameter `len'.
4481 Update callers.
4482 (tracepoint_send_agent): New.
4483 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4484
7bc83639
YQ
44852012-04-16 Yao Qi <yao@codesourcery.com>
4486
4487 * tracepoint.c (download_tracepoints): Moved to ...
4488 (cmd_qtstart): ... here.
4489
5f18041e
YQ
44902012-04-14 Yao Qi <yao@codesourcery.com>
4491
4492 * tracepoint.c: Include inttypes.h.
4493 (struct collect_memory_action): Use sized types.
4494 (struct tracepoint): Likewise.
4495 (cmd_qtdp, stop_tracing): Update print specifiers.
4496 (cmd_qtp, response_tracepoint): Likewise.
4497 (collect_data_at_tracepoint): Likewise.
4498 (collect_data_at_step): Likewise.
4499
55a8c076
YQ
45002012-04-14 Yao Qi <yao@codesourcery.com>
4501
4502 Import gnulib module inttypes.
4503 * aclocal.m4, config.in, configure: Regenerated.
4504
dc750257
YQ
45052012-04-14 Yao Qi <yao@codesourcery.com>
4506
4507 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4508 Makefile and config.status at last.
4509
0ab5faf9
YQ
45102012-04-13 Yao Qi <yao@codesourcery.com>
4511
4512 * tracepoint.c: Include stdint.h unconditionally.
4513
18f5fd81
TJB
45142012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4515
4516 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4517 on BFD_HAVE_SYS_PROCFS_TYPE.
4518 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4519 * configure: Regenerate.
4520 * config.in: Likewise.
4521
4d47af5c
L
45222012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4523
4524 * Makefile.in (clean): Also remove x32.c x32-linux.c
4525 x32-avx.c x32-avx-linux.c.
4526 (x32.o): New target.
4527 (x32.c): Likewise.
4528 (x32-linux.o): Likewise.
4529 (x32-linux.c): Likewise.
4530 (x32-avx.o): Likewise.
4531 (x32-avx.c): Likewise.
4532 (x32-avx-linux.o): Likewise.
4533 (x32-avx-linux.c): Likewise.
4534
4535 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4536 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4537 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4538 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4539 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4540 i386/x32-avx-linux.xml.
4541
4542 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4543 (init_registers_x32_avx_linux): Likwise.
4544 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4545 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4546
ecedbe58
PA
45472012-04-13 Pedro Alves <palves@redhat.com>
4548
4549 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4550 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4551 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4552 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4553 the sub-make.
4554
c92b5177
L
45552012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4556
4557 * linux-x86-low.c (compat_x32_clock_t): New.
4558 (compat_x32_siginfo_t): Likewise.
4559 (compat_x32_siginfo_from_siginfo): Likewise.
4560 (siginfo_from_compat_x32_siginfo): Likewise.
4561 (linux_is_elf64): Likewise.
4562 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4563 and siginfo_from_compat_x32_siginfo for x32.
4564 (x86_arch_setup): Set linux_is_elf64.
4565
214d508e
L
45662012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4567
4568 PR gdb/13969
4569 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4570 e_machine field.
4571 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4572 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4573 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4574 compatible with process.
4575
c9a1864a
YQ
45762012-04-12 Yao Qi <yao@codesourcery.com>
4577
4578 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4579 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4580 (install-only, install-info, clean): Handle sub dir gnulib.
4581 (all-lib, am--refresh): New targets.
4582 (memmem.o): Remove target.
4583 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4584 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4585 (AC_REPLACE_FUNCS): Remove memmem.
4586 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4587 (AC_OUTPUT): Generate Makefile in gnulib/.
4588 * aclocal.m4, config.in, configure: Regenerated.
4589
367ba2c2
MR
45902012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4591
4592 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4593
9d236627
PA
45942012-04-05 Pedro Alves <palves@redhat.com>
4595
4596 -Werror=strict-aliasing
4597
4598 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4599 pointer.
4600
111217b3
PA
46012012-04-04 Pedro Alves <palves@redhat.com>
4602
4603 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4604 (sparc_store_gregset_from_stack, sparc_store_gregset)
4605 (sparc_breakpoint_at): Fix formatting.
4606
8365dcf5
TJB
46072012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4608
4609 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4610 are available.
4611 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4612 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4613 * config.in: Regenerate.
4614 * configure: Likewise.
4615
689cc2ae
PA
46162012-03-29 Pedro Alves <palves@redhat.com>
4617
4618 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4619 Correct ptrace arguments.
4620
c14dfd32
PA
46212012-03-28 Pedro Alves <palves@redhat.com>
4622
4623 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4624 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4625 (IA64_FR1_REGNUM): New defines.
4626 (ia64_fetch_register): New.
4627 (the_low_target): Install it.
4628 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4629 field.
4630 * linux-low.c (linux_fetch_registers): Try the
4631 the_low_target.fetch_register hook first.
4632
4633 * linux-arm-low.c (the_low_target): Adjust.
4634 * linux-bfin-low.c (the_low_target): Adjust.
4635 * linux-cris-low.c (the_low_target): Adjust.
4636 * linux-crisv32-low.c (the_low_target): Adjust.
4637 * linux-m32r-low.c (the_low_target): Adjust.
4638 * linux-m68k-low.c (the_low_target): Adjust.
4639 * linux-mips-low.c (the_low_target): Adjust.
4640 * linux-ppc-low.c (the_low_target): Adjust.
4641 * linux-s390-low.c (the_low_target): Adjust.
4642 * linux-sh-low.c (the_low_target): Adjust.
4643 * linux-sparc-low.c (the_low_target): Adjust.
4644 * linux-tic6x-low.c (the_low_target): Adjust.
4645 * linux-x86-low.c (the_low_target): Adjust.
4646 * linux-xtensa-low.c (the_low_target): Adjust.
4647
63c88e13
PA
46482012-03-26 Pedro Alves <palves@redhat.com>
4649
4650 * server.c (handle_qxfer_libraries): Don't bail early if
4651 the_target->qxfer_libraries_svr4 is not NULL.
4652
fb723180
PA
46532012-03-26 Pedro Alves <palves@redhat.com>
4654
4655 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4656
0afae3cf
PA
46572012-03-23 Pedro Alves <palves@redhat.com>
4658
4659 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4660 "library-list-svr4" element's start tag when the the DSO list is
4661 empty.
4662
485f1ee4
PA
46632012-03-23 Pedro Alves <palves@redhat.com>
4664
4665 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4666 a variable whose type size is the same as the inferior's pointer
4667 size.
4668
a5362b9a
TS
46692012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4670
4671 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4672 struct siginfo.
4673 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4674 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4675 * linux-low.h: Include <signal.h>.
4676 (struct siginfo): Remove forward declaration.
4677 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4678 struct siginfo.
4679
d226c142
MF
46802012-03-21 Mike Frysinger <vapier@gentoo.org>
4681
4682 * .gitignore: Ignore more files.
4683
122f36ef
PA
46842012-03-19 Pedro Alves <palves@redhat.com>
4685 Jan Kratochvil <jan.kratochvil@redhat.com>
4686
4687 * server.c (cont_thread, general_thread): Add describing comments.
4688 (start_inferior): Clear `cont_thread'.
4689 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4690 of a process.
4691
fc3e5175
YQ
46922012-03-15 Yao Qi <yao@codesourcery.com>
4693
4694 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4695 handling to ...
4696 (cmd_qtdp): ... here.
4697
8d0d92cd
YQ
46982012-03-15 Yao Qi <yao@codesourcery.com>
4699
4700 * tracepoint.c (struct tracepoint_action_ops): New.
4701 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4702 (m_tracepoint_action_download): New.
4703 (r_tracepoint_action_download): New.
4704 (x_tracepoint_action_download): New.
4705 (l_tracepoint_action_download): New.
4706 (add_tracepoint_action): Install `action->ops' according type.
4707 (download_tracepoint_1): Move code `download' function pointer
4708 of various tracepoint_action_ops.
4709
87b0bb13
JK
47102012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4711
4712 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4713 linux_ptrace_attach_warnings.
4714
5f572dec
JK
47152012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4716
4717 * Makefile.in (linux-ptrace.o): New.
4718 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4719 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4720 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4721 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4722 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4723 of these targets.
4724 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4725
f4647387
YQ
47262012-03-08 Yao Qi <yao@codesourcery.com>
4727 Pedro Alves <palves@redhat.com>
4728
4729 Fix PR server/13392.
4730 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4731 offset of JMP insn.
4732 * tracepoint.c (remove_tracepoint): New.
4733 (cmd_qtdp): Call remove_tracepoint when failed to install.
4734
9b224c5e
PA
47352012-03-07 Pedro Alves <palves@redhat.com>
4736
4737 * linux-low.c (get_detach_signal): New.
4738 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4739 Pass on pending signals to PTRACE_DETACH. Check the result of the
4740 ptrace call.
4741 * server.c (program_signals, program_signals_p): New.
4742 (handle_general_set): Handle QProgramSignals.
4743 * server.h (program_signals, program_signals_p): Declare.
4744
e237a7e2
JK
47452012-03-05 Pedro Alves <palves@redhat.com>
4746 Jan Kratochvil <jan.kratochvil@redhat.com>
4747
4748 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4749 New comment why.
4750
5808517f
YQ
47512012-03-03 Yao Qi <yao@codesourcery.com>
4752
4753 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4754 agent_look_up_symbols.
4755
58b4daa5
YQ
47562012-03-03 Yao Qi <yao@codesourcery.com>
4757
4758 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4759 (linux-x86-low.o): Likewise.
4760 * server.h: Remove in_process_agent_loaded.
4761 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4762 common/agent.c.
4763 Update callers.
4764
8ffcbaaf
YQ
47652012-03-03 Yao Qi <yao@codesourcery.com>
4766
4767 * tracepoint.c (gdb_agent_capability): New global.
4768 (in_process_agent_loaded_ust): Renamed to
4769 `in_process_agent_supports_ust'.
4770 Update callers.
4771 (in_process_agent_supports_ust): Call agent_capability_check.
4772 (clear_installed_tracepoints): Assert that agent supports
4773 agent.
4774
d1feda86
YQ
47752012-03-03 Yao Qi <yao@codesourcery.com>
4776
4777 * linux-low.c (linux_supports_agent): New.
4778 (linux_target_ops): Initialize field `supports_agent' with
4779 linux_supports_agent.
4780 * target.h (struct target_ops) <supports_agent>: New.
4781 (target_supports_agent): New macro.
4782 * server.c (handle_general_set): Handle packet 'QAgent'.
4783 (handle_query): Send `QAgent+'.
4784 * Makefile.in (server.o): Depends on agent.h.
4785
2fa291ac
YQ
47862012-03-03 Yao Qi <yao@codesourcery.com>
4787
4788 * Makefile.in (OBS): Add agent.o.
4789 Add new rule for agent.o.
4790 Track dependence of tracepoint.c on agent.h.
4791 * tracepoint.c (run_inferior_command_1):
4792 (run_inferior_command): Call agent_run_command.
4793 (gdb_ust_connect_sync_socket): Deleted. Move it to
4794 common/agent.c.
4795 (resume_thread, stop_thread): Likewise.
4796 (gdb_ust_socket_init): Renamed to ...
4797 (gdb_agent_socket_init): ... New.
4798 (gdb_ust_thread): Renamed to ...
4799 (gdb_agent_helper_thread): ... New.
4800 (gdb_ust_init): Move some code to ...
4801 (gdb_agent_init): ... here. New.
4802 [HAVE_UST]: Call gdb_ust_init.
4803 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4804 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4805 * config.in, configure: Regenerated.
4806
05044653
PA
48072012-03-02 Pedro Alves <palves@redhat.com>
4808
4809 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4810 * linux-low.c (struct simple_pid_list): New.
4811 (stopped_pids): New a struct simple_pid_list pointer.
4812 (add_to_pid_list, pull_pid_from_list): New.
4813 (handle_extended_wait): Don't assume the first signal new children
4814 report is SIGSTOP. Adjust call to pull_pid_from_list.
4815 (linux_wait_for_lwp): Adjust.
4816
8d00225b
YQ
48172012-03-02 Yao Qi <yao@codesourcery.com>
4818
4819 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4820 debug log.
4821
19560ba5
YQ
48222012-03-02 Yao Qi <yao@codesourcery.com>
4823
4824 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4825 `stop_pc' and `tpoint'. Update caller.
4826
1faeff08
MR
48272012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4828
4829 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4830 * linux-low.c (use_linux_regsets): New macro.
4831 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4832 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4833 (linux_register_in_regsets): New function.
4834 (usr_fetch_inferior_registers): Skip registers covered by
4835 regsets.
4836 (usr_store_inferior_registers): Likewise.
4837 (usr_fetch_inferior_registers): New macro.
4838 (usr_store_inferior_registers): Likewise.
4839 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4840 (linux_store_registers): Likewise.
4841 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4842 prototype.
4843 (init_registers_mips64_dsp_linux): Likewise.
4844 (init_registers_mips_linux): New macro.
4845 (init_registers_mips_dsp_linux): Likewise.
4846 (mips_dsp_num_regs): Likewise.
4847 (DSP_BASE, DSP_CONTROL): New fallback macros.
4848 (mips_base_regs): New macro.
4849 (mips_regmap): Use it. Fix the size.
4850 (mips_dsp_regmap): New variable.
4851 (mips_dsp_regset_bitmap): Likewise.
4852 (mips_arch_setup): New function.
4853 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4854 than mips_regmap.
4855 (mips_cannot_store_register): Likewise.
4856 (the_low_target): Update .arch_setup, .num_regs and .regmap
4857 initializers. Add .regset_bitmap initializer.
4858 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4859 initializer.
4860 * linux-bfin-low.c (the_low_target): Likewise.
4861 * linux-cris-low.c (the_low_target): Likewise.
4862 * linux-crisv32-low.c (the_low_target): Likewise.
4863 * linux-ia64-low.c (the_low_target): Likewise.
4864 * linux-m32r-low.c (the_low_target): Likewise.
4865 * linux-m68k-low.c (the_low_target): Likewise.
4866 * linux-ppc-low.c (the_low_target): Likewise.
4867 * linux-s390-low.c (the_low_target): Likewise.
4868 * linux-sh-low.c (the_low_target): Likewise.
4869 * linux-sparc-low.c (the_low_target): Likewise.
4870 * linux-tic6x-low.c (the_low_target): Likewise.
4871 * linux-x86-low.c (the_low_target): Likewise.
4872 * linux-xtensa-low.c (the_low_target): Likewise.
4873 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4874 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4875 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4876 srv_xmlfiles.
4877 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4878 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4879
c03e6ccc
YQ
48802012-02-29 Yao Qi <yao@codesourcery.com>
4881 Pedro Alves <palves@redhat.com>
4882
4883 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4884 `step_over_finished' is true.
4885
644cebc9
PA
48862012-02-27 Pedro Alves <palves@redhat.com>
4887
4888 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4889 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4890
c14d7ab2
PA
48912012-02-27 Pedro Alves <palves@redhat.com>
4892
4893 PR server/9684
4894 * linux-low.c (pid_is_stopped): New.
4895 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4896
412c89dd
LM
48972012-02-25 Luis Machado <lgustavo@codesourcery.com>
4898
4899 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4900 of conditions.
4901
b745defe
MR
49022012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4903
4904 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4905
9f3a5c85
LM
49062012-02-24 Luis Machado <lgustavo@codesourcery>
4907
4908 * server.c (handle_query): Advertise support for target-side
4909 breakpoint condition evaluation.
4910 (process_point_options): New function.
4911 (process_serial_event): When inserting a breakpoint, check for
4912 a target-side condition that should be evaluated.
4913
4914 * mem-break.c: Include regcache.h and ax.h.
4915 (point_cond_list_t): New data structure.
4916 (breakpoint) <cond_list>: New field.
4917 (find_gdb_breakpoint_at): Make non-static.
4918 (delete_gdb_breakpoint_at): Clear any target-side
4919 conditions.
4920 (clear_gdb_breakpoint_conditions): New function.
4921 (add_condition_to_breakpoint): Likewise.
4922 (add_breakpoint_condition): Likewise.
4923 (gdb_condition_true_at_breakpoint): Likewise.
4924 (gdb_breakpoint_here): Return result directly instead
4925 of going through a local variable.
4926
4927 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4928 (clear_gdb_breakpoint_conditions): Likewise.
4929 (add_breakpoint_condition): Likewise.
4930 (gdb_condition_true_at_breakpoint): Likewise.
4931
4932 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4933 (need_step_over_p): Take target-side breakpoint condition into
4934 consideration.
4935
5e1dc496
LM
49362012-02-24 Luis Machado <lgustavo@codesourcery>
4937
4938 * server.h: Include tracepoint.h.
4939 (agent_mem_read, agent_get_trace_state_variable_value,
4940 agent_set_trace_state_variable_value,
4941 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4942 get_set_tsv_func_addr): New prototypes.
4943
4944 * ax.h: New include file.
4945 * ax.c: New source file.
4946
4947 * tracepoint.c: Include ax.h.
4948 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4949 agent_expr, eval_result_type): Move to ax.h.
4950 (parse_agent_expr): Rename to ...
4951 (gdb_parse_agent_expr): ... this, make it non-static and move
4952 to ax.h.
4953 (unparse_agent_expr) Rename to ...
4954 (gdb_unparse_agent_expr): ... this, make it non-static and move
4955 to ax.h.
4956 (eval_agent_expr): Rename to ...
4957 (eval_tracepoint_agent_expr): ... this.
4958 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4959 forward declarations.
4960 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4961 (agent_get_trace_state_variable_value): New function.
4962 (agent_set_trace_state_variable_value): New function.
4963 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4964 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4965 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4966 (condition_true_at_tracepoint): Likewise.
4967 (parse_agent_expr): Rename to ...
4968 (gdb_parse_agent_expr): ... this and move to ax.c.
4969 (unparse_agent_expr): Rename to ...
4970 (gdb_unparse_agent_expr): ... this and move to ax.c.
4971 (gdb_agent_op_name): Move to ax.c.
4972 (eval_agent_expr): Rename to ...
4973 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4974 and move to ax.c.
4975 (eval_tracepoint_agent_expr): New function.
4976 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4977 non-static.
5e1dc496
LM
4978 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4979 ax.c.
4980 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4981 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4982 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4983 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4984 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4985 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4986 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4987 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4988 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4989 (compile_bytecodes): Remove forward declaration.
4990 (is_goto_target): Move to ax.c.
4991 (compile_bytecodes): Move to ax.c and call
4992 agent_get_trace_state_variable_value (...) and
4993 agent_set_trace_state_variable_value (...).
4994
4995 * Makefile.in: Update ax.c and IPA dependencies.
4996
277e4e52
PA
49972012-02-24 Pedro Alves <palves@redhat.com>
4998
4999 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5000 (cmd_bigqtbuffer_circular): ... this. Only handle
5001 'QTBuffer:circular:'.
5002 (handle_tracepoint_general_set): Adjust.
5003
bf4c19f7
YQ
50042012-02-16 Yao Qi <yao@codesourcery.com>
5005
5006 * inferiors.c: Move code to ...
5007 * dll.c: .... here. New.
5008 * server.h: Declare clear_dlls.
5009 * Makefile.in (SFILES): Add dll.c.
5010 (OBS): Add dll.o
5011 (dll.o): New rule.
5012
d73f2619
YQ
50132012-02-11 Yao Qi <yao@codesourcery.com>
5014
5015 * server.c: (handle_monitor_command): Add a new parameter
5016 `own_buf'.
5017 (handle_query): Update caller.
5018
f8255c2a
JB
50192012-02-09 Joel Brobecker <brobecker@adacore.com>
5020
5021 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5022 * configure, config.in: Regenerate.
5023 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5024 is not defined.
5025
da84f473
PA
50262012-02-02 Pedro Alves <palves@redhat.com>
5027
5028 Try SIGKILL first, then PTRACE_KILL.
5029 * linux-low.c (linux_kill_one_lwp): New.
5030 (linux_kill_one_lwp): Rename to ...
5031 (kill_one_lwp_callback): ... this. Use the new
5032 linux_kill_one_lwp.
5033
e886a173
PA
50342012-02-02 Pedro Alves <palves@redhat.com>
5035
5036 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5037 inferior.
5038
be07f1a2
PA
50392012-01-27 Pedro Alves <palves@redhat.com>
5040
5041 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5042 (elf_64_file_p): Make static.
5043 (linux_pid_exe_is_elf_64_file): New.
5044 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5045 Delete declarations.
5046 (linux_pid_exe_is_elf_64_file): Declare.
5047 * linux-x86-low.c (x86_arch_setup): Use
5048 linux_pid_exe_is_elf_64_file.
5049
d8301ad1
JK
50502012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5051
5052 * linux-low.c (linux_wait_for_event_1): Rename to ...
5053 (linux_wait_for_event): ... here and merge it with former
5054 linux_wait_for_event - new variable wait_ptid, use it.
5055 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5056
01b17894
PA
50572012-01-23 Pedro Alves <palves@redhat.com>
5058
5059 * server.c (main): Avoid yet another case of infinite loop while
5060 detaching/killing after a longjmp.
5061
e825046f
JK
50622012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5063
5064 Code cleanup.
5065 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5066
b9e7b9c3
UW
50672012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5068
5069 * hostio.c (handle_readlink): New function.
5070 (handle_vFile): Call it to handle "vFile:readlink" packets.
5071
901f9912
UW
50722012-01-20 Pedro Alves <palves@redhat.com>
5073 Ulrich Weigand <ulrich.weigand@linaro.org>
5074
5075 * server.c (handle_v_requests): Only support vAttach and vRun to
5076 start multiple processes when in extended protocol mode.
5077
fc1ab1a0
PA
50782012-01-17 Pedro Alves <palves@redhat.com>
5079
5080 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5081 memalign plus mprotect to allocate the scratch buffer.
5082
7d5d4e98
PA
50832012-01-13 Pedro Alves <palves@redhat.com>
5084
5085 * server.c (attach_inferior): Clear `cont_thread'.
5086
f128d5e9
PA
50872012-01-13 Pedro Alves <palves@redhat.com>
5088
5089 * server.c (main): Avoid infinite loop while detaching/killing
5090 after a longjmp.
5091
06db92f0
DE
50922012-01-09 Doug Evans <dje@google.com>
5093
5094 * server.c (start_inferior): Set last_ptid in --wrapper case.
5095
32d92999
YQ
50962012-01-06 Yao Qi <yao@codesourcery.com>
5097
5098 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5099 defined.
5100 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5101
5e0a92a9
YQ
51022012-01-04 Yao Qi <yao@codesourcery.com>
5103
5104 * tracepoint.c (cmd_qtdp): Print debug message
5105 for static tracepoint.
5106
ae639e8c
YQ
51072012-01-04 Yao Qi <yao@codesourcery.com>
5108
5109 * tracepoint.c (trace_vdebug): Differentiate debug message
5110 between gdbserver and IPA.
5111
f72429c5
YQ
51122012-01-03 Yao Qi <yao@codesourcery.com>
5113
5114 * tracepoint.c (tracepoint_was_hit): Don't collect for
5115 static tracepoint.
5116
12c3e59c
JB
51172012-01-02 Joel Brobecker <brobecker@adacore.com>
5118
5119 * terminal.h: Reformat copyright header.
5120
67827812
JB
51212012-01-02 Joel Brobecker <brobecker@adacore.com>
5122
5123 * server.c (gdbserver_version): Update copyright year.
5124 * gdbreplay.c (gdbreplay_version): Likewise.
5125
3e52c33d
JK
51262011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5127
5128 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5129
5130 Revert:
5131 2011-12-18 Hui Zhu <teawater@gmail.com>
5132 * linux-low.c (linux_create_inferior): Save return value to ret.
5133
66f1260e
HZ
51342011-12-18 Hui Zhu <teawater@gmail.com>
5135
5136 * linux-low.c (linux_create_inferior): Save return value to ret.
5137
e77616d7
DE
51382011-12-16 Doug Evans <dje@google.com>
5139
e7b06c57
DE
5140 * linux-low.c (linux_create_inferior): If stdio connection,
5141 redirect stdin from /dev/null, stdout to stderr.
5142 * remote-utils.c (remote_is_stdio): New static global.
5143 (remote_connection_is_stdio): New function.
5144 (remote_prepare): Handle stdio connection.
5145 (remote_open): Ditto.
5146 (remote_close): Don't close stdin for stdio connections.
5147 (read_prim,write_prim): New functions. Replace all calls to
5148 read/write to these.
5149 * server.c (main): Watch for "-" argument. Move call to
5150 remote_prepare before start_inferior.
5151 * server.h (STDIO_CONNECTION_NAME): New macro.
5152 (remote_connection_is_stdio): Declare.
5153
e77616d7
DE
5154 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5155 in debugging output.
5156
82067193
YQ
51572011-12-15 Yao Qi <yao@codesourcery.com>
5158
5159 * tracepoint.c: Include sys/syscall.h.
5160 (gdb_ust_thread): Remove preprocessor conditional.
5161
82bfbe7e
PA
51622011-12-14 Pedro Alves <pedro@codesourcery.com>
5163
5164 * linux-low.c (linux_detach_one_lwp): Call
5165 the_low_target.prepare_to_resume before detaching.
5166
712c6575
YQ
51672011-12-14 Yao Qi <yao@codesourcery.com>
5168
5169 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5170 of write.
5171
d54d1edf
YQ
51722011-12-14 Yao Qi <yao@codesourcery.com>
5173
5174 * i386-low.c (i386_low_stopped_data_address): Initialize local
5175 variable `control'.
5176
6210a125
PA
51772011-12-13 Pedro Alves <pedro@codesourcery.com>
5178
5179 PR remote/13492
5180
5181 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5182 DR_CONTROL unless necessary. Extend comments.
5183 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5184 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5185
2ece8244
YQ
51862011-12-13 Yao Qi <yao@codesourcery.com>
5187
5188 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5189 macros.
5190 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5191
784867a5
JK
51922011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5193
5194 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5195 Print new debug message for such case.
5196
6bf36717
JK
51972011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5198
5199 Fix overlapping memcpy.
5200 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5201 the read_inferior_memory transfer.
5202 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5203 write_inferior_memory transfer.
5204 (set_fast_tracepoint_jump): New variable buf. Use it for the
5205 read_inferior_memory and write_inferior_memory transfers.
5206 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5207 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5208 Use it for the write_inferior_memory transfer.
5209 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5210 buffers.
5211
50275556
MR
52122011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5213
5214 * linux-low.c (fetch_register, store_register): Make code
5215 consistent, fix formatting.
5216
7325beb4
MR
52172011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5218
5219 * linux-low.c (usr_store_inferior_registers): Factor out code
5220 to handle individual registers into...
5221 (store_register): ... this new function.
5222
c642a434
UW
52232011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5224
5225 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5226 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5227 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5228 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5229 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5230 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5231 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5232 (srv_xmlfiles): Add new XML files.
5233
5234 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5235 and <sys/uio.h>.
5236 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5237 (init_registers_s390_linux32v1): Add prototype.
5238 (init_registers_s390_linux32v2): Likewise.
5239 (init_registers_s390_linux64v1): Likewise.
5240 (init_registers_s390_linux64v2): Likewise.
5241 (init_registers_s390x_linux64v1): Likewise.
5242 (init_registers_s390x_linux64v2): Likewise.
5243 (s390_num_regs): Increment to 52.
5244 (s390_regmap): Add orig_r2 register.
5245 (s390_num_regs_3264): Increment to 68.
5246 (s390_regmap_3264): Add orig_r2 register.
5247 (s390_collect_ptrace_register): Handle orig_r2 register.
5248 (s390_supply_ptrace_register): Likewise.
5249 (s390_fill_last_break): New function.
5250 (s390_store_last_break): Likewise.
5251 (s390_fill_system_call): New function.
5252 (s390_store_system_call): Likewise.
5253 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5254 register sets.
5255 (s390_check_regset): New function.
5256 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5257 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5258 Update target_regsets for available register sets.
5259
2268b414
JK
52602011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5261 Jan Kratochvil <jan.kratochvil@redhat.com>
5262
5263 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5264 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5265 New.
5266 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5267 * linux-low.h (struct process_info_private): New member r_debug.
5268 * server.c (handle_qxfer_libraries): Call
5269 the_target->qxfer_libraries_svr4.
5270 (handle_qxfer_libraries_svr4): New function.
5271 (qxfer_packets): New entry "libraries-svr4".
5272 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5273 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5274 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5275 PACKET_qXfer_libraries_svr4.
5276
d6db1fab
UW
52772011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5278
5279 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5280 PSW address/mask between 8-byte and 16-byte formats.
5281 (s390_supply_ptrace_register): Likewise.
5282 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5283 basic addressing mode bit.
5284
242f5f1c
SS
52852011-11-24 Stan Shebs <stan@codesourcery.com>
5286
5287 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5288
f196051f
SS
52892011-11-17 Stan Shebs <stan@codesourcery.com>
5290
5291 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5292 (tracing_start_time): New global.
5293 (tracing_stop_time): New global.
5294 (tracing_user_name): New global.
5295 (tracing_notes): New global.
5296 (tracing_stop_note): New global.
5297 (cmd_qtstart): Set traceframe_usage, start_time.
5298 (stop_tracing): Set stop_time.
5299 (cmd_qtstatus): Report additional status.
5300 (cmd_qtp): New function.
5301 (handle_tracepoint_query): Call it.
5302 (cmd_qtnotes): New function.
5303 (handle_tracepoint_general_set): Call it.
5304 (get_timestamp): Rename from tsv_get_timestamp.
5305
405f8e94
SS
53062011-11-14 Stan Shebs <stan@codesourcery.com>
5307 Kwok Cheung Yeung <kcy@codesourcery.com>
5308
5309 * linux-x86-low.c (small_jump_insn): New.
5310 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5311 trampoline and error message, build a trampoline and issue a small
5312 jump instruction to it.
5313 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5314 trampoline and error message.
5315 (x86_get_min_fast_tracepoint_insn_len): New.
5316 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5317 * linux-low.h (struct linux_target_ops): Add arguments to
5318 install_fast_tracepoint_jump_pad operation, add new operation.
5319 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5320 arguments.
5321 (linux_get_min_fast_tracepoint_insn_len): New function.
5322 (linux_target_op): Add new operation.
5323 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5324 (gdb_trampoline_buffer_end): Ditto.
5325 (gdb_trampoline_buffer_error): Ditto.
5326 (struct ipa_sym_addresses): Add fields for new IPA variables.
5327 (symbol_list): Add entries for new IPA variables.
5328 (struct tracepoint): Add fields to hold the address range of the
5329 trampoline used by the tracepoint.
5330 (trampoline_buffer_head): New static variable.
5331 (trampoline_buffer_tail): Ditto.
5332 (claim_trampoline_space): New function.
5333 (have_fast_tracepoint_trampoline_buffer): New function.
5334 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5335 structure.
5336 (install_fast_tracepoint): Ditto, also add error buffer argument.
5337 (cmd_qtminftpilen): New function.
5338 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5339 (fast_tracepoint_from_trampoline_address): New function.
5340 (fast_tracepoint_collecting): Handle trampoline as part of jump
5341 pad space.
5342 (set_trampoline_buffer_space): New function.
5343 (initialize_tracepoint): Initialize new IPA variables.
5344 * target.h (struct target_ops): Add arguments to
5345 install_fast_tracepoint_jump_pad operation, add new
5346 get_min_fast_tracepoint_insn_len operation.
5347 (target_get_min_fast_tracepoint_insn_len): New.
5348 (install_fast_tracepoint_jump_pad): Add arguments.
5349 * server.h (IPA_BUFSIZ): Define.
5350 * linux-i386-ipa.c: Include extra header files.
5351 (initialize_fast_tracepoint_trampoline_buffer): New function.
5352 (initialize_low_tracepoint): Call it.
5353 * server.h (set_trampoline_buffer_space): Declare.
5354 (claim_trampoline_space): Ditto.
5355 (have_fast_tracepoint_trampoline_buffer): Ditto.
5356
1e4d1764
YQ
53572011-11-14 Yao Qi <yao@codesourcery.com>
5358
5359 * server.c (handle_query): Handle InstallInTrace for qSupported.
5360 * tracepoint.c (add_tracepoint): Sort list.
5361 (install_tracepoint, download_tracepoint): New.
5362 (cmd_qtdp): Call them to install and download tracepoints.
5363 (sort_tracepoints): Removed.
5364 (cmd_qtstart): Update.
5365
5c73ff4e
YQ
53662011-11-14 Yao Qi <yao@codesourcery.com>
5367
5368 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5369 * mem-break.h: Declare.
5370 * tracepoint.c (cmd_qtstart): Move some code to ...
5371 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5372 New.
5373 (download_tracepoints): Move some code to ...
5374 (download_tracepoint_1): ... here. New.
5375
86a30030
YQ
53762011-11-08 Yao Qi <yao@codesourcery.com>
5377
5378 * remote-utils.c (relocate_instruction): A comment fix.
5379
8d26e50c
JB
53802011-11-07 Joel Brobecker <brobecker@adacore.com>
5381
5382 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5383 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5384 dr_status_mirror and dr_control_mirror from debug_reg_state.
5385 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5386 (i386_initial_stuff): Remove use of deleted globals.
5387 (i386_get_thread_context, i386_set_thread_context,
5388 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5389 from debug_reg_state.
5390
a59306a3
YQ
53912011-11-05 Yao Qi <yao@codesourcery.com>
5392
5393 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5394 address as TPOINT's.
5395
3065dfb6
SS
53962011-11-02 Stan Shebs <stan@codesourcery.com>
5397
5398 * tracepoint.c (agent_mem_read_string): New function.
5399 (eval_agent_expr): Call it for tracenz.
5400 * server.c (handle_query): Report support for tracenz.
5401
fd0d8c7c
YQ
54022011-11-02 Yao Qi <yao@codesourcery.com>
5403
5404 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5405
609086b1
YQ
54062011-11-02 Yao Qi <yao@codesourcery.com>
5407
5408 * target.h: Fix a typo in comment.
5409
b9fd1791
PA
54102011-10-31 Pedro Alves <pedro@codesourcery.com>
5411
5412 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5413 clobber the breakpoints' shadows with fast tracepoint jumps.
5414 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5415 * target.c (write_inferior_memory): Also pass MYADDR down to
5416 check_mem_write.
5417
03583c20
UW
54182011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5419
5420 * configure.ac: Check support for personality routine.
5421 * configure: Regenerate.
5422 * config.in: Likewise.
5423 * linux-low.c: Include <sys/personality.h>.
5424 Define ADDR_NO_RANDOMIZE if necessary.
5425 (linux_create_inferior): Disable address space randomization when
5426 forking inferior, if requested.
5427 (linux_supports_disable_randomization): New function.
5428 (linux_target_ops): Install it.
5429 * server.h (disable_randomization): Declare.
5430 * server.c (disable_randomization): New global variable.
5431 (handle_general_set): Handle QDisableRandomization.
5432 (handle_query): Likewise for qSupported.
5433 (main): Support --disable-randomization and --no-disable-randomization
5434 command line arguments.
5435 * target.h (struct target_ops): Add supports_disable_randomization.
5436 (target_supports_disable_randomization): New macro.
5437
723b724b
MF
54382011-09-29 Mike Frysinger <vapier@gentoo.org>
5439
5440 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5441 ifdef check.
5442 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5443 [!PT_GETDSBT] (target_loadmap): New definition.
5444 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5445 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5446 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5447 and PT_GETDSBT to LINUX_LOADMAP.
5448 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5449 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5450
55329a5c 54512011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5452
5453 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5454 (arm_linux_hwbp_cap): New static variable.
5455 (arm_linux_get_hwbp_cap): Replace by ...
5456 (arm_linux_init_hwbp_cap): ... this new function.
5457 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5458 (arm_linux_get_hw_watchpoint_count): Likewise.
5459 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5460 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5461 (arm_prepare_to_resume): Use perror_with_name instead of error.
5462
55329a5c 54632011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5464
5465 * linux-arm-low.c: Include <signal.h>.
5466 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5467 (struct arm_linux_hwbp_cap): New data type.
5468 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5469 (struct arm_linux_hw_breakpoint): New data type.
5470 (MAX_BPTS, MAX_WPTS): Define.
5471 (struct arch_process_info, struct arch_lwp_info): New data types.
5472 (arm_linux_get_hwbp_cap): New function.
5473 (arm_linux_get_hw_breakpoint_count): Likewise.
5474 (arm_linux_get_hw_watchpoint_count): Likewise.
5475 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5476 (arm_hwbp_control_initialize): Likewise.
5477 (arm_hwbp_control_is_enabled): Likewise.
5478 (arm_hwbp_control_is_initialized): Likewise.
5479 (arm_hwbp_control_disable): Likewise.
5480 (arm_linux_hw_breakpoint_equal): Likewise.
5481 (arm_linux_hw_point_initialize): Likewise.
5482 (struct update_registers_data): New data structure.
5483 (update_registers_callback: New function.
5484 (arm_insert_point): Likewise.
5485 (arm_remove_point): Likewise.
5486 (arm_stopped_by_watchpoint): Likewise.
5487 (arm_stopped_data_address): Likewise.
5488 (arm_new_process): Likewise.
5489 (arm_new_thread): Likewise.
5490 (arm_prepare_to_resume): Likewise.
5491 (the_low_target): Register arm_insert_point, arm_remove_point,
5492 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5493 arm_new_thread, and arm_prepare_to_resume.
5494
6b9801d4
SS
54952011-09-15 Stan Shebs <stan@codesourcery.com>
5496
5497 * server.h (struct emit_ops): Add compare-goto fields.
5498 * tracepoint.c (gdb_agent_op_sizes): New table.
5499 (emit_eq_goto): New function.
5500 (emit_ne_goto): New function.
5501 (emit_lt_goto): New function.
5502 (emit_le_goto): New function.
5503 (emit_gt_goto): New function.
5504 (emit_ge_goto): New function.
5505 (is_goto_target): New function.
5506 (compile_bytecodes): Recognize special cases of compare-goto
5507 combinations and call specialized emitters for them.
5508 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5509 (amd64_emit_ne_goto): New function.
5510 (amd64_emit_lt_goto): New function.
5511 (amd64_emit_le_goto): New function.
5512 (amd64_emit_gt_goto): New function.
5513 (amd64_emit_ge_goto): New function.
5514 (amd64_emit_ops): Add the new functions.
5515 (i386_emit_eq_goto): New function.
5516 (i386_emit_ne_goto): New function.
5517 (i386_emit_lt_goto): New function.
5518 (i386_emit_le_goto): New function.
5519 (i386_emit_gt_goto): New function.
5520 (i386_emit_ge_goto): New function.
5521 (i386_emit_ops): Add the new functions.
5522
bf15cbda
SS
55232011-09-08 Stan Shebs <stan@codesourcery.com>
5524
5525 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5526 (i386_emit_epilogue): Restore %ebx.
5527
943ca1dd
JZ
55282011-08-31 Jie Zhang <jzhang918@gmail.com>
5529
5530 * server.c (step_thread): Remove definition.
5531 (process_serial_event): Don't handle Hs.
5532 * server.h (step_thread): Remove declaration.
5533 * target.c (set_desired_inferior): Remove use of step_thread.
5534
e3deef73
LM
55352011-08-24 Luis Machado <lgustavo@codesourcery.com>
5536
5537 * linux-low.c: Include linux-procfs.h.
5538 (linux_attach_lwp_1): Update comments.
5539 (linux_attach): Scan for existing threads when attaching to a
5540 process that is the tgid.
5541 * Makefile.in: Update dependencies.
5542
13da1c97
LM
55432011-08-24 Luis Machado <lgustavo@codesourcery.com>
5544
5545 * configure.srv: Add linux-procfs.o dependencies.
5546
881127c9
YQ
55472011-08-14 Yao Qi <yao@codesourcery.com>
5548
5549 * target.h (struct target_ops): Fix indent.
5550 * win32-low.c (win32_target_ops): Fix comment.
5551
58dbd541
YQ
55522011-08-14 Andrew Jenner <andrew@codesourcery.com>
5553 Yao Qi <yao@codesourcery.com>
5554
5555 * Makefile.in (clean): Remove tic6x-*.c files.
5556 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5557 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5558 (tic6x-c64xp-linux.c): Likewise.
5559 * configure.srv: Add support for tic6x-*-uclinux.
5560 * linux-tic6x-low.c: New.
5561 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5562
78d85199
YQ
55632011-08-14 Andrew Stubbs <ams@codesourcery.com>
5564 Yao Qi <yao@codesourcery.com>
5565
5566 * target.h (struct target_ops): Add read_loadmap.
5567 * linux-low.c (struct target_loadseg): New type.
5568 (struct target_loadmap): New type.
5569 (linux_read_loadmap): New function.
5570 (linux_target_ops): Add linux_read_loadmap.
5571 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5572 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5573 to NULL.
78d85199 5574
a959a88d
EZ
55752011-08-05 Eli Zaretskii <eliz@gnu.org>
5576
5577 * win32-low.c: Include <stdint.h>.
5578
1ced966e
PA
55792011-07-22 Pedro Alves <pedro@codesourcery.com>
5580
5581 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5582 to the inferior here.
5583 (i386_remove_aligned_watchpoint): Ditto.
5584 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5585 fit part of the watchpoint in the debug registers.
5586 (i386_update_inferior_debug_regs): New.
5587 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5588 registers, and only update the inferior on success.
5589 (i386_low_remove_watchpoint): Ditto.
5590
d26e3629
KY
55912011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5592
5593 * linux-low.c (compare_ints, unique, list_threads, show_process,
5594 linux_core_of_thread): Delete.
5595 (linux_target_ops): Change linux_core_of_thread to
5596 linux_common_core_of_thread.
5597 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5598 * utils.c (malloc_failure): Change type of argument.
5599 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5600 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5601 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5602 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5603 (IPA_OBJS): Add common-utils-ipa.o.
5604 (ptid_h, linux_osdata_h): New macros.
5605 (server_h): Add common/common-utils.h, common/xml-utils.h,
5606 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5607 common/ptid.h.
5608 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5609 ptid.o, buffer.o): New rules.
5610 (linux-low.o): Add common/linux-osdata.h as a dependency.
5611 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5612 * configure.ac: Add AC_HEADER_DIRENT check.
5613 * config.in: Regenerate.
5614 * configure: Regenerate.
5615 * remote-utils.c (xml_escape_text): Delete.
5616 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5617 buffer_xml_printf): Move to common/buffer.c.
5618 * server.c (main): Remove call to initialize_inferiors.
5619 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5620 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5621 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5622 internal_error, gdb_assert, gdb_assert_fail): Delete.
5623 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5624 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5625 common/buffer.h.
5626 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5627 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5628 initialize_inferiors): Delete.
5629
2275a1a7
PA
56302011-07-20 Pedro Alves <pedro@codesourcery.com>
5631
5632 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5633 symbol error.
5634
0a5b1e09
PA
56352011-05-31 Pedro Alves <pedro@codesourcery.com>
5636
5637 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5638 assertion.
5639 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5640
6938fd34
YQ
56412011-05-26 Yao Qi <yao@codesourcery.com>
5642
5643 * Makefile.in (thread-db.o): Track dependence to
5644 common/gdb_thread_db.h.
5645 * thread-db.c: include gdb_thread_db.h from right place.
5646
b481f9e0
TT
56472011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5648
5649 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5650 __FILE__ and __LINE__ to internal_error.
5651
98a5dd13
DE
56522011-05-13 Doug Evans <dje@google.com>
5653
5654 * thread-db.c (try_thread_db_load_from_sdir): New function.
5655 (try_thread_db_load_from_dir): New function.
5656 (thread_db_load_search): Handle $sdir, ignore $pdir.
5657 Remove trying of system directories if search of
5658 libthread-db-search-path fails, that is now done via $sdir.
5659
d248b706
KY
56602011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5661
5662 * server.c (handle_query): Add EnableDisableTracepoints to the list
5663 of supported features.
43aaf8b6 5664 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5665 tracepoints.
43aaf8b6
PA
5666 (cmd_qtenable_disable): New.
5667 (cmd_qtstart): Install tracepoints even if disabled.
5668 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5669 receiving a QTEnable or QTDisable packet.
5670 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5671 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5672 tracepoints.
5673 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5674
84e578fb
DE
56752011-05-10 Doug Evans <dje@google.com>
5676
5677 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5678
71f55dd8
DE
56792011-05-04 Doug Evans <dje@google.com>
5680
5681 * linux-low.c (linux_join): Skip process lookup.
5682 * spu-low.c (spu_join): Ditto.
5683 * server.c (join_inferiors_callback): Delete.
5684 (process_serial_event): For 'D' packet (detach) call join_inferior
5685 directly.
5686
4d393d60
JM
56872011-05-04 Joseph Myers <joseph@codesourcery.com>
5688
5689 * README: Don't mention xscale*-*-linux*.
5690 * configure.srv (xscale*-*-linux*): Don't handle target.
5691
b00ad6ff
NF
56922011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5693
5694 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5695 casting pointers.
5696 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5697 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5698 (i386_emit_void_call_2): Likewise.
5699
af96c192
YQ
57002011-04-26 Yao Qi <yao@codesourcery.com>
5701
43aaf8b6
PA
5702 * linux-low.c: Move common macros to linux-ptrace.h.
5703 Include linux-ptrace.h.
af96c192
YQ
5704 * Makefile.in (linux_ptrace_h): New.
5705 (linux-low.o): Depends on linux-ptrace.h.
5706
03f2bd59
JK
57072011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5708
5709 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5710 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5711 (remote_prepare): New function with most of the TCP code from ...
5712 (remote_open): ... here. Detect PORT here unconditionally. Move also
5713 setting transport_is_reliable.
5714 * server.c (run_once): New variable.
5715 (gdbserver_usage): Document it.
5716 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5717 the first run if RUN_ONCE.
5718 * server.h (run_once, remote_prepare): New declarations.
5719
7a9dd1b2
TT
57202011-04-19 Tom Tromey <tromey@redhat.com>
5721
5722 * win32-low.c (handle_load_dll): Remove duplicate "the".
5723
81239425
PM
57242011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5725
5726 Remove support for old Cygwin 1.5 versions.
5727 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5728 function to avoid warning.
5729 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5730 warning.
5731
9e0627f1
PM
57322011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5733
5734 * gdbserver/server.h (Macro _): Define it if not available.
5735
588eebee
MS
57362011-03-14 Michael Snyder <msnyder@vmware.com>
5737
348af9f7 5738 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5739
43f70d4c
JB
57402011-03-10 Joel Brobecker <brobecker@adacore.com>
5741
5742 * Makefile.in (maintainer-clean realclean distclean): Remove
5743 "make ... subdir_do" command.
5744
348af9f7
MS
57452011-03-10 Michael Snyder <msnyder@vmware.com>
5746
5747 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5748
5749 * server.c (handle_v_run): Free alloced buffer on early return.
5750
e637a4f5
YQ
57512011-03-09 Yao Qi <yao@codesourcery.com>
5752
5753 Revert:
5754 2011-03-04 Yao Qi <yao@codesourcery.com>
5755
5756 * Makefile.in: Remove GNU make feature --directory.
5757
5758 2011-03-05 Yao Qi <yao@codesourcery.com>
5759
5760 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5761 (subdir_do): New make target. Copied from gdb/Makefile.
5762 (maintainer-clean, realclean, distclean, clean): Call corresponding
5763 make targets in common/Makefile.
5764
5765 2011-02-11 Yao Qi <yao@codesourcery.com>
5766
5767 * configure.ac: Call AC_PROG_RANLIB.
5768 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5769 * configure: Regenerate.
5770
e6edda56
JK
57712011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5772
5773 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5774
e5141119
JB
57752011-03-06 Yao Qi <yao@codesourcery.com>
5776
5777 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5778
64794aa4
JB
57792011-03-05 Yao Qi <yao@codesourcery.com>
5780
5781 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5782 (subdir_do): New make target. Copied from gdb/Makefile.
5783 (maintainer-clean, realclean, distclean, clean): Call corresponding
5784 make targets in common/Makefile.
5785
7a762829
YQ
57862011-03-04 Yao Qi <yao@codesourcery.com>
5787
5788 * Makefile.in: Remove GNU make feature --directory.
5789
348af9f7
MS
57902011-03-04 Michael Snyder <msnyder@vmware.com>
5791
5792 * server.c (queue_stop_reply): Call xmalloc not malloc.
5793
57942011-03-02 Michael Snyder <msnyder@vmware.com>
5795
5796 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5797
9f72fee2
MS
57982011-02-28 Michael Snyder <msnyder@vmware.com>
5799
588eebee
MS
5800 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5801 (cmd_qtframe): Ditto.
5802 (cmd_qtbuffer): Ditto.
5803 (cmd_bigqtbuffer): Ditto.
5804
9f72fee2
MS
5805 * utils.c (decimal2str): Initialize 'width' to nine, then
5806 don't mess with it.
5807
8040bd49
UW
58082011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5809
5810 * hostio.c (require_data): Free *data, not data.
5811
7e52cbd0
JK
58122011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5813
5814 * hostio.c (require_data): Use free, not xfree.
5815
9130f83e
MS
58162011-02-27 Michael Snyder <msnyder@vmware.com>
5817
4b812f4e
MS
5818 * server.c (handle_query): Discard unused value.
5819
9130f83e
MS
5820 * hostio.c (require_data): Free malloc memory before returning
5821 error.
5822
69d37113
MS
58232011-02-26 Michael Snyder <msnyder@vmware.com>
5824
5825 * linux-low.c (list_threads): Call closedir for dirent.
5826
35f5825a
MS
58272011-02-27 Michael Snyder <msnyder@vmware.com>
5828
2a589cef
MS
5829 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5830 a case statement falls through.
5831
0adea5f7
MS
5832 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5833
35f5825a
MS
5834 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5835 in comparison.
5836
238f1c74
MS
58372011-02-26 Michael Snyder <msnyder@vmware.com>
5838
5839 * utils.c (decimal2str): Eliminate dead code and dead param.
5840 (pulongest): Drop dead param from call to decimal2str.
5841 (plongest): Ditto.
5842
633ff500
JB
58432011-02-24 Joel Brobecker <brobecker@adacore.com>
5844
5845 Revert the following patch (not approved yet):
5846 2011-02-21 Hui Zhu <teawater@gmail.com>
5847 * tracepoint.c (tp_printf): New function.
5848 (eval_agent_expr): Handle gdb_agent_op_printf.
5849
f9c6ff72
HZ
58502011-02-21 Hui Zhu <teawater@gmail.com>
5851
5852 * tracepoint.c (tp_printf): New function.
5853 (eval_agent_expr): Handle gdb_agent_op_printf.
5854
94d5e490
TT
58552011-02-18 Tom Tromey <tromey@redhat.com>
5856
5857 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5858 (tracepoint.o): Likewise.
5859 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5860 (gdb_agent_op_names): Likewise.
5861
c7f96d2b
TT
58622011-02-18 Tom Tromey <tromey@redhat.com>
5863
5864 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5865 gdb_agent_op_rot>: New constants.
5866 (gdb_agent_op_names): Add pick and roll.
5867 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5868 cases.
5869
0feedb2c
JK
58702011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5871
5872 * aclocal.m4: Regenerated with aclocal-1.11.1.
5873
b3b9301e
PA
58742011-02-14 Pedro Alves <pedro@codesourcery.com>
5875
5876 * server.c (handle_qxfer_traceframe_info): New.
5877 (qxfer_packets): Register "traceframe-info".
5878 (handle_query): Report support for qXfer:traceframe-info:read+.
5879 * tracepoint.c (match_blocktype): New.
5880 (traceframe_find_block_type): Rename to ...
5881 (traceframe_walk_blocks): ... this. Add callback filter argument,
5882 and use it.
5883 (traceframe_find_block_type): New, reimplemented on top of
5884 traceframe_walk_blocks.
5885 (build_traceframe_info_xml): New.
5886 (traceframe_read_info): New.
5887 * server.h (traceframe_read_info): Declare.
5888
4f3e6fb7
YQ
58892011-02-11 Yao Qi <yao@codesourcery.com>
5890
5891 * configure.ac: Call AC_PROG_RANLIB.
5892 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5893 * configure: Regenerate.
5894
764880b7
PA
58952011-02-07 Pedro Alves <pedro@codesourcery.com>
5896
5897 * server.c (gdb_read_memory): Change return semantics to allow
5898 partial transfers.
5899 (handle_search_memory_1): Adjust.
5900 (process_serial_event) <'m' packet>: Handle partial transfers.
5901 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5902
1c79eb8a
PA
59032011-01-28 Pedro Alves <pedro@codesourcery.com>
5904
5905 * regcache.c (init_register_cache): Initialize
5906 regcache->register_status.
5907 (free_register_cache): Release regcache->register_status.
5908 (regcache_cpy): Copy register_status.
5909 (registers_to_string): Print 'x's for unavailable registers.
5910 (supply_register): Mark the register's status valid or
5911 unavailable, depending on whether a buffer was passed in or not.
5912 (supply_register_zeroed): New.
5913 (supply_regblock): Mark the registers' status valid or
5914 unavailable, depending on whether a buffer was passed in or not.
5915 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5916 (struct regcache): New `register_status' field.
5917 (supply_register_zeroed): Declare.
5918 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5919 supply_register_zeroed, rather than passing a NULL buffer to
5920 supply_register.
5921 * tracepoint.c (fetch_traceframe_registers): Update comment.
5922
85724a0e
PA
59232011-01-28 Pedro Alves <pedro@codesourcery.com>
5924
5925 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5926 buffer explicit.
5927
d08aafef
PA
59282011-01-25 Pedro Alves <pedro@codesourcery.com>
5929
5930 * server.h (decode_xfer_write): Change prototype.
5931 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5932 and don't extract the annex here.
5933 * server.c (decode_xfer_read): Remove `annex' parameter,
5934 and don't extract the annex here.
5935 (decode_xfer): New.
5936 (struct qxfer): New.
5937 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5938 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5939 (handle_qxfer_statictrace): New functions, abstracted out from
5940 handle_query, and made to use the struct qxfer interface.
5941 (handle_threads_qxfer_proper): Rename to ...
5942 (handle_qxfer_threads_proper): ... this.
5943 (handle_threads_qxfer): Rename to ...
5944 (handle_qxfer_threads): ... this. Adjust.
5945 (qxfer_packets): New array.
5946 (handle_qxfer): New function.
5947 (handle_query): Use handle_qxfer.
5948
493e2a69
MS
59492011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5950
5951 * gdbreplay.c: Shorten lines of >= 80 columns.
5952 * linux-low.c: Ditto.
5953 * linux-ppc-low.c: Ditto.
5954 * linux-s390-low.c: Ditto.
5955 * linux-sparc-low.c: Ditto.
5956 * linux-x86-low.c: Ditto.
5957 * linux-xtensa-low.c: Ditto.
5958 * mem-break.c: Ditto.
5959 * nto-low.c: Ditto.
5960 * regcache.h: Ditto.
5961 * remote-utils.c: Ditto.
5962 * server.c: Ditto.
5963 * server.h: Ditto.
5964 * thread-db.c: Ditto.
5965 * tracepoint.c: Ditto.
5966 * utils.c: Ditto.
5967 * win32-low.h: Ditto.
5968
44944448
JB
59692011-01-05 Joel Brobecker <brobecker@adacore.com>
5970
5971 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5972 update.
5973
71ce852c
JB
59742011-01-01 Joel Brobecker <brobecker@adacore.com>
5975
5976 * server.c (gdbserver_version): Update copyright year in version
5977 output.
5978 * gdbreplay.c (gdbreplay_version): Ditto.
5979
eb826dc6
MF
59802010-12-29 Jie Zhang <jie.zhang@analog.com>
5981
5982 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5983 * linux-bfin-low.c: New file.
5984 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5985 PT_DATA_ADDR for BFIN targets.
5986 * Makefile.in (SFILES): Add linux-bfin-low.c.
5987 (clean): Remove reg-bfin.c.
5988 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5989 * README: Mention supported Blackfin targets.
5990
39ab222a
MF
59912010-12-23 Mike Frysinger <vapier@gentoo.org>
5992
5993 * .gitignore: New file.
5994
a1f2ce7d
MF
59952010-11-16 Mike Frysinger <vapier@gentoo.org>
5996
5997 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5998
f474844c
JZ
59992010-10-22 Jie Zhang <jie@codesourcery.com>
6000
6001 * Makefile.in: Add FLAGS_TO_PASS variable.
6002 (install): Remove dependency of install-only and recursively
6003 invoke make for install-only.
6004
f1048712
DE
60052010-10-04 Doug Evans <dje@google.com>
6006
6007 * Makefile.in (uninstall): Use $(DESTDIR).
6008
b53a1623
PA
60092010-09-24 Pedro Alves <pedro@codesourcery.com>
6010
e6ee044d
PA
6011 PR gdb/11842
6012
b53a1623
PA
6013 * linux-x86-low.c (compat_siginfo_from_siginfo)
6014 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6015 si_code is < 0. Check for si_code == SI_TIMER before checking for
6016 si_code < 0.
6017
fa1bd1e4
JB
60182010-09-13 Joel Brobecker <brobecker@adacore.com>
6019
6020 * lynx-i386-low.c: New file.
6021 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6022
47fac8f8
JB
60232010-09-13 Joel Brobecker <brobecker@adacore.com>
6024
6025 * lynx-low.c (ptrace_request_to_str): Remove handling for
6026 request values that have been removed in LynxOS 5.x.
6027
1adfc54d
JB
60282010-09-13 Joel Brobecker <brobecker@adacore.com>
6029
6030 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6031 <ptrace.h>
6032
c2a66c29
NS
60332010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6034
6035 * configure.ac: Add --enable-inprocess-agent option.
6036 * configure: Rebuilt.
6037
32fcada3
YQ
60382010-09-06 Yao Qi <yao@codesourcery.com>
6039
6040 * linux-low.c (linux_kill): Remove unused variable.
6041 (linux_stabilize_threads): Likewise.
6042 * server.c (start_inferior): Likewise.
6043 (queue_stop_reply_callback): Likewise.
6044 * tracepoint.c (do_action_at_tracepoint): Likewise.
6045
0cccb683
YQ
60462010-09-06 Yao Qi <yao@codesourcery.com>
6047
6048 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6049 on return.
6050
423ec54c
JK
60512010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6052
6053 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6054
12ac6819
PA
60552010-09-06 Pedro Alves <pedro@codesourcery.com>
6056
6057 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6058 "$(IPA_DEPFILES)".
6059
8ed54b31
JB
60602010-09-01 Joel Brobecker <brobecker@adacore.com>
6061
6062 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6063 gdbserver/lynx-ppc-low.c: New files.
6064 * Makefile.in (lynx_low_h): New variable.
6065 (lynx-low.o, lynx-ppc-low.o): New rules.
6066 * configure.ac: On LynxOS, link with -lnetinet.
6067 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6068 * configure: regenerate.
6069
bb0116a4
JB
60702010-09-01 Joel Brobecker <brobecker@adacore.com>
6071
6072 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6073 * configure.ac: Add check for vasprintf and vsnprintf.
6074 * configure, config.in: Regenerate.
6075 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6076
a778ab81 60772010-09-01 Joel Brobecker <brobecker@adacore.com>
6078
6079 * gdbreplay.c: Move include of alloca.h up, next to include of
6080 malloc.h.
6081 * server.h: Add include of malloc.h.
6082 * mem-break.c: Remove include of malloc.h.
6083 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6084
8b034a19 60852010-09-01 Joel Brobecker <brobecker@adacore.com>
6086
6087 * Makefile.in (memmem.o): Build with -Wno-error.
6088
60892010-09-01 Joel Brobecker <brobecker@adacore.com>
6090
6091 * utils.c (xsnprintf): Make non-static.
6092 * server.h: Add xsnprintf declaration.
6093 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6094 replace calls to snprintf by calls to xsnprintf throughout.
6095
60962010-09-01 Joel Brobecker <brobecker@adacore.com>
6097
6098 * configure.ac: Add configure check for alloca.
6099 * configure, config.in: Regenerate.
6100 * server.h: Include alloca.h if it exists.
6101 * gdbreplay.c: Include alloca.h if it exists.
6102
1a981360
PA
61032010-08-28 Pedro Alves <pedro@codesourcery.com>
6104
6105 * linux-low.c (__SIGRTMIN): Define if not already defined.
6106 (linux_create_inferior): Check for __ANDROID__ rather than
6107 __SIGRTMIN.
6108 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6109 are already deferred.
6110 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6111 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6112 stopped and already has a pending signal to report.
6113 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6114 a pending signal to report or is moving out of a jump pad.
6115 (linux_init_signals): Check for __ANDROID__ rather than
6116 __SIGRTMIN.
6117
b4d51a55
PA
61182010-08-28 Pedro Alves <pedro@codesourcery.com>
6119
6120 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6121 debug_threads check. Avoid a linear search when not doing debug
6122 output.
6123
ec48365d
PA
61242010-08-27 Pedro Alves <pedro@codesourcery.com>
6125
6126 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6127 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6128 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6129 (process_event): Change local fd's type to gdb_fildes_t.
6130 (create_file_handler): Adjust prototype.
6131 (delete_file_handler): Adjust prototype.
6132 (handle_file_event): Adjust prototype. Use pfildes.
6133 (create_file_event): Adjsut prototype.
6134 * remote-utils.c (remote_desc, listen_desc): Change type to
6135 gdb_fildes_t.
6136 * server.h: New gdb_fildes_t typedef.
6137 [USE_WIN32API]: Include winsock2.h.
6138 (delete_file_handler, add_file_handler): Adjust prototypes.
6139 (pfildes): Declare.
6140 * utils.c (pfildes): New.
6141
854d88f0
PA
61422010-08-27 Pedro Alves <pedro@codesourcery.com>
6143
6144 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6145 * configure: Regenerate.
6146
0146f85b
PA
61472010-08-27 Pedro Alves <pedro@codesourcery.com>
6148
6149 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6150 (linux_done_accessing_memory): ... this.
6151 (linux_target_ops): Adjust.
6152 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6153 * nto-low.c (nto_target_ops): Adjust comment.
6154 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6155 * spu-low.c (spu_target_ops): Adjust comment.
6156 * target.h (target_ops): Rename unprepare_to_access_memory field
6157 to done_accessing_memory.
6158 (unprepare_to_access_memory): Rename to ...
6159 (done_accessing_memory): ... this.
6160
90d74c30
PA
61612010-08-26 Pedro Alves <pedro@codesourcery.com>
6162
6163 * linux-low.c (linux_prepare_to_access_memory): New.
6164 (linux_unprepare_to_access_memory): New.
6165 (linux_target_ops): Install them.
6166 * server.c (read_memory): Rename to ...
6167 (gdb_read_memory): ... this. Use
6168 prepare_to_access_memory/prepare_to_access_memory.
6169 (write_memory): Rename to ...
6170 (gdb_write_memory): ... this. Use
6171 prepare_to_access_memory/prepare_to_access_memory.
6172 (handle_search_memory_1): Adjust.
6173 (process_serial_event): Adjust.
6174 * target.h (struct target_ops): New fields
6175 prepare_to_access_memory and unprepare_to_access_memory.
6176 (prepare_to_access_memory, unprepare_to_access_memory): New.
6177 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6178 prepare_to_access_memory/prepare_to_access_memory.
6179 * nto-low.c (nto_target_ops): Adjust.
6180 * spu-low.c (spu_target_ops): Adjust.
6181 * win32-low.c (win32_target_ops): Adjust.
6182
fd467969
PA
61832010-08-26 Pedro Alves <pedro@codesourcery.com>
6184
6185 * Makefile.in (WARN_CFLAGS): Get it from configure.
6186 (WERROR_CFLAGS): New.
6187 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6188 * configure.ac: Introduce --enable-werror, which adds -Werror to
6189 the compiler command line. Enabled by default. Disable with
6190 --disable-werror. Add -Wdeclaration-after-statement
6191 Wpointer-arith and -Wformat-nonliteral to warning flags.
6192 * configure: Regenerate.
6193
331e2f5f
PA
61942010-08-26 Pedro Alves <pedro@codesourcery.com>
6195
6196 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6197
e581f2b4
PA
61982010-08-26 Pedro Alves <pedro@codesourcery.com>
6199
6200 * gdbreplay.c (remote_error): New.
6201 (gdbchar): New.
6202 (expect): Use gdbchar. Check for error reading from GDB.
6203 Clarify sync error output.
6204 (play): Check for errors writing to GDB.
6205 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6206 * remote-utils.c (getpkt): Check for errors writing to the remote
6207 descriptor.
6208
3c11dd79
PA
62092010-08-25 Pedro Alves <pedro@codesourcery.com>
6210
6211 * linux-low.c (linux_wait_1): Move non-debugging code out of
6212 `debug_threads' control.
6213
d20a8ad9
PA
62142010-08-25 Pedro Alves <pedro@codesourcery.com>
6215
6216 * linux-low.c (linux_wait_1): Don't set last_status here.
6217 * server.c (push_event, queue_stop_reply_callback): Assert we're
6218 not pushing a TARGET_WAITKIND_IGNORE event.
6219 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6220 (myresume, handle_target_event): Set the thread's last_resume_kind
6221 and last_status from the target returned status.
6222
964e4306
PA
62232010-08-25 Pedro Alves <pedro@codesourcery.com>
6224
6225 PR threads/10729
6226
6227 * linux-x86-low.c (update_debug_registers_callback): New.
6228 (i386_dr_low_set_addr): Use it.
6229 (i386_dr_low_get_addr): New.
6230 (i386_dr_low_set_control): Use update_debug_registers_callback.
6231 (i386_dr_low_get_control): New.
6232 (i386_dr_low_get_status): Adjust.
6233 * linux-low.c (linux_stop_lwp): New.
6234 * linux-low.h (linux_stop_lwp): Declare.
6235
6236 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6237 argument instead of a i386_debug_reg_state.
6238 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6239 a i386_debug_reg_state.
6240 (i386_insert_aligned_watchpoint): Adjust.
6241 (i386_remove_aligned_watchpoint): Adjust.
6242 (i386_low_stopped_data_address): Read the debug registers from the
6243 inferior instead of from the mirrors.
6244 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6245 (i386_dr_low_get_addr): Declare.
6246 (i386_dr_low_get_control): Declare.
6247 (i386_dr_low_get_status): Change prototype.
6248
6249 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6250 (i386_dr_low_get_addr): New.
6251 (i386_dr_low_get_control): New.
6252 (i386_dr_low_get_status): Adjust prototype. Return
6253 dr_status_mirror.
6254 (i386_initial_stuff): Clear dr_status_mirror and
6255 dr_control_mirror.
6256 (i386_get_thread_context): Adjust.
6257 (i386_set_thread_context): Adjust.
6258 (i386_thread_added): Adjust.
6259
5f21a75b
PA
62602010-08-24 Pedro Alves <pedro@codesourcery.com>
6261
6262 * linux-low.h (linux_thread_area): Delete declaration.
6263
3e4c1235
TS
62642010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6265
6266 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6267 after its termination.
6268
1971b033
PA
62692010-08-09 Pedro Alves <pedro@codesourcery.com>
6270
6271 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6272 (gdb_wants_all_stopped): Delete.
6273 (linux_wait_1): Don't call them.
6274 * server.c (handle_v_cont): Tag all threads as want-stopped.
6275 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6276 stopped as "client-wants-stopped".
6277
310444ac
PA
62782010-07-31 Pedro Alves <pedro@codesourcery.com>
6279
6280 * Makefile.in (signals_h): New.
6281 (server_h): Depend on it.
6282 (server.o): Don't depend on $(signals_def).
6283 (signals.o): Depend on $(signals_def).
6284
a19cae16
JK
62852010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6286
6287 * Makefile.in (signals_def): New.
6288 (server_h): Append include/gdb/signals.h and signals_def.
6289 (server.o): Append signals_def.
6290
30d50328
JK
62912010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6292
6293 * server.c (handle_target_event): Use target_signal_to_host for
6294 resume_info.sig initialization.
6295 * target.h (struct thread_resume) <sig>: New comment.
6296
5c3216e2
OS
62972010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6298
c6f46ca0
OS
6299 * server.c (handle_query): strcpy() the returned string from paddress()
6300 instead of sprintf().
5c3216e2
OS
6301 * utils.c (paddress): Return phex_nz().
6302
6bd31874
JB
63032010-07-07 Joel Brobecker <brobecker@adacore.com>
6304
6305 * server.c (handle_v_cont): Call mourn_inferior if process
6306 just exited.
6307 (myresume): Likewise.
6308
0fb4aa4b
PA
63092010-07-01 Pedro Alves <pedro@codesourcery.com>
6310
6311 Static tracepoints, and integration with UST.
6312
6313 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6314 * mem-break.c (uninsert_all_breakpoints)
6315 (reinsert_all_breakpoints): New.
6316 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6317 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6318 (gdb_agent_ust_loaded, helper_thread_id)
6319 (gdb_agent_helper_thread_id): New macros.
6320 (struct ipa_sym_addresses): Add addr_ust_loaded,
6321 addr_helper_thread_id, addr_cmd_buf.
6322 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6323 (in_process_agent_loaded_ust): New.
6324 (write_e_ust_not_loaded): New.
6325 (maybe_write_ipa_ust_not_loaded): New.
6326 (struct collect_static_trace_data_action): New.
6327 (enum tracepoint_type) <static_tracepoint>: New.
6328 (struct tracepoint) <handle>: Mention static tracepoints.
6329 (struct static_tracepoint_ctx): New.
6330 (CMD_BUF_SIZE): New.
6331 (add_tracepoint_action): Handle static tracepoint actions.
6332 (unprobe_marker_at): New.
6333 (clear_installed_tracepoints): Handle static tracepoints.
6334 (cmd_qtdp): Handle static tracepoints.
6335 (probe_marker_at): New.
6336 (cmd_qtstart): Handle static tracepoints.
6337 (response_tracepoint): Handle static tracepoints.
6338 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6339 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6340 (get_context_regcache): Handle static tracepoints.
6341 (do_action_at_tracepoint): Handle static tracepoint actions.
6342 (traceframe_find_block_type): Handle static trace data blocks.
6343 (traceframe_read_sdata): New.
6344 (download_tracepoints): Download static tracepoint actions.
6345 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6346 (GDB_PROBE_NAME): New.
6347 (ust_ops): New.
6348 (GET_UST_SYM): New.
6349 (USTF): New.
6350 (dlsym_ust): New.
6351 (ust_marker_to_static_tracepoint): New.
6352 (gdb_probe): New.
6353 (collect_ust_data_at_tracepoint): New.
6354 (gdb_ust_probe): New.
6355 (UNIX_PATH_MAX, SOCK_DIR): New.
6356 (gdb_ust_connect_sync_socket): New.
6357 (resume_thread, stop_thread): New.
6358 (run_inferior_command): New.
6359 (init_named_socket): New.
6360 (gdb_ust_socket_init): New.
6361 (cstr_to_hexstr): New.
6362 (next_st): New.
6363 (first_marker, next_marker): New.
6364 (response_ust_marker): New.
6365 (cmd_qtfstm, cmd_qtsstm): New.
6366 (unprobe_marker_at, probe_marker_at): New.
6367 (cmd_qtstmat, gdb_ust_thread): New.
6368 (gdb_ust_init): New.
6369 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6370 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6371 (ST_REGENTRY): New.
6372 (x86_64_st_collect_regmap): New.
6373 (X86_64_NUM_ST_COLLECT_GREGS): New.
6374 (AMD64_RIP_REGNUM): New.
6375 (supply_static_tracepoint_registers): New.
6376 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6377 (ST_REGENTRY): New.
6378 (i386_st_collect_regmap): New.
6379 (i386_NUM_ST_COLLECT_GREGS): New.
6380 (supply_static_tracepoint_registers): New.
6381 * server.c (handle_query): Handle qXfer:statictrace:read.
6382 <qSupported>: Report support for StaticTracepoints, and
6383 qXfer:statictrace:read features.
6384 * server.h (traceframe_read_sdata)
6385 (supply_static_tracepoint_registers): Declare.
6386 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6387 (unpack_varlen_hex): Include in IPA build.
6388 * Makefile.in (ustlibs, ustinc): New.
6389 (IPA_OBJS): Add remote-utils-ipa.o.
6390 ($(IPA_LIB)): Link -ldl and -lpthread.
6391 (UST_CFLAGS): New.
6392 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6393 * config.in, configure: Regenerate.
6394
9e4344e5
PA
63952010-06-20 Ian Lance Taylor <iant@google.com>
6396 Pedro Alves <pedro@codesourcery.com>
6397
6398 * linux-x86-low.c (always_true): Delete.
6399 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6400 trying to fool the compiler with always_true.
6401
c6beb2cb
PA
64022010-06-20 Pedro Alves <pedro@codesourcery.com>
6403
6404 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6405 conditions in gdbserver.
6406
d2ed6730
UW
64072010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6408
6409 * spu-low.c (spu_read_memory): Wrap around local store limit.
6410 (spu_write_memory): Likewise.
6411
4e29fb54
PA
64122010-06-15 Pedro Alves <pedro@codesourcery.com>
6413
6414 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6415 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6416 LONGEST uses.
6417 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6418 uses.
6419 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6420 uses with LONGEST uses.
6421
6a271cae
PA
64222010-06-14 Stan Shebs <stan@codesourcery.com>
6423 Pedro Alves <pedro@codesourcery.com>
6424
6425 Bytecode compiler.
6426
6427 * linux-x86-low.c: Include limits.h.
6428 (add_insns): New.
6429 (always_true): New.
6430 (EMIT_ASM): New.
6431 (EMIT_ASM32): New.
6432 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6433 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6434 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6435 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6436 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6437 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6438 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6439 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6440 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6441 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6442 (amd64_emit_void_call_2): New.
6443 (amd64_emit_ops): New.
6444 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6445 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6446 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6447 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6448 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6449 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6450 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6451 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6452 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6453 (i386_emit_stack_adjust, i386_emit_int_call_1)
6454 (i386_emit_void_call_2): New.
6455 (i386_emit_ops): New.
6456 (x86_emit_ops): New.
6457 (the_low_target): Install x86_emit_ops.
6458 * server.h (struct emit_ops): New.
6459 (get_raw_reg_func_addr): Declare.
6460 (current_insn_ptr, emit_error): Declare.
6461 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6462 (set_trace_state_variable_value): New defines.
6463 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6464 addr_get_trace_state_variable_value and
6465 addr_set_trace_state_variable_value.
6466 (symbol_list): New fields for get_raw_reg,
6467 get_trace_state_variable_value and set_trace_state_variable_value.
6468 (condfn): New typedef.
6469 (struct tracepoint): New field `compiled_cond'.
6470 (do_action_at_tracepoint): Clear compiled_cond.
6471 (get_trace_state_variable_value, set_trace_state_variable_value):
6472 Export in the IPA.
6473 (condition_true_at_tracepoint): If there's a compiled condition,
6474 run that.
6475 (current_insn_ptr, emit_error): New globals.
6476 (struct bytecode_address): New.
6477 (get_raw_reg_func_addr): New.
6478 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6479 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6480 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6481 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6482 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6483 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6484 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6485 (compile_tracepoint_condition, compile_bytecodes): New.
6486 * target.h (emit_ops): Forward declare.
6487 (struct target_ops): New field emit_ops.
6488 (target_emit_ops): New.
6489 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6490 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6491 * linux-low.c (linux_emit_ops): New.
6492 (linux_target_ops): Install it.
6493 * linux-low.h (struct linux_target_ops): New field emit_ops.
6494
92b72907
UW
64952010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6496
6497 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6498 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6499
fa593d66
PA
65002010-06-01 Pedro Alves <pedro@codesourcery.com>
6501 Stan Shebs <stan@codesourcery.com>
6502
6503 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6504 (all): Depend on $(extra_libraries).
6505 (install-only): Install the IPA.
6506 (IPA_OBJS, IPA_LIB): New.
6507 (clean): Remove the IPA lib.
6508 (IPAGENT_CFLAGS): New.
6509 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6510 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6511 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6512 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6513 * configure.ac: Check for atomic builtins support in the compiler.
6514 (IPA_DEPFILES, extra_libraries): Define.
6515 * configure.srv (ipa_obj): Add description.
6516 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6517 (i[34567]86-*-linux*): Set ipa_obj.
6518 (x86_64-*-linux*): Set ipa_obj.
6519 * linux-low.c (stabilizing_threads): New.
6520 (supports_fast_tracepoints): New.
6521 (linux_detach): Stabilize threads before detaching.
6522 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6523 the lwp is either not stabilizing, or is moving out of a jump pad.
6524 (linux_fast_tracepoint_collecting): New.
6525 (maybe_move_out_of_jump_pad): New.
6526 (enqueue_one_deferred_signal): New.
6527 (dequeue_one_deferred_signal): New.
6528 (linux_wait_for_event_1): If moving out of a jump pad, defer
6529 pending signals to later.
6530 (linux_stabilize_threads): New.
6531 (linux_wait_1): Check if threads need moving out of jump pads, and
6532 do it if so.
6533 (stuck_in_jump_pad_callback): New.
6534 (move_out_of_jump_pad_callback): New.
6535 (lwp_running): New.
6536 (linux_resume_one_lwp): Handle moving out of jump pads.
6537 (linux_set_resume_request): Dequeue deferred signals.
6538 (need_step_over_p): Also step over fast tracepoint jumps.
6539 (start_step_over): Also uninsert fast tracepoint jumps.
6540 (finish_step_over): Also reinsert fast tracepoint jumps.
6541 (linux_install_fast_tracepoint_jump): New.
6542 (linux_target_ops): Install linux_stabilize_threads and
6543 linux_install_fast_tracepoint_jump_pad.
6544 * linux-low.h (linux_target_ops) <get_thread_area,
6545 install_fast_tracepoint_jump_pad>: New fields.
6546 (struct lwp_info) <collecting_fast_tracepoint,
6547 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6548 (linux_get_thread_area): Declare.
6549 * linux-x86-low.c (jump_insn): New.
6550 (x86_get_thread_area): New.
6551 (append_insns): New.
6552 (push_opcode): New.
6553 (amd64_install_fast_tracepoint_jump_pad): New.
6554 (i386_install_fast_tracepoint_jump_pad): New.
6555 (x86_install_fast_tracepoint_jump_pad): New.
6556 (the_low_target): Install x86_get_thread_area and
6557 x86_install_fast_tracepoint_jump_pad.
6558 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6559 (struct fast_tracepoint_jump): New.
6560 (fast_tracepoint_jump_insn): New.
6561 (fast_tracepoint_jump_shadow): New.
6562 (find_fast_tracepoint_jump_at): New.
6563 (fast_tracepoint_jump_here): New.
6564 (delete_fast_tracepoint_jump): New.
6565 (set_fast_tracepoint_jump): New.
6566 (uninsert_fast_tracepoint_jumps_at): New.
6567 (reinsert_fast_tracepoint_jumps_at): New.
6568 (set_breakpoint_at): Use write_inferior_memory.
6569 (uninsert_raw_breakpoint): Use write_inferior_memory.
6570 (check_mem_read): Mask out fast tracepoint jumps.
6571 (check_mem_write): Mask out fast tracepoint jumps.
6572 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6573 (set_fast_tracepoint_jump): Declare.
6574 (delete_fast_tracepoint_jump)
6575 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6576 (reinsert_fast_tracepoint_jumps_at): Declare.
6577 * regcache.c: Don't compile many functions when building the
6578 in-process agent library.
6579 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6580 the register buffer in the heap.
6581 (free_register_cache): If the register buffer isn't owned by the
6582 regcache, don't free it.
6583 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6584 pre-existing register caches.
6585 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6586 type.
6587 (convert_ascii_to_int): : Constify `from' parameter type.
6588 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6589 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6590 the needed buffer in-place.
6591 (relocate_instruction): New.
6592 * server.c (handle_query) <qSymbols>: If the target supports
6593 tracepoints, give it a chance of looking up symbols. Report
6594 support for fast tracepoints.
6595 (handle_status): Stabilize threads.
6596 (process_serial_event): Adjust.
6597 * server.h (struct fast_tracepoint_jump): Forward declare.
6598 (struct process_info) <fast_tracepoint_jumps>: New field.
6599 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6600 (decode_X_packet, decode_M_packet): Adjust.
6601 (relocate_instruction): Declare.
6602 (in_process_agent_loaded): Declare.
6603 (tracepoint_look_up_symbols): Declare.
6604 (struct fast_tpoint_collect_status): Declare.
6605 (fast_tracepoint_collecting): Declare.
6606 (force_unlock_trace_buffer): Declare.
6607 (handle_tracepoint_bkpts): Declare.
6608 (initialize_low_tracepoint)
6609 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6610 * target.h (struct target_ops) <stabilize_threads,
6611 install_fast_tracepoint_jump_pad>: New fields.
6612 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6613 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6614 [HAVE_STDINT_H]: Include stdint.h.
6615 (trace_debug_1): Rename to ...
6616 (trace_vdebug): ... this.
6617 (trace_debug): Rename to ...
6618 (trace_debug_1): ... this. Add `level' parameter.
6619 (trace_debug): New.
6620 (ATTR_USED, ATTR_NOINLINE): New.
6621 (IP_AGENT_EXPORT): New.
6622 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6623 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6624 (about_to_request_buffer_space, trace_buffer_is_full)
6625 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6626 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6627 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6628 (traceframe_write_count, traceframes_created)
6629 (trace_state_variables)
6630 New renaming defines.
6631 (struct ipa_sym_addresses): New.
6632 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6633 (symbol_list): New.
6634 (ipa_sym_addrs): New.
6635 (all_tracepoint_symbols_looked_up): New.
6636 (in_process_agent_loaded): New.
6637 (write_e_ipa_not_loaded): New.
6638 (maybe_write_ipa_not_loaded): New.
6639 (tracepoint_look_up_symbols): New.
6640 (debug_threads) [IN_PROCESS_AGENT]: New.
6641 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6642 (UNKNOWN_SIDE_EFFECTS): New.
6643 (stop_tracing): New.
6644 (flush_trace_buffer): New.
6645 (stop_tracing_bkpt): New.
6646 (flush_trace_buffer_bkpt): New.
6647 (read_inferior_integer): New.
6648 (read_inferior_uinteger): New.
6649 (read_inferior_data_pointer): New.
6650 (write_inferior_data_pointer): New.
6651 (write_inferior_integer): New.
6652 (write_inferior_uinteger): New.
6653 (struct collect_static_trace_data_action): Delete.
6654 (enum tracepoint_type): New.
6655 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6656 <actions_str, step_actions, step_actions_str>: Only include in
6657 GDBserver.
fa593d66
PA
6658 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6659 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6660 (tracepoints): Use IP_AGENT_EXPORT.
6661 (last_tracepoint): Don't include in the IPA.
6662 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6663 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6664 (alloced_trace_state_variables): New.
6665 (trace_state_variables): Use IP_AGENT_EXPORT.
6666 (traceframe_t): Delete unused variable.
6667 (circular_trace_buffer): Don't include in the IPA.
6668 (trace_buffer_start): Delete.
6669 (struct trace_buffer_control): New.
6670 (trace_buffer_free): Delete.
6671 (struct ipa_trace_buffer_control): New.
6672 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6673 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6674 New.
6675 (trace_buffer_ctrl): New.
6676 (TRACE_BUFFER_CTRL_CURR): New.
6677 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6678 Reimplement as macros.
6679 (trace_buffer_wrap): Delete.
6680 (traceframe_write_count, traceframe_read_count)
6681 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6682 (struct tracepoint_hit_ctx) <type>: New field.
6683 (struct fast_tracepoint_ctx): New.
6684 (memory_barrier): New.
6685 (cmpxchg): New.
6686 (record_tracepoint_error): Update atomically in the IPA.
6687 (clear_inferior_trace_buffer): New.
6688 (about_to_request_buffer_space): New.
6689 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6690 updating the same buffer.
6691 (add_tracepoint): Default the tracepoint's type to trap
6692 tracepoint, and orig_size to -1.
6693 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6694 internal variables.
6695 (create_trace_state_variable): New parameter `gdb'. Handle it.
6696 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6697 (cmd_qtdp): Handle fast tracepoints.
6698 (cmd_qtdv): Adjust.
6699 (max_jump_pad_size): New.
6700 (gdb_jump_pad_head): New.
6701 (get_jump_space_head): New.
6702 (claim_jump_space): New.
6703 (sort_tracepoints): New.
6704 (MAX_JUMP_SIZE): New.
6705 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6706 IPA.
6707 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6708 support. Upload fast traceframes, and delete internal IPA
6709 breakpoints.
6710 (stop_tracing_handler): New.
6711 (flush_trace_buffer_handler): New.
6712 (cmd_qtstop): Upload fast tracepoints.
6713 (response_tracepoint): Handle fast tracepoints.
6714 (tracepoint_finished_step): Upload fast traceframes. Set the
6715 tracepoint hit context's tracepoint type.
6716 (handle_tracepoint_bkpts): New.
6717 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6718 type. Add comment about fast tracepoints.
6719 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6720 non-existing action_str field.
6721 (get_context_regcache): Handle fast tracepoints.
6722 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6723 to the regcache.
6724 (fast_tracepoint_from_jump_pad_address): New.
6725 (fast_tracepoint_from_ipa_tpoint_address): New.
6726 (collecting_t): New.
6727 (force_unlock_trace_buffer): New.
6728 (fast_tracepoint_collecting): New.
6729 (collecting): New.
6730 (gdb_collect): New.
6731 (write_inferior_data_ptr): New.
6732 (target_tp_heap): New.
6733 (target_malloc): New.
6734 (download_agent_expr): New.
6735 (UALIGN): New.
6736 (download_tracepoints): New.
6737 (download_trace_state_variables): New.
6738 (upload_fast_traceframes): New.
6739 (IPA_FIRST_TRACEFRAME): New.
6740 (IPA_NEXT_TRACEFRAME_1): New.
6741 (IPA_NEXT_TRACEFRAME): New.
6742 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6743 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6744 (gdb_jump_pad_buffer_end): New.
6745 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6746 (initialize_tracepoint): Adjust.
6747 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6748 buffer. Initialize the low module.
6749 * utils.c (PREFIX, TOOLNAME): New.
6750 (malloc_failure): Use PREFIX.
6751 (error): In the IPA, an error causes an exit.
6752 (fatal, warning): Use PREFIX.
6753 (internal_error): Use TOOLNAME.
6754 (NUMCELLS): Increase to 10.
6755 * configure, config.in: Regenerate.
6756
d149dd1d
PA
67572010-06-01 Pedro Alves <pedro@codesourcery.com>
6758
6759 * server.c (handle_query) <qSupported>: Do two passes over the
6760 qSupported string to avoid nesting strtok.
6761
f6528abd
JK
67622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6763
6764 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6765 (CDEPS): New.
6766 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6767 -Wl,--dynamic-list.
6768 * configure: Regenerate.
6769 * proc-service.list: New.
6770
ca2a87a0
JK
67712010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6772
6773 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6774 New comment.
6775
363a6e9f
OS
67762010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6777
6778 * gdbreplay.c (remote_open): Check error return from socket() call by
6779 its equality to -1 not by it being negative.
6780 * remote-utils.c (remote_open): Likewise.
6781
d23b6cb1
PA
67822010-05-23 Pedro Alves <pedro@codesourcery.com>
6783
6784 * config.h: Regenerate.
6785
28d3cf85
MK
67862010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6787
6788 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6789 doesn't provide PTRACE_GET_THREAD_AREA.
6790
fea36a59
MK
67912010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6792
6793 * linux-m68k-low.c: Include <asm/ptrace.h>
6794 (ps_get_thread_area): Implement.
6795
24b066ba
DE
67962010-05-03 Doug Evans <dje@google.com>
6797
6798 * event-loop.c (struct callback_event): New struct.
6799 (callback_list): New global.
6800 (append_callback_event, delete_callback_event): New functions.
6801 (process_callback): New function.
6802 (start_event_loop): Call it.
6803 * remote-utils.c (NOT_SCHEDULED): Define.
6804 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6805 moved out of readchar.
6806 (readchar): Rewrite. Call reschedule before returning.
6807 (reset_readchar): New function.
6808 (remote_close): Call it.
6809 (process_remaining, reschedule): New functions.
6810 * server.h (callback_handler_func): New typedef.
6811 (append_callback_event, delete_callback_event): Declare.
6812
9836d6ea
PA
68132010-05-03 Pedro Alves <pedro@codesourcery.com>
6814
6815 * proc-service.c (ps_pglobal_lookup): Use
6816 thread_db_look_up_one_symbol.
6817 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6818 parameter. Use it instead of all_symbols_looked_up.
6819 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6820 field.
6821 (all_symbols_looked_up): Don't declare.
6822 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6823 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6824 field.
6825 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6826 Set all_symbols_looked_up here.
6827 (thread_db_look_up_one_symbol): New.
6828 (thread_db_get_tls_address): Adjust.
6829 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6830 thread_db object on the heap, and tentatively set it in the
6831 process structure.
6832 (thread_db_init): Don't set all_symbols_looked_up here.
6833 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6834
7984d532
PA
68352010-05-03 Pedro Alves <pedro@codesourcery.com>
6836
6837 * linux-low.c (linux_kill, linux_detach): Adjust.
6838 (status_pending_p_callback): Remove redundant statement. Check
6839 for !TARGET_WAITIKIND_IGNORE, instead of
6840 TARGET_WAITKIND_STOPPED.
6841 (handle_tracepoints): Make sure LWP is locked. Adjust.
6842 (linux_wait_for_event_1): Adjust.
6843 (linux_cancel_breakpoints): New.
6844 (unsuspend_one_lwp): New.
6845 (unsuspend_all_lwps): New.
6846 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6847 (send_sigstop_callback): Change return type to int, add new
6848 `except' parameter and handle it.
6849 (suspend_and_send_sigstop_callback): New.
6850 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6851 pass them down. If SUSPEND, also increment the lwp's suspend
6852 count.
6853 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6854 (need_step_over_p): Don't consider suspended LWPs.
6855 (start_step_over): Adjust.
6856 (proceed_one_lwp): Change return type to int, add new `except'
6857 parameter and handle it.
6858 (unsuspend_and_proceed_one_lwp): New.
6859 (proceed_all_lwps): Use find_inferior instead of
6860 for_each_inferior.
6861 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6862 also decrement the suspend count of LWPs. Pass `except' down,
6863 instead of hacking its suspend count.
6864 (linux_pause_all): Add `freeze' parameter. Adjust.
6865 (linux_unpause_all): New.
6866 (linux_target_ops): Install linux_unpause_all.
6867 * server.c (handle_status): Adjust.
6868 * target.h (struct target_ops): New fields `unpause_all' and
6869 `cancel_breakpoints'. Add new parameter to `pause_all'.
6870 (pause_all): Add new `freeze' parameter.
6871 (unpause_all): New.
6872 (cancel_breakpoints): New.
6873 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6874 cancel breakpoints.
6875 (cmd_qtstart): Pause threads.
6876 (stop_tracing): Pause threads, and cancel breakpoints.
6877 * win32-low.c (win32_target_ops): Adjust.
6878
e471f25b
PA
68792010-05-03 Pedro Alves <pedro@codesourcery.com>
6880
6881 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6882 the inferior right away from here...
6883 (linux_wait_1): ... to here, and adjust to check the thread's
6884 last_resume_kind instead of the lwp's step or stop_expected flags.
6885
1915ef4f
PA
68862010-05-02 Pedro Alves <pedro@codesourcery.com>
6887
6888 * README: Use consistent `GDB' and `GDBserver' spellings.
6889
f9e39928
PA
68902010-05-02 Pedro Alves <pedro@codesourcery.com>
6891
6892 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6893 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6894 (linux_detach_one_lwp): Assume the lwp is stopped.
6895 (any_thread_of): Delete.
6896 (linux_detach): Stop all lwps here. Don't blindly delete all
6897 breakpoints.
6898 (delete_lwp_callback): New.
6899 (linux_mourn): Delete all lwps of the process that is gone.
6900 (linux_wait_1): Don't delete the last lwp of the process here.
6901 * mem-break.h (mark_breakpoints_out): Declare.
6902 * mem-break.c (mark_breakpoints_out): New.
6903 (free_all_breakpoints): Use it.
6904 * server.c (handle_target_event): If the process is gone, mark
6905 breakpoints out.
6906 * thread-db.c (struct thread_db) <create_bp>: New field.
6907 (thread_db_enable_reporting): Fix prototype. Store a thread event
6908 breakpoint reference in the thread_db struct.
6909 (thread_db_load_search): Clear the thread_db object.
6910 (try_thread_db_load_1): Ditto.
6911 (switch_to_process): New.
6912 (disable_thread_event_reporting): Use it.
6913 (remove_thread_event_breakpoints): New.
6914 (thread_db_detach, thread_db_mourn): Use it.
6915
1e7fc18c
PA
69162010-05-01 Pedro Alves <pedro@codesourcery.com>
6917
6918 * linux-low.c (linux_enable_event_reporting): New.
6919 (linux_wait_for_event_1, handle_extended_wait): Use it.
6920
02fc4de7
PA
69212010-04-30 Pedro Alves <pedro@codesourcery.com>
6922
6923 * linux-low.c (linux_kill_one_lwp, linux_kill)
6924 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6925 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6926 SIGSTOP even if the LWP is stopped.
6927 (send_sigstop_callback): New.
6928 (stop_all_lwps): Use send_sigstop_callback instead.
6929 (linux_resume_one_thread): Adjust.
6930 (proceed_one_lwp): Still proceed an LWP that the client has
6931 requested to stop, if we haven't reported it as stopped yet. Make
6932 sure that LWPs the client want stopped, have a pending SIGSTOP.
6933
bc3b5632
DE
69342010-04-26 Doug Evans <dje@google.com>
6935
ae1ada35
DE
6936 * server.c (handle_general_set): Make static.
6937
bc3b5632
DE
6938 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6939 Print received char after testing for error/eof instead of before.
6940 (input_interrupt): Tweak comment.
6941
65730243
DE
69422010-04-23 Doug Evans <dje@google.com>
6943
6944 * server.c (start_inferior): Print inferior argv if --debug.
6945
a8ae7dc0
AR
69462010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6947
6948 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6949 * nto-x86-low.c: Include server.h
6950
1c07cc19
PM
69512010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6952
6953 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6954 be consistent with other sources of this directory.
6955 (init_registers_amd64): Correct name of source file of this function
6956 in the comment.
6957
e0a61e09
PM
69582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6959
6960 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6961 64-bit executables.
6962
54709339
PM
69632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6964
6965 * win32-i386-low.c: Add 64-bit support.
6966 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6967 (init_registers_amd64): Declare.
6968 (mappings): Add 64-bit version of array.
6969 (init_windows_x86): New function.
6970 (the_low_target): Change init_arch field to init_windows_x86.
6971
e8f0053d
PM
69722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6973
6974 * win32-low.c: Adapt to support also 64-bit architecture.
6975 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6976 (get_image_name): Use SIZE_T type for local variable `done'.
6977 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6978 (toolhelp_get_dll_name): Idem.
6979 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6980 Use uintptr_t typecast to avoid warning.
6981 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6982 (handle_exception): Use phex_nz to avoid warning.
6983 (win32_wait): Remove unused local variable `process'.
6984
c481e77e
PM
69852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6986
6987 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6988 `amd64-avx.o'.
6989
12ea4b69
PM
69902010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6991
6992 * configure.ac: Use `ws2_32' library for srv_mingw.
6993 * configure: Regenerate.
6994 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6995 * remote-utils.c: Likewise.
6996
f6d1620c
L
69972010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6998
6999 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7000 if __x86_64__ is defined.
7001
8e642873
PM
70022010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7003
7004 * configure: Regenerate.
7005
711e434b
PM
70062010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7007
7008 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7009 * target.h (target_ops): New get_tib_address field.
7010 * win32-low.h (win32_thread_info): Add thread_local_base field.
7011 * win32-low.c (child_add_thread): Add tlb argument.
7012 Set thread_local_base field to TLB.
7013 (get_child_debug_event): Adapt to child_add_thread change.
7014 (win32_get_tib_address): New function.
7015 (win32_target_ops): Set get_tib_address field to
7016 win32_get_tib_address.
7017 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7018
505106cd
PA
70192010-04-12 Pedro Alves <pedro@codesourcery.com>
7020
505106cd
PA
7021 * linux-low.c (linux_mourn): Also remove the process.
7022 * server.c (handle_target_event): Don't remove the process here.
7023 * nto-low.c (nto_mourn): New.
7024 (nto_target_ops): Install it.
7025 * spu-low.c (spu_mourn): New.
7026 (spu_target_ops): Install it.
7027 * win32-low.c (win32_mourn): New.
7028 (win32_target_ops): Install it.
7029
e8470a06
PA
70302010-04-12 Pedro Alves <pedro@codesourcery.com>
7031
7032 * server.h (buffer_xml_printf): Remove redundant `;'.
7033
45ba0d02
PA
70342010-04-12 Pedro Alves <pedro@codesourcery.com>
7035
7036 * regcache.c (set_register_cache): Invalidate regcaches before
7037 changing the register cache layout.
7038 (regcache_invalidate_one): Allow a NULL regcache.
7039 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7040 regcaches before changing the register cache layout or the target
7041 regsets.
7042
59e04013
L
70432010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7044
7045 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7046 variable warning on Linux/x86-64.
7047
8336d594
PA
70482010-04-11 Pedro Alves <pedro@codesourcery.com>
7049
7050 GDBserver disconnected tracing support.
7051
7052 * linux-low.c (linux_remove_process): Delete.
7053 (add_lwp): Don't set last_resume_kind here.
7054 (linux_kill): Use `mourn'.
7055 (linux_detach): Use `thread_db_detach', and `mourn'.
7056 (linux_mourn): New.
7057 (linux_attach_lwp_1): Adjust comment.
7058 (linux_attach): last_resume_kind moved the thread_info; adjust.
7059 (status_pending_p_callback): Adjust.
7060 (linux_wait_for_event_1): Adjust.
7061 (count_events_callback, select_singlestep_lwp_callback)
7062 (select_event_lwp_callback, cancel_breakpoints_callback)
7063 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7064 (proceed_one_lwp): Adjust.
7065 (linux_async): Add debug output.
7066 (linux_thread_stopped): New.
7067 (linux_pause_all): New.
7068 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7069 linux_pause_all.
7070 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7071 (thread_db_free): Delete declaration.
7072 (thread_db_detach, thread_db_mourn): Declare.
7073 * thread-db.c (thread_db_init): Use thread_db_mourn.
7074 (thread_db_free): Delete, split in two.
7075 (disable_thread_event_reporting): New.
7076 (thread_db_detach): New.
7077 (thread_db_mourn): New.
7078
7079 * server.h (struct thread_info) <last_resume_kind>: New field.
7080 <attached>: Add comment.
7081 <gdb_detached>: New field.
7082 (handler_func): Change return type to int.
7083 (handle_serial_event, handle_target_event): Ditto.
7084 (gdb_connected): Declare.
7085 (tracing): Delete.
7086 (disconnected_tracing): Declare.
7087 (stop_tracing): Declare.
7088
7089 * server.c (handle_query) <qSupported>: Report support for
7090 disconnected tracing.
7091 (queue_stop_reply_callback): Account for running threads.
7092 (gdb_wants_thread_stopped): New.
7093 (gdb_wants_all_threads_stopped): New.
7094 (gdb_reattached_process): New.
7095 (handle_status): Clear the `gdb_detached' flag of all processes.
7096 In all-stop, stop all threads.
7097 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7098 (process_serial_event): If the remote connection breaks, or if an
7099 exit was forced with "monitor exit", force an event loop exit.
7100 Handle disconnected tracing on detach.
7101 (handle_serial_event): Adjust.
7102 (handle_target_event): If GDB isn't connected, forward events back
7103 to the inferior, unless the last process exited, in which case,
7104 exit gdbserver. Adjust interface.
7105
7106 * remote-utils.c (remote_open): Don't block in accept. Instead
7107 register an event loop source on the listen socket file
7108 descriptor. Refactor bits into ...
7109 (listen_desc): ... this new global.
7110 (gdb_connected): ... this new function.
7111 (enable_async_notification): ... this new function.
7112 (handle_accept_event): ... this new function.
7113 (remote_close): Clear remote_desc.
7114
7115 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7116
7117 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7118 New fields.
7119 (mourn_inferior): Define.
7120 (target_process_qsupported): Avoid the dangling else problem.
7121 (thread_stopped): Define.
7122 (pause_all): Define.
7123 (target_waitstatus_to_string): Declare.
7124 * target.c (target_waitstatus_to_string): New.
7125
7126 * tracepoint.c (tracing): Make extern.
7127 (disconnected_tracing): New.
7128 (stop_tracing): Make extern. Handle tracing stops due to GDB
7129 disconnecting.
7130 (cmd_qtdisconnected): New.
7131 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7132 (handle_tracepoint_general_set): Handle QTDisconnected.
7133
7134 * event-loop.c (event_handler_func): Change return type to int.
7135 (process_event): Bail out if the event handler wants the event
7136 loop to stop.
7137 (handle_file_event): Ditto.
7138 (start_event_loop): Bail out if the event handler wants the event
7139 loop to stop.
7140
7141 * nto-low.c (nto_target_ops): Adjust.
7142 * spu-low.c (spu_wait): Don't remove the process here.
7143 (spu_target_ops): Adjust.
7144 * win32-low.c (win32_wait): Don't remove the process here.
7145 (win32_target_ops): Adjust.
7146
5d267c4c
PA
71472010-04-11 Pedro Alves <pedro@codesourcery.com>
7148
7149 * regcache.c (realloc_register_cache): Invalidate inferior's
7150 regcache before recreating it.
7151
623ccd72
PA
71522010-04-09 Pedro Alves <pedro@codesourcery.com>
7153
7154 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7155
219f2f23
PA
71562010-04-09 Stan Shebs <stan@codesourcery.com>
7157 Pedro Alves <pedro@codesourcery.com>
7158
7159 * server.h (LONGEST): New.
7160 (struct thread_info) <while_stepping>: New field.
7161 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7162 Declare.
7163 (initialize_tracepoint, handle_tracepoint_general_set)
7164 (handle_tracepoint_query, tracepoint_finished_step)
7165 (tracepoint_was_hit, release_while_stepping_state_list):
7166 (current_traceframe): Declare.
7167 * server.c (handle_general_set): Handle tracepoint packets.
7168 (read_memory): New.
7169 (write_memory): New.
7170 (handle_search_memory_1): Use read_memory.
7171 (handle_query): Report support for conditional tracepoints, trace
7172 state variables, and tracepoint sources. Handle tracepoint
7173 queries.
7174 (main): Initialize the tracepoints module.
7175 (process_serial_event): Handle traceframe reads/writes.
7176
7177 * linux-low.c (handle_tracepoints): New.
7178 (linux_wait_1): Call it.
7179 (linux_resume_one_lwp): Handle while-stepping.
7180 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7181 (linux_target_ops): Install them.
7182 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7183 New field.
7184 * linux-x86-low.c (x86_supports_tracepoints): New.
7185 (the_low_target). Install it.
7186
7187 * mem-break.h (delete_breakpoint): Declare.
7188 * mem-break.c (delete_breakpoint): Make external.
7189
7190 * target.h (struct target_ops): Add `supports_tracepoints',
7191 `read_pc', and `write_pc' fields.
7192 (target_supports_tracepoints): Define.
7193 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7194 (phex_nz): New.
7195
7196 * regcache.h (struct regcache) <registers_owned>: New field.
7197 (init_register_cache, regcache_cpy): Declare.
7198 (regcache_read_pc, regcache_write_pc): Declare.
7199 (register_cache_size): Declare.
7200 (supply_regblock): Declare.
7201 * regcache.c (init_register_cache): New.
7202 (new_register_cache): Use it.
7203 (regcache_cpy): New.
7204 (register_cache_size): New.
7205 (supply_regblock): New.
7206 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7207
219f2f23
PA
7208 * tracepoint.c: New.
7209
7210 * Makefile.in (OBS): Add tracepoint.o.
7211 (tracepoint.o): New rule.
7212
3a13a53b
L
72132010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7214
7215 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7216 (i386-mmx.o): New.
7217 (i386-mmx.c): Likewise.
7218 (i386-mmx-linux.o): Likewise.
7219 (i386-mmx-linux.c): Likewise.
7220
7221 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7222 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7223 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7224 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7225
7226 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7227 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7228 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7229
1570b33e
L
72302010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7231
7232 * Makefile.in (clean): Updated.
7233 (i386-avx.o): New.
7234 (i386-avx.c): Likewise.
7235 (i386-avx-linux.o): Likewise.
7236 (i386-avx-linux.c): Likewise.
7237 (amd64-avx.o): Likewise.
7238 (amd64-avx.c): Likewise.
7239 (amd64-avx-linux.o): Likewise.
7240 (amd64-avx-linux.c): Likewise.
7241
7242 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7243 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7244 (srv_amd64_regobj): Add amd64-avx.o.
7245 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7246 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7247 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7248 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7249 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7250 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7251 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7252
7253 * i387-fp.c: Include "i386-xstate.h".
7254 (i387_xsave): New.
7255 (i387_cache_to_xsave): Likewise.
7256 (i387_xsave_to_cache): Likewise.
7257 (x86_xcr0): Likewise.
7258
7259 * i387-fp.h (i387_cache_to_xsave): Likewise.
7260 (i387_xsave_to_cache): Likewise.
7261 (x86_xcr0): Likewise.
7262
7263 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7264 * linux-crisv32-low.c (target_regsets): Likewise.
7265 * linux-m68k-low.c (target_regsets): Likewise.
7266 * linux-mips-low.c (target_regsets): Likewise.
7267 * linux-ppc-low.c (target_regsets): Likewise.
7268 * linux-s390-low.c (target_regsets): Likewise.
7269 * linux-sh-low.c (target_regsets): Likewise.
7270 * linux-sparc-low.c (target_regsets): Likewise.
7271 * linux-xtensa-low.c (target_regsets): Likewise.
7272
7273 * linux-low.c: Include <sys/uio.h>.
7274 (regsets_fetch_inferior_registers): Support nt_type.
7275 (regsets_store_inferior_registers): Likewise.
7276 (linux_process_qsupported): New.
7277 (linux_target_ops): Add linux_process_qsupported.
7278
7279 * linux-low.h (regset_info): Add nt_type.
7280 (linux_target_ops): Add process_qsupported.
7281
7282 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7283 and <sys/uio.h>.
7284 (init_registers_i386_avx_linux): New.
7285 (init_registers_amd64_avx_linux): Likewise.
7286 (xmltarget_i386_linux_no_xml): Likewise.
7287 (xmltarget_amd64_linux_no_xml): Likewise.
7288 (PTRACE_GETREGSET): Likewise.
7289 (PTRACE_SETREGSET): Likewise.
7290 (x86_fill_xstateregset): Likewise.
7291 (x86_store_xstateregset): Likewise.
7292 (use_xml): Likewise.
7293 (x86_linux_update_xmltarget): Likewise.
7294 (x86_linux_process_qsupported): Likewise.
7295 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7296 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7297 init_registers_i386_linux here. Call
7298 x86_linux_update_xmltarget.
7299 (the_low_target): Add x86_linux_process_qsupported.
7300
7301 * server.c (handle_query): Call target_process_qsupported.
7302
7303 * target.h (target_ops): Add process_qsupported.
7304 (target_process_qsupported): New.
7305
fc7238bb
PA
73062010-04-03 Pedro Alves <pedro@codesourcery.com>
7307
7308 * inferiors.c (add_thread): Set last_status kind to
7309 TARGET_WAITKIND_IGNORE.
7310 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7311 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7312 (linux_wait_1): Move `thread' local definition to block that uses
7313 it. Don't NULL initialize `event_child'.
7314 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7315 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7316 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7317
bdabb078
PA
73182010-04-01 Pedro Alves <pedro@codesourcery.com>
7319
7320 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7321 an extended waitstatus, or by a watchpoint.
7322 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7323 thread was stepping or has been stopped by a watchpoint.
7324
d3bbe7a0
PA
73252010-04-01 Pedro Alves <pedro@codesourcery.com>
7326
7327 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7328 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7329 of another, then delete the previous, and validate all
7330 breakpoints.
7331 (validate_inserted_breakpoint): New.
7332 (delete_disabled_breakpoints): New.
7333 (validate_breakpoints): New.
7334 (check_mem_read): Validate breakpoints before trusting their
7335 shadow. Delete disabled breakpoints.
7336 (check_mem_write): Validate breakpoints before trusting they
7337 should be inserted. Delete disabled breakpoints.
7338 * mem-break.h (validate_breakpoints):
7339 * server.c (handle_query): Validate breakpoints when we see a
7340 qSymbol query.
7341
8b07ae33
PA
73422010-04-01 Pedro Alves <pedro@codesourcery.com>
7343
7344 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7345 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7346 if we could tell there's a GDB breakpoint at stop_pc.
7347 (need_step_over_p): Don't do a step over if we find a GDB
7348 breakpoint at the resume PC.
7349
7350 * mem-break.c (struct raw_breakpoint): New.
7351 (enum bkpt_type): New type `gdb_breakpoint'.
7352 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7353 fields. New field `raw'.
7354 (find_raw_breakpoint_at): New.
7355 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7356 breakpoint instead.
7357 (set_breakpoint_at): Adjust.
7358 (delete_raw_breakpoint): New.
7359 (release_breakpoint): New.
7360 (delete_breakpoint): Rename to...
7361 (delete_breakpoint_1): ... this. Add proc parameter. Use
7362 release_breakpoint. Return ENOENT.
7363 (delete_breakpoint): Reimplement.
7364 (find_breakpoint_at): Delete.
7365 (find_gdb_breakpoint_at): New.
7366 (delete_breakpoint_at): Delete.
7367 (set_gdb_breakpoint_at): New.
7368 (delete_gdb_breakpoint_at): New.
7369 (gdb_breakpoint_here): New.
7370 (set_reinsert_breakpoint): Use release_breakpoint.
7371 (uninsert_breakpoint): Rename to ...
7372 (uninsert_raw_breakpoint): ... this.
7373 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7374 (reinsert_raw_breakpoint): Change parameter type to
7375 raw_breakpoint.
7376 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7377 instead.
7378 (check_breakpoints): Adjust. Use release_breakpoint.
7379 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7380 (breakpoint_inserted_here): Ditto.
7381 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7382 Don't trust the breakpoint's shadow if it is not inserted.
7383 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7384 (delete_all_breakpoints): Adjust.
7385 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7386 use delete_breakpoint_1.
7387
7388 * mem-break.h (breakpoints_supported): Delete declaration.
7389 (set_gdb_breakpoint_at): Declare.
7390 (gdb_breakpoint_here): Declare.
7391 (delete_breakpoint_at): Delete.
7392 (delete_gdb_breakpoint_at): Declare.
7393
7394 * server.h (struct raw_breakpoint): Forward declare.
7395 (struct process_info): New field `raw_breakpoints'.
7396
7397 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7398 breakpoints.
7399
6bf5e0ba
PA
74002010-03-24 Pedro Alves <pedro@codesourcery.com>
7401
7402 * linux-low.c (status_pending_p_callback): Fix comment.
7403 (linux_wait_for_event_1): Move most of the internal breakpoint
7404 handling from here...
7405 (linux_wait_1): ... to here.
7406 (count_events_callback): New.
7407 (select_singlestep_lwp_callback): New.
7408 (select_event_lwp_callback): New.
7409 (cancel_breakpoints_callback): New.
7410 (select_event_lwp): New.
7411 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7412 priority to all LWPs that have had events that should be reported
7413 to the client. Cancel breakpoints when about to reporting the
7414 event to the client, not while stopping lwps. No longer cancel
7415 finished single-steps here.
7416 (cancel_finished_single_step): Delete.
7417 (cancel_finished_single_steps): Delete.
7418
414a389f
PA
74192010-03-24 Pedro Alves <pedro@codesourcery.com>
7420
7421 * mem-break.c (enum bkpt_type): New.
7422 (struct breakpoint): New field `type'.
7423 (set_breakpoint_at): Change return type to struct breakpoint
7424 pointer. Set type to `other_breakpoint' by default.
7425 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7426 in the breakpoint list.
7427 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7428 (reinsert_breakpoint): Rename to ...
7429 (reinsert_raw_breakpoint): ... this.
7430 (reinsert_breakpoints_at): Adjust.
7431 * mem-break.h (struct breakpoint): Declare.
7432 (set_breakpoint_at): Change return type to struct breakpoint
7433 pointer.
7434
2280c721
PA
74352010-03-24 Pedro Alves <pedro@codesourcery.com>
7436
7437 * server.c (handle_query): Assign, not compare.
7438
d50171e4
PA
74392010-03-24 Pedro Alves <pedro@codesourcery.com>
7440
7441 Teach linux gdbserver to step-over-breakpoints.
7442
7443 * linux-low.c (can_hardware_single_step): New.
7444 (supports_breakpoints): New.
7445 (handle_extended_wait): If stopping threads, read the stop pc of
7446 the new cloned LWP.
7447 (get_pc): New.
7448 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7449 low target doesn't support retrieving the PC.
7450 (add_lwp): Set last_resume_kind to resume_continue.
7451 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7452 (linux_attach): Don't clear stop_expected. Set the lwp's
7453 last_resume_kind to resume_stop.
7454 (linux_detach_one_lwp): Don't check for removed breakpoints.
7455 (check_removed_breakpoint): Delete.
7456 (status_pending_p): Rename to ...
7457 (status_pending_p_callback): ... this. Don't check for removed
7458 breakpoints. Don't consider threads that are stopped from GDB's
7459 perspective.
7460 (linux_wait_for_lwp): Always read the stop_pc here.
7461 (cancel_breakpoint): New.
7462 (step_over_bkpt): New global.
7463 (linux_wait_for_event_1): Implement stepping over breakpoints.
7464 (gdb_wants_lwp_stopped): New.
7465 (gdb_wants_all_stopped): New.
7466 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7467 single-step traps here. Store the thread's last reported target
7468 wait status.
7469 (send_sigstop): Don't clear stop_expected. Always set it,
7470 instead.
7471 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7472 (cancel_finished_single_step): New.
7473 (cancel_finished_single_steps): New.
7474 (wait_for_sigstop): Don't cancel finished single-step traps here.
7475 (linux_resume_one_lwp): Don't check for removed breakpoints.
7476 Don't set `step' on non-hardware step archs.
7477 (linux_set_resume_request): Ignore resume_stop requests if already
7478 stopping or stopped. Set the lwp's last_resume_kind.
7479 (resume_status_pending_p): Don't check for removed breakpoints.
7480 (need_step_over_p): New.
7481 (start_step_over): New.
7482 (finish_step_over): New.
7483 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7484 requests. Clear the thread's last reported target waitstatus.
7485 Don't use the `suspended' flag. Don't consider pending breakpoints.
7486 (linux_resume): Start a step-over if necessary.
7487 (proceed_one_lwp): New.
7488 (proceed_all_lwps): New.
7489 (unstop_all_lwps): New.
7490 * linux-low.h (struct lwp_info): Rewrite comment for the
7491 `suspended' flag. Add the `stop_pc' field. Delete the
7492 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7493 Add `'last_resume_kind' and `need_step_over' fields.
7494 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7495 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7496 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7497 (set_raw_breakpoint_at): New.
7498 (set_breakpoint_at): Rewrite to use it.
7499 (reinsert_breakpoint_handler): Delete.
7500 (set_reinsert_breakpoint): New.
7501 (reinsert_breakpoint_by_bp): Delete.
7502 (delete_reinsert_breakpoints): New.
7503 (uninsert_breakpoint): Rewrite.
7504 (uninsert_breakpoints_at): New.
7505 (reinsert_breakpoint): Rewrite.
7506 (reinsert_breakpoints_at): New.
7507 (check_breakpoints): Rewrite.
7508 (breakpoint_here): New.
7509 (breakpoint_inserted_here): New.
7510 (check_mem_read): Adjust.
7511 * mem-break.h (breakpoints_supported, breakpoint_here)
7512 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7513 (reinsert_breakpoint_by_bp): Delete declaration.
7514 (delete_reinsert_breakpoints): Declare.
7515 (reinsert_breakpoint): Delete declaration.
7516 (reinsert_breakpoints_at): Declare.
7517 (uninsert_breakpoint): Delete declaration.
7518 (uninsert_breakpoints_at): Declare.
7519 (check_breakpoints): Adjust prototype.
7520 * server.h: Adjust include order.
7521 (struct thread_info): Declare here. Add a `last_status' field.
7522
30ba68cb
MS
75232010-03-23 Michael Snyder <msnyder@vmware.com>
7524
7525 * server.c (crc32): New function.
7526 (handle_query): Add handling for 'qCRC:' request.
7527
b9a881c2
PA
75282010-03-23 Pedro Alves <pedro@codesourcery.com>
7529
7530 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7531 lwp had been stopped by a watchpoint.
7532
e92d13d5
PA
75332010-03-16 Pedro Alves <pedro@codesourcery.com>
7534
7535 * server.h (internal_error): Declare.
7536 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7537 * utils.c (internal_error): New function.
7538
64daa791
AS
75392010-03-15 Andreas Schwab <schwab@redhat.com>
7540
7541 * configure.srv: Fix typo setting srv_regobj.
7542
f52cd8cd
PA
75432010-03-15 Pedro Alves <pedro@codesourcery.com>
7544
7545 * linux-low.c (fetch_register): Avoid passing a non string literal
7546 format to `error'.
7547 (usr_store_inferior_registers): Ditto.
7548
93ae6fdc
PA
75492010-03-14 Pedro Alves <pedro@codesourcery.com>
7550
7551 * linux-low.c (linux_write_memory): Bail out early if peeking
7552 memory failed.
7553
c3adc08c
PA
75542010-03-14 Pedro Alves <pedro@codesourcery.com>
7555
7556 * linux-low.h (struct lwp_info): New fields
7557 `stopped_by_watchpoint' and `stopped_data_address'.
7558 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7559 here, and cache them in the lwp object.
7560 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7561 directly.
7562 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7563 field.
7564 (linux_stopped_by_watchpoint): Rewrite.
7565 (linux_stopped_data_address): Rewrite.
7566
bce522a2
PA
75672010-03-06 Simo Melenius <simo.melenius@iki.fi>
7568
7569 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7570 switching the current inferior, not before.
7571
90884b2b
L
75722010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7573
7574 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7575 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7576 i386-linux.c and amd64-linux.c.
7577 (reg-i386.o): Removed.
7578 (reg-i386.c): Likewise.
7579 (reg-i386-linux.o): Likewise.
7580 (reg-i386-linux.c): Likewise.
7581 (reg-x86-64.o): Likewise.
7582 (reg-x86-64.c): Likewise.
7583 (reg-x86-64-linux.o): Likewise.
7584 (reg-x86-64-linux.c): Likewise.
7585 (i386.o): New.
7586 (i386.c): Likewise.
7587 (i386-linux.o): Likewise.
7588 (i386-linux.c): Likewise.
7589 (amd64.o): Likewise.
7590 (amd64.c): Likewise.
7591 (amd64-linux.o): Likewise.
7592 (amd64-linux.c): Likewise.
7593
7594 * configure.srv (srv_i386_regobj): New.
7595 (srv_i386_linux_regobj): Likewise.
7596 (srv_amd64_regobj): Likewise.
7597 (srv_amd64_linux_regobj): Likewise.
7598 (srv_i386_32bit_xmlfiles): Likewise.
7599 (srv_i386_64bit_xmlfiles): Likewise.
7600 (srv_i386_xmlfiles): Likewise.
7601 (srv_amd64_xmlfiles): Likewise.
7602 (srv_i386_linux_xmlfiles): Likewise.
7603 (srv_amd64_linux_xmlfiles): Likewise.
7604 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7605 srv_xmlfiles to $srv_i386_xmlfiles.
7606 (i[34567]86-*-mingw32ce*): Likewise.
7607 (i[34567]86-*-mingw*): Likewise.
7608 (i[34567]86-*-nto*): Likewise.
7609 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7610 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7611 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7612 (x86_64-*-linux*): Likewise.
7613
7614 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7615 (init_registers_amd64_linux): New.
7616 (x86_arch_setup): Replace init_registers_x86_64_linux with
7617 init_registers_amd64_linux.
7618
193f13e6
MK
76192010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7620
7621 * configure.ac: Check for libdl. If it is not available link against
7622 static libthread_db.
7623 * configure: Regenerate.
7624
85d721b8
PA
76252010-02-22 Pedro Alves <pedro@codesourcery.com>
7626
7627 PR9605
7628
7629 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7630 handing a read watchpoint.
7631 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7632
6076632b
DE
76332010-02-12 Doug Evans <dje@google.com>
7634
7635 * linux-low.c (linux_supports_tracefork_flag): Document.
7636 (linux_look_up_symbols): Add comment.
7637
3327ccf7
L
76382010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7639
7640 * regcache.c (supply_register): Clear regcache if buf is NULL.
7641
0718675c 76422010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7643 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7644
7645 * inferiors.c (find_inferior): Add function documentation.
7646 (unloaded_dll): Handle the case where the unloaded dll has not
7647 been previously registered in the dll list.
7648
177321bd
DJ
76492010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7650
7651 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7652 (thumb2_breakpoint): New.
7653 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7654
2b009048
DJ
76552010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7656
7657 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7658 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7659 breakpoints.
7660
3be029c7
PA
76612010-01-21 Pedro Alves <pedro@codesourcery.com>
7662
7663 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7664
18f5de3b
JK
76652010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7666
7667 * linux-s390-low.c (s390_collect_ptrace_register)
7668 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7669
3743bb4f
DE
76702010-01-21 Doug Evans <dje@google.com>
7671
14ce3065
DE
7672 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7673 (PTRACE_ARG4_TYPE): New macro.
7674 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7675 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7676 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7677 (usr_store_inferior_registers): Ditto.
7678 (linux_read_memory, linux_write_memory): Ditto.
7679 (linux_test_for_tracefork): Ditto.
7680
3743bb4f
DE
7681 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7682 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7683
8b315be5
PA
76842010-01-21 Pedro Alves <pedro@codesourcery.com>
7685
7686 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7687 target.
7688
85492558
PA
76892010-01-21 Pedro Alves <pedro@codesourcery.com>
7690
7691 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7692 prototype to take a regcache. Adjust.
7693
442ea881
PA
76942010-01-20 Pedro Alves <pedro@codesourcery.com>
7695
7696 * regcache.h (struct thread_info): Forward declare.
7697 (struct regcache): New.
7698 (new_register_cache): Adjust prototype.
7699 (get_thread_regcache): Declare.
7700 (free_register_cache): Adjust prototype.
7701 (registers_to_string, registers_from_string): Ditto.
7702 (supply_register, supply_register_by_name, collect_register)
7703 (collect_register_as_string, collect_register_by_name): Ditto.
7704 * regcache.c (struct inferior_regcache_data): Delete.
7705 (get_regcache): Rename to ...
7706 (get_thread_regcache): ... this. Adjust. Switch inferior before
7707 fetching registers.
7708 (regcache_invalidate_one): Adjust.
7709 (regcache_invalidate): Fix prototype.
7710 (new_register_cache): Return the new register cache.
7711 (free_register_cache): Change prototype.
7712 (realloc_register_cache): Adjust.
7713 (registers_to_string): Change prototype to take a regcache. Adjust.
7714 (registers_from_string): Ditto.
7715 (register_data): Ditto.
7716 (supply_register): Ditto.
7717 (supply_register_by_name): Ditto.
7718 (collect_register): Ditto.
7719 (collect_register_as_string): Ditto.
7720 (collect_register_by_name): Ditto.
7721 * server.c (process_serial_event): Adjust.
7722 * linux-low.h (regset_fill_func, regset_store_func): Change
7723 prototype.
7724 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7725 Change prototype.
7726 * linux-low.c (get_stop_pc): Adjust.
7727 (check_removed_breakpoint): Adjust.
7728 (linux_wait_for_event): Adjust.
7729 (linux_resume_one_lwp): Adjust.
7730 (fetch_register): Add regcache parameter. Adjust.
7731 (usr_store_inferior_registers): Ditto.
7732 (regsets_fetch_inferior_registers): Ditto.
7733 (regsets_store_inferior_registers): Ditto.
7734 (linux_fetch_registers, linux_store_registers): Ditto.
7735 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7736 regcache. Adjust.
43aaf8b6
PA
7737 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7738 Ditto.
442ea881
PA
7739 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7740 prototype to take a regcache.
7741 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7742 * remote-utils.c (convert_ascii_to_int, outreg)
7743 (prepare_resume_reply): Change prototype to take a regcache.
7744 Adjust.
7745 * target.h (struct target_ops) <fetch_registers, store_registers>:
7746 Change prototype to take a regcache.
7747 (fetch_inferior_registers, store_inferior_registers): Change
7748 prototype to take a regcache. Adjust.
7749 * proc-service.c (ps_lgetregs): Adjust.
7750 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7751 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7752 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7753 take a regcache. Adjust.
7754 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7755 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7756 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7757 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7758 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7759 (cris_cannot_fetch_register):
7760 (cris_breakpoint_at): Change prototype to take a regcache.
7761 Adjust.
7762 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7763 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7764 to take a regcache. Adjust.
7765 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7766 Adjust.
7767 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7768 take a regcache. Adjust.
7769 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7770 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7771 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7772 * linux-mips-low.c (mips_get_pc):
7773 (mips_set_pc): Change prototype to take a regcache. Adjust.
7774 (mips_reinsert_addr): Adjust.
7775 (mips_collect_register): Change prototype to take a regcache.
7776 Adjust.
7777 (mips_supply_register):
7778 (mips_collect_register_32bit, mips_supply_register_32bit)
7779 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7780 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7781 * linux-ppc-low.c (ppc_supply_ptrace_register)
7782 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7783 (parse_spufs_run): Adjust.
7784 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7785 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7786 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7787 take a regcache. Adjust.
7788 * linux-s390-low.c (s390_collect_ptrace_register)
7789 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7790 (s390_set_pc): Change prototype to take a regcache. Adjust.
7791 (s390_arch_setup): Adjust.
7792 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7793 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7794 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7795 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7796 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7797 regcache. Adjust.
7798 (sparc_breakpoint_at): Adjust.
7799 * linux-xtensa-low.c (xtensa_fill_gregset):
7800 (xtensa_store_gregset):
7801 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7802 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7803 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7804 prototype to take a regcache. Adjust.
7805 * win32-arm-low.c (arm_fetch_inferior_register)
7806 (arm_store_inferior_register): Change prototype to take a
7807 regcache. Adjust.
7808 * win32-i386-low.c (i386_fetch_inferior_register)
7809 (i386_store_inferior_register): Change prototype to take a
7810 regcache. Adjust.
7811 * win32-low.c (child_fetch_inferior_registers)
7812 (child_store_inferior_registers): Change prototype to take a
7813 regcache. Adjust.
7814 (win32_wait): Adjust.
7815 (win32_fetch_inferior_registers): Change prototype to take a
7816 regcache. Adjust.
7817 (win32_store_inferior_registers): Adjust.
7818 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7819 store_inferior_register>: Change prototype to take a regcache.
7820
60c3d7b0
DE
78212010-01-20 Doug Evans <dje@google.com>
7822
7823 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7824 #ifdef.
7825 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7826 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7827
dc146f7c
VP
78282010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7829
7830 * linux-low.c (linux_core_of_thread): New.
7831 (compare_ints, show_process, list_threads): New.
7832 (linux_qxfer_osdata): Report threads and cores.
7833 (linux_target_op): Register linux_core_of_thread.
7834 * remote-utils.c (prepare_resume_reply): Report the core.
7835 (buffer_xml_printf): Support %d specifier.
7836 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7837 New.
7838 (handle_query): Handle qXfer:threads. Announce availability
7839 thereof.
7840 * target.h (struct target_ops): New field core_of_thread.
7841
7803799a
UW
78422010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7843
7844 * Makefile.in (clean): Remove new generated files.
7845 (reg-s390.o, reg-s390.c): Remove rules.
7846 (reg-s390x.o, reg-s390x.c): Likewise.
7847 (s390-linux32.o, s390-linux32.c): Add rules.
7848 (s390-linux64.o, s390-linux64.c): Likewise.
7849 (s390x-linux64.o, s390x-linux64.c): Likewise.
7850 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7851 * linux-s390-low.c: Include <elf.h>.
7852 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7853 (init_registers_s390): Remove prototype.
7854 (init_registers_s390x): Likewise.
7855 (init_registers_s390_linux32): Add prototype.
7856 (init_registers_s390_linux64): Likewise.
7857 (init_registers_s390x_linux64): Likewise.
7858 (s390_num_regs_3264): New define.
7859 (s390_regmap_3264): New global variable.
7860 (s390_cannot_fetch_register): Remove obsolete check.
7861 (s390_cannot_store_register): Likewise.
7862 (s390_collect_ptrace_register): Handle upper/lower register halves.
7863 (s390_supply_ptrace_register): Likewise.
7864 (s390_fill_gregset): Update to register number changes.
7865 (s390_get_hwcap): New routine.
7866 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7867 Install appropriate regmap and register set.
7868
6e7ffa39
JB
78692010-01-01 Joel Brobecker <brobecker@adacore.com>
7870
7871 * server.c (gdbserver_version): Update copyright year to 2010.
7872 * gdbreplay.c (gdbreplay_version): Likewise.
7873
957f3f49
DE
78742009-12-28 Doug Evans <dje@google.com>
7875
7876 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7877 elf/external.h. Include <elf.h> instead but only if necessary.
7878
ca5c370d
PA
78792009-12-28 Pedro Alves <pedro@codesourcery.com>
7880
7881 * linux-low.c (linux_remove_process): Remove `detaching'
7882 parameter. Don't release/detach from thread_db here.
7883 (linux_kill): Release/detach from thread_db here, ...
7884 (linux_detach): ... and here, before actually detaching.
7885 (linux_wait_1): ... and here, when a process exits.
7886 * thread-db.c (any_thread_of): New.
7887 (thread_db_free): Switch the current inferior to a thread of the
7888 passed in process.
7889
4ee62156
DE
78902009-12-21 Doug Evans <dje@google.com>
7891
d90e6a88
DE
7892 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7893
c5f62d5f
DE
7894 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7895 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7896 warning ifndef __NR_tkill. Move setting of errno there too.
7897 Delete unnecessary resetting of errno after syscall.
7898 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7899
10e86dd7
DE
7900 * configure.ac: Check for dladdr.
7901 * config.in: Regenerate.
7902 * configure: Regenerate.
7903 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7904 (try_thread_db_load): Update.
7905
4ee62156
DE
7906 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7907
00f515da
DE
79082009-12-18 Doug Evans <dje@google.com>
7909
e9464885
DE
7910 * event-loop.c: Include unistd.h if it exists.
7911
07d4f67e
DE
7912 * linux-low.c (my_waitpid): Move definition away from being in
7913 between linux_tracefork_child/linux_test_for_tracefork.
7914
00f515da
DE
7915 * gdb_proc_service.h (psaddr_t): Fix type.
7916 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7917 signature to match glibc.
7918
1de1badb
DE
79192009-12-16 Doug Evans <dje@google.com>
7920
7921 * linux-low.c (linux_read_memory): Fix argument to read.
7922
aeeb81d1
PA
79232009-11-26 Pedro Alves <pedro@codesourcery.com>
7924
7925 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7926 events, don't leave current_inferior pointing at null.
7927
10357975
PA
79282009-11-26 Pedro Alves <pedro@codesourcery.com>
7929
7930 * win32-low.c (LOG): Delete.
7931 (OUTMSG): Output to stderr.
7932 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7933 on compile time LOG macro.
7934 (win32_wait): Fix debug output.
7935
cf6e3471
PA
79362009-11-26 Pedro Alves <pedro@codesourcery.com>
7937
7938 * win32-low.c (win32_add_one_solib): If the dll name is
7939 "ntdll.dll", prepend the system directory to the dll path.
7940
0c85e18e
MK
79412009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7942
7943 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7944
9ac544ce 79452009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7946 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7947
7948 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7949 * configure.ac: Check for __mcoldfire__ and set
7950 gdb_cv_m68k_is_coldfire.
7951 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7952 reg-cf.o and reg-m68k.o.
7953 * configure: Regenerated.
7954
fd7dd3e6
PA
79552009-11-16 Pedro Alves <pedro@codesourcery.com>
7956
7957 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7958 Pass it to thread_db_free.
7959 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7960 proper `detaching' argument to linux_remove_process.
7961 * linux-low.h (thread_db_free): Add `detaching' parameter.
7962 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7963 to thread_db_free.
7964 (thread_db_free): Add `detaching' parameter. Only
7965 call td_ta_clear_event if detaching from process.
7966
75aa492e
MK
79672009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7968
7969 * thread-db.c (thread_db_free): Fix typo.
7970
21e1bee4
PP
79712009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7972
7973 PR gdb/10838
7974 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7975
8838b45e
NS
79762009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7977
7978 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7979 with an i686 compiler.
7980 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7981 needed.
7982 * configure: Rebuilt.
7983
8a35fb51
SL
79842009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7985
7986 PR gdb/10783
7987
7988 * server.c (handle_search_memory_1): Correct read_addr initialization
7989 in loop for searching subsequent chunks.
7990
96f15937
PP
79912009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7992
7993 * configure.ac: New --with-libthread-db option.
7994 * thread-db.c: Allow direct dependence on libthread_db.
7995 (thread_db_free): Adjust.
7996 * config.in: Regenerate.
7997 * configure: Likewise.
889bf7c5 7998
5f7d1694
PP
79992009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8000
8001 PR gdb/10757
8002 * thread-db.c (attach_thread): New function.
8003 (maybe_attach_thread): Return success/failure.
8004 (find_new_threads_callback): Adjust.
889bf7c5
PA
8005 (thread_db_find_new_threads): Loop until no new threads.
8006
88e3b899
PA
80072009-10-13 Pedro Alves <pedro@codesourcery.com>
8008
8009 * proc-service.c (ps_lgetregs): Formatting.
8010
cdbfd419
PP
80112009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8012
8013 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8014 * configure.ac: Adjust.
8015 * linux-low.h (struct process_info_private): Move members to struct
8016 thread_db.
8017 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8018 * linux-low.c (linux_remove_process): Adjust.
8019 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8020 * server.c (handle_query): Move code ...
8021 (handle_monitor_command): ... here. New function.
8022 * target.h (struct target_ops): New member.
8023 * thread-db.c (struct thread_db): New.
8024 (libthread_db_search_path): New variable.
8025 (thread_db_create_event, thread_db_enable_reporting)
8026 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8027 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8028 (try_thread_db_load_1, dladdr_to_soname): New functions.
8029 (try_thread_db_load, thread_db_load_search): New functions.
8030 (thread_db_init): Search for libthread_db.
8031 (thread_db_free): New function.
8032 (thread_db_handle_monitor_command): Likewise.
8033 * config.in: Regenerate.
8034 * configure: Regenerate.
889bf7c5 8035
4168d2d6
UW
80362009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8037
8038 * spu-low.c (spu_kill): Wait for inferior to terminate.
8039 Call clear_inferiors.
8040 (spu_detach): Call clear_inferiors.
8041
81ecdfbb
RW
80422009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8043
8044 * aclocal.m4: Regenerate.
8045 * config.in: Likewise.
8046 * configure: Likewise.
8047
0b9ff2c0
UW
80482009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8049
8050 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8051 (parse_spufs_run): New function.
8052 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8053 (ppc_breakpoint_at): Handle SPU breakpoints.
8054
efcbbd14
UW
80552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8056
8057 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8058 (SPUFS_MAGIC): Define.
8059 (spu_enumerate_spu_ids): New function.
8060 (linux_qxfer_spu): New function.
8061 (linux_target_ops): Install linux_qxfer_spu.
8062
f4d9bade
UW
80632009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8064
8065 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8066 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8067 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8068 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8069 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8070 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8071 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8072 (init_registers_powerpc_cell32l): Add prototype.
8073 (init_registers_powerpc_cell64l): Likewise.
8074 (ppc_arch_setup): Detect Cell/B.E. architecture.
8075
96e946ca
RW
80762009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8077
8078 * Makefile.in (datarootdir): New variable.
8079
58d6951d
DJ
80802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8081
8082 * linux-low.c (linux_write_memory): Update debugging output.
8083 * Makefile.in (clean): Add new descriptions.
8084 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8085 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8086 * configure.srv: Add new files for arm*-*-linux*.
8087 * linux-arm-low.c: Add new declarations.
8088 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8089 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8090 (HWCAP_VFPv3D16): New.
8091 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8092 instead of __IWMMXT__.
8093 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8094 (arm_arch_setup): New.
8095 (target_regsets): Remove #ifdef. Add VFP regset.
8096 (the_low_target): Use arm_arch_setup.
8097
12b42a12
DJ
80982009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8099
8100 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8101 the main thread again.
8102
ac8c974e
AR
81032009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8104
8105 Adding Neutrino gdbserver.
8106 * configure: Regenerated.
8107 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8108 * configure.srv (i[34567]86-*-nto*): New target.
8109 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8110 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8111 (nto_comctrl) [__QNX__]: New function.
8112 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8113
4424e0c3 81142009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8115
8116 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8117 srv_tgtobj.
8118
912cf4ba
PA
81192009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8120 Pedro Alves <pedro@codesourcery.com>
8121
8122 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8123 don't support CONTEXT_EXTENDED_REGISTERS.
8124 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8125 (the_low_target): Install them.
8126 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8127 failing with ERROR_PIPE_NOT_CONNECTED.
8128
aa5ca48f
DE
81292009-06-30 Doug Evans <dje@google.com>
8130 Pierre Muller <muller@ics.u-strasbg.fr>
8131
8132 Add h/w watchpoint support to x86-linux, win32-i386.
8133 * Makefile.in (SFILES): Add i386-low.c
8134 (i386_low_h): Define.
8135 (i386-low.o): Add dependencies.
8136 (linux-x86-low.o): Add i386-low.h dependency.
8137 (win32-i386-low.o): Ditto.
8138 * i386-low.c: New file.
8139 * i386-low.h: New file.
8140 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8141 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8142 * linux-low.c (linux_add_process): Initialize arch_private.
8143 (linux_remove_process): Free arch_private.
8144 (add_lwp): Initialize arch_private.
8145 (delete_lwp): Free arch_private.
8146 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8147 provided.
8148 * linux-low.h (process_info_private): New member arch_private.
8149 (lwp_info): New member arch_private.
8150 (linux_target_ops): New members new_process, new_thread,
8151 prepare_to_resume.
8152 (ptid_of): New macro.
8153 * linux-x86-low.c: Include stddef.h, i386-low.h.
8154 (arch_process_info): New struct.
8155 (arch_lwp_info): New struct.
8156 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8157 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8158 (i386_dr_low_get_status): New function.
8159 (x86_insert_point, x86_remove_point): New functions.
8160 (x86_stopped_by_watchpoint): New function.
8161 (x86_stopped_data_address): New function.
8162 (x86_linux_new_process, x86_linux_new_thread): New functions.
8163 (x86_linux_prepare_to_resume): New function.
8164 (the_low_target): Add entries for insert_point, remove_point,
8165 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8166 prepare_to_resume.
8167 * server.c (debug_hw_points): New global.
8168 (monitor_show_help): Document set debug-hw-points.
8169 (handle_query): Process "set debug-hw-points".
8170 * server.h (debug_hw_points): Declare.
8171 (paddress): Declare.
8172 * utils.c (NUMCELLS, CELLSIZE): New macros.
8173 (get_sell, xsnprintf, paddress): New functions.
8174 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8175 remove_point, stopped_by_watchpoint, stopped_data_address.
8176 * win32-i386-low.c: Include i386-low.h.
8177 (debug_reg_state): Replaces dr.
8178 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8179 (i386_dr_low_get_status): New function.
8180 (i386_insert_point, i386_remove_point): New functions.
8181 (i386_stopped_by_watchpoint): New function.
8182 (i386_stopped_data_address): New function.
8183 (i386_initial_stuff): Update.
8184 (get_thread_context,set_thread_context,i386_thread_added): Update.
8185 (the_low_target): Add entries for insert_point,
8186 remove_point, stopped_by_watchpoint, stopped_data_address.
8187 * win32-low.c (win32_insert_watchpoint): New function.
8188 (win32_remove_watchpoint): New function.
8189 (win32_stopped_by_watchpoint): New function.
8190 (win32_stopped_data_address): New function.
8191 (win32_target_ops): Add entries for insert_watchpoint,
8192 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8193 * win32-low.h (win32_target_ops): New members insert_point,
8194 remove_point, stopped_by_watchpoint, stopped_data_address.
8195
d993e290
PA
81962009-06-25 Pedro Alves <pedro@codesourcery.com>
8197
8198 * server.c (process_serial_event): Re-return unsupported, not
8199 error, if the type isn't recognized. Re-allow supporting only
8200 insert or remove packets. Also call require_running for
8201 breakpoints. Add missing break statement to default case. Tidy.
8202 * target.h (struct target_ops): Rename insert_watchpoint to
8203 insert_point, and remove_watchpoint to remove_point.
8204
8205 * linux-low.h (struct linux_target_ops): Likewise.
8206 * linux-low.c (linux_insert_watchpoint): Rename to ...
8207 (linux_insert_point): ... this. Adjust.
8208 (linux_remove_watchpoint): Rename to ...
8209 (linux_remove_point): ... this. Adjust.
8210 (linux_target_ops): Adjust.
8211 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8212 (cris_insert_point): ... this.
8213 (cris_remove_watchpoint): Rename to ...
8214 (cris_remove_point): ... this.
8215 (the_low_target): Adjust.
8216
0f54c268
PM
82172009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8218
8219 * server.c (handle_v_kill): Pass signal_pid to
8220 kill_inferior if multi_process is zero.
8221
c6314022
AR
82222009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8223
8224 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8225 * target.h (target_ops): Comment for *_watchpoint to make it clear
8226 the functions can get types '0' and '1'.
8227
4463ce24
AR
82282009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8229
8230 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8231 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8232 * regcache.c (get_regcache): Likewise.
8233 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8234 * win32-low.c (child_fetch_inferior_registers): Remove check for
8235 regno 0.
8236
cf8fd78b
PA
82372009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8238 Pedro Alves <pedro@codesourcery.com>
8239
8240 * target.h (struct target_ops) <supports_multi_process>: New
8241 callback.
8242 (target_supports_multi_process): New.
8243 * server.c (handle_query): Even if GDB reports support, only
8244 enable multi-process if the target also supports it. Report
8245 multi-process support only if the target backend supports it.
8246 * linux-low.c (linux_supports_multi_process): New function.
8247 (linux_target_ops): Install it as target_supports_multi_process
8248 callback.
8249
47c0c975
DE
82502009-05-24 Doug Evans <dje@google.com>
8251
e09875d4
DE
8252 Global renaming of find_thread_pid to find_thread_ptid.
8253 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8254 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8255 All callers updated.
8256
e27d73f6
DE
8257 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8258 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8259 directly.
8260
47c0c975
DE
8261 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8262 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8263 (linux_resume_one_lwp): Ditto.
8264
2acc282a
DE
82652009-05-23 Doug Evans <dje@google.com>
8266
8267 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8268 from struct inferior_list_entry * to struct lwp_info *.
8269 All callers updated.
8270
9f1036c1
DE
82712009-05-13 Doug Evans <dje@google.com>
8272
8273 * linux-x86-low.c: Don't include assert.h.
8274 (x86_siginfo_fixup): Use fatal, not assert.
8275 (x86_arch_setup): Fix comment.
8276
d0722149
DE
82772009-05-12 Doug Evans <dje@google.com>
8278
8279 Biarch support for i386/amd64 gdbserver.
8280 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8281 Add linux-x86-low.c.
8282 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8283 (linux-x86-low.o): Add.
8284 * linux-x86-64-low.c: Delete.
8285 * linux-i386-low.c: Delete.
8286 * linux-x86-low.c: New file.
8287 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8288 linux-x86-low.o.
8289 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8290 linux-x86-low.o.
8291 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8292 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8293 (linux_child_pid_to_exec_file): New function.
8294 (elf_64_header_p, elf_64_file_p): New functions.
8295 (siginfo_fixup): New function.
8296 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8297 give target a chance to convert layout.
8298 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8299 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8300
fdeb2a12
DE
83012009-05-07 Doug Evans <dje@google.com>
8302
8303 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8304 (regsets_store_inferior_registers): Ditto.
8305
a6dbe5df
PA
83062009-05-06 Pedro Alves <pedro@codesourcery.com>
8307
8308 PR server/10048
8309
8310 * linux-low.c (must_set_ptrace_flags): Delete.
8311 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8312 of the global.
8313 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8314 `lwp->must_set_ptrace_flags' instead.
ba42693b 8315 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8316 (linux_wait_1): ... not here.
8317
5091eb23
DE
83182009-04-30 Doug Evans <dje@google.com>
8319
9f767825
DE
8320 * inferiors.c (started_inferior_callback): New function.
8321 (attached_inferior_callback): New function.
8322 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8323 * server.c (print_started_pid, print_attached_pid): New functions.
8324 (detach_or_kill_for_exit): New function.
8325 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8326 * server.h (have_started_inferiors_p): Declare.
8327 (have_attached_inferiors_p): Declare.
8328
5091eb23
DE
8329 * inferiors.c (remove_process): Fix memory leak, free process.
8330 * linux-low.c (linux_remove_process): New function.
8331 (linux_kill): Call it instead of remove_process.
8332 (linux_detach, linux_wait_1): Ditto.
8333
155c8968
PA
83342009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8335
8336 * configure.srv: Add x86 Windows CE target.
8337
7fe519cb
UW
83382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8339
8340 * inferiors.c (get_thread_process): Make global.
8341 * server.h (get_thread_process): Add prototype.
8342 * thread-db.c (find_one_thread): Use get_thread_process
8343 instead of current_process.
8344 (thread_db_get_tls_address): Do not crash if called when
8345 thread layer is not yet initialized.
8346
5472f405
UW
83472009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8348
8349 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8350 * spu-low.c (current_tid): Rename to ...
8351 (current_ptid): ... this.
8352 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8353 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8354 ptid_get_lwp (current_ptid) instead of current_tid.
8355 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8356 instead of current_tid. Use find_process_pid to verify pid
8357 argument is valid. Pass proper argument to remove_process.
8358 (spu_thread_alive): Compare current_ptid instead of current_tid.
8359 (spu_resume): Likewise.
8360
55ac2b99
PA
83612009-04-02 Pedro Alves <pedro@codesourcery.com>
8362
8363 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8364 variable.
8365
95954743
PA
83662009-04-01 Pedro Alves <pedro@codesourcery.com>
8367
8368 Implement the multiprocess extensions, and add linux multiprocess
8369 support.
8370
8371 * server.h (ULONGEST): Declare.
8372 (struct ptid, ptid_t): New.
8373 (minus_one_ptid, null_ptid): Declare.
8374 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8375 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8376 (struct inferior_list_entry): Change `id' type from unsigned from
8377 to ptid_t.
8378 (struct sym_cache, struct breakpoint, struct
8379 process_info_private): Forward declare.
8380 (struct process_info): Declare.
8381 (current_process): Declare.
8382 (all_processes): Declare.
8383 (initialize_inferiors): Declare.
8384 (add_thread): Adjust to use ptid_t.
8385 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8386 (add_process, remove_process, find_thread_pid): Declare.
8387 (find_inferior_id): Adjust to use ptid_t.
8388 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8389 (multi_process): Declare.
8390 (push_event): Adjust to use ptid_t.
8391 (read_ptid, write_ptid): Declare.
8392 (prepare_resume_reply): Adjust to use ptid_t.
8393 (clear_symbol_cache): Declare.
8394 * inferiors.c (all_processes): New.
8395 (null_ptid, minus_one_ptid): New.
8396 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8397 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8398 (add_thread): Change unsigned long to ptid. Remove gdb_id
8399 parameter. Adjust.
8400 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8401 (gdb_id_to_thread): Rename to ...
8402 (find_thread_pid): ... this. Change unsigned long to ptid.
8403 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8404 (loaded_dll, pull_pid_from_list): Adjust.
8405 (add_process, remove_process, find_process_pid)
8406 (get_thread_process, current_process, initialize_inferiors): New.
8407 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8408 (struct target_waitstatus) <related_pid>: Ditto.
8409 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8410 return type to int.
8411 (struct target_ops) <join>: Add `pid' argument.
8412 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8413 (struct target_ops) <wait>: Add `ptid' field. Change return type
8414 to ptid.
8415 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8416 (mywait): Add `ptid' argument. Change return type to ptid_t.
8417 (target_pid_to_str): Declare.
8418 * target.c (set_desired_inferior): Adjust to use ptids.
8419 (mywait): Add new `ptid' argument. Adjust.
8420 (target_pid_to_str): New.
8421 * mem-break.h (free_all_breakpoints): Declare.
8422 * mem-break.c (breakpoints): Delelete.
8423 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8424 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8425 to use per-process breakpoint list.
8426 (free_all_breakpoints): New.
8427 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8428 (symbol_cache, all_symbols_looked_up): Delete.
8429 (hexchars): New.
8430 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8431 read_ptid): New.
8432 (prepare_resume_reply): Change ptid argument's type from unsigned
8433 long to ptid_t. Adjust. Implement W;process and X;process.
8434 (free_sym_cache, clear_symbol_cache): New.
8435 (look_up_one_symbol): Adjust to per-process symbol cache. *
8436 * server.c (cont_thread, general_thread, step_thread): Change type
8437 to ptid_t.
8438 (attached): Delete.
8439 (multi_process): New.
8440 (last_ptid): Change type to ptid_t.
8441 (struct vstop_notif) <ptid>: Change type to ptid_t.
8442 (queue_stop_reply, push_event): Change `ptid' argument's type to
8443 ptid_t.
8444 (discard_queued_stop_replies): Add `pid' argument.
8445 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8446 changes. Don't reference the `attached' global.
8447 (attach_inferior): Adjust to mywait interface changes.
8448 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8449 features. Handle and report "multiprocess+". Handle
8450 "qAttached:PID".
8451 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8452 changes.
8453 (handle_v_kill): New.
8454 (handle_v_stopped): Adjust to use target_pid_to_str.
8455 (handle_v_requests): Allow multiple attaches and runs when
8456 multiprocess extensions are in effect. Handle "vKill".
8457 (myresume): Adjust to use ptids.
8458 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8459 (handle_status): Adjust to discard_queued_stop_replies interface
8460 change.
8461 (first_thread_of, kill_inferior_callback)
8462 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8463 (main): Call initialize_inferiors. Adjust to use ptids, killing
8464 and detaching from all inferiors. Handle multiprocess packet
8465 variants.
8466 * linux-low.h: Include gdb_proc_service.h.
8467 (struct process_info_private): New.
8468 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8469 <lwpid_of>: Use ptid_get_lwp.
8470 (get_lwp_thread): Adjust.
8471 (struct lwp_info): Add `dead' member.
8472 (find_lwp_pid): Declare.
8473 * linux-low.c (thread_db_active): Delete.
8474 (new_inferior): Adjust comment.
8475 (inferior_pid): Delete.
8476 (linux_add_process): New.
8477 (handle_extended_wait): Adjust.
8478 (add_lwp): Change unsigned long to ptid.
8479 (linux_create_inferior): Add process to processes table. Adjust
8480 to use ptids. Don't set new_inferior here.
8481 (linux_attach_lwp): Rename to ...
8482 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8483 it. Adjust to use ptids.
8484 (linux_attach_lwp): New.
8485 (linux_attach): Add process to processes table. Don't set
8486 new_inferior here.
8487 (struct counter): New.
8488 (second_thread_of_pid_p, last_thread_of_process_p): New.
8489 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8490 multiple processes.
8491 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8492 processes. Remove process from process table.
8493 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8494 to multiple processes.
8495 (any_thread_of): New.
8496 (linux_detach): Add `pid' argument, and handle it. Remove process
8497 from processes table.
8498 (linux_join): Add `pid' argument. Handle it.
8499 (linux_thread_alive): Change unsighed long argument to ptid_t.
8500 Consider dead lwps as not being alive.
8501 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8502 threads we're not interested in.
8503 (same_lwp, find_lwp_pid): New.
8504 (linux_wait_for_lwp): Change `pid' argument's type from int to
8505 ptid_t. Adjust.
8506 (linux_wait_for_event): Rename to ...
8507 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8508 from int to ptid_t. Adjust.
8509 (linux_wait_for_event): New.
8510 (linux_wait_1): Add `ptid' argument. Change return type to
8511 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8512 that exit from the process table.
8513 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8514 Adjust.
8515 (mark_lwp_dead): New.
8516 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8517 stopping all threads, mark its main lwp as dead.
8518 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8519 ptids.
8520 (fetch_register, usr_store_inferior_registers)
8521 (regsets_fetch_inferior_registers)
8522 (regsets_store_inferior_registers, linux_read_memory)
8523 (linux_write_memory): Inline `inferior_pid'.
8524 (linux_look_up_symbols): Adjust to use per-process
8525 `thread_db_active'.
8526 (linux_request_interrupt): Adjust to use ptids.
8527 (linux_read_auxv): Inline `inferior_pid'.
8528 (initialize_low): Don't reference thread_db_active.
8529 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8530 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8531 (ps_getpid): Return the pid of the current inferior.
8532 * thread-db.c (proc_handle, thread_agent): Delete.
8533 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8534 per-process data.
8535 (find_one_thread): Change argument type to ptid_t. Adjust to
8536 per-process data.
8537 (maybe_attach_thread): Adjust to per-process data and ptids.
8538 (thread_db_find_new_threads): Ditto.
8539 (thread_db_init): Ditto.
8540 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8541 processes table. Adjust to use ptids.
8542 (spu_kill, spu_detach): Adjust interface. Remove process from
8543 processes table.
8544 (spu_join, spu_thread_alive): Adjust interface.
8545 (spu_wait): Adjust interface. Remove process from processes
8546 table. Adjust to use ptids.
8547 * win32-low.c (current_inferior_tid): Delete.
8548 (current_inferior_ptid): New.
8549 (debug_event_ptid): New.
8550 (thread_rec): Take a ptid. Adjust.
8551 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8552 (child_delete_thread): Ditto.
8553 (do_initial_child_stuff): Add `attached' argument. Add process to
8554 processes table.
8555 (child_fetch_inferior_registers, child_store_inferior_registers):
8556 Adjust.
8557 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8558 (win32_attach): Pass 1 to do_initial_child_stuff.
8559 (win32_kill): Adjust interface. Remove process from processes
8560 table.
8561 (win32_detach): Ditto.
8562 (win32_join): Adjust interface.
8563 (win32_thread_alive): Take a ptid.
8564 (win32_resume): Adjust to use ptids.
8565 (get_child_debug_event): Ditto.
8566 (win32_wait): Adjust interface. Remove exiting process from
8567 processes table.
8568
bd99dc85
PA
85692009-04-01 Pedro Alves <pedro@codesourcery.com>
8570
8571 Non-stop mode support.
8572
8573 * server.h (non_stop): Declare.
8574 (gdb_client_data, handler_func): Declare.
8575 (delete_file_handler, add_file_handler, start_event_loop):
8576 Declare.
8577 (handle_serial_event, handle_target_event, push_event)
8578 (putpkt_notif): Declare.
8579 * target.h (enum resume_kind): New.
8580 (struct thread_resume): Replace `step' field by `kind' field.
8581 (TARGET_WNOHANG): Define.
8582 (struct target_ops) <wait>: Add `options' argument.
8583 <supports_non_stop, async, start_non_stop>: New fields.
8584 (target_supports_non_stop, target_async): New.
8585 (start_non_stop): Declare.
8586 (mywait): Add `options' argument.
8587 * target.c (mywait): Add `options' argument. Print child exit
8588 notifications here.
8589 (start_non_stop): New.
8590 * server.c (non_stop, own_buf, mem_buf): New globals.
8591 (struct vstop_notif): New.
8592 (notif_queue): New global.
8593 (queue_stop_reply, push_event, discard_queued_stop_replies)
8594 (send_next_stop_reply): New.
8595 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8596 interface changes.
8597 (attach_inferior): In non-stop mode, don't wait for the target
8598 here.
8599 (handle_general_set): Handle QNonStop.
8600 (handle_query): When handling qC, return the current general
8601 thread, instead of the first thread of the list.
8602 (handle_query): If the backend supports non-stop mode, include
8603 QNonStop+ in the qSupported query response.
8604 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8605 and non-stop mode.
8606 (handle_v_attach, handle_v_run): Handle non-stop mode.
8607 (handle_v_stopped): New.
8608 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8609 (myresume): Adjust to use resume_kind. Handle non-stop.
8610 (queue_stop_reply_callback): New.
8611 (handle_status): Handle non-stop mode.
8612 (main): Clear non_stop flag on reconnection. Use the event-loop.
8613 Refactor serial protocol handling from here ...
8614 (process_serial_event): ... to this new function. When GDB
8615 selects any thread, select one here. In non-stop mode, wait until
8616 GDB acks all pending events before exiting.
8617 (handle_serial_event, handle_target_event): New.
8618 * remote-utils.c (remote_open): Install remote_desc in the event
8619 loop.
8620 (remote_close): Remove remote_desc from the event loop.
8621 (putpkt_binary): Rename to...
8622 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8623 (putpkt_binary): New as wrapper around putpkt_binary_1.
8624 (putpkt_notif): New.
8625 (prepare_resume_reply): In non-stop mode, don't change the
8626 general_thread.
8627 * event-loop.c: New.
8628 * Makefile.in (OBJ): Add event-loop.o.
8629 (event-loop.o): New rule.
8630
8631 * linux-low.h (pid_of): Moved here.
8632 (lwpid_of): New.
8633 (get_lwp_thread): Use lwpid_of.
8634 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8635 * linux-low.c (pid_of): Delete.
8636 (inferior_pid): Use lwpid_of.
8637 (linux_event_pipe): New.
8638 (target_is_async_p): New.
8639 (delete_lwp): New.
8640 (handle_extended_wait): Use lwpid_of.
8641 (add_lwp): Don't set lwpid field.
8642 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8643 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8644 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8645 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8646 first. Adjust to linux_wait_for_event interface changes. Use
8647 lwpid_of.
8648 (linux_detach): Don't delete the main lwp here.
8649 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8650 (status_pending_p): Don't consider explicitly suspended lwps.
8651 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8652 pointer. Add OPTIONS argument. Change return type to int. Use
8653 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8654 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8655 pointer. Add status pointer argument. Return a pid instead of a
8656 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8657 changes. In non-stop mode, don't switch to a random thread.
8658 (linux_wait): Rename to...
8659 (linux_wait_1): ... this. Add target_options argument, and handle
8660 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8661 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8662 clean exit and signal exit code. Don't stop all threads in
8663 non-stop mode. In all-stop mode, only stop all threads when
8664 reporting a stop to GDB. Handle explicit thread stop requests.
8665 (async_file_flush, async_file_mark): New.
8666 (linux_wait): New.
8667 (send_sigstop): Use lwpid_of.
8668 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8669 interface changes. In non-stop mode, don't switch to a random
8670 thread.
8671 (linux_resume_one_lwp): Use lwpid_of.
8672 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8673 (linux_resume_one_thread): ... this. Handle resume_stop. In
8674 non-stop mode, don't look for pending flag in all threads.
8675 (resume_status_pending_p): Don't consider explicitly suspended
8676 threads.
8677 (my_waitpid): Reimplement. Emulate __WALL.
8678 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8679 Use lwpid_of.
8680 (sigchld_handler, linux_supports_non_stop, linux_async)
8681 (linux_start_non_stop): New.
8682 (linux_target_ops): Register linux_supports_non_stop, linux_async
8683 and linux_start_non_stop.
8684 (initialize_low): Install SIGCHLD handler.
8685 * thread-db.c (thread_db_create_event, find_one_thread)
8686 (thread_db_get_tls_address): Use lwpid_of.
8687 * win32-low.c (win32_detach): Adjust to use resume_kind.
8688 (win32_wait): Add `options' argument.
8689 * spu-low.c (spu_resume): Adjust to use resume_kind.
8690 (spu_wait): Add `options' argument.
8691
5b1c542e
PA
86922009-04-01 Pedro Alves <pedro@codesourcery.com>
8693
8694 Decouple target code from remote protocol.
8695
8696 * target.h (enum target_waitkind): New.
8697 (struct target_waitstatus): New.
8698 (struct target_ops) <wait>: Return an unsigned long. Take a
8699 target_waitstatus pointer instead of a char pointer.
8700 (mywait): Likewise.
8701 * target.c (mywait): Change prototype to return an unsigned long.
8702 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8703 * server.h (thread_from_wait, old_thread_from_wait): Delete
8704 declarations.
8705 (prepare_resume_reply): Change prototype to take a
8706 target_waitstatus.
8707 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8708 (last_status, last_ptid): New.
8709 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8710 pid instead of a signal.
8711 (attach_inferior): Remove "status" and "signal" parameters.
8712 Adjust.
8713 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8714 not as an address.
8715 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8716 (handle_v_requests, myresume): Remove "status" and "signal"
8717 parameters. Adjust.
8718 (handle_status): New.
8719 (main): Delete local `status'. Adjust.
8720 * remote-utils.c: Include target.h.
8721 (prepare_resume_reply): Change prototype to take a
8722 target_waitstatus. Adjust.
8723
8724 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8725 interface.
8726 * spu-low.c (spu_wait): Adjust.
8727 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8728 Delete.
8729 (win32_wait): Adjust.
8730
2bd7c093
PA
87312009-04-01 Pedro Alves <pedro@codesourcery.com>
8732
8733 * target.h (struct thread_resume): Delete leave_stopped member.
8734 (struct target_ops): Add a `n' argument to the `resume' callback.
8735 * server.c (start_inferior): Adjust.
8736 (handle_v_cont, myresume): Adjust.
8737 * linux-low.c (check_removed_breakpoint): Adjust to resume
8738 interface change, and to removed leave_stopped field.
8739 (resume_ptr): Delete.
8740 (struct thread_resume_array): New.
8741 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8742 resume interface change.
8743 (linux_continue_one_thread, linux_queue_one_thread)
8744 (resume_status_pending_p): Check if the resume field is NULL
8745 instead of checking the leave_stopped member.
8746 (linux_resume): Adjust to the target resume interface change.
8747 * spu-low.c (spu_resume): Adjust to the target resume interface
8748 change.
8749 * win32-low.c (win32_detach, win32_resume): Ditto.
8750
c35fafde
PA
87512009-04-01 Pedro Alves <pedro@codesourcery.com>
8752
8753 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8754 flag.
8755 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8756 pending.
8757 (linux_continue_one_thread): Only preserve the stepping flag if
8758 there's a pending breakpoint.
8759
0a59d50b
PA
87602009-03-31 Pedro Alves <pedro@codesourcery.com>
8761
8762 * server.c (main): After the inferior having exited, call
8763 remote_close before exiting gdbserver.
8764
f04c6d38
TJB
87652009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8766
8767 Fix size of FPSCR in Power 7 processors.
8768 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8769 (PPC_FEATURE_HAS_DFP): New #define.
8770 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8771 size of the FPSCR.
8772
78e5cee6
PA
87732009-03-23 Pedro Alves <pedro@codesourcery.com>
8774
8775 * server.c (handle_query) Whitespace and formatting.
8776
1b3f6016
PA
87772009-03-22 Pedro Alves <pedro@codesourcery.com>
8778
8779 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8780 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8781 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8782 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8783 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8784 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8785 Makefile.in, configure.ac: Fix whitespace throughout.
8786 * configure: Regenerate.
8787
a07b2135
PA
87882009-03-22 Pedro Alves <pedro@codesourcery.com>
8789
8790 * inferiors.c (find_inferior): Make it safe for the callback
8791 function to delete the currently iterated inferior.
8792
67cc2626
PA
87932009-03-22 Pedro Alves <pedro@codesourcery.com>
8794
8795 * Makefile.in (linuw_low_h): Move higher.
8796 (thread-db.o): Depend on $(linux_low_h).
8797
54a0b537
PA
87982009-03-17 Pedro Alves <pedro@codesourcery.com>
8799
8800 Rename "process" to "lwp" throughout.
8801
8802 * linux-low.c (all_processes): Rename to...
8803 (all_lwps): ... this.
8804 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8805 (add_process): Rename to ...
8806 (add_lwp): ... this. Adjust.
8807 (linux_create_inferior): Adjust.
8808 (linux_attach_lwp): Adjust.
8809 (linux_attach): Adjust.
8810 (linux_kill_one_process): Rename to ...
8811 (linux_kill_one_lwp): ... this. Adjust.
8812 (linux_kill): Adjust.
8813 (linux_detach_one_process): Rename to ...
8814 (linux_detach_one_lwp): ... this. Adjust.
8815 (linux_detach): Adjust.
8816 (check_removed_breakpoint): Adjust.
8817 (status_pending_p): Adjust.
8818 (linux_wait_for_process): Rename to ...
8819 (linux_wait_for_lwp): ... this. Adjust.
8820 (linux_wait_for_event): Adjust.
8821 (send_sigstop): Adjust.
8822 (wait_for_sigstop): Adjust.
8823 (stop_all_processes): Rename to ...
8824 (stop_all_lwps): ... this.
8825 (linux_resume_one_process): Rename to ...
8826 (linux_resume_one_lwp): ... this. Adjust.
8827 (linux_set_resume_request, linux_continue_one_thread)
8828 (linux_queue_one_thread, resume_status_pending_p)
8829 (usr_store_inferior_registers, regsets_store_inferior_registers)
8830 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8831 Adjust.
8832 * linux-low.h (get_process): Rename to ...
8833 (get_lwp): ... this. Adjust.
8834 (get_thread_process): Rename to ...
8835 (get_thread_lwp): ... this. Adjust.
8836 (get_process_thread): Rename to ...
8837 (get_lwp_thread): ... this. Adjust.
8838 (struct process_info): Rename to ...
8839 (struct lwp_info): ... this.
8840 (all_processes): Rename to ...
8841 (all_lwps): ... this.
8842 * proc-service.c (ps_lgetregs): Adjust.
8843 * thread-db.c (thread_db_create_event, find_one_thread)
8844 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8845
0b16c5cf
PA
88462009-03-14 Pedro Alves <pedro@codesourcery.com>
8847
8848 * server.c (handle_query): Handle "qAttached".
8849
32de4b9d
NS
88502009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8851
8852 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8853 GPLv3, update license URL.
8854
2aecd87f
DE
88552009-03-01 Doug Evans <dje@google.com>
8856
93efd302 8857 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8858 (server_h): Add gdb_signals.h.
8859 (signals.o): Update.
8860 * server.h (target_signal_from_host,target_signal_to_host_p)
8861 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8862
86b1f9c5
PM
88632009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8864
8865 * remote-utils.c (getpkt): Also generate remote-debug
8866 information if noack_mode is set.
8867
4aa995e1
PA
88682009-02-06 Pedro Alves <pedro@codesourcery.com>
8869
8870 * server.c (handle_query): Report qXfer:siginfo:read and
8871 qXfer:siginfo:write as supported and handle them.
8872 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8873 * linux-low.c (linux_xfer_siginfo): New.
8874 (linux_target_ops): Set it.
8875
62709adf
PA
88762009-01-26 Pedro Alves <pedro@codesourcery.com>
8877
8878 * server.c (gdbserver_usage): Mention --remote-debug.
8879 (main): Accept '--remote-debug' switch.
8880
aef93bd7
DE
88812009-01-18 Doug Evans <dje@google.com>
8882
8883 * regcache.c (new_register_cache): No need to check result of xcalloc.
8884 * server.c (handle_search_memory): Back out calls to xmalloc,
8885 result is checked and error is returned to user upon failure.
8886 (handle_query): Ditto. Add more checks for result of malloc.
8887 (handle_v_cont): Check result of malloc, report error back to
8888 user upon failure.
8889 (handle_v_run): Ditto. Call freeargv.
8890 * server.h (freeargv): Declare.
8891 * utils.c (freeargv): New fn.
8892
54363045
DE
88932009-01-15 Doug Evans <dje@google.com>
8894
f626972c
DE
8895 * gdbreplay.c (perror_with_name): Make arg const char *.
8896 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8897 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8898 * utils.c (perror_with_name): Make arg const char *.
54363045 8899
18aae699
PA
89002009-01-14 Pedro Alves <pedro@codesourcery.com>
8901
8902 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8903 when handling a EXIT_PROCESS_DEBUG_EVENT.
8904
ff703abe
JB
89052009-01-06 Joel Brobecker <brobecker@adacore.com>
8906
8907 * gdbreplay.c (gdbreplay_version): Update copyright year.
8908 * server.c (gdbserver_version): Likewise.
8909
f21cc1a2 89102009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8911
8912 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8913 (handle_extended_wait): Improve comment.
0e21c1ec 8914
bca929d3
DE
89152008-12-13 Doug Evans <dje@google.com>
8916
8917 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8918 * server.h (ATTR_MALLOC): New macro.
8919 (xmalloc,xcalloc,xstrdup): Declare.
8920 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8921 * inferiors.c: Ditto.
8922 * linux-low.c: Ditto.
8923 * mem-break.c: Ditto.
8924 * regcache.c: Ditto.
8925 * remote-utils.c: Ditto.
8926 * server.c: Ditto.
8927 * target.c: Ditto.
8928 * win32-low.c: Ditto.
8929
97438e3f
DE
89302008-12-12 Doug Evans <dje@google.com>
8931
896c7fbb
DE
8932 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8933 in debugging printf.
8934
97438e3f
DE
8935 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8936
e3b886f8
DE
89372008-12-09 Doug Evans <dje@google.com>
8938
8939 * linux-low.h (struct process_info): Delete member tid, unused.
8940 * thread-db.c (find_one_thread): Update.
8941 (maybe_attach_thread): Update.
8942
07e059b5
VP
89432008-12-02 Pedro Alves <pedro@codesourcery.com>
8944
889bf7c5
PA
8945 * target.h (struct target_ops): Add qxfer_osdata member.
8946 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8947 and dirent.h.
8948 (linux_qxfer_osdata): New functions.
8949 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8950 callback.
8951 * server.c (handle_query): Handle "qXfer:osdata:read:".
8952 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8953 (buffer_xml_printf): New functions.
8954 * server.h (struct buffer): New.
8955 (buffer_grow_str, buffer_grow_str0): New macros.
8956 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8957 (buffer_xml_printf): Declare.
07e059b5 8958
4cab47ab
DE
89592008-11-24 Doug Evans <dje@google.com>
8960
8961 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8962
f142445f
DJ
89632008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8964
8965 * server.c (handle_v_run): Always use the supplied argument list.
8966
d0107bb6 89672008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8968
d0107bb6
BW
8969 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8970 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8971
2c4ad781
TJB
89722008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8973
8974 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8975 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8976 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8977 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8978 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8979 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8980 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8981 XML target descriptions.
8982 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8983 when inferior is running on an ISA 2.05 or later processor. Add
8984 special case to return offset for full 64-bit slot of FPSCR when
8985 in 32-bits.
8986
dfb64f85
DJ
89872008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8988
8989 * Makefile.in (SFILES, clean): Added sparc64 files.
8990 (reg-sparc64.o, reg-sparc64.c): New.
8991 * configure.srv (sparc*-*-linux*): New configuration.
8992 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8993 syscall arguments for SPARC.
8994 (regsets_store_inferior_registers): Likewise.
8995 * linux-sparc-low.c: New file.
8996
66b6e1dd
DE
89972008-10-21 Doug Evans <dje@google.com>
8998
8999 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9000 (READLINE_DIR,READLINE_DEP): Delete.
9001 (INTERNAL_CFLAGS): Update.
9002 (LINTFLAGS): Update.
9003
9b710a42
PA
90042008-10-10 Pedro Alves <pedro@codesourcery.com>
9005
9006 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9007 whole argv from the last run, not just argv[0].
9008
5822d809
PA
90092008-09-08 Pedro Alves <pedro@codesourcery.com>
9010
9011 * regcache.c (new_register_cache): Return NULL if the register
9012 cache size isn't known yet.
9013 (free_register_cache): Avoid dereferencing a NULL regcache.
9014
74aac56f
DJ
90152008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9016
9017 * configure.srv: Merge MIPS and MIPS64.
9018
400b20f5
MR
90192008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9020
9021 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9022
677c5bb1
LM
90232008-08-18 Luis Machado <luisgpm@br.ibm.com>
9024
9025 * Makefile.in: Add required vsx dependencies.
9026
9027 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9028 Declare init_registers_powerpc_vsx32l.
9029 Declare init_registers_powerpc_vsx64l.
9030 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9031 (ppc_arch_setup): Check for VSX in hwcap.
9032 (ppc_fill_vsxregset): New function.
9033 (ppc_store_vsxregset): New function.
9034 Add new VSX entry in regset_info target_regsets.
9035
9036 * configure.srv: Add new VSX dependencies.
9037
a6f3e723
SL
90382008-08-12 Pedro Alves <pedro@codesourcery.com>
9039
9040 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9041 (remote_open): Set or clear transport_is_reliable.
9042 (putpkt_binary): Don't expect acks in noack mode.
9043 (getpkt): Don't send ack/nac in noack mode.
9044 * server.c (handle_general_set): Handle QStartNoAckMode.
9045 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9046 qSupported.
9047 (main): Reset noack_mode on every connection.
9048 * server.h (noack_mode): Declare.
9049
a417dc56
RW
90502008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9051
9052 * Makefile.in (GDBREPLAY_OBS): New variable.
9053 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9054
3221518c
UW
90552008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9056 Daniel Jacobowitz <dan@codesourcery.com>
9057
9058 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9059 (usr_store_inferior_registers): Likewise.
9060 (regsets_store_inferior_registers): Likewise.
9061
ec56be1b
PA
90622008-07-31 Rolf Jansen <rj@surtec.com>
9063 Pedro Alves <pedro@codesourcery.com>
9064
9065 * configure.ac: Check for memmem declaration.
9066 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9067 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9068 (disable_packet_qfThreadInfo): Unconditionally compile.
9069 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9070 * configure, config.in: Regenerate.
9071
2fe5e3ff
DE
90722008-07-28 Doug Kwan <dougkwan@google.com>
9073
9074 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9075 (linux_write_memory): Remove declaration of errno.
9076
836acd6d
UW
90772008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9078
9079 * linux-low.c (handle_extended_wait): Do not use "status"
9080 variable uninitialized.
9081
aeba519e
PA
90822008-07-07 Pedro Alves <pedro@codesourcery.com>
9083
9084 * server.c (handle_v_attach): Inhibit reporting dll changes.
9085
db42f210
PA
90862008-06-27 Pedro Alves <pedro@codesourcery.com>
9087
9088 * remote-utils.c (prepare_resume_reply): If requested, don't
9089 output "thread:TID" in the T stop reply.
9090
9091 * server.c (disable_packet_vCont, disable_packet_Tthread)
9092 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9093 (handle_query): If requested, disable support for qC, qfThreadInfo
9094 and qsThreadInfo.
9095 (handle_v_requests): If requested, disable support for vCont.
9096 (gdbserver_show_disableable): New.
9097 (main): Handle --disable-packet and --disable-packet=LIST.
9098
9099 * server.h (disable_packet_vCont, disable_packet_Tthread)
9100 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9101
8e4c5421
CD
91022008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9103
9104 * server.c (gdbserver_usage): Mention --version.
9105
6e23a804
DJ
91062008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9107
9108 * Makefile.in (gdbreplay.o): New rule.
9109
90aa6a40
JM
91102008-06-06 Joseph Myers <joseph@codesourcery.com>
9111
9112 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9113 message, not gdbserver.
9114
c16158bc 91152008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9116 Nathan Sidwell <nathan@codesourcery.com>
9117 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9118
9119 * acinclude.m4: Include ../../config/acx.m4.
9120 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9121 * configure, config.in: Regenerate.
9122 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9123 * server.c (gdbserver_version): Print PKGVERSION.
9124 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9125 (main): Adjust gdbserver_usage calls.
9126 * gdbreplay.c (version, host_name): Add declarations.
9127 (gdbreplay_version, gdbreplay_usage): New.
9128 (main): Accept --version and --help options.
9129
aeb75bf5
DJ
91302008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9131
9132 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9133 (arm_breakpoint_at): Handle Thumb.
9134 (the_low_target): Add comment.
9135
76b233dd
UW
91362008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9137
9138 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9139
08388c79
DE
91402008-05-09 Doug Evans <dje@google.com>
9141
a3c83fae
DE
9142 * server.h (decode_search_memory_packet): Declare.
9143 * remote-utils.c (decode_search_memory_packet): New fn.
9144 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9145 (handle_search_memory): New fn.
9146 (handle_query): Process qSearch:memory packets.
9147
bb9c3d36
UW
91482008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9149
9150 * regcache.c (registers_length): Remove.
9151 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9152 full register packet.
9153 * regcache.h (registers_length): Remove prototype.
9154 * server.h (PBUFSIZ): Define to 16384.
9155
7284e1be
UW
91562008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9157
9158 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9159 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9160 powerpc-64l.o, and powerpc-altivec64l.o.
9161 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9162 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9163 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9164 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9165 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9166 to srv_xmlfiles.
9167
9168 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9169 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9170 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9171 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9172 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9173 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9174 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9175 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9176 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9177 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9178 (clean): Update.
9179
9180 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9181 (init_registers_powerpc_32l): ... this new prototype.
9182 (init_registers_powerpc_32): Remove, replace by ...
9183 (init_registers_powerpc_altivec32l): ... this new prototype.
9184 (init_registers_powerpc_e500): Remove, replace by ...
9185 (init_registers_powerpc_e500l): ... this new prototype.
9186 (init_registers_ppc64): Remove, replace by ...
9187 (init_registers_powerpc_64l): ... this new prototype.
9188 (init_registers_powerpc_64): Remove, replace by ...
9189 (init_registers_powerpc_altivec64l): ... this new prototype.
9190 (ppc_num_regs): Set to 73.
9191 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9192 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9193 (ppc_cannot_store_register): Handle orig_r3 and trap.
9194 (ppc_arch_setup): Update init_registers_... calls.
9195 (ppc_fill_gregset): Handle orig_r3 and trap.
9196
9197 * inferiors.c (clear_inferiors): Reset current_inferior.
9198
fdc59709
PB
91992008-04-23 Paolo Bonzini <bonzini@gnu.org>
9200
889bf7c5
PA
9201 * acinclude.m4: Add override.m4.
9202 * configure: Regenerate.
fdc59709 9203
c9b2f845
UW
92042008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9205
9206 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9207 initial call to init_register_ppc64.
9208
550512b8
UW
92092008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9210
43aaf8b6
PA
9211 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9212 single powerpc*-*-linux* case.
550512b8
UW
9213 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9214
b6430ec3
UW
92152008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9216
9217 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9218 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9219 from reg_xmlfiles.
9220 * linux-ppc-low.c: Include <elf.h>.
9221 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9222 (ppc_hwcap): New global variable.
9223 (ppc_regmap): Remove __SPE__ #ifdef sections.
9224 (ppc_regmap_e500): New global variable.
9225 (ppc_cannot_store_register): Update __SPE__ special case.
9226 (ppc_get_hwcap): New function.
9227 (ppc_arch_setup): Use it to determine whether inferior supports
9228 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9229 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9230 Do not access registers if target does not support AltiVec.
9231 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9232 Do not access registers if target does not support SPE.
9233 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9234
52fa2412
UW
92352008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9236
9237 * linux-low.c (disabled_regsets, num_regsets): New.
9238 (use_regsets_p): Delete.
9239 (linux_wait_for_process): Clear disabled_regsets.
9240 (regsets_fetch_inferior_registers): Check and set it.
9241 (regsets_store_inferior_registers): Likewise.
9242 (linux_fetch_registers, linux_store_registers): Do not use
9243 use_regsets_p.
9244 (initialize_low): Allocate disabled_regsets.
9245
e28b3332
DJ
92462008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9247
9248 * Makefile.in (LIBOBJS): New.
9249 (OBS): Use LIBOBJS.
9250 (memmem.o): New rule.
9251 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9252 * configure: Regenerated.
9253
4536995d
UW
92542008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9255
9256 * server.c (handle_query): Never return "unsupported" for
9257 qXfer:features:read queries.
9258
221c031f
UW
92592008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9260
9261 * server.c (get_features_xml): Fix inverted condition.
9262 (handle_query): Always support qXfer:feature:read.
9263
ccd213ac
DJ
92642008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9265
9266 * server.c (wrapper_argv): New.
9267 (start_inferior): Handle wrapper_argv. If set, expect an extra
9268 trap.
9269 (gdbserver_usage): Document --wrapper.
9270 (main): Parse --wrapper.
9271
6fe305f7
UW
92722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9273
9274 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9275 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9276 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9277 (ppc_set_pc): Likewise.
9278 (ppc_arch_setup): New function.
9279 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9280 of collect_register.
889bf7c5 9281 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9282
5b0a002e
UW
92832008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9284
9285 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9286 instead of linux-ppc64-low.o.
9287 * linux-ppc64-low.c: Remove file.
9288 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9289 (linux-ppc64-low.o): Remove rule.
9290
9291 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9292 (init_registers_powerpc_64): Likewise.
9293 (ppc_regmap): Conditionally define depending on __powerpc64__.
9294 (ppc_cannot_store_register): Do not special-case "fpscr" when
9295 compiled on __powerpc64__.
9296 (ppc_collect_ptrace_register): New function.
9297 (ppc_supply_ptrace_register): New function.
9298 (ppc_breakpoint): Change type to "unsigned int".
9299 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9300 (the_low_target): Conditionally provide initializers for the
889bf7c5 9301 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9302 collect_ptrace_register and supply_ptrace_register members.
9303
9b4b61c8
UW
93042008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9305
9306 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9307 * server.c (gdbserver_xmltarget): Define.
9308 (get_features_xml): Use it to replace "target.xml" and arch_string.
9309
9310 * configure.srv: Remove srv_xmltarget. Add XML files that were
9311 mentioned there to srv_xmlfiles instead. Remove conditional tests
9312 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9313 srv_xmlfiles and srv_regobj to include all possible choices.
9314 * configure.ac (srv_xmltarget): Remove.
9315 (srv_xmlfiles): Do not add "target.xml".
9316 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9317 checks for supplementary target information.
9318 * configure: Regenerate.
9319 * Makefile.in (XML_TARGET): Remove.
9320 (target.xml): Remove rule.
9321 (clean): Do not clean up target.xml.
9322 (.PRECIOUS): Do not mention target.xml.
9323
9324 * target.h (struct target_ops): Remove arch_string member.
9325 * linux-low.c (linux_arch_string): Remove.
9326 (linux_target_ops): Remove arch_string initializer.
9327 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9328 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9329 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9330 * spu-low.c (spu_arch_string): Remove.
9331 (spu_target_ops): Remove arch_string initializer.
9332 * win32-low.c (win32_arch_string): Remove.
9333 (win32_target_ops): Remove arch_string initializer.
9334 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9335 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9336 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9337
ee1a7ae4
UW
93382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9339
9340 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9341 by collect_ptrace_register and supply_ptrace_register hooks.
9342 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9343 instead of checking for the_low_target.left_pad_xfer.
9344 (usr_store_inferior_registers): Use collect_ptrace_register callback
9345 instead of checking for the_low_target.left_pad_xfer.
9346
9347 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9348 (s390_supply_ptrace_register): Likewise.
9349 (s390_fill_gregset): Call s390_collect_ptrace_register.
9350 (the_low_target): Update.
9351
9352 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9353 (ppc_supply_ptrace_register): Likewise.
9354 (the_low_target): Update.
9355
9356 * linux-i386-low.c (the_low_target): Update.
9357 * linux-x86-64-low.c (the_low_target): Update.
9358
d61ddec4
UW
93592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9360
9361 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9362 reg-s390.o and reg-s390x.o.
9363
9364 * linux-low.c (new_inferior): New global variable.
9365 (linux_create_inferior, linux_attach): Set it.
9366 (linux_wait_for_process): Call the_low_target.arch_setup after the
9367 target has stopped for the first time.
9368 (initialize_low): Do not call the_low_target.arch_setup.
9369
9370 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9371 (s390_set_pc): Likewise.
9372 (s390_arch_setup): New function.
9373 (the_low_target): Use s390_arch_setup as arch_setup routine.
9374
9375 * regcache.c (realloc_register_cache): New function.
9376 (set_register_cache): Call it for each existing regcache.
9377
d05b4ac3
UW
93782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9379
9380 * server.h (init_registers): Remove prototype.
9381
9382 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9383 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9384 instead of init_registers ().
9385 * linux-arm-low.c (init_registers_arm): Add prototype.
9386 (init_registers_arm_with_iwmmxt): Likewise.
9387 (the_low_target): Add initializer for arch_setup field.
9388 * linux-cris-low.c (init_registers_cris): Add prototype.
9389 (the_low_target): Add initializer for arch_setup field.
9390 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9391 (the_low_target): Add initializer for arch_setup field.
9392 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9393 (the_low_target): Add initializer for arch_setup field.
9394 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9395 (the_low_target): Add initializer for arch_setup field.
9396 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9397 (the_low_target): Add initializer for arch_setup field.
9398 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9399 (the_low_target): Add initializer for arch_setup field.
9400 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9401 (init_registers_mips64_linux): Likewise.
9402 (the_low_target): Add initializer for arch_setup field.
9403 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9404 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9405 (the_low_target): Add initializer for arch_setup field.
9406 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9407 (init_registers_powerpc_64): Likewise.
9408 (the_low_target): Add initializer for arch_setup field.
9409 * linux-s390-low.c (init_registers_s390): Add prototype.
9410 (init_registers_s390x): Likewise.
9411 (the_low_target): Add initializer for arch_setup field.
9412 * linux-sh-low.c (init_registers_sh): Add prototype.
9413 (the_low_target): Add initializer for arch_setup field.
9414 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9415 (the_low_target): Add initializer for arch_setup field.
9416 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9417 (the_low_target): Add initializer for arch_setup field.
9418
9419 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9420 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9421 instead of init_registers ().
9422 * win32-arm-low.c (init_registers_arm): Add prototype.
9423 (the_low_target): Add initializer for arch_setup field.
9424 * win32-i386-low.c (init_registers_i386): Add prototype.
9425 (the_low_target): Add initializer for arch_setup field.
9426
9427 * spu-low.c (init_registers_spu): Add prototype.
9428 (initialize_low): Call initialie_registers_spu () instead of
9429 initialize_registers ().
9430
fd96d250
PA
94312008-02-19 Pedro Alves <pedro@codesourcery.com>
9432
9433 * server.c (handle_v_requests): When handling the vRun and vAttach
9434 packets, if already debugging a process, don't kill it. Return an
9435 error instead.
9436
d41b6bb4
DJ
94372008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9438
9439 * server.c (handle_query): Correct length check.
9440
5ac588cf
PA
94412008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9442
9443 * win32-low.c (do_initial_child_stuff): Add process handle
9444 parameter. Set current_process_handle and current_process_id from the
9445 parameters. Clear globals.
9446 (win32_create_inferior): Don't set current_process_handle and
9447 current_process_id here. Instead pass them on the call to
9448 do_initial_child_stuff.
9449 (win32_attach): Likewise.
9450 (win32_clear_inferiors): New.
9451 (win32_kill): Don't close the current process handle or the
9452 current thread handle here. Instead call win32_clear_inferiors.
9453 (win32_detach): Don't open a new handle to the process. Call
9454 win32_clear_inferiors.
9455 (win32_join): Don't rely on current_process_handle; open a new
9456 handle using the process id.
9457 (win32_wait): Call win32_clear_inferiors when the inferior process
9458 has exited.
9459
ecd7ecbc
DJ
94602008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9461
9462 * server.c (monitor_show_help): Add "exit".
9463
1525d545
MG
94642008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9465
ecd7ecbc 9466 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9467 (clean): Add reg-xtensa.c.
9468 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9469 * configure.srv (xtensa*-*-linux*) New target.
9470 * linux-xtensa-low.c: New.
9471 * xtensa-xtregs.c: New.
1525d545 9472
59a016f0
PA
94732008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9474
9475 * hostio.c: Don't include errno.h.
9476 (errno_to_fileio_errno): Move to hostio-errno.
9477 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9478 error number outputting to the target->hostio_last_error callback.
9479 (hostio_packet_error): Use FILEIO_EINVAL directly.
9480 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9481 calls to hostio_error.
9482 * hostio-errno.c: New.
9483 * server.h (hostio_last_error_from_errno): Declare.
9484 * target.h (target_ops): Add hostio_last_error member.
9485 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9486 as hostio_last_error handler.
889bf7c5 9487 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9488 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9489 (wince_hostio_last_error): New functions.
9490 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9491 as hostio_last_error handler.
9492 (win32_target_ops) [!_WIN32_WCE]: Register
9493 hostio_last_error_from_errno as hostio_last_error handler.
9494 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9495 (hostio-errno.o): New rule.
9496 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9497 * configure.srv (srv_hostio_err_objs): New variable. Default to
9498 hostio-errno.o.
9499 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9500 * configure: Regenerate.
9501
2d717e4f
DJ
95022008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9503
9504 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9505 (linux_kill, linux_detach): Clean up the process list.
9506 * remote-utils.c (remote_open): Improve port number parsing.
9507 (putpkt_binary, input_interrupt): Only send interrupts if the target
9508 is running.
9509 * server.c (extended_protocol): Make static.
9510 (attached): Define earlier.
9511 (exit_requested, response_needed, program_argv): New variables.
9512 (target_running): New.
9513 (start_inferior): Clear attached here.
9514 (attach_inferior): Set attached here.
9515 (require_running): Define.
9516 (handle_query): Use require_running and target_running. Implement
9517 "monitor exit".
9518 (handle_v_attach, handle_v_run): New.
9519 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9520 (gdbserver_usage): Update.
9521 (main): Redo argument parsing. Handle --debug and --multi. Handle
9522 --attach along with other options or after the port. Save
9523 program_argv. Support no initial program. Resynchronize
9524 communication with GDB after an error. Handle "monitor exit".
9525 Use require_running and target_running. Always allow the extended
9526 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9527 restart in extended mode.
9528 * README: Refer to the GDB manual. Update --attach usage.
9529
7407e2de
AS
95302007-12-20 Andreas Schwab <schwab@suse.de>
9531
9532 * linux-low.c (STACK_SIZE): Define.
9533 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9534 (linux_test_for_tracefork): Likewise.
9535
b65d95c5
DJ
95362007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9537
9538 * linux-low.c (linux_wait_for_event): Update messages. Do not
9539 reinsert auto-delete breakpoints.
9540 * mem-break.c (struct breakpoint): Change return type of handler to
9541 int.
9542 (set_breakpoint_at): Update handler type.
9543 (reinsert_breakpoint_handler): Return 1 instead of calling
9544 delete_breakpoint.
9545 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9546 setting a new one.
9547 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9548 * mem-break.h (set_breakpoint_at): Update handler type.
9549 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9550 * win32-low.c (auto_delete_breakpoint): New.
9551 (get_child_debug_event): Use it.
9552
4e799345
DJ
95532007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9554
9555 * configure.ac: Check for pread and pwrite.
9556 * hostio.c (handle_pread): Fall back to lseek and read.
9557 (handle_pwrite): Fall back to lseek and write.
9558 * config.in, configure: Regenerated.
9559
27524b67
DJ
95602007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9561
9562 * server.c (myresume): Add own_buf argument.
9563 (main): Update calls.
9564
a20d5e98
DJ
95652007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9566
9567 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9568 * remote-utils.c (remote_open): Do not call disable_async_io.
9569 (block_async_io): Delete.
9570 (unblock_async_io): Make static.
9571 (initialize_async_io): New.
9572 * server.c (handle_v_cont): Handle async I/O here.
9573 (myresume): Likewise. Move other common resume tasks here...
9574 (main): ... from here. Call initialize_async_io. Disable async
9575 I/O before the main loop.
9576 * server.h (initialize_async_io): Declare.
9577 (block_async_io, unblock_async_io): Delete prototypes.
9578 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9579
b79d787e
DJ
95802007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9581
9582 * remote-utils.c (readchar): Allow binary data in received messages.
9583
d97903b2
PA
95842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9585
9586 * win32-low.c (attaching): New global.
9587 (win32_create_inferior): Clear the `attaching' global.
9588 (win32_attach): Set the `attaching' global.
9589 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9590 attaching. Only set a breakpoint at the entry point if not
9591 attaching.
9592
311de423
PA
95932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9594
9595 * server.c (main): Don't report dll events on the initial
9596 connection on attaches.
9597
6c2d16d2
PA
95982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9599
9600 * server.c (main): Relax numerical bases supported for the pid of
9601 the --attach command line argument.
9602
5ca906e6
PA
96032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9604
9605 * win32-low.c (win32_attach): Call OpenProcess before
9606 DebugActiveProcess, not after. Add last error output to error
9607 call.
9608
9c6c8194
PA
96092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9610
9611 * win32-low.c (win32_get_thread_context)
9612 (win32_set_thread_context): New functions.
9613 (thread_rec): Use win32_get_thread_context.
9614 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9615 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9616 field.
9617
4d5d1aaa
PA
96182007-12-03 Leo Zayas
9619 Pedro Alves <pedro_alves@portugalmail.pt>
9620
9621 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9622 global variables.
9623 (child_add_thread): Minor cleanup.
9624 (child_continue): Resume artificially suspended threads before
9625 calling ContinueDebugEvent.
9626 (suspend_one_thread): New.
9627 (fake_breakpoint_event): New.
9628 (get_child_debug_event): Change return type to int. Check here if
9629 gdb sent an interrupt request. If a soft interrupt was requested,
9630 fake a breakpoint event. Return 0 if there is no event to handle,
9631 and 1 otherwise.
9632 (win32_wait): Don't check here if gdb sent an interrupt request.
9633 Ensure there is a valid event to handle.
9634 (win32_request_interrupt): Add soft interruption method as last
9635 resort.
9636
c436e841
PA
96372007-12-03 Leo Zayas
9638 Pedro Alves <pedro_alves@portugalmail.pt>
9639
9640 * win32-low.h (win32_thread_info): Add descriptions to the
9641 structure members. Replace `suspend_count' counter by a
9642 `suspended' flag.
9643 * win32-low.c (thread_rec): Update condition of when to get the
9644 context from the inferior. Rely on ContextFlags being set if it
9645 has already been retrieved. Only suspend the inferior thread if
9646 we haven't already. Warn if that fails.
9647 (continue_one_thread): s/suspend_count/suspended/. Only call
9648 ResumeThread once. Warn if that fails.
9649
e7b5fa67
PA
96502007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9651
9652 * win32-low.c (win32_wait): Don't read from the inferior when it
9653 has already exited.
9654
a385171d
PA
96552007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9656
9657 * Makefile.in (win32_low_h): New variable.
9658 (win32-low.o): Add dependency on $(win32_low_h).
9659 (win32-arm-low.o, win32-i386-low.o): New rules.
9660
f80c84b3
DJ
96612007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9662
9663 * hostio.c: Correct copyright year.
9664
a6b151f1
DJ
96652007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9666
9667 * Makefile.in (OBS): Add hostio.o.
9668 (hostio.o): New rule.
9669 * server.h (handle_vFile): Declare.
9670 * hostio.c: New file.
9671 * server.c (handle_v_requests): Take packet_len and new_packet_len
9672 for binary packets. Call handle_vFile.
9673 (main): Update call to handle_v_requests.
9674
f9387fc3
DJ
96752007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9676
9677 * linux-low.c: Include <sched.h>.
9678
51c2684e
DJ
96792007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9680
9681 * linux-low.c (linux_tracefork_grandchild): New.
9682 (linux_tracefork_child): Use clone.
9683 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9684
75f83163
JB
96852007-10-31 Joel Brobecker <brobecker@adacore.com>
9686
9687 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9688
da5898ce
DJ
96892007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9690
9691 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9692
24a09b5f
DJ
96932007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9694
9695 * inferiors.c (change_inferior_id): Delete.
9696 (add_pid_to_list, pull_pid_from_list): New.
9697 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9698 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9699 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9700 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9701 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9702 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9703 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9704 (using_threads): Always set to 1.
9705 (handle_extended_wait): New.
9706 (add_process): Do not set TID.
9707 (linux_create_inferior): Set must_set_ptrace_flags.
9708 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9709 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9710 (linux_thread_alive): Rename TID argument to LWPID.
9711 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9712 (linux_wait_for_event): Do not use TID or check using_threads. Update
9713 call to dead_thread_notify. Call handle_extended_wait.
9714 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9715 (send_sigstop): Delete sigstop_sent.
9716 (wait_for_sigstop): Avoid TID.
9717 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9718 (linux_test_for_tracefork): New.
9719 (linux_lookup_signals): Use thread_db_active and
9720 linux_supports_tracefork_flag.
9721 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9722 * linux-low.h (get_process_thread): Avoid TID.
9723 (struct process_ifo): Move thread_known and tid to the end. Remove
9724 sigstop_sent.
9725 (linux_attach_lwp, thread_db_init): Update prototypes.
9726 * server.h (change_inferior_id): Delete prototype.
9727 (add_pid_to_list, pull_pid_from_list): New prototypes.
9728 * thread-db.c (thread_db_use_events): New.
9729 (find_first_thread): Rename to...
9730 (find_one_thread): ...this. Update callers and messages. Do not
9731 call fatal. Check thread_db_use_events. Do not call
9732 change_inferior_id or new_thread_notify.
9733 (maybe_attach_thread): Update. Do not call new_thread_notify.
9734 (thread_db_init): Set thread_db_use_events. Check use_events.
9735 * utils.c (fatal, warning): Correct message prefix.
9736
30ed0a8f
DJ
97372007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9738
9739 * Makefile.in (clean): Remove new files.
9740 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9741 (powerpc-64.o, powerpc-64.c): New rules.
9742 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9743 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9744 with SPE.
9745 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9746 SPE targets.
9747 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9748 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9749 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9750 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9751 (target_regsets): Add AltiVec and SPE register sets.
9752 * configure.ac: Check for AltiVec and SPE.
9753 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9754 (ppc_fill_vrregset, ppc_store_vrregset): New.
9755 (target_regsets): Add AltiVec register set.
9756 * configure: Regenerated.
9757
fd462a61
DJ
97582007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9759
9760 * linux-low.c (O_LARGEFILE): Define.
9761 (linux_read_memory): Use /proc/PID/mem.
9762 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9763 * configure, config.in: Regenerated.
9764
69f223ed
DJ
97652007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9766
9767 * linux-low.c (linux_wait_for_event): Do not pass signals while
9768 single-stepping.
9769
aec18585
PA
97702007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9771
9772 * win32-low.c (create_process): New.
9773 (win32_create_inferior): Use create_process instead of
9774 CreateProcess. If create_process failed retry appending an ".exe"
9775 suffix. Store the GetLastError result immediatelly after
9776 create_process calls and use it on the call to error.
9777
34d86ddd
PA
97782007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9779
9780 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9781
5a0e3bd0
JB
97822007-08-23 Joel Brobecker <brobecker@adacore.com>
9783
9784 * configure.ac: Switch license to GPLv3.
9785
f88c79e6
MS
97862007-08-01 Michael Snyder <msnyder@access-company.com>
9787
9788 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9789
6b3d9b83
PA
97902007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9791
9792 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9793 typedef.
9794 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9795 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9796 CloseToolhelp32Snapshot.
9797 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9798 CloseToolhelp32Snapshot.
9799
c588c53c
MS
98002007-07-27 Michael Snyder <michael.snyder@access-company.com>
9801
9802 * server.c (main): Check for inferior exit before main loop.
9803
aa0403d9
PA
98042007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9805
9806 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9807 instead of on tmp_desc.
9808
255e7678
DJ
98092007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9810 Daniel Jacobowitz <dan@codesourcery.com>
9811
9812 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9813 (add_thread): Minor cleanups.
9814 (clear_inferiors): Move lower in the file. Clear the DLL
9815 list.
9816 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9817 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9818 (xml_escape_text): New.
9819 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9820 for qSupported.
9821 (handle_v_cont): Report errors.
9822 (gdbserver_version): Update.
9823 (main): Correct size of own_buf. Do not report initial DLL events.
9824 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9825 (unloaded_dll, xml_escape_text): New.
9826 * win32-low.c (enum target_waitkind): Update comments.
9827 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9828 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9829 (win32_EnumProcessModules, win32_GetModuleInformation)
9830 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9831 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9832 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9833 (win32_Module32First, win32_Module32Next, load_toolhelp)
9834 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9835 (get_child_debug_event): Handle DLL events.
9836 (win32_wait): Likewise.
9837
0d37add9
DJ
98382007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9839
9840 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9841 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9842
45e2715e
PA
98432007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9844
9845 * win32-low.c (handle_output_debug_string): Ignore event if not
9846 waiting.
9847
c5674cf1
PA
98482007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9849
9850 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9851
2bbe3cc1
DJ
98522007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9853
9854 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9855
ae13219e
DJ
98562007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9857
9858 * inferiors.c (change_inferior_id): Add comment.
9859 * linux-low.c (check_removed_breakpoint): Add an early
9860 prototype. Improve debug output.
9861 (linux_attach): Doc update.
9862 (linux_detach_one_process, linux_detach): Clean up before releasing
9863 each process.
9864 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9865 * linux-low.h (struct process_info): Doc improvement.
9866 * mem-break.c (delete_all_breakpoints): New.
9867 * mem-break.h (delete_all_breakpoints): New prototype.
9868 * thread-db.c (find_first_thread): New.
9869 (thread_db_create_event): Call it instead of
9870 thread_db_find_new_threads. Clean up unused variables.
9871 (maybe_attach_thread): Remove first thread handling.
9872 (thread_db_find_new_threads): Use find_first_thread.
9873 (thread_db_get_tls_address): Likewise.
9874
4105de34
DJ
98752007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9876
9877 * thread-db.c (thread_db_find_new_threads): Add prototype.
9878 (thread_db_create_event): Check for the main thread before adding
9879 a new thread.
9880 (maybe_attach_thread): Only enable event reporting if TID == 0.
9881 (thread_db_get_tls_address): Check for new threads.
9882
2b876972
DJ
98832007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9884
9885 * linux-low.c (linux_create_inferior): Try execv before execvp.
9886 * spu-low.c (spu_create_inferior): Likewise.
9887
7a245884
DJ
98882007-06-13 Mike Frysinger <vapier@gentoo.org>
9889
9890 * linux-low.c (linux_create_inferior): Change execv to execvp.
9891 * spu-low.c (spu_create_inferior): Likewies.
9892
117ce543
DJ
98932007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9894
9895 * Makefile.in (clean): Clean new files instead of deleted ones.
9896 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9897 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9898 rules.
9899 * configure.srv: Specify XML files and new regformats for MIPS and
9900 MIPS64 GNU/Linux.
9901 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9902 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9903 an entry for the restart register.
9904 (mips_cannot_fetch_register, mips_cannot_store_register)
9905 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9906 register names to match the XML descriptions.
9907 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9908 restart register instead of $0.
9909
0e7f50da
UW
99102007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9911 Markus Deuling <deuling@de.ibm.com>
9912
9913 * remote-utils.c (decode_xfer_write): New function.
9914 * server.h (decode_xfer_write): Add prototype.
9915 * server.c (handle_query): Add PACKET_LEN argument. Support
9916 qXfer:spu:read and qXfer:spu:write packets.
9917 (main): Pass packet_len to handle_query.
9918 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9919 * target.h (target_ops): Add qxfer_spu.
9920
374c1d38
UW
99212007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9922
9923 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9924 accessing non-seekable spufs files.
9925
bb63802a
UW
99262007-05-16 Markus Deuling <deuling@de.ibm.com>
9927
889bf7c5 9928 * server.c (handle_query): Add reply for qC packet.
bb63802a 9929
7390519e
PA
99302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9931 Leo Zayas <lerele@champenstudios@com>
9932
9933 * server.h (check_remote_input_interrupt_request): New function.
9934 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9935 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9936 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9937 (check_remote_input_interrupt_request): New function.
9938 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9939 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9940 winapi_GenerateConsoleCtrlEvent): New typedefs.
9941 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9942 to 250 ms.
9943 (win32_wait): Check for remote interrupt request
9944 with check_remote_input_interrupt_request.
9945 (win32_request_interrupt): New function.
9946 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9947
34b34921
PA
99482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9949
9950 * win32-low.c (debug_registers_changed,
9951 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9952 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9953 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9954 (thread_rec): Get context using the low target.
9955 (child_add_thread): Call thread_added on the low target,
9956 which does the same thing.
9957 (regptr): Delete.
9958 (do_initial_child_stuff): Remove debug registers references.
9959 Set context using the low target. Resume threads after
9960 setting the contexts.
9961 (child_continue): Remove dead variable. Remove debug
9962 registers references.
9963 (child_fetch_inferior_registers): Go through the low target.
9964 (do_child_store_inferior_registers): Remove.
9965 (child_store_inferior_registers): Go through the low target.
9966 (win32_resume): Remove debug registers references.
9967 Set context using the low target.
9968 (handle_exception): Change return type to void. Don't record
9969 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9970 first chance exception.
889bf7c5 9971 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9972 goto loop. Always return after waiting for debug event.
9973 (win32_wait): Convert to switch statement. Handle spurious
9974 events.
9975
9976 * win32-i386-low.c (debug_registers_changed,
9977 debug_registers_used): New.
9978 (initial_stuff): Rename to ...
9979 (i386_initial_stuff): ... this. Clear debug registers
9980 state variables.
9981 (store_debug_registers): Delete.
9982 (i386_get_thread_context): New.
9983 (load_debug_registers): Delete.
9984 (i386_set_thread_context): New.
9985 (i386_thread_added): New.
9986 (single_step): Rename to ...
9987 (i386_single_step): ... this.
9988 (do_fetch_inferior_registers): Rename to ...
9989 (i386_fetch_inferior_register): ... this.
9990 (i386_store_inferior_register): New.
9991 (the_low_target): Adapt to new interface.
9992
9993 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9994 (arm_get_thread_context): New.
9995 (arm_set_thread_context): New.
9996 (regptr): New.
9997 (do_fetch_inferior_registers): Rename to ...
9998 (arm_fetch_inferior_register): ... this.
9999 (arm_store_inferior_register): New.
10000 (arm_wince_breakpoint): Reimplement as unsigned long.
10001 (arm_wince_breakpoint_len): Define.
10002 (the_low_target): Adapt to new interface.
10003
10004 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10005 load_debug_registers. Add get_thread_context, set_thread_context,
10006 thread_added and store_inferior_register. Rename
10007 fetch_inferior_registers to fetch_inferior_register.
10008 (regptr): Remove declaration.
10009
dd6953e1
PA
100102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10011
10012 * linux-low.c (linux_detach): Change return type to int. Return 0.
10013 * spu-low.c (spu_detach): Likewise.
10014
444d6139
PA
100152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10016
10017 * target.h (target_ops): Change return type of detach to int.
10018 Add join.
10019 (join_inferior): New.
10020 * server.c (main): Don't skip detach support on mingw32.
10021 If the inferior doesn't support detaching return error.
10022 Call join_inferior instead of using waitpid.
10023 * linux-low.c (linux_join): New.
10024 (linux_target_op): Add linux_join.
10025 * spu-low.c (spu_join): New.
10026 (spu_target_ops): Add spu_join.
10027 * win32-low.c (win32_detach): Adapt to new interface.
10028 Reopen current_process_handle before detaching. Issue a child
10029 resume before detaching.
10030 (win32_join): New.
10031 (win32_target_op): Add win32_join.
10032
1d5315fe
PA
100332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10034
10035 * win32-low.c (win32-attach): Fix return value.
10036 * target.h (target_ops): Describe ATTACH return values.
10037
bf914831
PA
100382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10039
10040 * win32-low.c (GETPROCADDRESS): Define.
10041 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10042 (winapi_DebugSetProcessKillOnExit): Likewise.
10043 (win32_create_inferior): Force usage of ansi CreateProcessA.
10044 (win32_attach): Use GETPROCADDRESS.
10045 (win32_detach): Likewise.
10046
f72f3e60
PA
100472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10048
10049 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10050
ed50f18f
PA
100512007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10052
10053 * win32-low.c: Commit leftover changes from 2007-03-29.
10054
0c2ead7e
DJ
100552007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10056
10057 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10058 fields short instead of int. Add explicit padding.
10059 (i387_cache_to_fsave): Remove unnecessary casts.
10060 (i387_fsave_to_cache): Doc fix.
10061 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10062
73725ff3
DJ
100632007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10064
10065 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10066 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10067
d99f33d8
PA
100682007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10069
10070 * configure.srv (arm*-*-mingw32ce*): Move near the other
10071 arm targets.
10072
68070c10
PA
100732007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10074
2482afc6 10075 * configure.ac: Add errno checking.
68070c10
PA
10076 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10077 sys/file.h and malloc.h.
10078 (AC_CHECK_DECLS): Add perror.
10079 (srv_mingwce): Handle.
2482afc6 10080 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10081 win32-i386-low.o to srv_tgtobj.
10082 (i[34567]86-*-mingw*): Likewise.
10083 (arm*-*-mingw32ce*): Add case.
10084 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10085 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10086 [__MINGW32CE__] (strerror): New function.
10087 [__MINGW32CE__] (errno): Define to GetLastError.
10088 [__MINGW32CE__] (COUNTOF): New macro.
10089 (remote_open): Remove extra close call.
10090 * mem-break.c (delete_breakpoint_at): New function.
10091 * mem-break.h (delete_breakpoint_at): Declare.
10092 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10093 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10094 [USE_WIN32API] (read, write): Add char* casts.
10095 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10096 * server.h: Include wincecompat.h on Windows CE.
10097 [HAVE_ERRNO_H]: Check.
10098 (perror): Declare if not declared.
10099 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10100 (perror_with_name): Remove errno declaration.
10101 * wincecompat.h: New.
10102 * wincecompat.c: New.
10103 * win32-low.h: New.
10104 * win32-arm-low.c: New.
10105 * win32-i386-low.c: New.
10106 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10107 (OUTMSG2): Make it safe.
10108 (_T): New macro.
10109 (COUNTOF): New macro.
10110 (NUM_REGS): Get it from the low target.
10111 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10112 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10113 (thread_rec): Let low target handle debug registers.
10114 (child_add_thread): Likewise.
10115 (child_init_thread_list): Likewise.
10116 (continue_one_thread): Likewise.
10117 (regptr): New.
10118 (do_child_fetch_inferior_registers): Move to ...
10119 * win32-i386-low.c: ... here, and rename to ...
10120 (do_fetch_inferior_registers): ... this.
889bf7c5 10121 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10122 Go through the low target.
10123 (do_child_store_inferior_registers): Use regptr.
10124 (strwinerror): New function.
10125 (win32_create_inferior): Handle Windows CE.
10126 Use strwinerror instead of strerror on Windows error
10127 codes. Add program to the error output.
10128 Don't close the main thread handle on Windows CE.
10129 (win32_attach): Use coredll.dll on Windows CE.
10130 (win32_kill): Close current process and current
10131 thread handles.
10132 (win32_detach): Use coredll.dll on Windows CE.
10133 (win32_resume): Let low target handle debug registers, and
10134 step request.
10135 (handle_exception): Add/Remove initial breakpoint. Avoid
10136 non-existant WSTOPSIG on Windows CE.
10137 (win32_read_inferior_memory): Cast to remove warning.
10138 (win32_arch_string): Go through the low target.
10139 (initialize_low): Call set_breakpoint_data with the low
10140 target's breakpoint.
10141 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10142 FOP_REGNUM, mappings): Move to ...
10143 * win32-i386-low.c: ... here.
10144 * win32-low.c (win32_thread_info): Move to ...
10145 * win32-low.h: ... here.
10146 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10147 win32-arm-low.c and wincecompat.c.
10148 (all:): Add $EXEEXT.
10149 (install-only:): Likewise.
10150 (gdbserver:): Likewise.
10151 (gdbreplay:): Likewise.
10152 * config.in: Regenerate.
10153 * configure: Regenerate.
10154
41093d81
PA
101552007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10156
10157 * win32-low.c: Rename typedef thread_info to
10158 win32_thread_info throughout.
10159
544afa54
PA
101602007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10161
10162 * win32-i386-low.c: Rename to ...
10163 * win32-low.c: ... this.
10164 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10165 * Makefile.in: Likewise.
10166
bce7165d
PA
101672007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10168
10169 * remote-utils.c (monitor_output): Constify msg parameter.
10170 * server.h (monitor_output): Likewise.
10171 * win32-i386-low.c (handle_output_debug_string): New.
10172 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10173 handle_output_debug_string.
10174 (get_child_debug_event): Likewise.
10175
506c7aa0
DJ
101762007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10177
10178 * server.c (main): Correct strtoul check.
10179
42c81e2a
DJ
101802007-03-27 Jon Ringle <jon@ringle.org>
10181
10182 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10183
9453113a
DJ
101842007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10185
10186 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10187
64a69107
DJ
101882007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10189
10190 * terminal.h: Check HAVE_SGTTY_H.
10191
101922007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10193
10194 * remote-utils.c (remote_open): Print out the assigned port number.
10195
c74d0ad8
DJ
101962007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10197
10198 * remote-utils.c (monitor_output): New function.
10199 * server.c (debug_threads): Define here.
10200 (monitor_show_help): New function.
10201 (handle_query): Handle qRcmd.
10202 (main): Do not handle 'd' packet.
10203 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10204 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10205 of debug_threads.
10206
de7c3b4a
PA
102072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10208
10209 * Makefile.in (EXEEXT): New.
10210 (clean): Use $(EXEEXT).
10211
ef57601b
PA
102122007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10213
10214 * target.h (target_ops): Rename send_signal to request_interrupt,
10215 and remove enum target_signal parameter.
10216 * linux-low.c (linux_request_interrupt): Rename from
10217 linux_send_signal, and always send SIGINT.
10218 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10219 and always send SIGINT.
10220 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10221 of send_signal.
10222 (input_interrupt): Likewise.
10223
820f2bda
PA
102242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10225
10226 * server.c (get_features_xml): Check if target implemented
10227 arch_string.
10228 * win32-i386-low.c (win32_arch_string): New.
10229 (win32_target_ops): Add win32_arch_string as arch_string member.
10230
ab39bf24
UW
102312007-02-22 Markus Deuling <deuling@de.ibm.com>
10232
10233 * spu-low.c (spu_arch_string): New.
10234 (spu_target_ops): Add spu_arch_string.
10235
61ff6e04
DJ
102362007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10237
10238 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10239 * configure.ac: Do not check for terminal.h.
10240 * configure, config.in: Regenerated.
10241
fb1e4ffc
DJ
102422007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10243
10244 * Makefile.in (OBS): Add $(XML_BUILTIN).
10245 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10246 (clean): Update.
10247 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10248 (arm-with-iwmmxt.c): New.
10249 * config.in, configure: Regenerate.
10250 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10251 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10252 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10253 (arm*-*-linux*): Add iWMMXt and regset support.
10254 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10255 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10256 (arm_store_wmmxregset, target_regsets): New.
10257 * server.c (get_features_xml): Take annex argument. Check builtin
10258 XML documents.
10259 (handle_query): Handle multiple annexes.
10260
0f48aa01
DJ
102612007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10262
10263 * remote-utils.c [USE_WIN32API] (read, write): Define.
10264 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10265 write.
10266
23181151
DJ
102672007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10268
10269 * linux-i386-low.c (the_low_target): Set arch_string.
10270 * linux-x86-64-low.c (the_low_target): Likewise.
10271 * linux-low.c (linux_arch_string): New.
10272 (linux_target_ops): Add it.
10273 * linux-low.h (struct linux_target_ops): Add arch_string.
10274 * server.c (write_qxfer_response): Use const void * for DATA.
10275 (get_features_xml): New.
10276 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10277 * target.h (struct target_ops): Add arch_string method.
10278
9d606399
DJ
102792007-01-03 Denis Pilat <denis.pilat@st.com>
10280 Daniel Jacobowitz <dan@codesourcery.com>
10281
10282 * linux-low.c (linux_kill): Handle being called with no threads.
10283 * win32-i386-low.c (win32_kill): Likewise.
10284 (get_child_debug_event): Clear current_process_handle.
10285
102862006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10287 Daniel Jacobowitz <dan@codesourcery.com>
10288
10289 * remote-utils.c (remote_open): Check the type of specified
10290 serial port devices before opening them.
10291 * server.c (main): Kill the inferior if an error occurs during
10292 the first remote_open.
10293
a5e13d24
DJ
102942006-12-05 Markus Deuling <deuling@de.ibm.com>
10295
10296 * README: Update supported targets.
10297
186947f7
DJ
102982006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10299
10300 * Makefile.in (clean): Remove reg-mips64.c.
10301 (reg-mips64.c, reg-mips64.o): New rules.
10302 * configure.srv: Handle mips64. Include regset support for mips.
10303 * linux-mips-low.c (union mips_register): New.
10304 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10305 (mips_breakpoint, mips_breakpoint_at): Use int.
10306 (mips_collect_register, mips_supply_register)
10307 (mips_collect_register_32bit, mips_supply_register_32bit)
10308 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10309 (mips_store_fpregset, target_regsets): New.
10310 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10311
a13e2c95
UW
103122006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10313
10314 * configure.srv: Add target "spu*-*-*".
10315 * Makefile.in (clean): Remove reg-spu.c.
10316 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10317 * spu-low.c: New file.
10318
cb7283db
DJ
103192006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10320
10321 * configure.ac: Correct td_thr_tls_get_addr test.
10322 * configure: Regenerated.
10323
89be2091
DJ
103242006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10325
10326 * linux-low.c (linux_wait_for_event): Reformat. Use the
10327 pass_signals array.
10328 * remote-utils.c (decode_address_to_semicolon): New.
10329 * server.c (pass_signals, handle_general_set): New.
10330 (handle_query): Mention QPassSignals for qSupported.
10331 (main): Call handle_general_set.
10332 * server.h (pass_signals, decode_address_to_semicolon): New.
10333
000ef4f0
DJ
103342006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10335
10336 * server.c (handle_query): Correct error handling for read_auxv.
10337
b7149293
UW
103382005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10339
10340 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10341 and srv_linux_thread_db to yes.
10342 * linux-s390-low.c (s390_fill_gregset): New function.
10343 (target_regsets): Define data structure.
10344
dae5f5cf
DJ
103452006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10346
10347 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10348 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10349 * config.in, configure: Regenerated.
10350 * inferiors.c (gdb_id_to_thread): New function.
10351 (gdb_id_to_thread_id): Use it.
10352 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10353 * linux-low.h (struct process_info): Add th member.
10354 (thread_db_get_tls_address): New prototype.
10355 * remote-utils.c (decode_address): Make non-static.
10356 * server.c (handle_query): Handle qGetTLSAddr.
10357 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10358 * target.h (struct target_ops): Add get_tls_address.
10359 * thread-db.c (maybe_attach_thread): Save the thread handle.
10360 (thread_db_get_tls_address): New.
10361
32ca6d61
DJ
103622006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10363
10364 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10365 (linux_resume_one_process): Take a siginfo_t *. Update all
10366 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10367 (struct pending_signals): Add a siginfo_t.
10368 (linux_wait_for_process): Always set last_status.
10369 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10370 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10371 * linux-low.h (struct process_info): Add last_status.
10372
5ffff7c1
DJ
103732006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10374
10375 * remote-utils.c (try_rle): New function.
10376 (putpkt_binary): Use it.
10377
8695c747
DJ
103782006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10379
10380 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10381 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10382 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10383 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10384 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10385 point registers.
10386
290fadea
RS
103872006-08-08 Richard Sandiford <richard@codesourcery.com>
10388
10389 * server.c (terminal_fd): New variable.
10390 (old_foreground_pgrp): Likewise.
10391 (restore_old_foreground_pgrp): New function.
10392 (start_inferior): Record the terminal file descriptor in terminal_fd
10393 and its original foreground group in old_foreground_pgrp. Register
10394 restore_old_foreground_pgrp with atexit().
10395
9f2e1e63
DJ
103962006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10397
10398 * server.c (handle_query): Correct qPart to qXfer.
10399
b80864fb
DJ
104002006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10401
10402 * configure.ac: Check for more headers which are missing on
10403 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10404 * configure.srv: Add Cygwin and mingw32.
10405 * remote-utils.c: Don't include headers unconditionally which
10406 are missing on mingw32. Include <winsock.h> for mingw32.
10407 (remote_open): Adjust for mingw32 support. Flush
10408 standard error after writing to it.
10409 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10410 (unblock_async_io, enable_async_io, disable_async_io)
10411 (readchar, getpkt): Update for Winsock support.
10412 (prepare_resume_reply): Expect a protocol signal number.
10413 * server.c: Disable <sys/wait.h> on mingw32.
10414 (start_inferior): Adjust for mingw32 support. Flush
10415 standard error after writing to it.
10416 (attach_inferior): Likewise. Use protocol signal
10417 numbers.
10418 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10419 and names.
10420 * win32-i386-low.c: New file.
10421 * Makefile.in (XM_CLIBS): Set.
10422 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10423 (win32-i386-low.o): New dependency rule.
10424 * linux-low.c (linux_wait): Use target signal numbers.
10425 * target.h (struct target_ops): Doc fix.
10426 * server.h (target_signal_to_name): New prototype.
10427 * gdbreplay.c: Don't include headers unconditionally which
10428 are missing on mingw32. Include <winsock.h> for mingw32.
10429 (remote_close, remote_open): Adjust for Winsock support.
10430 * configure, config.in: Regenerated.
10431
0876f84a
DJ
104322006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10433
10434 * server.c (decode_xfer_read, write_qxfer_response): New.
10435 (handle_query): Take a packet length argument. Handle
10436 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10437 the qSupported response.
10438 (main): Update call to handle_query.
10439
01f9e8fa
DJ
104402006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10441
10442 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10443 (putpkt_binary): Renamed from putpkt and adjusted for binary
10444 data.
10445 (putpkt): New wrapper for putpkt_binary.
10446 (readchar): Don't mask off the high bit.
10447 (decode_X_packet): New function.
10448 * server.c (main): Call putpkt_binary if a handler sets the packet
10449 length. Save the length of the incoming packet. Handle 'X'.
10450 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10451
be2a5f71
DJ
104522006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10453
10454 * server.c (handle_query): Handle qSupported.
10455
ea025f5f
DJ
104562006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10457
10458 * remote-utils.c (all_symbols_looked_up): New variable.
10459 (look_up_one_symbol): Check it.
10460 * server.h (look_up_one_symbol): New declaration.
10461 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10462
9308fc88
DJ
104632006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10464
10465 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10466 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10467 (PTRACE_GET_THREAD_AREA): Define.
10468 (ps_get_thread_area): New function.
10469
52fb6437
NS
104702006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10471
10472 * configure.srv (m68k*-*-uclinux*): New target.
10473 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10474 (linux_resume_one_process): Remove extraneous cast.
10475 (linux_read_offsets): New.
10476 (linux_target_op): Add linux_read_offsets on mmuless systems.
10477 * server.c (handle_query): Add qOffsets logic.
10478 * target.h (struct target_ops): Add read_offsets.
10479
21b0f40c
DJ
104802006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10481
10482 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10483 (PTRACE_GET_THREAD_AREA): Define.
10484 (ps_get_thread_area): New function.
10485 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10486 (linux-x86-64-low.o): Update.
10487
0050a760
DJ
104882006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10489
10490 * configure.ac: Remove checks for prfpregset_t.
10491 * gdb_proc_service.h: New file.
10492 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10493 new "gdb_proc_service.h".
10494 * proc-service.c: Likewise.
10495 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10496 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10497 * Makefile.in (gdb_proc_service_h): Updated.
10498 * configure, config.in: Regenerated.
10499
b92a518e
DJ
105002006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10501
10502 * remote-utils.c (prepare_resume_reply): Move declaration
10503 of gdb_id_from_wait to the top of the block.
10504
545587ee
DJ
105052006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10506
10507 * linux-low.c (regsets_store_inferior_registers): Read the regset
10508 from the target before filling it.
10509
9db87ebd
DJ
105102006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10511
10512 * server.c (attach_inferior): Return SIGTRAP for a successful
10513 attach.
10514
dd24457d
DJ
105152006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10516
10517 * Makefile.in (OBS): Add version.o.
10518 (STAGESTUFF): Delete.
10519 (version.o): Add dependencies.
10520 (version.c): Replace rule.
10521 (clean): Remove version.c.
10522 * server.c (gdbserver_version): New.
10523 (gdbserver_usage): Use printf.
10524 (main): Handle --version and --help.
10525 * server.h (version, host_name): Add declarations.
10526
6f0f660e
EZ
105272005-12-23 Eli Zaretskii <eliz@gnu.org>
10528
889bf7c5
PA
10529 * linux-arm-low.c:
10530 * linux-arm-low.c:
10531 * inferiors.c:
10532 * i387-fp.h:
10533 * i387-fp.c:
10534 * gdbreplay.c:
10535 * regcache.c:
10536 * proc-service.c:
10537 * mem-break.h:
10538 * mem-break.c:
10539 * linux-x86-64-low.c:
10540 * linux-sh-low.c:
10541 * linux-s390-low.c:
10542 * linux-ppc64-low.c:
10543 * linux-ppc-low.c:
10544 * linux-mips-low.c:
10545 * linux-m68k-low.c:
10546 * linux-m32r-low.c:
10547 * linux-low.h:
10548 * linux-low.c:
10549 * linux-ia64-low.c:
10550 * linux-i386-low.c:
10551 * linux-crisv32-low.c:
10552 * thread-db.c:
10553 * terminal.h:
10554 * target.h:
10555 * target.c:
10556 * server.h:
10557 * server.c:
10558 * remote-utils.c:
10559 * regcache.h:
10560 * utils.c:
10561 * Makefile.in:
10562 * configure.ac:
6f0f660e
EZ
10563 * gdbserver.1: Add (C) after Copyright. Update the FSF
10564 address.
10565
9d1fb177
DJ
105662005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10567
10568 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10569 (arm_breakpoint_at): Recognize both breakpoints.
10570 (the_low_target): Use the correct breakpoint instruction.
10571
011a70c2
DJ
105722005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10573
10574 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10575 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10576 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10577 (the_low_target): Update.
10578
7fb85e41
AS
105792005-10-25 Andreas Schwab <schwab@suse.de>
10580
10581 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10582
10583 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10584 (ia64_num_regs): Reduce to 462.
10585
3db0444b
DJ
105862005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10587
10588 * acinclude.m4: Correct quoting.
10589 * aclocal.m4: Regenerated.
10590
10591 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10592 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10593 (thread_db_init): Call thread_db_err_str.
10594 * configure.ac: Check for TD_VERSION.
10595 * config.in, configure: Regenerated.
10596
bee0189a
DJ
105972005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10598
10599 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10600
e9d25b98
DJ
106012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10602
10603 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10604 is not available. Define HAVE_PTRACE_GETREGS if it is.
10605 * config.in, configure: Regenerated.
10606 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10607 * linux-i386-low.c, linux-m68k-low.c: Update to use
10608 HAVE_PTRACE_GETREGS.
10609 * linux-low.c (regsets_fetch_inferior_registers)
10610 (regsets_store_inferior_registers): Only return 0 if we processed
10611 GENERAL_REGS.
10612 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10613 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10614
a06660f7
DJ
106152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10616
10617 * inferiors.c (struct thread_info): Add gdb_id.
10618 (add_thread): Add gdb_id argument.
10619 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10620 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10621 calls to add_thread.
10622 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10623 * server.c (handle_query): Use thread_to_gdb_id.
10624 (handle_v_cont, main): Use gdb_id_to_thread_id.
10625 * server.h (add_thread): Update prototype.
10626 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10627 prototypes.
10628
5a1f5858
DJ
106292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10630
10631 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10632 left-padded registers.
10633 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10634 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10635
e122f1f5
SE
106362005-07-01 Steve Ellcey <sje@cup.hp.com>
10637
10638 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10639 * configure: Regenerate.
10640 * config.in: Regenerate.
10641 * server.h (NEED_DECLARATION_STRERROR):
10642 Replace with !HAVE_DECL_STRERROR.
10643
d592fa2f
DJ
106442005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10645
10646 * linux-low.c (linux_wait, linux_send_signal): Don't test
10647 an unsigned long variable for > 0 if it could be MAX_ULONG.
10648 * server.c (myresume): Likewise.
10649 * target.c (set_desired_inferior): Likewise.
10650
ccbd4912
MK
106512005-06-13 Mark Kettenis <kettenis@gnu.org>
10652
10653 * configure.ac: Simplify and improve check for socklen_t.
10654 * configure, config.in: Regenerate.
10655
f450004a
DJ
106562005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10657
10658 * acconfig.h: Remove.
10659 * configure.ac: Add a test for socklen_t. Use three-argument
10660 AC_DEFINE throughout.
10661 * config.in: Regenerated using autoheader 2.59.
10662 * configure: Regenerated.
10663
10664 * gdbreplay.c (socklen_t): Provide a default.
10665 (remote_open): Use socklen_t.
10666 * remote-utils.c (socklen_t): Provide a default.
10667 (remote_open): Use socklen_t.
10668 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10669 unsigned char.
10670
10671 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10672 char for buffers.
10673 * linux-low.c (linux_read_memory, linux_write_memory)
10674 (linux_read_auxv): Likewise.
10675 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10676 (check_mem_write): Likewise.
10677 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10678 Likewise.
10679 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10680 (registers_from_string, register_data): Likewise.
10681 * server.c (handle_query, main): Likewise.
10682 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10683 (decode_M_packet): Likewise.
10684 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10685 * target.h (struct target_ops): Update read_memory, write_memory,
10686 and read_auxv.
10687 (read_inferior_memory, write_inferior_memory): Update.
10688 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10689 to unsigned char *.
10690 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10691 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10692 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10693 linux-s390-low.c, linux-sh-low.c: Update for changes in
10694 read_inferior_memory and the_low_target->breakpoint.
10695
eee84df1
DJ
106962005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10697
10698 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10699 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10700 * configure.srv: Add powerpc64-*-linux*.
10701 * linux-ppc64-low.c: New file.
10702
45b134e5
OF
107032005-05-23 Orjan Friberg <orjanf@axis.com>
10704
10705 * linux-cris-low.c: New file with support for CRIS.
10706 * linux-crisv32-low.c: Ditto for CRISv32.
10707 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10708 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10709 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10710 reg-crisv32.o, and reg-crisv32.c to make rules.
10711 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10712 recognized targets.
10713
48d93c75
UW
107142005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10715
10716 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10717 of sizeof (PTRACE_XFER_TYPE).
10718 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10719
e013ee27
OF
107202005-05-12 Orjan Friberg <orjanf@axis.com>
10721
889bf7c5 10722 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10723 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10724 pointers for hardware watchpoint support.
10725 * linux-low.h (struct linux_target_ops): Ditto.
10726 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10727 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10728 to linux_target_ops.
10729 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10730 reply packet.
10731 * server.c (main): Recognize 'Z' and 'z' packets.
10732
b0ded00b
UW
107332005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10734
10735 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10736 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10737 (the_low_target): Add new members.
10738
8643e2ad
DJ
107392005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10740
10741 * proc-service.c (ps_lgetregs): Search all_processes instead of
10742 all_threads.
10743
fc620387
DJ
107442005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10745
10746 * server.c (start_inferior): Change return type to int.
10747 (attach_inferior): Change sigptr to int *.
10748 (handle_v_cont, handle_v_requests): Change signal to int *.
10749 (main): Change signal to int.
10750
107512005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10752
10753 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10754 * configure.srv: Add m32r*-*-linux*.
10755 * linux-m32r-low.c: New file.
10756
e0e76420
DJ
107572005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10758
10759 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10760
a1928bad
DJ
107612005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10762
10763 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10764 Take unsigned long arguments for PIDs.
10765 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10766 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10767 (wait_for_sigstop, linux_resume_one_process)
10768 (regsets_fetch_inferior_registers, linux_send_signal)
10769 (linux_read_auxv): Likewise. Update the types of variables holding
10770 PIDs. Update format string specifiers.
10771 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10772 * remote-utils.c (prepare_resume_reply): Likewise.
10773 * server.c (cont_thread, general_thread, step_thread)
10774 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10775 unsigned long.
10776 (handle_query): Update format specifiers.
10777 (handle_v_cont, main): Use strtoul for thread IDs.
10778 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10779 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10780 (general_thread, step_thread, thread_from_wait)
10781 (old_thread_from_wait): Update.
10782 * target.h (struct thread_resume): Use unsigned long for THREAD.
10783 (struct target_ops): Use unsigned long for arguments to attach and
10784 thread_alive.
10785
dcdb98d2
DJ
107862005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10787
10788 * acinclude.m4: Include bfd/bfd.m4 directly.
10789 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10790 <agriffis@toolchain.org>.
10791 * aclocal.m4, configure: Regenerated.
10792
bec39cab
AC
107932005-01-07 Andrew Cagney <cagney@gnu.org>
10794
10795 * configure.ac: Rename configure.in, require autoconf 2.59.
10796 * configure: Re-generate.
10797
434c4c77
DJ
107982004-12-08 Daniel Jacobowitz <dan@debian.org>
10799
10800 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10801 LIBS when finished.
10802 * aclocal.m4: Regenerated.
10803 * configure: Regenerated.
10804
db1d3e1b
AS
108052004-11-21 Andreas Schwab <schwab@suse.de>
10806
10807 * linux-m68k-low.c (m68k_num_gregs): Define.
10808 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10809 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10810 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10811 (m68k_breakpoint_at): New. Add to the_low_target.
10812
10813 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10814 srv_linux_thread_db to yes.
10815
43360365
JB
108162004-10-20 Joel Brobecker <brobecker@gnat.com>
10817
10818 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10819 (ARCH_SET_FS): Likewise.
10820 (ARCH_GET_FS): Likewise.
10821 (ARCH_GET_GS): Likewise.
10822
fd500816
DJ
108232004-10-16 Daniel Jacobowitz <dan@debian.org>
10824
10825 * linux-i386-low.c (ps_get_thread_area): New.
10826 * linux-x86-64-low.c (ps_get_thread_area): New.
10827 * linux-low.c: Include <sys/syscall.h>.
10828 (linux_kill_one_process): Don't kill the first thread here.
10829 (linux_kill): Kill the first thread here.
10830 (kill_lwp): New function.
10831 (send_sigstop, linux_send_signal): Use it.
10832 * proc-service.c: Clean up #ifdefs.
10833 (fpregset_info): Delete.
10834 (ps_lgetregs): Update and enable implementation.
10835 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10836 implementations.
10837 * remote-utils.c (struct sym_cache, symbol_cache): New.
10838 (input_interrupt): Print a clearer message.
10839 (async_io_enabled): New variable.
10840 (enable_async_io, disable_async_io): Use it. Update comments.
10841 (look_up_one_symbol): Use the symbol cache.
10842 * thread-db.c (thread_db_look_up_symbols): New function.
10843 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10844
f6de3c42
DJ
108452004-10-16 Daniel Jacobowitz <dan@debian.org>
10846
10847 * configure.in: Test for -rdynamic.
10848 * configure: Regenerated.
10849 * Makefile (INTERNAL_LDFLAGS): New.
10850 (gdbserver, gdbreplay): Use it.
10851
2c0fc042
AC
108522004-09-02 Andrew Cagney <cagney@gnu.org>
10853
10854 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10855
075b3282
DJ
108562004-03-23 Daniel Jacobowitz <drow@mvista.com>
10857
10858 * linux-low.c (linux_wait): Clear all_processes list also.
10859
fa6a77dc
DJ
108602004-03-12 Daniel Jacobowitz <drow@mvista.com>
10861
10862 * linux-low.c: Include <errno.h>. Remove extern declaration of
10863 errno.
10864
6d782a97
DJ
108652004-03-12 Daniel Jacobowitz <drow@mvista.com>
10866
10867 * gdbreplay.c, server.h, utils.c: Update copyright years.
10868
3a7fb99b
DJ
108692004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10870
10871 * server.c (main): Print child status or termination signal from
10872 variable 'signal', not 'sig'.
10873
c3e735a6
DJ
108742004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10875
10876 * linux-low.c (linux_read_memory): Change return type to
10877 int. Check for and return error from ptrace().
10878 * target.c (read_inferior_memory): Change return type to int. Pass
10879 back return status from the_target->read_memory().
10880 * target.h (struct target_ops): Adapt *read_memory() prototype.
10881 Update comment.
10882 (read_inferior_memory): Adapt prototype.
10883 * server.c (main): Return an error packet if
10884 read_inferior_memory() returns an error.
10885
a59d1c82
DJ
108862004-03-04 Daniel Jacobowitz <drow@mvista.com>
10887
10888 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10889 Unify with other clean targets.
10890
dc3f8883
DJ
108912004-02-29 Daniel Jacobowitz <drow@mvista.com>
10892
10893 * server.c (handle_v_cont): Call set_desired_inferior.
10894
89a208da
DJ
108952004-02-29 Daniel Jacobowitz <drow@mvista.com>
10896
10897 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10898
62ea82f5
DJ
108992004-02-29 Daniel Jacobowitz <drow@mvista.com>
10900
10901 * linux-low.c (linux_wait): Unblock async I/O.
10902 (linux_resume): Block and enable async I/O.
10903 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10904 * server.h (block_async_io, unblock_async_io): Add prototypes.
10905
6910d122
DJ
109062004-02-29 Daniel Jacobowitz <drow@mvista.com>
10907
10908 * remote-utils.c (remote_open): Print a status notice after
10909 opening a TCP port.
10910 * server.c (attach_inferior): Print a status notice after
10911 attaching.
10912
109132004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10914
10915 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10916
c89dc5d4
DJ
109172004-02-26 Daniel Jacobowitz <drow@mvista.com>
10918
10919 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10920 error packet.
10921 * server.c, target.h: Update copyright years.
10922
4b8dad4a
RM
109232004-02-25 Roland McGrath <roland@redhat.com>
10924
10925 * target.h (struct target_ops): New member `read_auxv'.
10926 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10927 * linux-low.c (linux_read_auxv): New function.
10928 (linux_target_ops): Initialize `read_auxv' member to that.
10929
d7446758
JB
109302004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10931
10932 Committed by Jim Blandy <jimb@redhat.com>.
10933
10934 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10935 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10936 instead of GPR_SIZE to distiguish s390 and s390x targets.
10937
5544ad89
DJ
109382004-01-31 Daniel Jacobowitz <drow@mvista.com>
10939
10940 * linux-low.c: Update copyright year.
10941 (check_removed_breakpoint): Clear pending_is_breakpoint.
10942 (linux_set_resume_request, linux_queue_one_thread)
10943 (resume_status_pending_p): New functions.
10944 (linux_continue_one_thread): Use process->resume.
10945 (linux_resume): Only resume threads if there are no pending events.
10946 * linux-low.h (struct process_info): Add resume request
10947 pointer.
10948
2a68b70e
DJ
109492004-01-30 Daniel Jacobowitz <drow@mvista.com>
10950
10951 * regcache.c (new_register_cache): Clear the allocated register
10952 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10953
64386c31
DJ
109542003-10-13 Daniel Jacobowitz <drow@mvista.com>
10955
10956 * linux-low.c (linux_resume): Take a struct thread_resume *
10957 argument.
10958 (linux_wait): Update call.
10959 (resume_ptr): New static variable.
10960 (linux_continue_one_thread): Renamed from
10961 linux_continue_one_process. Use resume_ptr.
10962 (linux_resume): Use linux_continue_one_thread.
10963 * server.c (handle_v_cont, handle_v_requests): New functions.
10964 (myresume): New function.
10965 (main): Handle 'v' case.
10966 * target.h (struct thread_resume): New type.
10967 (struct target_ops): Change argument of "resume" to struct
10968 thread_resume *.
10969 (myresume): Delete macro.
10970
c938e9b0
L
109712003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10972
10973 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10974 (uninstall): Support DESTDIR.
10975
7f313d07
BC
10976Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10977
10978 * configure.srv: Add xscale*linux copy of arm*linux entry.
10979
3b2fc2ea
DJ
109802003-07-24 Daniel Jacobowitz <drow@mvista.com>
10981
10982 * linux-arm-low.c (arm_reinsert_addr): New function.
10983 (the_low_target): Add arm_reinsert_addr.
10984
1c0a559e
MK
109852003-07-08 Mark Kettenis <kettenis@gnu.org>
10986
10987 * mem-break.c: Remove whitespace at end of file.
10988
43d5792c
DJ
109892003-06-28 Daniel Jacobowitz <drow@mvista.com>
10990
10991 * configure.in: Check whether we need to prototype strerror.
10992 * server.h: Optionally prototype strerror.
10993 * gdbreplay.c (perror_with_name): Use strerror.
10994 * linux-low.c (linux_attach_lwp): Use strerror.
10995 * utils.c (perror_with_name): Use strerror.
10996 * config.in, configure: Regenerated.
10997
c8a86edf
DJ
109982003-06-28 Daniel Jacobowitz <drow@mvista.com>
10999
11000 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11002
73d37363
DJ
110032003-06-20 Daniel Jacobowitz <drow@mvista.com>
11004
11005 * Makefile.in (SFILES): Update.
11006 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11007 low-sun3.c: Remove files.
11008
6ad8ae5c
DJ
110092003-06-17 Daniel Jacobowitz <drow@mvista.com>
11010
11011 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11012 (linux_detach_one_process, linux_detach): New functions.
11013 (linux_target_ops): Add linux_detach.
11014 * server.c (main): Handle 'D' packet.
11015 * target.h (struct target_ops): Add "detach" member.
11016 (detach_inferior): Define.
11017
1581182a
MK
110182003-06-13 Mark Kettenis <kettenis@gnu.org>
11019
11020 From Kelley Cook <kelleycook@wideopenwest.com>:
11021 * configure.srv: Accept i[34567]86 variants.
11022
e5379b03
DJ
110232003-06-05 Daniel Jacobowitz <drow@mvista.com>
11024
11025 * linux-low.c (linux_wait_for_event): Correct comment typos.
11026 (linux_resume_one_process): Call check_removed_breakpoint.
11027 (linux_send_signal): New function.
11028 (linux_target_ops): Add linux_send_signal.
11029 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11030 of kill.
11031 * target.h (struct target_ops): Add send_signal.
11032
2ff29de4
JB
110332003-05-29 Jim Blandy <jimb@redhat.com>
11034
11035 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11036 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11037 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11038 away part of the register's value.
11039
254787d4
DJ
110402003-03-26 Daniel Jacobowitz <drow@mvista.com>
11041
11042 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11043 (linux_wait_for_event, linux_init_signals): Likewise.
11044
94e10508
DJ
110452003-03-17 Daniel Jacobowitz <drow@mvista.com>
11046
11047 * configure.in: Check for stdlib.h.
11048 * configure: Regenerated.
11049 * config.in: Regenerated.
11050
4c0711e0
DJ
110512003-01-04 Andreas Schwab <schwab@suse.de>
11052
11053 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11054
ef66e766
AC
110552003-01-02 Andrew Cagney <ac131313@redhat.com>
11056
11057 * Makefile.in: Remove obsolete code.
11058
a1358604
DJ
110592002-11-20 Daniel Jacobowitz <drow@mvista.com>
11060
11061 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11062 defined(PT_FPR0_HI).
11063
23ce3b1c
DJ
110642002-11-17 Stuart Hughes <seh@zee2.com>
11065
11066 * linux-arm-low.c (arm_num_regs): Increase.
11067 (arm_regmap): Include status register.
11068
110692002-11-17 Daniel Jacobowitz <drow@mvista.com>
11070
11071 * linux-low.c (register_addr): Remove incorrect -1 check.
11072
a9fa9f7d
DJ
110732002-08-29 Daniel Jacobowitz <drow@mvista.com>
11074
11075 * linux-low.c (linux_create_inferior): Call setpgid. Return
11076 the new PID.
11077 (unstopped_p, linux_signal_pid): Remove.
11078 (linux_target_ops): Remove linux_signal_pid.
11079 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11080 global instead of target method.
11081 * target.h (struct target_ops): Remove signal_pid. Update comment
11082 for create_inferior.
11083 * server.c (signal_pid): New variable.
11084 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11085 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11086 (attach_inferior): Set signal_pid.
11087
17574093
DJ
110882002-08-23 Daniel Jacobowitz <drow@mvista.com>
11089
11090 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11091
110922002-08-20 Jim Blandy <jimb@redhat.com>
11093
11094 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11095 default for this.
11096
110972002-08-01 Andrew Cagney <cagney@redhat.com>
11098
11099 * Makefile.in: Make chill references obsolete.
11100
111012002-07-24 Kevin Buettner <kevinb@redhat.com>
11102
11103 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11104 * configure: Regenerate.
11105 * config.in: Regenerate.
11106
111072002-07-09 David O'Brien <obrien@FreeBSD.org>
11108
11109 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11110 (perror_with_name, remote_close, remote_open, expect, play): Static.
11111
111122002-07-04 Michal Ludvig <mludvig@suse.cz>
11113
4b8dad4a 11114 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11115 byte offsets instead of an array of indexes.
11116 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11117
111182002-06-13 Daniel Jacobowitz <drow@mvista.com>
11119
11120 * regcache.c: Add comment.
11121
111222002-06-11 Daniel Jacobowitz <drow@mvista.com>
11123
11124 * thread-db.c: New file.
11125 * proc-service.c: New file.
11126 * acinclude.m4: New file.
11127 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11128 proc-service.o, and thread-db.o.
11129 (linux-low.o): Add USE_THREAD_DB.
11130 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11131 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11132 * aclocal.m4: Regenerated.
11133 * config.in: Regenerated.
11134 * configure: Regenerated.
11135 * configure.in: Check for proc_service.h, sys/procfs.h,
11136 thread_db.h, and linux/elf.h headrs.
11137 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11138 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11139 Check for -lthread_db and thread support.
11140 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11141 PowerPC, and SuperH.
11142 * i387-fp.c: Constify arguments.
11143 * i387-fp.h: Likewise.
11144 * inferiors.c: (struct thread_info): Renamed from
11145 `struct inferior_info'. Remove PID member. Use generic inferior
11146 list header. All uses updated.
11147 (inferiors, signal_pid): Removed.
11148 (all_threads): New variable.
11149 (get_thread): Define.
11150 (add_inferior_to_list): New function.
11151 (for_each_inferior): New function.
11152 (change_inferior_id): New function.
11153 (add_inferior): Removed.
11154 (remove_inferior): New function.
11155 (add_thread): New function.
11156 (free_one_thread): New function.
11157 (remove_thread): New function.
11158 (clear_inferiors): Use for_each_inferior and free_one_thread.
11159 (find_inferior): New function.
11160 (find_inferior_id): New function.
11161 (inferior_target_data): Update argument type.
11162 (set_inferior_target_data): Likewise.
11163 (inferior_regcache_data): Likewise.
11164 (set_inferior_regcache_data): Likewise.
11165 * linux-low.c (linux_bp_reinsert): Remove.
11166 (all_processes, stopping_threads, using_thrads)
11167 (struct pending_signals, debug_threads, pid_of): New.
11168 (inferior_pid): Replace with macro.
11169 (struct inferior_linux_data): Remove.
11170 (get_stop_pc, add_process): New functions.
11171 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11172 Use add_process and add_thread.
11173 (linux_attach_lwp): New function, based on old linux_attach. Use
11174 add_process and add_thread. Set stop_expected for new threads.
11175 (linux_attach): New function.
11176 (linux_kill_one_process): New function.
11177 (linux_kill): Kill all LWPs.
11178 (linux_thread_alive): Use find_inferior_id.
11179 (check_removed_breakpoints, status_pending_p): New functions.
11180 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11181 Update. Use WNOHANG. Wait for cloned processes also. Update process
11182 struct for the found process.
11183 (linux_wait_for_event): New function.
11184 (linux_wait): Use it. Support LWPs.
11185 (send_sigstop, wait_for_sigstop, stop_all_processes)
11186 (linux_resume_one_process, linux_continue_one_process): New functions.
11187 (linux_resume): Support LWPs.
11188 (REGISTER_RAW_SIZE): Remove.
11189 (fetch_register): Use register_size instead. Call supply_register.
11190 (usr_store_inferior_registers): Likewise. Call collect_register.
11191 Fix recursive case.
11192 (regsets_fetch_inferior_registers): Improve error message.
11193 (regsets_store_inferior_registers): Add debugging.
11194 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11195 (unstopped_p, linux_signal_pid): New functions.
11196 (linux_target_ops): Add linux_signal_pid.
11197 (linux_init_signals): New function.
11198 (initialize_low): Call it. Initialize using_threads.
11199 * regcache.c (inferior_regcache_data): Add valid
11200 flag.
11201 (get_regcache): Fetch registers lazily. Add fetch argument
11202 and update all callers.
11203 (regcache_invalidate_one, regcache_invalidate): New
11204 functions.
11205 (new_register_cache): Renamed from create_register_cache.
11206 Return the new regcache.
11207 (free_register_cache): Change argument to a void *.
11208 (registers_to_string, registers_from_string): Call get_regcache
11209 with fetch flag set.
11210 (register_data): Make static. Pass fetch flag to get_regcache.
11211 (supply_register): Call get_regcache with fetch flag clear.
11212 (collect_register): Call get_regcache with fetch flag set.
11213 (collect_register_as_string): New function.
11214 * regcache.h: Update.
11215 * remote-utils.c (putpkt): Flush after debug output and use
11216 stderr.
11217 Handle input interrupts while waiting for an ACK.
11218 (input_interrupt): Use signal_pid method.
11219 (getpkt): Flush after debug output and use stderr.
11220 (outreg): Use collect_register_as_string.
11221 (new_thread_notify, dead_thread_notify): New functions.
11222 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11223 and general_thread.
11224 (look_up_one_symbol): Flush after debug output.
11225 * server.c (step_thread, server_waiting): New variables.
11226 (start_inferior): Don't use signal_pid. Update call to mywait.
11227 (attach_inferior): Update call to mywait.
11228 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11229 (main): Don't fetch/store registers explicitly. Use
11230 set_desired_inferior. Support proposed ``Hs'' packet. Update
11231 calls to mywait.
11232 * server.h: Update.
11233 (struct inferior_list, struct_inferior_list_entry): New.
11234 * target.c (set_desired_inferior): New.
11235 (write_inferior_memory): Constify.
11236 (mywait): New function.
11237 * target.h: Update.
11238 (struct target_ops): New signal_pid method.
11239 (mywait): Removed macro, added prototype.
11240
11241 * linux-low.h (regset_func): Removed.
11242 (regset_fill_func, regset_store_func): New.
11243 (enum regset_type): New.
11244 (struct regset_info): Add type field. Use new operation types.
11245 (struct linux_target_ops): stop_pc renamed to get_pc.
11246 Add decr_pc_after_break and breakpoint_at.
11247 (get_process, get_thread_proess, get_process_thread)
11248 (strut process_info, all_processes, linux_attach_lwp)
11249 (thread_db_init): New.
11250
11251 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11252 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11253 (the_low_target): Add new members.
11254 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11255 (i386_store_fpxregset): Constify.
11256 (target_regsets): Add new kind identifier.
11257 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11258 (i386_set_pc): Add debugging.
11259 (i386_breakpoint_at): New function.
11260 (the_low_target): Add new members.
11261 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11262 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11263 (mips_breakpoint_at): New.
11264 (the_low_target): Add new members.
11265 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11266 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11267 (the_low_target): Add new members.
11268 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11269 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11270 (the_low_target): Add new members.
11271 * linux-x86-64-low.c (target_regsets): Add new kind
11272 identifier.
11273
112742002-05-15 Daniel Jacobowitz <drow@mvista.com>
11275
11276 From Martin Pool <mbp@samba.org>:
11277 * server.c (gdbserver_usage): New function.
11278 (main): Call it.
11279
112802002-05-14 Daniel Jacobowitz <drow@mvista.com>
11281
11282 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11283 stop_at -> stop_pc.
11284
112852002-05-04 Andrew Cagney <ac131313@redhat.com>
11286
11287 * Makefile.in: Remove obsolete code.
11288
112892002-04-24 Michal Ludvig <mludvig@suse.cz>
11290
11291 * linux-low.c (regsets_fetch_inferior_registers),
11292 (regsets_store_inferior_registers): Removed cast to int from
11293 ptrace() calls.
11294 * regcache.h: Added declaration of struct inferior_info.
11295
112962002-04-20 Daniel Jacobowitz <drow@mvista.com>
11297
11298 * inferiors.c (struct inferior_info): Add regcache_data.
11299 (add_inferior): Call create_register_cache.
11300 (clear_inferiors): Call free_register_cache.
11301 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11302 * regcache.c (struct inferior_regcache_data): New.
11303 (registers): Remove.
11304 (get_regcache): New function.
11305 (create_register_cache, free_register_cache): New functions.
11306 (set_register_cache): Don't initialize the register cache here.
11307 (registers_to_string, registers_from_string, register_data): Call
11308 get_regcache.
11309 * regcache.h: Add prototypes.
11310 * server.h: Likewise.
11311
113122002-04-20 Daniel Jacobowitz <drow@mvista.com>
11313
11314 * mem-break.c: New file.
11315 * mem-break.h: New file.
11316 * Makefile.in: Add mem-break.o rule; update server.h
11317 dependencies.
11318 * inferiors.c (struct inferior_info): Add target_data
11319 member.
11320 (clear_inferiors): Free target_data member if set.
11321 (inferior_target_data, set_inferior_target_data): New functions.
11322 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11323 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11324 * linux-low.c (linux_bp_reinsert): New variable.
11325 (struct inferior_linux_data): New.
11326 (linux_create_inferior): Use set_inferior_target_data.
11327 (linux_attach): Likewise. Call add_inferior.
11328 (linux_wait_for_one_inferior): New function.
11329 (linux_wait): Call it.
11330 (linux_write_memory): Add const.
11331 (initialize_low): Call set_breakpoint_data.
11332 * linux-low.h (struct linux_target_ops): Add breakpoint
11333 handling members.
11334 * server.c (attach_inferior): Remove extra add_inferior
11335 call.
11336 * server.h: Include mem-break.h. Update inferior.c
11337 prototypes.
11338 * target.c (read_inferior_memory)
11339 (write_inferior_memory): New functions.
11340 * target.h (read_inferior_memory)
11341 (write_inferior_memory): Change macros to prototypes.
11342 (struct target_ops): Update comments. Add const to write_memory
11343 definition.
11344
113452002-04-11 Daniel Jacobowitz <drow@mvista.com>
11346
11347 * linux-low.c (usr_store_inferior_registers): Support
11348 registers which are allowed to fail to store.
11349 * linux-low.h (linux_target_ops): Likewise.
11350 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11351 (ppc_cannot_store_register): FPSCR may not be storable.
11352
113532002-04-09 Daniel Jacobowitz <drow@mvista.com>
11354
11355 * server.h: Include <string.h> if HAVE_STRING_H.
11356 * ChangeLog: Correct paths in last ChangeLog entry.
11357
113582002-04-09 Daniel Jacobowitz <drow@mvista.com>
11359
11360 * linux-low.h: Remove obsolete prototypes.
11361 (struct linux_target_ops): New.
11362 (extern the_low_target): New.
11363 * linux-low.c (num_regs, regmap): Remove declarations.
11364 (register_addr): Use the_low_target explicitly.
11365 (fetch_register): Likewise.
11366 (usr_fetch_inferior_registers): Likewise.
11367 (usr_store_inferior_registers): Likewise.
11368 * linux-arm-low.c (num_regs): Remove.
11369 (arm_num_regs): Define.
11370 (arm_regmap): Renamed from regmap, made static.
11371 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11372 made static.
11373 (arm_cannot_store_register): Renamed from cannot_store_register,
11374 made static.
11375 (the_low_target): New.
11376 * linux-i386-low.c (num_regs): Remove.
11377 (i386_num_regs): Define.
11378 (i386_regmap): Renamed from regmap, made static.
11379 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11380 made static.
11381 (i386_cannot_store_register): Renamed from cannot_store_register,
11382 made static.
11383 (the_low_target): New.
11384 * linux-ia64-low.c (num_regs): Remove.
11385 (ia64_num_regs): Define.
11386 (ia64_regmap): Renamed from regmap, made static.
11387 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11388 made static.
11389 (ia64_cannot_store_register): Renamed from cannot_store_register,
11390 made static.
11391 (the_low_target): New.
11392 * linux-m68k-low.c (num_regs): Remove.
11393 (m68k_num_regs): Define.
11394 (m68k_regmap): Renamed from regmap, made static.
11395 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11396 made static.
11397 (m68k_cannot_store_register): Renamed from cannot_store_register,
11398 made static.
11399 (the_low_target): New.
11400 * linux-mips-low.c (num_regs): Remove.
11401 (mips_num_regs): Define.
11402 (mips_regmap): Renamed from regmap, made static.
11403 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11404 made static.
11405 (mips_cannot_store_register): Renamed from cannot_store_register,
11406 made static.
11407 (the_low_target): New.
11408 * linux-ppc-low.c (num_regs): Remove.
11409 (ppc_num_regs): Define.
11410 (ppc_regmap): Renamed from regmap, made static.
11411 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11412 made static.
11413 (ppc_cannot_store_register): Renamed from cannot_store_register,
11414 made static.
11415 (the_low_target): New.
11416 * linux-s390-low.c (num_regs): Remove.
11417 (s390_num_regs): Define.
11418 (s390_regmap): Renamed from regmap, made static.
11419 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11420 made static.
11421 (s390_cannot_store_register): Renamed from cannot_store_register,
11422 made static.
11423 (the_low_target): New.
11424 * linux-sh-low.c (num_regs): Remove.
11425 (sh_num_regs): Define.
11426 (sh_regmap): Renamed from regmap, made static.
11427 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11428 made static.
11429 (sh_cannot_store_register): Renamed from cannot_store_register,
11430 made static.
11431 (the_low_target): New.
11432 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11433 (the_low_target): New.
11434
114352002-04-09 Daniel Jacobowitz <drow@mvista.com>
11436
11437 * Makefile.in: Add stamp-h target.
11438 * configure.in: Create stamp-h.
11439 * configure: Regenerated.
11440
114412002-04-09 Daniel Jacobowitz <drow@mvista.com>
11442
11443 * inferiors.c: New file.
11444 * target.c: New file.
11445 * target.h: New file.
11446 * Makefile.in: Add target.o and inferiors.o. Update
11447 dependencies.
11448 * linux-low.c (inferior_pid): New static variable,
11449 moved from server.c.
11450 (linux_create_inferior): Renamed from create_inferior.
11451 Call add_inferior. Return 0 on success instead of a PID.
11452 (linux_attach): Renamed from myattach.
11453 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11454 (linux_thread_alive): Renamed from mythread_alive.
11455 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11456 child dies.
11457 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11458 (regsets_store_inferior_registers): Correct error message.
11459 Add missing ``return 0''.
11460 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11461 (linux_store_registers): Renamed from store_inferior_registers.
11462 (linux_read_memory): Renamed from read_inferior_memory.
11463 (linux_write_memory): Renamed from write_inferior_memory.
11464 (linux_target_ops): New structure.
11465 (initialize_low): Call set_target_ops ().
11466 * remote-utils.c (unhexify): New function.
11467 (hexify): New function.
11468 (input_interrupt): Send signals to ``signal_pid''.
11469 * server.c (inferior_pid): Remove.
11470 (start_inferior): Update create_inferior call.
11471 (attach_inferior): Call add_inferior.
11472 (handle_query): New function.
11473 (main): Call handle_query for `q' packets.
11474 * server.h: Include "target.h". Remove obsolete prototypes.
11475 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11476
114772002-04-09 Daniel Jacobowitz <drow@mvista.com>
11478
11479 * Makefile.in: Add WARN_CFLAGS. Update configury
11480 dependencies.
11481 * configure.in: Check for <string.h>
11482 * configure: Regenerate.
11483 * config.in: Regenerate.
11484 * gdbreplay.c: Include needed system headers.
11485 (remote_open): Remove strchr prototype.
11486 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11487 * regcache.c (supply_register): Change buf argument to const void *.
11488 (supply_register_by_name): Likewise.
11489 (collect_register): Change buf argument to void *.
11490 (collect_register_by_name): Likewise.
11491 * regcache.h: Add missing prototypes.
11492 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11493 * server.c (handle_query): New function.
11494 (attached): New static variable, moved out of main.
11495 (main): Quiet longjmp clobber warnings.
11496 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11497 * utils.c (error): Remove NORETURN.
11498 (fatal): Likewise.