]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Test --wrapper in extended-remote
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
af1b22f3
YQ
12015-07-21 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4 aarch64_linux_get_debug_reg_capacity.
5
554717a3
YQ
62015-07-17 Yao Qi <yao.qi@linaro.org>
7
8 * Makefile.in (aarch64-linux-hw-point.o): New rule.
9 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
11 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
12 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
13 (AARCH64_HWP_ALIGNMENT): Likewise.
14 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
15 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
16 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
17 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
18 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
19 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
20 (struct aarch64_debug_reg_state): Likewise.
21 (struct arch_lwp_info): Likewise.
22 (aarch64_align_watchpoint): Likewise.
23 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
24 (aarch64_watchpoint_length): Likewise.
25 (aarch64_point_encode_ctrl_reg): Likewise
26 (aarch64_point_is_aligned): Likewise.
27 (aarch64_align_watchpoint): Likewise.
28 (aarch64_linux_set_debug_regs):
29 (aarch64_dr_state_insert_one_point): Likewise.
30 (aarch64_dr_state_remove_one_point): Likewise.
31 (aarch64_handle_breakpoint): Likewise.
32 (aarch64_handle_aligned_watchpoint): Likewise.
33 (aarch64_handle_unaligned_watchpoint): Likewise.
34 (aarch64_handle_watchpoint): Likewise.
35
c67ca4de
YQ
362015-07-17 Yao Qi <yao.qi@linaro.org>
37
38 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
39 and don't aarch64_get_debug_reg_state. All callers update.
40 (aarch64_handle_aligned_watchpoint): Likewise.
41 (aarch64_handle_unaligned_watchpoint): Likewise.
42 (aarch64_handle_watchpoint): Likewise.
43 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
44 (aarch64_remove_point): Likewise.
45
25abf979
YQ
462015-07-17 Yao Qi <yao.qi@linaro.org>
47
48 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
49 debug_printf.
50 (aarch64_handle_unaligned_watchpoint): Likewise.
51
db1ff28b
JK
522015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
53
54 Revert the previous 3 commits:
55 Move gdb_regex* to common/
56 Move linux_find_memory_regions_full & co.
57 gdbserver build-id attribute generator
58
700ca40f
JK
592015-07-15 Aleksandar Ristovski <aristovski@qnx.com
60 Jan Kratochvil <jan.kratochvil@redhat.com>
61
62 gdbserver build-id attribute generator.
63 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
64 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
65 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
66 (find_phdr): New.
67 (get_dynamic): Use find_pdhr to traverse program headers.
68 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
69 (compare_mapping_entry_range, struct find_memory_region_callback_data)
70 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
71 (get_hex_build_id): New.
72 (linux_qxfer_libraries_svr4): Add optional build-id attribute
73 to reply XML document.
74
9904185c
JK
752015-07-15 Aleksandar Ristovski <aristovski@qnx.com
76 Jan Kratochvil <jan.kratochvil@redhat.com>
77
78 * target.c: Include target/target-utils.h and fcntl.h.
79 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
80 (target_fileio_read_stralloc): New functions.
81
6e5b4429
JK
822015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
83
84 * Makefile.in (OBS): Add gdb_regex.o.
85 (gdb_regex.o): New.
86 * config.in: Rebuilt.
87 * configure: Rebuilt.
88
ddc98fbf
JK
892015-07-15 Aleksandar Ristovski <aristovski@qnx.com
90 Jan Kratochvil <jan.kratochvil@redhat.com>
91
92 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
93 * Makefile.in (OBS): Add target-utils.o.
94 (linux-maps.o, target-utils.o): New.
95 * configure.srv (srv_linux_obj): Add linux-maps.o.
96
e57bb7a0
PL
972015-07-15 Pierre Langlois <pierre.langlois@arm.com>
98
99 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
100 function, return 1.
101 (the_low_target): Install it.
102
586b02a9
PA
1032015-07-14 Pedro Alves <palves@redhat.com>
104
105 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
106 Instead, ignore ECHILD, and throw an error for other errnos.
107
58c1b36c
PA
1082015-07-10 Pedro Alves <palves@redhat.com>
109
110 * event-loop.c (struct callback_event) <data>: Change type to
111 gdb_client_data instance instead of gdb_client_data pointer.
112 (append_callback_event): Adjust.
113
421530db
PL
1142015-07-10 Pierre Langlois <pierre.langlois@arm.com>
115
116 * linux-aarch64-low.c: Add comments for each linux_target_ops
117 method. Remove comments already covered in target_ops and
118 linux_target_ops definitions.
119 (the_low_target): Add comments for each unimplemented method.
120
c2d65f38
YQ
1212015-07-09 Yao Qi <yao.qi@linaro.org>
122
123 * linux-aarch64-low.c (aarch64_regmap): Remove.
124 (aarch64_usrregs_info): Remove.
125 (regs_info): Set field usrregs to NULL.
126
b20a6524
MM
1272015-07-02 Markus Metzger <markus.t.metzger@intel.com>
128
129 * linux-low.c: Include "rsp-low.h"
130 (linux_low_encode_pt_config, linux_low_encode_raw): New.
131 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
132 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
133 (handle_btrace_enable_pt): New.
134 (handle_btrace_general_set): Support "pt".
135 (handle_btrace_conf_general_set): Support "pt:size".
136
96c97461
PL
1372015-06-29 Pierre Langlois <pierre.langlois@arm.com>
138
139 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
140 Z_PACKET_SW_BP.
141
37d66942
PL
1422015-06-29 Pierre Langlois <pierre.langlois@arm.com>
143
144 * linux-aarch64-low.c: Remove comment about endianness.
145 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
146 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
147 memcmp.
148
dc06243f
GB
1492015-06-24 Gary Benson <gbenson@redhat.com>
150
151 * linux-i386-ipa.c (stdint.h): Do not include.
152 * lynx-i386-low.c (stdint.h): Likewise.
153 * lynx-ppc-low.c (stdint.h): Likewise.
154 * mem-break.c (stdint.h): Likewise.
155 * thread-db.c (stdint.h): Likewise.
156 * tracepoint.c (stdint.h): Likewise.
157 * win32-low.c (stdint.h): Likewise.
158
124e13d9
SM
1592015-06-18 Simon Marchi <simon.marchi@ericsson.com>
160
161 * server.c (write_qxfer_response): Update call to
162 remote_escape_output.
163
909c2cda
JK
1642015-06-15 Aleksandar Ristovski <aristovski@qnx.com
165 Jan Kratochvil <jan.kratochvil@redhat.com>
166
167 Merge multiple hex conversions.
168 * gdbreplay.c (tohex): Rename to 'fromhex'.
169 (logchar): Use fromhex.
170
24c05f46
JK
1712015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
172
173 * server.c (handle_qxfer_libraries): Set `version' attribute for
174 <library-list>.
175
14d2069a
GB
1762015-06-10 Gary Benson <gbenson@redhat.com>
177
178 * target.h (struct target_ops) <multifs_open>: New field.
179 <multifs_unlink>: Likewise.
180 <multifs_readlink>: Likewise.
181 * linux-low.c (nat/linux-namespaces.h): New include.
182 (linux_target_ops): Initialize the_target->multifs_open,
183 the_target->multifs_unlink and the_target->multifs_readlink.
184 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
185 * hostio.c (hostio_fs_pid): New static variable.
186 (hostio_handle_new_gdb_connection): New function.
187 (handle_setfs): Likewise.
188 (handle_open): Use the_target->multifs_open as appropriate.
189 (handle_unlink): Use the_target->multifs_unlink as appropriate.
190 (handle_readlink): Use the_target->multifs_readlink as
191 appropriate.
192 (handle_vFile): Handle vFile:setfs packets.
193 * server.c (handle_query): Call hostio_handle_new_gdb_connection
194 after target_handle_new_gdb_connection.
195
4b8b5e72
GB
1962015-06-10 Gary Benson <gbenson@redhat.com>
197
198 * configure.ac (AC_CHECK_FUNCS): Add setns.
199 * config.in: Regenerate.
200 * configure: Likewise.
201 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
202 (linux-namespaces.o): New rule.
203 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
204
3ac2e371
GB
2052015-06-09 Gary Benson <gbenson@redhat.com>
206
207 * hostio.c (handle_open): Process mode argument with
208 fileio_to_host_mode.
209
ca9b78ce
YQ
2102015-06-01 Yao Qi <yao.qi@linaro.org>
211
212 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
213 * linux-x86-low.c: Likewise.
214
bfacd19d
DB
2152015-05-28 Don Breazeal <donb@codesourcery.com>
216
217 * linux-low.c (handle_extended_wait): Initialize
218 thread_info.last_resume_kind for new fork children.
219
452003ef
PA
2202015-05-15 Pedro Alves <palves@redhat.com>
221
222 * target.h (target_handle_new_gdb_connection): Rewrite using if
223 wrapped in do/while.
224
1041a03c
JB
2252015-05-14 Joel Brobecker <brobecker@adacore.com>
226
227 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
228 * configure, config.in: Regenerate.
229 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
230 Declare typedef.
231
c269dbdb
DB
2322015-05-12 Don Breazeal <donb@codesourcery.com>
233
234 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
235 PTRACE_EVENT_VFORK_DONE.
236 (linux_low_ptrace_options, extended_event_reported): Add vfork
237 events.
238 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
239 and "vforkdone" for RSP 'T' Stop Reply Packet.
240 * server.h (report_vfork_events): Declare
241 global variable.
242
3a8a0396
DB
2432015-05-12 Don Breazeal <donb@codesourcery.com>
244
245 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
246 (the_low_target) <new_fork>: Initialize new member.
247 * linux-arm-low.c (arm_new_fork): New function.
248 (the_low_target) <new_fork>: Initialize new member.
249 * linux-low.c (handle_extended_wait): Call new target function
250 new_fork.
251 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
252 * linux-mips-low.c (mips_add_watchpoint): New function
253 extracted from mips_insert_point.
254 (the_low_target) <new_fork>: Initialize new member.
255 (mips_linux_new_fork): New function.
256 (mips_insert_point): Call mips_add_watchpoint.
257 * linux-x86-low.c (x86_linux_new_fork): New function.
258 (the_low_target) <new_fork>: Initialize new member.
259
de0d863e
DB
2602015-05-12 Don Breazeal <donb@codesourcery.com>
261
262 * linux-low.c (handle_extended_wait): Implement return value,
263 rename argument 'event_child' to 'event_lwp', handle
264 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
265 (linux_low_ptrace_options): New function.
266 (linux_low_filter_event): Call linux_low_ptrace_options,
267 use different argument fo linux_enable_event_reporting,
268 use return value from handle_extended_wait.
269 (extended_event_reported): New function.
270 (linux_wait_1): Call extended_event_reported and set
271 status to report fork events.
272 (linux_write_memory): Add pid to debug message.
273 (reset_lwp_ptrace_options_callback): New function.
274 (linux_handle_new_gdb_connection): New function.
275 (linux_target_ops): Initialize new structure member.
276 * linux-low.h (struct lwp_info) <waitstatus>: New member.
277 * lynx-low.c: Initialize new structure member.
278 * remote-utils.c (prepare_resume_reply): Implement stop reason
279 "fork" for "T" stop message.
280 * server.c (handle_query): Call handle_new_gdb_connection.
281 * server.h (report_fork_events): Declare global flag.
282 * target.h (struct target_ops) <handle_new_gdb_connection>:
283 New member.
284 (target_handle_new_gdb_connection): New macro.
285 * win32-low.c: Initialize new structure member.
286
ddcbc397
DB
2872015-05-12 Don Breazeal <donb@codesourcery.com>
288
289 * mem-break.c (APPEND_TO_LIST): Define macro.
290 (clone_agent_expr): New function.
291 (clone_one_breakpoint): New function.
292 (clone_all_breakpoints): New function.
293 * mem-break.h: Declare new functions.
294
89245bc0
DB
2952015-05-12 Don Breazeal <donb@codesourcery.com>
296
297 * linux-low.c (linux_supports_fork_events): New function.
298 (linux_supports_vfork_events): New function.
299 (linux_target_ops): Initialize new structure members.
300 (initialize_low): Call linux_check_ptrace_features.
301 * lynx-low.c (lynx_target_ops): Initialize new structure
302 members.
303 * server.c (report_fork_events, report_vfork_events):
304 New global flags.
305 (handle_query): Add new features to qSupported packet and
306 response.
307 (captured_main): Initialize new global variables.
308 * target.h (struct target_ops) <supports_fork_events>:
309 New member.
310 <supports_vfork_events>: New member.
311 (target_supports_fork_events): New macro.
312 (target_supports_vfork_events): New macro.
313 * win32-low.c (win32_target_ops): Initialize new structure
314 members.
315
835205d0
GB
3162015-05-12 Gary Benson <gbenson@redhat.com>
317
318 * server.c (handle_qxfer_exec_file): Use current process
319 if annex is empty.
320
21e94bd9
SL
3212015-05-08 Sandra Loosemore <sandra@codesourcery.com>
322
323 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
324 Remove HAVE_PTRACE_GETREGS conditionals.
325 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
326 instead of PTRACE_GETREGS and PTRACE_SETREGS.
327
45614f15
YQ
3282015-05-08 Yao Qi <yao.qi@linaro.org>
329
330 * linux-low.c (linux_supports_conditional_breakpoints): New
331 function.
332 (linux_target_ops): Install new target method.
333 * lynx-low.c (lynx_target_ops): Install NULL hook for
334 supports_conditional_breakpoints.
335 * nto-low.c (nto_target_ops): Likewise.
336 * spu-low.c (spu_target_ops): Likewise.
337 * win32-low.c (win32_target_ops): Likewise.
338 * server.c (handle_query): Check
339 target_supports_conditional_breakpoints.
340 * target.h (struct target_ops) <supports_conditional_breakpoints>:
341 New field.
342 (target_supports_conditional_breakpoints): New macro.
343
80ad801e
PA
3442015-05-06 Pedro Alves <palves@redhat.com>
345
346 PR server/18081
347 * server.c (start_inferior): If the process exits, mourn it.
348
819843c7
GB
3492015-04-21 Gary Benson <gbenson@redhat.com>
350
351 * hostio.c (fileio_open_flags_to_host): Factored out to
352 fileio_to_host_openflags in common/fileio.c. Single use
353 updated.
354
a2d5a9d7
MF
3552015-04-17 Max Filippov <jcmvbkbc@gmail.com>
356
357 * linux-xtensa-low.c (xtensa_fill_gregset)
358 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
359 XCHAL_HAVE_LOOP.
360
deb44829
MF
3612015-04-17 Max Filippov <jcmvbkbc@gmail.com>
362
363 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
364 (regs_info): Replace usrregs pointer with NULL.
365
e57f1de3
GB
3662015-04-17 Gary Benson <gbenson@redhat.com>
367
368 * target.h (struct target_ops) <pid_to_exec_file>: New field.
369 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
370 * server.c (handle_qxfer_exec_file): New function.
371 (qxfer_packets): Add exec-file entry.
372 (handle_query): Report qXfer:exec-file:read as supported packet.
373
62828379
RN
3742015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
375
376 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
377
b88bb450
GB
3782015-04-09 Gary Benson <gbenson@redhat.com>
379
380 * hostio-errno.c (errno_to_fileio_error): Remove function.
381 Update caller to use remote_fileio_to_fio_error.
382
c8f4bfdd
YQ
3832015-04-09 Yao Qi <yao.qi@linaro.org>
384
385 * linux-low.c (linux_insert_point): Call
386 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
387 (linux_remove_point): Call remove_memory_breakpoint if type is
388 raw_bkpt_type_sw.
389 * linux-x86-low.c (x86_insert_point): Don't call
390 insert_memory_breakpoint.
391 (x86_remove_point): Don't call remove_memory_breakpoint.
392
41f98f02
PA
3932015-04-01 Pedro Alves <palves@redhat.com>
394 Cleber Rosa <crosa@redhat.com>
395
396 * server.c (gdbserver_usage): Reorganize and extend the usage
397 message.
398
2bf6fb9d
PA
3992015-03-24 Pedro Alves <palves@redhat.com>
400
401 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
402 output. Also dump TRAP_TRACE.
403 (linux_low_filter_event): In debug output, distinguish a
404 resume_stop SIGSTOP from a delayed SIGSTOP.
405
369f6daa
GB
4062015-03-24 Gary Benson <gbenson@redhat.com>
407
408 * linux-x86-low.c (x86_linux_new_thread): Moved to
409 nat/x86-linux.c.
410 (x86_linux_prepare_to_resume): Likewise.
411
8e5d4070
GB
4122015-03-24 Gary Benson <gbenson@redhat.com>
413
414 * Makefile.in (x86-linux-dregs.o): New rule.
415 * configure.srv: Add x86-linux-dregs.o to relevant targets.
416 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
417 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
418 (x86_linux_dr_get): Likewise.
419 (x86_linux_dr_set): Likewise.
420 (update_debug_registers_callback): Likewise.
421 (x86_linux_dr_set_addr): Likewise.
422 (x86_linux_dr_get_addr): Likewise.
423 (x86_linux_dr_set_control): Likewise.
424 (x86_linux_dr_get_control): Likewise.
425 (x86_linux_dr_get_status): Likewise.
426 (x86_linux_update_debug_registers): Likewise.
427
2b95d440
GB
4282015-03-24 Gary Benson <gbenson@redhat.com>
429
430 * linux-x86-low.c (x86_linux_update_debug_registers):
431 New function, factored out from...
432 (x86_linux_prepare_to_resume): ...this.
433
14b0bc68
GB
4342015-03-24 Gary Benson <gbenson@redhat.com>
435
436 * linux-x86-low.c (x86_linux_dr_get): Update comments.
437 (x86_linux_dr_set): Likewise.
438 (update_debug_registers_callback): Likewise.
439 (x86_linux_dr_set_addr): Likewise.
440 (x86_linux_dr_get_addr): Likewise.
441 (x86_linux_dr_set_control): Likewise.
442 (x86_linux_dr_get_control): Likewise.
443 (x86_linux_dr_get_status): Likewise.
444 (x86_linux_prepare_to_resume): Likewise.
445
5dfe6ca8
GB
4462015-03-24 Gary Benson <gbenson@redhat.com>
447
448 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
449 Use perror_with_name. Pass string through gettext.
450 (x86_linux_dr_set): Likewise.
451
d33472ad
GB
4522015-03-24 Gary Benson <gbenson@redhat.com>
453
454 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
455 (x86_linux_dr_set_addr): ...this.
456 (x86_dr_low_get_addr): Rename to...
457 (x86_linux_dr_get_addr): ...this.
458 (x86_dr_low_set_control): Rename to...
459 (x86_linux_dr_set_control): ...this.
460 (x86_dr_low_get_control): Rename to...
461 (x86_linux_dr_get_control): ...this.
462 (x86_dr_low_get_status): Rename to...
463 (x86_linux_dr_get_status): ...this.
464 (x86_dr_low): Update with new function names.
465
4b134ca1
GB
4662015-03-24 Gary Benson <gbenson@redhat.com>
467
468 * Makefile.in (x86-linux.o): New rule.
469 * configure.srv: Add x86-linux.o to relevant targets.
470 * linux-low.c (lwp_set_arch_private_info): New function.
471 (lwp_arch_private_info): Likewise.
472 * linux-x86-low.c: Include nat/x86-linux.h.
473 (arch_lwp_info): Removed structure.
474 (update_debug_registers_callback):
475 Use lwp_set_debug_registers_changed.
476 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
477 and lwp_set_debug_registers_changed.
478 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
479
34c703da
GB
4802015-03-24 Gary Benson <gbenson@redhat.com>
481
482 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
483 * linux-arm-low.c (arm_new_thread): Likewise.
484 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
485 * linux-mips-low.c (mips_linux_new_thread): Likewise.
486 * linux-x86-low.c (x86_linux_new_thread): Likewise.
487 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
488
cff068da
GB
4892015-03-24 Gary Benson <gbenson@redhat.com>
490
491 * linux-low.c (ptid_of_lwp): New function.
492 (lwp_is_stopped): Likewise.
493 (lwp_stop_reason): Likewise.
494 * linux-x86-low.c (update_debug_registers_callback):
495 Use lwp_is_stopped.
496 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
497 lwp_stop_reason.
498
b2f7c7e8
GB
4992015-03-24 Gary Benson <gbenson@redhat.com>
500
501 * linux-low.h (linux_stop_lwp): Remove declaration.
502
6d4ee8c6
GB
5032015-03-24 Gary Benson <gbenson@redhat.com>
504
505 * linux-low.h: Include nat/linux-nat.h.
506 * linux-low.c (iterate_over_lwps_args): New structure.
507 (iterate_over_lwps_filter): New function.
508 (iterate_over_lwps): Likewise.
509 * linux-x86-low.c (update_debug_registers_callback):
510 Update signature to what iterate_over_lwps expects.
511 Remove PID check that iterate_over_lwps now performs.
512 (x86_dr_low_set_addr): Use iterate_over_lwps.
513 (x86_dr_low_set_control): Likewise.
514
70a0bb6b
GB
5152015-03-24 Gary Benson <gbenson@redhat.com>
516
517 * linux-x86-low.c (x86_debug_reg_state): New function.
518 (x86_linux_prepare_to_resume): Use the above.
519
7b669087
GB
5202015-03-24 Gary Benson <gbenson@redhat.com>
521
522 * linux-low.c (current_lwp_ptid): New function.
523 * linux-x86-low.c: Include nat/linux-nat.h.
524 (x86_dr_low_get_addr): Use current_lwp_ptid.
525 (x86_dr_low_get_control): Likewise.
526 (x86_dr_low_get_status): Likewise.
527
eef49a3d
PA
5282015-03-20 Pedro Alves <palves@redhat.com>
529
530 * tracepoint.c (cmd_qtstatus): Make "str" const.
531
b2333d22
PA
5322015-03-20 Pedro Alves <palves@redhat.com>
533
534 * server.c (handle_general_set): Make "req_str" const.
535
23f238d3
PA
5362015-03-19 Pedro Alves <palves@redhat.com>
537
538 * linux-low.c (linux_resume_one_lwp): Rename to ...
539 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
540 instead call perror_with_name.
541 (check_ptrace_stopped_lwp_gone): New function.
542 (linux_resume_one_lwp): Reimplement as wrapper around
543 linux_resume_one_lwp_throw that swallows errors if the LWP is
544 gone.
545
91baf43f
PA
5462015-03-19 Pedro Alves <palves@redhat.com>
547
548 * linux-low.c (count_events_callback, select_event_lwp_callback):
549 No longer check whether the thread has resume_stop as last resume
550 kind.
551
8bf3b159
PA
5522015-03-19 Pedro Alves <palves@redhat.com>
553
554 * linux-low.c (count_events_callback, select_event_lwp_callback):
555 Use the lwp's status_pending_p field, not the thread's.
556
b90fc188
PA
5572015-03-19 Pedro Alves <palves@redhat.com>
558
559 * linux-low.c (select_event_lwp_callback): Update comments to
560 no longer mention SIGTRAP.
561
464b0089
GB
5622015-03-18 Gary Benson <gbenson@redhat.com>
563
564 * server.c (handle_query): Do not report vFile:fstat as supported.
565
aa9e327f
GB
5662015-03-11 Gary Benson <gbenson@redhat.com>
567
568 * hostio.c (sys/types.h): New include.
569 (sys/stat.h): Likewise.
570 (common-remote-fileio.h): Likewise.
571 (handle_fstat): New function.
572 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 573
791c0056
GB
5742015-03-11 Gary Benson <gbenson@redhat.com>
575
576 * configure.ac (AC_CHECK_MEMBERS): Add checks for
577 struct stat.st_blocks and struct stat.st_blksize.
578 * configure: Regenerate.
579 * config.in: Likewise.
580 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
581 (OBS): Add common-remote-fileio.o.
582 (common-remote-fileio.o): New rule.
583
9a9df970
PA
5842015-03-09 Pedro Alves <palves@redhat.com>
585
586 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
587 'struct sockaddr' pointer in 'accept' call.
588
9eb1356e
PA
5892015-03-09 Pedro Alves <palves@redhat.com>
590
591 Revert:
592 2015-03-07 Pedro Alves <palves@redhat.com>
593 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
594 or <winsock2.h> here. Instead include "gdb_socket.h".
595 (remote_open): Use union gdb_sockaddr_u.
596 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
597 or <winsock2.h> here. Instead include "gdb_socket.h".
598 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
599 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
600 or <sys/un.h>.
601 (init_named_socket, gdb_agent_helper_thread): Use union
602 gdb_sockaddr_u.
603
aac331e4
PA
6042015-03-07 Pedro Alves <palves@redhat.com>
605
606 * configure.ac (build_warnings): Move
607 -Wdeclaration-after-statement to the C-specific set.
608 * configure: Regenerate.
609
366c75fc
PA
6102015-03-07 Pedro Alves <palves@redhat.com>
611
612 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
613 or <winsock2.h> here. Instead include "gdb_socket.h".
614 (remote_open): Use union gdb_sockaddr_u.
615 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
616 or <winsock2.h> here. Instead include "gdb_socket.h".
617 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
618 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
619 or <sys/un.h>.
620 (init_named_socket, gdb_agent_helper_thread): Use union
621 gdb_sockaddr_u.
622
492d29ea
PA
6232015-03-07 Pedro Alves <palves@redhat.com>
624
625 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
626 instead.
627
60a191ed
YQ
6282015-03-06 Yao Qi <yao.qi@linaro.org>
629
630 * linux-aarch64-low.c (aarch64_insert_point): Use
631 show_debug_regs as a boolean.
632 (aarch64_remove_point): Likewise.
633
f5771b1d
PA
6342015-03-05 Pedro Alves <palves@redhat.com>
635
636 * lynx-low.c (lynx_target_ops): Install NULL hooks for
637 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
638 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
639 * nto-low.c (nto_target_ops): Likewise.
640 * spu-low.c (spu_target_ops): Likewise.
641 * win32-low.c (win32_target_ops): Likewise.
642
3e572f71
PA
6432015-03-04 Pedro Alves <palves@redhat.com>
644
72f4393d 645 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
646 Decide whether a breakpoint triggered based on the SIGTRAP's
647 siginfo.si_code.
72f4393d
L
648 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
649 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
650 (linux_low_filter_event): Check for breakpoints before checking
651 watchpoints.
652 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
653 siginfo.si_code.
72f4393d
L
654 (linux_stopped_by_sw_breakpoint)
655 (linux_supports_stopped_by_sw_breakpoint)
656 (linux_stopped_by_hw_breakpoint)
657 (linux_supports_stopped_by_hw_breakpoint): New functions.
658 (linux_target_ops): Install new target methods.
3e572f71 659
1ec68e26
PA
6602015-03-04 Pedro Alves <palves@redhat.com>
661
662 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
663 * server.c (swbreak_feature, hwbreak_feature): New globals.
664 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
665 (captured_main): Clear swbreak_feature and hwbreak_feature.
666 * server.h (swbreak_feature, hwbreak_feature): Declare.
667 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
668 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
669 supports_stopped_by_hw_breakpoint>: New fields.
670 (target_supports_stopped_by_sw_breakpoint)
671 (target_stopped_by_sw_breakpoint)
672 (target_supports_stopped_by_hw_breakpoint)
673 (target_stopped_by_hw_breakpoint): Declare.
674
15c66dd6
PA
6752015-03-04 Pedro Alves <palves@redhat.com>
676
677 enum lwp_stop_reason -> enum target_stop_reason
678 * linux-low.c (check_stopped_by_breakpoint): Adjust.
679 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
680 (linux_wait_1, stuck_in_jump_pad_callback)
681 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
682 (linux_stopped_by_watchpoint):
683 * linux-low.h (enum lwp_stop_reason): Delete.
684 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
685 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
686
98fc70d6
YQ
6872015-03-04 Yao Qi <yao.qi@linaro.org>
688
689 * Makefile.in (SFILES): Add linux-aarch64-low.c.
690
dd2ac174
GB
6912015-03-03 Gary Benson <gbenson@redhat.com>
692
693 * hostio.c (handle_vFile): Fix prefix lengths.
694
d68e53f4
MM
6952015-03-03 Markus Metzger <markus.t.metzger@intel.com>
696
697 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
698 ptr_bits.
699
bf2d68ab
AA
7002015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
701
702 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
703 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
704 (clean): Add "rm -f" for above C files.
705 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
706 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
707 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
708 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
709 * linux-s390-low.c (HWCAP_S390_VX): New macro.
710 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
711 (init_registers_s390x_vx_linux64)
712 (init_registers_s390x_tevx_linux64)
713 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
714 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
715 declarations.
716 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
717 (s390_store_vxrs_high): New functions.
718 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
719 NT_S390_VXRS_HIGH.
720 (s390_arch_setup): Add logic for selecting one of the new target
721 descriptions. Activate the new vector regsets if applicable.
722 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
723 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
724 and init_registers_s390x_tevx_linux64.
725
c966a859
PA
7262015-03-01 Pedro Alves <palves@redhat.com>
727
728 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
729 parameter.
730
4180215b
PA
7312015-02-27 Pedro Alves <palves@redhat.com>
732
733 * linux-x86-low.c (u_debugreg_offset): New function.
734 (x86_linux_dr_get, x86_linux_dr_set): Use it.
735
749bab01
PA
7362015-02-27 Pedro Alves <palves@redhat.com>
737
738 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
739 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
740 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
741 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
742 (ps_lsetfpregs, ps_getpid)
743 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
744 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
745 (ps_lsetxregs, ps_plog): Declare.
746
3c14e5a3
PA
7472015-02-27 Pedro Alves <palves@redhat.com>
748
749 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
750 IP_AGENT_EXPORT_FUNC.
751 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
752 IP_AGENT_EXPORT_FUNC.
753 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
754 (IP_AGENT_EXPORT): Delete.
755 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
756 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
757 (gdb_trampoline_buffer_error, collecting, gdb_collect)
758 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
759 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
760 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
761 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
762 (traceframe_read_count, traceframe_write_count)
763 (traceframes_created, trace_state_variables, get_raw_reg)
764 (get_trace_state_variable_value, set_trace_state_variable_value)
765 (ust_loaded, helper_thread_id, cmd_buf): Use
766 IPA_SYM_EXPORTED_NAME.
767 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
768 (tracepoints) Use IP_AGENT_EXPORT_VAR.
769 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
770 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
771 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
772 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
773 EXTERN_C_PUSH/EXTERN_C_POP.
774 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
775 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
776 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
777 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
778 (traceframe_write_count, traceframe_read_count)
779 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
780 (about_to_request_buffer_space, get_trace_state_variable_value)
781 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
782 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
783 EXTERN_C_PUSH/EXTERN_C_POP.
784 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
785 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
786 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
787 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
788 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
789 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
790 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
791 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
792 Define.
793 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
794 (IP_AGENT_EXPORT_VAR_DECL): Define.
795 (tracing): Declare.
796 (gdb_agent_get_raw_reg): Declare.
797
fe978cb0
PA
7982015-02-27 Tom Tromey <tromey@redhat.com>
799 Pedro Alves <palves@redhat.com>
800
801 Rename symbols whose names are reserved C++ keywords throughout.
802
3bc3d82a
PA
8032015-02-27 Pedro Alves <palves@redhat.com>
804
805 * Makefile.in (COMPILER): New, get it from autoconf.
806 (CXX): Get from autoconf instead.
807 (COMPILE.pre): Use COMPILER.
808 (CC-LD): Rename to ...
809 (CC_LD): ... this. Use COMPILER.
810 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
811 (CXX_FOR_TARGET): Default to g++ instead of gcc.
812 * acinclude.m4: Include build-with-cxx.m4.
813 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
814 Disable -Werror by default if building in C++ mode.
815 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
816 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
817 the C++ compiler. Save/restore CXXFLAGS too.
818 * configure: Regenerate.
819
07697489
PA
8202015-02-27 Pedro Alves <palves@redhat.com>
821
822 * acinclude.m4: Include libiberty.m4.
823 * configure.ac: Call libiberty_INIT.
824 * config.in, configure: Regenerate.
825
9beb7c4e
PA
8262015-02-26 Pedro Alves <palves@redhat.com>
827
828 * linux-low.c (linux_wait_1): When incrementing the PC past a
829 program breakpoint always use the_low_target.breakpoint_len as
830 increment, rather than the maximum between that and
831 the_low_target.decr_pc_after_break.
832
8090aef2
PA
8332015-02-23 Pedro Alves <palves@redhat.com>
834
835 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
836 thread was doing a step-over; always adjust the PC if
837 we stepped over a permanent breakpoint.
838 (linux_wait_1): If we stepped over breakpoint that was on top of a
839 permanent breakpoint, manually advance the PC past it.
840
bc9540e8
PA
8412015-02-23 Pedro Alves <palves@redhat.com>
842
843 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
844 modes.
845 (x86_fill_gregset, x86_store_gregset): Use it when handling
846 $orig_eax.
847
2db9a427
PA
8482015-02-20 Pedro Alves <palves@redhat.com>
849
850 * thread-db.c: Include "nat/linux-procfs.h".
851 (thread_db_init): Skip listing new threads if the kernel supports
852 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
853
afa8d396
PA
8542015-02-20 Pedro Alves <palves@redhat.com>
855
856 * linux-low.c (status_pending_p_callback): Use ptid_match.
857
c9587f88
AT
8582015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
859
860 PR breakpoints/16812
861 * linux-low.c (wstatus_maybe_breakpoint): Remove.
862 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
863 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
864
b05ec7a5
AT
8652015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
866
867 PR breakpoints/15956
868 * tracepoint.c (cmd_qtinit): Add check for current_thread.
869
d33501a5
MM
8702015-02-09 Markus Metzger <markus.t.metzger@intel.com>
871
872 * linux-low.c (linux_low_btrace_conf): Print size.
873 * server.c (handle_btrace_conf_general_set): New.
874 (hanle_general_set): Call handle_btrace_conf_general_set.
875 (handle_query): Report Qbtrace-conf:bts:size as supported.
876
f4abbc16
MM
8772015-02-09 Markus Metzger <markus.t.metzger@intel.com>
878
879 * linux-low.c (linux_low_enable_btrace): Update parameters.
880 (linux_low_btrace_conf): New.
881 (linux_target_ops)<to_btrace_conf>: Initialize.
882 * server.c (current_btrace_conf): New.
883 (handle_btrace_enable): Rename to ...
884 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
885 to target_enable_btrace. Update comment. Update users.
886 (handle_qxfer_btrace_conf): New.
887 (qxfer_packets): Add btrace-conf entry.
888 (handle_query): Report qXfer:btrace-conf:read as supported packet.
889 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
890 (target_ops)<read_btrace_conf>: New.
891 (target_enable_btrace): Update parameters.
892 (target_read_btrace_conf): New.
893
043c3577
MM
8942015-02-09 Markus Metzger <markus.t.metzger@intel.com>
895
896 * server.c (handle_btrace_general_set): Remove call to
897 target_supports_btrace.
898 (supported_btrace_packets): New.
899 (handle_query): Call supported_btrace_packets.
900 * target.h: include btrace-common.h.
901 (btrace_target_info): Removed.
902 (supports_btrace, target_supports_btrace): Update parameters.
903
734b0e4b
MM
9042015-02-09 Markus Metzger <markus.t.metzger@intel.com>
905
906 * Makefile.in (SFILES): Add common/btrace-common.c.
907 (OBS): Add common/btrace-common.o.
908 (btrace-common.o): Add build rules.
909 * linux-low: Include btrace-common.h.
910 (linux_low_read_btrace): Use struct btrace_data. Call
911 btrace_data_init and btrace_data_fini.
912
d6c146e9
PA
9132015-02-06 Pedro Alves <palves@redhat.com>
914
915 * thread-db.c (find_new_threads_callback): Add debug output.
916
20ba1ce6
PA
9172015-02-04 Pedro Alves <palves@redhat.com>
918
919 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
920 (resume_stopped_resumed_lwps): New function.
921 (linux_wait_for_event_filtered): Use it.
922
8cc73a39
SDJ
9232015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
924
925 * Makefile.in (SFILES): Add linux-personality.c.
926 (linux-personality.o): New rule.
927 * configure.srv (srv_linux_obj): Add linux-personality.o to the
928 list of objects to be built.
929 * linux-low.c: Include nat/linux-personality.h.
930 (linux_create_inferior): Remove code to disable address space
931 randomization (moved to ../nat/linux-personality.c). Create
932 cleanup to disable address space randomization.
933
fb23d554
SDJ
9342015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
935
936 * Makefile.in (posix-strerror.o): New rule.
937 (mingw-strerror.o): Likewise.
938 * configure: Regenerated.
939 * configure.ac: Source file ../common/common.host. Initialize new
940 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
941
cdf43629
YQ
9422015-01-14 Yao Qi <yao@codesourcery.com>
943
944 * Makefile.in (SFILES): Add nat/ppc-linux.c.
945 (ppc-linux.o): New rule.
946 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
947 * configure.ac: AC_CHECK_FUNCS(getauxval).
948 * config.in: Re-generated.
949 * configure: Re-generated.
950 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
951 ppc64_64bit_inferior_p
952
514c5338
YQ
9532015-01-14 Yao Qi <yao@codesourcery.com>
954
955 * linux-ppc-low.c: Include "nat/ppc-linux.h".
956 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
957 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
958 (PT_ORIG_R3, PT_TRAP): Likewise.
959 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
960 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
961 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
962
3368c1e5
JB
9632015-01-10 Joel Brobecker <brobecker@adacore.com>
964
965 * i387-fp.c (i387_cache_to_xsave): In look over
966 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
967 zmmh_low_space field by use of zmmh_high_space.
968
582511be
PA
9692015-01-09 Pedro Alves <palves@redhat.com>
970
971 * linux-low.c (step_over_bkpt): Move higher up in the file.
972 (handle_extended_wait): Don't store the stop_pc here.
973 (get_stop_pc): Adjust comments and rename to ...
974 (check_stopped_by_breakpoint): ... this. Record whether the LWP
975 stopped for a software breakpoint or hardware breakpoint.
976 (thread_still_has_status_pending_p): New function.
977 (status_pending_p_callback): Use
978 thread_still_has_status_pending_p. If the event is no longer
979 interesting, resume the LWP.
980 (handle_tracepoints): Add assert.
981 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
982 (wstatus_maybe_breakpoint): New function.
983 (cancel_breakpoint): Delete function.
984 (check_stopped_by_watchpoint): New function, factored out from
985 linux_low_filter_event.
986 (lp_status_maybe_breakpoint): Delete function.
987 (linux_low_filter_event): Remove filter_ptid argument.
988 Leave thread group exits pending here. Store the LWP's stop PC.
989 Always leave events pending.
990 (linux_wait_for_event_filtered): Pull all events out of the
991 kernel, and leave them all pending.
992 (count_events_callback, select_event_lwp_callback): Consider all
993 events.
994 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
995 (select_event_lwp): Only give preference to the stepping LWP in
996 all-stop mode. Adjust comments.
997 (ignore_event): New function.
998 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
999 references to cancel_breakpoints. Adjust to renames. Also give
1000 equal priority to all LWPs that have had events in non-stop mode.
1001 If reporting a software breakpoint event, unadjust the LWP's PC.
1002 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1003 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1004 Adjust.
1005 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1006 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1007 (linux_stopped_by_watchpoint): Adjust.
1008 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1009 * linux-low.h (enum lwp_stop_reason): New.
1010 (struct lwp_info) <stop_pc>: Adjust comment.
1011 <stopped_by_watchpoint>: Delete field.
1012 <stop_reason>: New field.
1013 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1014 * mem-break.c (software_breakpoint_inserted_here)
1015 (hardware_breakpoint_inserted_here): New function.
1016 * mem-break.h (software_breakpoint_inserted_here)
1017 (hardware_breakpoint_inserted_here): Declare.
1018 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1019 (cancel_breakpoints): Delete.
1020 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1021 (upload_fast_traceframes): Remove references to
1022 cancel_breakpoints.
1023
a33e3959
PA
10242015-01-09 Pedro Alves <palves@redhat.com>
1025
1026 * thread-db.c (find_new_threads_callback): Ignore thread if the
1027 kernel thread ID is -1.
1028
8784d563
PA
10292015-01-09 Pedro Alves <palves@redhat.com>
1030
1031 * linux-low.c (linux_attach_fail_reason_string): Move to
1032 nat/linux-ptrace.c, and rename.
1033 (linux_attach_lwp): Update comment.
1034 (attach_proc_task_lwp_callback): New function.
1035 (linux_attach): Adjust to rename and use
1036 linux_proc_attach_tgid_threads.
1037 (linux_attach_fail_reason_string): Delete declaration.
1038
76f2b779
JB
10392015-01-01 Joel Brobecker <brobecker@adacore.com>
1040
1041 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1042 * server.c (gdbserver_version): Likewise.
1043
fafcc06a
SDJ
10442014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1045
1046 * remote-utils.c: Include ctype.h.
1047 (input_interrupt): Explicitly handle the case when the char
1048 received is the NUL byte. Improve the printing of non-ASCII
1049 characters.
1050
beed38b8
JB
10512014-12-16 Joel Brobecker <brobecker@adacore.com>
1052
1053 * linux-low.c (linux_low_filter_event): Update call to
1054 linux_enable_event_reporting following the addition of
1055 a new parameter to that function.
1056
bf330350
CU
10572014-12-16 Catalin Udma <catalin.udma@freescale.com>
1058
1059 PR server/17457
1060 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1061 (AARCH64_FPCR_REGNO): Likewise.
1062 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1063 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1064 (aarch64_store_fpregset): Likewise.
1065
5227d625
JB
10662014-12-15 Joel Brobecker <brobecker@adacore.com>
1067
1068 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1069 Remove FIXME comment about assumption about N.
1070
f93b65a0
JB
10712014-12-13 Joel Brobecker <brobecker@adacore.com>
1072
1073 * configure.ac: If large-file support is disabled in GDBserver,
1074 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1075 * configure: Regenerate.
1076
e5a9158d
AA
10772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1078
1079 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1080 warning upon ENODATA from ptrace.
1081 * linux-s390-low.c (s390_store_tdb): New.
1082 (s390_regsets): Add regset for NT_S390_TDB.
1083
feea5f36
AA
10842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1085
1086 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1087 without a fill_function.
1088 * linux-s390-low.c (s390_fill_last_break): Remove.
1089 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1090 (s390_arch_setup): Use regset's size instead of fill_function for
1091 loop end condition.
1092
098dbe61
AA
10932014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1094
1095 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1096 the regset's store function when ptrace returned an error.
1097 * regcache.c (get_thread_regcache): Invalidate register cache
1098 before fetching inferior's registers.
1099
28eef672
AA
11002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1101
1102 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1103 while-loop as for-loop.
1104 (regsets_store_inferior_registers): Likewise.
1105
bdca27a2
YQ
11062014-11-28 Yao Qi <yao@codesourcery.com>
1107
1108 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1109 * config.in, configure: Re-generate.
1110 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1111 is defined.
1112
9c232dda
YQ
11132014-11-21 Yao Qi <yao@codesourcery.com>
1114
1115 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1116 (AC_CHECK_HEADERS): Remove malloc.h.
1117 * configure: Re-generated.
1118 * config.in: Re-generated.
1119 * server.h: Don't include alloca.h and malloc.h.
1120 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1121 Don't include malloc.h.
1122
43968415
JB
11232014-11-17 Joel Brobecker <brobecker@adacore.com>
1124
1125 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1126 corresponding ERRNO check in same block.
1127
40e91bc7
PA
11282014-11-12 Pedro Alves <palves@redhat.com>
1129
1130 * server.c (cont_thread): Update comment.
1131 (start_inferior, attach_inferior): No longer clear cont_thread.
1132 (handle_v_cont): No longer set cont_thread.
1133 (captured_main): Clear cont_thread each time a GDB connects.
1134
c2c118cf
PA
11352014-11-12 Pedro Alves <palves@redhat.com>
1136
1137 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1138 thread, and don't resume all threads if the Hc thread has exited.
1139
78708b7c
PA
11402014-11-12 Pedro Alves <palves@redhat.com>
1141
1142 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1143 the process group instead of to a specific LWP.
1144
a2abc7de
PA
11452014-10-15 Pedro Alves <palves@redhat.com>
1146
1147 PR server/17487
1148 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1149 parameter.
1150 (arm_set_thread_context): Delete.
1151 (the_low_target): Adjust.
1152 * win32-i386-low.c (debug_registers_changed)
1153 (debug_registers_used): Delete.
1154 (update_debug_registers_callback): New function.
1155 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1156 needing to update their debug registers.
1157 (win32_get_current_dr): New function.
1158 (x86_dr_low_get_addr, x86_dr_low_get_control)
1159 (x86_dr_low_get_status): Fetch the debug register from the thread
1160 record's context.
1161 (i386_initial_stuff): Adjust.
1162 (i386_get_thread_context): Remove current_event parameter. Don't
1163 clear debug_registers_changed nor copy DR values to
1164 debug_reg_state.
1165 (i386_set_thread_context): Delete.
1166 (i386_prepare_to_resume): New function.
1167 (i386_thread_added): Mark the thread as needing to update irs
1168 debug registers.
1169 (the_low_target): Remove i386_set_thread_context and install
1170 i386_prepare_to_resume.
1171 * win32-low.c (win32_get_thread_context): Adjust.
1172 (win32_set_thread_context): Use SetThreadContext
1173 directly.
1174 (win32_prepare_to_resume): New function.
1175 (win32_require_context): New function, factored out from ...
1176 (thread_rec): ... this.
1177 (continue_one_thread): Call win32_prepare_to_resume on each thread
1178 we're about to continue.
1179 (win32_resume): Call win32_prepare_to_resume on the event thread.
1180 * win32-low.h (struct win32_thread_info)
1181 <debug_registers_changed>: New field.
1182 (struct win32_target_ops): Change prototype of set_thread_context,
1183 delete set_thread_context and add prepare_to_resume.
1184 (win32_require_context): New declaration.
1185
a442d071
GB
11862014-10-08 Gary Benson <gbenson@redhat.com>
1187
1188 * server.h: Do not include common-exceptions.h.
1189
6f1947e8
GB
11902014-10-08 Gary Benson <gbenson@redhat.com>
1191
1192 * server.h: Do not include cleanups.h.
1193
63b434a4
JH
11942014-09-30 James Hogan <james.hogan@imgtec.com>
1195
1196 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1197 mips64-dsp-linux.c.
1198
c4d9ceb6
YQ
11992014-09-23 Yao Qi <yao@codesourcery.com>
1200
1201 * linux-low.c (lp_status_maybe_breakpoint): New function.
1202 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1203 (count_events_callback): Likewise.
1204 (select_event_lwp_callback): Likewise.
1205 (cancel_breakpoints_callback): Likewise.
1206
89a5711c
DB
12072014-09-19 Don Breazeal <donb@codesourcery.com>
1208
1209 * linux-low.c (handle_extended_wait): Call
1210 linux_ptrace_get_extended_event.
1211 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1212 linux_is_extended_waitstatus.
1213
bffc0964
JB
12142014-09-16 Joel Brobecker <brobecker@adacore.com>
1215
1216 * Makefile.in (CPPFLAGS): Define.
1217 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1218 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1219
0bfdf32f
GB
12202014-09-16 Gary Benson <gbenson@redhat.com>
1221
1222 * inferiors.h (current_inferior): Renamed as...
1223 (current_thread): New variable. All uses updated.
1224 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1225 (maybe_move_out_of_jump_pad): Likewise.
1226 (cancel_breakpoint): Likewise.
1227 (linux_low_filter_event): Likewise.
1228 (wait_for_sigstop): Likewise.
1229 (linux_resume_one_lwp): Likewise.
1230 (need_step_over_p): Likewise.
1231 (start_step_over): Likewise.
1232 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1233 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1234 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1235 and save_inferior as saved_thread.
1236 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1237 saved_thread.
1238 (regcache_invalidate_thread): Likewise.
1239 * remote-utils.c (prepare_resume_reply): Likewise.
1240 * thread-db.c (thread_db_get_tls_address): Likewise.
1241 (disable_thread_event_reporting): Likewise.
1242 (remove_thread_event_breakpoints): Likewise.
1243 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1244 as saved_thread.
1245 * target.h (set_desired_inferior): Renamed as...
1246 (set_desired_thread): New declaration. All uses updated.
1247 * server.c (myresume): Updated comment to reference thread instead
1248 of inferior.
1249 (handle_serial_event): Likewise.
1250 (handle_target_event): Likewise.
1251
361c8ade
GB
12522014-09-12 Tom Tromey <tromey@redhat.com>
1253 Gary Benson <gbenson@redhat.com>
1254
1255 * regcache.h: Include common-regcache.h.
1256 (regcache_read_pc): Don't declare.
1257 * regcache.c (get_thread_regcache_for_ptid): New function.
1258
bd9269f7
GB
12592014-09-11 Tom Tromey <tromey@redhat.com>
1260 Gary Benson <gbenson@redhat.com>
1261
1262 * symbol.c: New file.
1263 * Makefile.in (SFILES): Add symbol.c.
1264 (OBS): Add symbol.o.
1265
f8c1d06b
GB
12662014-09-11 Gary Benson <gbenson@redhat.com>
1267
1268 * target.c (target_stop_ptid, target_continue_ptid): New
1269 functions.
1270
721ec300
GB
12712014-09-11 Tom Tromey <tromey@redhat.com>
1272 Gary Benson <gbenson@redhat.com>
1273
1274 * target.h: Include target/target.h.
1275 * target.c (target_read_memory, target_read_uint32)
1276 (target_write_memory): New functions.
1277
c5e92cca
GB
12782014-09-11 Gary Benson <gbenson@redhat.com>
1279
1280 * server.h (debug_hw_points): Don't declare.
1281 * server.c (debug_hw_points): Don't define. Replace all uses
1282 with show_debug_regs.
1283 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1284 all uses with show_debug_regs.
1285
2e4bb98a
EBM
12862014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1287
1288 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1289 endianness into account.
1290 (ppc_supply_ptrace_register): Likewise.
1291
ac740bc7
JH
12922014-09-03 James Hogan <james.hogan@imgtec.com>
1293
1294 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1295 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1296
97ea6506
GB
12972014-09-03 Gary Benson <gbenson@redhat.com>
1298
1299 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1300 ALL_DEBUG_ADDRESS_REGISTERS.
1301
df7e5265
GB
13022014-09-02 Gary Benson <gbenson@redhat.com>
1303
1304 * i386-low.h: Renamed as...
1305 * x86-low.h: New file. All type, function and variable name
1306 prefixes changed from "i386_" to "x86_". All references updated.
1307 * i386-low.c: Renamed as...
1308 * x86-low.c: New file. All type, function and variable name
1309 prefixes changed from "i386_" to "x86_". All references updated.
1310
ed859da7
GB
13112014-09-02 Gary Benson <gbenson@redhat.com>
1312
1313 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1314 (x86_linux_new_thread): Likewise.
1315
860789c7
GB
13162014-08-29 Gary Benson <gbenson@redhat.com>
1317
1318 * server.h (setjmp.h): Do not include.
1319 (toplevel): Do not declare.
1320 (common-exceptions.h): Include.
1321 (cleanups.h): Likewise.
1322 * server.c (toplevel): Do not define.
1323 (exit_code): New static global.
1324 (detach_or_kill_for_exit_cleanup): New function.
1325 (main): New function. Original main renamed to...
1326 (captured_main): New function.
1327 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1328
ff55e1b5
GB
13292014-08-29 Gary Benson <gbenson@redhat.com>
1330
1331 * Makefile.in (SFILES): Add common/common-exceptions.c.
1332 (OBS): Add common-exceptions.o.
1333 (common-exceptions.o): New rule.
1334 * utils.c (prepare_to_throw_exception): New function.
1335
e9bcb658
GB
13362014-08-29 Gary Benson <gbenson@redhat.com>
1337
1338 * config.in: Regenerate.
1339 * configure: Likewise.
1340
e3180625
GB
13412014-08-29 Gary Benson <gbenson@redhat.com>
1342
1343 * Makefile.in (SFILES): Add common/cleanups.c.
1344 (OBS): cleanups.o.
1345 (cleanups.o): New rule.
1346
e3d6ba5d
GB
13472014-08-29 Gary Benson <gbenson@redhat.com>
1348
1349 * utils.c (internal_vwarning): New function.
1350
7096e886
GB
13512014-08-28 Gary Benson <gbenson@redhat.com>
1352
1353 * utils.h (fatal): Remove declaration.
1354 * utils.c (fatal): Remove function.
1355
14ce3192
GB
13562014-08-28 Gary Benson <gbenson@redhat.com>
1357
1358 * tracepoint.c (gdb_agent_init): Replace fatal with
1359 perror_with_name.
1360 (initialize_tracepoint): Likewise.
1361
50278d59
GB
13622014-08-28 Gary Benson <gbenson@redhat.com>
1363
1364 * remote-utils.c (remote_prepare): Replace fatal with error.
1365
aa96c426
GB
13662014-08-28 Gary Benson <gbenson@redhat.com>
1367
1368 * linux-low.c (linux_async): Replace fatal with warning.
1369 Tidy up and return.
1370 (linux_start_non_stop): Return -1 if linux_async failed.
1371
f7160e97
GB
13722014-08-28 Gary Benson <gbenson@redhat.com>
1373
1374 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1375 gdb_assert.
1376 (i386_dr_low_get_addr): Remove vague comment.
1377 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1378 gdb_assert.
1379
38e08fca
GB
13802014-08-28 Gary Benson <gbenson@redhat.com>
1381
1382 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1383 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1384 internal_error.
1385 (linux_resume_one_lwp): Likewise.
1386 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1387 gdb_assert.
1388 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1389 with internal_error.
1390 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1391 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1392 (find_register_by_name): Replace fatal with internal_error.
1393 (find_regno): Likewise.
1394 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1395 * thread-db.c (thread_db_create_event): Likewise.
1396 (thread_db_load_search): Likewise.
1397 (try_thread_db_load_1): Likewise.
1398 * tracepoint.c (get_jump_space_head): Replace fatal with
1399 internal_error.
1400 (claim_trampoline_space): Likewise.
1401 (have_fast_tracepoint_trampoline_buffer): Likewise.
1402 (cmd_qtstart): Likewise.
1403 (stop_tracing): Likewise.
1404 (fast_tracepoint_collecting): Likewise.
1405 (target_malloc): Likewise.
1406 (download_tracepoint): Likewise.
1407 (download_trace_state_variables): Replace check with gdb_assert.
1408 (upload_fast_traceframes): Replace fatal with internal_error.
1409
34abf635
GB
14102014-08-19 Tom Tromey <tromey@redhat.com>
1411 Gary Benson <gbenson@redhat.com>
1412
1413 * Makefile.in (SFILES): Add common/common-debug.c.
1414 (OBS): Add common-debug.o.
1415 (common-debug.o): New rule.
1416 * debug.h (debug_printf): Don't declare.
1417 * debug.c (debug_printf): Renamed and rewritten as...
1418 (debug_vprintf): New function.
1419
f6e94d78
GB
14202014-08-19 Gary Benson <gbenson@redhat.com>
1421
1422 * utils.h: Do not include print-utils.h.
1423
9239eeab
GB
14242014-08-19 Tom Tromey <tromey@redhat.com>
1425 Gary Benson <gbenson@redhat.com>
1426
1427 * server.h: Add static assertion.
1428 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1429
ef87c8bb
GB
14302014-08-19 Tom Tromey <tromey@redhat.com>
1431 Gary Benson <gbenson@redhat.com>
1432
1433 * Makefile.in (SFILES): Add common/errors.c.
1434 (OBS): Add errors.o.
1435 (IPA_OBS): Add errors-ipa.o.
1436 (errors.o): New rule.
1437 (errors-ipa.o): Likewise.
1438 * utils.h (perror_with_name, error, warning): Don't declare.
1439 * utils.c (warning): Renamed and rewritten as...
1440 (vwarning): New function.
1441 (error): Renamed and rewritten as...
1442 (verror): New function.
1443 (internal_error): Renamed and rewritten as...
1444 (internal_verror): New function.
1445
bb974a24
GB
14462014-08-07 Gary Benson <gbenson@redhat.com>
1447
1448 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1449 * configure: Regenerate.
1450 * config.in: Likewise.
1451 * server.h: Do not include errno.h.
1452 * event-loop.c: Likewise.
1453 * hostio-errno.c: Likewise.
1454 * linux-low.c: Likewise.
1455 * remote-utils.c: Likewise.
1456 * spu-low.c: Likewise.
1457 * utils.c: Likewise.
1458 * gdbreplay.c: Unconditionally include errno.h.
1459
6d3d12eb
GB
14602014-08-07 Gary Benson <gbenson@redhat.com>
1461
1462 * server.h: Do not include string.h.
1463 * event-loop.c: Likewise.
1464 * linux-low.c: Likewise.
1465 * regcache.c: Likewise.
1466 * remote-utils.c: Likewise.
1467 * spu-low.c: Likewise.
1468 * utils.c: Likewise.
1469
dccbb609
GB
14702014-08-07 Gary Benson <gbenson@redhat.com>
1471
1472 * server.h: Do not include gdb_assert.h.
1473
e76df0d0
GB
14742014-08-07 Gary Benson <gbenson@redhat.com>
1475
1476 * server.h: Do not include common-utils.h.
1477
4cb9c816
GB
14782014-08-07 Gary Benson <gbenson@redhat.com>
1479
1480 * server.h: Do not include ptid.h.
1481 * notif.h: Likewise.
1482
3995eeee
GB
14832014-08-07 Gary Benson <gbenson@redhat.com>
1484
1485 * server.h: Do not include gdb_locale.h.
1486
cb9f1a9b
GB
14872014-08-07 Gary Benson <gbenson@redhat.com>
1488
1489 * server.h: Do not include gdb/signals.h.
1490 * win32-low.c: Likewise.
1491
a5fceff8
GB
14922014-08-07 Gary Benson <gbenson@redhat.com>
1493
1494 * server.h: Do not include pathmax.h.
1495
b9391142
GB
14962014-08-07 Gary Benson <gbenson@redhat.com>
1497
1498 * server.h: Do not include libiberty.h.
1499 * linux-bfin-low.c: Likewise.
1500
0e443c87
GB
15012014-08-07 Gary Benson <gbenson@redhat.com>
1502
1503 * server.h: Do not include ansidecl.h.
1504
8ebb3f56
GB
15052014-08-07 Gary Benson <gbenson@redhat.com>
1506
1507 * linux-x86-low.c: Do not include stddef.h.
1508 * lynx-ppc-low.c: Likewise.
1509 * tracepoint.c: Likewise.
1510
8980bdf6
GB
15112014-08-07 Gary Benson <gbenson@redhat.com>
1512
1513 * server.h: Do not include stdarg.h.
1514 * nto-low.c: Likewise.
1515
d7096f71
GB
15162014-08-07 Gary Benson <gbenson@redhat.com>
1517
1518 * server.h: Do not include stdlib.h.
1519 * inferiors.c: Likewise.
1520 * linux-low.c: Likewise.
1521 * regcache.c: Likewise.
1522 * spu-low.c: Likewise.
1523 * tracepoint.c: Likewise.
1524 * utils.c: Likewise.
1525
d02f550d
GB
15262014-08-07 Gary Benson <gbenson@redhat.com>
1527
1528 * server.h: Do not include stdio.h.
1529 * linux-low.c: Likewise.
1530 * remote-utils.c: Likewise.
1531 * spu-low.c: Likewise.
1532 * utils.c: Likewise.
1533 * wincecompat.c: Likewise.
1534
87f6c4e3
GB
15352014-08-06 Gary Benson <gbenson@redhat.com>
1536
1537 * regcache.c (init_register_cache): Move conditionals inside if.
1538
7089dca4
GB
15392014-08-06 Gary Benson <gbenson@redhat.com>
1540
1541 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1542
462f517e
GB
15432014-07-31 Gary Benson <gbenson@redhat.com>
1544
1545 * ax.h: Do not include server.h.
1546 * gdbthread.h: Likewise.
1547 * lynx-low.h: Likewise.
1548 * notif.h: Likewise.
1549
976411d6
GB
15502014-07-30 Gary Benson <gbenson@redhat.com>
1551
1552 * server.h: Include common-defs.h.
1553 Do not include config.h or build-gnulib-gdbserver/config.h.
1554
d41f6d8e
GB
15552014-07-30 Gary Benson <gbenson@redhat.com>
1556
1557 * hostio-errno.c: Move server.h to top of includes list.
1558 * inferiors.c: Likewise.
1559 * linux-x86-low.c: Likewise.
1560 * notif.c: Include server.h.
1561
314c6a35
TT
15622014-07-24 Tom Tromey <tromey@redhat.com>
1563 Gary Benson <gbenson@redhat.com>
1564
1565 * server.h (CORE_ADDR): Now unsigned.
1566
69ff6be5
PA
15672014-07-16 Pedro Alves <palves@redhat.com>
1568
1569 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1570
ce9e3fe7
PA
15712014-07-15 Pedro Alves <palves@redhat.com>
1572
1573 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1574 copy.
1575
e76126e8
PA
15762014-07-11 Pedro Alves <palves@redhat.com>
1577
1578 * linux-low.c (kill_wait_lwp): New function, based on
1579 kill_one_lwp_callback, but use my_waitpid directly.
1580 (kill_one_lwp_callback, linux_kill): Use it.
1581
8e9db26e
PA
15822014-06-23 Pedro Alves <palves@redhat.com>
1583
1584 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1585 before setting DR0..DR3.
1586
698b3e08
GB
15872014-06-20 Gary Benson <gbenson@redhat.com>
1588
1589 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1590 * configure: Regenerated.
1591 * config.in: Likewise.
1592
125f8a3d
GB
15932014-06-20 Gary Benson <gbenson@redhat.com>
1594
1595 * Makefile.in (SFILES): Update locations for files moved
1596 from common to nat.
1597 (object file files): Reordered.
1598
42995dbd
GB
15992014-06-20 Gary Benson <gbenson@redhat.com>
1600
1601 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1602 (i386_dr_low_set_addr): Likewise.
1603 (i386_dr_low_get_addr): Likewise.
1604 (i386_dr_low_can_set_control): Likewise.
1605 (i386_dr_low_set_control): Likewise.
1606 (i386_dr_low_get_control): Likewise.
1607 (i386_dr_low_get_status): Likewise.
1608 (i386_get_debug_register_length): Likewise.
1609 * linux-x86-low.c (i386_dr_low_set_addr):
1610 Changed signature. Made static.
1611 (i386_dr_low_get_addr): Likewise.
1612 (i386_dr_low_set_control): Likewise.
1613 (i386_dr_low_get_control): Likewise.
1614 (i386_dr_low_get_status): Likewise.
1615 (i386_dr_low): New global variable.
1616 * win32-i386-low.c (i386_dr_low_set_addr):
1617 Changed signature. Made static.
1618 (i386_dr_low_get_addr): Likewise.
1619 (i386_dr_low_set_control): Likewise.
1620 (i386_dr_low_get_control): Likewise.
1621 (i386_dr_low_get_status): Likewise.
1622 (i386_dr_low): New global variable.
1623
e1d2394b
MS
16242014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1625
1626 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1627 * Makefile.in (AR, AR_FLAGS): Define.
1628 * configure: Regenerate.
1629
3a8ee006
GB
16302014-06-19 Gary Benson <gbenson@redhat.com>
1631
1632 * Makefile.in (i386-dregs.o): New rule.
1633 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1634 * i386-low.c (target.h): Remove include.
1635 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1636 (DR_CONTROL_SHIFT): Likewise.
1637 (DR_CONTROL_SIZE): Likewise.
1638 (DR_RW_EXECUTE): Likewise.
1639 (DR_RW_WRITE): Likewise.
1640 (DR_RW_READ): Likewise.
1641 (DR_RW_IORW): Likewise.
1642 (DR_LEN_1): Likewise.
1643 (DR_LEN_2): Likewise.
1644 (DR_LEN_4): Likewise.
1645 (DR_LEN_8): Likewise.
1646 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1647 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1648 (DR_ENABLE_SIZE): Likewise.
1649 (DR_LOCAL_SLOWDOWN): Likewise.
1650 (DR_GLOBAL_SLOWDOWN): Likewise.
1651 (DR_CONTROL_RESERVED): Likewise.
1652 (I386_DR_CONTROL_MASK): Likewise.
1653 (I386_DR_VACANT): Likewise.
1654 (I386_DR_LOCAL_ENABLE): Likewise.
1655 (I386_DR_GLOBAL_ENABLE): Likewise.
1656 (I386_DR_DISABLE): Likewise.
1657 (I386_DR_SET_RW_LEN): Likewise.
1658 (I386_DR_GET_RW_LEN): Likewise.
1659 (I386_DR_WATCH_HIT): Likewise.
1660 (i386_wp_op_t): Likewise.
1661 (i386_show_dr): Likewise.
1662 (i386_length_and_rw_bits): Likewise.
1663 (i386_insert_aligned_watchpoint): Likewise.
1664 (i386_remove_aligned_watchpoint): Likewise.
1665 (i386_handle_nonaligned_watchpoint): Likewise.
1666 i386_update_inferior_debug_regs(): Likewise.
1667 (i386_dr_insert_watchpoint): Likewise.
1668 (i386_dr_remove_watchpoint): Likewise.
1669 (i386_dr_region_ok_for_watchpoint): Likewise.
1670 (i386_dr_stopped_data_address): Likewise.
1671 (i386_dr_stopped_by_watchpoint): Likewise.
1672
8f26655c
GB
16732014-06-19 Gary Benson <gbenson@redhat.com>
1674
1675 * i386-low.c (i386_dr_show): Renamed to
1676 i386_show_dr and made static. All uses updated.
1677 (i386_dr_length_and_rw_bits): Renamed to
1678 i386_length_and_rw_bits and made static.
1679 All uses updated.
1680 (i386_dr_insert_aligned_watchpoint): Renamed to
1681 i386_insert_aligned_watchpoint and made static.
1682 All uses updated.
1683 (i386_dr_remove_aligned_watchpoint): Renamed to
1684 i386_remove_aligned_watchpoint and made static.
1685 All uses updated.
1686 (i386_dr_update_inferior_debug_regs): Renamed to
1687 i386_update_inferior_debug_regs and made static.
1688 All uses updated.
1689
b9228891
GB
16902014-06-18 Gary Benson <gbenson@redhat.com>
1691
5171def3
GB
1692 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1693 (i386_dr_low_can_set_control): Likewise.
1694 (i386_get_debug_register_length): Likewise.
1695 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1696 (i386_dr_low_can_set_control): Likewise.
1697 (i386_get_debug_register_length): Likewise.
1698
16992014-06-17 Gary Benson <gbenson@redhat.com>
1700
b9228891
GB
1701 * i386-low.h (i386-dregs.h): New include.
1702 (DR_FIRSTADDR): Now in i386-dregs.h.
1703 (DR_LASTADDR): Likewise.
1704 (DR_NADDR): Likewise.
1705 (DR_STATUS): Likewise.
1706 (DR_CONTROL): Likewise.
1707 (i386_debug_reg_state): Likewise.
1708 (i386_dr_insert_watchpoint): Likewise.
1709 (i386_dr_remove_watchpoint): Likewise.
1710 (i386_dr_region_ok_for_watchpoint): Likewise.
1711 (i386_dr_stopped_data_address): Likewise.
1712 (i386_dr_stopped_by_watchpoint): Likewise.
1713 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1714
4be83cc2
GB
17152014-06-18 Gary Benson <gbenson@redhat.com>
1716
1717 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1718 i386_dr_insert_watchpoint.
1719 (i386_low_remove_watchpoint): Renamed to
1720 i386_dr_remove_watchpoint.
1721 (i386_low_region_ok_for_watchpoint): Renamed to
1722 i386_dr_region_ok_for_watchpoint.
1723 (i386_low_stopped_data_address): Renamed to
1724 i386_dr_stopped_data_address.
1725 (i386_low_stopped_by_watchpoint): Renamed to
1726 i386_dr_stopped_by_watchpoint.
1727 * i386-low.c (i386_show_dr): Renamed to
1728 i386_dr_show and made nonstatic. All uses updated.
1729 (i386_length_and_rw_bits): Renamed to
1730 i386_dr_length_and_rw_bits and made nonstatic.
1731 All uses updated.
1732 (i386_insert_aligned_watchpoint): Renamed to
1733 i386_dr_insert_aligned_watchpoint and made nonstatic.
1734 All uses updated.
1735 (i386_remove_aligned_watchpoint): Renamed to
1736 i386_dr_remove_aligned_watchpoint and made nonstatic.
1737 All uses updated.
1738 (i386_update_inferior_debug_regs): Renamed to
1739 i386_dr_update_inferior_debug_regs and made nonstatic.
1740 All uses updated.
1741 (i386_low_insert_watchpoint): Renamed to
1742 i386_dr_insert_watchpoint. All uses updated.
1743 (i386_low_remove_watchpoint): Renamed to
1744 i386_dr_remove_watchpoint. All uses updated.
1745 (i386_low_region_ok_for_watchpoint): Renamed to
1746 i386_dr_region_ok_for_watchpoint. All uses updated.
1747 (i386_low_stopped_data_address): Renamed to
1748 i386_dr_stopped_data_address. All uses updated.
1749 (i386_low_stopped_by_watchpoint): Renamed to
1750 i386_dr_stopped_by_watchpoint. All uses updated.
1751
131aa0d4
GB
17522014-06-18 Gary Benson <gbenson@redhat.com>
1753
1754 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1755 (i386_dr_low_can_set_control): Likewise.
1756 (i386_insert_aligned_watchpoint): New check.
1757
d9305f7f
GB
17582014-06-18 Gary Benson <gbenson@redhat.com>
1759
1760 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1761 Renamed to state.
1762
e927c9fc
GB
17632014-06-18 Gary Benson <gbenson@redhat.com>
1764
1765 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1766 instead of fatal and error.
1767 (i386_handle_nonaligned_watchpoint): Likewise.
1768
1b6d4134
GB
17692014-06-18 Gary Benson <gbenson@redhat.com>
1770
1771 * i386-low.c (i386_get_debug_register_length): New macro.
1772 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1773 (i386_show_dr): Use debug_printf instead of fprintf. Use
1774 phex to format values.
1775
6e62758f
GB
17762014-06-18 Gary Benson <gbenson@redhat.com>
1777
1778 * i386-low.h: Comment changes.
1779 * i386-low.c: Likewise.
1780
fc6e2f03
GB
17812014-06-18 Gary Benson <gbenson@redhat.com>
1782
1783 * i386-low.c: Whitespace changes.
1784
f9d1eeed
TT
17852014-06-12 Tom Tromey <tromey@redhat.com>
1786
1787 * utils.c (freeargv): Remove.
1788
0b04e523
TT
17892014-06-12 Tom Tromey <tromey@redhat.com>
1790
1791 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1792 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1793 (parse_debug_format_options): Likewise.
1794 (gdbserver_usage): Likewise.
1795 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1796 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1797 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1798 against libiberty.
1799 ($(LIBGNU)): Depend on libiberty.
1800 (all-lib): Recurse into all subdirs.
1801 (install-only): Invoke "install" target in subdirs.
1802 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1803 targets.
1804 * configure: Rebuild.
1805 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1806 for vasprintf, vsnprintf, or gettimeofday.
1807 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1808 srv_tgtobj.
1809
270c9937
JB
18102014-06-05 Joel Brobecker <brobecker@adacore.com>
1811
1812 * development.sh: Delete.
1813 * Makefile.in (config.status): Adjust dependency on development.sh.
1814 * configure.ac: Adjust development.sh source call.
1815 * configure: Regenerate.
1816
0a261ed8
PA
18172014-06-02 Pedro Alves <palves@redhat.com>
1818
1819 * ax.c (gdb_free_agent_expr): New function.
1820 * ax.h (gdb_free_agent_expr): New declaration.
1821 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1822 list.
1823 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1824 static.
1825 (clear_breakpoint_conditions_and_commands): New function.
1826 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1827 (clear_breakpoint_conditions_and_commands): New declaration.
1828
e9dae05e
RR
18292014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1830
1831 * linux-aarch64-low.c (asm/ptrace.h): Include.
1832
5876f503
JK
18332014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1834
1835 Fix TLS access for -static -pthread.
1836 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1837 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1838 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1839
802e8e6d
PA
18402014-05-20 Pedro Alves <palves@redhat.com>
1841
1842 * linux-aarch64-low.c (aarch64_insert_point)
1843 (aarch64_remove_point): No longer check whether the type is
1844 supported here. Adjust to new interface.
1845 (the_low_target): Install aarch64_supports_z_point_type as
1846 supports_z_point_type method.
1847 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1848 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1849 instead of a Z packet char. Adjust.
1850 (arm_supports_z_point_type): New function.
1851 (arm_insert_point, arm_remove_point): Adjust to new interface.
1852 (the_low_target): Install arm_supports_z_point_type.
1853 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1854 (cris_insert_point, cris_remove_point): Adjust to new interface.
1855 Don't check whether the type is supported here.
1856 (the_low_target): Install cris_supports_z_point_type.
1857 * linux-low.c (linux_supports_z_point_type): New function.
1858 (linux_insert_point, linux_remove_point): Adjust to new interface.
1859 * linux-low.h (struct linux_target_ops) <insert_point,
1860 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1861 raw_breakpoint pointer parameter.
1862 <supports_z_point_type>: New method.
1863 * linux-mips-low.c (mips_supports_z_point_type): New function.
1864 (mips_insert_point, mips_remove_point): Adjust to new interface.
1865 Use mips_supports_z_point_type.
1866 (the_low_target): Install mips_supports_z_point_type.
1867 * linux-ppc-low.c (the_low_target): Install NULL as
1868 supports_z_point_type method.
1869 * linux-s390-low.c (the_low_target): Install NULL as
1870 supports_z_point_type method.
1871 * linux-sparc-low.c (the_low_target): Install NULL as
1872 supports_z_point_type method.
1873 * linux-x86-low.c (x86_supports_z_point_type): New function.
1874 (x86_insert_point): Adjust to new insert_point interface. Use
1875 insert_memory_breakpoint. Adjust to new
1876 i386_low_insert_watchpoint interface.
1877 (x86_remove_point): Adjust to remove_point interface. Use
1878 remove_memory_breakpoint. Adjust to new
1879 i386_low_remove_watchpoint interface.
1880 (the_low_target): Install x86_supports_z_point_type.
1881 * lynx-low.c (lynx_target_ops): Install NULL as
1882 supports_z_point_type callback.
1883 * nto-low.c (nto_supports_z_point_type): New.
1884 (nto_insert_point, nto_remove_point): Adjust to new interface.
1885 (nto_target_ops): Install nto_supports_z_point_type.
1886 * mem-break.c: Adjust intro comment.
1887 (struct raw_breakpoint) <raw_type, size>: New fields.
1888 <inserted>: Update comment.
1889 <shlib_disabled>: Delete field.
1890 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1891 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1892 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1893 (raw_bkpt_type_to_target_hw_bp_type): New function.
1894 (find_enabled_raw_code_breakpoint_at): New function.
1895 (find_raw_breakpoint_at): New type and size parameters. Use them.
1896 (insert_memory_breakpoint): New function, based off
1897 set_raw_breakpoint_at.
1898 (remove_memory_breakpoint): New function.
1899 (set_raw_breakpoint_at): Reimplement.
1900 (set_breakpoint): New, based on set_breakpoint_at.
1901 (set_breakpoint_at): Reimplement.
1902 (delete_raw_breakpoint): Go through the_target->remove_point
1903 instead of assuming memory breakpoints.
1904 (find_gdb_breakpoint_at): Delete.
1905 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1906 (find_gdb_breakpoint): New function.
1907 (set_gdb_breakpoint_at): Delete.
1908 (z_type_supported): New function.
1909 (set_gdb_breakpoint_1): New function, loosely based off
1910 set_gdb_breakpoint_at.
1911 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1912 (delete_gdb_breakpoint_at): Delete.
1913 (delete_gdb_breakpoint_1): New function, loosely based off
1914 delete_gdb_breakpoint_at.
1915 (delete_gdb_breakpoint): New function.
1916 (clear_gdb_breakpoint_conditions): Rename to ...
1917 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1918 breakpoint.
1919 (add_condition_to_breakpoint): Make static.
1920 (add_breakpoint_condition): Take a struct breakpoint pointer
1921 instead of an address. Adjust.
1922 (gdb_condition_true_at_breakpoint): Rename to ...
1923 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1924 z_type parameter.
1925 (gdb_condition_true_at_breakpoint): Reimplement.
1926 (add_breakpoint_commands): Take a struct breakpoint pointer
1927 instead of an address. Adjust.
1928 (gdb_no_commands_at_breakpoint): Rename to ...
1929 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1930 parameter. Return true if no breakpoint was found. Change debug
1931 output.
1932 (gdb_no_commands_at_breakpoint): Reimplement.
1933 (run_breakpoint_commands): Rename to ...
1934 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1935 and change return type to boolean.
1936 (run_breakpoint_commands): New function.
1937 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1938 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1939 breakpoint. Go through the_target->remove_point instead of
1940 assuming memory breakpoint.
1941 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1942 software and hardware breakpoints.
1943 (reinsert_raw_breakpoint): Go through the_target->insert_point
1944 instead of assuming memory breakpoint.
1945 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1946 software and hardware breakpoints.
1947 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1948 Check both software and hardware breakpoints.
1949 (validate_inserted_breakpoint): Assert the breakpoint is a
1950 software breakpoint. Set the inserted flag to -1 instead of
1951 setting shlib_disabled.
1952 (delete_disabled_breakpoints): Adjust.
1953 (validate_breakpoints): Only validate software breakpoints.
1954 Adjust to inserted flag change.
1955 (check_mem_read, check_mem_write): Skip breakpoint types other
1956 than software breakpoints. Adjust to inserted flag change.
1957 * mem-break.h (enum raw_bkpt_type): New enum.
1958 (raw_breakpoint, struct process_info): Forward declare.
1959 (Z_packet_to_target_hw_bp_type): Delete declaration.
1960 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1961 (set_gdb_breakpoint, delete_gdb_breakpoint)
1962 (clear_breakpoint_conditions): New declarations.
1963 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1964 (breakpoint_inserted_here): Update comment.
1965 (add_breakpoint_condition, add_breakpoint_commands): Replace
1966 address parameter with a breakpoint pointer parameter.
1967 (gdb_breakpoint_here): Update comment.
1968 (delete_gdb_breakpoint_at): Delete.
1969 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1970 * server.c (process_point_options): Take a struct breakpoint
1971 pointer instead of an address. Adjust.
1972 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1973 delete_gdb_breakpoint.
1974 * spu-low.c (spu_target_ops): Install NULL as
1975 supports_z_point_type method.
1976 * target.h: Include mem-break.h.
1977 (struct target_ops) <prepare_to_access_memory>: Update comment.
1978 <supports_z_point_type>: New field.
1979 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1980 instead of a char. Also take a raw breakpoint pointer.
1981 * win32-arm-low.c (the_low_target): Install NULL as
1982 supports_z_point_type.
1983 * win32-i386-low.c (i386_supports_z_point_type): New function.
1984 (i386_insert_point, i386_remove_point): Adjust to new interface.
1985 (the_low_target): Install i386_supports_z_point_type.
1986 * win32-low.c (win32_supports_z_point_type): New function.
1987 (win32_insert_point, win32_remove_point): Adjust to new interface.
1988 (win32_target_ops): Install win32_supports_z_point_type.
1989 * win32-low.h (struct win32_target_ops):
1990 <supports_z_point_type>: New method.
1991 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1992 instead of a char. Also take a raw breakpoint pointer.
1993
932539e3
PA
19942014-05-20 Pedro Alves <palves@redhat.com>
1995
1996 * mem-break.h: Include break-common.h.
1997 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1998 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1999 (Z_packet_to_target_hw_bp_type): New declaration.
2000 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2001 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2002 (Z_PACKET_ACCESS_WP): Delete macros.
2003 (Z_packet_to_hw_type): Delete function.
2004 * i386-low.h: Don't include break-common.h here.
2005 (Z_packet_to_hw_type): Delete declaration.
2006 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2007 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2008 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2009 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2010 * linux-aarch64-low.c: Don't include break-common.h here.
2011 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2012 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2013 (Z_packet_to_target_hw_bp_type): Delete function.
2014 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2015 function.
2016 (mips_insert_point, mips_remove_point): Use
2017 Z_packet_to_target_hw_bp_type.
2018
4ff0d3d8
PA
20192014-05-20 Pedro Alves <palves@redhat.com>
2020
2021 * linux-aarch64-low.c: Include break-common.h.
2022 (enum target_point_type): Delete.
2023 (Z_packet_to_point_type): Rename to ...
2024 (Z_packet_to_target_hw_bp_type): ... this, and return a
2025 target_hw_bp_type instead.
2026 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2027 instead of an enum target_point_type.
2028 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2029 breakpoint type.
2030 (aarch64_dr_state_insert_one_point)
2031 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2032 (aarch64_handle_aligned_watchpoint)
2033 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2034 Take an enum target_hw_bp_type instead of an enum
2035 target_point_type.
2036 (aarch64_supports_z_point_type): New function.
2037 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2038 use Z_packet_to_target_hw_bp_type.
2039
786dc519
JB
20402014-05-20 Joel Brobecker <brobecker@adacore.com>
2041
2042 * configure.ac: Only use -Werror by default when DEVELOPMENT
2043 is true.
2044 * configure: Regenerate.
2045
9e0aa64f
JK
20462014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2047
2048 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2049 * linux-x86-low.c (X86_64_USER_REGS): New.
2050 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2051
2b577b92
YQ
20522014-04-28 Yao Qi <yao@codesourcery.com>
2053
2054 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2055 name.
2056
94611da2
PA
20572014-04-25 Pedro Alves <palves@redhat.com>
2058
2059 PR server/16255
2060 * linux-low.c (linux_attach_fail_reason_string): New function.
2061 (linux_attach_lwp): Delete.
2062 (linux_attach_lwp_1): Rename to ...
2063 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2064 argument. Remove "initial" parameter. Return int instead of
2065 void. Don't error or warn here.
2066 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2067 failure to attach to the tgid. Call warning when failing to
2068 attach to an lwp.
2069 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2070 argument. Remove "initial" parameter. Return int instead of
2071 void. Don't error or warn here.
2072 (linux_attach_fail_reason_string): New declaration.
2073 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2074 interface change. Use linux_attach_fail_reason_string.
2075
01f9f808
MS
20762014-04-24 Michael Sturm <michael.sturm@mintel.com>
2077 Walfred Tedeschi <walfred.tedeschi@intel.com>
2078
2079 * Makefile.in: Added rules to handle new files
2080 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2081 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2082 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2083 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2084 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2085 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2086 x32-avx512-linux.o.
2087 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2088 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2089 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2090 i386/x32-avx512.xml.
2091 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2092 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2093 i386/x32-avx512-linux.xml.
2094 * i387-fp.c (num_avx512_k_registers): New constant for number
2095 of K registers.
2096 (num_avx512_zmmh_low_registers): New constant for number of
2097 lower ZMM registers (0-15).
2098 (num_avx512_zmmh_high_registers): New constant for number of
2099 higher ZMM registers (16-31).
2100 (num_avx512_ymmh_registers): New contant for number of higher
2101 YMM registers (ymm16-31 added by avx521 on x86_64).
2102 (num_avx512_xmm_registers): New constant for number of higher
2103 XMM registers (xmm16-31 added by AVX512 on x86_64).
2104 (struct i387_xsave): Add space for AVX512 registers.
2105 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2106 Add code to handle AVX512 registers.
2107 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2108 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2109 prototypei from generated file.
2110 (tdesc_amd64_avx512_linux): Likewise.
2111 (init_registers_x32_avx512_linux): Likewise.
2112 (tdesc_x32_avx512_linux): Likewise.
2113 (init_registers_i386_avx512_linux): Likewise.
2114 (tdesc_i386_avx512_linux): Likewise.
2115 (x86_64_regmap): Add AVX512 registers.
2116 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2117 mask.
2118 (initialize_low_arch): Add code to initialize AVX512 registers.
2119
51aa91f9
PA
21202014-04-23 Pedro Alves <palves@redhat.com>
2121
2122 * mem-break.c (find_gdb_breakpoint_at): Make static.
2123 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2124
a4165e94
PA
21252014-04-23 Pedro Alves <palves@redhat.com>
2126
2127 * i386-low.c: Don't include break-common.h here.
2128 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2129 prototype to take target_hw_bp_type as argument instead of a Z
2130 packet char.
2131 * i386-low.h: Include break-common.h here.
2132 (Z_packet_to_hw_type): Declare.
2133 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2134 prototypes.
2135 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2136 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2137 (x86_remove_point): Convert the packet number to a
2138 target_hw_bp_type before calling i386_low_remove_watchpoint.
2139 * win32-i386-low.c (i386_insert_point): Convert the packet number
2140 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2141 (i386_remove_point): Convert the packet number to a
2142 target_hw_bp_type before calling i386_low_remove_watchpoint.
2143
b8acf843
PA
21442014-04-23 Pedro Alves <palves@redhat.com>
2145
2146 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2147
d708bcd1
PA
21482014-04-10 Pedro Alves <palves@redhat.com>
2149
2150 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2151 Check if the condition or command is NULL before checking if the
2152 breakpoint is known. On success, return true.
2153 * mem-break.h (add_breakpoint_condition): Document return.
2154 (add_breakpoint_commands): Add describing comment.
2155 * server.c (skip_to_semicolon): New function.
2156 (process_point_options): Use it.
2157
2eec7d5b
PA
21582014-04-09 Pedro Alves <palves@redhat.com>
2159
2160 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2161 to lwpid_of.
2162
fa96cb38
PA
21632014-02-27 Pedro Alves <palves@redhat.com>
2164
2165 PR 12702
2166 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2167 macros.
2168 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2169 output.
2170 (last_thread_of_process_p): Take a PID argument instead of a
2171 thread pointer.
2172 (linux_wait_for_lwp): Delete.
2173 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2174 functions.
2175 (linux_low_filter_event): New function, party factored out from
2176 linux_wait_for_event.
2177 (linux_wait_for_event): Rename to ...
2178 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2179 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2180 sigsuspend. Check for zombie leaders.
2181 (linux_wait_for_event): Reimplement as wrapper around
2182 linux_wait_for_event_filtered.
2183 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2184 a normal or signal exit is seen, it's the whole process exiting.
2185 (wait_for_sigstop): No longer a for_each_inferior callback.
2186 Rewrite on top of linux_wait_for_event_filtered.
2187 (stop_all_lwps): Call wait_for_sigstop directly.
2188 * server.c (resume, handle_target_event): Handle
2189 TARGET_WAITKIND_NO_RESUMED.
2190
d763de10
JB
21912014-02-26 Joel Brobecker <brobecker@adacore.com>
2192
2193 * win32-low.c (psapi_get_dll_name,
2194 * win32_CreateToolhelp32Snapshot): Delete.
2195 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2196 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2197 Delete.
2198 (handle_load_dll): Add function description.
2199 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2200
850a0f76
JB
22012014-02-26 Joel Brobecker <brobecker@adacore.com>
2202
2203 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2204 Add comment.
2205 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2206 base address when calling win32_add_one_solib.
2207 (handle_load_dll): Delete local variable load_addr.
2208 Remove 0x1000 offset applied to DLL base address when calling
2209 win32_add_one_solib.
2210 (handle_unload_dll): Add comment.
2211
f25b3fc3
JB
22122014-02-26 Joel Brobecker <brobecker@adacore.com>
2213
2214 * win32-low.c (win32_add_all_dlls): Renames
2215 win32_ensure_ntdll_loaded. Rewrite function documentation.
2216 Adjust implementation to always load all DLLs.
2217 Add 0x1000 offset to DLL base address when calling
2218 win32_add_one_solib.
2219 (child_initialization_done): New static global.
2220 (do_initial_child_stuff): Set child_initialization_done to
2221 zero during child initialization, and 1 after. Replace call
2222 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2223 Add comment.
2224 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2225 (handle_unload_dll): Add function documentation.
2226 (get_child_debug_event): Ignore load and unload DLL events
2227 during child initialization.
2228
d86d4aaf
DE
22292014-02-20 Doug Evans <dje@google.com>
2230
3bc32da3 2231 Remove global all_lwps.
d86d4aaf
DE
2232 * inferiors.h (ptid_of): Move here from linux-low.h.
2233 (pid_of, lwpid_of): Ditto.
2234 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2235 parameter is a struct thread_info * now.
2236 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2237 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2238 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2239 directly.
2240 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2241 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2242 * linux-arm-low.c (update_registers_callback): Update, "entry"
2243 parameter is a struct thread_info * now.
2244 Fetch lwpid from current_inferior directly.
2245 (arm_insert_point): Pass &all_threads to find_inferior instead of
2246 &all_lwps.
2247 (arm_remove_point): Ditto.
2248 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2249 (arm_prepare_to_resume): Fetch pid from thread.
2250 (arm_read_description): Fetch lwpid from current_inferior directly.
2251 * linux-low.c (all_lwps): Delete.
2252 (delete_lwp): Delete call to remove_inferior.
2253 (handle_extended_wait): Fetch lwpid from thread.
2254 (add_lwp): Don't set lwp->entry.id. Remove call to
2255 add_inferior_to_list.
2256 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2257 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2258 (kill_one_lwp_callback): Ditto.
2259 (linux_kill): Don't dereference NULL pointer.
2260 Fetch ptid,lwpid from thread.
2261 (get_detach_signal): Fetch ptid from thread.
2262 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2263 Simplify call to regcache_invalidate_thread.
2264 (delete_lwp_callback): Update, "entry" parameter is a
2265 struct thread_info * now. Fetch pid from thread.
2266 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2267 (status_pending_p_callback): Update, "entry" parameter is a
2268 struct thread_info * now. Fetch ptid from thread.
2269 (find_lwp_pid): Update, "entry" parameter is a
2270 struct thread_info * now.
2271 (linux_wait_for_lwp): Fetch pid from thread.
2272 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2273 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2274 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2275 (dequeue_one_deferred_signal): Ditto.
2276 (cancel_breakpoint): Fetch ptid from current_inferior.
2277 (linux_wait_for_event): Pass &all_threads to find_inferior,
2278 not &all_lwps. Fetch ptid, lwpid from thread.
2279 (count_events_callback): Update, "entry" parameter is a
2280 struct thread_info * now.
2281 (select_singlestep_lwp_callback): Ditto.
2282 (select_event_lwp_callback): Ditto.
2283 (cancel_breakpoints_callback): Ditto.
2284 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2285 not &all_lwps.
2286 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2287 (unsuspend_one_lwp): Update, "entry" parameter is a
2288 struct thread_info * now.
2289 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2290 not &all_lwps.
2291 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2292 Fetch lwpid from thread, not lwp.
2293 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2294 Pass &all_threads to find_inferior, not &all_lwps.
2295 (send_sigstop): Fetch lwpid from thread, not lwp.
2296 (send_sigstop_callback): Update, "entry" parameter is a
2297 struct thread_info * now.
2298 (suspend_and_send_sigstop_callback): Ditto.
2299 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2300 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2301 struct thread_info * now.
2302 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2303 from thread, lwp.
2304 (lwp_running): Update, "entry" parameter is a
2305 struct thread_info * now.
2306 (stop_all_lwps): Fetch ptid from thread.
2307 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2308 (linux_resume_one_lwp): Fetch lwpid from thread.
2309 (linux_set_resume_request): Update, "entry" parameter is a
2310 struct thread_info * now. Fetch pid, lwpid from thread.
2311 (resume_status_pending_p): Update, "entry" parameter is a
2312 struct thread_info * now.
2313 (need_step_over_p): Ditto. Fetch lwpid from thread.
2314 (start_step_over): Fetch lwpid from thread.
2315 (linux_resume_one_thread): Update, "entry" parameter is a
2316 struct thread_info * now. Fetch lwpid from thread.
2317 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2318 (proceed_one_lwp): Update, "entry" parameter is a
2319 struct thread_info * now. Fetch lwpid from thread.
2320 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2321 struct thread_info * now.
2322 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2323 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2324 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2325 directly.
2326 (regsets_store_inferior_registers): Ditto.
2327 (fetch_register, store_register): Ditto.
2328 (linux_read_memory, linux_write_memory): Ditto.
2329 (linux_request_interrupt): Ditto.
2330 (linux_read_auxv): Ditto.
2331 (linux_xfer_siginfo): Ditto.
2332 (linux_qxfer_spu): Ditto.
2333 (linux_qxfer_libraries_svr4): Ditto.
2334 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2335 moved to inferiors.h.
2336 (get_lwp): Delete.
2337 (get_thread_lwp): Update.
2338 (struct lwp_info): Delete member "entry". Simplify comment for
2339 member "thread".
2340 (all_lwps): Delete.
2341 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2342 current_inferior directly.
2343 (update_watch_registers_callback): Update, "entry" parameter is a
2344 struct thread_info * now. Fetch pid from thread.
2345 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2346 (mips_insert_point): Fetch lwpid from current_inferior.
2347 Pass &all_threads to find_inferior, not &all_lwps.
2348 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2349 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2350 directly.
2351 (mips_stopped_data_address): Ditto.
2352 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2353 directly.
2354 * linux-tile-low.c (tile_arch_setup): Ditto.
2355 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2356 (update_debug_registers_callback): Update, "entry" parameter is a
2357 struct thread_info * now. Fetch pid from thread.
2358 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2359 Pass &all_threads to find_inferior, not &all_lwps.
2360 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2361 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2362 Pass &all_threads to find_inferior, not &all_lwps.
2363 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2364 (i386_dr_low_get_status): Ditto.
2365 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2366 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2367 (x86_linux_read_description): Ditto.
2368 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2369
3b8361aa
DE
23702014-02-20 Doug Evans <dje@google.com>
2371
2372 * inferiors.c (get_first_inferior): Fix buglet.
2373
f7667f0d
DE
23742014-02-19 Doug Evans <dje@google.com>
2375
2376 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2377 * inferiors.c (add_thread): Change result type to struct thread_info *.
2378 All callers updated.
2379 (add_lwp): Call add_thread here instead of in callers.
2380 All callers updated.
2381 * linux-low.h (get_lwp_thread): Rewrite.
2382 (struct lwp_info): New member "thread".
2383
b3312d80
DE
23842014-02-19 Doug Evans <dje@google.com>
2385
2386 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2387 All callers updated.
2388
ecc6f45c
DE
23892014-02-19 Doug Evans <dje@google.com>
2390
2391 * inferiors.c (add_thread): Fix whitespace.
2392
649ebbca
DE
23932014-02-19 Doug Evans <dje@google.com>
2394
2395 * dll.c (clear_dlls): Replace accessing list implemention details
2396 with API function.
2397 * gdbthread.h (get_first_thread): Declare.
2398 * inferiors.c (for_each_inferior_with_data): New function.
2399 (get_first_thread): New function.
2400 (find_thread_ptid): Simplify.
2401 (get_first_inferior): New function.
2402 (clear_list): Delete.
2403 (one_inferior_p): New function.
2404 (clear_inferior_list): New function.
2405 (clear_inferiors): Update.
2406 * inferiors.h (for_each_inferior_with_data): Declare.
2407 (clear_inferior_list): Declare.
2408 (one_inferior_p): Declare.
2409 (get_first_inferior): Declare.
2410 * linux-low.c (linux_wait_for_event): Replace accessing list
2411 implemention details with API function.
2412 * server.c (target_running): Ditto.
2413 (accumulate_file_name_length): New function.
2414 (emit_dll_description): New function.
2415 (handle_qxfer_libraries): Replace accessing list implemention
2416 details with API function.
2417 (handle_qxfer_threads_worker): New function.
2418 (handle_qxfer_threads_proper): Replace accessing list implemention
2419 details with API function.
2420 (handle_query): Ditto.
2421 (visit_actioned_threads_callback_ftype): New typedef.
2422 (visit_actioned_threads_data): New struct.
2423 (visit_actioned_threads): Rewrite to be find_inferior callback.
2424 (resume): Call find_inferior.
2425 (handle_status): Replace accessing list implemention
2426 details with API function.
2427 (process_serial_event): Replace accessing list implemention details
2428 with API function.
2429 * target.c (set_desired_inferior): Replace accessing list implemention
2430 details with API function.
2431 * tracepoint.c (same_process_p): New function.
2432 (gdb_agent_about_to_close): Replace accessing list implemention
2433 details with API function.
2434 * win32-low.c (child_delete_thread): Replace accessing list
2435 implemention details with API function.
2436 (match_dll_by_basename): New function.
2437 (dll_is_loaded_by_basename): New function.
2438 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2439 details call to dll_is_loaded_by_basename.
2440
80894984
DE
24412014-02-19 Doug Evans <dje@google.com>
2442
2443 * dll.h (struct dll_info): Add comment.
2444 * gdbthread.h (struct thread_info): Add comment.
2445 (current_ptid): Simplify.
2446 * inferiors.c (add_process): Update.
2447 (remove_process): Update.
2448 * inferiors.h (struct process_info): Rename member "head" to "entry".
2449 * linux-low.c (delete_lwp): Update.
2450 (add_lwp): Update.
2451 (last_thread_of_process_p): Update.
2452 (kill_one_lwp_callback, linux_kill): Update.
2453 (status_pending_p_callback): Update.
2454 (wait_for_sigstop): Update. Simplify read of ptid.
2455 (start_step_over): Update.
2456 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2457 (get_lwp_thread): Update.
2458 (struct lwp_info): Rename member "head" to "entry".
2459 * regcache.h (inferior_list_entry): Delete.
2460 * server.c (kill_inferior_callback): Update.
2461 (detach_or_kill_inferior_callback): Update.
2462 (print_started_pid): Update.
2463 (print_attached_pid): Update.
2464 (process_serial_event): Simplify read of ptid.
2465 * thread-db.c (thread_db_create_event): Update.
2466 (thread_db_get_tls_address): Update.
2467 * win32-low.c (current_inferior_ptid): Simplify.
2468
46917d26
TT
24692014-02-19 Tom Tromey <tromey@redhat.com>
2470
2471 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2472 argument.
2473 (target_supports_btrace): Update.
2474
0759a81e
YQ
24752014-02-14 Yao Qi <yao@codesourcery.com>
2476
2477 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2478 (rsp-low-ipa.o): New target.
2479
a7191e8b
TT
24802014-02-12 Tom Tromey <tromey@redhat.com>
2481
2482 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2483 convert_ascii_to_int.
2484 * regcache.c (registers_to_string): Likewise.
2485 * remote-utils.c (decode_M_packet): Likewise.
2486 * server.c (process_serial_event): Likewise.
2487
ff0e980e
TT
24882014-02-12 Tom Tromey <tromey@redhat.com>
2489
2490 * server.c (handle_query, handle_v_run): Use hex2bin, not
2491 unhexify.
2492 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2493
e9371aff
TT
24942014-02-12 Tom Tromey <tromey@redhat.com>
2495
2496 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2497 convert_int_to_ascii.
2498 * regcache.c (registers_to_string, collect_register_as_string):
2499 Likewise.
2500 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2501 Likewise.
2502 * server.c (process_serial_event): Likewise.
2503 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2504 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2505
971dc0b8
TT
25062014-02-12 Tom Tromey <tromey@redhat.com>
2507
2508 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2509 bin2hex, not hexify.
2510 * tracepoint.c (cmd_qtstatus): Likewise.
2511
0a822afb
TT
25122014-02-12 Tom Tromey <tromey@redhat.com>
2513
2514 * remote-utils.c (monitor_output): Pass explicit length to
2515 hexify.
2516
9c3d6531
TT
25172014-02-12 Tom Tromey <tromey@redhat.com>
2518
2519 * tracepoint.c: Include rsp-low.h.
2520 * server.c: Include rsp-low.h.
2521 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2522 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2523 declare.
2524 * remote-utils.c: Include rsp-low.h.
2525 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2526 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2527 (convert_int_to_ascii, convert_ascii_to_int): Move to
2528 common/rsp-low.c.
2529 * regcache.c: Include rsp-low.h.
2530 * ax.c: Include rsp-low.h.
2531 * Makefile.in (SFILES): Add common/rsp-low.c.
2532 (OBS): Add rsp-low.o.
2533 (rsp-low.o): New target.
2534
01fd3ea5
TT
25352014-02-12 Tom Tromey <tromey@redhat.com>
2536
2537 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2538 Include print-utils.h.
2539 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2540 (plongest, thirty_two, phex_nz): Remove.
2541 * Makefile.in (SFILES): Add common/print-utils.c.
2542 (OBS): Add print-utils.o.
2543 (print-utils-ipa.o): New target.
2544 (print-utils.o): New target.
2545 (IPA_OBJS): Add print-utils-ipa.o.
2546
e99dc820
TT
25472014-02-06 Tom Tromey <tromey@redhat.com>
2548
2549 * Makefile.in (SFILES): Fix indentation.
2550
ee1e2d4f
DE
25512014-02-05 Doug Evans <dje@google.com>
2552
2553 * linux-low.c (linux_wait_for_event): Improve comment.
2554 (linux_wait_1): Keep current_inferior in sync with event_child.
2555
f5a02773
DE
25562014-01-22 Doug Evans <dje@google.com>
2557
2558 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2559
87ce2a04
DE
25602014-01-22 Doug Evans <dje@google.com>
2561
2562 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2563 * configure: Regenerate.
2564 * config.in: Regenerate.
2565 * Makefile.in (SFILES): Add debug.c.
2566 (OBS): Add debug.o.
2567 * debug.c: New file.
2568 * debug.h: New file.
2569 * linux-aarch64-low.c (*): Update all debugging printfs to use
2570 debug_printf instead of fprintf.
2571 * linux-arm-low.c (*): Ditto.
2572 * linux-cris-low.c (*): Ditto.
2573 * linux-crisv32-low.c (*): Ditto.
2574 * linux-m32r-low.c (*): Ditto.
2575 * linux-sparc-low.c (*): Ditto.
2576 * linux-x86.c (*): Ditto.
2577 * linux-low.c (*): Ditto.
2578 (linux_wait_1): Add calls to debug_enter, debug_exit.
2579 (linux_wait): Remove redundant debugging printf.
2580 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2581 (linux_resume, unstop_all_lwps): Ditto.
2582 * mem-break.c (*): Update all debugging printfs to use
2583 debug_printf instead of fprintf.
2584 * remote-utils.c (*): Ditto.
2585 * thread-db.c (*): Ditto.
2586 * server.c #include <ctype.h>, "gdb_vecs.h".
2587 (debug_threads): Moved to debug.c.
2588 (*): Update all debugging printfs to use debug_printf instead of
2589 fprintf.
2590 (start_inferior): Replace call to fflush with call to debug_flush.
2591 (monitor_show_help): Mention set debug-format.
2592 (parse_debug_format_options): New function.
2593 (handle_monitor_command): Handle "monitor set debug-format".
2594 (gdbserver_usage): Mention --debug-format.
2595 (main): Parse --debug-format.
2596 * server.h (debug_threads): Declaration moved to debug.h.
2597 #include "debug.h".
2598 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2599 trace_debug_1 that uses debug_printf.
2600 (tracepoint_look_up_symbols): Update all debugging printfs to use
2601 debug_printf instead of fprintf.
2602
e671835b
BS
26032014-01-20 Baruch Siach <baruch@tkos.co.il>
2604
2605 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2606 sys/ptrace.h.
2607
b5737fa9
PA
26082014-01-17 Pedro Alves <palves@redhat.com>
2609
ea38d2a9 2610 PR build/16445
c7faa97a
PA
2611 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2612 defined after including gdb_proc_service.h.
b5737fa9 2613
40ed484e
DE
26142014-01-16 Doug Evans <dje@google.com>
2615
2616 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2617 (match_dll): Use it.
2618
969c39fb
MM
26192014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2620
2621 * target.h (target_ops) <read_btrace>: Change parameters and
2622 return type to allow error reporting.
2623 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2624 trace reading errors on.
2625 * linux-low.c (linux_low_read_btrace): Pass trace reading
2626 errors on.
2627 (linux_low_disable_btrace): New.
2628
ab7f45ba
DE
26292014-01-15 Doug Evans <dje@google.com>
2630
2631 * inferiors.c (thread_id_to_gdb_id): Delete.
2632 * inferiors.h (thread_id_to_gdb_id): Delete.
2633
66af0f44
EZ
26342014-01-13 Eli Zaretskii <eliz@gnu.org>
2635
2636 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2637 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2638 versions.
2639
9939e131
PA
26402014-01-08 Pedro Alves <palves@redhat.com>
2641
2642 * server.c (handle_status): Don't discard previous queued stop
2643 replies or thread's pending status here.
2644 (main) <disconnection>: Do it here instead.
2645
b7ea362b
PA
26462014-01-08 Pedro Alves <palves@redhat.com>
2647
2648 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2649 * server.c (visit_actioned_threads, handle_pending_status): New
2650 function.
2651 (handle_v_cont): Factor out parts to ...
2652 (resume): ... this new function. If in all-stop, and a thread
2653 being resumed has a pending status, report it without actually
2654 resuming.
2655 (myresume): Adjust to use the new 'resume' function.
2656 (clear_pending_status_callback, set_pending_status_callback)
2657 (find_status_pending_thread_callback): New functions.
2658 (handle_status): Handle the case of multiple threads having
2659 interesting statuses to report. Report threads' real last signal
2660 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2661 with an interesting thread to report the status for, instead of
2662 always reporting the status of the first thread.
2663
28498c42
JB
26642014-01-01 Joel Brobecker <brobecker@adacore.com>
2665
2666 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2667 * gdbreplay.c (gdbreplay_version): Likewise.
2668
f45c82da
YZ
26692013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2670
2671 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2672 iov.iov_len with the real length in use.
2673
379a5e2d
JB
26742013-12-13 Joel Brobecker <brobecker@adacore.com>
2675
2676 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2677 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2678 for all targets that use win32-low.c.
2679 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2680 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2681
4210d83e
PA
26822013-12-13 Pedro Alves <palves@redhat.com>
2683
2684 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2685 if equal to TARGET_WAITKIND_LOADED.
2686 * win32-low.c (cached_status): New static global.
2687 (win32_wait): Add declaration.
2688 (do_initial_child_stuff): Flush all initial pending debug events
2689 up to the initial breakpoint.
2690 (win32_wait): If CACHED_STATUS was set, return that instead
2691 of doing a real wait. Remove the code resuming the execution
2692 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2693 during the initial phase. Also remove the code changing
2694 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2695 TARGET_WAITKIND_STOPPED.
2696
e7f0d979
YQ
26972013-12-11 Yao Qi <yao@codesourcery.com>
2698
2699 * notif.c (handle_notif_ack): Return 0 if no notification
2700 matches.
2701
ebcf782c
DE
27022013-11-20 Doug Evans <dje@google.com>
2703
2704 * linux-low.c (linux_set_resume_request): Fix comment.
2705
20ad9378
DE
27062013-11-20 Doug Evans <dje@google.com>
2707
2708 * linux-low.c (resume_status_pending_p): Tweak comment.
2709
a196ebeb
WT
27102013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2711
2712 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2713 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2714 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2715 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2716 (srv_amd64_regobj): Add amd64-mpx.o.
2717 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2718 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2719 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2720 * i387-fp.c (num_pl_bnd_register) Added constant.
2721 (num_pl_bnd_cfg_registers) Added constant.
2722 (struct i387_xsave) Added reserved area and MPX fields.
2723 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2724 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2725 function.
2726 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2727 (init_registers_amd64_mpx_linux): Declare new function.
2728 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2729 (x86_64_regmap): Add MPX registers.
2730 (x86_linux_read_description): Add MPX case.
2731 (initialize_low_arch): Initialize MPX targets.
2732
0080a2f6
TT
27332013-11-18 Tom Tromey <tromey@redhat.com>
2734
2735 * configure: Rebuild.
2736 * configure.ac: Don't check for stdlib.h.
2737 * gdbreplay.c: Unconditionally include stdlib.h.
2738
2978b111
TT
27392013-11-18 Tom Tromey <tromey@redhat.com>
2740
2741 * config.in: Rebuild.
2742 * configure: Rebuild.
2743 * configure.ac: Don't use AC_HEADER_DIRENT.
2744
a3d08894
TT
27452013-11-18 Tom Tromey <tromey@redhat.com>
2746
2747 * server.h: Don't check HAVE_STRING_H.
2748 * gdbreplay.c: Don't check HAVE_STRING_H.
2749 * configure: Rebuild.
2750
0a5dd17d
TT
27512013-11-18 Tom Tromey <tromey@redhat.com>
2752
2753 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2754 LIBGNU.
2755
1bd2f0ba
TT
27562013-11-08 Tom Tromey <tromey@redhat.com>
2757
2758 * configure, config.in: Rebuild.
2759 * configure.ac: Remove unused configury.
2760
3266f10b
TT
27612013-11-08 Tom Tromey <tromey@redhat.com>
2762
2763 * acinclude.m4: Include common.m4, codeset.m4.
2764 * configure, config.in: Rebuild.
2765 * configure.ac: Use GDB_AC_COMMON.
2766
6682d959
AA
27672013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2768
2769 * linux-s390-low.c (HWCAP_S390_TE): New define.
2770 (s390_arch_setup): Consider the TE field in the HWCAP for
2771 determining 'have_regset_tdb'.
2772
fd0a4d76
SDJ
27732013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2774
2775 PR gdb/16014
2776 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2777 call to sizeof.
2778
1a3d890b
PA
27792013-10-02 Pedro Alves <palves@redhat.com>
2780
2781 * server.c (process_serial_event): Don't output "GDBserver
2782 exiting" if GDB is connected through stdio.
2783 * target.c (mywait): Likewise, be silent if GDB is connected
2784 through stdio.
2785
97ad4581
JB
27862013-10-01 Joel Brobecker <brobecker@adacore.com>
2787
2788 * lynx-low.c (lynx_add_threads_after_attach): New function.
2789 (lynx_attach): Remove call to add_thread. Add call to
2790 lynx_add_threads_after_attach instead.
2791
5b4e221c
MF
27922013-09-28 Mike Frysinger <vapier@gentoo.org>
2793
2794 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2795 * config.in, configure: Regenerated.
2796
ee47b2f8
YQ
27972013-09-18 Yao Qi <yao@codesourcery.com>
2798
2799 PR server/15959
2800 * server.c (start_inferior): Clear 'resume_info'.
2801
d6707650 28022013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2803
d6707650
JW
2804 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2805 for each register.
2806
9243dd0e 28072013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2808
9243dd0e
JW
2809 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2810 linux-tile-low.o to srv_tgtobj.
2811
c623a6ef
WN
28122013-09-16 Will Newton <will.newton@linaro.org>
2813
2814 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2815 out regs.
2816
fb71d39e
PA
28172013-09-06 Pedro Alves <palves@redhat.com>
2818
2819 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2820 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2821 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2822 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2823 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2824 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2825
8e7e9910
PA
28262013-09-06 Pedro Alves <palves@redhat.com>
2827
2828 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2829 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2830
7c3a12ca
PA
28312013-09-06 Pedro Alves <palves@redhat.com>
2832
2833 * linux-amd64-ipa.c: Include tracepoint.h.
2834 * linux-i386-ipa.c: Include tracepoint.h.
2835
8eb3d7b6
RW
28362013-09-06 Ricard Wanderlof <ricardw@axis.com>
2837
2838 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2839 (ps_get_thread_area): New function.
2840
eddddb9d
RW
28412013-09-06 Ricard Wanderlof <ricardw@axis.com>
2842
2843 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2844 (initialize_low_arch): Call init_registers_crisv32 rather than
2845 init_register_crisv32.
2846
533b0600
PA
28472013-09-05 Pedro Alves <palves@redhat.com>
2848
2849 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2850 to ...
2851 * hostio.h: ... this new file.
2852 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2853 win32-low.c: Include hostio.h.
2854
0ce3d3b5
PA
28552013-09-05 Pedro Alves <palves@redhat.com>
2856
2857 * server.h (gdb_client_data, handler_func, callback_handler_func)
2858 (delete_file_handler, add_file_handler, append_callback_event)
2859 (delete_callback_event, start_event_loop, initialize_event_loop):
2860 Move to event-loop.h and include it.
2861 * event-loop.h: New file.
2862
799cdc37
PA
28632013-09-05 Pedro Alves <palves@redhat.com>
2864
2865 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2866 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2867 (loaded_dll, unloaded_dll): Move to ...
2868 * dll.h: ... this new file.
2869 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2870
6a6bbd9d
PA
28712013-09-05 Pedro Alves <palves@redhat.com>
2872
2873 * server.h (current_process, get_thread_process, all_processes)
2874 (add_inferior_to_list, for_each_inferior, current_inferior)
2875 (remove_inferior, add_process, remove_process, find_process_pid)
2876 (have_started_inferiors_p, have_attached_inferiors_p)
2877 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2878 (clear_inferiors, find_inferior, find_inferior_id)
2879 (inferior_target_data, set_inferior_target_data)
2880 (inferior_regcache_data, set_inferior_regcache_data): Move to
2881 inferiors.h, and include it.
2882 * inferiors.h: New file.
2883
f699aaba
PA
28842013-09-05 Pedro Alves <palves@redhat.com>
2885
2886 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2887 Move ...
72f4393d 2888 * ax.h: ... here.
f699aaba 2889
c144c7a0
PA
28902013-09-05 Pedro Alves <palves@redhat.com>
2891
2892 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2893 tracepoint.h.
2894 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2895 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2896 (handle_tracepoint_general_set, handle_tracepoint_query)
2897 (tracepoint_finished_step, tracepoint_was_hit)
2898 (release_while_stepping_state_list, current_traceframe)
2899 (in_readonly_region, traceframe_read_mem)
2900 (fetch_traceframe_registers, traceframe_read_sdata)
2901 (traceframe_read_info, struct fast_tpoint_collect_status)
2902 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2903 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2904 (supply_fast_tracepoint_registers)
2905 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2906 (ipa_tdesc, claim_trampoline_space)
2907 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2908 (agent_mem_read, agent_get_trace_state_variable_value)
2909 (agent_set_trace_state_variable_value, agent_tsv_read)
2910 (agent_mem_read_string, get_raw_reg_func_addr)
2911 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2912 * tracepoint.h: ... this new file.
2913
ff42e6ab
PA
29142013-09-05 Pedro Alves <palves@redhat.com>
2915
2916 * server.h (perror_with_name, error, fatal, warning, paddress)
2917 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2918 include it.
2919 * utils.h: New file.
2920
541af0f4
PA
29212013-09-05 Pedro Alves <palves@redhat.com>
2922
2923 * server.h (remote_debug, noack_mode, transport_is_reliable)
2924 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2925 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2926 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2927 (write_enn, initialize_async_io, enable_async_io)
2928 (disable_async_io, check_remote_input_interrupt_request)
2929 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2930 (dead_thread_notify, prepare_resume_reply)
2931 (decode_address_to_semicolon, decode_address, decode_m_packet)
2932 (decode_M_packet, decode_X_packet, decode_xfer_write)
2933 (decode_search_memory_packet, unhexify, hexify)
2934 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2935 (look_up_one_symbol, relocate_instruction)
2936 (monitor_output): Move to remote-utils.h, and include it.
2937 * remote-utils.h: New file.
2938
eebdf26b
PA
29392013-09-05 Pedro Alves <palves@redhat.com>
2940
2941 * server.h (_): Delete.
2942
3aafd2ff
PA
29432013-09-02 Pedro Alves <palves@redhat.com>
2944
2945 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2946 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2947 allocated.
2948 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2949
cee83bcb
PM
29502013-09-02 Pierre Muller <muller@sourceware.org>
2951
2952 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2953 or WriteProcessMemory complete successfully and handle
2954 ERROR_PARTIAL_COPY error.
2955
9a13b2fa
PA
29562013-09-02 Pedro Alves <palves@redhat.com>
2957
2958 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2959 error instead of EIO.
2960
602e3198
JK
29612013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2962
2963 PR server/15604
2964 * linux-low.c: Include filestuff.h.
2965 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2966 * lynx-low.c: Include filestuff.h.
2967 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2968 * server.c: Include filestuff.h.
2969 (main): Call notice_open_fds.
2970 * spu-low.c: Include filestuff.h.
2971 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2972
96d7229d
LM
29732013-08-22 Luis Machado <lgustavo@codesourcery.com>
2974
2975 * Makefile.in: Explain why ../target and ../nat are not
2976 listed as include file search paths.
2977 (linux-waitpid.o): New object file rule.
2978 * configure.srv (srv_native_linux_obj): New variable.
2979 Replace all occurrences of linux native object files with
2980 $srv_native_linux_obj.
2981 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2982 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2983 (linux_enable_event_reporting): Remove declaration.
2984 (my_waitpid): Moved to common/linux-waitpid.c.
2985 (linux_wait_for_event): Pass ptid when calling
2986 linux_enable_event_reporting.
2987 (linux_supports_tracefork_flag): Remove.
2988 (linux_enable_event_reporting): Likewise.
2989 (linux_tracefork_grandchild): Remove.
2990 (STACK_SIZE): Moved to common/linux-ptrace.c.
2991 (linux_tracefork_child): Remove.
2992 (linux_test_for_tracefork): Remove.
2993 (linux_look_up_symbols): Call linux_supports_traceclone.
2994 (initialize_low): Remove call to linux_test_for_tracefork.
2995 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2996 common/linux-ptrace.h.
2997 (PTRACE_TYPE_ARG4): Likewise.
2998 Include linux-ptrace.h.
2999
32940073
PA
30002013-08-21 Pedro Alves <palves@redhat.com>
3001
3002 * config.in: Renegerate.
3003
33b60d58 30042013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3005
33b60d58
LM
3006 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3007 (SFILES): Remove $(srcdir)/common/target-common.c and
3008 add $(srcdir)/target/waitstatus.c.
3009 (OBS): Remove target-common.o and add waitstatus.o.
3010 (server_h): Remove $(srcdir)/../common/target-common.h and
3011 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3012 and $(srcdir)/../target/waitstatus.h.
3013 (target-common.o): Remove.
3014 (waitstatus.o): New target object file.
3015 * target.h: Do not include target-common.h and
3016 include target/resume.h, target/wait.h and
3017 target/waitstatus.h.
3018
b8e1b30e
LM
30192013-08-13 Luis Machado <lgustavo@codesourcery.com>
3020
3021 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3022 to PTRACE_TYPE_ARG3.
3023 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3024 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3025 PTRACE_TYPE_ARG4.
3026 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3027 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3028
7a60ad40
YQ
30292013-07-27 Jie Zhang <jie@codesourcery.com>
3030 Daniel Jacobowitz <dan@codesourcery.com>
3031 Yao Qi <yao@codesourcery.com>
3032
3033 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3034 (mips-linux-watch.o): New rule.
3035 (mips_linux_watch_h): New variable.
3036 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3037 srv_tgtobj.
3038 * linux-mips-low.c: Include mips-linux-watch.h.
3039 (struct arch_process_info, struct arch_lwp_info): New.
3040 (update_watch_registers_callback): New function.
3041 (mips_linux_new_process, mips_linux_new_thread) New functions.
3042 (mips_linux_prepare_to_resume, mips_insert_point): New
3043 functions.
3044 (mips_remove_point, mips_stopped_by_watchpoint): New
3045 functions.
3046 (rsp_bp_type_to_target_hw_bp_type): New function.
3047 (mips_stopped_data_address): New function.
3048 (the_low_target): Add watchpoint support functions.
3049
de6f69ad
YQ
30502013-07-27 Yao Qi <yao@codesourcery.com>
3051
3052 * i386-low.c: Include break-common.h.
3053 (enum target_hw_bp_type): Remove.
3054
3360c0bf
LM
30552013-07-24 Luis Machado <lgustavo@codesourcery.com>
3056
3057 * Makefile.in (SFILES): /common/target-common.c.
3058 (OBS): Add target-common.o.
3059 (server_h): Add $(srcdir)/../common/target-common.h.
3060 (target-common.o): New target.
3061 * server.c (queue_stop_reply_callback): Free
3062 status string after use.
3063 * target.c (target_waitstatus_to_string): Remove.
3064 * target.h: Include target-common.h.
3065 (resume_kind): Likewise.
3066 (target_waitkind): Likewise.
3067 (target_waitstatus): Likewise.
3068 (TARGET_WNOHANG): Likewise.
3069
bd885420
YQ
30702013-07-04 Yao Qi <yao@codesourcery.com>
3071
3072 * Makefile.in (host_alias): Use @host_noncanonical@.
3073 (target_alias): Use @target_noncanonical@.
3074 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3075 ACX_NONCANONICAL_HOST.
3076 * configure: Regenerated.
3077
3078 Revert:
3079 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3080
3081 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3082 * configure: Rebuild.
3083 * Makefile.in (version_host, version_target): Get from configure.
3084 (version.c): Use $(version_host) and $(version_target).
3085
17ef446e
PA
30862013-07-03 Pedro Alves <palves@redhat.com>
3087
3088 * Makefile.in (config.status): Depend on development.sh.
3089 * acinclude.m4: Include libmcheck.m4.
3090 * configure: Regenerate.
3091
7a9a7487
MG
30922013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3093
3094 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3095 attribute inside the parentheses.
3096 (winapi_DebugSetProcessKillOnExit): Ditto.
3097 (winapi_DebugBreakProcess): Ditto.
3098 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3099
49b64de6
MG
31002013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3101
3102 * notif.h (notif_event): Add a dummy member to avoid compiler
3103 errors.
3104
d5749ee7
PA
31052013-07-01 Pedro Alves <palves@redhat.com>
3106
3107 * hostio.c (HOSTIO_PATH_MAX): Define.
3108 (require_filename, handle_open, handle_unlink, handle_readlink):
3109 Use it.
3110
d8d2a3ee
PA
31112013-07-01 Pedro Alves <palves@redhat.com>
3112
3113 * server.h: Include "pathmax.h".
3114 * linux-low.c: Don't include sys/param.h.
3115 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3116 MAXPATHLEN.
3117 * win32-low.c: Don't include sys/param.h.
3118 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3119
bc7dea8d
PA
31202013-07-01 Pedro Alves <palves@redhat.com>
3121
3122 * event-loop.c: Don't check HAVE_UNISTD_H before including
3123 <unistd.h>.
3124 * gdbreplay.c: Likewise.
3125 * remote-utils.c: Likewise.
3126 * server.c: Likewise.
3127 * configure.ac: Don't check for unistd.h.
3128 * configure: Regenerate.
3129
d6c2da54
TT
31302013-06-28 Tom Tromey <tromey@redhat.com>
3131
3132 * Makefile.in (version.c): Use version.in, not
3133 common/version.in.
3134
257b6bec
MG
31352013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3136
3137 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3138 * configure: Rebuild.
3139 * Makefile.in (version_host, version_target): Get from configure.
3140 (version.c): Use $(version_host) and $(version_target).
3141
86ebe149
DK
31422013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3143
3144 Fix trace-status to output user name without trailing colon.
3145 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3146
f30aa5af
DK
31472013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3148
3149 Fix trace-status to output proper start-time and stop-time.
3150 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3151 output start time and stop time in hex as gdb expects.
3152
28a93511
YQ
31532013-06-26 Pedro Alves <pedro@codesourcery.com>
3154
3155 * tracepoint.c (build_traceframe_info_xml): Output trace state
3156 variables present in the trace buffer.
3157
01208463
TT
31582013-06-24 Tom Tromey <tromey@redhat.com>
3159
3160 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3161 create-version.sh.
3162 (version.o): Remove.
3163 * gdbreplay.c: Include version.h.
3164 (version, host_name): Don't declare.
3165 * server.h: Include version.h.
3166 (version, host_name): Don't declare.
3167
760256f9
PA
31682013-06-12 Pedro Alves <palves@redhat.com>
3169
3170 * linux-x86-low.c (linux_is_elf64): Delete global.
3171 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3172 with local linux_pid_exe_is_elf_64_file use.
3173
030031ee
PA
31742013-06-11 Pedro Alves <palves@redhat.com>
3175
3176 * linux-low.c (regset_disabled, disable_regset): New functions.
3177 (regsets_fetch_inferior_registers)
3178 (regsets_store_inferior_registers): Use them.
3179 (initialize_regsets_info); Don't allocate the disabled_regsets
3180 array here.
3181 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3182 comment.
3183
5da6eb0a
PA
31842013-06-11 Pedro Alves <palves@redhat.com>
3185
3186 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3187 xmalloc.
3188
7e5aaa09
PA
31892013-06-11 Pedro Alves <palves@redhat.com>
3190
3191 * linux-x86-low.c (initialize_low_arch): Call
3192 init_registers_x32_avx_linux.
3193
d878444c
JK
31942013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3195
3196 Fix compatibility with Android Bionic.
3197 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3198 it is not empty.
3199
3aee8918
PA
32002013-06-07 Pedro Alves <palves@redhat.com>
3201
5f2b57b5 3202 PR server/14823
3aee8918
PA
3203 * Makefile.in (OBS): Add tdesc.o.
3204 (IPA_OBJS): Add tdesc-ipa.o.
3205 (tdesc-ipa.o): New rule.
3206 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3207 interface.
3208 * linux-low.c (new_inferior): Delete.
3209 (disabled_regsets, num_regsets): Delete.
3210 (linux_add_process): Adjust to set the new per-process
3211 new_inferior flag.
3212 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3213 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3214 was a stop. When calling arch_setup, switch the current inferior
3215 to the thread that got an event.
3216 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3217 (regsets_fetch_inferior_registers)
3218 (regsets_store_inferior_registers): New regsets_info parameter.
3219 Adjust to use it.
3220 (linux_register_in_regsets): New regs_info parameter. Adjust to
3221 use it.
3222 (register_addr, fetch_register, store_register): New usrregs_info
3223 parameter. Adjust to use it.
3224 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3225 parameter regs_info. Adjust to use it.
3226 (linux_fetch_registers): Get the current inferior's regs_info, and
3227 adjust to use it.
3228 (linux_store_registers): Ditto.
3229 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3230 (initialize_low): Don't initialize the target_regsets here. Call
3231 initialize_low_arch.
3232 * linux-low.h (target_regsets): Delete declaration.
3233 (struct regsets_info): New.
3234 (struct usrregs_info): New.
3235 (struct regs_info): New.
3236 (struct process_info_private) <new_inferior>: New field.
3237 (struct linux_target_ops): Delete the num_regs, regmap, and
3238 regset_bitmap fields. New field regs_info.
3239 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3240 * i387-fp.c (num_xmm_registers): Delete.
3241 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3242 calls to new interface.
3243 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3244 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3245 Infer the number of xmm registers from the regcache's target
3246 description.
3247 * i387-fp.h (num_xmm_registers): Delete.
3248 * inferiors.c (add_thread): Don't install the thread's regcache
3249 here.
3250 * proc-service.c (gregset_info): Fetch the current inferior's
3251 regs_info. Adjust to use it.
3252 * regcache.c: Include tdesc.h.
3253 (register_bytes, reg_defs, num_registers)
3254 (gdbserver_expedite_regs): Delete.
3255 (get_thread_regcache): If the thread doesn't have a regcache yet,
3256 create one, instead of aborting gdbserver.
3257 (regcache_invalidate_one): Rename to ...
3258 (regcache_invalidate_thread): ... this.
3259 (regcache_invalidate_one): New.
3260 (regcache_invalidate): Only invalidate registers of the current
3261 process.
3262 (init_register_cache): Add target_desc parameter, and use it.
3263 (new_register_cache): Ditto. Assert the target description has a
3264 non zero registers_size.
3265 (regcache_cpy): Add assertions. Adjust.
3266 (realloc_register_cache, set_register_cache): Delete.
3267 (registers_to_string, registers_from_string): Adjust.
3268 (find_register_by_name, find_regno, find_register_by_number)
3269 (register_cache_size): Add target_desc parameter, and use it.
3270 (free_register_cache_thread, free_register_cache_thread_one)
3271 (regcache_release, register_cache_size): New.
3272 (register_size): Add target_desc parameter, and use it.
3273 (register_data, supply_register, supply_register_zeroed)
3274 (supply_regblock, supply_register_by_name, collect_register)
3275 (collect_register_as_string, collect_register_by_name): Adjust.
3276 * regcache.h (struct target_desc): Forward declare.
3277 (struct regcache) <tdesc>: New field.
3278 (init_register_cache, new_register_cache): Add target_desc
3279 parameter.
3280 (regcache_invalidate_thread): Declare.
3281 (regcache_invalidate_one): Delete declaration.
3282 (regcache_release): Declare.
3283 (find_register_by_number, register_cache_size, register_size)
3284 (find_regno): Add target_desc parameter.
3285 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3286 declarations.
3287 * remote-utils.c: Include tdesc.h.
3288 (outreg, prepare_resume_reply): Adjust.
3289 * server.c: Include tdesc.h.
3290 (gdbserver_xmltarget): Delete declaration.
3291 (get_features_xml, process_serial_event): Adjust.
3292 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3293 declare.
3294 (struct process_info) <tdesc>: New field.
3295 (ipa_tdesc): Declare.
3296 * tdesc.c: New file.
3297 * tdesc.h: New file.
3298 * tracepoint.c: Include tdesc.h.
3299 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3300 (get_context_regcache): Adjust to pass ipa_tdesc down.
3301 (do_action_at_tracepoint): Adjust to get the register cache size
3302 from the context regcache's description.
3303 (traceframe_walk_blocks): Adjust to get the register cache size
3304 from the current trace frame's description.
3305 (traceframe_get_pc): Adjust to get current trace frame's
3306 description and pass it down.
3307 (gdb_collect): Adjust to get the register cache size from the
3308 IPA's description.
3309 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3310 (gdbserver_xmltarget): Delete.
3311 (initialize_low_tracepoint): Set the ipa's target description.
3312 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3313 (initialize_low_tracepoint): Set the ipa's target description.
3314 * linux-x86-low.c: Include tdesc.h.
3315 [__x86_64__] (is_64bit_tdesc): New.
3316 (ps_get_thread_area, x86_get_thread_area): Use it.
3317 (i386_cannot_store_register): Rename to ...
3318 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3319 (i386_cannot_fetch_register): Rename to ...
3320 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3321 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3322 to new interface.
3323 (target_regsets): Rename to ...
3324 (x86_regsets): ... this.
3325 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3326 interface.
3327 (x86_siginfo_fixup): Use is_64bit_tdesc.
3328 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3329 (tdesc_x32_avx_linux, tdesc_x32_linux)
3330 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3331 Declare.
3332 (x86_linux_update_xmltarget): Delete.
3333 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3334 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3335 (AMD64_LINUX_USER64_CS): New.
3336 (x86_linux_read_description): New, based on
3337 x86_linux_update_xmltarget.
3338 (same_process_callback): New.
3339 (x86_arch_setup_process_callback): New.
3340 (x86_linux_update_xmltarget): New.
3341 (x86_regsets_info): New.
3342 (amd64_linux_regs_info): New.
3343 (i386_linux_usrregs_info): New.
3344 (i386_linux_regs_info): New.
3345 (x86_linux_regs_info): New.
3346 (x86_arch_setup): Reimplement.
3347 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3348 (x86_emit_ops): Ditto.
3349 (the_low_target): Adjust. Install x86_linux_regs_info,
3350 x86_cannot_fetch_register, and x86_cannot_store_register.
3351 (initialize_low_arch): New.
3352 * linux-ia64-low.c (tdesc_ia64): Declare.
3353 (ia64_fetch_register): Adjust.
3354 (ia64_usrregs_info, regs_info): New globals.
3355 (ia64_regs_info): New function.
3356 (the_low_target): Adjust.
3357 (initialize_low_arch): New function.
3358 * linux-sparc-low.c (tdesc_sparc64): Declare.
3359 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3360 Adjust.
3361 (sparc_arch_setup): New function.
3362 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3363 (the_low_target): Adjust.
3364 (initialize_low_arch): New function.
3365 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3366 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3367 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3368 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3369 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3370 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3371 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3372 (tdesc_powerpc_isa205_vsx64l): Declare.
3373 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3374 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3375 (ppc_set_pc, ppc_get_hwcap): Adjust.
3376 (ppc_usrregs_info): Forward declare.
3377 (!__powerpc64__) ppc_regmap_adjusted: New global.
3378 (ppc_arch_setup): Adjust to the current process'es target
3379 description.
3380 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3381 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3382 (ppc_store_evrregset): Adjust.
3383 (target_regsets): Rename to ...
3384 (ppc_regsets): ... this, and make static.
3385 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3386 (ppc_regs_info): New function.
3387 (the_low_target): Adjust.
3388 (initialize_low_arch): New function.
3389 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3390 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3391 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3392 (tdesc_s390x_linux64v2): Declare.
3393 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3394 (s390_fill_gregset, s390_store_last_break): Adjust.
3395 (target_regsets): Rename to ...
3396 (s390_regsets): ... this, and make static.
3397 (s390_get_pc, s390_set_pc): Adjust.
3398 (s390_get_hwcap): New target_desc parameter, and use it.
3399 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3400 (s390_arch_setup): Adjust to set the current process'es target
3401 description. Don't adjust the regmap.
3402 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3403 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3404 (regs_info_3264): New globals.
3405 (s390_regs_info): New function.
3406 (the_low_target): Adjust.
3407 (initialize_low_arch): New function.
3408 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3409 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3410 [__mips64] (init_registers_mips_linux)
3411 (init_registers_mips_dsp_linux): Delete defines.
3412 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3413 (have_dsp): New global.
3414 (mips_read_description): New, based on mips_arch_setup.
3415 (mips_arch_setup): Reimplement.
3416 (get_usrregs_info): New function.
3417 (mips_cannot_fetch_register, mips_cannot_store_register)
3418 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3419 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3420 (target_regsets): Rename to ...
3421 (mips_regsets): ... this, and make static.
3422 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3423 (dsp_regs_info, regs_info): New globals.
3424 (mips_regs_info): New function.
3425 (the_low_target): Adjust.
3426 (initialize_low_arch): New function.
3427 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3428 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3429 Declare.
3430 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3431 (arm_read_description): New, with bits factored from
3432 arm_arch_setup.
3433 (arm_arch_setup): Reimplement.
3434 (target_regsets): Rename to ...
3435 (arm_regsets): ... this, and make static.
3436 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3437 (arm_regs_info): New function.
3438 (the_low_target): Adjust.
3439 (initialize_low_arch): New function.
3440 * linux-m68k-low.c (tdesc_m68k): Declare.
3441 (target_regsets): Rename to ...
3442 (m68k_regsets): ... this, and make static.
3443 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3444 (m68k_regs_info): New function.
3445 (m68k_arch_setup): New function.
3446 (the_low_target): Adjust.
3447 (initialize_low_arch): New function.
3448 * linux-sh-low.c (tdesc_sharch): Declare.
3449 (target_regsets): Rename to ...
3450 (sh_regsets): ... this, and make static.
3451 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3452 (sh_regs_info, sh_arch_setup): New functions.
3453 (the_low_target): Adjust.
3454 (initialize_low_arch): New function.
3455 * linux-bfin-low.c (tdesc_bfin): Declare.
3456 (bfin_arch_setup): New function.
3457 (bfin_usrregs_info, regs_info): New globals.
3458 (bfin_regs_info): New function.
3459 (the_low_target): Adjust.
3460 (initialize_low_arch): New function.
3461 * linux-cris-low.c (tdesc_cris): Declare.
3462 (cris_arch_setup): New function.
3463 (cris_usrregs_info, regs_info): New globals.
3464 (cris_regs_info): New function.
3465 (the_low_target): Adjust.
3466 (initialize_low_arch): New function.
3467 * linux-cris-low.c (tdesc_crisv32): Declare.
3468 (cris_arch_setup): New function.
3469 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3470 (cris_regs_info): New function.
3471 (the_low_target): Adjust.
3472 (initialize_low_arch): New function.
3473 * linux-m32r-low.c (tdesc_m32r): Declare.
3474 (m32r_arch_setup): New function.
3475 (m32r_usrregs_info, regs_info): New globals.
3476 (m32r_regs_info): Adjust.
3477 (initialize_low_arch): New function.
3478 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3479 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3480 (tic6x_usrregs_info): Forward declare.
3481 (tic6x_read_description): New function, based on ...
3482 (tic6x_arch_setup): ... this. Reimplement.
3483 (target_regsets): Rename to ...
3484 (tic6x_regsets): ... this, and make static.
3485 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3486 (tic6x_regs_info): New function.
3487 (the_low_target): Adjust.
3488 (initialize_low_arch): New function.
3489 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3490 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3491 (target_regsets): Rename to ...
3492 (xtensa_regsets): ... this, and make static.
3493 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3494 globals.
3495 (xtensa_arch_setup, xtensa_regs_info): New functions.
3496 (the_low_target): Adjust.
3497 (initialize_low_arch): New function.
3498 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3499 (nios2_arch_setup): Set the current process'es tdesc.
3500 (target_regsets): Rename to ...
3501 (nios2_regsets): ... this.
3502 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3503 (nios2_regs_info): New function.
3504 (the_low_target): Adjust.
3505 (initialize_low_arch): New function.
a261b8f5
PA
3506 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3507 (aarch64_arch_setup): Set the current process'es tdesc.
3508 (target_regsets): Rename to ...
3509 (aarch64_regsets): ... this.
3510 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3511 (aarch64_regs_info): New function.
3512 (the_low_target): Adjust.
3513 (initialize_low_arch): New function.
3aee8918
PA
3514 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3515 globals.
3516 (target_regsets): Rename to ...
3517 (tile_regsets): ... this.
3518 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3519 (tile_regs_info): New function.
3520 (tile_arch_setup): Set the current process'es tdesc.
3521 (the_low_target): Adjust.
3522 (initialize_low_arch): New function.
3523 * spu-low.c (tdesc_spu): Declare.
3524 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3525 * win32-arm-low.c (tdesc_arm): Declare.
3526 (arm_arch_setup): New function.
3527 (the_low_target): Install arm_arch_setup instead of
3528 init_registers_arm.
3529 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3530 (init_windows_x86): Rename to ...
3531 (i386_arch_setup): ... this. Set `win32_tdesc'.
3532 (the_low_target): Adjust.
3533 * win32-low.c (win32_tdesc): New global.
3534 (child_add_thread): Don't create the thread cache here.
3535 (do_initial_child_stuff): Set the new process'es tdesc.
3536 * win32-low.h (struct target_desc): Forward declare.
3537 (win32_tdesc): Declare.
3538 * lynx-i386-low.c (tdesc_i386): Declare global.
3539 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3540 * lynx-low.c (lynx_tdesc): New global.
3541 (lynx_add_process): Set the new process'es tdesc.
3542 * lynx-low.h (struct target_desc): Forward declare.
3543 (lynx_tdesc): Declare global.
3544 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3545 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3546 * nto-low.c (nto_tdesc): New global.
3547 (do_attach): Set the new process'es tdesc.
3548 * nto-low.h (struct target_desc): Forward declare.
3549 (nto_tdesc): Declare.
3550 * nto-x86-low.c (tdesc_i386): Declare.
3551 (nto_x86_arch_setup): Set `nto_tdesc'.
3552
b1fbec62
GB
35532013-06-04 Gary Benson <gbenson@redhat.com>
3554
3555 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3556 to qSupported response when appropriate.
3557 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3558 with nonzero-length annex.
3559 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3560 arguments supplied in annex.
3561
d1ec4ce7
DE
35622013-05-31 Doug Evans <dje@google.com>
3563
ac44adcb 3564 PR server/15594
d1ec4ce7
DE
3565 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3566 64 bits in 64-cross-32 environment.
3567
9b25f2d3
PA
35682013-05-28 Pedro Alves <palves@redhat.com>
3569
3570 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3571 (aarch64-without-fpu.c): Delete rule.
3572 * configure.srv (aarch64*-*-linux*): Remove references to
3573 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3574 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3575 declaration.
3576
6740dc9c
PA
35772013-05-24 Pedro Alves <palves@redhat.com>
3578
3579 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3580 instead of strchr/decode_address. Error if the range isn't split
3581 with a ','. Don't assume there's be a ':' in the action.
3582
c2d6af84
PA
35832013-05-23 Yao Qi <yao@codesourcery.com>
3584 Pedro Alves <palves@redhat.com>
3585
3586 * linux-low.c (lwp_in_step_range): New function.
3587 (linux_wait_1): If the thread was range stepping and stopped
3588 outside the stepping range, report the stop to GDB. Otherwise,
3589 continue stepping. Add range stepping debug output.
3590 (linux_set_resume_request): Copy the step range from the resume
3591 request to the lwp.
3592 (linux_supports_range_stepping): New.
3593 (linux_target_ops) <supports_range_stepping>: Set to
3594 linux_supports_range_stepping.
3595 * linux-low.h (struct linux_target_ops)
3596 <supports_range_stepping>: New field.
3597 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3598 * linux-x86-low.c (x86_supports_range_stepping): New.
3599 (the_low_target) <supports_range_stepping>: Set to
3600 x86_supports_range_stepping.
3601 * server.c (handle_v_cont): Handle 'r' action.
3602 (handle_v_requests): Append ";r" if the target supports range
3603 stepping.
3604 * target.h (struct thread_resume) <step_range_start,
3605 step_range_end>: New fields.
3606 (struct target_ops) <supports_range_stepping>:
3607 New field.
3608 (target_supports_range_stepping): New macro.
3609
58794e1a
JB
36102013-05-17 Joel Brobecker <brobecker@adacore.com>
3611
3612 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3613 confusion in comment.
3614
d631c5a7
JB
36152013-05-17 Joel Brobecker <brobecker@adacore.com>
3616
3617 * lynx-low.c (struct process_info_private): New type.
3618 (lynx_add_process): New function.
3619 (lynx_create_inferior, lynx_attach): Replace calls to
3620 add_process by calls to lynx_add_process.
3621 (lynx_resume): If PTID is null, then try using
3622 current_process()->private->last_wait_event_ptid.
3623 Add comments.
3624 (lynx_clear_inferiors): Delete. The contents of that function
3625 has been inlined in lynx_mourn;
3626 (lynx_wait_1): Save the ptid in the process's private data.
3627 (lynx_mourn): Free the process' private data. Replace call
3628 to lynx_clear_inferiors by call to clear_inferiors.
3629
96f7a20f
YQ
36302013-05-17 Yao Qi <yao@codesourcery.com>
3631
3632 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3633 the right place.
3634
db0dfaa0
LM
36352013-05-16 Luis Machado <lgustavo@codesourcery.com>
3636
3637 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3638 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3639 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3640 PT_TEXT_END_ADDR guards. Update comments.
3641 (linux_target_op) <read_offsets>: Conditionally define to
3642 linux_read_offsets if the target is UCLIBC and if it defines
3643 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3644
68f5f838
SL
36452013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3646 Andrew Jenner <andrew@codesourcery.com>
3647
3648 * Makefile.in (SFILES): Add linux-nios2-low.c.
3649 (clean): Add action to delete nios2-linux.c.
3650 (nios2-linux.c): New rule.
3651 * configure.srv: Add nios2*-*-linux*.
3652 * linux-nios2-low.c: New.
3653
1ebff1fd
HAQ
36542013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3655
3656 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3657
f6150862
HZ
36582013-04-25 Hui Zhu <hui@codesourcery.com>
3659
3660 PR gdb/15186
f6150862
HZ
3661 * ax.c (ax_printf): Add fflush.
3662
614c279d
TT
36632013-04-22 Tom Tromey <tromey@redhat.com>
3664
3665 * Makefile.in (SFILES): Add filestuff.c.
3666 (OBS): Add filestuff.o.
3667 (filestuff.o): New target.
3668 * config.in, configure: Rebuild.
3669 * configure.ac: Check for fdwalk, pipe2.
3670
7d4e5717
PA
36712013-04-17 Pedro Alves <palves@redhat.com>
3672
3673 * configure.ac (USE_THREAD_DB): Delete variable.
3674 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3675 Don't AC_SUBST USE_THREAD_DB.
3676 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3677 * config.in, configure: Regenerate.
3678
d5c93e41
PA
36792013-04-16 Pedro Alves <palves@redhat.com>
3680
3681 * linux-low.h (struct lwp_info) <thread_known>: Move under
3682 the USE_THREAD_DB #ifdef.
3683
04f5fe89
PA
36842013-04-16 Pedro Alves <palves@redhat.com>
3685
3686 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3687 (linux-low.o): Delete rule.
3688 * linux-low.h: Always include "gdb_thread_db.h" instead of
3689 conditionally including thread_db.h.
3690 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3691 HAVE_THREAD_DB_H.
3692
480b27bf
JK
36932013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3694
3695 * Makefile.in (install-only): Fix make install regression.
3696
43662968
JK
36972013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3698
3699 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3700 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3701 installation.
3702 * gdbserver.1: Remove.
3703
3e74e146
PA
37042013-03-22 Pedro Alves <palves@redhat.com>
3705
3706 * linux-low.c (handle_extended_wait): Don't call
3707 linux_enable_event_reporting.
3708
a8347a2a
TT
37092013-03-15 Tony Theodore <tonyt@logyst.com>
3710
3711 PR build/9098:
3712 * Makefile.in (SHELL): Use @SHELL@.
3713
eeb56fa7
SDJ
37142013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3715
3716 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3717 compiler warning.
3718
4fa7e2ff
JB
37192013-03-13 Joel Brobecker <brobecker@adacore.com>
3720
3721 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3722 Remove extraneous NULL element.
3723
8ddb1965
YQ
37242013-03-13 Yao Qi <yao@codesourcery.com>
3725
3726 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3727 'V' block in trace frame.
3728
9accd112
MM
37292013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3730
3731 * target.h (struct target_ops): Add btrace ops.
3732 (target_supports_btrace): New macro.
3733 (target_enable_btrace): New macro.
3734 (target_disable_btrace): New macro.
3735 (target_read_btrace): New macro.
3736 * gdbthread.h (struct thread_info): Add btrace field.
3737 * server.c: Include btrace-common.h.
3738 (handle_btrace_general_set): New function.
3739 (handle_btrace_enable): New function.
3740 (handle_btrace_disable): New function.
3741 (handle_general_set): Call handle_btrace_general_set.
3742 (handle_qxfer_btrace): New function.
3743 (struct qxfer qxfer_packets[]): Add btrace entry.
3744 * inferiors.c (remove_thread): Disable btrace.
3745 * linux-low: Include linux-btrace.h.
3746 (linux_low_enable_btrace): New function.
3747 (linux_low_read_btrace): New function.
3748 (linux_target_ops): Add btrace ops.
3749 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3750 Add srv_linux_btrace=yes.
3751 (x86_64-*-linux*): Add linux-btrace.o.
3752 Add srv_linux_btrace=yes.
3753 * configure.ac: Define HAVE_LINUX_BTRACE.
3754 * config.in: Regenerated.
3755 * configure: Regenerated.
3756
5cc22e4c
MM
37572013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3758
3759 * server.c (handle_qxfer): Preserve error message if -3 is
3760 returned.
3761 (qxfer): Document the -3 return value.
3762
7c97f91e
MM
37632013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3764
3765 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3766 (linux_btrace_h): New variable.
3767 (linux-btrace.o): New rule.
3768
be9a119c 37692013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3770 Hafiz Abid Qadeer <abidh@codesourcery.com>
3771
3772 * tracepoint.c (trace_buffer_size): New global.
3773 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3774 (init_trace_buffer): Change to one-argument function. Allocate
3775 trace buffer memory.
3776 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3777 handle QTBuffer:size packet.
3778 (cmd_bigqtbuffer_size): New function.
3779 (initialize_tracepoint): Call init_trace_buffer with
3780 DEFAULT_TRACE_BUFFER_SIZE.
3781 * server.c (handle_query): Add QTBuffer:size in the
3782 supported packets.
3783
e64f7499
YQ
37842013-03-07 Yao Qi <yao@codesourcery.com>
3785
3786 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3787 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3788 of -1.
3789 (cmd_qtsp): Adjust condition. Do post increment.
3790 Set cur_action and cur_step_action back to 0.
3791
f0ae6fc3
PA
37922013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3793
3794 PR server/15236
3795 * linux-low.c (linux_write_memory): Return early success if LEN is
3796 zero.
3797
b5b0b0af
CV
37982013-03-05 Corinna Vinschen <vinschen@redhat.de>
3799
334ad4a8 3800 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3801
589bc927
TT
38022013-02-28 Tom Tromey <tromey@redhat.com>
3803
3804 * configure.ac: Invoke AC_SYS_LARGEFILE.
3805 * configure, config.in: Rebuild.
3806
dfe07582
CV
38072013-02-28 Corinna Vinschen <vinschen@redhat.com>
3808
3809 * win32-low.c: Throughout, fix format strings and casts of
3810 printf-like functions to avoid type related warnings on all
3811 platforms.
3812 (get_child_debug_event): Print dwDebugEventCode as hex since
3813 that's how it's usually documented.
3814
736cd585
YQ
38152013-02-28 Yao Qi <yao@codesourcery.com>
3816
3817 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3818 pulongest.
3819
e1f58301
JW
38202013-02-27 Jiong Wang <jiwang@tilera.com>
3821
3822 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3823 (reg-tilegx32.c): New rule.
3824 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3825 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3826 different register info initializer according to elf class.
3827 (init_registers_tilgx32): New function. The tilegx32 register info
3828 initializer.
3829 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3830 (tile_store_gregset): Likewise.
3831
d171ca78
YQ
38322013-02-27 Yao Qi <yao@codesourcery.com>
3833
3834 * server.c (process_point_options): Print debug message when
3835 debug_threads is true.
3836
282bbdf3
YQ
38372013-02-26 Yao Qi <yao@codesourcery.com>
3838
3839 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3840
aca22551
PA
38412013-02-19 Pedro Alves <palves@redhat.com>
3842 Kai Tietz <ktietz@redhat.com>
3843
3844 PR gdb/15161
3845
3846 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3847 instead of strtoul to extract address from packet.
3848 (process_serial_event) <'z'>: Likewise.
3849
4f3cee1c
YQ
38502013-02-18 Yao Qi <yao@codesourcery.com>
3851
3852 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3853
8e1d55a3
PA
38542013-02-14 Pedro Alves <palves@redhat.com>
3855
3856 Plug memory leak.
3857
3858 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3859 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3860
458820da
PA
38612013-02-14 Pedro Alves <palves@redhat.com>
3862
3863 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3864
baea0dae
PA
38652013-02-14 Pedro Alves <palves@redhat.com>
3866
3867 * tracepoint.c (save_string): Delete.
3868 (add_tracepoint_action): Use savestring instead of save_string.
3869
0b1afbb3
PA
38702013-02-12 Pedro Alves <palves@redhat.com>
3871
3872 * linux-xtensa-low.c: Ditto.
3873 * xtensa-xtregs.c: Ditto.
3874
8a4ac37e
PA
38752013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3876
3877 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3878 thread_db.
3879
148de6bb
MS
38802013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3881
3882 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3883 aarch64_num_wp_regs and aarch64_num_bp_regs to
3884 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3885
55fac6e0
MS
38862013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3887
3888 * linux-aarch64-low.c (ps_get_thread_area): Replace
3889 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3890
176eb98c
MS
38912013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3892 Marcus Shawcroft <marcus.shawcroft@arm.com>
3893 Nigel Stephens <nigel.stephens@arm.com>
3894 Yufeng Zhang <yufeng.zhang@arm.com>
3895
3896 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3897 (aarch64.c, aarch64-without-fpu.c): New targets.
3898 * configure.srv (aarch64*-*-linux*): New.
3899 * linux-aarch64-low.c: New file.
3900
56f7af9c
MS
39012013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3902
43aaf8b6 3903 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3904 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3905 (dequeue_one_deferred_signal, linux_resume_one_thread)
3906 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3907 (linux_tracefork_grandchild, linux_test_for_tracefork)
3908 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3909 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3910 where the argument is 0.
3911
60f662b0
YQ
39122013-01-25 Yao Qi <yao@codesourcery.com>
3913
3914 * event-loop.c: Include "queue.h".
3915 (gdb_event_p): New typedef.
3916 (struct gdb_event) <next_event>: Remove.
3917 (event_queue): Change to QUEUE(gdb_event_p).
3918 (async_queue_event): Remove.
3919 (gdb_event_xfree): New.
3920 (initialize_event_loop): New.
3921 (process_event): Use API from QUEUE.
3922 (wait_for_event): Likewise.
3923 * server.c (main): Call initialize_event_loop.
3924 * server.h (initialize_event_loop): Declare.
3925
5ae4861a
YQ
39262013-01-18 Yao Qi <yao@codesourcery.com>
3927
3928 * ax.h (struct eval_agent_expr_context): New.
3929 (gdb_eval_agent_expr): Update declaration.
3930 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3931 TFRAME. Add new argument CTX.
3932 * server.h (struct eval_agent_expr_context): Declare.
3933 (agent_mem_read, agent_tsv_read): Update declaration.
3934 (agent_mem_read_string): Likewise.
3935 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3936 (add_traceframe_block): Add new argument TPOINT.
3937 Increase TPOINT->traceframe_usage.
3938 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3939 eval_tracepoint_agent_expr.
3940 (condition_true_at_tracepoint): Likewise.
3941 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3942 (agent_mem_read_string, agent_tsv_read): Likewise.
3943
85e00e85
YQ
39442013-01-16 Yao Qi <yao@codesourcery.com>
3945
3946 * linux-low.c (linux_resume_one_lwp): Don't check
3947 'lwp->bp_reinsert != 0'.
3948
4039cf45
JB
39492013-01-07 Joel Brobecker <brobecker@adacore.com>
3950 Pedro Alves <palves@redhat.com>
3951
3952 * lynx-low.c (ptrace_request_to_str): Define a temporary
3953 macro and use it to simplify this function's implementation.
3954
9044dee2
JB
39552013-01-07 Joel Brobecker <brobecker@adacore.com>
3956
3957 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3958 sets errno.
3959
e6352c8f
JB
39602013-01-07 Joel Brobecker <brobecker@adacore.com>
3961
3962 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3963
50681a27
JB
39642013-01-07 Joel Brobecker <brobecker@adacore.com>
3965
3966 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3967
3f6e77ef
JB
39682013-01-07 Joel Brobecker <brobecker@adacore.com>
3969
3970 * lynx-low.c (lynx_resume): Use the resume_info parameter
3971 to determine the ptid for the lynx_ptrace call, unless
3972 it is equal to minus_one_ptid, in which case we use the
3973 ptid of the current_inferior.
3974 (lynx_wait_1): After having received a thread create/exit
3975 event, resume the inferior's execution using the signaling
3976 thread's ptid, rather than the old ptid.
3977
7fda33ae
JB
39782013-01-07 Joel Brobecker <brobecker@adacore.com>
3979
3980 * lynx-low.c (lynx_resume): Delete variable ret.
3981
b9786c74
JB
39822013-01-01 Joel Brobecker <brobecker@adacore.com>
3983
3984 * gdbreplay.c (gdbreplay_version): Update copyright year.
3985 * server.c (gdbserver_version): Likewise.
3986
8b93d60f
JB
39872012-12-17 Joel Brobecker <brobecker@adacore.com>
3988
3989 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3990 new thread.
3991
037335a7
JB
39922012-12-17 Joel Brobecker <brobecker@adacore.com>
3993
3994 * lynx-low.c (ptrace_request_to_str): Add handling for
3995 PTRACE_GETTRACESIG.
3996
52d4cbd8
JB
39972012-12-17 Joel Brobecker <brobecker@adacore.com>
3998
3999 * lynx-low.c (lynx_attach): Delete variable new_process.
4000
ab8f6ca9
JB
40012012-12-17 Joel Brobecker <brobecker@adacore.com>
4002
4003 * lynx-low.c (lynx_create_inferior): Delete variable
4004 new_process.
4005
78cbc024
JB
40062012-12-17 Joel Brobecker <brobecker@adacore.com>
4007
4008 * lynx-low.c (ptrace_request_to_str): Do not handle
4009 PTRACE_GETTHREADLIST if this macro does not exist.
4010
14a00470
YQ
40112012-12-15 Yao Qi <yao@codesourcery.com>
4012
4013 * Makefile.in (OBS): Add notif.o.
4014 * notif.c, notif.h: New.
4015 * server.c: Include "notif.h".
4016 (struct vstop_notif) <next>: Remove.
4017 <base>: New field.
4018 (queue_stop_reply): Update.
4019 (push_event, send_next_stop_reply): Remove.
4020 (discard_queued_stop_replies): Update.
4021 (notif_stop): New variable.
4022 (handle_v_stopped): Remove.
4023 (handle_v_requests): Don't call handle_v_stopped. Call
4024 handle_ack_notif instead.
4025 (queue_stop_reply_callback): Call notif_event_enque instead
4026 of queue_stop_reply.
4027 (handle_status): Don't call send_next_stop_reply, call
4028 notif_write_event instead.
4029 (kill_inferior_callback): Likewise.
4030 (detach_or_kill_inferior_callback): Likewise.
4031 (main): Call initialize_notif.
4032 (process_serial_event): Call QUEUE_is_empty.
4033 (handle_target_event): Call notif_push instead of push event.
4034 * server.h (push_event): Remove declaration.
4035
61c125b9
TT
40362012-12-10 Tom Tromey <tromey@redhat.com>
4037
4038 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4039 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4040 macros.
4041 (.c.o): Rewrite.
4042 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4043 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4044 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4045 (amd64-linux-ipa.o, ax.o): Rewrite.
4046 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4047 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4048 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4049 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4050 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4051 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4052 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4053 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4054 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4055 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4056 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4057 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4058 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4059 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4060 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4061 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4062 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4063 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4064 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4065 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4066 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4067 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4068 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4069 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4070 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4071 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4072 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4073 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4074 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4075 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4076 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4077 (reg-tilegx.o): Remove.
4078 (all_object_files): New macro.
4079 Include .deps files.
4080 * aclocal.m4, configure: Rebuild.
4081 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4082 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4083 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4084
e90e9ad9
TT
40852012-12-05 Tom Tromey <tromey@redhat.com>
4086
4087 PR gdb/14917:
4088 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4089
02d403bf 40902012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4091
4092 * configure.ac: Check for linux/perf_event.h.
4093 * config.in: Regenerated.
4094 * configure: Regenerated.
4095
0270a750
PA
40962012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4097
4098 * hostio.c (handle_readlink): Decrease buffer size
4099 parameter passed to readlink by one byte.
4100
8c29b58e
YQ
41012012-11-26 Yao Qi <yao@codesourcery.com>
4102
4103 * configure.ac (build_warnings): Append '-Wempty-body'.
4104 * configure: Regenerated.
4105 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4106 body.
4107
8bdce1ff
PM
41082012-11-15 Pierre Muller <muller@sourceware.org>
4109
4110 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4111 * config.in: Regenerate.
4112 * configure: Regenerate.
4113 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4114 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4115 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4116 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4117 header.
4118 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4119 instead of <sys/wait.h> header.
4120 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4121
02d403bf 41222012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4123
4124 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4125 (various make rules): Remove -DGDBSERVER
4126
fbd5db48
YQ
41272012-11-09 Yao Qi <yao@codesourcery.com>
4128
4129 * spu-low.c (current_ptid): Move it to ..
4130 * gdbthread.h: ... here. New.
4131 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4132 * server.c (myresume, process_serial_event): Likewise.
4133 * thread-db.c (thread_db_find_new_threads): Likewise.
4134 * tracepoint.c (run_inferior_command): Likewise.
4135
b3dc46ff
AB
41362012-10-01 Andrew Burgess <aburgess@broadcom.com>
4137
4138 * server.c (handle_search_memory_1): Include access length in
4139 warning message.
4140
07c04788
HPN
41412012-09-05 Michael Brandt <michael.brandt@axis.com>
4142
4143 * linux-crisv32-low.c: Fix compile errors.
4144
918d227b
YQ
41452012-09-04 Yao Qi <yao@codesourcery.com>
4146
4147 * tracepoint.c (cmd_qtsv): Adjust debug message.
4148 Don't check CUR_TPOINT.
4149
18c1b81a
YQ
41502012-08-28 Yao Qi <yao@codesourcery.com>
4151
4152 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4153 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4154 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4155 Remove declarations of xmalloc, xreallloc, xstrdup and
4156 freeargv.
4157 * Makefile.in (libiberty_h): New.
4158 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4159 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4160
dc82f37b
YQ
41612012-08-23 Yao Qi <yao@codesourcery.com>
4162
4163 * server.h: Remove declaration of 'xsnprintf'.
4164
406b1477
KS
41652012-08-22 Keith Seitz <keiths@redhat.com>
4166
4167 * server.h: Include build-gnulib-gbserver/config.h.
4168 * gdbreplay.c: Likewise.
4169
e6712ff1
DE
41702012-08-08 Doug Evans <dje@google.com>
4171
4172 * Makefile.in (SFILES): Add gdb_vecs.c.
4173 (OBS): Add gdb_vecs.o.
4174 (gdb_vecs_h, host_defs_h): New variables.
4175 (thread-db.o): Add $(gdb_vecs_h) dependency.
4176 (gdb_vecs.o): New rule.
4177 * thread-db.c: #include "gdb_vecs.h".
4178 (thread_db_load_search): Use a vector to iterate over path elements.
4179 Handle text appearing after "$pdir".
4180
4181 * configure.ac: Add check for strstr.
4182 * config.in: Regenerate.
4183 * configure: Regenerate.
4184
7c3270ae
UW
41852012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4186
4187 * hostio.c (handle_pread): If pread fails, fall back to attempting
4188 lseek/read.
4189 (handle_pwrite): Likewise for pwrite.
4190
b62e2b27
UW
41912012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4192
4193 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4194 between unsupported TYPE and unimplementable ADDR/LEN combination.
4195 (arm_insert_point): Act on new return value.
4196
78a99e91
PA
41972012-07-31 Pedro Alves <palves@redhat.com>
4198
4199 * server.c (process_point_options): Only skip tokens if we find
4200 one that is unrecognized. Don't treat 'X' specially while
4201 skipping unrecognized tokens.
4202
fcf303ab
UW
42032012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4204
4205 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4206 to 4-byte-align HW breakpoint addresses for Thumb.
4207
7255706c
YQ
42082012-07-27 Yao Qi <yao@codesourcery.com>
4209
4210 PR remote/14161.
4211
4212 * server.h: Declare gdb_agent_about_to_close.
4213 * target.c (kill_inferior): Include "agent.h".
4214 New. Send command 'kill'.
4215 * target.h (kill_inferior): Removed macro.
4216 * tracepoint.c (gdb_agent_about_to_close): New.
4217 (gdb_agent_helper_thread): Handle command 'close'.
4218 Wait endlessly until the inferior stops.
4219 Install gdb_agent_remove_socket to atexit hook.
4220 (agent_socket_name): New static variable.
4221 (gdb_agent_socket_init): Replace local variable 'name' with
4222 'agent_socket_name'.
4223 (gdb_agent_remove_socket): New.
4224
5a3f286f
YQ
42252012-07-27 Yao Qi <yao@codesourcery.com>
4226
4227 * server.c (process_point_options): Stop at 'X' when parsing.
4228
961bd387
ME
42292012-07-19 Michael Eager <eager@eagercon.com>
4230
a261b8f5 4231 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4232 to hw_execute.
4233 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4234 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4235 hardware breakpoint.
4236
aa7c7447
JK
42372012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4238
4239 * gdbserver/linux-low.c (initialize_low): Call
4240 linux_ptrace_init_warnings.
4241
7f216e7c
DE
42422012-07-02 Doug Evans <dje@google.com>
4243
4244 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4245 pointer to int.
4246
d3ce09f5
SS
42472012-07-02 Stan Shebs <stan@codesourcery.com>
4248
4249 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4250 (ax.o): Add it to build rule.
4251 (ax-ipa.o): Ditto.
4252 (OBS): Add format.o.
4253 (IPA_OBS): Add format.o.
4254 * server.c (handle_query): Claim support for breakpoint commands.
4255 (process_point_options): Add command case.
4256 (process_serial_event): Leave running if there are printfs in
4257 effect.
4258 * mem-break.h (any_persistent_commands): Declare.
4259 (add_breakpoint_commands): Declare.
4260 (gdb_no_commands_at_breakpoint): Declare.
4261 (run_breakpoint_commands): Declare.
4262 * mem-break.c (struct point_command_list): New struct.
4263 (struct breakpoint): New field command_list.
4264 (any_persistent_commands): New function.
4265 (add_commands_to_breakpoint): New function.
4266 (add_breakpoint_commands): New function.
4267 (gdb_no_commands_at_breakpoint): New function.
4268 (run_breakpoint_commands): New function.
4269 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4270 locally.
4271 * ax.c: Include format.h.
4272 (ax_printf): New function.
4273 (gdb_eval_agent_expr): Add printf opcode.
4274
2f8f6aed
YQ
42752012-06-13 Yao Qi <yao@codesourcery.com>
4276
4277 * server.c (start_inferior): Remove duplicated writes to fields
4278 'last_resume_kind' and 'last_status' of 'current_inferior'.
4279
0c9070b3
YQ
42802012-06-12 Yao Qi <yao@codesourcery.com>
4281 Pedro Alves <palves@redhat.com>
4282
4283 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4284 comment.
4285 * server.c (handle_v_cont): Extend comment.
4286
c52daf70
YQ
42872012-06-11 Yao Qi <yao@codesourcery.com>
4288
4289 * linux-low.c (linux_attach): Add 'static'.
4290
d38bbb0a
YQ
42912012-06-06 Yao Qi <yao@codesourcery.com>
4292
4293 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4294
89dc0afd
JK
42952012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4296
4297 Fix gcc -flto compilation warning.
4298 * server.c (main): Make variable multi_mode and attach volatile.
4299
75f62ce7
TJB
43002012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4301
4302 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4303 if the platform doesn't know about it.
4304
65f479b6
PA
43052012-05-30 Jeff Kenton <jkenton@tilera.com>
4306
4307 * Makefile.in (SFILES): Add linux-tile-low.c.
4308 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4309 * configure.srv: Handle tilegx-*-linux*.
4310 * linux-tile-low.c: New file.
4311
0c5bf5a9
JK
43122012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4313
4314 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4315
a493e3e2
PA
43162012-05-24 Pedro Alves <palves@redhat.com>
4317
4318 PR gdb/7205
4319
43aaf8b6 4320 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4321
2ea28649
PA
43222012-05-24 Pedro Alves <palves@redhat.com>
4323
4324 PR gdb/7205
4325
4326 Replace target_signal with gdb_signal throughout.
4327
8d409d16
MR
43282012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4329
4330 * linux-low.c (linux_store_registers): Avoid the copying sequence
4331 when no data has been retrieved by ptrace.
4332
23512c01
MGD
43332012-05-22 Will Deacon <will.deacon@arm.com>
4334
4335 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4336 Include asm/ptrace.h.
4337 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4338 already defined.
4339
4934b29e
MR
43402012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4341
4342 * linux-low.c (linux_store_registers): Don't re-retrieve data
4343 with ptrace that has already been obtained from /proc. Always
4344 copy any data retrieved with ptrace to the buffer supplied.
4345
bde24c0a
PA
43462012-05-11 Yao Qi <yao@codesourcery.com>
4347 Pedro Alves <palves@redhat.com>
4348
4349 * linux-low.c (enum stopping_threads_kind): New.
4350 (stopping_threads): Change type to `enum stopping_threads_kind'.
4351 (handle_extended_wait): If stopping and suspending threads, leave
4352 the new_lwp suspended too.
4353 (linux_wait_for_event): Adjust.
4354 (stop_all_lwps): Set `stopping_threads' to
4355 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4356 whether we're suspending threads or just stopping them. Assert no
4357 recursion happens.
4358
623b6bdf
YQ
43592012-04-29 Yao Qi <yao@codesourcery.com>
4360
4361 * server.h: Move some code to ...
4362 * gdbthread.h: ... here. New.
4363 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4364 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4365 (nto-low.o, win32-low.o): Likewise.
4366 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4367 * regcache.c, remote-utils.c, server.c: Likewise.
4368 * target.c, tracepoint.c, win32-low.c: Likewise.
4369
f15f9948
TJB
43702012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4371
4372 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4373 (PTRACE_ARG4_TYPE): Likewise.
4374 (PTRACE_XFER_TYPE): Likewise.
4375 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4376 ptrace to PTRACE_ARG3_TYPE.
4377 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4378 (PTRACE_ARG4_TYPE): Likewise.
4379 (PTRACE_XFER_TYPE): Likewise.
4380 (linux_detach_one_lwp): Cast fourth argument of
4381 ptrace to long then PTRACE_ARG4_TYPE.
4382 (regsets_fetch_inferior_registers): Cast third argument of
4383 ptrace to long then PTRACE_ARG3_TYPE.
4384 (regsets_store_inferior_registers): Likewise.
4385
38ea300a
PA
43862012-04-20 Pedro Alves <palves@redhat.com>
4387
4388 * configure: Regenerate.
4389
c971b7fa
PA
43902012-04-19 Pedro Alves <palves@redhat.com>
4391
43aaf8b6 4392 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4393 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4394 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4395 (all, install-only, uninstall, clean-info, all-lib, clean): No
4396 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4397 (maintainer-clean realclean distclean): Use subdir_do.
4398 (subdir_do): New.
4399 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4400 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4401 * acinclude.m4: Include acx_configure_dir.m4.
4402 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4403 calls. Call AC_PROG_RANLIB. Configure gnulib using
4404 ACX_CONFIGURE_DIR.
4405 (GNULIB): New.
4406 (GNULIB_STDINT_H): Adjust.
4407 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4408 * gdbreplay.c: Include build-gnulib/config.h.
4409 * server.h: Likewise.
4410 * aclocal.m4: Regenerate.
4411 * config.in: Regenerate.
4412 * configure: Regenerate.
c971b7fa 4413
809277f8
PA
44142012-04-19 Pedro Alves <palves@redhat.com>
4415
4416 * Makefile.in (LIBGNU, INCGNU): Adjust.
4417 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4418 (all, install-only, uninstall, clean-info, all-lib, clean)
4419 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4420 * configure.ac: Adjust AC_OUTPUT output.
4421 * aclocal.m4: Regenerate.
4422 * configure: Regenerate.
4423
fd9bb8b8
PA
44242012-04-19 Pedro Alves <palves@redhat.com>
4425
4426 * Makefile.in (generated_files): New.
4427 (server_h): Remove the explicit dependency on config.h, and depend
4428 on $generated_files.
4429
1c298c66
PA
44302012-04-19 Pedro Alves <palves@redhat.com>
4431
4432 * Makefile.in (INCGNU): Add -Ignulib.
4433
57c4b50b
PA
44342012-04-19 Pedro Alves <palves@redhat.com>
4435
4436 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4437 (INCGNU): ... this, and spell out -I here.
4438 (GNULIB_LIB): Rename to ...
4439 (LIBGNU): ... this.
4440 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4441
1030e047
PA
44422012-04-19 Pedro Alves <palves@redhat.com>
4443
4444 * config.in: Regenerate.
4445
447d4319
PA
44462012-04-19 Pedro Alves <palves@redhat.com>
4447
4448 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4449 * server.h (memmem): Remove declaration.
4450 * config.in: Regenerate.
4451 * configure: Regenerate.
4452
aad9eab9
YQ
44532012-04-19 Yao Qi <yao@codesourcery.com>
4454
4455 * Makefile.in (SFILES): Add common/vec.c.
4456 (OBS): Add vec.o.
4457 (vec.o): New rule.
4458
3e10640f
YQ
44592012-04-19 Yao Qi <yao@codesourcery.com>
4460
4461 * remote-utils.c (prepare_resume_reply): Replace with macro
4462 target_core_of_thread.
4463 * server.c (handle_qxfer_threads_proper): Likewise.
4464 * target.h (traget_core_of_thread): New macro.
4465
71622373
PA
44662012-04-18 Pedro Alves <palves@redhat.com>
4467
4468 * aclocal.m4: Regenerate.
4469 * configure: Regenerate.
4470
80d26939
YQ
44712012-04-16 Yao Qi <yao@codesourcery.com>
4472
4473 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4474 duplicated on address.
4475
42476b70
YQ
44762012-04-16 Yao Qi <yao@codesourcery.com>
4477
4478 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4479 (struct tracepoint_action_ops) <send>: New field.
4480 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4481 (agent_expr_send, x_tracepoint_action_send): New.
4482 (l_tracepoint_action_send): New.
4483 (cmd_qtdp): Download and install tracepoint
4484 according to `use_agent'.
4485 (run_inferior_command): Add one more parameter `len'.
4486 Update callers.
4487 (tracepoint_send_agent): New.
4488 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4489
7bc83639
YQ
44902012-04-16 Yao Qi <yao@codesourcery.com>
4491
4492 * tracepoint.c (download_tracepoints): Moved to ...
4493 (cmd_qtstart): ... here.
4494
5f18041e
YQ
44952012-04-14 Yao Qi <yao@codesourcery.com>
4496
4497 * tracepoint.c: Include inttypes.h.
4498 (struct collect_memory_action): Use sized types.
4499 (struct tracepoint): Likewise.
4500 (cmd_qtdp, stop_tracing): Update print specifiers.
4501 (cmd_qtp, response_tracepoint): Likewise.
4502 (collect_data_at_tracepoint): Likewise.
4503 (collect_data_at_step): Likewise.
4504
55a8c076
YQ
45052012-04-14 Yao Qi <yao@codesourcery.com>
4506
4507 Import gnulib module inttypes.
4508 * aclocal.m4, config.in, configure: Regenerated.
4509
dc750257
YQ
45102012-04-14 Yao Qi <yao@codesourcery.com>
4511
4512 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4513 Makefile and config.status at last.
4514
0ab5faf9
YQ
45152012-04-13 Yao Qi <yao@codesourcery.com>
4516
4517 * tracepoint.c: Include stdint.h unconditionally.
4518
18f5fd81
TJB
45192012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4520
4521 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4522 on BFD_HAVE_SYS_PROCFS_TYPE.
4523 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4524 * configure: Regenerate.
4525 * config.in: Likewise.
4526
4d47af5c
L
45272012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4528
4529 * Makefile.in (clean): Also remove x32.c x32-linux.c
4530 x32-avx.c x32-avx-linux.c.
4531 (x32.o): New target.
4532 (x32.c): Likewise.
4533 (x32-linux.o): Likewise.
4534 (x32-linux.c): Likewise.
4535 (x32-avx.o): Likewise.
4536 (x32-avx.c): Likewise.
4537 (x32-avx-linux.o): Likewise.
4538 (x32-avx-linux.c): Likewise.
4539
4540 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4541 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4542 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4543 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4544 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4545 i386/x32-avx-linux.xml.
4546
4547 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4548 (init_registers_x32_avx_linux): Likwise.
4549 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4550 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4551
ecedbe58
PA
45522012-04-13 Pedro Alves <palves@redhat.com>
4553
4554 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4555 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4556 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4557 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4558 the sub-make.
4559
c92b5177
L
45602012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4561
4562 * linux-x86-low.c (compat_x32_clock_t): New.
4563 (compat_x32_siginfo_t): Likewise.
4564 (compat_x32_siginfo_from_siginfo): Likewise.
4565 (siginfo_from_compat_x32_siginfo): Likewise.
4566 (linux_is_elf64): Likewise.
4567 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4568 and siginfo_from_compat_x32_siginfo for x32.
4569 (x86_arch_setup): Set linux_is_elf64.
4570
214d508e
L
45712012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4572
4573 PR gdb/13969
4574 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4575 e_machine field.
4576 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4577 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4578 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4579 compatible with process.
4580
c9a1864a
YQ
45812012-04-12 Yao Qi <yao@codesourcery.com>
4582
4583 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4584 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4585 (install-only, install-info, clean): Handle sub dir gnulib.
4586 (all-lib, am--refresh): New targets.
4587 (memmem.o): Remove target.
4588 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4589 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4590 (AC_REPLACE_FUNCS): Remove memmem.
4591 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4592 (AC_OUTPUT): Generate Makefile in gnulib/.
4593 * aclocal.m4, config.in, configure: Regenerated.
4594
367ba2c2
MR
45952012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4596
4597 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4598
9d236627
PA
45992012-04-05 Pedro Alves <palves@redhat.com>
4600
4601 -Werror=strict-aliasing
4602
4603 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4604 pointer.
4605
111217b3
PA
46062012-04-04 Pedro Alves <palves@redhat.com>
4607
4608 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4609 (sparc_store_gregset_from_stack, sparc_store_gregset)
4610 (sparc_breakpoint_at): Fix formatting.
4611
8365dcf5
TJB
46122012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4613
4614 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4615 are available.
4616 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4617 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4618 * config.in: Regenerate.
4619 * configure: Likewise.
4620
689cc2ae
PA
46212012-03-29 Pedro Alves <palves@redhat.com>
4622
4623 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4624 Correct ptrace arguments.
4625
c14dfd32
PA
46262012-03-28 Pedro Alves <palves@redhat.com>
4627
4628 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4629 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4630 (IA64_FR1_REGNUM): New defines.
4631 (ia64_fetch_register): New.
4632 (the_low_target): Install it.
4633 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4634 field.
4635 * linux-low.c (linux_fetch_registers): Try the
4636 the_low_target.fetch_register hook first.
4637
4638 * linux-arm-low.c (the_low_target): Adjust.
4639 * linux-bfin-low.c (the_low_target): Adjust.
4640 * linux-cris-low.c (the_low_target): Adjust.
4641 * linux-crisv32-low.c (the_low_target): Adjust.
4642 * linux-m32r-low.c (the_low_target): Adjust.
4643 * linux-m68k-low.c (the_low_target): Adjust.
4644 * linux-mips-low.c (the_low_target): Adjust.
4645 * linux-ppc-low.c (the_low_target): Adjust.
4646 * linux-s390-low.c (the_low_target): Adjust.
4647 * linux-sh-low.c (the_low_target): Adjust.
4648 * linux-sparc-low.c (the_low_target): Adjust.
4649 * linux-tic6x-low.c (the_low_target): Adjust.
4650 * linux-x86-low.c (the_low_target): Adjust.
4651 * linux-xtensa-low.c (the_low_target): Adjust.
4652
63c88e13
PA
46532012-03-26 Pedro Alves <palves@redhat.com>
4654
4655 * server.c (handle_qxfer_libraries): Don't bail early if
4656 the_target->qxfer_libraries_svr4 is not NULL.
4657
fb723180
PA
46582012-03-26 Pedro Alves <palves@redhat.com>
4659
4660 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4661
0afae3cf
PA
46622012-03-23 Pedro Alves <palves@redhat.com>
4663
4664 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4665 "library-list-svr4" element's start tag when the the DSO list is
4666 empty.
4667
485f1ee4
PA
46682012-03-23 Pedro Alves <palves@redhat.com>
4669
4670 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4671 a variable whose type size is the same as the inferior's pointer
4672 size.
4673
a5362b9a
TS
46742012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4675
4676 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4677 struct siginfo.
4678 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4679 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4680 * linux-low.h: Include <signal.h>.
4681 (struct siginfo): Remove forward declaration.
4682 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4683 struct siginfo.
4684
d226c142
MF
46852012-03-21 Mike Frysinger <vapier@gentoo.org>
4686
4687 * .gitignore: Ignore more files.
4688
122f36ef
PA
46892012-03-19 Pedro Alves <palves@redhat.com>
4690 Jan Kratochvil <jan.kratochvil@redhat.com>
4691
4692 * server.c (cont_thread, general_thread): Add describing comments.
4693 (start_inferior): Clear `cont_thread'.
4694 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4695 of a process.
4696
fc3e5175
YQ
46972012-03-15 Yao Qi <yao@codesourcery.com>
4698
4699 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4700 handling to ...
4701 (cmd_qtdp): ... here.
4702
8d0d92cd
YQ
47032012-03-15 Yao Qi <yao@codesourcery.com>
4704
4705 * tracepoint.c (struct tracepoint_action_ops): New.
4706 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4707 (m_tracepoint_action_download): New.
4708 (r_tracepoint_action_download): New.
4709 (x_tracepoint_action_download): New.
4710 (l_tracepoint_action_download): New.
4711 (add_tracepoint_action): Install `action->ops' according type.
4712 (download_tracepoint_1): Move code `download' function pointer
4713 of various tracepoint_action_ops.
4714
87b0bb13
JK
47152012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4716
4717 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4718 linux_ptrace_attach_warnings.
4719
5f572dec
JK
47202012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4721
4722 * Makefile.in (linux-ptrace.o): New.
4723 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4724 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4725 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4726 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4727 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4728 of these targets.
4729 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4730
f4647387
YQ
47312012-03-08 Yao Qi <yao@codesourcery.com>
4732 Pedro Alves <palves@redhat.com>
4733
4734 Fix PR server/13392.
4735 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4736 offset of JMP insn.
4737 * tracepoint.c (remove_tracepoint): New.
4738 (cmd_qtdp): Call remove_tracepoint when failed to install.
4739
9b224c5e
PA
47402012-03-07 Pedro Alves <palves@redhat.com>
4741
4742 * linux-low.c (get_detach_signal): New.
4743 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4744 Pass on pending signals to PTRACE_DETACH. Check the result of the
4745 ptrace call.
4746 * server.c (program_signals, program_signals_p): New.
4747 (handle_general_set): Handle QProgramSignals.
4748 * server.h (program_signals, program_signals_p): Declare.
4749
e237a7e2
JK
47502012-03-05 Pedro Alves <palves@redhat.com>
4751 Jan Kratochvil <jan.kratochvil@redhat.com>
4752
4753 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4754 New comment why.
4755
5808517f
YQ
47562012-03-03 Yao Qi <yao@codesourcery.com>
4757
4758 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4759 agent_look_up_symbols.
4760
58b4daa5
YQ
47612012-03-03 Yao Qi <yao@codesourcery.com>
4762
4763 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4764 (linux-x86-low.o): Likewise.
4765 * server.h: Remove in_process_agent_loaded.
4766 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4767 common/agent.c.
4768 Update callers.
4769
8ffcbaaf
YQ
47702012-03-03 Yao Qi <yao@codesourcery.com>
4771
4772 * tracepoint.c (gdb_agent_capability): New global.
4773 (in_process_agent_loaded_ust): Renamed to
4774 `in_process_agent_supports_ust'.
4775 Update callers.
4776 (in_process_agent_supports_ust): Call agent_capability_check.
4777 (clear_installed_tracepoints): Assert that agent supports
4778 agent.
4779
d1feda86
YQ
47802012-03-03 Yao Qi <yao@codesourcery.com>
4781
4782 * linux-low.c (linux_supports_agent): New.
4783 (linux_target_ops): Initialize field `supports_agent' with
4784 linux_supports_agent.
4785 * target.h (struct target_ops) <supports_agent>: New.
4786 (target_supports_agent): New macro.
4787 * server.c (handle_general_set): Handle packet 'QAgent'.
4788 (handle_query): Send `QAgent+'.
4789 * Makefile.in (server.o): Depends on agent.h.
4790
2fa291ac
YQ
47912012-03-03 Yao Qi <yao@codesourcery.com>
4792
4793 * Makefile.in (OBS): Add agent.o.
4794 Add new rule for agent.o.
4795 Track dependence of tracepoint.c on agent.h.
4796 * tracepoint.c (run_inferior_command_1):
4797 (run_inferior_command): Call agent_run_command.
4798 (gdb_ust_connect_sync_socket): Deleted. Move it to
4799 common/agent.c.
4800 (resume_thread, stop_thread): Likewise.
4801 (gdb_ust_socket_init): Renamed to ...
4802 (gdb_agent_socket_init): ... New.
4803 (gdb_ust_thread): Renamed to ...
4804 (gdb_agent_helper_thread): ... New.
4805 (gdb_ust_init): Move some code to ...
4806 (gdb_agent_init): ... here. New.
4807 [HAVE_UST]: Call gdb_ust_init.
4808 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4809 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4810 * config.in, configure: Regenerated.
4811
05044653
PA
48122012-03-02 Pedro Alves <palves@redhat.com>
4813
4814 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4815 * linux-low.c (struct simple_pid_list): New.
4816 (stopped_pids): New a struct simple_pid_list pointer.
4817 (add_to_pid_list, pull_pid_from_list): New.
4818 (handle_extended_wait): Don't assume the first signal new children
4819 report is SIGSTOP. Adjust call to pull_pid_from_list.
4820 (linux_wait_for_lwp): Adjust.
4821
8d00225b
YQ
48222012-03-02 Yao Qi <yao@codesourcery.com>
4823
4824 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4825 debug log.
4826
19560ba5
YQ
48272012-03-02 Yao Qi <yao@codesourcery.com>
4828
4829 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4830 `stop_pc' and `tpoint'. Update caller.
4831
1faeff08
MR
48322012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4833
4834 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4835 * linux-low.c (use_linux_regsets): New macro.
4836 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4837 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4838 (linux_register_in_regsets): New function.
4839 (usr_fetch_inferior_registers): Skip registers covered by
4840 regsets.
4841 (usr_store_inferior_registers): Likewise.
4842 (usr_fetch_inferior_registers): New macro.
4843 (usr_store_inferior_registers): Likewise.
4844 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4845 (linux_store_registers): Likewise.
4846 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4847 prototype.
4848 (init_registers_mips64_dsp_linux): Likewise.
4849 (init_registers_mips_linux): New macro.
4850 (init_registers_mips_dsp_linux): Likewise.
4851 (mips_dsp_num_regs): Likewise.
4852 (DSP_BASE, DSP_CONTROL): New fallback macros.
4853 (mips_base_regs): New macro.
4854 (mips_regmap): Use it. Fix the size.
4855 (mips_dsp_regmap): New variable.
4856 (mips_dsp_regset_bitmap): Likewise.
4857 (mips_arch_setup): New function.
4858 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4859 than mips_regmap.
4860 (mips_cannot_store_register): Likewise.
4861 (the_low_target): Update .arch_setup, .num_regs and .regmap
4862 initializers. Add .regset_bitmap initializer.
4863 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4864 initializer.
4865 * linux-bfin-low.c (the_low_target): Likewise.
4866 * linux-cris-low.c (the_low_target): Likewise.
4867 * linux-crisv32-low.c (the_low_target): Likewise.
4868 * linux-ia64-low.c (the_low_target): Likewise.
4869 * linux-m32r-low.c (the_low_target): Likewise.
4870 * linux-m68k-low.c (the_low_target): Likewise.
4871 * linux-ppc-low.c (the_low_target): Likewise.
4872 * linux-s390-low.c (the_low_target): Likewise.
4873 * linux-sh-low.c (the_low_target): Likewise.
4874 * linux-sparc-low.c (the_low_target): Likewise.
4875 * linux-tic6x-low.c (the_low_target): Likewise.
4876 * linux-x86-low.c (the_low_target): Likewise.
4877 * linux-xtensa-low.c (the_low_target): Likewise.
4878 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4879 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4880 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4881 srv_xmlfiles.
4882 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4883 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4884
c03e6ccc
YQ
48852012-02-29 Yao Qi <yao@codesourcery.com>
4886 Pedro Alves <palves@redhat.com>
4887
4888 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4889 `step_over_finished' is true.
4890
644cebc9
PA
48912012-02-27 Pedro Alves <palves@redhat.com>
4892
4893 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4894 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4895
c14d7ab2
PA
48962012-02-27 Pedro Alves <palves@redhat.com>
4897
4898 PR server/9684
4899 * linux-low.c (pid_is_stopped): New.
4900 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4901
412c89dd
LM
49022012-02-25 Luis Machado <lgustavo@codesourcery.com>
4903
4904 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4905 of conditions.
4906
b745defe
MR
49072012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4908
4909 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4910
9f3a5c85
LM
49112012-02-24 Luis Machado <lgustavo@codesourcery>
4912
4913 * server.c (handle_query): Advertise support for target-side
4914 breakpoint condition evaluation.
4915 (process_point_options): New function.
4916 (process_serial_event): When inserting a breakpoint, check for
4917 a target-side condition that should be evaluated.
4918
4919 * mem-break.c: Include regcache.h and ax.h.
4920 (point_cond_list_t): New data structure.
4921 (breakpoint) <cond_list>: New field.
4922 (find_gdb_breakpoint_at): Make non-static.
4923 (delete_gdb_breakpoint_at): Clear any target-side
4924 conditions.
4925 (clear_gdb_breakpoint_conditions): New function.
4926 (add_condition_to_breakpoint): Likewise.
4927 (add_breakpoint_condition): Likewise.
4928 (gdb_condition_true_at_breakpoint): Likewise.
4929 (gdb_breakpoint_here): Return result directly instead
4930 of going through a local variable.
4931
4932 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4933 (clear_gdb_breakpoint_conditions): Likewise.
4934 (add_breakpoint_condition): Likewise.
4935 (gdb_condition_true_at_breakpoint): Likewise.
4936
4937 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4938 (need_step_over_p): Take target-side breakpoint condition into
4939 consideration.
4940
5e1dc496
LM
49412012-02-24 Luis Machado <lgustavo@codesourcery>
4942
4943 * server.h: Include tracepoint.h.
4944 (agent_mem_read, agent_get_trace_state_variable_value,
4945 agent_set_trace_state_variable_value,
4946 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4947 get_set_tsv_func_addr): New prototypes.
4948
4949 * ax.h: New include file.
4950 * ax.c: New source file.
4951
4952 * tracepoint.c: Include ax.h.
4953 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4954 agent_expr, eval_result_type): Move to ax.h.
4955 (parse_agent_expr): Rename to ...
4956 (gdb_parse_agent_expr): ... this, make it non-static and move
4957 to ax.h.
4958 (unparse_agent_expr) Rename to ...
4959 (gdb_unparse_agent_expr): ... this, make it non-static and move
4960 to ax.h.
4961 (eval_agent_expr): Rename to ...
4962 (eval_tracepoint_agent_expr): ... this.
4963 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4964 forward declarations.
4965 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4966 (agent_get_trace_state_variable_value): New function.
4967 (agent_set_trace_state_variable_value): New function.
4968 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4969 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4970 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4971 (condition_true_at_tracepoint): Likewise.
4972 (parse_agent_expr): Rename to ...
4973 (gdb_parse_agent_expr): ... this and move to ax.c.
4974 (unparse_agent_expr): Rename to ...
4975 (gdb_unparse_agent_expr): ... this and move to ax.c.
4976 (gdb_agent_op_name): Move to ax.c.
4977 (eval_agent_expr): Rename to ...
4978 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4979 and move to ax.c.
4980 (eval_tracepoint_agent_expr): New function.
4981 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4982 non-static.
5e1dc496
LM
4983 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4984 ax.c.
4985 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4986 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4987 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4988 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4989 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4990 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4991 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4992 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4993 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4994 (compile_bytecodes): Remove forward declaration.
4995 (is_goto_target): Move to ax.c.
4996 (compile_bytecodes): Move to ax.c and call
4997 agent_get_trace_state_variable_value (...) and
4998 agent_set_trace_state_variable_value (...).
4999
5000 * Makefile.in: Update ax.c and IPA dependencies.
5001
277e4e52
PA
50022012-02-24 Pedro Alves <palves@redhat.com>
5003
5004 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5005 (cmd_bigqtbuffer_circular): ... this. Only handle
5006 'QTBuffer:circular:'.
5007 (handle_tracepoint_general_set): Adjust.
5008
bf4c19f7
YQ
50092012-02-16 Yao Qi <yao@codesourcery.com>
5010
5011 * inferiors.c: Move code to ...
5012 * dll.c: .... here. New.
5013 * server.h: Declare clear_dlls.
5014 * Makefile.in (SFILES): Add dll.c.
5015 (OBS): Add dll.o
5016 (dll.o): New rule.
5017
d73f2619
YQ
50182012-02-11 Yao Qi <yao@codesourcery.com>
5019
5020 * server.c: (handle_monitor_command): Add a new parameter
5021 `own_buf'.
5022 (handle_query): Update caller.
5023
f8255c2a
JB
50242012-02-09 Joel Brobecker <brobecker@adacore.com>
5025
5026 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5027 * configure, config.in: Regenerate.
5028 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5029 is not defined.
5030
da84f473
PA
50312012-02-02 Pedro Alves <palves@redhat.com>
5032
5033 Try SIGKILL first, then PTRACE_KILL.
5034 * linux-low.c (linux_kill_one_lwp): New.
5035 (linux_kill_one_lwp): Rename to ...
5036 (kill_one_lwp_callback): ... this. Use the new
5037 linux_kill_one_lwp.
5038
e886a173
PA
50392012-02-02 Pedro Alves <palves@redhat.com>
5040
5041 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5042 inferior.
5043
be07f1a2
PA
50442012-01-27 Pedro Alves <palves@redhat.com>
5045
5046 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5047 (elf_64_file_p): Make static.
5048 (linux_pid_exe_is_elf_64_file): New.
5049 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5050 Delete declarations.
5051 (linux_pid_exe_is_elf_64_file): Declare.
5052 * linux-x86-low.c (x86_arch_setup): Use
5053 linux_pid_exe_is_elf_64_file.
5054
d8301ad1
JK
50552012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5056
5057 * linux-low.c (linux_wait_for_event_1): Rename to ...
5058 (linux_wait_for_event): ... here and merge it with former
5059 linux_wait_for_event - new variable wait_ptid, use it.
5060 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5061
01b17894
PA
50622012-01-23 Pedro Alves <palves@redhat.com>
5063
5064 * server.c (main): Avoid yet another case of infinite loop while
5065 detaching/killing after a longjmp.
5066
e825046f
JK
50672012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5068
5069 Code cleanup.
5070 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5071
b9e7b9c3
UW
50722012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5073
5074 * hostio.c (handle_readlink): New function.
5075 (handle_vFile): Call it to handle "vFile:readlink" packets.
5076
901f9912
UW
50772012-01-20 Pedro Alves <palves@redhat.com>
5078 Ulrich Weigand <ulrich.weigand@linaro.org>
5079
5080 * server.c (handle_v_requests): Only support vAttach and vRun to
5081 start multiple processes when in extended protocol mode.
5082
fc1ab1a0
PA
50832012-01-17 Pedro Alves <palves@redhat.com>
5084
5085 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5086 memalign plus mprotect to allocate the scratch buffer.
5087
7d5d4e98
PA
50882012-01-13 Pedro Alves <palves@redhat.com>
5089
5090 * server.c (attach_inferior): Clear `cont_thread'.
5091
f128d5e9
PA
50922012-01-13 Pedro Alves <palves@redhat.com>
5093
5094 * server.c (main): Avoid infinite loop while detaching/killing
5095 after a longjmp.
5096
06db92f0
DE
50972012-01-09 Doug Evans <dje@google.com>
5098
5099 * server.c (start_inferior): Set last_ptid in --wrapper case.
5100
32d92999
YQ
51012012-01-06 Yao Qi <yao@codesourcery.com>
5102
5103 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5104 defined.
5105 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5106
5e0a92a9
YQ
51072012-01-04 Yao Qi <yao@codesourcery.com>
5108
5109 * tracepoint.c (cmd_qtdp): Print debug message
5110 for static tracepoint.
5111
ae639e8c
YQ
51122012-01-04 Yao Qi <yao@codesourcery.com>
5113
5114 * tracepoint.c (trace_vdebug): Differentiate debug message
5115 between gdbserver and IPA.
5116
f72429c5
YQ
51172012-01-03 Yao Qi <yao@codesourcery.com>
5118
5119 * tracepoint.c (tracepoint_was_hit): Don't collect for
5120 static tracepoint.
5121
12c3e59c
JB
51222012-01-02 Joel Brobecker <brobecker@adacore.com>
5123
5124 * terminal.h: Reformat copyright header.
5125
67827812
JB
51262012-01-02 Joel Brobecker <brobecker@adacore.com>
5127
5128 * server.c (gdbserver_version): Update copyright year.
5129 * gdbreplay.c (gdbreplay_version): Likewise.
5130
3e52c33d
JK
51312011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5132
5133 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5134
5135 Revert:
5136 2011-12-18 Hui Zhu <teawater@gmail.com>
5137 * linux-low.c (linux_create_inferior): Save return value to ret.
5138
66f1260e
HZ
51392011-12-18 Hui Zhu <teawater@gmail.com>
5140
5141 * linux-low.c (linux_create_inferior): Save return value to ret.
5142
e77616d7
DE
51432011-12-16 Doug Evans <dje@google.com>
5144
e7b06c57
DE
5145 * linux-low.c (linux_create_inferior): If stdio connection,
5146 redirect stdin from /dev/null, stdout to stderr.
5147 * remote-utils.c (remote_is_stdio): New static global.
5148 (remote_connection_is_stdio): New function.
5149 (remote_prepare): Handle stdio connection.
5150 (remote_open): Ditto.
5151 (remote_close): Don't close stdin for stdio connections.
5152 (read_prim,write_prim): New functions. Replace all calls to
5153 read/write to these.
5154 * server.c (main): Watch for "-" argument. Move call to
5155 remote_prepare before start_inferior.
5156 * server.h (STDIO_CONNECTION_NAME): New macro.
5157 (remote_connection_is_stdio): Declare.
5158
e77616d7
DE
5159 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5160 in debugging output.
5161
82067193
YQ
51622011-12-15 Yao Qi <yao@codesourcery.com>
5163
5164 * tracepoint.c: Include sys/syscall.h.
5165 (gdb_ust_thread): Remove preprocessor conditional.
5166
82bfbe7e
PA
51672011-12-14 Pedro Alves <pedro@codesourcery.com>
5168
5169 * linux-low.c (linux_detach_one_lwp): Call
5170 the_low_target.prepare_to_resume before detaching.
5171
712c6575
YQ
51722011-12-14 Yao Qi <yao@codesourcery.com>
5173
5174 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5175 of write.
5176
d54d1edf
YQ
51772011-12-14 Yao Qi <yao@codesourcery.com>
5178
5179 * i386-low.c (i386_low_stopped_data_address): Initialize local
5180 variable `control'.
5181
6210a125
PA
51822011-12-13 Pedro Alves <pedro@codesourcery.com>
5183
5184 PR remote/13492
5185
5186 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5187 DR_CONTROL unless necessary. Extend comments.
5188 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5189 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5190
2ece8244
YQ
51912011-12-13 Yao Qi <yao@codesourcery.com>
5192
5193 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5194 macros.
5195 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5196
784867a5
JK
51972011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5198
5199 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5200 Print new debug message for such case.
5201
6bf36717
JK
52022011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5203
5204 Fix overlapping memcpy.
5205 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5206 the read_inferior_memory transfer.
5207 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5208 write_inferior_memory transfer.
5209 (set_fast_tracepoint_jump): New variable buf. Use it for the
5210 read_inferior_memory and write_inferior_memory transfers.
5211 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5212 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5213 Use it for the write_inferior_memory transfer.
5214 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5215 buffers.
5216
50275556
MR
52172011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5218
5219 * linux-low.c (fetch_register, store_register): Make code
5220 consistent, fix formatting.
5221
7325beb4
MR
52222011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5223
5224 * linux-low.c (usr_store_inferior_registers): Factor out code
5225 to handle individual registers into...
5226 (store_register): ... this new function.
5227
c642a434
UW
52282011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5229
5230 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5231 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5232 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5233 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5234 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5235 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5236 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5237 (srv_xmlfiles): Add new XML files.
5238
5239 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5240 and <sys/uio.h>.
5241 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5242 (init_registers_s390_linux32v1): Add prototype.
5243 (init_registers_s390_linux32v2): Likewise.
5244 (init_registers_s390_linux64v1): Likewise.
5245 (init_registers_s390_linux64v2): Likewise.
5246 (init_registers_s390x_linux64v1): Likewise.
5247 (init_registers_s390x_linux64v2): Likewise.
5248 (s390_num_regs): Increment to 52.
5249 (s390_regmap): Add orig_r2 register.
5250 (s390_num_regs_3264): Increment to 68.
5251 (s390_regmap_3264): Add orig_r2 register.
5252 (s390_collect_ptrace_register): Handle orig_r2 register.
5253 (s390_supply_ptrace_register): Likewise.
5254 (s390_fill_last_break): New function.
5255 (s390_store_last_break): Likewise.
5256 (s390_fill_system_call): New function.
5257 (s390_store_system_call): Likewise.
5258 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5259 register sets.
5260 (s390_check_regset): New function.
5261 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5262 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5263 Update target_regsets for available register sets.
5264
2268b414
JK
52652011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5266 Jan Kratochvil <jan.kratochvil@redhat.com>
5267
5268 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5269 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5270 New.
5271 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5272 * linux-low.h (struct process_info_private): New member r_debug.
5273 * server.c (handle_qxfer_libraries): Call
5274 the_target->qxfer_libraries_svr4.
5275 (handle_qxfer_libraries_svr4): New function.
5276 (qxfer_packets): New entry "libraries-svr4".
5277 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5278 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5279 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5280 PACKET_qXfer_libraries_svr4.
5281
d6db1fab
UW
52822011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5283
5284 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5285 PSW address/mask between 8-byte and 16-byte formats.
5286 (s390_supply_ptrace_register): Likewise.
5287 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5288 basic addressing mode bit.
5289
242f5f1c
SS
52902011-11-24 Stan Shebs <stan@codesourcery.com>
5291
5292 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5293
f196051f
SS
52942011-11-17 Stan Shebs <stan@codesourcery.com>
5295
5296 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5297 (tracing_start_time): New global.
5298 (tracing_stop_time): New global.
5299 (tracing_user_name): New global.
5300 (tracing_notes): New global.
5301 (tracing_stop_note): New global.
5302 (cmd_qtstart): Set traceframe_usage, start_time.
5303 (stop_tracing): Set stop_time.
5304 (cmd_qtstatus): Report additional status.
5305 (cmd_qtp): New function.
5306 (handle_tracepoint_query): Call it.
5307 (cmd_qtnotes): New function.
5308 (handle_tracepoint_general_set): Call it.
5309 (get_timestamp): Rename from tsv_get_timestamp.
5310
405f8e94
SS
53112011-11-14 Stan Shebs <stan@codesourcery.com>
5312 Kwok Cheung Yeung <kcy@codesourcery.com>
5313
5314 * linux-x86-low.c (small_jump_insn): New.
5315 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5316 trampoline and error message, build a trampoline and issue a small
5317 jump instruction to it.
5318 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5319 trampoline and error message.
5320 (x86_get_min_fast_tracepoint_insn_len): New.
5321 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5322 * linux-low.h (struct linux_target_ops): Add arguments to
5323 install_fast_tracepoint_jump_pad operation, add new operation.
5324 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5325 arguments.
5326 (linux_get_min_fast_tracepoint_insn_len): New function.
5327 (linux_target_op): Add new operation.
5328 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5329 (gdb_trampoline_buffer_end): Ditto.
5330 (gdb_trampoline_buffer_error): Ditto.
5331 (struct ipa_sym_addresses): Add fields for new IPA variables.
5332 (symbol_list): Add entries for new IPA variables.
5333 (struct tracepoint): Add fields to hold the address range of the
5334 trampoline used by the tracepoint.
5335 (trampoline_buffer_head): New static variable.
5336 (trampoline_buffer_tail): Ditto.
5337 (claim_trampoline_space): New function.
5338 (have_fast_tracepoint_trampoline_buffer): New function.
5339 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5340 structure.
5341 (install_fast_tracepoint): Ditto, also add error buffer argument.
5342 (cmd_qtminftpilen): New function.
5343 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5344 (fast_tracepoint_from_trampoline_address): New function.
5345 (fast_tracepoint_collecting): Handle trampoline as part of jump
5346 pad space.
5347 (set_trampoline_buffer_space): New function.
5348 (initialize_tracepoint): Initialize new IPA variables.
5349 * target.h (struct target_ops): Add arguments to
5350 install_fast_tracepoint_jump_pad operation, add new
5351 get_min_fast_tracepoint_insn_len operation.
5352 (target_get_min_fast_tracepoint_insn_len): New.
5353 (install_fast_tracepoint_jump_pad): Add arguments.
5354 * server.h (IPA_BUFSIZ): Define.
5355 * linux-i386-ipa.c: Include extra header files.
5356 (initialize_fast_tracepoint_trampoline_buffer): New function.
5357 (initialize_low_tracepoint): Call it.
5358 * server.h (set_trampoline_buffer_space): Declare.
5359 (claim_trampoline_space): Ditto.
5360 (have_fast_tracepoint_trampoline_buffer): Ditto.
5361
1e4d1764
YQ
53622011-11-14 Yao Qi <yao@codesourcery.com>
5363
5364 * server.c (handle_query): Handle InstallInTrace for qSupported.
5365 * tracepoint.c (add_tracepoint): Sort list.
5366 (install_tracepoint, download_tracepoint): New.
5367 (cmd_qtdp): Call them to install and download tracepoints.
5368 (sort_tracepoints): Removed.
5369 (cmd_qtstart): Update.
5370
5c73ff4e
YQ
53712011-11-14 Yao Qi <yao@codesourcery.com>
5372
5373 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5374 * mem-break.h: Declare.
5375 * tracepoint.c (cmd_qtstart): Move some code to ...
5376 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5377 New.
5378 (download_tracepoints): Move some code to ...
5379 (download_tracepoint_1): ... here. New.
5380
86a30030
YQ
53812011-11-08 Yao Qi <yao@codesourcery.com>
5382
5383 * remote-utils.c (relocate_instruction): A comment fix.
5384
8d26e50c
JB
53852011-11-07 Joel Brobecker <brobecker@adacore.com>
5386
5387 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5388 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5389 dr_status_mirror and dr_control_mirror from debug_reg_state.
5390 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5391 (i386_initial_stuff): Remove use of deleted globals.
5392 (i386_get_thread_context, i386_set_thread_context,
5393 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5394 from debug_reg_state.
5395
a59306a3
YQ
53962011-11-05 Yao Qi <yao@codesourcery.com>
5397
5398 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5399 address as TPOINT's.
5400
3065dfb6
SS
54012011-11-02 Stan Shebs <stan@codesourcery.com>
5402
5403 * tracepoint.c (agent_mem_read_string): New function.
5404 (eval_agent_expr): Call it for tracenz.
5405 * server.c (handle_query): Report support for tracenz.
5406
fd0d8c7c
YQ
54072011-11-02 Yao Qi <yao@codesourcery.com>
5408
5409 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5410
609086b1
YQ
54112011-11-02 Yao Qi <yao@codesourcery.com>
5412
5413 * target.h: Fix a typo in comment.
5414
b9fd1791
PA
54152011-10-31 Pedro Alves <pedro@codesourcery.com>
5416
5417 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5418 clobber the breakpoints' shadows with fast tracepoint jumps.
5419 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5420 * target.c (write_inferior_memory): Also pass MYADDR down to
5421 check_mem_write.
5422
03583c20
UW
54232011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5424
5425 * configure.ac: Check support for personality routine.
5426 * configure: Regenerate.
5427 * config.in: Likewise.
5428 * linux-low.c: Include <sys/personality.h>.
5429 Define ADDR_NO_RANDOMIZE if necessary.
5430 (linux_create_inferior): Disable address space randomization when
5431 forking inferior, if requested.
5432 (linux_supports_disable_randomization): New function.
5433 (linux_target_ops): Install it.
5434 * server.h (disable_randomization): Declare.
5435 * server.c (disable_randomization): New global variable.
5436 (handle_general_set): Handle QDisableRandomization.
5437 (handle_query): Likewise for qSupported.
5438 (main): Support --disable-randomization and --no-disable-randomization
5439 command line arguments.
5440 * target.h (struct target_ops): Add supports_disable_randomization.
5441 (target_supports_disable_randomization): New macro.
5442
723b724b
MF
54432011-09-29 Mike Frysinger <vapier@gentoo.org>
5444
5445 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5446 ifdef check.
5447 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5448 [!PT_GETDSBT] (target_loadmap): New definition.
5449 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5450 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5451 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5452 and PT_GETDSBT to LINUX_LOADMAP.
5453 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5454 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5455
55329a5c 54562011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5457
5458 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5459 (arm_linux_hwbp_cap): New static variable.
5460 (arm_linux_get_hwbp_cap): Replace by ...
5461 (arm_linux_init_hwbp_cap): ... this new function.
5462 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5463 (arm_linux_get_hw_watchpoint_count): Likewise.
5464 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5465 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5466 (arm_prepare_to_resume): Use perror_with_name instead of error.
5467
55329a5c 54682011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5469
5470 * linux-arm-low.c: Include <signal.h>.
5471 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5472 (struct arm_linux_hwbp_cap): New data type.
5473 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5474 (struct arm_linux_hw_breakpoint): New data type.
5475 (MAX_BPTS, MAX_WPTS): Define.
5476 (struct arch_process_info, struct arch_lwp_info): New data types.
5477 (arm_linux_get_hwbp_cap): New function.
5478 (arm_linux_get_hw_breakpoint_count): Likewise.
5479 (arm_linux_get_hw_watchpoint_count): Likewise.
5480 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5481 (arm_hwbp_control_initialize): Likewise.
5482 (arm_hwbp_control_is_enabled): Likewise.
5483 (arm_hwbp_control_is_initialized): Likewise.
5484 (arm_hwbp_control_disable): Likewise.
5485 (arm_linux_hw_breakpoint_equal): Likewise.
5486 (arm_linux_hw_point_initialize): Likewise.
5487 (struct update_registers_data): New data structure.
5488 (update_registers_callback: New function.
5489 (arm_insert_point): Likewise.
5490 (arm_remove_point): Likewise.
5491 (arm_stopped_by_watchpoint): Likewise.
5492 (arm_stopped_data_address): Likewise.
5493 (arm_new_process): Likewise.
5494 (arm_new_thread): Likewise.
5495 (arm_prepare_to_resume): Likewise.
5496 (the_low_target): Register arm_insert_point, arm_remove_point,
5497 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5498 arm_new_thread, and arm_prepare_to_resume.
5499
6b9801d4
SS
55002011-09-15 Stan Shebs <stan@codesourcery.com>
5501
5502 * server.h (struct emit_ops): Add compare-goto fields.
5503 * tracepoint.c (gdb_agent_op_sizes): New table.
5504 (emit_eq_goto): New function.
5505 (emit_ne_goto): New function.
5506 (emit_lt_goto): New function.
5507 (emit_le_goto): New function.
5508 (emit_gt_goto): New function.
5509 (emit_ge_goto): New function.
5510 (is_goto_target): New function.
5511 (compile_bytecodes): Recognize special cases of compare-goto
5512 combinations and call specialized emitters for them.
5513 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5514 (amd64_emit_ne_goto): New function.
5515 (amd64_emit_lt_goto): New function.
5516 (amd64_emit_le_goto): New function.
5517 (amd64_emit_gt_goto): New function.
5518 (amd64_emit_ge_goto): New function.
5519 (amd64_emit_ops): Add the new functions.
5520 (i386_emit_eq_goto): New function.
5521 (i386_emit_ne_goto): New function.
5522 (i386_emit_lt_goto): New function.
5523 (i386_emit_le_goto): New function.
5524 (i386_emit_gt_goto): New function.
5525 (i386_emit_ge_goto): New function.
5526 (i386_emit_ops): Add the new functions.
5527
bf15cbda
SS
55282011-09-08 Stan Shebs <stan@codesourcery.com>
5529
5530 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5531 (i386_emit_epilogue): Restore %ebx.
5532
943ca1dd
JZ
55332011-08-31 Jie Zhang <jzhang918@gmail.com>
5534
5535 * server.c (step_thread): Remove definition.
5536 (process_serial_event): Don't handle Hs.
5537 * server.h (step_thread): Remove declaration.
5538 * target.c (set_desired_inferior): Remove use of step_thread.
5539
e3deef73
LM
55402011-08-24 Luis Machado <lgustavo@codesourcery.com>
5541
5542 * linux-low.c: Include linux-procfs.h.
5543 (linux_attach_lwp_1): Update comments.
5544 (linux_attach): Scan for existing threads when attaching to a
5545 process that is the tgid.
5546 * Makefile.in: Update dependencies.
5547
13da1c97
LM
55482011-08-24 Luis Machado <lgustavo@codesourcery.com>
5549
5550 * configure.srv: Add linux-procfs.o dependencies.
5551
881127c9
YQ
55522011-08-14 Yao Qi <yao@codesourcery.com>
5553
5554 * target.h (struct target_ops): Fix indent.
5555 * win32-low.c (win32_target_ops): Fix comment.
5556
58dbd541
YQ
55572011-08-14 Andrew Jenner <andrew@codesourcery.com>
5558 Yao Qi <yao@codesourcery.com>
5559
5560 * Makefile.in (clean): Remove tic6x-*.c files.
5561 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5562 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5563 (tic6x-c64xp-linux.c): Likewise.
5564 * configure.srv: Add support for tic6x-*-uclinux.
5565 * linux-tic6x-low.c: New.
5566 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5567
78d85199
YQ
55682011-08-14 Andrew Stubbs <ams@codesourcery.com>
5569 Yao Qi <yao@codesourcery.com>
5570
5571 * target.h (struct target_ops): Add read_loadmap.
5572 * linux-low.c (struct target_loadseg): New type.
5573 (struct target_loadmap): New type.
5574 (linux_read_loadmap): New function.
5575 (linux_target_ops): Add linux_read_loadmap.
5576 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5577 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5578 to NULL.
78d85199 5579
a959a88d
EZ
55802011-08-05 Eli Zaretskii <eliz@gnu.org>
5581
5582 * win32-low.c: Include <stdint.h>.
5583
1ced966e
PA
55842011-07-22 Pedro Alves <pedro@codesourcery.com>
5585
5586 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5587 to the inferior here.
5588 (i386_remove_aligned_watchpoint): Ditto.
5589 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5590 fit part of the watchpoint in the debug registers.
5591 (i386_update_inferior_debug_regs): New.
5592 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5593 registers, and only update the inferior on success.
5594 (i386_low_remove_watchpoint): Ditto.
5595
d26e3629
KY
55962011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5597
5598 * linux-low.c (compare_ints, unique, list_threads, show_process,
5599 linux_core_of_thread): Delete.
5600 (linux_target_ops): Change linux_core_of_thread to
5601 linux_common_core_of_thread.
5602 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5603 * utils.c (malloc_failure): Change type of argument.
5604 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5605 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5606 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5607 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5608 (IPA_OBJS): Add common-utils-ipa.o.
5609 (ptid_h, linux_osdata_h): New macros.
5610 (server_h): Add common/common-utils.h, common/xml-utils.h,
5611 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5612 common/ptid.h.
5613 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5614 ptid.o, buffer.o): New rules.
5615 (linux-low.o): Add common/linux-osdata.h as a dependency.
5616 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5617 * configure.ac: Add AC_HEADER_DIRENT check.
5618 * config.in: Regenerate.
5619 * configure: Regenerate.
5620 * remote-utils.c (xml_escape_text): Delete.
5621 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5622 buffer_xml_printf): Move to common/buffer.c.
5623 * server.c (main): Remove call to initialize_inferiors.
5624 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5625 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5626 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5627 internal_error, gdb_assert, gdb_assert_fail): Delete.
5628 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5629 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5630 common/buffer.h.
5631 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5632 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5633 initialize_inferiors): Delete.
5634
2275a1a7
PA
56352011-07-20 Pedro Alves <pedro@codesourcery.com>
5636
5637 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5638 symbol error.
5639
0a5b1e09
PA
56402011-05-31 Pedro Alves <pedro@codesourcery.com>
5641
5642 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5643 assertion.
5644 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5645
6938fd34
YQ
56462011-05-26 Yao Qi <yao@codesourcery.com>
5647
5648 * Makefile.in (thread-db.o): Track dependence to
5649 common/gdb_thread_db.h.
5650 * thread-db.c: include gdb_thread_db.h from right place.
5651
b481f9e0
TT
56522011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5653
5654 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5655 __FILE__ and __LINE__ to internal_error.
5656
98a5dd13
DE
56572011-05-13 Doug Evans <dje@google.com>
5658
5659 * thread-db.c (try_thread_db_load_from_sdir): New function.
5660 (try_thread_db_load_from_dir): New function.
5661 (thread_db_load_search): Handle $sdir, ignore $pdir.
5662 Remove trying of system directories if search of
5663 libthread-db-search-path fails, that is now done via $sdir.
5664
d248b706
KY
56652011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5666
5667 * server.c (handle_query): Add EnableDisableTracepoints to the list
5668 of supported features.
43aaf8b6 5669 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5670 tracepoints.
43aaf8b6
PA
5671 (cmd_qtenable_disable): New.
5672 (cmd_qtstart): Install tracepoints even if disabled.
5673 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5674 receiving a QTEnable or QTDisable packet.
5675 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5676 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5677 tracepoints.
5678 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5679
84e578fb
DE
56802011-05-10 Doug Evans <dje@google.com>
5681
5682 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5683
71f55dd8
DE
56842011-05-04 Doug Evans <dje@google.com>
5685
5686 * linux-low.c (linux_join): Skip process lookup.
5687 * spu-low.c (spu_join): Ditto.
5688 * server.c (join_inferiors_callback): Delete.
5689 (process_serial_event): For 'D' packet (detach) call join_inferior
5690 directly.
5691
4d393d60
JM
56922011-05-04 Joseph Myers <joseph@codesourcery.com>
5693
5694 * README: Don't mention xscale*-*-linux*.
5695 * configure.srv (xscale*-*-linux*): Don't handle target.
5696
b00ad6ff
NF
56972011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5698
5699 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5700 casting pointers.
5701 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5702 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5703 (i386_emit_void_call_2): Likewise.
5704
af96c192
YQ
57052011-04-26 Yao Qi <yao@codesourcery.com>
5706
43aaf8b6
PA
5707 * linux-low.c: Move common macros to linux-ptrace.h.
5708 Include linux-ptrace.h.
af96c192
YQ
5709 * Makefile.in (linux_ptrace_h): New.
5710 (linux-low.o): Depends on linux-ptrace.h.
5711
03f2bd59
JK
57122011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5713
5714 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5715 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5716 (remote_prepare): New function with most of the TCP code from ...
5717 (remote_open): ... here. Detect PORT here unconditionally. Move also
5718 setting transport_is_reliable.
5719 * server.c (run_once): New variable.
5720 (gdbserver_usage): Document it.
5721 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5722 the first run if RUN_ONCE.
5723 * server.h (run_once, remote_prepare): New declarations.
5724
7a9dd1b2
TT
57252011-04-19 Tom Tromey <tromey@redhat.com>
5726
5727 * win32-low.c (handle_load_dll): Remove duplicate "the".
5728
81239425
PM
57292011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5730
5731 Remove support for old Cygwin 1.5 versions.
5732 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5733 function to avoid warning.
5734 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5735 warning.
5736
9e0627f1
PM
57372011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5738
5739 * gdbserver/server.h (Macro _): Define it if not available.
5740
588eebee
MS
57412011-03-14 Michael Snyder <msnyder@vmware.com>
5742
348af9f7 5743 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5744
43f70d4c
JB
57452011-03-10 Joel Brobecker <brobecker@adacore.com>
5746
5747 * Makefile.in (maintainer-clean realclean distclean): Remove
5748 "make ... subdir_do" command.
5749
348af9f7
MS
57502011-03-10 Michael Snyder <msnyder@vmware.com>
5751
5752 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5753
5754 * server.c (handle_v_run): Free alloced buffer on early return.
5755
e637a4f5
YQ
57562011-03-09 Yao Qi <yao@codesourcery.com>
5757
5758 Revert:
5759 2011-03-04 Yao Qi <yao@codesourcery.com>
5760
5761 * Makefile.in: Remove GNU make feature --directory.
5762
5763 2011-03-05 Yao Qi <yao@codesourcery.com>
5764
5765 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5766 (subdir_do): New make target. Copied from gdb/Makefile.
5767 (maintainer-clean, realclean, distclean, clean): Call corresponding
5768 make targets in common/Makefile.
5769
5770 2011-02-11 Yao Qi <yao@codesourcery.com>
5771
5772 * configure.ac: Call AC_PROG_RANLIB.
5773 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5774 * configure: Regenerate.
5775
e6edda56
JK
57762011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5777
5778 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5779
e5141119
JB
57802011-03-06 Yao Qi <yao@codesourcery.com>
5781
5782 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5783
64794aa4
JB
57842011-03-05 Yao Qi <yao@codesourcery.com>
5785
5786 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5787 (subdir_do): New make target. Copied from gdb/Makefile.
5788 (maintainer-clean, realclean, distclean, clean): Call corresponding
5789 make targets in common/Makefile.
5790
7a762829
YQ
57912011-03-04 Yao Qi <yao@codesourcery.com>
5792
5793 * Makefile.in: Remove GNU make feature --directory.
5794
348af9f7
MS
57952011-03-04 Michael Snyder <msnyder@vmware.com>
5796
5797 * server.c (queue_stop_reply): Call xmalloc not malloc.
5798
57992011-03-02 Michael Snyder <msnyder@vmware.com>
5800
5801 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5802
9f72fee2
MS
58032011-02-28 Michael Snyder <msnyder@vmware.com>
5804
588eebee
MS
5805 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5806 (cmd_qtframe): Ditto.
5807 (cmd_qtbuffer): Ditto.
5808 (cmd_bigqtbuffer): Ditto.
5809
9f72fee2
MS
5810 * utils.c (decimal2str): Initialize 'width' to nine, then
5811 don't mess with it.
5812
8040bd49
UW
58132011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5814
5815 * hostio.c (require_data): Free *data, not data.
5816
7e52cbd0
JK
58172011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5818
5819 * hostio.c (require_data): Use free, not xfree.
5820
9130f83e
MS
58212011-02-27 Michael Snyder <msnyder@vmware.com>
5822
4b812f4e
MS
5823 * server.c (handle_query): Discard unused value.
5824
9130f83e
MS
5825 * hostio.c (require_data): Free malloc memory before returning
5826 error.
5827
69d37113
MS
58282011-02-26 Michael Snyder <msnyder@vmware.com>
5829
5830 * linux-low.c (list_threads): Call closedir for dirent.
5831
35f5825a
MS
58322011-02-27 Michael Snyder <msnyder@vmware.com>
5833
2a589cef
MS
5834 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5835 a case statement falls through.
5836
0adea5f7
MS
5837 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5838
35f5825a
MS
5839 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5840 in comparison.
5841
238f1c74
MS
58422011-02-26 Michael Snyder <msnyder@vmware.com>
5843
5844 * utils.c (decimal2str): Eliminate dead code and dead param.
5845 (pulongest): Drop dead param from call to decimal2str.
5846 (plongest): Ditto.
5847
633ff500
JB
58482011-02-24 Joel Brobecker <brobecker@adacore.com>
5849
5850 Revert the following patch (not approved yet):
5851 2011-02-21 Hui Zhu <teawater@gmail.com>
5852 * tracepoint.c (tp_printf): New function.
5853 (eval_agent_expr): Handle gdb_agent_op_printf.
5854
f9c6ff72
HZ
58552011-02-21 Hui Zhu <teawater@gmail.com>
5856
5857 * tracepoint.c (tp_printf): New function.
5858 (eval_agent_expr): Handle gdb_agent_op_printf.
5859
94d5e490
TT
58602011-02-18 Tom Tromey <tromey@redhat.com>
5861
5862 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5863 (tracepoint.o): Likewise.
5864 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5865 (gdb_agent_op_names): Likewise.
5866
c7f96d2b
TT
58672011-02-18 Tom Tromey <tromey@redhat.com>
5868
5869 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5870 gdb_agent_op_rot>: New constants.
5871 (gdb_agent_op_names): Add pick and roll.
5872 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5873 cases.
5874
0feedb2c
JK
58752011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5876
5877 * aclocal.m4: Regenerated with aclocal-1.11.1.
5878
b3b9301e
PA
58792011-02-14 Pedro Alves <pedro@codesourcery.com>
5880
5881 * server.c (handle_qxfer_traceframe_info): New.
5882 (qxfer_packets): Register "traceframe-info".
5883 (handle_query): Report support for qXfer:traceframe-info:read+.
5884 * tracepoint.c (match_blocktype): New.
5885 (traceframe_find_block_type): Rename to ...
5886 (traceframe_walk_blocks): ... this. Add callback filter argument,
5887 and use it.
5888 (traceframe_find_block_type): New, reimplemented on top of
5889 traceframe_walk_blocks.
5890 (build_traceframe_info_xml): New.
5891 (traceframe_read_info): New.
5892 * server.h (traceframe_read_info): Declare.
5893
4f3e6fb7
YQ
58942011-02-11 Yao Qi <yao@codesourcery.com>
5895
5896 * configure.ac: Call AC_PROG_RANLIB.
5897 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5898 * configure: Regenerate.
5899
764880b7
PA
59002011-02-07 Pedro Alves <pedro@codesourcery.com>
5901
5902 * server.c (gdb_read_memory): Change return semantics to allow
5903 partial transfers.
5904 (handle_search_memory_1): Adjust.
5905 (process_serial_event) <'m' packet>: Handle partial transfers.
5906 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5907
1c79eb8a
PA
59082011-01-28 Pedro Alves <pedro@codesourcery.com>
5909
5910 * regcache.c (init_register_cache): Initialize
5911 regcache->register_status.
5912 (free_register_cache): Release regcache->register_status.
5913 (regcache_cpy): Copy register_status.
5914 (registers_to_string): Print 'x's for unavailable registers.
5915 (supply_register): Mark the register's status valid or
5916 unavailable, depending on whether a buffer was passed in or not.
5917 (supply_register_zeroed): New.
5918 (supply_regblock): Mark the registers' status valid or
5919 unavailable, depending on whether a buffer was passed in or not.
5920 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5921 (struct regcache): New `register_status' field.
5922 (supply_register_zeroed): Declare.
5923 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5924 supply_register_zeroed, rather than passing a NULL buffer to
5925 supply_register.
5926 * tracepoint.c (fetch_traceframe_registers): Update comment.
5927
85724a0e
PA
59282011-01-28 Pedro Alves <pedro@codesourcery.com>
5929
5930 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5931 buffer explicit.
5932
d08aafef
PA
59332011-01-25 Pedro Alves <pedro@codesourcery.com>
5934
5935 * server.h (decode_xfer_write): Change prototype.
5936 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5937 and don't extract the annex here.
5938 * server.c (decode_xfer_read): Remove `annex' parameter,
5939 and don't extract the annex here.
5940 (decode_xfer): New.
5941 (struct qxfer): New.
5942 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5943 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5944 (handle_qxfer_statictrace): New functions, abstracted out from
5945 handle_query, and made to use the struct qxfer interface.
5946 (handle_threads_qxfer_proper): Rename to ...
5947 (handle_qxfer_threads_proper): ... this.
5948 (handle_threads_qxfer): Rename to ...
5949 (handle_qxfer_threads): ... this. Adjust.
5950 (qxfer_packets): New array.
5951 (handle_qxfer): New function.
5952 (handle_query): Use handle_qxfer.
5953
493e2a69
MS
59542011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5955
5956 * gdbreplay.c: Shorten lines of >= 80 columns.
5957 * linux-low.c: Ditto.
5958 * linux-ppc-low.c: Ditto.
5959 * linux-s390-low.c: Ditto.
5960 * linux-sparc-low.c: Ditto.
5961 * linux-x86-low.c: Ditto.
5962 * linux-xtensa-low.c: Ditto.
5963 * mem-break.c: Ditto.
5964 * nto-low.c: Ditto.
5965 * regcache.h: Ditto.
5966 * remote-utils.c: Ditto.
5967 * server.c: Ditto.
5968 * server.h: Ditto.
5969 * thread-db.c: Ditto.
5970 * tracepoint.c: Ditto.
5971 * utils.c: Ditto.
5972 * win32-low.h: Ditto.
5973
44944448
JB
59742011-01-05 Joel Brobecker <brobecker@adacore.com>
5975
5976 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5977 update.
5978
71ce852c
JB
59792011-01-01 Joel Brobecker <brobecker@adacore.com>
5980
5981 * server.c (gdbserver_version): Update copyright year in version
5982 output.
5983 * gdbreplay.c (gdbreplay_version): Ditto.
5984
eb826dc6
MF
59852010-12-29 Jie Zhang <jie.zhang@analog.com>
5986
5987 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5988 * linux-bfin-low.c: New file.
5989 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5990 PT_DATA_ADDR for BFIN targets.
5991 * Makefile.in (SFILES): Add linux-bfin-low.c.
5992 (clean): Remove reg-bfin.c.
5993 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5994 * README: Mention supported Blackfin targets.
5995
39ab222a
MF
59962010-12-23 Mike Frysinger <vapier@gentoo.org>
5997
5998 * .gitignore: New file.
5999
a1f2ce7d
MF
60002010-11-16 Mike Frysinger <vapier@gentoo.org>
6001
6002 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6003
f474844c
JZ
60042010-10-22 Jie Zhang <jie@codesourcery.com>
6005
6006 * Makefile.in: Add FLAGS_TO_PASS variable.
6007 (install): Remove dependency of install-only and recursively
6008 invoke make for install-only.
6009
f1048712
DE
60102010-10-04 Doug Evans <dje@google.com>
6011
6012 * Makefile.in (uninstall): Use $(DESTDIR).
6013
b53a1623
PA
60142010-09-24 Pedro Alves <pedro@codesourcery.com>
6015
e6ee044d
PA
6016 PR gdb/11842
6017
b53a1623
PA
6018 * linux-x86-low.c (compat_siginfo_from_siginfo)
6019 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6020 si_code is < 0. Check for si_code == SI_TIMER before checking for
6021 si_code < 0.
6022
fa1bd1e4
JB
60232010-09-13 Joel Brobecker <brobecker@adacore.com>
6024
6025 * lynx-i386-low.c: New file.
6026 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6027
47fac8f8
JB
60282010-09-13 Joel Brobecker <brobecker@adacore.com>
6029
6030 * lynx-low.c (ptrace_request_to_str): Remove handling for
6031 request values that have been removed in LynxOS 5.x.
6032
1adfc54d
JB
60332010-09-13 Joel Brobecker <brobecker@adacore.com>
6034
6035 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6036 <ptrace.h>
6037
c2a66c29
NS
60382010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6039
6040 * configure.ac: Add --enable-inprocess-agent option.
6041 * configure: Rebuilt.
6042
32fcada3
YQ
60432010-09-06 Yao Qi <yao@codesourcery.com>
6044
6045 * linux-low.c (linux_kill): Remove unused variable.
6046 (linux_stabilize_threads): Likewise.
6047 * server.c (start_inferior): Likewise.
6048 (queue_stop_reply_callback): Likewise.
6049 * tracepoint.c (do_action_at_tracepoint): Likewise.
6050
0cccb683
YQ
60512010-09-06 Yao Qi <yao@codesourcery.com>
6052
6053 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6054 on return.
6055
423ec54c
JK
60562010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6057
6058 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6059
12ac6819
PA
60602010-09-06 Pedro Alves <pedro@codesourcery.com>
6061
6062 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6063 "$(IPA_DEPFILES)".
6064
8ed54b31
JB
60652010-09-01 Joel Brobecker <brobecker@adacore.com>
6066
6067 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6068 gdbserver/lynx-ppc-low.c: New files.
6069 * Makefile.in (lynx_low_h): New variable.
6070 (lynx-low.o, lynx-ppc-low.o): New rules.
6071 * configure.ac: On LynxOS, link with -lnetinet.
6072 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6073 * configure: regenerate.
6074
bb0116a4
JB
60752010-09-01 Joel Brobecker <brobecker@adacore.com>
6076
6077 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6078 * configure.ac: Add check for vasprintf and vsnprintf.
6079 * configure, config.in: Regenerate.
6080 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6081
a778ab81 60822010-09-01 Joel Brobecker <brobecker@adacore.com>
6083
6084 * gdbreplay.c: Move include of alloca.h up, next to include of
6085 malloc.h.
6086 * server.h: Add include of malloc.h.
6087 * mem-break.c: Remove include of malloc.h.
6088 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6089
8b034a19 60902010-09-01 Joel Brobecker <brobecker@adacore.com>
6091
6092 * Makefile.in (memmem.o): Build with -Wno-error.
6093
60942010-09-01 Joel Brobecker <brobecker@adacore.com>
6095
6096 * utils.c (xsnprintf): Make non-static.
6097 * server.h: Add xsnprintf declaration.
6098 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6099 replace calls to snprintf by calls to xsnprintf throughout.
6100
61012010-09-01 Joel Brobecker <brobecker@adacore.com>
6102
6103 * configure.ac: Add configure check for alloca.
6104 * configure, config.in: Regenerate.
6105 * server.h: Include alloca.h if it exists.
6106 * gdbreplay.c: Include alloca.h if it exists.
6107
1a981360
PA
61082010-08-28 Pedro Alves <pedro@codesourcery.com>
6109
6110 * linux-low.c (__SIGRTMIN): Define if not already defined.
6111 (linux_create_inferior): Check for __ANDROID__ rather than
6112 __SIGRTMIN.
6113 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6114 are already deferred.
6115 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6116 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6117 stopped and already has a pending signal to report.
6118 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6119 a pending signal to report or is moving out of a jump pad.
6120 (linux_init_signals): Check for __ANDROID__ rather than
6121 __SIGRTMIN.
6122
b4d51a55
PA
61232010-08-28 Pedro Alves <pedro@codesourcery.com>
6124
6125 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6126 debug_threads check. Avoid a linear search when not doing debug
6127 output.
6128
ec48365d
PA
61292010-08-27 Pedro Alves <pedro@codesourcery.com>
6130
6131 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6132 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6133 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6134 (process_event): Change local fd's type to gdb_fildes_t.
6135 (create_file_handler): Adjust prototype.
6136 (delete_file_handler): Adjust prototype.
6137 (handle_file_event): Adjust prototype. Use pfildes.
6138 (create_file_event): Adjsut prototype.
6139 * remote-utils.c (remote_desc, listen_desc): Change type to
6140 gdb_fildes_t.
6141 * server.h: New gdb_fildes_t typedef.
6142 [USE_WIN32API]: Include winsock2.h.
6143 (delete_file_handler, add_file_handler): Adjust prototypes.
6144 (pfildes): Declare.
6145 * utils.c (pfildes): New.
6146
854d88f0
PA
61472010-08-27 Pedro Alves <pedro@codesourcery.com>
6148
6149 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6150 * configure: Regenerate.
6151
0146f85b
PA
61522010-08-27 Pedro Alves <pedro@codesourcery.com>
6153
6154 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6155 (linux_done_accessing_memory): ... this.
6156 (linux_target_ops): Adjust.
6157 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6158 * nto-low.c (nto_target_ops): Adjust comment.
6159 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6160 * spu-low.c (spu_target_ops): Adjust comment.
6161 * target.h (target_ops): Rename unprepare_to_access_memory field
6162 to done_accessing_memory.
6163 (unprepare_to_access_memory): Rename to ...
6164 (done_accessing_memory): ... this.
6165
90d74c30
PA
61662010-08-26 Pedro Alves <pedro@codesourcery.com>
6167
6168 * linux-low.c (linux_prepare_to_access_memory): New.
6169 (linux_unprepare_to_access_memory): New.
6170 (linux_target_ops): Install them.
6171 * server.c (read_memory): Rename to ...
6172 (gdb_read_memory): ... this. Use
6173 prepare_to_access_memory/prepare_to_access_memory.
6174 (write_memory): Rename to ...
6175 (gdb_write_memory): ... this. Use
6176 prepare_to_access_memory/prepare_to_access_memory.
6177 (handle_search_memory_1): Adjust.
6178 (process_serial_event): Adjust.
6179 * target.h (struct target_ops): New fields
6180 prepare_to_access_memory and unprepare_to_access_memory.
6181 (prepare_to_access_memory, unprepare_to_access_memory): New.
6182 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6183 prepare_to_access_memory/prepare_to_access_memory.
6184 * nto-low.c (nto_target_ops): Adjust.
6185 * spu-low.c (spu_target_ops): Adjust.
6186 * win32-low.c (win32_target_ops): Adjust.
6187
fd467969
PA
61882010-08-26 Pedro Alves <pedro@codesourcery.com>
6189
6190 * Makefile.in (WARN_CFLAGS): Get it from configure.
6191 (WERROR_CFLAGS): New.
6192 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6193 * configure.ac: Introduce --enable-werror, which adds -Werror to
6194 the compiler command line. Enabled by default. Disable with
6195 --disable-werror. Add -Wdeclaration-after-statement
6196 Wpointer-arith and -Wformat-nonliteral to warning flags.
6197 * configure: Regenerate.
6198
331e2f5f
PA
61992010-08-26 Pedro Alves <pedro@codesourcery.com>
6200
6201 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6202
e581f2b4
PA
62032010-08-26 Pedro Alves <pedro@codesourcery.com>
6204
6205 * gdbreplay.c (remote_error): New.
6206 (gdbchar): New.
6207 (expect): Use gdbchar. Check for error reading from GDB.
6208 Clarify sync error output.
6209 (play): Check for errors writing to GDB.
6210 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6211 * remote-utils.c (getpkt): Check for errors writing to the remote
6212 descriptor.
6213
3c11dd79
PA
62142010-08-25 Pedro Alves <pedro@codesourcery.com>
6215
6216 * linux-low.c (linux_wait_1): Move non-debugging code out of
6217 `debug_threads' control.
6218
d20a8ad9
PA
62192010-08-25 Pedro Alves <pedro@codesourcery.com>
6220
6221 * linux-low.c (linux_wait_1): Don't set last_status here.
6222 * server.c (push_event, queue_stop_reply_callback): Assert we're
6223 not pushing a TARGET_WAITKIND_IGNORE event.
6224 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6225 (myresume, handle_target_event): Set the thread's last_resume_kind
6226 and last_status from the target returned status.
6227
964e4306
PA
62282010-08-25 Pedro Alves <pedro@codesourcery.com>
6229
6230 PR threads/10729
6231
6232 * linux-x86-low.c (update_debug_registers_callback): New.
6233 (i386_dr_low_set_addr): Use it.
6234 (i386_dr_low_get_addr): New.
6235 (i386_dr_low_set_control): Use update_debug_registers_callback.
6236 (i386_dr_low_get_control): New.
6237 (i386_dr_low_get_status): Adjust.
6238 * linux-low.c (linux_stop_lwp): New.
6239 * linux-low.h (linux_stop_lwp): Declare.
6240
6241 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6242 argument instead of a i386_debug_reg_state.
6243 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6244 a i386_debug_reg_state.
6245 (i386_insert_aligned_watchpoint): Adjust.
6246 (i386_remove_aligned_watchpoint): Adjust.
6247 (i386_low_stopped_data_address): Read the debug registers from the
6248 inferior instead of from the mirrors.
6249 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6250 (i386_dr_low_get_addr): Declare.
6251 (i386_dr_low_get_control): Declare.
6252 (i386_dr_low_get_status): Change prototype.
6253
6254 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6255 (i386_dr_low_get_addr): New.
6256 (i386_dr_low_get_control): New.
6257 (i386_dr_low_get_status): Adjust prototype. Return
6258 dr_status_mirror.
6259 (i386_initial_stuff): Clear dr_status_mirror and
6260 dr_control_mirror.
6261 (i386_get_thread_context): Adjust.
6262 (i386_set_thread_context): Adjust.
6263 (i386_thread_added): Adjust.
6264
5f21a75b
PA
62652010-08-24 Pedro Alves <pedro@codesourcery.com>
6266
6267 * linux-low.h (linux_thread_area): Delete declaration.
6268
3e4c1235
TS
62692010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6270
6271 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6272 after its termination.
6273
1971b033
PA
62742010-08-09 Pedro Alves <pedro@codesourcery.com>
6275
6276 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6277 (gdb_wants_all_stopped): Delete.
6278 (linux_wait_1): Don't call them.
6279 * server.c (handle_v_cont): Tag all threads as want-stopped.
6280 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6281 stopped as "client-wants-stopped".
6282
310444ac
PA
62832010-07-31 Pedro Alves <pedro@codesourcery.com>
6284
6285 * Makefile.in (signals_h): New.
6286 (server_h): Depend on it.
6287 (server.o): Don't depend on $(signals_def).
6288 (signals.o): Depend on $(signals_def).
6289
a19cae16
JK
62902010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6291
6292 * Makefile.in (signals_def): New.
6293 (server_h): Append include/gdb/signals.h and signals_def.
6294 (server.o): Append signals_def.
6295
30d50328
JK
62962010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6297
6298 * server.c (handle_target_event): Use target_signal_to_host for
6299 resume_info.sig initialization.
6300 * target.h (struct thread_resume) <sig>: New comment.
6301
5c3216e2
OS
63022010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6303
c6f46ca0
OS
6304 * server.c (handle_query): strcpy() the returned string from paddress()
6305 instead of sprintf().
5c3216e2
OS
6306 * utils.c (paddress): Return phex_nz().
6307
6bd31874
JB
63082010-07-07 Joel Brobecker <brobecker@adacore.com>
6309
6310 * server.c (handle_v_cont): Call mourn_inferior if process
6311 just exited.
6312 (myresume): Likewise.
6313
0fb4aa4b
PA
63142010-07-01 Pedro Alves <pedro@codesourcery.com>
6315
6316 Static tracepoints, and integration with UST.
6317
6318 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6319 * mem-break.c (uninsert_all_breakpoints)
6320 (reinsert_all_breakpoints): New.
6321 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6322 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6323 (gdb_agent_ust_loaded, helper_thread_id)
6324 (gdb_agent_helper_thread_id): New macros.
6325 (struct ipa_sym_addresses): Add addr_ust_loaded,
6326 addr_helper_thread_id, addr_cmd_buf.
6327 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6328 (in_process_agent_loaded_ust): New.
6329 (write_e_ust_not_loaded): New.
6330 (maybe_write_ipa_ust_not_loaded): New.
6331 (struct collect_static_trace_data_action): New.
6332 (enum tracepoint_type) <static_tracepoint>: New.
6333 (struct tracepoint) <handle>: Mention static tracepoints.
6334 (struct static_tracepoint_ctx): New.
6335 (CMD_BUF_SIZE): New.
6336 (add_tracepoint_action): Handle static tracepoint actions.
6337 (unprobe_marker_at): New.
6338 (clear_installed_tracepoints): Handle static tracepoints.
6339 (cmd_qtdp): Handle static tracepoints.
6340 (probe_marker_at): New.
6341 (cmd_qtstart): Handle static tracepoints.
6342 (response_tracepoint): Handle static tracepoints.
6343 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6344 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6345 (get_context_regcache): Handle static tracepoints.
6346 (do_action_at_tracepoint): Handle static tracepoint actions.
6347 (traceframe_find_block_type): Handle static trace data blocks.
6348 (traceframe_read_sdata): New.
6349 (download_tracepoints): Download static tracepoint actions.
6350 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6351 (GDB_PROBE_NAME): New.
6352 (ust_ops): New.
6353 (GET_UST_SYM): New.
6354 (USTF): New.
6355 (dlsym_ust): New.
6356 (ust_marker_to_static_tracepoint): New.
6357 (gdb_probe): New.
6358 (collect_ust_data_at_tracepoint): New.
6359 (gdb_ust_probe): New.
6360 (UNIX_PATH_MAX, SOCK_DIR): New.
6361 (gdb_ust_connect_sync_socket): New.
6362 (resume_thread, stop_thread): New.
6363 (run_inferior_command): New.
6364 (init_named_socket): New.
6365 (gdb_ust_socket_init): New.
6366 (cstr_to_hexstr): New.
6367 (next_st): New.
6368 (first_marker, next_marker): New.
6369 (response_ust_marker): New.
6370 (cmd_qtfstm, cmd_qtsstm): New.
6371 (unprobe_marker_at, probe_marker_at): New.
6372 (cmd_qtstmat, gdb_ust_thread): New.
6373 (gdb_ust_init): New.
6374 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6375 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6376 (ST_REGENTRY): New.
6377 (x86_64_st_collect_regmap): New.
6378 (X86_64_NUM_ST_COLLECT_GREGS): New.
6379 (AMD64_RIP_REGNUM): New.
6380 (supply_static_tracepoint_registers): New.
6381 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6382 (ST_REGENTRY): New.
6383 (i386_st_collect_regmap): New.
6384 (i386_NUM_ST_COLLECT_GREGS): New.
6385 (supply_static_tracepoint_registers): New.
6386 * server.c (handle_query): Handle qXfer:statictrace:read.
6387 <qSupported>: Report support for StaticTracepoints, and
6388 qXfer:statictrace:read features.
6389 * server.h (traceframe_read_sdata)
6390 (supply_static_tracepoint_registers): Declare.
6391 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6392 (unpack_varlen_hex): Include in IPA build.
6393 * Makefile.in (ustlibs, ustinc): New.
6394 (IPA_OBJS): Add remote-utils-ipa.o.
6395 ($(IPA_LIB)): Link -ldl and -lpthread.
6396 (UST_CFLAGS): New.
6397 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6398 * config.in, configure: Regenerate.
6399
9e4344e5
PA
64002010-06-20 Ian Lance Taylor <iant@google.com>
6401 Pedro Alves <pedro@codesourcery.com>
6402
6403 * linux-x86-low.c (always_true): Delete.
6404 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6405 trying to fool the compiler with always_true.
6406
c6beb2cb
PA
64072010-06-20 Pedro Alves <pedro@codesourcery.com>
6408
6409 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6410 conditions in gdbserver.
6411
d2ed6730
UW
64122010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6413
6414 * spu-low.c (spu_read_memory): Wrap around local store limit.
6415 (spu_write_memory): Likewise.
6416
4e29fb54
PA
64172010-06-15 Pedro Alves <pedro@codesourcery.com>
6418
6419 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6420 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6421 LONGEST uses.
6422 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6423 uses.
6424 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6425 uses with LONGEST uses.
6426
6a271cae
PA
64272010-06-14 Stan Shebs <stan@codesourcery.com>
6428 Pedro Alves <pedro@codesourcery.com>
6429
6430 Bytecode compiler.
6431
6432 * linux-x86-low.c: Include limits.h.
6433 (add_insns): New.
6434 (always_true): New.
6435 (EMIT_ASM): New.
6436 (EMIT_ASM32): New.
6437 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6438 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6439 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6440 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6441 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6442 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6443 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6444 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6445 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6446 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6447 (amd64_emit_void_call_2): New.
6448 (amd64_emit_ops): New.
6449 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6450 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6451 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6452 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6453 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6454 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6455 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6456 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6457 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6458 (i386_emit_stack_adjust, i386_emit_int_call_1)
6459 (i386_emit_void_call_2): New.
6460 (i386_emit_ops): New.
6461 (x86_emit_ops): New.
6462 (the_low_target): Install x86_emit_ops.
6463 * server.h (struct emit_ops): New.
6464 (get_raw_reg_func_addr): Declare.
6465 (current_insn_ptr, emit_error): Declare.
6466 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6467 (set_trace_state_variable_value): New defines.
6468 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6469 addr_get_trace_state_variable_value and
6470 addr_set_trace_state_variable_value.
6471 (symbol_list): New fields for get_raw_reg,
6472 get_trace_state_variable_value and set_trace_state_variable_value.
6473 (condfn): New typedef.
6474 (struct tracepoint): New field `compiled_cond'.
6475 (do_action_at_tracepoint): Clear compiled_cond.
6476 (get_trace_state_variable_value, set_trace_state_variable_value):
6477 Export in the IPA.
6478 (condition_true_at_tracepoint): If there's a compiled condition,
6479 run that.
6480 (current_insn_ptr, emit_error): New globals.
6481 (struct bytecode_address): New.
6482 (get_raw_reg_func_addr): New.
6483 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6484 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6485 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6486 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6487 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6488 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6489 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6490 (compile_tracepoint_condition, compile_bytecodes): New.
6491 * target.h (emit_ops): Forward declare.
6492 (struct target_ops): New field emit_ops.
6493 (target_emit_ops): New.
6494 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6495 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6496 * linux-low.c (linux_emit_ops): New.
6497 (linux_target_ops): Install it.
6498 * linux-low.h (struct linux_target_ops): New field emit_ops.
6499
92b72907
UW
65002010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6501
6502 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6503 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6504
fa593d66
PA
65052010-06-01 Pedro Alves <pedro@codesourcery.com>
6506 Stan Shebs <stan@codesourcery.com>
6507
6508 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6509 (all): Depend on $(extra_libraries).
6510 (install-only): Install the IPA.
6511 (IPA_OBJS, IPA_LIB): New.
6512 (clean): Remove the IPA lib.
6513 (IPAGENT_CFLAGS): New.
6514 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6515 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6516 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6517 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6518 * configure.ac: Check for atomic builtins support in the compiler.
6519 (IPA_DEPFILES, extra_libraries): Define.
6520 * configure.srv (ipa_obj): Add description.
6521 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6522 (i[34567]86-*-linux*): Set ipa_obj.
6523 (x86_64-*-linux*): Set ipa_obj.
6524 * linux-low.c (stabilizing_threads): New.
6525 (supports_fast_tracepoints): New.
6526 (linux_detach): Stabilize threads before detaching.
6527 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6528 the lwp is either not stabilizing, or is moving out of a jump pad.
6529 (linux_fast_tracepoint_collecting): New.
6530 (maybe_move_out_of_jump_pad): New.
6531 (enqueue_one_deferred_signal): New.
6532 (dequeue_one_deferred_signal): New.
6533 (linux_wait_for_event_1): If moving out of a jump pad, defer
6534 pending signals to later.
6535 (linux_stabilize_threads): New.
6536 (linux_wait_1): Check if threads need moving out of jump pads, and
6537 do it if so.
6538 (stuck_in_jump_pad_callback): New.
6539 (move_out_of_jump_pad_callback): New.
6540 (lwp_running): New.
6541 (linux_resume_one_lwp): Handle moving out of jump pads.
6542 (linux_set_resume_request): Dequeue deferred signals.
6543 (need_step_over_p): Also step over fast tracepoint jumps.
6544 (start_step_over): Also uninsert fast tracepoint jumps.
6545 (finish_step_over): Also reinsert fast tracepoint jumps.
6546 (linux_install_fast_tracepoint_jump): New.
6547 (linux_target_ops): Install linux_stabilize_threads and
6548 linux_install_fast_tracepoint_jump_pad.
6549 * linux-low.h (linux_target_ops) <get_thread_area,
6550 install_fast_tracepoint_jump_pad>: New fields.
6551 (struct lwp_info) <collecting_fast_tracepoint,
6552 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6553 (linux_get_thread_area): Declare.
6554 * linux-x86-low.c (jump_insn): New.
6555 (x86_get_thread_area): New.
6556 (append_insns): New.
6557 (push_opcode): New.
6558 (amd64_install_fast_tracepoint_jump_pad): New.
6559 (i386_install_fast_tracepoint_jump_pad): New.
6560 (x86_install_fast_tracepoint_jump_pad): New.
6561 (the_low_target): Install x86_get_thread_area and
6562 x86_install_fast_tracepoint_jump_pad.
6563 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6564 (struct fast_tracepoint_jump): New.
6565 (fast_tracepoint_jump_insn): New.
6566 (fast_tracepoint_jump_shadow): New.
6567 (find_fast_tracepoint_jump_at): New.
6568 (fast_tracepoint_jump_here): New.
6569 (delete_fast_tracepoint_jump): New.
6570 (set_fast_tracepoint_jump): New.
6571 (uninsert_fast_tracepoint_jumps_at): New.
6572 (reinsert_fast_tracepoint_jumps_at): New.
6573 (set_breakpoint_at): Use write_inferior_memory.
6574 (uninsert_raw_breakpoint): Use write_inferior_memory.
6575 (check_mem_read): Mask out fast tracepoint jumps.
6576 (check_mem_write): Mask out fast tracepoint jumps.
6577 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6578 (set_fast_tracepoint_jump): Declare.
6579 (delete_fast_tracepoint_jump)
6580 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6581 (reinsert_fast_tracepoint_jumps_at): Declare.
6582 * regcache.c: Don't compile many functions when building the
6583 in-process agent library.
6584 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6585 the register buffer in the heap.
6586 (free_register_cache): If the register buffer isn't owned by the
6587 regcache, don't free it.
6588 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6589 pre-existing register caches.
6590 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6591 type.
6592 (convert_ascii_to_int): : Constify `from' parameter type.
6593 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6594 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6595 the needed buffer in-place.
6596 (relocate_instruction): New.
6597 * server.c (handle_query) <qSymbols>: If the target supports
6598 tracepoints, give it a chance of looking up symbols. Report
6599 support for fast tracepoints.
6600 (handle_status): Stabilize threads.
6601 (process_serial_event): Adjust.
6602 * server.h (struct fast_tracepoint_jump): Forward declare.
6603 (struct process_info) <fast_tracepoint_jumps>: New field.
6604 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6605 (decode_X_packet, decode_M_packet): Adjust.
6606 (relocate_instruction): Declare.
6607 (in_process_agent_loaded): Declare.
6608 (tracepoint_look_up_symbols): Declare.
6609 (struct fast_tpoint_collect_status): Declare.
6610 (fast_tracepoint_collecting): Declare.
6611 (force_unlock_trace_buffer): Declare.
6612 (handle_tracepoint_bkpts): Declare.
6613 (initialize_low_tracepoint)
6614 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6615 * target.h (struct target_ops) <stabilize_threads,
6616 install_fast_tracepoint_jump_pad>: New fields.
6617 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6618 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6619 [HAVE_STDINT_H]: Include stdint.h.
6620 (trace_debug_1): Rename to ...
6621 (trace_vdebug): ... this.
6622 (trace_debug): Rename to ...
6623 (trace_debug_1): ... this. Add `level' parameter.
6624 (trace_debug): New.
6625 (ATTR_USED, ATTR_NOINLINE): New.
6626 (IP_AGENT_EXPORT): New.
6627 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6628 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6629 (about_to_request_buffer_space, trace_buffer_is_full)
6630 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6631 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6632 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6633 (traceframe_write_count, traceframes_created)
6634 (trace_state_variables)
6635 New renaming defines.
6636 (struct ipa_sym_addresses): New.
6637 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6638 (symbol_list): New.
6639 (ipa_sym_addrs): New.
6640 (all_tracepoint_symbols_looked_up): New.
6641 (in_process_agent_loaded): New.
6642 (write_e_ipa_not_loaded): New.
6643 (maybe_write_ipa_not_loaded): New.
6644 (tracepoint_look_up_symbols): New.
6645 (debug_threads) [IN_PROCESS_AGENT]: New.
6646 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6647 (UNKNOWN_SIDE_EFFECTS): New.
6648 (stop_tracing): New.
6649 (flush_trace_buffer): New.
6650 (stop_tracing_bkpt): New.
6651 (flush_trace_buffer_bkpt): New.
6652 (read_inferior_integer): New.
6653 (read_inferior_uinteger): New.
6654 (read_inferior_data_pointer): New.
6655 (write_inferior_data_pointer): New.
6656 (write_inferior_integer): New.
6657 (write_inferior_uinteger): New.
6658 (struct collect_static_trace_data_action): Delete.
6659 (enum tracepoint_type): New.
6660 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6661 <actions_str, step_actions, step_actions_str>: Only include in
6662 GDBserver.
fa593d66
PA
6663 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6664 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6665 (tracepoints): Use IP_AGENT_EXPORT.
6666 (last_tracepoint): Don't include in the IPA.
6667 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6668 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6669 (alloced_trace_state_variables): New.
6670 (trace_state_variables): Use IP_AGENT_EXPORT.
6671 (traceframe_t): Delete unused variable.
6672 (circular_trace_buffer): Don't include in the IPA.
6673 (trace_buffer_start): Delete.
6674 (struct trace_buffer_control): New.
6675 (trace_buffer_free): Delete.
6676 (struct ipa_trace_buffer_control): New.
6677 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6678 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6679 New.
6680 (trace_buffer_ctrl): New.
6681 (TRACE_BUFFER_CTRL_CURR): New.
6682 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6683 Reimplement as macros.
6684 (trace_buffer_wrap): Delete.
6685 (traceframe_write_count, traceframe_read_count)
6686 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6687 (struct tracepoint_hit_ctx) <type>: New field.
6688 (struct fast_tracepoint_ctx): New.
6689 (memory_barrier): New.
6690 (cmpxchg): New.
6691 (record_tracepoint_error): Update atomically in the IPA.
6692 (clear_inferior_trace_buffer): New.
6693 (about_to_request_buffer_space): New.
6694 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6695 updating the same buffer.
6696 (add_tracepoint): Default the tracepoint's type to trap
6697 tracepoint, and orig_size to -1.
6698 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6699 internal variables.
6700 (create_trace_state_variable): New parameter `gdb'. Handle it.
6701 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6702 (cmd_qtdp): Handle fast tracepoints.
6703 (cmd_qtdv): Adjust.
6704 (max_jump_pad_size): New.
6705 (gdb_jump_pad_head): New.
6706 (get_jump_space_head): New.
6707 (claim_jump_space): New.
6708 (sort_tracepoints): New.
6709 (MAX_JUMP_SIZE): New.
6710 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6711 IPA.
6712 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6713 support. Upload fast traceframes, and delete internal IPA
6714 breakpoints.
6715 (stop_tracing_handler): New.
6716 (flush_trace_buffer_handler): New.
6717 (cmd_qtstop): Upload fast tracepoints.
6718 (response_tracepoint): Handle fast tracepoints.
6719 (tracepoint_finished_step): Upload fast traceframes. Set the
6720 tracepoint hit context's tracepoint type.
6721 (handle_tracepoint_bkpts): New.
6722 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6723 type. Add comment about fast tracepoints.
6724 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6725 non-existing action_str field.
6726 (get_context_regcache): Handle fast tracepoints.
6727 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6728 to the regcache.
6729 (fast_tracepoint_from_jump_pad_address): New.
6730 (fast_tracepoint_from_ipa_tpoint_address): New.
6731 (collecting_t): New.
6732 (force_unlock_trace_buffer): New.
6733 (fast_tracepoint_collecting): New.
6734 (collecting): New.
6735 (gdb_collect): New.
6736 (write_inferior_data_ptr): New.
6737 (target_tp_heap): New.
6738 (target_malloc): New.
6739 (download_agent_expr): New.
6740 (UALIGN): New.
6741 (download_tracepoints): New.
6742 (download_trace_state_variables): New.
6743 (upload_fast_traceframes): New.
6744 (IPA_FIRST_TRACEFRAME): New.
6745 (IPA_NEXT_TRACEFRAME_1): New.
6746 (IPA_NEXT_TRACEFRAME): New.
6747 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6748 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6749 (gdb_jump_pad_buffer_end): New.
6750 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6751 (initialize_tracepoint): Adjust.
6752 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6753 buffer. Initialize the low module.
6754 * utils.c (PREFIX, TOOLNAME): New.
6755 (malloc_failure): Use PREFIX.
6756 (error): In the IPA, an error causes an exit.
6757 (fatal, warning): Use PREFIX.
6758 (internal_error): Use TOOLNAME.
6759 (NUMCELLS): Increase to 10.
6760 * configure, config.in: Regenerate.
6761
d149dd1d
PA
67622010-06-01 Pedro Alves <pedro@codesourcery.com>
6763
6764 * server.c (handle_query) <qSupported>: Do two passes over the
6765 qSupported string to avoid nesting strtok.
6766
f6528abd
JK
67672010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6768
6769 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6770 (CDEPS): New.
6771 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6772 -Wl,--dynamic-list.
6773 * configure: Regenerate.
6774 * proc-service.list: New.
6775
ca2a87a0
JK
67762010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6777
6778 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6779 New comment.
6780
363a6e9f
OS
67812010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6782
6783 * gdbreplay.c (remote_open): Check error return from socket() call by
6784 its equality to -1 not by it being negative.
6785 * remote-utils.c (remote_open): Likewise.
6786
d23b6cb1
PA
67872010-05-23 Pedro Alves <pedro@codesourcery.com>
6788
6789 * config.h: Regenerate.
6790
28d3cf85
MK
67912010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6792
6793 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6794 doesn't provide PTRACE_GET_THREAD_AREA.
6795
fea36a59
MK
67962010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6797
6798 * linux-m68k-low.c: Include <asm/ptrace.h>
6799 (ps_get_thread_area): Implement.
6800
24b066ba
DE
68012010-05-03 Doug Evans <dje@google.com>
6802
6803 * event-loop.c (struct callback_event): New struct.
6804 (callback_list): New global.
6805 (append_callback_event, delete_callback_event): New functions.
6806 (process_callback): New function.
6807 (start_event_loop): Call it.
6808 * remote-utils.c (NOT_SCHEDULED): Define.
6809 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6810 moved out of readchar.
6811 (readchar): Rewrite. Call reschedule before returning.
6812 (reset_readchar): New function.
6813 (remote_close): Call it.
6814 (process_remaining, reschedule): New functions.
6815 * server.h (callback_handler_func): New typedef.
6816 (append_callback_event, delete_callback_event): Declare.
6817
9836d6ea
PA
68182010-05-03 Pedro Alves <pedro@codesourcery.com>
6819
6820 * proc-service.c (ps_pglobal_lookup): Use
6821 thread_db_look_up_one_symbol.
6822 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6823 parameter. Use it instead of all_symbols_looked_up.
6824 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6825 field.
6826 (all_symbols_looked_up): Don't declare.
6827 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6828 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6829 field.
6830 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6831 Set all_symbols_looked_up here.
6832 (thread_db_look_up_one_symbol): New.
6833 (thread_db_get_tls_address): Adjust.
6834 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6835 thread_db object on the heap, and tentatively set it in the
6836 process structure.
6837 (thread_db_init): Don't set all_symbols_looked_up here.
6838 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6839
7984d532
PA
68402010-05-03 Pedro Alves <pedro@codesourcery.com>
6841
6842 * linux-low.c (linux_kill, linux_detach): Adjust.
6843 (status_pending_p_callback): Remove redundant statement. Check
6844 for !TARGET_WAITIKIND_IGNORE, instead of
6845 TARGET_WAITKIND_STOPPED.
6846 (handle_tracepoints): Make sure LWP is locked. Adjust.
6847 (linux_wait_for_event_1): Adjust.
6848 (linux_cancel_breakpoints): New.
6849 (unsuspend_one_lwp): New.
6850 (unsuspend_all_lwps): New.
6851 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6852 (send_sigstop_callback): Change return type to int, add new
6853 `except' parameter and handle it.
6854 (suspend_and_send_sigstop_callback): New.
6855 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6856 pass them down. If SUSPEND, also increment the lwp's suspend
6857 count.
6858 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6859 (need_step_over_p): Don't consider suspended LWPs.
6860 (start_step_over): Adjust.
6861 (proceed_one_lwp): Change return type to int, add new `except'
6862 parameter and handle it.
6863 (unsuspend_and_proceed_one_lwp): New.
6864 (proceed_all_lwps): Use find_inferior instead of
6865 for_each_inferior.
6866 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6867 also decrement the suspend count of LWPs. Pass `except' down,
6868 instead of hacking its suspend count.
6869 (linux_pause_all): Add `freeze' parameter. Adjust.
6870 (linux_unpause_all): New.
6871 (linux_target_ops): Install linux_unpause_all.
6872 * server.c (handle_status): Adjust.
6873 * target.h (struct target_ops): New fields `unpause_all' and
6874 `cancel_breakpoints'. Add new parameter to `pause_all'.
6875 (pause_all): Add new `freeze' parameter.
6876 (unpause_all): New.
6877 (cancel_breakpoints): New.
6878 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6879 cancel breakpoints.
6880 (cmd_qtstart): Pause threads.
6881 (stop_tracing): Pause threads, and cancel breakpoints.
6882 * win32-low.c (win32_target_ops): Adjust.
6883
e471f25b
PA
68842010-05-03 Pedro Alves <pedro@codesourcery.com>
6885
6886 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6887 the inferior right away from here...
6888 (linux_wait_1): ... to here, and adjust to check the thread's
6889 last_resume_kind instead of the lwp's step or stop_expected flags.
6890
1915ef4f
PA
68912010-05-02 Pedro Alves <pedro@codesourcery.com>
6892
6893 * README: Use consistent `GDB' and `GDBserver' spellings.
6894
f9e39928
PA
68952010-05-02 Pedro Alves <pedro@codesourcery.com>
6896
6897 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6898 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6899 (linux_detach_one_lwp): Assume the lwp is stopped.
6900 (any_thread_of): Delete.
6901 (linux_detach): Stop all lwps here. Don't blindly delete all
6902 breakpoints.
6903 (delete_lwp_callback): New.
6904 (linux_mourn): Delete all lwps of the process that is gone.
6905 (linux_wait_1): Don't delete the last lwp of the process here.
6906 * mem-break.h (mark_breakpoints_out): Declare.
6907 * mem-break.c (mark_breakpoints_out): New.
6908 (free_all_breakpoints): Use it.
6909 * server.c (handle_target_event): If the process is gone, mark
6910 breakpoints out.
6911 * thread-db.c (struct thread_db) <create_bp>: New field.
6912 (thread_db_enable_reporting): Fix prototype. Store a thread event
6913 breakpoint reference in the thread_db struct.
6914 (thread_db_load_search): Clear the thread_db object.
6915 (try_thread_db_load_1): Ditto.
6916 (switch_to_process): New.
6917 (disable_thread_event_reporting): Use it.
6918 (remove_thread_event_breakpoints): New.
6919 (thread_db_detach, thread_db_mourn): Use it.
6920
1e7fc18c
PA
69212010-05-01 Pedro Alves <pedro@codesourcery.com>
6922
6923 * linux-low.c (linux_enable_event_reporting): New.
6924 (linux_wait_for_event_1, handle_extended_wait): Use it.
6925
02fc4de7
PA
69262010-04-30 Pedro Alves <pedro@codesourcery.com>
6927
6928 * linux-low.c (linux_kill_one_lwp, linux_kill)
6929 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6930 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6931 SIGSTOP even if the LWP is stopped.
6932 (send_sigstop_callback): New.
6933 (stop_all_lwps): Use send_sigstop_callback instead.
6934 (linux_resume_one_thread): Adjust.
6935 (proceed_one_lwp): Still proceed an LWP that the client has
6936 requested to stop, if we haven't reported it as stopped yet. Make
6937 sure that LWPs the client want stopped, have a pending SIGSTOP.
6938
bc3b5632
DE
69392010-04-26 Doug Evans <dje@google.com>
6940
ae1ada35
DE
6941 * server.c (handle_general_set): Make static.
6942
bc3b5632
DE
6943 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6944 Print received char after testing for error/eof instead of before.
6945 (input_interrupt): Tweak comment.
6946
65730243
DE
69472010-04-23 Doug Evans <dje@google.com>
6948
6949 * server.c (start_inferior): Print inferior argv if --debug.
6950
a8ae7dc0
AR
69512010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6952
6953 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6954 * nto-x86-low.c: Include server.h
6955
1c07cc19
PM
69562010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6957
6958 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6959 be consistent with other sources of this directory.
6960 (init_registers_amd64): Correct name of source file of this function
6961 in the comment.
6962
e0a61e09
PM
69632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6964
6965 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6966 64-bit executables.
6967
54709339
PM
69682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6969
6970 * win32-i386-low.c: Add 64-bit support.
6971 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6972 (init_registers_amd64): Declare.
6973 (mappings): Add 64-bit version of array.
6974 (init_windows_x86): New function.
6975 (the_low_target): Change init_arch field to init_windows_x86.
6976
e8f0053d
PM
69772010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6978
6979 * win32-low.c: Adapt to support also 64-bit architecture.
6980 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6981 (get_image_name): Use SIZE_T type for local variable `done'.
6982 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6983 (toolhelp_get_dll_name): Idem.
6984 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6985 Use uintptr_t typecast to avoid warning.
6986 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6987 (handle_exception): Use phex_nz to avoid warning.
6988 (win32_wait): Remove unused local variable `process'.
6989
c481e77e
PM
69902010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6991
6992 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6993 `amd64-avx.o'.
6994
12ea4b69
PM
69952010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6996
6997 * configure.ac: Use `ws2_32' library for srv_mingw.
6998 * configure: Regenerate.
6999 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7000 * remote-utils.c: Likewise.
7001
f6d1620c
L
70022010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7003
7004 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7005 if __x86_64__ is defined.
7006
8e642873
PM
70072010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7008
7009 * configure: Regenerate.
7010
711e434b
PM
70112010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7012
7013 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7014 * target.h (target_ops): New get_tib_address field.
7015 * win32-low.h (win32_thread_info): Add thread_local_base field.
7016 * win32-low.c (child_add_thread): Add tlb argument.
7017 Set thread_local_base field to TLB.
7018 (get_child_debug_event): Adapt to child_add_thread change.
7019 (win32_get_tib_address): New function.
7020 (win32_target_ops): Set get_tib_address field to
7021 win32_get_tib_address.
7022 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7023
505106cd
PA
70242010-04-12 Pedro Alves <pedro@codesourcery.com>
7025
505106cd
PA
7026 * linux-low.c (linux_mourn): Also remove the process.
7027 * server.c (handle_target_event): Don't remove the process here.
7028 * nto-low.c (nto_mourn): New.
7029 (nto_target_ops): Install it.
7030 * spu-low.c (spu_mourn): New.
7031 (spu_target_ops): Install it.
7032 * win32-low.c (win32_mourn): New.
7033 (win32_target_ops): Install it.
7034
e8470a06
PA
70352010-04-12 Pedro Alves <pedro@codesourcery.com>
7036
7037 * server.h (buffer_xml_printf): Remove redundant `;'.
7038
45ba0d02
PA
70392010-04-12 Pedro Alves <pedro@codesourcery.com>
7040
7041 * regcache.c (set_register_cache): Invalidate regcaches before
7042 changing the register cache layout.
7043 (regcache_invalidate_one): Allow a NULL regcache.
7044 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7045 regcaches before changing the register cache layout or the target
7046 regsets.
7047
59e04013
L
70482010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7049
7050 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7051 variable warning on Linux/x86-64.
7052
8336d594
PA
70532010-04-11 Pedro Alves <pedro@codesourcery.com>
7054
7055 GDBserver disconnected tracing support.
7056
7057 * linux-low.c (linux_remove_process): Delete.
7058 (add_lwp): Don't set last_resume_kind here.
7059 (linux_kill): Use `mourn'.
7060 (linux_detach): Use `thread_db_detach', and `mourn'.
7061 (linux_mourn): New.
7062 (linux_attach_lwp_1): Adjust comment.
7063 (linux_attach): last_resume_kind moved the thread_info; adjust.
7064 (status_pending_p_callback): Adjust.
7065 (linux_wait_for_event_1): Adjust.
7066 (count_events_callback, select_singlestep_lwp_callback)
7067 (select_event_lwp_callback, cancel_breakpoints_callback)
7068 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7069 (proceed_one_lwp): Adjust.
7070 (linux_async): Add debug output.
7071 (linux_thread_stopped): New.
7072 (linux_pause_all): New.
7073 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7074 linux_pause_all.
7075 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7076 (thread_db_free): Delete declaration.
7077 (thread_db_detach, thread_db_mourn): Declare.
7078 * thread-db.c (thread_db_init): Use thread_db_mourn.
7079 (thread_db_free): Delete, split in two.
7080 (disable_thread_event_reporting): New.
7081 (thread_db_detach): New.
7082 (thread_db_mourn): New.
7083
7084 * server.h (struct thread_info) <last_resume_kind>: New field.
7085 <attached>: Add comment.
7086 <gdb_detached>: New field.
7087 (handler_func): Change return type to int.
7088 (handle_serial_event, handle_target_event): Ditto.
7089 (gdb_connected): Declare.
7090 (tracing): Delete.
7091 (disconnected_tracing): Declare.
7092 (stop_tracing): Declare.
7093
7094 * server.c (handle_query) <qSupported>: Report support for
7095 disconnected tracing.
7096 (queue_stop_reply_callback): Account for running threads.
7097 (gdb_wants_thread_stopped): New.
7098 (gdb_wants_all_threads_stopped): New.
7099 (gdb_reattached_process): New.
7100 (handle_status): Clear the `gdb_detached' flag of all processes.
7101 In all-stop, stop all threads.
7102 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7103 (process_serial_event): If the remote connection breaks, or if an
7104 exit was forced with "monitor exit", force an event loop exit.
7105 Handle disconnected tracing on detach.
7106 (handle_serial_event): Adjust.
7107 (handle_target_event): If GDB isn't connected, forward events back
7108 to the inferior, unless the last process exited, in which case,
7109 exit gdbserver. Adjust interface.
7110
7111 * remote-utils.c (remote_open): Don't block in accept. Instead
7112 register an event loop source on the listen socket file
7113 descriptor. Refactor bits into ...
7114 (listen_desc): ... this new global.
7115 (gdb_connected): ... this new function.
7116 (enable_async_notification): ... this new function.
7117 (handle_accept_event): ... this new function.
7118 (remote_close): Clear remote_desc.
7119
7120 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7121
7122 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7123 New fields.
7124 (mourn_inferior): Define.
7125 (target_process_qsupported): Avoid the dangling else problem.
7126 (thread_stopped): Define.
7127 (pause_all): Define.
7128 (target_waitstatus_to_string): Declare.
7129 * target.c (target_waitstatus_to_string): New.
7130
7131 * tracepoint.c (tracing): Make extern.
7132 (disconnected_tracing): New.
7133 (stop_tracing): Make extern. Handle tracing stops due to GDB
7134 disconnecting.
7135 (cmd_qtdisconnected): New.
7136 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7137 (handle_tracepoint_general_set): Handle QTDisconnected.
7138
7139 * event-loop.c (event_handler_func): Change return type to int.
7140 (process_event): Bail out if the event handler wants the event
7141 loop to stop.
7142 (handle_file_event): Ditto.
7143 (start_event_loop): Bail out if the event handler wants the event
7144 loop to stop.
7145
7146 * nto-low.c (nto_target_ops): Adjust.
7147 * spu-low.c (spu_wait): Don't remove the process here.
7148 (spu_target_ops): Adjust.
7149 * win32-low.c (win32_wait): Don't remove the process here.
7150 (win32_target_ops): Adjust.
7151
5d267c4c
PA
71522010-04-11 Pedro Alves <pedro@codesourcery.com>
7153
7154 * regcache.c (realloc_register_cache): Invalidate inferior's
7155 regcache before recreating it.
7156
623ccd72
PA
71572010-04-09 Pedro Alves <pedro@codesourcery.com>
7158
7159 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7160
219f2f23
PA
71612010-04-09 Stan Shebs <stan@codesourcery.com>
7162 Pedro Alves <pedro@codesourcery.com>
7163
7164 * server.h (LONGEST): New.
7165 (struct thread_info) <while_stepping>: New field.
7166 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7167 Declare.
7168 (initialize_tracepoint, handle_tracepoint_general_set)
7169 (handle_tracepoint_query, tracepoint_finished_step)
7170 (tracepoint_was_hit, release_while_stepping_state_list):
7171 (current_traceframe): Declare.
7172 * server.c (handle_general_set): Handle tracepoint packets.
7173 (read_memory): New.
7174 (write_memory): New.
7175 (handle_search_memory_1): Use read_memory.
7176 (handle_query): Report support for conditional tracepoints, trace
7177 state variables, and tracepoint sources. Handle tracepoint
7178 queries.
7179 (main): Initialize the tracepoints module.
7180 (process_serial_event): Handle traceframe reads/writes.
7181
7182 * linux-low.c (handle_tracepoints): New.
7183 (linux_wait_1): Call it.
7184 (linux_resume_one_lwp): Handle while-stepping.
7185 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7186 (linux_target_ops): Install them.
7187 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7188 New field.
7189 * linux-x86-low.c (x86_supports_tracepoints): New.
7190 (the_low_target). Install it.
7191
7192 * mem-break.h (delete_breakpoint): Declare.
7193 * mem-break.c (delete_breakpoint): Make external.
7194
7195 * target.h (struct target_ops): Add `supports_tracepoints',
7196 `read_pc', and `write_pc' fields.
7197 (target_supports_tracepoints): Define.
7198 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7199 (phex_nz): New.
7200
7201 * regcache.h (struct regcache) <registers_owned>: New field.
7202 (init_register_cache, regcache_cpy): Declare.
7203 (regcache_read_pc, regcache_write_pc): Declare.
7204 (register_cache_size): Declare.
7205 (supply_regblock): Declare.
7206 * regcache.c (init_register_cache): New.
7207 (new_register_cache): Use it.
7208 (regcache_cpy): New.
7209 (register_cache_size): New.
7210 (supply_regblock): New.
7211 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7212
219f2f23
PA
7213 * tracepoint.c: New.
7214
7215 * Makefile.in (OBS): Add tracepoint.o.
7216 (tracepoint.o): New rule.
7217
3a13a53b
L
72182010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7219
7220 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7221 (i386-mmx.o): New.
7222 (i386-mmx.c): Likewise.
7223 (i386-mmx-linux.o): Likewise.
7224 (i386-mmx-linux.c): Likewise.
7225
7226 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7227 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7228 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7229 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7230
7231 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7232 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7233 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7234
1570b33e
L
72352010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7236
7237 * Makefile.in (clean): Updated.
7238 (i386-avx.o): New.
7239 (i386-avx.c): Likewise.
7240 (i386-avx-linux.o): Likewise.
7241 (i386-avx-linux.c): Likewise.
7242 (amd64-avx.o): Likewise.
7243 (amd64-avx.c): Likewise.
7244 (amd64-avx-linux.o): Likewise.
7245 (amd64-avx-linux.c): Likewise.
7246
7247 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7248 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7249 (srv_amd64_regobj): Add amd64-avx.o.
7250 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7251 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7252 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7253 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7254 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7255 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7256 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7257
7258 * i387-fp.c: Include "i386-xstate.h".
7259 (i387_xsave): New.
7260 (i387_cache_to_xsave): Likewise.
7261 (i387_xsave_to_cache): Likewise.
7262 (x86_xcr0): Likewise.
7263
7264 * i387-fp.h (i387_cache_to_xsave): Likewise.
7265 (i387_xsave_to_cache): Likewise.
7266 (x86_xcr0): Likewise.
7267
7268 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7269 * linux-crisv32-low.c (target_regsets): Likewise.
7270 * linux-m68k-low.c (target_regsets): Likewise.
7271 * linux-mips-low.c (target_regsets): Likewise.
7272 * linux-ppc-low.c (target_regsets): Likewise.
7273 * linux-s390-low.c (target_regsets): Likewise.
7274 * linux-sh-low.c (target_regsets): Likewise.
7275 * linux-sparc-low.c (target_regsets): Likewise.
7276 * linux-xtensa-low.c (target_regsets): Likewise.
7277
7278 * linux-low.c: Include <sys/uio.h>.
7279 (regsets_fetch_inferior_registers): Support nt_type.
7280 (regsets_store_inferior_registers): Likewise.
7281 (linux_process_qsupported): New.
7282 (linux_target_ops): Add linux_process_qsupported.
7283
7284 * linux-low.h (regset_info): Add nt_type.
7285 (linux_target_ops): Add process_qsupported.
7286
7287 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7288 and <sys/uio.h>.
7289 (init_registers_i386_avx_linux): New.
7290 (init_registers_amd64_avx_linux): Likewise.
7291 (xmltarget_i386_linux_no_xml): Likewise.
7292 (xmltarget_amd64_linux_no_xml): Likewise.
7293 (PTRACE_GETREGSET): Likewise.
7294 (PTRACE_SETREGSET): Likewise.
7295 (x86_fill_xstateregset): Likewise.
7296 (x86_store_xstateregset): Likewise.
7297 (use_xml): Likewise.
7298 (x86_linux_update_xmltarget): Likewise.
7299 (x86_linux_process_qsupported): Likewise.
7300 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7301 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7302 init_registers_i386_linux here. Call
7303 x86_linux_update_xmltarget.
7304 (the_low_target): Add x86_linux_process_qsupported.
7305
7306 * server.c (handle_query): Call target_process_qsupported.
7307
7308 * target.h (target_ops): Add process_qsupported.
7309 (target_process_qsupported): New.
7310
fc7238bb
PA
73112010-04-03 Pedro Alves <pedro@codesourcery.com>
7312
7313 * inferiors.c (add_thread): Set last_status kind to
7314 TARGET_WAITKIND_IGNORE.
7315 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7316 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7317 (linux_wait_1): Move `thread' local definition to block that uses
7318 it. Don't NULL initialize `event_child'.
7319 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7320 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7321 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7322
bdabb078
PA
73232010-04-01 Pedro Alves <pedro@codesourcery.com>
7324
7325 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7326 an extended waitstatus, or by a watchpoint.
7327 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7328 thread was stepping or has been stopped by a watchpoint.
7329
d3bbe7a0
PA
73302010-04-01 Pedro Alves <pedro@codesourcery.com>
7331
7332 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7333 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7334 of another, then delete the previous, and validate all
7335 breakpoints.
7336 (validate_inserted_breakpoint): New.
7337 (delete_disabled_breakpoints): New.
7338 (validate_breakpoints): New.
7339 (check_mem_read): Validate breakpoints before trusting their
7340 shadow. Delete disabled breakpoints.
7341 (check_mem_write): Validate breakpoints before trusting they
7342 should be inserted. Delete disabled breakpoints.
7343 * mem-break.h (validate_breakpoints):
7344 * server.c (handle_query): Validate breakpoints when we see a
7345 qSymbol query.
7346
8b07ae33
PA
73472010-04-01 Pedro Alves <pedro@codesourcery.com>
7348
7349 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7350 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7351 if we could tell there's a GDB breakpoint at stop_pc.
7352 (need_step_over_p): Don't do a step over if we find a GDB
7353 breakpoint at the resume PC.
7354
7355 * mem-break.c (struct raw_breakpoint): New.
7356 (enum bkpt_type): New type `gdb_breakpoint'.
7357 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7358 fields. New field `raw'.
7359 (find_raw_breakpoint_at): New.
7360 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7361 breakpoint instead.
7362 (set_breakpoint_at): Adjust.
7363 (delete_raw_breakpoint): New.
7364 (release_breakpoint): New.
7365 (delete_breakpoint): Rename to...
7366 (delete_breakpoint_1): ... this. Add proc parameter. Use
7367 release_breakpoint. Return ENOENT.
7368 (delete_breakpoint): Reimplement.
7369 (find_breakpoint_at): Delete.
7370 (find_gdb_breakpoint_at): New.
7371 (delete_breakpoint_at): Delete.
7372 (set_gdb_breakpoint_at): New.
7373 (delete_gdb_breakpoint_at): New.
7374 (gdb_breakpoint_here): New.
7375 (set_reinsert_breakpoint): Use release_breakpoint.
7376 (uninsert_breakpoint): Rename to ...
7377 (uninsert_raw_breakpoint): ... this.
7378 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7379 (reinsert_raw_breakpoint): Change parameter type to
7380 raw_breakpoint.
7381 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7382 instead.
7383 (check_breakpoints): Adjust. Use release_breakpoint.
7384 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7385 (breakpoint_inserted_here): Ditto.
7386 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7387 Don't trust the breakpoint's shadow if it is not inserted.
7388 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7389 (delete_all_breakpoints): Adjust.
7390 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7391 use delete_breakpoint_1.
7392
7393 * mem-break.h (breakpoints_supported): Delete declaration.
7394 (set_gdb_breakpoint_at): Declare.
7395 (gdb_breakpoint_here): Declare.
7396 (delete_breakpoint_at): Delete.
7397 (delete_gdb_breakpoint_at): Declare.
7398
7399 * server.h (struct raw_breakpoint): Forward declare.
7400 (struct process_info): New field `raw_breakpoints'.
7401
7402 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7403 breakpoints.
7404
6bf5e0ba
PA
74052010-03-24 Pedro Alves <pedro@codesourcery.com>
7406
7407 * linux-low.c (status_pending_p_callback): Fix comment.
7408 (linux_wait_for_event_1): Move most of the internal breakpoint
7409 handling from here...
7410 (linux_wait_1): ... to here.
7411 (count_events_callback): New.
7412 (select_singlestep_lwp_callback): New.
7413 (select_event_lwp_callback): New.
7414 (cancel_breakpoints_callback): New.
7415 (select_event_lwp): New.
7416 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7417 priority to all LWPs that have had events that should be reported
7418 to the client. Cancel breakpoints when about to reporting the
7419 event to the client, not while stopping lwps. No longer cancel
7420 finished single-steps here.
7421 (cancel_finished_single_step): Delete.
7422 (cancel_finished_single_steps): Delete.
7423
414a389f
PA
74242010-03-24 Pedro Alves <pedro@codesourcery.com>
7425
7426 * mem-break.c (enum bkpt_type): New.
7427 (struct breakpoint): New field `type'.
7428 (set_breakpoint_at): Change return type to struct breakpoint
7429 pointer. Set type to `other_breakpoint' by default.
7430 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7431 in the breakpoint list.
7432 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7433 (reinsert_breakpoint): Rename to ...
7434 (reinsert_raw_breakpoint): ... this.
7435 (reinsert_breakpoints_at): Adjust.
7436 * mem-break.h (struct breakpoint): Declare.
7437 (set_breakpoint_at): Change return type to struct breakpoint
7438 pointer.
7439
2280c721
PA
74402010-03-24 Pedro Alves <pedro@codesourcery.com>
7441
7442 * server.c (handle_query): Assign, not compare.
7443
d50171e4
PA
74442010-03-24 Pedro Alves <pedro@codesourcery.com>
7445
7446 Teach linux gdbserver to step-over-breakpoints.
7447
7448 * linux-low.c (can_hardware_single_step): New.
7449 (supports_breakpoints): New.
7450 (handle_extended_wait): If stopping threads, read the stop pc of
7451 the new cloned LWP.
7452 (get_pc): New.
7453 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7454 low target doesn't support retrieving the PC.
7455 (add_lwp): Set last_resume_kind to resume_continue.
7456 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7457 (linux_attach): Don't clear stop_expected. Set the lwp's
7458 last_resume_kind to resume_stop.
7459 (linux_detach_one_lwp): Don't check for removed breakpoints.
7460 (check_removed_breakpoint): Delete.
7461 (status_pending_p): Rename to ...
7462 (status_pending_p_callback): ... this. Don't check for removed
7463 breakpoints. Don't consider threads that are stopped from GDB's
7464 perspective.
7465 (linux_wait_for_lwp): Always read the stop_pc here.
7466 (cancel_breakpoint): New.
7467 (step_over_bkpt): New global.
7468 (linux_wait_for_event_1): Implement stepping over breakpoints.
7469 (gdb_wants_lwp_stopped): New.
7470 (gdb_wants_all_stopped): New.
7471 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7472 single-step traps here. Store the thread's last reported target
7473 wait status.
7474 (send_sigstop): Don't clear stop_expected. Always set it,
7475 instead.
7476 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7477 (cancel_finished_single_step): New.
7478 (cancel_finished_single_steps): New.
7479 (wait_for_sigstop): Don't cancel finished single-step traps here.
7480 (linux_resume_one_lwp): Don't check for removed breakpoints.
7481 Don't set `step' on non-hardware step archs.
7482 (linux_set_resume_request): Ignore resume_stop requests if already
7483 stopping or stopped. Set the lwp's last_resume_kind.
7484 (resume_status_pending_p): Don't check for removed breakpoints.
7485 (need_step_over_p): New.
7486 (start_step_over): New.
7487 (finish_step_over): New.
7488 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7489 requests. Clear the thread's last reported target waitstatus.
7490 Don't use the `suspended' flag. Don't consider pending breakpoints.
7491 (linux_resume): Start a step-over if necessary.
7492 (proceed_one_lwp): New.
7493 (proceed_all_lwps): New.
7494 (unstop_all_lwps): New.
7495 * linux-low.h (struct lwp_info): Rewrite comment for the
7496 `suspended' flag. Add the `stop_pc' field. Delete the
7497 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7498 Add `'last_resume_kind' and `need_step_over' fields.
7499 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7500 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7501 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7502 (set_raw_breakpoint_at): New.
7503 (set_breakpoint_at): Rewrite to use it.
7504 (reinsert_breakpoint_handler): Delete.
7505 (set_reinsert_breakpoint): New.
7506 (reinsert_breakpoint_by_bp): Delete.
7507 (delete_reinsert_breakpoints): New.
7508 (uninsert_breakpoint): Rewrite.
7509 (uninsert_breakpoints_at): New.
7510 (reinsert_breakpoint): Rewrite.
7511 (reinsert_breakpoints_at): New.
7512 (check_breakpoints): Rewrite.
7513 (breakpoint_here): New.
7514 (breakpoint_inserted_here): New.
7515 (check_mem_read): Adjust.
7516 * mem-break.h (breakpoints_supported, breakpoint_here)
7517 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7518 (reinsert_breakpoint_by_bp): Delete declaration.
7519 (delete_reinsert_breakpoints): Declare.
7520 (reinsert_breakpoint): Delete declaration.
7521 (reinsert_breakpoints_at): Declare.
7522 (uninsert_breakpoint): Delete declaration.
7523 (uninsert_breakpoints_at): Declare.
7524 (check_breakpoints): Adjust prototype.
7525 * server.h: Adjust include order.
7526 (struct thread_info): Declare here. Add a `last_status' field.
7527
30ba68cb
MS
75282010-03-23 Michael Snyder <msnyder@vmware.com>
7529
7530 * server.c (crc32): New function.
7531 (handle_query): Add handling for 'qCRC:' request.
7532
b9a881c2
PA
75332010-03-23 Pedro Alves <pedro@codesourcery.com>
7534
7535 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7536 lwp had been stopped by a watchpoint.
7537
e92d13d5
PA
75382010-03-16 Pedro Alves <pedro@codesourcery.com>
7539
7540 * server.h (internal_error): Declare.
7541 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7542 * utils.c (internal_error): New function.
7543
64daa791
AS
75442010-03-15 Andreas Schwab <schwab@redhat.com>
7545
7546 * configure.srv: Fix typo setting srv_regobj.
7547
f52cd8cd
PA
75482010-03-15 Pedro Alves <pedro@codesourcery.com>
7549
7550 * linux-low.c (fetch_register): Avoid passing a non string literal
7551 format to `error'.
7552 (usr_store_inferior_registers): Ditto.
7553
93ae6fdc
PA
75542010-03-14 Pedro Alves <pedro@codesourcery.com>
7555
7556 * linux-low.c (linux_write_memory): Bail out early if peeking
7557 memory failed.
7558
c3adc08c
PA
75592010-03-14 Pedro Alves <pedro@codesourcery.com>
7560
7561 * linux-low.h (struct lwp_info): New fields
7562 `stopped_by_watchpoint' and `stopped_data_address'.
7563 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7564 here, and cache them in the lwp object.
7565 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7566 directly.
7567 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7568 field.
7569 (linux_stopped_by_watchpoint): Rewrite.
7570 (linux_stopped_data_address): Rewrite.
7571
bce522a2
PA
75722010-03-06 Simo Melenius <simo.melenius@iki.fi>
7573
7574 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7575 switching the current inferior, not before.
7576
90884b2b
L
75772010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7578
7579 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7580 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7581 i386-linux.c and amd64-linux.c.
7582 (reg-i386.o): Removed.
7583 (reg-i386.c): Likewise.
7584 (reg-i386-linux.o): Likewise.
7585 (reg-i386-linux.c): Likewise.
7586 (reg-x86-64.o): Likewise.
7587 (reg-x86-64.c): Likewise.
7588 (reg-x86-64-linux.o): Likewise.
7589 (reg-x86-64-linux.c): Likewise.
7590 (i386.o): New.
7591 (i386.c): Likewise.
7592 (i386-linux.o): Likewise.
7593 (i386-linux.c): Likewise.
7594 (amd64.o): Likewise.
7595 (amd64.c): Likewise.
7596 (amd64-linux.o): Likewise.
7597 (amd64-linux.c): Likewise.
7598
7599 * configure.srv (srv_i386_regobj): New.
7600 (srv_i386_linux_regobj): Likewise.
7601 (srv_amd64_regobj): Likewise.
7602 (srv_amd64_linux_regobj): Likewise.
7603 (srv_i386_32bit_xmlfiles): Likewise.
7604 (srv_i386_64bit_xmlfiles): Likewise.
7605 (srv_i386_xmlfiles): Likewise.
7606 (srv_amd64_xmlfiles): Likewise.
7607 (srv_i386_linux_xmlfiles): Likewise.
7608 (srv_amd64_linux_xmlfiles): Likewise.
7609 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7610 srv_xmlfiles to $srv_i386_xmlfiles.
7611 (i[34567]86-*-mingw32ce*): Likewise.
7612 (i[34567]86-*-mingw*): Likewise.
7613 (i[34567]86-*-nto*): Likewise.
7614 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7615 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7616 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7617 (x86_64-*-linux*): Likewise.
7618
7619 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7620 (init_registers_amd64_linux): New.
7621 (x86_arch_setup): Replace init_registers_x86_64_linux with
7622 init_registers_amd64_linux.
7623
193f13e6
MK
76242010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7625
7626 * configure.ac: Check for libdl. If it is not available link against
7627 static libthread_db.
7628 * configure: Regenerate.
7629
85d721b8
PA
76302010-02-22 Pedro Alves <pedro@codesourcery.com>
7631
7632 PR9605
7633
7634 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7635 handing a read watchpoint.
7636 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7637
6076632b
DE
76382010-02-12 Doug Evans <dje@google.com>
7639
7640 * linux-low.c (linux_supports_tracefork_flag): Document.
7641 (linux_look_up_symbols): Add comment.
7642
3327ccf7
L
76432010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7644
7645 * regcache.c (supply_register): Clear regcache if buf is NULL.
7646
0718675c 76472010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7648 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7649
7650 * inferiors.c (find_inferior): Add function documentation.
7651 (unloaded_dll): Handle the case where the unloaded dll has not
7652 been previously registered in the dll list.
7653
177321bd
DJ
76542010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7655
7656 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7657 (thumb2_breakpoint): New.
7658 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7659
2b009048
DJ
76602010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7661
7662 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7663 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7664 breakpoints.
7665
3be029c7
PA
76662010-01-21 Pedro Alves <pedro@codesourcery.com>
7667
7668 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7669
18f5de3b
JK
76702010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7671
7672 * linux-s390-low.c (s390_collect_ptrace_register)
7673 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7674
3743bb4f
DE
76752010-01-21 Doug Evans <dje@google.com>
7676
14ce3065
DE
7677 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7678 (PTRACE_ARG4_TYPE): New macro.
7679 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7680 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7681 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7682 (usr_store_inferior_registers): Ditto.
7683 (linux_read_memory, linux_write_memory): Ditto.
7684 (linux_test_for_tracefork): Ditto.
7685
3743bb4f
DE
7686 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7687 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7688
8b315be5
PA
76892010-01-21 Pedro Alves <pedro@codesourcery.com>
7690
7691 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7692 target.
7693
85492558
PA
76942010-01-21 Pedro Alves <pedro@codesourcery.com>
7695
7696 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7697 prototype to take a regcache. Adjust.
7698
442ea881
PA
76992010-01-20 Pedro Alves <pedro@codesourcery.com>
7700
7701 * regcache.h (struct thread_info): Forward declare.
7702 (struct regcache): New.
7703 (new_register_cache): Adjust prototype.
7704 (get_thread_regcache): Declare.
7705 (free_register_cache): Adjust prototype.
7706 (registers_to_string, registers_from_string): Ditto.
7707 (supply_register, supply_register_by_name, collect_register)
7708 (collect_register_as_string, collect_register_by_name): Ditto.
7709 * regcache.c (struct inferior_regcache_data): Delete.
7710 (get_regcache): Rename to ...
7711 (get_thread_regcache): ... this. Adjust. Switch inferior before
7712 fetching registers.
7713 (regcache_invalidate_one): Adjust.
7714 (regcache_invalidate): Fix prototype.
7715 (new_register_cache): Return the new register cache.
7716 (free_register_cache): Change prototype.
7717 (realloc_register_cache): Adjust.
7718 (registers_to_string): Change prototype to take a regcache. Adjust.
7719 (registers_from_string): Ditto.
7720 (register_data): Ditto.
7721 (supply_register): Ditto.
7722 (supply_register_by_name): Ditto.
7723 (collect_register): Ditto.
7724 (collect_register_as_string): Ditto.
7725 (collect_register_by_name): Ditto.
7726 * server.c (process_serial_event): Adjust.
7727 * linux-low.h (regset_fill_func, regset_store_func): Change
7728 prototype.
7729 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7730 Change prototype.
7731 * linux-low.c (get_stop_pc): Adjust.
7732 (check_removed_breakpoint): Adjust.
7733 (linux_wait_for_event): Adjust.
7734 (linux_resume_one_lwp): Adjust.
7735 (fetch_register): Add regcache parameter. Adjust.
7736 (usr_store_inferior_registers): Ditto.
7737 (regsets_fetch_inferior_registers): Ditto.
7738 (regsets_store_inferior_registers): Ditto.
7739 (linux_fetch_registers, linux_store_registers): Ditto.
7740 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7741 regcache. Adjust.
43aaf8b6
PA
7742 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7743 Ditto.
442ea881
PA
7744 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7745 prototype to take a regcache.
7746 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7747 * remote-utils.c (convert_ascii_to_int, outreg)
7748 (prepare_resume_reply): Change prototype to take a regcache.
7749 Adjust.
7750 * target.h (struct target_ops) <fetch_registers, store_registers>:
7751 Change prototype to take a regcache.
7752 (fetch_inferior_registers, store_inferior_registers): Change
7753 prototype to take a regcache. Adjust.
7754 * proc-service.c (ps_lgetregs): Adjust.
7755 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7756 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7757 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7758 take a regcache. Adjust.
7759 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7760 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7761 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7762 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7763 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7764 (cris_cannot_fetch_register):
7765 (cris_breakpoint_at): Change prototype to take a regcache.
7766 Adjust.
7767 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7768 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7769 to take a regcache. Adjust.
7770 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7771 Adjust.
7772 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7773 take a regcache. Adjust.
7774 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7775 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7776 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7777 * linux-mips-low.c (mips_get_pc):
7778 (mips_set_pc): Change prototype to take a regcache. Adjust.
7779 (mips_reinsert_addr): Adjust.
7780 (mips_collect_register): Change prototype to take a regcache.
7781 Adjust.
7782 (mips_supply_register):
7783 (mips_collect_register_32bit, mips_supply_register_32bit)
7784 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7785 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7786 * linux-ppc-low.c (ppc_supply_ptrace_register)
7787 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7788 (parse_spufs_run): Adjust.
7789 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7790 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7791 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7792 take a regcache. Adjust.
7793 * linux-s390-low.c (s390_collect_ptrace_register)
7794 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7795 (s390_set_pc): Change prototype to take a regcache. Adjust.
7796 (s390_arch_setup): Adjust.
7797 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7798 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7799 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7800 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7801 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7802 regcache. Adjust.
7803 (sparc_breakpoint_at): Adjust.
7804 * linux-xtensa-low.c (xtensa_fill_gregset):
7805 (xtensa_store_gregset):
7806 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7807 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7808 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7809 prototype to take a regcache. Adjust.
7810 * win32-arm-low.c (arm_fetch_inferior_register)
7811 (arm_store_inferior_register): Change prototype to take a
7812 regcache. Adjust.
7813 * win32-i386-low.c (i386_fetch_inferior_register)
7814 (i386_store_inferior_register): Change prototype to take a
7815 regcache. Adjust.
7816 * win32-low.c (child_fetch_inferior_registers)
7817 (child_store_inferior_registers): Change prototype to take a
7818 regcache. Adjust.
7819 (win32_wait): Adjust.
7820 (win32_fetch_inferior_registers): Change prototype to take a
7821 regcache. Adjust.
7822 (win32_store_inferior_registers): Adjust.
7823 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7824 store_inferior_register>: Change prototype to take a regcache.
7825
60c3d7b0
DE
78262010-01-20 Doug Evans <dje@google.com>
7827
7828 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7829 #ifdef.
7830 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7831 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7832
dc146f7c
VP
78332010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7834
7835 * linux-low.c (linux_core_of_thread): New.
7836 (compare_ints, show_process, list_threads): New.
7837 (linux_qxfer_osdata): Report threads and cores.
7838 (linux_target_op): Register linux_core_of_thread.
7839 * remote-utils.c (prepare_resume_reply): Report the core.
7840 (buffer_xml_printf): Support %d specifier.
7841 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7842 New.
7843 (handle_query): Handle qXfer:threads. Announce availability
7844 thereof.
7845 * target.h (struct target_ops): New field core_of_thread.
7846
7803799a
UW
78472010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7848
7849 * Makefile.in (clean): Remove new generated files.
7850 (reg-s390.o, reg-s390.c): Remove rules.
7851 (reg-s390x.o, reg-s390x.c): Likewise.
7852 (s390-linux32.o, s390-linux32.c): Add rules.
7853 (s390-linux64.o, s390-linux64.c): Likewise.
7854 (s390x-linux64.o, s390x-linux64.c): Likewise.
7855 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7856 * linux-s390-low.c: Include <elf.h>.
7857 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7858 (init_registers_s390): Remove prototype.
7859 (init_registers_s390x): Likewise.
7860 (init_registers_s390_linux32): Add prototype.
7861 (init_registers_s390_linux64): Likewise.
7862 (init_registers_s390x_linux64): Likewise.
7863 (s390_num_regs_3264): New define.
7864 (s390_regmap_3264): New global variable.
7865 (s390_cannot_fetch_register): Remove obsolete check.
7866 (s390_cannot_store_register): Likewise.
7867 (s390_collect_ptrace_register): Handle upper/lower register halves.
7868 (s390_supply_ptrace_register): Likewise.
7869 (s390_fill_gregset): Update to register number changes.
7870 (s390_get_hwcap): New routine.
7871 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7872 Install appropriate regmap and register set.
7873
6e7ffa39
JB
78742010-01-01 Joel Brobecker <brobecker@adacore.com>
7875
7876 * server.c (gdbserver_version): Update copyright year to 2010.
7877 * gdbreplay.c (gdbreplay_version): Likewise.
7878
957f3f49
DE
78792009-12-28 Doug Evans <dje@google.com>
7880
7881 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7882 elf/external.h. Include <elf.h> instead but only if necessary.
7883
ca5c370d
PA
78842009-12-28 Pedro Alves <pedro@codesourcery.com>
7885
7886 * linux-low.c (linux_remove_process): Remove `detaching'
7887 parameter. Don't release/detach from thread_db here.
7888 (linux_kill): Release/detach from thread_db here, ...
7889 (linux_detach): ... and here, before actually detaching.
7890 (linux_wait_1): ... and here, when a process exits.
7891 * thread-db.c (any_thread_of): New.
7892 (thread_db_free): Switch the current inferior to a thread of the
7893 passed in process.
7894
4ee62156
DE
78952009-12-21 Doug Evans <dje@google.com>
7896
d90e6a88
DE
7897 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7898
c5f62d5f
DE
7899 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7900 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7901 warning ifndef __NR_tkill. Move setting of errno there too.
7902 Delete unnecessary resetting of errno after syscall.
7903 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7904
10e86dd7
DE
7905 * configure.ac: Check for dladdr.
7906 * config.in: Regenerate.
7907 * configure: Regenerate.
7908 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7909 (try_thread_db_load): Update.
7910
4ee62156
DE
7911 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7912
00f515da
DE
79132009-12-18 Doug Evans <dje@google.com>
7914
e9464885
DE
7915 * event-loop.c: Include unistd.h if it exists.
7916
07d4f67e
DE
7917 * linux-low.c (my_waitpid): Move definition away from being in
7918 between linux_tracefork_child/linux_test_for_tracefork.
7919
00f515da
DE
7920 * gdb_proc_service.h (psaddr_t): Fix type.
7921 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7922 signature to match glibc.
7923
1de1badb
DE
79242009-12-16 Doug Evans <dje@google.com>
7925
7926 * linux-low.c (linux_read_memory): Fix argument to read.
7927
aeeb81d1
PA
79282009-11-26 Pedro Alves <pedro@codesourcery.com>
7929
7930 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7931 events, don't leave current_inferior pointing at null.
7932
10357975
PA
79332009-11-26 Pedro Alves <pedro@codesourcery.com>
7934
7935 * win32-low.c (LOG): Delete.
7936 (OUTMSG): Output to stderr.
7937 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7938 on compile time LOG macro.
7939 (win32_wait): Fix debug output.
7940
cf6e3471
PA
79412009-11-26 Pedro Alves <pedro@codesourcery.com>
7942
7943 * win32-low.c (win32_add_one_solib): If the dll name is
7944 "ntdll.dll", prepend the system directory to the dll path.
7945
0c85e18e
MK
79462009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7947
7948 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7949
9ac544ce 79502009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7951 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7952
7953 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7954 * configure.ac: Check for __mcoldfire__ and set
7955 gdb_cv_m68k_is_coldfire.
7956 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7957 reg-cf.o and reg-m68k.o.
7958 * configure: Regenerated.
7959
fd7dd3e6
PA
79602009-11-16 Pedro Alves <pedro@codesourcery.com>
7961
7962 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7963 Pass it to thread_db_free.
7964 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7965 proper `detaching' argument to linux_remove_process.
7966 * linux-low.h (thread_db_free): Add `detaching' parameter.
7967 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7968 to thread_db_free.
7969 (thread_db_free): Add `detaching' parameter. Only
7970 call td_ta_clear_event if detaching from process.
7971
75aa492e
MK
79722009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7973
7974 * thread-db.c (thread_db_free): Fix typo.
7975
21e1bee4
PP
79762009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7977
7978 PR gdb/10838
7979 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7980
8838b45e
NS
79812009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7982
7983 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7984 with an i686 compiler.
7985 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7986 needed.
7987 * configure: Rebuilt.
7988
8a35fb51
SL
79892009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7990
7991 PR gdb/10783
7992
7993 * server.c (handle_search_memory_1): Correct read_addr initialization
7994 in loop for searching subsequent chunks.
7995
96f15937
PP
79962009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7997
7998 * configure.ac: New --with-libthread-db option.
7999 * thread-db.c: Allow direct dependence on libthread_db.
8000 (thread_db_free): Adjust.
8001 * config.in: Regenerate.
8002 * configure: Likewise.
889bf7c5 8003
5f7d1694
PP
80042009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8005
8006 PR gdb/10757
8007 * thread-db.c (attach_thread): New function.
8008 (maybe_attach_thread): Return success/failure.
8009 (find_new_threads_callback): Adjust.
889bf7c5
PA
8010 (thread_db_find_new_threads): Loop until no new threads.
8011
88e3b899
PA
80122009-10-13 Pedro Alves <pedro@codesourcery.com>
8013
8014 * proc-service.c (ps_lgetregs): Formatting.
8015
cdbfd419
PP
80162009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8017
8018 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8019 * configure.ac: Adjust.
8020 * linux-low.h (struct process_info_private): Move members to struct
8021 thread_db.
8022 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8023 * linux-low.c (linux_remove_process): Adjust.
8024 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8025 * server.c (handle_query): Move code ...
8026 (handle_monitor_command): ... here. New function.
8027 * target.h (struct target_ops): New member.
8028 * thread-db.c (struct thread_db): New.
8029 (libthread_db_search_path): New variable.
8030 (thread_db_create_event, thread_db_enable_reporting)
8031 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8032 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8033 (try_thread_db_load_1, dladdr_to_soname): New functions.
8034 (try_thread_db_load, thread_db_load_search): New functions.
8035 (thread_db_init): Search for libthread_db.
8036 (thread_db_free): New function.
8037 (thread_db_handle_monitor_command): Likewise.
8038 * config.in: Regenerate.
8039 * configure: Regenerate.
889bf7c5 8040
4168d2d6
UW
80412009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8042
8043 * spu-low.c (spu_kill): Wait for inferior to terminate.
8044 Call clear_inferiors.
8045 (spu_detach): Call clear_inferiors.
8046
81ecdfbb
RW
80472009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8048
8049 * aclocal.m4: Regenerate.
8050 * config.in: Likewise.
8051 * configure: Likewise.
8052
0b9ff2c0
UW
80532009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8054
8055 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8056 (parse_spufs_run): New function.
8057 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8058 (ppc_breakpoint_at): Handle SPU breakpoints.
8059
efcbbd14
UW
80602009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8061
8062 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8063 (SPUFS_MAGIC): Define.
8064 (spu_enumerate_spu_ids): New function.
8065 (linux_qxfer_spu): New function.
8066 (linux_target_ops): Install linux_qxfer_spu.
8067
f4d9bade
UW
80682009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8069
8070 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8071 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8072 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8073 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8074 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8075 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8076 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8077 (init_registers_powerpc_cell32l): Add prototype.
8078 (init_registers_powerpc_cell64l): Likewise.
8079 (ppc_arch_setup): Detect Cell/B.E. architecture.
8080
96e946ca
RW
80812009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8082
8083 * Makefile.in (datarootdir): New variable.
8084
58d6951d
DJ
80852009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8086
8087 * linux-low.c (linux_write_memory): Update debugging output.
8088 * Makefile.in (clean): Add new descriptions.
8089 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8090 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8091 * configure.srv: Add new files for arm*-*-linux*.
8092 * linux-arm-low.c: Add new declarations.
8093 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8094 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8095 (HWCAP_VFPv3D16): New.
8096 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8097 instead of __IWMMXT__.
8098 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8099 (arm_arch_setup): New.
8100 (target_regsets): Remove #ifdef. Add VFP regset.
8101 (the_low_target): Use arm_arch_setup.
8102
12b42a12
DJ
81032009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8104
8105 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8106 the main thread again.
8107
ac8c974e
AR
81082009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8109
8110 Adding Neutrino gdbserver.
8111 * configure: Regenerated.
8112 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8113 * configure.srv (i[34567]86-*-nto*): New target.
8114 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8115 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8116 (nto_comctrl) [__QNX__]: New function.
8117 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8118
4424e0c3 81192009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8120
8121 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8122 srv_tgtobj.
8123
912cf4ba
PA
81242009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8125 Pedro Alves <pedro@codesourcery.com>
8126
8127 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8128 don't support CONTEXT_EXTENDED_REGISTERS.
8129 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8130 (the_low_target): Install them.
8131 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8132 failing with ERROR_PIPE_NOT_CONNECTED.
8133
aa5ca48f
DE
81342009-06-30 Doug Evans <dje@google.com>
8135 Pierre Muller <muller@ics.u-strasbg.fr>
8136
8137 Add h/w watchpoint support to x86-linux, win32-i386.
8138 * Makefile.in (SFILES): Add i386-low.c
8139 (i386_low_h): Define.
8140 (i386-low.o): Add dependencies.
8141 (linux-x86-low.o): Add i386-low.h dependency.
8142 (win32-i386-low.o): Ditto.
8143 * i386-low.c: New file.
8144 * i386-low.h: New file.
8145 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8146 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8147 * linux-low.c (linux_add_process): Initialize arch_private.
8148 (linux_remove_process): Free arch_private.
8149 (add_lwp): Initialize arch_private.
8150 (delete_lwp): Free arch_private.
8151 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8152 provided.
8153 * linux-low.h (process_info_private): New member arch_private.
8154 (lwp_info): New member arch_private.
8155 (linux_target_ops): New members new_process, new_thread,
8156 prepare_to_resume.
8157 (ptid_of): New macro.
8158 * linux-x86-low.c: Include stddef.h, i386-low.h.
8159 (arch_process_info): New struct.
8160 (arch_lwp_info): New struct.
8161 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8162 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8163 (i386_dr_low_get_status): New function.
8164 (x86_insert_point, x86_remove_point): New functions.
8165 (x86_stopped_by_watchpoint): New function.
8166 (x86_stopped_data_address): New function.
8167 (x86_linux_new_process, x86_linux_new_thread): New functions.
8168 (x86_linux_prepare_to_resume): New function.
8169 (the_low_target): Add entries for insert_point, remove_point,
8170 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8171 prepare_to_resume.
8172 * server.c (debug_hw_points): New global.
8173 (monitor_show_help): Document set debug-hw-points.
8174 (handle_query): Process "set debug-hw-points".
8175 * server.h (debug_hw_points): Declare.
8176 (paddress): Declare.
8177 * utils.c (NUMCELLS, CELLSIZE): New macros.
8178 (get_sell, xsnprintf, paddress): New functions.
8179 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8180 remove_point, stopped_by_watchpoint, stopped_data_address.
8181 * win32-i386-low.c: Include i386-low.h.
8182 (debug_reg_state): Replaces dr.
8183 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8184 (i386_dr_low_get_status): New function.
8185 (i386_insert_point, i386_remove_point): New functions.
8186 (i386_stopped_by_watchpoint): New function.
8187 (i386_stopped_data_address): New function.
8188 (i386_initial_stuff): Update.
8189 (get_thread_context,set_thread_context,i386_thread_added): Update.
8190 (the_low_target): Add entries for insert_point,
8191 remove_point, stopped_by_watchpoint, stopped_data_address.
8192 * win32-low.c (win32_insert_watchpoint): New function.
8193 (win32_remove_watchpoint): New function.
8194 (win32_stopped_by_watchpoint): New function.
8195 (win32_stopped_data_address): New function.
8196 (win32_target_ops): Add entries for insert_watchpoint,
8197 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8198 * win32-low.h (win32_target_ops): New members insert_point,
8199 remove_point, stopped_by_watchpoint, stopped_data_address.
8200
d993e290
PA
82012009-06-25 Pedro Alves <pedro@codesourcery.com>
8202
8203 * server.c (process_serial_event): Re-return unsupported, not
8204 error, if the type isn't recognized. Re-allow supporting only
8205 insert or remove packets. Also call require_running for
8206 breakpoints. Add missing break statement to default case. Tidy.
8207 * target.h (struct target_ops): Rename insert_watchpoint to
8208 insert_point, and remove_watchpoint to remove_point.
8209
8210 * linux-low.h (struct linux_target_ops): Likewise.
8211 * linux-low.c (linux_insert_watchpoint): Rename to ...
8212 (linux_insert_point): ... this. Adjust.
8213 (linux_remove_watchpoint): Rename to ...
8214 (linux_remove_point): ... this. Adjust.
8215 (linux_target_ops): Adjust.
8216 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8217 (cris_insert_point): ... this.
8218 (cris_remove_watchpoint): Rename to ...
8219 (cris_remove_point): ... this.
8220 (the_low_target): Adjust.
8221
0f54c268
PM
82222009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8223
8224 * server.c (handle_v_kill): Pass signal_pid to
8225 kill_inferior if multi_process is zero.
8226
c6314022
AR
82272009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8228
8229 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8230 * target.h (target_ops): Comment for *_watchpoint to make it clear
8231 the functions can get types '0' and '1'.
8232
4463ce24
AR
82332009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8234
8235 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8236 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8237 * regcache.c (get_regcache): Likewise.
8238 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8239 * win32-low.c (child_fetch_inferior_registers): Remove check for
8240 regno 0.
8241
cf8fd78b
PA
82422009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8243 Pedro Alves <pedro@codesourcery.com>
8244
8245 * target.h (struct target_ops) <supports_multi_process>: New
8246 callback.
8247 (target_supports_multi_process): New.
8248 * server.c (handle_query): Even if GDB reports support, only
8249 enable multi-process if the target also supports it. Report
8250 multi-process support only if the target backend supports it.
8251 * linux-low.c (linux_supports_multi_process): New function.
8252 (linux_target_ops): Install it as target_supports_multi_process
8253 callback.
8254
47c0c975
DE
82552009-05-24 Doug Evans <dje@google.com>
8256
e09875d4
DE
8257 Global renaming of find_thread_pid to find_thread_ptid.
8258 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8259 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8260 All callers updated.
8261
e27d73f6
DE
8262 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8263 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8264 directly.
8265
47c0c975
DE
8266 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8267 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8268 (linux_resume_one_lwp): Ditto.
8269
2acc282a
DE
82702009-05-23 Doug Evans <dje@google.com>
8271
8272 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8273 from struct inferior_list_entry * to struct lwp_info *.
8274 All callers updated.
8275
9f1036c1
DE
82762009-05-13 Doug Evans <dje@google.com>
8277
8278 * linux-x86-low.c: Don't include assert.h.
8279 (x86_siginfo_fixup): Use fatal, not assert.
8280 (x86_arch_setup): Fix comment.
8281
d0722149
DE
82822009-05-12 Doug Evans <dje@google.com>
8283
8284 Biarch support for i386/amd64 gdbserver.
8285 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8286 Add linux-x86-low.c.
8287 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8288 (linux-x86-low.o): Add.
8289 * linux-x86-64-low.c: Delete.
8290 * linux-i386-low.c: Delete.
8291 * linux-x86-low.c: New file.
8292 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8293 linux-x86-low.o.
8294 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8295 linux-x86-low.o.
8296 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8297 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8298 (linux_child_pid_to_exec_file): New function.
8299 (elf_64_header_p, elf_64_file_p): New functions.
8300 (siginfo_fixup): New function.
8301 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8302 give target a chance to convert layout.
8303 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8304 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8305
fdeb2a12
DE
83062009-05-07 Doug Evans <dje@google.com>
8307
8308 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8309 (regsets_store_inferior_registers): Ditto.
8310
a6dbe5df
PA
83112009-05-06 Pedro Alves <pedro@codesourcery.com>
8312
8313 PR server/10048
8314
8315 * linux-low.c (must_set_ptrace_flags): Delete.
8316 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8317 of the global.
8318 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8319 `lwp->must_set_ptrace_flags' instead.
ba42693b 8320 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8321 (linux_wait_1): ... not here.
8322
5091eb23
DE
83232009-04-30 Doug Evans <dje@google.com>
8324
9f767825
DE
8325 * inferiors.c (started_inferior_callback): New function.
8326 (attached_inferior_callback): New function.
8327 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8328 * server.c (print_started_pid, print_attached_pid): New functions.
8329 (detach_or_kill_for_exit): New function.
8330 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8331 * server.h (have_started_inferiors_p): Declare.
8332 (have_attached_inferiors_p): Declare.
8333
5091eb23
DE
8334 * inferiors.c (remove_process): Fix memory leak, free process.
8335 * linux-low.c (linux_remove_process): New function.
8336 (linux_kill): Call it instead of remove_process.
8337 (linux_detach, linux_wait_1): Ditto.
8338
155c8968
PA
83392009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8340
8341 * configure.srv: Add x86 Windows CE target.
8342
7fe519cb
UW
83432009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8344
8345 * inferiors.c (get_thread_process): Make global.
8346 * server.h (get_thread_process): Add prototype.
8347 * thread-db.c (find_one_thread): Use get_thread_process
8348 instead of current_process.
8349 (thread_db_get_tls_address): Do not crash if called when
8350 thread layer is not yet initialized.
8351
5472f405
UW
83522009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8353
8354 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8355 * spu-low.c (current_tid): Rename to ...
8356 (current_ptid): ... this.
8357 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8358 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8359 ptid_get_lwp (current_ptid) instead of current_tid.
8360 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8361 instead of current_tid. Use find_process_pid to verify pid
8362 argument is valid. Pass proper argument to remove_process.
8363 (spu_thread_alive): Compare current_ptid instead of current_tid.
8364 (spu_resume): Likewise.
8365
55ac2b99
PA
83662009-04-02 Pedro Alves <pedro@codesourcery.com>
8367
8368 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8369 variable.
8370
95954743
PA
83712009-04-01 Pedro Alves <pedro@codesourcery.com>
8372
8373 Implement the multiprocess extensions, and add linux multiprocess
8374 support.
8375
8376 * server.h (ULONGEST): Declare.
8377 (struct ptid, ptid_t): New.
8378 (minus_one_ptid, null_ptid): Declare.
8379 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8380 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8381 (struct inferior_list_entry): Change `id' type from unsigned from
8382 to ptid_t.
8383 (struct sym_cache, struct breakpoint, struct
8384 process_info_private): Forward declare.
8385 (struct process_info): Declare.
8386 (current_process): Declare.
8387 (all_processes): Declare.
8388 (initialize_inferiors): Declare.
8389 (add_thread): Adjust to use ptid_t.
8390 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8391 (add_process, remove_process, find_thread_pid): Declare.
8392 (find_inferior_id): Adjust to use ptid_t.
8393 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8394 (multi_process): Declare.
8395 (push_event): Adjust to use ptid_t.
8396 (read_ptid, write_ptid): Declare.
8397 (prepare_resume_reply): Adjust to use ptid_t.
8398 (clear_symbol_cache): Declare.
8399 * inferiors.c (all_processes): New.
8400 (null_ptid, minus_one_ptid): New.
8401 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8402 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8403 (add_thread): Change unsigned long to ptid. Remove gdb_id
8404 parameter. Adjust.
8405 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8406 (gdb_id_to_thread): Rename to ...
8407 (find_thread_pid): ... this. Change unsigned long to ptid.
8408 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8409 (loaded_dll, pull_pid_from_list): Adjust.
8410 (add_process, remove_process, find_process_pid)
8411 (get_thread_process, current_process, initialize_inferiors): New.
8412 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8413 (struct target_waitstatus) <related_pid>: Ditto.
8414 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8415 return type to int.
8416 (struct target_ops) <join>: Add `pid' argument.
8417 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8418 (struct target_ops) <wait>: Add `ptid' field. Change return type
8419 to ptid.
8420 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8421 (mywait): Add `ptid' argument. Change return type to ptid_t.
8422 (target_pid_to_str): Declare.
8423 * target.c (set_desired_inferior): Adjust to use ptids.
8424 (mywait): Add new `ptid' argument. Adjust.
8425 (target_pid_to_str): New.
8426 * mem-break.h (free_all_breakpoints): Declare.
8427 * mem-break.c (breakpoints): Delelete.
8428 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8429 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8430 to use per-process breakpoint list.
8431 (free_all_breakpoints): New.
8432 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8433 (symbol_cache, all_symbols_looked_up): Delete.
8434 (hexchars): New.
8435 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8436 read_ptid): New.
8437 (prepare_resume_reply): Change ptid argument's type from unsigned
8438 long to ptid_t. Adjust. Implement W;process and X;process.
8439 (free_sym_cache, clear_symbol_cache): New.
8440 (look_up_one_symbol): Adjust to per-process symbol cache. *
8441 * server.c (cont_thread, general_thread, step_thread): Change type
8442 to ptid_t.
8443 (attached): Delete.
8444 (multi_process): New.
8445 (last_ptid): Change type to ptid_t.
8446 (struct vstop_notif) <ptid>: Change type to ptid_t.
8447 (queue_stop_reply, push_event): Change `ptid' argument's type to
8448 ptid_t.
8449 (discard_queued_stop_replies): Add `pid' argument.
8450 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8451 changes. Don't reference the `attached' global.
8452 (attach_inferior): Adjust to mywait interface changes.
8453 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8454 features. Handle and report "multiprocess+". Handle
8455 "qAttached:PID".
8456 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8457 changes.
8458 (handle_v_kill): New.
8459 (handle_v_stopped): Adjust to use target_pid_to_str.
8460 (handle_v_requests): Allow multiple attaches and runs when
8461 multiprocess extensions are in effect. Handle "vKill".
8462 (myresume): Adjust to use ptids.
8463 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8464 (handle_status): Adjust to discard_queued_stop_replies interface
8465 change.
8466 (first_thread_of, kill_inferior_callback)
8467 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8468 (main): Call initialize_inferiors. Adjust to use ptids, killing
8469 and detaching from all inferiors. Handle multiprocess packet
8470 variants.
8471 * linux-low.h: Include gdb_proc_service.h.
8472 (struct process_info_private): New.
8473 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8474 <lwpid_of>: Use ptid_get_lwp.
8475 (get_lwp_thread): Adjust.
8476 (struct lwp_info): Add `dead' member.
8477 (find_lwp_pid): Declare.
8478 * linux-low.c (thread_db_active): Delete.
8479 (new_inferior): Adjust comment.
8480 (inferior_pid): Delete.
8481 (linux_add_process): New.
8482 (handle_extended_wait): Adjust.
8483 (add_lwp): Change unsigned long to ptid.
8484 (linux_create_inferior): Add process to processes table. Adjust
8485 to use ptids. Don't set new_inferior here.
8486 (linux_attach_lwp): Rename to ...
8487 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8488 it. Adjust to use ptids.
8489 (linux_attach_lwp): New.
8490 (linux_attach): Add process to processes table. Don't set
8491 new_inferior here.
8492 (struct counter): New.
8493 (second_thread_of_pid_p, last_thread_of_process_p): New.
8494 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8495 multiple processes.
8496 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8497 processes. Remove process from process table.
8498 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8499 to multiple processes.
8500 (any_thread_of): New.
8501 (linux_detach): Add `pid' argument, and handle it. Remove process
8502 from processes table.
8503 (linux_join): Add `pid' argument. Handle it.
8504 (linux_thread_alive): Change unsighed long argument to ptid_t.
8505 Consider dead lwps as not being alive.
8506 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8507 threads we're not interested in.
8508 (same_lwp, find_lwp_pid): New.
8509 (linux_wait_for_lwp): Change `pid' argument's type from int to
8510 ptid_t. Adjust.
8511 (linux_wait_for_event): Rename to ...
8512 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8513 from int to ptid_t. Adjust.
8514 (linux_wait_for_event): New.
8515 (linux_wait_1): Add `ptid' argument. Change return type to
8516 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8517 that exit from the process table.
8518 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8519 Adjust.
8520 (mark_lwp_dead): New.
8521 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8522 stopping all threads, mark its main lwp as dead.
8523 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8524 ptids.
8525 (fetch_register, usr_store_inferior_registers)
8526 (regsets_fetch_inferior_registers)
8527 (regsets_store_inferior_registers, linux_read_memory)
8528 (linux_write_memory): Inline `inferior_pid'.
8529 (linux_look_up_symbols): Adjust to use per-process
8530 `thread_db_active'.
8531 (linux_request_interrupt): Adjust to use ptids.
8532 (linux_read_auxv): Inline `inferior_pid'.
8533 (initialize_low): Don't reference thread_db_active.
8534 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8535 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8536 (ps_getpid): Return the pid of the current inferior.
8537 * thread-db.c (proc_handle, thread_agent): Delete.
8538 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8539 per-process data.
8540 (find_one_thread): Change argument type to ptid_t. Adjust to
8541 per-process data.
8542 (maybe_attach_thread): Adjust to per-process data and ptids.
8543 (thread_db_find_new_threads): Ditto.
8544 (thread_db_init): Ditto.
8545 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8546 processes table. Adjust to use ptids.
8547 (spu_kill, spu_detach): Adjust interface. Remove process from
8548 processes table.
8549 (spu_join, spu_thread_alive): Adjust interface.
8550 (spu_wait): Adjust interface. Remove process from processes
8551 table. Adjust to use ptids.
8552 * win32-low.c (current_inferior_tid): Delete.
8553 (current_inferior_ptid): New.
8554 (debug_event_ptid): New.
8555 (thread_rec): Take a ptid. Adjust.
8556 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8557 (child_delete_thread): Ditto.
8558 (do_initial_child_stuff): Add `attached' argument. Add process to
8559 processes table.
8560 (child_fetch_inferior_registers, child_store_inferior_registers):
8561 Adjust.
8562 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8563 (win32_attach): Pass 1 to do_initial_child_stuff.
8564 (win32_kill): Adjust interface. Remove process from processes
8565 table.
8566 (win32_detach): Ditto.
8567 (win32_join): Adjust interface.
8568 (win32_thread_alive): Take a ptid.
8569 (win32_resume): Adjust to use ptids.
8570 (get_child_debug_event): Ditto.
8571 (win32_wait): Adjust interface. Remove exiting process from
8572 processes table.
8573
bd99dc85
PA
85742009-04-01 Pedro Alves <pedro@codesourcery.com>
8575
8576 Non-stop mode support.
8577
8578 * server.h (non_stop): Declare.
8579 (gdb_client_data, handler_func): Declare.
8580 (delete_file_handler, add_file_handler, start_event_loop):
8581 Declare.
8582 (handle_serial_event, handle_target_event, push_event)
8583 (putpkt_notif): Declare.
8584 * target.h (enum resume_kind): New.
8585 (struct thread_resume): Replace `step' field by `kind' field.
8586 (TARGET_WNOHANG): Define.
8587 (struct target_ops) <wait>: Add `options' argument.
8588 <supports_non_stop, async, start_non_stop>: New fields.
8589 (target_supports_non_stop, target_async): New.
8590 (start_non_stop): Declare.
8591 (mywait): Add `options' argument.
8592 * target.c (mywait): Add `options' argument. Print child exit
8593 notifications here.
8594 (start_non_stop): New.
8595 * server.c (non_stop, own_buf, mem_buf): New globals.
8596 (struct vstop_notif): New.
8597 (notif_queue): New global.
8598 (queue_stop_reply, push_event, discard_queued_stop_replies)
8599 (send_next_stop_reply): New.
8600 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8601 interface changes.
8602 (attach_inferior): In non-stop mode, don't wait for the target
8603 here.
8604 (handle_general_set): Handle QNonStop.
8605 (handle_query): When handling qC, return the current general
8606 thread, instead of the first thread of the list.
8607 (handle_query): If the backend supports non-stop mode, include
8608 QNonStop+ in the qSupported query response.
8609 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8610 and non-stop mode.
8611 (handle_v_attach, handle_v_run): Handle non-stop mode.
8612 (handle_v_stopped): New.
8613 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8614 (myresume): Adjust to use resume_kind. Handle non-stop.
8615 (queue_stop_reply_callback): New.
8616 (handle_status): Handle non-stop mode.
8617 (main): Clear non_stop flag on reconnection. Use the event-loop.
8618 Refactor serial protocol handling from here ...
8619 (process_serial_event): ... to this new function. When GDB
8620 selects any thread, select one here. In non-stop mode, wait until
8621 GDB acks all pending events before exiting.
8622 (handle_serial_event, handle_target_event): New.
8623 * remote-utils.c (remote_open): Install remote_desc in the event
8624 loop.
8625 (remote_close): Remove remote_desc from the event loop.
8626 (putpkt_binary): Rename to...
8627 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8628 (putpkt_binary): New as wrapper around putpkt_binary_1.
8629 (putpkt_notif): New.
8630 (prepare_resume_reply): In non-stop mode, don't change the
8631 general_thread.
8632 * event-loop.c: New.
8633 * Makefile.in (OBJ): Add event-loop.o.
8634 (event-loop.o): New rule.
8635
8636 * linux-low.h (pid_of): Moved here.
8637 (lwpid_of): New.
8638 (get_lwp_thread): Use lwpid_of.
8639 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8640 * linux-low.c (pid_of): Delete.
8641 (inferior_pid): Use lwpid_of.
8642 (linux_event_pipe): New.
8643 (target_is_async_p): New.
8644 (delete_lwp): New.
8645 (handle_extended_wait): Use lwpid_of.
8646 (add_lwp): Don't set lwpid field.
8647 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8648 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8649 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8650 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8651 first. Adjust to linux_wait_for_event interface changes. Use
8652 lwpid_of.
8653 (linux_detach): Don't delete the main lwp here.
8654 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8655 (status_pending_p): Don't consider explicitly suspended lwps.
8656 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8657 pointer. Add OPTIONS argument. Change return type to int. Use
8658 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8659 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8660 pointer. Add status pointer argument. Return a pid instead of a
8661 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8662 changes. In non-stop mode, don't switch to a random thread.
8663 (linux_wait): Rename to...
8664 (linux_wait_1): ... this. Add target_options argument, and handle
8665 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8666 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8667 clean exit and signal exit code. Don't stop all threads in
8668 non-stop mode. In all-stop mode, only stop all threads when
8669 reporting a stop to GDB. Handle explicit thread stop requests.
8670 (async_file_flush, async_file_mark): New.
8671 (linux_wait): New.
8672 (send_sigstop): Use lwpid_of.
8673 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8674 interface changes. In non-stop mode, don't switch to a random
8675 thread.
8676 (linux_resume_one_lwp): Use lwpid_of.
8677 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8678 (linux_resume_one_thread): ... this. Handle resume_stop. In
8679 non-stop mode, don't look for pending flag in all threads.
8680 (resume_status_pending_p): Don't consider explicitly suspended
8681 threads.
8682 (my_waitpid): Reimplement. Emulate __WALL.
8683 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8684 Use lwpid_of.
8685 (sigchld_handler, linux_supports_non_stop, linux_async)
8686 (linux_start_non_stop): New.
8687 (linux_target_ops): Register linux_supports_non_stop, linux_async
8688 and linux_start_non_stop.
8689 (initialize_low): Install SIGCHLD handler.
8690 * thread-db.c (thread_db_create_event, find_one_thread)
8691 (thread_db_get_tls_address): Use lwpid_of.
8692 * win32-low.c (win32_detach): Adjust to use resume_kind.
8693 (win32_wait): Add `options' argument.
8694 * spu-low.c (spu_resume): Adjust to use resume_kind.
8695 (spu_wait): Add `options' argument.
8696
5b1c542e
PA
86972009-04-01 Pedro Alves <pedro@codesourcery.com>
8698
8699 Decouple target code from remote protocol.
8700
8701 * target.h (enum target_waitkind): New.
8702 (struct target_waitstatus): New.
8703 (struct target_ops) <wait>: Return an unsigned long. Take a
8704 target_waitstatus pointer instead of a char pointer.
8705 (mywait): Likewise.
8706 * target.c (mywait): Change prototype to return an unsigned long.
8707 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8708 * server.h (thread_from_wait, old_thread_from_wait): Delete
8709 declarations.
8710 (prepare_resume_reply): Change prototype to take a
8711 target_waitstatus.
8712 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8713 (last_status, last_ptid): New.
8714 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8715 pid instead of a signal.
8716 (attach_inferior): Remove "status" and "signal" parameters.
8717 Adjust.
8718 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8719 not as an address.
8720 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8721 (handle_v_requests, myresume): Remove "status" and "signal"
8722 parameters. Adjust.
8723 (handle_status): New.
8724 (main): Delete local `status'. Adjust.
8725 * remote-utils.c: Include target.h.
8726 (prepare_resume_reply): Change prototype to take a
8727 target_waitstatus. Adjust.
8728
8729 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8730 interface.
8731 * spu-low.c (spu_wait): Adjust.
8732 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8733 Delete.
8734 (win32_wait): Adjust.
8735
2bd7c093
PA
87362009-04-01 Pedro Alves <pedro@codesourcery.com>
8737
8738 * target.h (struct thread_resume): Delete leave_stopped member.
8739 (struct target_ops): Add a `n' argument to the `resume' callback.
8740 * server.c (start_inferior): Adjust.
8741 (handle_v_cont, myresume): Adjust.
8742 * linux-low.c (check_removed_breakpoint): Adjust to resume
8743 interface change, and to removed leave_stopped field.
8744 (resume_ptr): Delete.
8745 (struct thread_resume_array): New.
8746 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8747 resume interface change.
8748 (linux_continue_one_thread, linux_queue_one_thread)
8749 (resume_status_pending_p): Check if the resume field is NULL
8750 instead of checking the leave_stopped member.
8751 (linux_resume): Adjust to the target resume interface change.
8752 * spu-low.c (spu_resume): Adjust to the target resume interface
8753 change.
8754 * win32-low.c (win32_detach, win32_resume): Ditto.
8755
c35fafde
PA
87562009-04-01 Pedro Alves <pedro@codesourcery.com>
8757
8758 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8759 flag.
8760 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8761 pending.
8762 (linux_continue_one_thread): Only preserve the stepping flag if
8763 there's a pending breakpoint.
8764
0a59d50b
PA
87652009-03-31 Pedro Alves <pedro@codesourcery.com>
8766
8767 * server.c (main): After the inferior having exited, call
8768 remote_close before exiting gdbserver.
8769
f04c6d38
TJB
87702009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8771
8772 Fix size of FPSCR in Power 7 processors.
8773 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8774 (PPC_FEATURE_HAS_DFP): New #define.
8775 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8776 size of the FPSCR.
8777
78e5cee6
PA
87782009-03-23 Pedro Alves <pedro@codesourcery.com>
8779
8780 * server.c (handle_query) Whitespace and formatting.
8781
1b3f6016
PA
87822009-03-22 Pedro Alves <pedro@codesourcery.com>
8783
8784 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8785 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8786 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8787 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8788 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8789 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8790 Makefile.in, configure.ac: Fix whitespace throughout.
8791 * configure: Regenerate.
8792
a07b2135
PA
87932009-03-22 Pedro Alves <pedro@codesourcery.com>
8794
8795 * inferiors.c (find_inferior): Make it safe for the callback
8796 function to delete the currently iterated inferior.
8797
67cc2626
PA
87982009-03-22 Pedro Alves <pedro@codesourcery.com>
8799
8800 * Makefile.in (linuw_low_h): Move higher.
8801 (thread-db.o): Depend on $(linux_low_h).
8802
54a0b537
PA
88032009-03-17 Pedro Alves <pedro@codesourcery.com>
8804
8805 Rename "process" to "lwp" throughout.
8806
8807 * linux-low.c (all_processes): Rename to...
8808 (all_lwps): ... this.
8809 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8810 (add_process): Rename to ...
8811 (add_lwp): ... this. Adjust.
8812 (linux_create_inferior): Adjust.
8813 (linux_attach_lwp): Adjust.
8814 (linux_attach): Adjust.
8815 (linux_kill_one_process): Rename to ...
8816 (linux_kill_one_lwp): ... this. Adjust.
8817 (linux_kill): Adjust.
8818 (linux_detach_one_process): Rename to ...
8819 (linux_detach_one_lwp): ... this. Adjust.
8820 (linux_detach): Adjust.
8821 (check_removed_breakpoint): Adjust.
8822 (status_pending_p): Adjust.
8823 (linux_wait_for_process): Rename to ...
8824 (linux_wait_for_lwp): ... this. Adjust.
8825 (linux_wait_for_event): Adjust.
8826 (send_sigstop): Adjust.
8827 (wait_for_sigstop): Adjust.
8828 (stop_all_processes): Rename to ...
8829 (stop_all_lwps): ... this.
8830 (linux_resume_one_process): Rename to ...
8831 (linux_resume_one_lwp): ... this. Adjust.
8832 (linux_set_resume_request, linux_continue_one_thread)
8833 (linux_queue_one_thread, resume_status_pending_p)
8834 (usr_store_inferior_registers, regsets_store_inferior_registers)
8835 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8836 Adjust.
8837 * linux-low.h (get_process): Rename to ...
8838 (get_lwp): ... this. Adjust.
8839 (get_thread_process): Rename to ...
8840 (get_thread_lwp): ... this. Adjust.
8841 (get_process_thread): Rename to ...
8842 (get_lwp_thread): ... this. Adjust.
8843 (struct process_info): Rename to ...
8844 (struct lwp_info): ... this.
8845 (all_processes): Rename to ...
8846 (all_lwps): ... this.
8847 * proc-service.c (ps_lgetregs): Adjust.
8848 * thread-db.c (thread_db_create_event, find_one_thread)
8849 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8850
0b16c5cf
PA
88512009-03-14 Pedro Alves <pedro@codesourcery.com>
8852
8853 * server.c (handle_query): Handle "qAttached".
8854
32de4b9d
NS
88552009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8856
8857 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8858 GPLv3, update license URL.
8859
2aecd87f
DE
88602009-03-01 Doug Evans <dje@google.com>
8861
93efd302 8862 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8863 (server_h): Add gdb_signals.h.
8864 (signals.o): Update.
8865 * server.h (target_signal_from_host,target_signal_to_host_p)
8866 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8867
86b1f9c5
PM
88682009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8869
8870 * remote-utils.c (getpkt): Also generate remote-debug
8871 information if noack_mode is set.
8872
4aa995e1
PA
88732009-02-06 Pedro Alves <pedro@codesourcery.com>
8874
8875 * server.c (handle_query): Report qXfer:siginfo:read and
8876 qXfer:siginfo:write as supported and handle them.
8877 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8878 * linux-low.c (linux_xfer_siginfo): New.
8879 (linux_target_ops): Set it.
8880
62709adf
PA
88812009-01-26 Pedro Alves <pedro@codesourcery.com>
8882
8883 * server.c (gdbserver_usage): Mention --remote-debug.
8884 (main): Accept '--remote-debug' switch.
8885
aef93bd7
DE
88862009-01-18 Doug Evans <dje@google.com>
8887
8888 * regcache.c (new_register_cache): No need to check result of xcalloc.
8889 * server.c (handle_search_memory): Back out calls to xmalloc,
8890 result is checked and error is returned to user upon failure.
8891 (handle_query): Ditto. Add more checks for result of malloc.
8892 (handle_v_cont): Check result of malloc, report error back to
8893 user upon failure.
8894 (handle_v_run): Ditto. Call freeargv.
8895 * server.h (freeargv): Declare.
8896 * utils.c (freeargv): New fn.
8897
54363045
DE
88982009-01-15 Doug Evans <dje@google.com>
8899
f626972c
DE
8900 * gdbreplay.c (perror_with_name): Make arg const char *.
8901 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8902 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8903 * utils.c (perror_with_name): Make arg const char *.
54363045 8904
18aae699
PA
89052009-01-14 Pedro Alves <pedro@codesourcery.com>
8906
8907 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8908 when handling a EXIT_PROCESS_DEBUG_EVENT.
8909
ff703abe
JB
89102009-01-06 Joel Brobecker <brobecker@adacore.com>
8911
8912 * gdbreplay.c (gdbreplay_version): Update copyright year.
8913 * server.c (gdbserver_version): Likewise.
8914
f21cc1a2 89152009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8916
8917 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8918 (handle_extended_wait): Improve comment.
0e21c1ec 8919
bca929d3
DE
89202008-12-13 Doug Evans <dje@google.com>
8921
8922 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8923 * server.h (ATTR_MALLOC): New macro.
8924 (xmalloc,xcalloc,xstrdup): Declare.
8925 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8926 * inferiors.c: Ditto.
8927 * linux-low.c: Ditto.
8928 * mem-break.c: Ditto.
8929 * regcache.c: Ditto.
8930 * remote-utils.c: Ditto.
8931 * server.c: Ditto.
8932 * target.c: Ditto.
8933 * win32-low.c: Ditto.
8934
97438e3f
DE
89352008-12-12 Doug Evans <dje@google.com>
8936
896c7fbb
DE
8937 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8938 in debugging printf.
8939
97438e3f
DE
8940 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8941
e3b886f8
DE
89422008-12-09 Doug Evans <dje@google.com>
8943
8944 * linux-low.h (struct process_info): Delete member tid, unused.
8945 * thread-db.c (find_one_thread): Update.
8946 (maybe_attach_thread): Update.
8947
07e059b5
VP
89482008-12-02 Pedro Alves <pedro@codesourcery.com>
8949
889bf7c5
PA
8950 * target.h (struct target_ops): Add qxfer_osdata member.
8951 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8952 and dirent.h.
8953 (linux_qxfer_osdata): New functions.
8954 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8955 callback.
8956 * server.c (handle_query): Handle "qXfer:osdata:read:".
8957 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8958 (buffer_xml_printf): New functions.
8959 * server.h (struct buffer): New.
8960 (buffer_grow_str, buffer_grow_str0): New macros.
8961 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8962 (buffer_xml_printf): Declare.
07e059b5 8963
4cab47ab
DE
89642008-11-24 Doug Evans <dje@google.com>
8965
8966 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8967
f142445f
DJ
89682008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8969
8970 * server.c (handle_v_run): Always use the supplied argument list.
8971
d0107bb6 89722008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8973
d0107bb6
BW
8974 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8975 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8976
2c4ad781
TJB
89772008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8978
8979 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8980 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8981 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8982 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8983 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8984 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8985 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8986 XML target descriptions.
8987 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8988 when inferior is running on an ISA 2.05 or later processor. Add
8989 special case to return offset for full 64-bit slot of FPSCR when
8990 in 32-bits.
8991
dfb64f85
DJ
89922008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8993
8994 * Makefile.in (SFILES, clean): Added sparc64 files.
8995 (reg-sparc64.o, reg-sparc64.c): New.
8996 * configure.srv (sparc*-*-linux*): New configuration.
8997 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8998 syscall arguments for SPARC.
8999 (regsets_store_inferior_registers): Likewise.
9000 * linux-sparc-low.c: New file.
9001
66b6e1dd
DE
90022008-10-21 Doug Evans <dje@google.com>
9003
9004 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9005 (READLINE_DIR,READLINE_DEP): Delete.
9006 (INTERNAL_CFLAGS): Update.
9007 (LINTFLAGS): Update.
9008
9b710a42
PA
90092008-10-10 Pedro Alves <pedro@codesourcery.com>
9010
9011 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9012 whole argv from the last run, not just argv[0].
9013
5822d809
PA
90142008-09-08 Pedro Alves <pedro@codesourcery.com>
9015
9016 * regcache.c (new_register_cache): Return NULL if the register
9017 cache size isn't known yet.
9018 (free_register_cache): Avoid dereferencing a NULL regcache.
9019
74aac56f
DJ
90202008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9021
9022 * configure.srv: Merge MIPS and MIPS64.
9023
400b20f5
MR
90242008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9025
9026 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9027
677c5bb1
LM
90282008-08-18 Luis Machado <luisgpm@br.ibm.com>
9029
9030 * Makefile.in: Add required vsx dependencies.
9031
9032 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9033 Declare init_registers_powerpc_vsx32l.
9034 Declare init_registers_powerpc_vsx64l.
9035 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9036 (ppc_arch_setup): Check for VSX in hwcap.
9037 (ppc_fill_vsxregset): New function.
9038 (ppc_store_vsxregset): New function.
9039 Add new VSX entry in regset_info target_regsets.
9040
9041 * configure.srv: Add new VSX dependencies.
9042
a6f3e723
SL
90432008-08-12 Pedro Alves <pedro@codesourcery.com>
9044
9045 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9046 (remote_open): Set or clear transport_is_reliable.
9047 (putpkt_binary): Don't expect acks in noack mode.
9048 (getpkt): Don't send ack/nac in noack mode.
9049 * server.c (handle_general_set): Handle QStartNoAckMode.
9050 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9051 qSupported.
9052 (main): Reset noack_mode on every connection.
9053 * server.h (noack_mode): Declare.
9054
a417dc56
RW
90552008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9056
9057 * Makefile.in (GDBREPLAY_OBS): New variable.
9058 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9059
3221518c
UW
90602008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9061 Daniel Jacobowitz <dan@codesourcery.com>
9062
9063 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9064 (usr_store_inferior_registers): Likewise.
9065 (regsets_store_inferior_registers): Likewise.
9066
ec56be1b
PA
90672008-07-31 Rolf Jansen <rj@surtec.com>
9068 Pedro Alves <pedro@codesourcery.com>
9069
9070 * configure.ac: Check for memmem declaration.
9071 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9072 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9073 (disable_packet_qfThreadInfo): Unconditionally compile.
9074 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9075 * configure, config.in: Regenerate.
9076
2fe5e3ff
DE
90772008-07-28 Doug Kwan <dougkwan@google.com>
9078
9079 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9080 (linux_write_memory): Remove declaration of errno.
9081
836acd6d
UW
90822008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9083
9084 * linux-low.c (handle_extended_wait): Do not use "status"
9085 variable uninitialized.
9086
aeba519e
PA
90872008-07-07 Pedro Alves <pedro@codesourcery.com>
9088
9089 * server.c (handle_v_attach): Inhibit reporting dll changes.
9090
db42f210
PA
90912008-06-27 Pedro Alves <pedro@codesourcery.com>
9092
9093 * remote-utils.c (prepare_resume_reply): If requested, don't
9094 output "thread:TID" in the T stop reply.
9095
9096 * server.c (disable_packet_vCont, disable_packet_Tthread)
9097 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9098 (handle_query): If requested, disable support for qC, qfThreadInfo
9099 and qsThreadInfo.
9100 (handle_v_requests): If requested, disable support for vCont.
9101 (gdbserver_show_disableable): New.
9102 (main): Handle --disable-packet and --disable-packet=LIST.
9103
9104 * server.h (disable_packet_vCont, disable_packet_Tthread)
9105 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9106
8e4c5421
CD
91072008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9108
9109 * server.c (gdbserver_usage): Mention --version.
9110
6e23a804
DJ
91112008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9112
9113 * Makefile.in (gdbreplay.o): New rule.
9114
90aa6a40
JM
91152008-06-06 Joseph Myers <joseph@codesourcery.com>
9116
9117 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9118 message, not gdbserver.
9119
c16158bc 91202008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9121 Nathan Sidwell <nathan@codesourcery.com>
9122 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9123
9124 * acinclude.m4: Include ../../config/acx.m4.
9125 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9126 * configure, config.in: Regenerate.
9127 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9128 * server.c (gdbserver_version): Print PKGVERSION.
9129 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9130 (main): Adjust gdbserver_usage calls.
9131 * gdbreplay.c (version, host_name): Add declarations.
9132 (gdbreplay_version, gdbreplay_usage): New.
9133 (main): Accept --version and --help options.
9134
aeb75bf5
DJ
91352008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9136
9137 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9138 (arm_breakpoint_at): Handle Thumb.
9139 (the_low_target): Add comment.
9140
76b233dd
UW
91412008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9142
9143 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9144
08388c79
DE
91452008-05-09 Doug Evans <dje@google.com>
9146
a3c83fae
DE
9147 * server.h (decode_search_memory_packet): Declare.
9148 * remote-utils.c (decode_search_memory_packet): New fn.
9149 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9150 (handle_search_memory): New fn.
9151 (handle_query): Process qSearch:memory packets.
9152
bb9c3d36
UW
91532008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9154
9155 * regcache.c (registers_length): Remove.
9156 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9157 full register packet.
9158 * regcache.h (registers_length): Remove prototype.
9159 * server.h (PBUFSIZ): Define to 16384.
9160
7284e1be
UW
91612008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9162
9163 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9164 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9165 powerpc-64l.o, and powerpc-altivec64l.o.
9166 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9167 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9168 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9169 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9170 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9171 to srv_xmlfiles.
9172
9173 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9174 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9175 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9176 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9177 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9178 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9179 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9180 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9181 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9182 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9183 (clean): Update.
9184
9185 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9186 (init_registers_powerpc_32l): ... this new prototype.
9187 (init_registers_powerpc_32): Remove, replace by ...
9188 (init_registers_powerpc_altivec32l): ... this new prototype.
9189 (init_registers_powerpc_e500): Remove, replace by ...
9190 (init_registers_powerpc_e500l): ... this new prototype.
9191 (init_registers_ppc64): Remove, replace by ...
9192 (init_registers_powerpc_64l): ... this new prototype.
9193 (init_registers_powerpc_64): Remove, replace by ...
9194 (init_registers_powerpc_altivec64l): ... this new prototype.
9195 (ppc_num_regs): Set to 73.
9196 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9197 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9198 (ppc_cannot_store_register): Handle orig_r3 and trap.
9199 (ppc_arch_setup): Update init_registers_... calls.
9200 (ppc_fill_gregset): Handle orig_r3 and trap.
9201
9202 * inferiors.c (clear_inferiors): Reset current_inferior.
9203
fdc59709
PB
92042008-04-23 Paolo Bonzini <bonzini@gnu.org>
9205
889bf7c5
PA
9206 * acinclude.m4: Add override.m4.
9207 * configure: Regenerate.
fdc59709 9208
c9b2f845
UW
92092008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9210
9211 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9212 initial call to init_register_ppc64.
9213
550512b8
UW
92142008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9215
43aaf8b6
PA
9216 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9217 single powerpc*-*-linux* case.
550512b8
UW
9218 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9219
b6430ec3
UW
92202008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9221
9222 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9223 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9224 from reg_xmlfiles.
9225 * linux-ppc-low.c: Include <elf.h>.
9226 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9227 (ppc_hwcap): New global variable.
9228 (ppc_regmap): Remove __SPE__ #ifdef sections.
9229 (ppc_regmap_e500): New global variable.
9230 (ppc_cannot_store_register): Update __SPE__ special case.
9231 (ppc_get_hwcap): New function.
9232 (ppc_arch_setup): Use it to determine whether inferior supports
9233 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9234 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9235 Do not access registers if target does not support AltiVec.
9236 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9237 Do not access registers if target does not support SPE.
9238 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9239
52fa2412
UW
92402008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9241
9242 * linux-low.c (disabled_regsets, num_regsets): New.
9243 (use_regsets_p): Delete.
9244 (linux_wait_for_process): Clear disabled_regsets.
9245 (regsets_fetch_inferior_registers): Check and set it.
9246 (regsets_store_inferior_registers): Likewise.
9247 (linux_fetch_registers, linux_store_registers): Do not use
9248 use_regsets_p.
9249 (initialize_low): Allocate disabled_regsets.
9250
e28b3332
DJ
92512008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9252
9253 * Makefile.in (LIBOBJS): New.
9254 (OBS): Use LIBOBJS.
9255 (memmem.o): New rule.
9256 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9257 * configure: Regenerated.
9258
4536995d
UW
92592008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9260
9261 * server.c (handle_query): Never return "unsupported" for
9262 qXfer:features:read queries.
9263
221c031f
UW
92642008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9265
9266 * server.c (get_features_xml): Fix inverted condition.
9267 (handle_query): Always support qXfer:feature:read.
9268
ccd213ac
DJ
92692008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9270
9271 * server.c (wrapper_argv): New.
9272 (start_inferior): Handle wrapper_argv. If set, expect an extra
9273 trap.
9274 (gdbserver_usage): Document --wrapper.
9275 (main): Parse --wrapper.
9276
6fe305f7
UW
92772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9278
9279 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9280 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9281 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9282 (ppc_set_pc): Likewise.
9283 (ppc_arch_setup): New function.
9284 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9285 of collect_register.
889bf7c5 9286 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9287
5b0a002e
UW
92882008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9289
9290 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9291 instead of linux-ppc64-low.o.
9292 * linux-ppc64-low.c: Remove file.
9293 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9294 (linux-ppc64-low.o): Remove rule.
9295
9296 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9297 (init_registers_powerpc_64): Likewise.
9298 (ppc_regmap): Conditionally define depending on __powerpc64__.
9299 (ppc_cannot_store_register): Do not special-case "fpscr" when
9300 compiled on __powerpc64__.
9301 (ppc_collect_ptrace_register): New function.
9302 (ppc_supply_ptrace_register): New function.
9303 (ppc_breakpoint): Change type to "unsigned int".
9304 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9305 (the_low_target): Conditionally provide initializers for the
889bf7c5 9306 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9307 collect_ptrace_register and supply_ptrace_register members.
9308
9b4b61c8
UW
93092008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9310
9311 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9312 * server.c (gdbserver_xmltarget): Define.
9313 (get_features_xml): Use it to replace "target.xml" and arch_string.
9314
9315 * configure.srv: Remove srv_xmltarget. Add XML files that were
9316 mentioned there to srv_xmlfiles instead. Remove conditional tests
9317 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9318 srv_xmlfiles and srv_regobj to include all possible choices.
9319 * configure.ac (srv_xmltarget): Remove.
9320 (srv_xmlfiles): Do not add "target.xml".
9321 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9322 checks for supplementary target information.
9323 * configure: Regenerate.
9324 * Makefile.in (XML_TARGET): Remove.
9325 (target.xml): Remove rule.
9326 (clean): Do not clean up target.xml.
9327 (.PRECIOUS): Do not mention target.xml.
9328
9329 * target.h (struct target_ops): Remove arch_string member.
9330 * linux-low.c (linux_arch_string): Remove.
9331 (linux_target_ops): Remove arch_string initializer.
9332 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9333 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9334 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9335 * spu-low.c (spu_arch_string): Remove.
9336 (spu_target_ops): Remove arch_string initializer.
9337 * win32-low.c (win32_arch_string): Remove.
9338 (win32_target_ops): Remove arch_string initializer.
9339 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9340 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9341 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9342
ee1a7ae4
UW
93432008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9344
9345 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9346 by collect_ptrace_register and supply_ptrace_register hooks.
9347 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9348 instead of checking for the_low_target.left_pad_xfer.
9349 (usr_store_inferior_registers): Use collect_ptrace_register callback
9350 instead of checking for the_low_target.left_pad_xfer.
9351
9352 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9353 (s390_supply_ptrace_register): Likewise.
9354 (s390_fill_gregset): Call s390_collect_ptrace_register.
9355 (the_low_target): Update.
9356
9357 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9358 (ppc_supply_ptrace_register): Likewise.
9359 (the_low_target): Update.
9360
9361 * linux-i386-low.c (the_low_target): Update.
9362 * linux-x86-64-low.c (the_low_target): Update.
9363
d61ddec4
UW
93642008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9365
9366 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9367 reg-s390.o and reg-s390x.o.
9368
9369 * linux-low.c (new_inferior): New global variable.
9370 (linux_create_inferior, linux_attach): Set it.
9371 (linux_wait_for_process): Call the_low_target.arch_setup after the
9372 target has stopped for the first time.
9373 (initialize_low): Do not call the_low_target.arch_setup.
9374
9375 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9376 (s390_set_pc): Likewise.
9377 (s390_arch_setup): New function.
9378 (the_low_target): Use s390_arch_setup as arch_setup routine.
9379
9380 * regcache.c (realloc_register_cache): New function.
9381 (set_register_cache): Call it for each existing regcache.
9382
d05b4ac3
UW
93832008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9384
9385 * server.h (init_registers): Remove prototype.
9386
9387 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9388 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9389 instead of init_registers ().
9390 * linux-arm-low.c (init_registers_arm): Add prototype.
9391 (init_registers_arm_with_iwmmxt): Likewise.
9392 (the_low_target): Add initializer for arch_setup field.
9393 * linux-cris-low.c (init_registers_cris): Add prototype.
9394 (the_low_target): Add initializer for arch_setup field.
9395 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9396 (the_low_target): Add initializer for arch_setup field.
9397 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9398 (the_low_target): Add initializer for arch_setup field.
9399 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9400 (the_low_target): Add initializer for arch_setup field.
9401 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9402 (the_low_target): Add initializer for arch_setup field.
9403 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9404 (the_low_target): Add initializer for arch_setup field.
9405 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9406 (init_registers_mips64_linux): Likewise.
9407 (the_low_target): Add initializer for arch_setup field.
9408 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9409 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9410 (the_low_target): Add initializer for arch_setup field.
9411 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9412 (init_registers_powerpc_64): Likewise.
9413 (the_low_target): Add initializer for arch_setup field.
9414 * linux-s390-low.c (init_registers_s390): Add prototype.
9415 (init_registers_s390x): Likewise.
9416 (the_low_target): Add initializer for arch_setup field.
9417 * linux-sh-low.c (init_registers_sh): Add prototype.
9418 (the_low_target): Add initializer for arch_setup field.
9419 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9420 (the_low_target): Add initializer for arch_setup field.
9421 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9422 (the_low_target): Add initializer for arch_setup field.
9423
9424 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9425 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9426 instead of init_registers ().
9427 * win32-arm-low.c (init_registers_arm): Add prototype.
9428 (the_low_target): Add initializer for arch_setup field.
9429 * win32-i386-low.c (init_registers_i386): Add prototype.
9430 (the_low_target): Add initializer for arch_setup field.
9431
9432 * spu-low.c (init_registers_spu): Add prototype.
9433 (initialize_low): Call initialie_registers_spu () instead of
9434 initialize_registers ().
9435
fd96d250
PA
94362008-02-19 Pedro Alves <pedro@codesourcery.com>
9437
9438 * server.c (handle_v_requests): When handling the vRun and vAttach
9439 packets, if already debugging a process, don't kill it. Return an
9440 error instead.
9441
d41b6bb4
DJ
94422008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9443
9444 * server.c (handle_query): Correct length check.
9445
5ac588cf
PA
94462008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9447
9448 * win32-low.c (do_initial_child_stuff): Add process handle
9449 parameter. Set current_process_handle and current_process_id from the
9450 parameters. Clear globals.
9451 (win32_create_inferior): Don't set current_process_handle and
9452 current_process_id here. Instead pass them on the call to
9453 do_initial_child_stuff.
9454 (win32_attach): Likewise.
9455 (win32_clear_inferiors): New.
9456 (win32_kill): Don't close the current process handle or the
9457 current thread handle here. Instead call win32_clear_inferiors.
9458 (win32_detach): Don't open a new handle to the process. Call
9459 win32_clear_inferiors.
9460 (win32_join): Don't rely on current_process_handle; open a new
9461 handle using the process id.
9462 (win32_wait): Call win32_clear_inferiors when the inferior process
9463 has exited.
9464
ecd7ecbc
DJ
94652008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9466
9467 * server.c (monitor_show_help): Add "exit".
9468
1525d545
MG
94692008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9470
ecd7ecbc 9471 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9472 (clean): Add reg-xtensa.c.
9473 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9474 * configure.srv (xtensa*-*-linux*) New target.
9475 * linux-xtensa-low.c: New.
9476 * xtensa-xtregs.c: New.
1525d545 9477
59a016f0
PA
94782008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9479
9480 * hostio.c: Don't include errno.h.
9481 (errno_to_fileio_errno): Move to hostio-errno.
9482 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9483 error number outputting to the target->hostio_last_error callback.
9484 (hostio_packet_error): Use FILEIO_EINVAL directly.
9485 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9486 calls to hostio_error.
9487 * hostio-errno.c: New.
9488 * server.h (hostio_last_error_from_errno): Declare.
9489 * target.h (target_ops): Add hostio_last_error member.
9490 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9491 as hostio_last_error handler.
889bf7c5 9492 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9493 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9494 (wince_hostio_last_error): New functions.
9495 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9496 as hostio_last_error handler.
9497 (win32_target_ops) [!_WIN32_WCE]: Register
9498 hostio_last_error_from_errno as hostio_last_error handler.
9499 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9500 (hostio-errno.o): New rule.
9501 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9502 * configure.srv (srv_hostio_err_objs): New variable. Default to
9503 hostio-errno.o.
9504 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9505 * configure: Regenerate.
9506
2d717e4f
DJ
95072008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9508
9509 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9510 (linux_kill, linux_detach): Clean up the process list.
9511 * remote-utils.c (remote_open): Improve port number parsing.
9512 (putpkt_binary, input_interrupt): Only send interrupts if the target
9513 is running.
9514 * server.c (extended_protocol): Make static.
9515 (attached): Define earlier.
9516 (exit_requested, response_needed, program_argv): New variables.
9517 (target_running): New.
9518 (start_inferior): Clear attached here.
9519 (attach_inferior): Set attached here.
9520 (require_running): Define.
9521 (handle_query): Use require_running and target_running. Implement
9522 "monitor exit".
9523 (handle_v_attach, handle_v_run): New.
9524 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9525 (gdbserver_usage): Update.
9526 (main): Redo argument parsing. Handle --debug and --multi. Handle
9527 --attach along with other options or after the port. Save
9528 program_argv. Support no initial program. Resynchronize
9529 communication with GDB after an error. Handle "monitor exit".
9530 Use require_running and target_running. Always allow the extended
9531 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9532 restart in extended mode.
9533 * README: Refer to the GDB manual. Update --attach usage.
9534
7407e2de
AS
95352007-12-20 Andreas Schwab <schwab@suse.de>
9536
9537 * linux-low.c (STACK_SIZE): Define.
9538 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9539 (linux_test_for_tracefork): Likewise.
9540
b65d95c5
DJ
95412007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9542
9543 * linux-low.c (linux_wait_for_event): Update messages. Do not
9544 reinsert auto-delete breakpoints.
9545 * mem-break.c (struct breakpoint): Change return type of handler to
9546 int.
9547 (set_breakpoint_at): Update handler type.
9548 (reinsert_breakpoint_handler): Return 1 instead of calling
9549 delete_breakpoint.
9550 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9551 setting a new one.
9552 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9553 * mem-break.h (set_breakpoint_at): Update handler type.
9554 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9555 * win32-low.c (auto_delete_breakpoint): New.
9556 (get_child_debug_event): Use it.
9557
4e799345
DJ
95582007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9559
9560 * configure.ac: Check for pread and pwrite.
9561 * hostio.c (handle_pread): Fall back to lseek and read.
9562 (handle_pwrite): Fall back to lseek and write.
9563 * config.in, configure: Regenerated.
9564
27524b67
DJ
95652007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9566
9567 * server.c (myresume): Add own_buf argument.
9568 (main): Update calls.
9569
a20d5e98
DJ
95702007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9571
9572 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9573 * remote-utils.c (remote_open): Do not call disable_async_io.
9574 (block_async_io): Delete.
9575 (unblock_async_io): Make static.
9576 (initialize_async_io): New.
9577 * server.c (handle_v_cont): Handle async I/O here.
9578 (myresume): Likewise. Move other common resume tasks here...
9579 (main): ... from here. Call initialize_async_io. Disable async
9580 I/O before the main loop.
9581 * server.h (initialize_async_io): Declare.
9582 (block_async_io, unblock_async_io): Delete prototypes.
9583 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9584
b79d787e
DJ
95852007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9586
9587 * remote-utils.c (readchar): Allow binary data in received messages.
9588
d97903b2
PA
95892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9590
9591 * win32-low.c (attaching): New global.
9592 (win32_create_inferior): Clear the `attaching' global.
9593 (win32_attach): Set the `attaching' global.
9594 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9595 attaching. Only set a breakpoint at the entry point if not
9596 attaching.
9597
311de423
PA
95982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9599
9600 * server.c (main): Don't report dll events on the initial
9601 connection on attaches.
9602
6c2d16d2
PA
96032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9604
9605 * server.c (main): Relax numerical bases supported for the pid of
9606 the --attach command line argument.
9607
5ca906e6
PA
96082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9609
9610 * win32-low.c (win32_attach): Call OpenProcess before
9611 DebugActiveProcess, not after. Add last error output to error
9612 call.
9613
9c6c8194
PA
96142007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9615
9616 * win32-low.c (win32_get_thread_context)
9617 (win32_set_thread_context): New functions.
9618 (thread_rec): Use win32_get_thread_context.
9619 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9620 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9621 field.
9622
4d5d1aaa
PA
96232007-12-03 Leo Zayas
9624 Pedro Alves <pedro_alves@portugalmail.pt>
9625
9626 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9627 global variables.
9628 (child_add_thread): Minor cleanup.
9629 (child_continue): Resume artificially suspended threads before
9630 calling ContinueDebugEvent.
9631 (suspend_one_thread): New.
9632 (fake_breakpoint_event): New.
9633 (get_child_debug_event): Change return type to int. Check here if
9634 gdb sent an interrupt request. If a soft interrupt was requested,
9635 fake a breakpoint event. Return 0 if there is no event to handle,
9636 and 1 otherwise.
9637 (win32_wait): Don't check here if gdb sent an interrupt request.
9638 Ensure there is a valid event to handle.
9639 (win32_request_interrupt): Add soft interruption method as last
9640 resort.
9641
c436e841
PA
96422007-12-03 Leo Zayas
9643 Pedro Alves <pedro_alves@portugalmail.pt>
9644
9645 * win32-low.h (win32_thread_info): Add descriptions to the
9646 structure members. Replace `suspend_count' counter by a
9647 `suspended' flag.
9648 * win32-low.c (thread_rec): Update condition of when to get the
9649 context from the inferior. Rely on ContextFlags being set if it
9650 has already been retrieved. Only suspend the inferior thread if
9651 we haven't already. Warn if that fails.
9652 (continue_one_thread): s/suspend_count/suspended/. Only call
9653 ResumeThread once. Warn if that fails.
9654
e7b5fa67
PA
96552007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9656
9657 * win32-low.c (win32_wait): Don't read from the inferior when it
9658 has already exited.
9659
a385171d
PA
96602007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9661
9662 * Makefile.in (win32_low_h): New variable.
9663 (win32-low.o): Add dependency on $(win32_low_h).
9664 (win32-arm-low.o, win32-i386-low.o): New rules.
9665
f80c84b3
DJ
96662007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9667
9668 * hostio.c: Correct copyright year.
9669
a6b151f1
DJ
96702007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9671
9672 * Makefile.in (OBS): Add hostio.o.
9673 (hostio.o): New rule.
9674 * server.h (handle_vFile): Declare.
9675 * hostio.c: New file.
9676 * server.c (handle_v_requests): Take packet_len and new_packet_len
9677 for binary packets. Call handle_vFile.
9678 (main): Update call to handle_v_requests.
9679
f9387fc3
DJ
96802007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9681
9682 * linux-low.c: Include <sched.h>.
9683
51c2684e
DJ
96842007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9685
9686 * linux-low.c (linux_tracefork_grandchild): New.
9687 (linux_tracefork_child): Use clone.
9688 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9689
75f83163
JB
96902007-10-31 Joel Brobecker <brobecker@adacore.com>
9691
9692 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9693
da5898ce
DJ
96942007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9695
9696 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9697
24a09b5f
DJ
96982007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9699
9700 * inferiors.c (change_inferior_id): Delete.
9701 (add_pid_to_list, pull_pid_from_list): New.
9702 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9703 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9704 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9705 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9706 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9707 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9708 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9709 (using_threads): Always set to 1.
9710 (handle_extended_wait): New.
9711 (add_process): Do not set TID.
9712 (linux_create_inferior): Set must_set_ptrace_flags.
9713 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9714 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9715 (linux_thread_alive): Rename TID argument to LWPID.
9716 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9717 (linux_wait_for_event): Do not use TID or check using_threads. Update
9718 call to dead_thread_notify. Call handle_extended_wait.
9719 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9720 (send_sigstop): Delete sigstop_sent.
9721 (wait_for_sigstop): Avoid TID.
9722 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9723 (linux_test_for_tracefork): New.
9724 (linux_lookup_signals): Use thread_db_active and
9725 linux_supports_tracefork_flag.
9726 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9727 * linux-low.h (get_process_thread): Avoid TID.
9728 (struct process_ifo): Move thread_known and tid to the end. Remove
9729 sigstop_sent.
9730 (linux_attach_lwp, thread_db_init): Update prototypes.
9731 * server.h (change_inferior_id): Delete prototype.
9732 (add_pid_to_list, pull_pid_from_list): New prototypes.
9733 * thread-db.c (thread_db_use_events): New.
9734 (find_first_thread): Rename to...
9735 (find_one_thread): ...this. Update callers and messages. Do not
9736 call fatal. Check thread_db_use_events. Do not call
9737 change_inferior_id or new_thread_notify.
9738 (maybe_attach_thread): Update. Do not call new_thread_notify.
9739 (thread_db_init): Set thread_db_use_events. Check use_events.
9740 * utils.c (fatal, warning): Correct message prefix.
9741
30ed0a8f
DJ
97422007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9743
9744 * Makefile.in (clean): Remove new files.
9745 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9746 (powerpc-64.o, powerpc-64.c): New rules.
9747 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9748 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9749 with SPE.
9750 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9751 SPE targets.
9752 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9753 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9754 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9755 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9756 (target_regsets): Add AltiVec and SPE register sets.
9757 * configure.ac: Check for AltiVec and SPE.
9758 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9759 (ppc_fill_vrregset, ppc_store_vrregset): New.
9760 (target_regsets): Add AltiVec register set.
9761 * configure: Regenerated.
9762
fd462a61
DJ
97632007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9764
9765 * linux-low.c (O_LARGEFILE): Define.
9766 (linux_read_memory): Use /proc/PID/mem.
9767 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9768 * configure, config.in: Regenerated.
9769
69f223ed
DJ
97702007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9771
9772 * linux-low.c (linux_wait_for_event): Do not pass signals while
9773 single-stepping.
9774
aec18585
PA
97752007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9776
9777 * win32-low.c (create_process): New.
9778 (win32_create_inferior): Use create_process instead of
9779 CreateProcess. If create_process failed retry appending an ".exe"
9780 suffix. Store the GetLastError result immediatelly after
9781 create_process calls and use it on the call to error.
9782
34d86ddd
PA
97832007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9784
9785 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9786
5a0e3bd0
JB
97872007-08-23 Joel Brobecker <brobecker@adacore.com>
9788
9789 * configure.ac: Switch license to GPLv3.
9790
f88c79e6
MS
97912007-08-01 Michael Snyder <msnyder@access-company.com>
9792
9793 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9794
6b3d9b83
PA
97952007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9796
9797 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9798 typedef.
9799 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9800 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9801 CloseToolhelp32Snapshot.
9802 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9803 CloseToolhelp32Snapshot.
9804
c588c53c
MS
98052007-07-27 Michael Snyder <michael.snyder@access-company.com>
9806
9807 * server.c (main): Check for inferior exit before main loop.
9808
aa0403d9
PA
98092007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9810
9811 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9812 instead of on tmp_desc.
9813
255e7678
DJ
98142007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9815 Daniel Jacobowitz <dan@codesourcery.com>
9816
9817 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9818 (add_thread): Minor cleanups.
9819 (clear_inferiors): Move lower in the file. Clear the DLL
9820 list.
9821 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9822 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9823 (xml_escape_text): New.
9824 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9825 for qSupported.
9826 (handle_v_cont): Report errors.
9827 (gdbserver_version): Update.
9828 (main): Correct size of own_buf. Do not report initial DLL events.
9829 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9830 (unloaded_dll, xml_escape_text): New.
9831 * win32-low.c (enum target_waitkind): Update comments.
9832 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9833 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9834 (win32_EnumProcessModules, win32_GetModuleInformation)
9835 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9836 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9837 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9838 (win32_Module32First, win32_Module32Next, load_toolhelp)
9839 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9840 (get_child_debug_event): Handle DLL events.
9841 (win32_wait): Likewise.
9842
0d37add9
DJ
98432007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9844
9845 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9846 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9847
45e2715e
PA
98482007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9849
9850 * win32-low.c (handle_output_debug_string): Ignore event if not
9851 waiting.
9852
c5674cf1
PA
98532007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9854
9855 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9856
2bbe3cc1
DJ
98572007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9858
9859 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9860
ae13219e
DJ
98612007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9862
9863 * inferiors.c (change_inferior_id): Add comment.
9864 * linux-low.c (check_removed_breakpoint): Add an early
9865 prototype. Improve debug output.
9866 (linux_attach): Doc update.
9867 (linux_detach_one_process, linux_detach): Clean up before releasing
9868 each process.
9869 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9870 * linux-low.h (struct process_info): Doc improvement.
9871 * mem-break.c (delete_all_breakpoints): New.
9872 * mem-break.h (delete_all_breakpoints): New prototype.
9873 * thread-db.c (find_first_thread): New.
9874 (thread_db_create_event): Call it instead of
9875 thread_db_find_new_threads. Clean up unused variables.
9876 (maybe_attach_thread): Remove first thread handling.
9877 (thread_db_find_new_threads): Use find_first_thread.
9878 (thread_db_get_tls_address): Likewise.
9879
4105de34
DJ
98802007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9881
9882 * thread-db.c (thread_db_find_new_threads): Add prototype.
9883 (thread_db_create_event): Check for the main thread before adding
9884 a new thread.
9885 (maybe_attach_thread): Only enable event reporting if TID == 0.
9886 (thread_db_get_tls_address): Check for new threads.
9887
2b876972
DJ
98882007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9889
9890 * linux-low.c (linux_create_inferior): Try execv before execvp.
9891 * spu-low.c (spu_create_inferior): Likewise.
9892
7a245884
DJ
98932007-06-13 Mike Frysinger <vapier@gentoo.org>
9894
9895 * linux-low.c (linux_create_inferior): Change execv to execvp.
9896 * spu-low.c (spu_create_inferior): Likewies.
9897
117ce543
DJ
98982007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9899
9900 * Makefile.in (clean): Clean new files instead of deleted ones.
9901 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9902 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9903 rules.
9904 * configure.srv: Specify XML files and new regformats for MIPS and
9905 MIPS64 GNU/Linux.
9906 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9907 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9908 an entry for the restart register.
9909 (mips_cannot_fetch_register, mips_cannot_store_register)
9910 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9911 register names to match the XML descriptions.
9912 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9913 restart register instead of $0.
9914
0e7f50da
UW
99152007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9916 Markus Deuling <deuling@de.ibm.com>
9917
9918 * remote-utils.c (decode_xfer_write): New function.
9919 * server.h (decode_xfer_write): Add prototype.
9920 * server.c (handle_query): Add PACKET_LEN argument. Support
9921 qXfer:spu:read and qXfer:spu:write packets.
9922 (main): Pass packet_len to handle_query.
9923 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9924 * target.h (target_ops): Add qxfer_spu.
9925
374c1d38
UW
99262007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9927
9928 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9929 accessing non-seekable spufs files.
9930
bb63802a
UW
99312007-05-16 Markus Deuling <deuling@de.ibm.com>
9932
889bf7c5 9933 * server.c (handle_query): Add reply for qC packet.
bb63802a 9934
7390519e
PA
99352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9936 Leo Zayas <lerele@champenstudios@com>
9937
9938 * server.h (check_remote_input_interrupt_request): New function.
9939 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9940 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9941 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9942 (check_remote_input_interrupt_request): New function.
9943 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9944 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9945 winapi_GenerateConsoleCtrlEvent): New typedefs.
9946 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9947 to 250 ms.
9948 (win32_wait): Check for remote interrupt request
9949 with check_remote_input_interrupt_request.
9950 (win32_request_interrupt): New function.
9951 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9952
34b34921
PA
99532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9954
9955 * win32-low.c (debug_registers_changed,
9956 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9957 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9958 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9959 (thread_rec): Get context using the low target.
9960 (child_add_thread): Call thread_added on the low target,
9961 which does the same thing.
9962 (regptr): Delete.
9963 (do_initial_child_stuff): Remove debug registers references.
9964 Set context using the low target. Resume threads after
9965 setting the contexts.
9966 (child_continue): Remove dead variable. Remove debug
9967 registers references.
9968 (child_fetch_inferior_registers): Go through the low target.
9969 (do_child_store_inferior_registers): Remove.
9970 (child_store_inferior_registers): Go through the low target.
9971 (win32_resume): Remove debug registers references.
9972 Set context using the low target.
9973 (handle_exception): Change return type to void. Don't record
9974 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9975 first chance exception.
889bf7c5 9976 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9977 goto loop. Always return after waiting for debug event.
9978 (win32_wait): Convert to switch statement. Handle spurious
9979 events.
9980
9981 * win32-i386-low.c (debug_registers_changed,
9982 debug_registers_used): New.
9983 (initial_stuff): Rename to ...
9984 (i386_initial_stuff): ... this. Clear debug registers
9985 state variables.
9986 (store_debug_registers): Delete.
9987 (i386_get_thread_context): New.
9988 (load_debug_registers): Delete.
9989 (i386_set_thread_context): New.
9990 (i386_thread_added): New.
9991 (single_step): Rename to ...
9992 (i386_single_step): ... this.
9993 (do_fetch_inferior_registers): Rename to ...
9994 (i386_fetch_inferior_register): ... this.
9995 (i386_store_inferior_register): New.
9996 (the_low_target): Adapt to new interface.
9997
9998 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9999 (arm_get_thread_context): New.
10000 (arm_set_thread_context): New.
10001 (regptr): New.
10002 (do_fetch_inferior_registers): Rename to ...
10003 (arm_fetch_inferior_register): ... this.
10004 (arm_store_inferior_register): New.
10005 (arm_wince_breakpoint): Reimplement as unsigned long.
10006 (arm_wince_breakpoint_len): Define.
10007 (the_low_target): Adapt to new interface.
10008
10009 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10010 load_debug_registers. Add get_thread_context, set_thread_context,
10011 thread_added and store_inferior_register. Rename
10012 fetch_inferior_registers to fetch_inferior_register.
10013 (regptr): Remove declaration.
10014
dd6953e1
PA
100152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10016
10017 * linux-low.c (linux_detach): Change return type to int. Return 0.
10018 * spu-low.c (spu_detach): Likewise.
10019
444d6139
PA
100202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10021
10022 * target.h (target_ops): Change return type of detach to int.
10023 Add join.
10024 (join_inferior): New.
10025 * server.c (main): Don't skip detach support on mingw32.
10026 If the inferior doesn't support detaching return error.
10027 Call join_inferior instead of using waitpid.
10028 * linux-low.c (linux_join): New.
10029 (linux_target_op): Add linux_join.
10030 * spu-low.c (spu_join): New.
10031 (spu_target_ops): Add spu_join.
10032 * win32-low.c (win32_detach): Adapt to new interface.
10033 Reopen current_process_handle before detaching. Issue a child
10034 resume before detaching.
10035 (win32_join): New.
10036 (win32_target_op): Add win32_join.
10037
1d5315fe
PA
100382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10039
10040 * win32-low.c (win32-attach): Fix return value.
10041 * target.h (target_ops): Describe ATTACH return values.
10042
bf914831
PA
100432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10044
10045 * win32-low.c (GETPROCADDRESS): Define.
10046 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10047 (winapi_DebugSetProcessKillOnExit): Likewise.
10048 (win32_create_inferior): Force usage of ansi CreateProcessA.
10049 (win32_attach): Use GETPROCADDRESS.
10050 (win32_detach): Likewise.
10051
f72f3e60
PA
100522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10053
10054 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10055
ed50f18f
PA
100562007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10057
10058 * win32-low.c: Commit leftover changes from 2007-03-29.
10059
0c2ead7e
DJ
100602007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10061
10062 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10063 fields short instead of int. Add explicit padding.
10064 (i387_cache_to_fsave): Remove unnecessary casts.
10065 (i387_fsave_to_cache): Doc fix.
10066 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10067
73725ff3
DJ
100682007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10069
10070 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10071 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10072
d99f33d8
PA
100732007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10074
10075 * configure.srv (arm*-*-mingw32ce*): Move near the other
10076 arm targets.
10077
68070c10
PA
100782007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10079
2482afc6 10080 * configure.ac: Add errno checking.
68070c10
PA
10081 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10082 sys/file.h and malloc.h.
10083 (AC_CHECK_DECLS): Add perror.
10084 (srv_mingwce): Handle.
2482afc6 10085 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10086 win32-i386-low.o to srv_tgtobj.
10087 (i[34567]86-*-mingw*): Likewise.
10088 (arm*-*-mingw32ce*): Add case.
10089 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10090 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10091 [__MINGW32CE__] (strerror): New function.
10092 [__MINGW32CE__] (errno): Define to GetLastError.
10093 [__MINGW32CE__] (COUNTOF): New macro.
10094 (remote_open): Remove extra close call.
10095 * mem-break.c (delete_breakpoint_at): New function.
10096 * mem-break.h (delete_breakpoint_at): Declare.
10097 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10098 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10099 [USE_WIN32API] (read, write): Add char* casts.
10100 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10101 * server.h: Include wincecompat.h on Windows CE.
10102 [HAVE_ERRNO_H]: Check.
10103 (perror): Declare if not declared.
10104 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10105 (perror_with_name): Remove errno declaration.
10106 * wincecompat.h: New.
10107 * wincecompat.c: New.
10108 * win32-low.h: New.
10109 * win32-arm-low.c: New.
10110 * win32-i386-low.c: New.
10111 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10112 (OUTMSG2): Make it safe.
10113 (_T): New macro.
10114 (COUNTOF): New macro.
10115 (NUM_REGS): Get it from the low target.
10116 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10117 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10118 (thread_rec): Let low target handle debug registers.
10119 (child_add_thread): Likewise.
10120 (child_init_thread_list): Likewise.
10121 (continue_one_thread): Likewise.
10122 (regptr): New.
10123 (do_child_fetch_inferior_registers): Move to ...
10124 * win32-i386-low.c: ... here, and rename to ...
10125 (do_fetch_inferior_registers): ... this.
889bf7c5 10126 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10127 Go through the low target.
10128 (do_child_store_inferior_registers): Use regptr.
10129 (strwinerror): New function.
10130 (win32_create_inferior): Handle Windows CE.
10131 Use strwinerror instead of strerror on Windows error
10132 codes. Add program to the error output.
10133 Don't close the main thread handle on Windows CE.
10134 (win32_attach): Use coredll.dll on Windows CE.
10135 (win32_kill): Close current process and current
10136 thread handles.
10137 (win32_detach): Use coredll.dll on Windows CE.
10138 (win32_resume): Let low target handle debug registers, and
10139 step request.
10140 (handle_exception): Add/Remove initial breakpoint. Avoid
10141 non-existant WSTOPSIG on Windows CE.
10142 (win32_read_inferior_memory): Cast to remove warning.
10143 (win32_arch_string): Go through the low target.
10144 (initialize_low): Call set_breakpoint_data with the low
10145 target's breakpoint.
10146 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10147 FOP_REGNUM, mappings): Move to ...
10148 * win32-i386-low.c: ... here.
10149 * win32-low.c (win32_thread_info): Move to ...
10150 * win32-low.h: ... here.
10151 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10152 win32-arm-low.c and wincecompat.c.
10153 (all:): Add $EXEEXT.
10154 (install-only:): Likewise.
10155 (gdbserver:): Likewise.
10156 (gdbreplay:): Likewise.
10157 * config.in: Regenerate.
10158 * configure: Regenerate.
10159
41093d81
PA
101602007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10161
10162 * win32-low.c: Rename typedef thread_info to
10163 win32_thread_info throughout.
10164
544afa54
PA
101652007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10166
10167 * win32-i386-low.c: Rename to ...
10168 * win32-low.c: ... this.
10169 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10170 * Makefile.in: Likewise.
10171
bce7165d
PA
101722007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10173
10174 * remote-utils.c (monitor_output): Constify msg parameter.
10175 * server.h (monitor_output): Likewise.
10176 * win32-i386-low.c (handle_output_debug_string): New.
10177 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10178 handle_output_debug_string.
10179 (get_child_debug_event): Likewise.
10180
506c7aa0
DJ
101812007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10182
10183 * server.c (main): Correct strtoul check.
10184
42c81e2a
DJ
101852007-03-27 Jon Ringle <jon@ringle.org>
10186
10187 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10188
9453113a
DJ
101892007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10190
10191 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10192
64a69107
DJ
101932007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10194
10195 * terminal.h: Check HAVE_SGTTY_H.
10196
101972007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10198
10199 * remote-utils.c (remote_open): Print out the assigned port number.
10200
c74d0ad8
DJ
102012007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10202
10203 * remote-utils.c (monitor_output): New function.
10204 * server.c (debug_threads): Define here.
10205 (monitor_show_help): New function.
10206 (handle_query): Handle qRcmd.
10207 (main): Do not handle 'd' packet.
10208 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10209 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10210 of debug_threads.
10211
de7c3b4a
PA
102122007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10213
10214 * Makefile.in (EXEEXT): New.
10215 (clean): Use $(EXEEXT).
10216
ef57601b
PA
102172007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10218
10219 * target.h (target_ops): Rename send_signal to request_interrupt,
10220 and remove enum target_signal parameter.
10221 * linux-low.c (linux_request_interrupt): Rename from
10222 linux_send_signal, and always send SIGINT.
10223 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10224 and always send SIGINT.
10225 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10226 of send_signal.
10227 (input_interrupt): Likewise.
10228
820f2bda
PA
102292007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10230
10231 * server.c (get_features_xml): Check if target implemented
10232 arch_string.
10233 * win32-i386-low.c (win32_arch_string): New.
10234 (win32_target_ops): Add win32_arch_string as arch_string member.
10235
ab39bf24
UW
102362007-02-22 Markus Deuling <deuling@de.ibm.com>
10237
10238 * spu-low.c (spu_arch_string): New.
10239 (spu_target_ops): Add spu_arch_string.
10240
61ff6e04
DJ
102412007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10242
10243 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10244 * configure.ac: Do not check for terminal.h.
10245 * configure, config.in: Regenerated.
10246
fb1e4ffc
DJ
102472007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10248
10249 * Makefile.in (OBS): Add $(XML_BUILTIN).
10250 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10251 (clean): Update.
10252 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10253 (arm-with-iwmmxt.c): New.
10254 * config.in, configure: Regenerate.
10255 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10256 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10257 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10258 (arm*-*-linux*): Add iWMMXt and regset support.
10259 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10260 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10261 (arm_store_wmmxregset, target_regsets): New.
10262 * server.c (get_features_xml): Take annex argument. Check builtin
10263 XML documents.
10264 (handle_query): Handle multiple annexes.
10265
0f48aa01
DJ
102662007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10267
10268 * remote-utils.c [USE_WIN32API] (read, write): Define.
10269 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10270 write.
10271
23181151
DJ
102722007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10273
10274 * linux-i386-low.c (the_low_target): Set arch_string.
10275 * linux-x86-64-low.c (the_low_target): Likewise.
10276 * linux-low.c (linux_arch_string): New.
10277 (linux_target_ops): Add it.
10278 * linux-low.h (struct linux_target_ops): Add arch_string.
10279 * server.c (write_qxfer_response): Use const void * for DATA.
10280 (get_features_xml): New.
10281 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10282 * target.h (struct target_ops): Add arch_string method.
10283
9d606399
DJ
102842007-01-03 Denis Pilat <denis.pilat@st.com>
10285 Daniel Jacobowitz <dan@codesourcery.com>
10286
10287 * linux-low.c (linux_kill): Handle being called with no threads.
10288 * win32-i386-low.c (win32_kill): Likewise.
10289 (get_child_debug_event): Clear current_process_handle.
10290
102912006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10292 Daniel Jacobowitz <dan@codesourcery.com>
10293
10294 * remote-utils.c (remote_open): Check the type of specified
10295 serial port devices before opening them.
10296 * server.c (main): Kill the inferior if an error occurs during
10297 the first remote_open.
10298
a5e13d24
DJ
102992006-12-05 Markus Deuling <deuling@de.ibm.com>
10300
10301 * README: Update supported targets.
10302
186947f7
DJ
103032006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10304
10305 * Makefile.in (clean): Remove reg-mips64.c.
10306 (reg-mips64.c, reg-mips64.o): New rules.
10307 * configure.srv: Handle mips64. Include regset support for mips.
10308 * linux-mips-low.c (union mips_register): New.
10309 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10310 (mips_breakpoint, mips_breakpoint_at): Use int.
10311 (mips_collect_register, mips_supply_register)
10312 (mips_collect_register_32bit, mips_supply_register_32bit)
10313 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10314 (mips_store_fpregset, target_regsets): New.
10315 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10316
a13e2c95
UW
103172006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10318
10319 * configure.srv: Add target "spu*-*-*".
10320 * Makefile.in (clean): Remove reg-spu.c.
10321 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10322 * spu-low.c: New file.
10323
cb7283db
DJ
103242006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10325
10326 * configure.ac: Correct td_thr_tls_get_addr test.
10327 * configure: Regenerated.
10328
89be2091
DJ
103292006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10330
10331 * linux-low.c (linux_wait_for_event): Reformat. Use the
10332 pass_signals array.
10333 * remote-utils.c (decode_address_to_semicolon): New.
10334 * server.c (pass_signals, handle_general_set): New.
10335 (handle_query): Mention QPassSignals for qSupported.
10336 (main): Call handle_general_set.
10337 * server.h (pass_signals, decode_address_to_semicolon): New.
10338
000ef4f0
DJ
103392006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10340
10341 * server.c (handle_query): Correct error handling for read_auxv.
10342
b7149293
UW
103432005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10344
10345 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10346 and srv_linux_thread_db to yes.
10347 * linux-s390-low.c (s390_fill_gregset): New function.
10348 (target_regsets): Define data structure.
10349
dae5f5cf
DJ
103502006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10351
10352 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10353 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10354 * config.in, configure: Regenerated.
10355 * inferiors.c (gdb_id_to_thread): New function.
10356 (gdb_id_to_thread_id): Use it.
10357 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10358 * linux-low.h (struct process_info): Add th member.
10359 (thread_db_get_tls_address): New prototype.
10360 * remote-utils.c (decode_address): Make non-static.
10361 * server.c (handle_query): Handle qGetTLSAddr.
10362 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10363 * target.h (struct target_ops): Add get_tls_address.
10364 * thread-db.c (maybe_attach_thread): Save the thread handle.
10365 (thread_db_get_tls_address): New.
10366
32ca6d61
DJ
103672006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10368
10369 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10370 (linux_resume_one_process): Take a siginfo_t *. Update all
10371 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10372 (struct pending_signals): Add a siginfo_t.
10373 (linux_wait_for_process): Always set last_status.
10374 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10375 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10376 * linux-low.h (struct process_info): Add last_status.
10377
5ffff7c1
DJ
103782006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10379
10380 * remote-utils.c (try_rle): New function.
10381 (putpkt_binary): Use it.
10382
8695c747
DJ
103832006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10384
10385 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10386 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10387 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10388 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10389 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10390 point registers.
10391
290fadea
RS
103922006-08-08 Richard Sandiford <richard@codesourcery.com>
10393
10394 * server.c (terminal_fd): New variable.
10395 (old_foreground_pgrp): Likewise.
10396 (restore_old_foreground_pgrp): New function.
10397 (start_inferior): Record the terminal file descriptor in terminal_fd
10398 and its original foreground group in old_foreground_pgrp. Register
10399 restore_old_foreground_pgrp with atexit().
10400
9f2e1e63
DJ
104012006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10402
10403 * server.c (handle_query): Correct qPart to qXfer.
10404
b80864fb
DJ
104052006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10406
10407 * configure.ac: Check for more headers which are missing on
10408 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10409 * configure.srv: Add Cygwin and mingw32.
10410 * remote-utils.c: Don't include headers unconditionally which
10411 are missing on mingw32. Include <winsock.h> for mingw32.
10412 (remote_open): Adjust for mingw32 support. Flush
10413 standard error after writing to it.
10414 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10415 (unblock_async_io, enable_async_io, disable_async_io)
10416 (readchar, getpkt): Update for Winsock support.
10417 (prepare_resume_reply): Expect a protocol signal number.
10418 * server.c: Disable <sys/wait.h> on mingw32.
10419 (start_inferior): Adjust for mingw32 support. Flush
10420 standard error after writing to it.
10421 (attach_inferior): Likewise. Use protocol signal
10422 numbers.
10423 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10424 and names.
10425 * win32-i386-low.c: New file.
10426 * Makefile.in (XM_CLIBS): Set.
10427 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10428 (win32-i386-low.o): New dependency rule.
10429 * linux-low.c (linux_wait): Use target signal numbers.
10430 * target.h (struct target_ops): Doc fix.
10431 * server.h (target_signal_to_name): New prototype.
10432 * gdbreplay.c: Don't include headers unconditionally which
10433 are missing on mingw32. Include <winsock.h> for mingw32.
10434 (remote_close, remote_open): Adjust for Winsock support.
10435 * configure, config.in: Regenerated.
10436
0876f84a
DJ
104372006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10438
10439 * server.c (decode_xfer_read, write_qxfer_response): New.
10440 (handle_query): Take a packet length argument. Handle
10441 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10442 the qSupported response.
10443 (main): Update call to handle_query.
10444
01f9e8fa
DJ
104452006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10446
10447 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10448 (putpkt_binary): Renamed from putpkt and adjusted for binary
10449 data.
10450 (putpkt): New wrapper for putpkt_binary.
10451 (readchar): Don't mask off the high bit.
10452 (decode_X_packet): New function.
10453 * server.c (main): Call putpkt_binary if a handler sets the packet
10454 length. Save the length of the incoming packet. Handle 'X'.
10455 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10456
be2a5f71
DJ
104572006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10458
10459 * server.c (handle_query): Handle qSupported.
10460
ea025f5f
DJ
104612006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10462
10463 * remote-utils.c (all_symbols_looked_up): New variable.
10464 (look_up_one_symbol): Check it.
10465 * server.h (look_up_one_symbol): New declaration.
10466 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10467
9308fc88
DJ
104682006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10469
10470 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10471 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10472 (PTRACE_GET_THREAD_AREA): Define.
10473 (ps_get_thread_area): New function.
10474
52fb6437
NS
104752006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10476
10477 * configure.srv (m68k*-*-uclinux*): New target.
10478 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10479 (linux_resume_one_process): Remove extraneous cast.
10480 (linux_read_offsets): New.
10481 (linux_target_op): Add linux_read_offsets on mmuless systems.
10482 * server.c (handle_query): Add qOffsets logic.
10483 * target.h (struct target_ops): Add read_offsets.
10484
21b0f40c
DJ
104852006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10486
10487 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10488 (PTRACE_GET_THREAD_AREA): Define.
10489 (ps_get_thread_area): New function.
10490 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10491 (linux-x86-64-low.o): Update.
10492
0050a760
DJ
104932006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10494
10495 * configure.ac: Remove checks for prfpregset_t.
10496 * gdb_proc_service.h: New file.
10497 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10498 new "gdb_proc_service.h".
10499 * proc-service.c: Likewise.
10500 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10501 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10502 * Makefile.in (gdb_proc_service_h): Updated.
10503 * configure, config.in: Regenerated.
10504
b92a518e
DJ
105052006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10506
10507 * remote-utils.c (prepare_resume_reply): Move declaration
10508 of gdb_id_from_wait to the top of the block.
10509
545587ee
DJ
105102006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10511
10512 * linux-low.c (regsets_store_inferior_registers): Read the regset
10513 from the target before filling it.
10514
9db87ebd
DJ
105152006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10516
10517 * server.c (attach_inferior): Return SIGTRAP for a successful
10518 attach.
10519
dd24457d
DJ
105202006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10521
10522 * Makefile.in (OBS): Add version.o.
10523 (STAGESTUFF): Delete.
10524 (version.o): Add dependencies.
10525 (version.c): Replace rule.
10526 (clean): Remove version.c.
10527 * server.c (gdbserver_version): New.
10528 (gdbserver_usage): Use printf.
10529 (main): Handle --version and --help.
10530 * server.h (version, host_name): Add declarations.
10531
6f0f660e
EZ
105322005-12-23 Eli Zaretskii <eliz@gnu.org>
10533
889bf7c5
PA
10534 * linux-arm-low.c:
10535 * linux-arm-low.c:
10536 * inferiors.c:
10537 * i387-fp.h:
10538 * i387-fp.c:
10539 * gdbreplay.c:
10540 * regcache.c:
10541 * proc-service.c:
10542 * mem-break.h:
10543 * mem-break.c:
10544 * linux-x86-64-low.c:
10545 * linux-sh-low.c:
10546 * linux-s390-low.c:
10547 * linux-ppc64-low.c:
10548 * linux-ppc-low.c:
10549 * linux-mips-low.c:
10550 * linux-m68k-low.c:
10551 * linux-m32r-low.c:
10552 * linux-low.h:
10553 * linux-low.c:
10554 * linux-ia64-low.c:
10555 * linux-i386-low.c:
10556 * linux-crisv32-low.c:
10557 * thread-db.c:
10558 * terminal.h:
10559 * target.h:
10560 * target.c:
10561 * server.h:
10562 * server.c:
10563 * remote-utils.c:
10564 * regcache.h:
10565 * utils.c:
10566 * Makefile.in:
10567 * configure.ac:
6f0f660e
EZ
10568 * gdbserver.1: Add (C) after Copyright. Update the FSF
10569 address.
10570
9d1fb177
DJ
105712005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10572
10573 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10574 (arm_breakpoint_at): Recognize both breakpoints.
10575 (the_low_target): Use the correct breakpoint instruction.
10576
011a70c2
DJ
105772005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10578
10579 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10580 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10581 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10582 (the_low_target): Update.
10583
7fb85e41
AS
105842005-10-25 Andreas Schwab <schwab@suse.de>
10585
10586 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10587
10588 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10589 (ia64_num_regs): Reduce to 462.
10590
3db0444b
DJ
105912005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10592
10593 * acinclude.m4: Correct quoting.
10594 * aclocal.m4: Regenerated.
10595
10596 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10597 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10598 (thread_db_init): Call thread_db_err_str.
10599 * configure.ac: Check for TD_VERSION.
10600 * config.in, configure: Regenerated.
10601
bee0189a
DJ
106022005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10603
10604 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10605
e9d25b98
DJ
106062005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10607
10608 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10609 is not available. Define HAVE_PTRACE_GETREGS if it is.
10610 * config.in, configure: Regenerated.
10611 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10612 * linux-i386-low.c, linux-m68k-low.c: Update to use
10613 HAVE_PTRACE_GETREGS.
10614 * linux-low.c (regsets_fetch_inferior_registers)
10615 (regsets_store_inferior_registers): Only return 0 if we processed
10616 GENERAL_REGS.
10617 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10618 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10619
a06660f7
DJ
106202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10621
10622 * inferiors.c (struct thread_info): Add gdb_id.
10623 (add_thread): Add gdb_id argument.
10624 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10625 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10626 calls to add_thread.
10627 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10628 * server.c (handle_query): Use thread_to_gdb_id.
10629 (handle_v_cont, main): Use gdb_id_to_thread_id.
10630 * server.h (add_thread): Update prototype.
10631 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10632 prototypes.
10633
5a1f5858
DJ
106342005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10635
10636 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10637 left-padded registers.
10638 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10639 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10640
e122f1f5
SE
106412005-07-01 Steve Ellcey <sje@cup.hp.com>
10642
10643 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10644 * configure: Regenerate.
10645 * config.in: Regenerate.
10646 * server.h (NEED_DECLARATION_STRERROR):
10647 Replace with !HAVE_DECL_STRERROR.
10648
d592fa2f
DJ
106492005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10650
10651 * linux-low.c (linux_wait, linux_send_signal): Don't test
10652 an unsigned long variable for > 0 if it could be MAX_ULONG.
10653 * server.c (myresume): Likewise.
10654 * target.c (set_desired_inferior): Likewise.
10655
ccbd4912
MK
106562005-06-13 Mark Kettenis <kettenis@gnu.org>
10657
10658 * configure.ac: Simplify and improve check for socklen_t.
10659 * configure, config.in: Regenerate.
10660
f450004a
DJ
106612005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10662
10663 * acconfig.h: Remove.
10664 * configure.ac: Add a test for socklen_t. Use three-argument
10665 AC_DEFINE throughout.
10666 * config.in: Regenerated using autoheader 2.59.
10667 * configure: Regenerated.
10668
10669 * gdbreplay.c (socklen_t): Provide a default.
10670 (remote_open): Use socklen_t.
10671 * remote-utils.c (socklen_t): Provide a default.
10672 (remote_open): Use socklen_t.
10673 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10674 unsigned char.
10675
10676 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10677 char for buffers.
10678 * linux-low.c (linux_read_memory, linux_write_memory)
10679 (linux_read_auxv): Likewise.
10680 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10681 (check_mem_write): Likewise.
10682 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10683 Likewise.
10684 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10685 (registers_from_string, register_data): Likewise.
10686 * server.c (handle_query, main): Likewise.
10687 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10688 (decode_M_packet): Likewise.
10689 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10690 * target.h (struct target_ops): Update read_memory, write_memory,
10691 and read_auxv.
10692 (read_inferior_memory, write_inferior_memory): Update.
10693 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10694 to unsigned char *.
10695 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10696 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10697 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10698 linux-s390-low.c, linux-sh-low.c: Update for changes in
10699 read_inferior_memory and the_low_target->breakpoint.
10700
eee84df1
DJ
107012005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10702
10703 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10704 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10705 * configure.srv: Add powerpc64-*-linux*.
10706 * linux-ppc64-low.c: New file.
10707
45b134e5
OF
107082005-05-23 Orjan Friberg <orjanf@axis.com>
10709
10710 * linux-cris-low.c: New file with support for CRIS.
10711 * linux-crisv32-low.c: Ditto for CRISv32.
10712 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10713 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10714 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10715 reg-crisv32.o, and reg-crisv32.c to make rules.
10716 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10717 recognized targets.
10718
48d93c75
UW
107192005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10720
10721 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10722 of sizeof (PTRACE_XFER_TYPE).
10723 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10724
e013ee27
OF
107252005-05-12 Orjan Friberg <orjanf@axis.com>
10726
889bf7c5 10727 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10728 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10729 pointers for hardware watchpoint support.
10730 * linux-low.h (struct linux_target_ops): Ditto.
10731 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10732 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10733 to linux_target_ops.
10734 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10735 reply packet.
10736 * server.c (main): Recognize 'Z' and 'z' packets.
10737
b0ded00b
UW
107382005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10739
10740 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10741 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10742 (the_low_target): Add new members.
10743
8643e2ad
DJ
107442005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10745
10746 * proc-service.c (ps_lgetregs): Search all_processes instead of
10747 all_threads.
10748
fc620387
DJ
107492005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10750
10751 * server.c (start_inferior): Change return type to int.
10752 (attach_inferior): Change sigptr to int *.
10753 (handle_v_cont, handle_v_requests): Change signal to int *.
10754 (main): Change signal to int.
10755
107562005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10757
10758 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10759 * configure.srv: Add m32r*-*-linux*.
10760 * linux-m32r-low.c: New file.
10761
e0e76420
DJ
107622005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10763
10764 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10765
a1928bad
DJ
107662005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10767
10768 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10769 Take unsigned long arguments for PIDs.
10770 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10771 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10772 (wait_for_sigstop, linux_resume_one_process)
10773 (regsets_fetch_inferior_registers, linux_send_signal)
10774 (linux_read_auxv): Likewise. Update the types of variables holding
10775 PIDs. Update format string specifiers.
10776 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10777 * remote-utils.c (prepare_resume_reply): Likewise.
10778 * server.c (cont_thread, general_thread, step_thread)
10779 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10780 unsigned long.
10781 (handle_query): Update format specifiers.
10782 (handle_v_cont, main): Use strtoul for thread IDs.
10783 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10784 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10785 (general_thread, step_thread, thread_from_wait)
10786 (old_thread_from_wait): Update.
10787 * target.h (struct thread_resume): Use unsigned long for THREAD.
10788 (struct target_ops): Use unsigned long for arguments to attach and
10789 thread_alive.
10790
dcdb98d2
DJ
107912005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10792
10793 * acinclude.m4: Include bfd/bfd.m4 directly.
10794 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10795 <agriffis@toolchain.org>.
10796 * aclocal.m4, configure: Regenerated.
10797
bec39cab
AC
107982005-01-07 Andrew Cagney <cagney@gnu.org>
10799
10800 * configure.ac: Rename configure.in, require autoconf 2.59.
10801 * configure: Re-generate.
10802
434c4c77
DJ
108032004-12-08 Daniel Jacobowitz <dan@debian.org>
10804
10805 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10806 LIBS when finished.
10807 * aclocal.m4: Regenerated.
10808 * configure: Regenerated.
10809
db1d3e1b
AS
108102004-11-21 Andreas Schwab <schwab@suse.de>
10811
10812 * linux-m68k-low.c (m68k_num_gregs): Define.
10813 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10814 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10815 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10816 (m68k_breakpoint_at): New. Add to the_low_target.
10817
10818 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10819 srv_linux_thread_db to yes.
10820
43360365
JB
108212004-10-20 Joel Brobecker <brobecker@gnat.com>
10822
10823 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10824 (ARCH_SET_FS): Likewise.
10825 (ARCH_GET_FS): Likewise.
10826 (ARCH_GET_GS): Likewise.
10827
fd500816
DJ
108282004-10-16 Daniel Jacobowitz <dan@debian.org>
10829
10830 * linux-i386-low.c (ps_get_thread_area): New.
10831 * linux-x86-64-low.c (ps_get_thread_area): New.
10832 * linux-low.c: Include <sys/syscall.h>.
10833 (linux_kill_one_process): Don't kill the first thread here.
10834 (linux_kill): Kill the first thread here.
10835 (kill_lwp): New function.
10836 (send_sigstop, linux_send_signal): Use it.
10837 * proc-service.c: Clean up #ifdefs.
10838 (fpregset_info): Delete.
10839 (ps_lgetregs): Update and enable implementation.
10840 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10841 implementations.
10842 * remote-utils.c (struct sym_cache, symbol_cache): New.
10843 (input_interrupt): Print a clearer message.
10844 (async_io_enabled): New variable.
10845 (enable_async_io, disable_async_io): Use it. Update comments.
10846 (look_up_one_symbol): Use the symbol cache.
10847 * thread-db.c (thread_db_look_up_symbols): New function.
10848 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10849
f6de3c42
DJ
108502004-10-16 Daniel Jacobowitz <dan@debian.org>
10851
10852 * configure.in: Test for -rdynamic.
10853 * configure: Regenerated.
10854 * Makefile (INTERNAL_LDFLAGS): New.
10855 (gdbserver, gdbreplay): Use it.
10856
2c0fc042
AC
108572004-09-02 Andrew Cagney <cagney@gnu.org>
10858
10859 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10860
075b3282
DJ
108612004-03-23 Daniel Jacobowitz <drow@mvista.com>
10862
10863 * linux-low.c (linux_wait): Clear all_processes list also.
10864
fa6a77dc
DJ
108652004-03-12 Daniel Jacobowitz <drow@mvista.com>
10866
10867 * linux-low.c: Include <errno.h>. Remove extern declaration of
10868 errno.
10869
6d782a97
DJ
108702004-03-12 Daniel Jacobowitz <drow@mvista.com>
10871
10872 * gdbreplay.c, server.h, utils.c: Update copyright years.
10873
3a7fb99b
DJ
108742004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10875
10876 * server.c (main): Print child status or termination signal from
10877 variable 'signal', not 'sig'.
10878
c3e735a6
DJ
108792004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10880
10881 * linux-low.c (linux_read_memory): Change return type to
10882 int. Check for and return error from ptrace().
10883 * target.c (read_inferior_memory): Change return type to int. Pass
10884 back return status from the_target->read_memory().
10885 * target.h (struct target_ops): Adapt *read_memory() prototype.
10886 Update comment.
10887 (read_inferior_memory): Adapt prototype.
10888 * server.c (main): Return an error packet if
10889 read_inferior_memory() returns an error.
10890
a59d1c82
DJ
108912004-03-04 Daniel Jacobowitz <drow@mvista.com>
10892
10893 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10894 Unify with other clean targets.
10895
dc3f8883
DJ
108962004-02-29 Daniel Jacobowitz <drow@mvista.com>
10897
10898 * server.c (handle_v_cont): Call set_desired_inferior.
10899
89a208da
DJ
109002004-02-29 Daniel Jacobowitz <drow@mvista.com>
10901
10902 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10903
62ea82f5
DJ
109042004-02-29 Daniel Jacobowitz <drow@mvista.com>
10905
10906 * linux-low.c (linux_wait): Unblock async I/O.
10907 (linux_resume): Block and enable async I/O.
10908 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10909 * server.h (block_async_io, unblock_async_io): Add prototypes.
10910
6910d122
DJ
109112004-02-29 Daniel Jacobowitz <drow@mvista.com>
10912
10913 * remote-utils.c (remote_open): Print a status notice after
10914 opening a TCP port.
10915 * server.c (attach_inferior): Print a status notice after
10916 attaching.
10917
109182004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10919
10920 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10921
c89dc5d4
DJ
109222004-02-26 Daniel Jacobowitz <drow@mvista.com>
10923
10924 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10925 error packet.
10926 * server.c, target.h: Update copyright years.
10927
4b8dad4a
RM
109282004-02-25 Roland McGrath <roland@redhat.com>
10929
10930 * target.h (struct target_ops): New member `read_auxv'.
10931 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10932 * linux-low.c (linux_read_auxv): New function.
10933 (linux_target_ops): Initialize `read_auxv' member to that.
10934
d7446758
JB
109352004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10936
10937 Committed by Jim Blandy <jimb@redhat.com>.
10938
10939 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10940 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10941 instead of GPR_SIZE to distiguish s390 and s390x targets.
10942
5544ad89
DJ
109432004-01-31 Daniel Jacobowitz <drow@mvista.com>
10944
10945 * linux-low.c: Update copyright year.
10946 (check_removed_breakpoint): Clear pending_is_breakpoint.
10947 (linux_set_resume_request, linux_queue_one_thread)
10948 (resume_status_pending_p): New functions.
10949 (linux_continue_one_thread): Use process->resume.
10950 (linux_resume): Only resume threads if there are no pending events.
10951 * linux-low.h (struct process_info): Add resume request
10952 pointer.
10953
2a68b70e
DJ
109542004-01-30 Daniel Jacobowitz <drow@mvista.com>
10955
10956 * regcache.c (new_register_cache): Clear the allocated register
10957 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10958
64386c31
DJ
109592003-10-13 Daniel Jacobowitz <drow@mvista.com>
10960
10961 * linux-low.c (linux_resume): Take a struct thread_resume *
10962 argument.
10963 (linux_wait): Update call.
10964 (resume_ptr): New static variable.
10965 (linux_continue_one_thread): Renamed from
10966 linux_continue_one_process. Use resume_ptr.
10967 (linux_resume): Use linux_continue_one_thread.
10968 * server.c (handle_v_cont, handle_v_requests): New functions.
10969 (myresume): New function.
10970 (main): Handle 'v' case.
10971 * target.h (struct thread_resume): New type.
10972 (struct target_ops): Change argument of "resume" to struct
10973 thread_resume *.
10974 (myresume): Delete macro.
10975
c938e9b0
L
109762003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10977
10978 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10979 (uninstall): Support DESTDIR.
10980
7f313d07
BC
10981Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10982
10983 * configure.srv: Add xscale*linux copy of arm*linux entry.
10984
3b2fc2ea
DJ
109852003-07-24 Daniel Jacobowitz <drow@mvista.com>
10986
10987 * linux-arm-low.c (arm_reinsert_addr): New function.
10988 (the_low_target): Add arm_reinsert_addr.
10989
1c0a559e
MK
109902003-07-08 Mark Kettenis <kettenis@gnu.org>
10991
10992 * mem-break.c: Remove whitespace at end of file.
10993
43d5792c
DJ
109942003-06-28 Daniel Jacobowitz <drow@mvista.com>
10995
10996 * configure.in: Check whether we need to prototype strerror.
10997 * server.h: Optionally prototype strerror.
10998 * gdbreplay.c (perror_with_name): Use strerror.
10999 * linux-low.c (linux_attach_lwp): Use strerror.
11000 * utils.c (perror_with_name): Use strerror.
11001 * config.in, configure: Regenerated.
11002
c8a86edf
DJ
110032003-06-28 Daniel Jacobowitz <drow@mvista.com>
11004
11005 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11006 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11007
73d37363
DJ
110082003-06-20 Daniel Jacobowitz <drow@mvista.com>
11009
11010 * Makefile.in (SFILES): Update.
11011 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11012 low-sun3.c: Remove files.
11013
6ad8ae5c
DJ
110142003-06-17 Daniel Jacobowitz <drow@mvista.com>
11015
11016 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11017 (linux_detach_one_process, linux_detach): New functions.
11018 (linux_target_ops): Add linux_detach.
11019 * server.c (main): Handle 'D' packet.
11020 * target.h (struct target_ops): Add "detach" member.
11021 (detach_inferior): Define.
11022
1581182a
MK
110232003-06-13 Mark Kettenis <kettenis@gnu.org>
11024
11025 From Kelley Cook <kelleycook@wideopenwest.com>:
11026 * configure.srv: Accept i[34567]86 variants.
11027
e5379b03
DJ
110282003-06-05 Daniel Jacobowitz <drow@mvista.com>
11029
11030 * linux-low.c (linux_wait_for_event): Correct comment typos.
11031 (linux_resume_one_process): Call check_removed_breakpoint.
11032 (linux_send_signal): New function.
11033 (linux_target_ops): Add linux_send_signal.
11034 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11035 of kill.
11036 * target.h (struct target_ops): Add send_signal.
11037
2ff29de4
JB
110382003-05-29 Jim Blandy <jimb@redhat.com>
11039
11040 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11041 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11042 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11043 away part of the register's value.
11044
254787d4
DJ
110452003-03-26 Daniel Jacobowitz <drow@mvista.com>
11046
11047 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11048 (linux_wait_for_event, linux_init_signals): Likewise.
11049
94e10508
DJ
110502003-03-17 Daniel Jacobowitz <drow@mvista.com>
11051
11052 * configure.in: Check for stdlib.h.
11053 * configure: Regenerated.
11054 * config.in: Regenerated.
11055
4c0711e0
DJ
110562003-01-04 Andreas Schwab <schwab@suse.de>
11057
11058 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11059
ef66e766
AC
110602003-01-02 Andrew Cagney <ac131313@redhat.com>
11061
11062 * Makefile.in: Remove obsolete code.
11063
a1358604
DJ
110642002-11-20 Daniel Jacobowitz <drow@mvista.com>
11065
11066 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11067 defined(PT_FPR0_HI).
11068
23ce3b1c
DJ
110692002-11-17 Stuart Hughes <seh@zee2.com>
11070
11071 * linux-arm-low.c (arm_num_regs): Increase.
11072 (arm_regmap): Include status register.
11073
110742002-11-17 Daniel Jacobowitz <drow@mvista.com>
11075
11076 * linux-low.c (register_addr): Remove incorrect -1 check.
11077
a9fa9f7d
DJ
110782002-08-29 Daniel Jacobowitz <drow@mvista.com>
11079
11080 * linux-low.c (linux_create_inferior): Call setpgid. Return
11081 the new PID.
11082 (unstopped_p, linux_signal_pid): Remove.
11083 (linux_target_ops): Remove linux_signal_pid.
11084 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11085 global instead of target method.
11086 * target.h (struct target_ops): Remove signal_pid. Update comment
11087 for create_inferior.
11088 * server.c (signal_pid): New variable.
11089 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11090 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11091 (attach_inferior): Set signal_pid.
11092
17574093
DJ
110932002-08-23 Daniel Jacobowitz <drow@mvista.com>
11094
11095 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11096
110972002-08-20 Jim Blandy <jimb@redhat.com>
11098
11099 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11100 default for this.
11101
111022002-08-01 Andrew Cagney <cagney@redhat.com>
11103
11104 * Makefile.in: Make chill references obsolete.
11105
111062002-07-24 Kevin Buettner <kevinb@redhat.com>
11107
11108 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11109 * configure: Regenerate.
11110 * config.in: Regenerate.
11111
111122002-07-09 David O'Brien <obrien@FreeBSD.org>
11113
11114 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11115 (perror_with_name, remote_close, remote_open, expect, play): Static.
11116
111172002-07-04 Michal Ludvig <mludvig@suse.cz>
11118
4b8dad4a 11119 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11120 byte offsets instead of an array of indexes.
11121 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11122
111232002-06-13 Daniel Jacobowitz <drow@mvista.com>
11124
11125 * regcache.c: Add comment.
11126
111272002-06-11 Daniel Jacobowitz <drow@mvista.com>
11128
11129 * thread-db.c: New file.
11130 * proc-service.c: New file.
11131 * acinclude.m4: New file.
11132 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11133 proc-service.o, and thread-db.o.
11134 (linux-low.o): Add USE_THREAD_DB.
11135 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11136 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11137 * aclocal.m4: Regenerated.
11138 * config.in: Regenerated.
11139 * configure: Regenerated.
11140 * configure.in: Check for proc_service.h, sys/procfs.h,
11141 thread_db.h, and linux/elf.h headrs.
11142 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11143 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11144 Check for -lthread_db and thread support.
11145 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11146 PowerPC, and SuperH.
11147 * i387-fp.c: Constify arguments.
11148 * i387-fp.h: Likewise.
11149 * inferiors.c: (struct thread_info): Renamed from
11150 `struct inferior_info'. Remove PID member. Use generic inferior
11151 list header. All uses updated.
11152 (inferiors, signal_pid): Removed.
11153 (all_threads): New variable.
11154 (get_thread): Define.
11155 (add_inferior_to_list): New function.
11156 (for_each_inferior): New function.
11157 (change_inferior_id): New function.
11158 (add_inferior): Removed.
11159 (remove_inferior): New function.
11160 (add_thread): New function.
11161 (free_one_thread): New function.
11162 (remove_thread): New function.
11163 (clear_inferiors): Use for_each_inferior and free_one_thread.
11164 (find_inferior): New function.
11165 (find_inferior_id): New function.
11166 (inferior_target_data): Update argument type.
11167 (set_inferior_target_data): Likewise.
11168 (inferior_regcache_data): Likewise.
11169 (set_inferior_regcache_data): Likewise.
11170 * linux-low.c (linux_bp_reinsert): Remove.
11171 (all_processes, stopping_threads, using_thrads)
11172 (struct pending_signals, debug_threads, pid_of): New.
11173 (inferior_pid): Replace with macro.
11174 (struct inferior_linux_data): Remove.
11175 (get_stop_pc, add_process): New functions.
11176 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11177 Use add_process and add_thread.
11178 (linux_attach_lwp): New function, based on old linux_attach. Use
11179 add_process and add_thread. Set stop_expected for new threads.
11180 (linux_attach): New function.
11181 (linux_kill_one_process): New function.
11182 (linux_kill): Kill all LWPs.
11183 (linux_thread_alive): Use find_inferior_id.
11184 (check_removed_breakpoints, status_pending_p): New functions.
11185 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11186 Update. Use WNOHANG. Wait for cloned processes also. Update process
11187 struct for the found process.
11188 (linux_wait_for_event): New function.
11189 (linux_wait): Use it. Support LWPs.
11190 (send_sigstop, wait_for_sigstop, stop_all_processes)
11191 (linux_resume_one_process, linux_continue_one_process): New functions.
11192 (linux_resume): Support LWPs.
11193 (REGISTER_RAW_SIZE): Remove.
11194 (fetch_register): Use register_size instead. Call supply_register.
11195 (usr_store_inferior_registers): Likewise. Call collect_register.
11196 Fix recursive case.
11197 (regsets_fetch_inferior_registers): Improve error message.
11198 (regsets_store_inferior_registers): Add debugging.
11199 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11200 (unstopped_p, linux_signal_pid): New functions.
11201 (linux_target_ops): Add linux_signal_pid.
11202 (linux_init_signals): New function.
11203 (initialize_low): Call it. Initialize using_threads.
11204 * regcache.c (inferior_regcache_data): Add valid
11205 flag.
11206 (get_regcache): Fetch registers lazily. Add fetch argument
11207 and update all callers.
11208 (regcache_invalidate_one, regcache_invalidate): New
11209 functions.
11210 (new_register_cache): Renamed from create_register_cache.
11211 Return the new regcache.
11212 (free_register_cache): Change argument to a void *.
11213 (registers_to_string, registers_from_string): Call get_regcache
11214 with fetch flag set.
11215 (register_data): Make static. Pass fetch flag to get_regcache.
11216 (supply_register): Call get_regcache with fetch flag clear.
11217 (collect_register): Call get_regcache with fetch flag set.
11218 (collect_register_as_string): New function.
11219 * regcache.h: Update.
11220 * remote-utils.c (putpkt): Flush after debug output and use
11221 stderr.
11222 Handle input interrupts while waiting for an ACK.
11223 (input_interrupt): Use signal_pid method.
11224 (getpkt): Flush after debug output and use stderr.
11225 (outreg): Use collect_register_as_string.
11226 (new_thread_notify, dead_thread_notify): New functions.
11227 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11228 and general_thread.
11229 (look_up_one_symbol): Flush after debug output.
11230 * server.c (step_thread, server_waiting): New variables.
11231 (start_inferior): Don't use signal_pid. Update call to mywait.
11232 (attach_inferior): Update call to mywait.
11233 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11234 (main): Don't fetch/store registers explicitly. Use
11235 set_desired_inferior. Support proposed ``Hs'' packet. Update
11236 calls to mywait.
11237 * server.h: Update.
11238 (struct inferior_list, struct_inferior_list_entry): New.
11239 * target.c (set_desired_inferior): New.
11240 (write_inferior_memory): Constify.
11241 (mywait): New function.
11242 * target.h: Update.
11243 (struct target_ops): New signal_pid method.
11244 (mywait): Removed macro, added prototype.
11245
11246 * linux-low.h (regset_func): Removed.
11247 (regset_fill_func, regset_store_func): New.
11248 (enum regset_type): New.
11249 (struct regset_info): Add type field. Use new operation types.
11250 (struct linux_target_ops): stop_pc renamed to get_pc.
11251 Add decr_pc_after_break and breakpoint_at.
11252 (get_process, get_thread_proess, get_process_thread)
11253 (strut process_info, all_processes, linux_attach_lwp)
11254 (thread_db_init): New.
11255
11256 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11257 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11258 (the_low_target): Add new members.
11259 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11260 (i386_store_fpxregset): Constify.
11261 (target_regsets): Add new kind identifier.
11262 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11263 (i386_set_pc): Add debugging.
11264 (i386_breakpoint_at): New function.
11265 (the_low_target): Add new members.
11266 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11267 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11268 (mips_breakpoint_at): New.
11269 (the_low_target): Add new members.
11270 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11271 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11272 (the_low_target): Add new members.
11273 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11274 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11275 (the_low_target): Add new members.
11276 * linux-x86-64-low.c (target_regsets): Add new kind
11277 identifier.
11278
112792002-05-15 Daniel Jacobowitz <drow@mvista.com>
11280
11281 From Martin Pool <mbp@samba.org>:
11282 * server.c (gdbserver_usage): New function.
11283 (main): Call it.
11284
112852002-05-14 Daniel Jacobowitz <drow@mvista.com>
11286
11287 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11288 stop_at -> stop_pc.
11289
112902002-05-04 Andrew Cagney <ac131313@redhat.com>
11291
11292 * Makefile.in: Remove obsolete code.
11293
112942002-04-24 Michal Ludvig <mludvig@suse.cz>
11295
11296 * linux-low.c (regsets_fetch_inferior_registers),
11297 (regsets_store_inferior_registers): Removed cast to int from
11298 ptrace() calls.
11299 * regcache.h: Added declaration of struct inferior_info.
11300
113012002-04-20 Daniel Jacobowitz <drow@mvista.com>
11302
11303 * inferiors.c (struct inferior_info): Add regcache_data.
11304 (add_inferior): Call create_register_cache.
11305 (clear_inferiors): Call free_register_cache.
11306 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11307 * regcache.c (struct inferior_regcache_data): New.
11308 (registers): Remove.
11309 (get_regcache): New function.
11310 (create_register_cache, free_register_cache): New functions.
11311 (set_register_cache): Don't initialize the register cache here.
11312 (registers_to_string, registers_from_string, register_data): Call
11313 get_regcache.
11314 * regcache.h: Add prototypes.
11315 * server.h: Likewise.
11316
113172002-04-20 Daniel Jacobowitz <drow@mvista.com>
11318
11319 * mem-break.c: New file.
11320 * mem-break.h: New file.
11321 * Makefile.in: Add mem-break.o rule; update server.h
11322 dependencies.
11323 * inferiors.c (struct inferior_info): Add target_data
11324 member.
11325 (clear_inferiors): Free target_data member if set.
11326 (inferior_target_data, set_inferior_target_data): New functions.
11327 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11328 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11329 * linux-low.c (linux_bp_reinsert): New variable.
11330 (struct inferior_linux_data): New.
11331 (linux_create_inferior): Use set_inferior_target_data.
11332 (linux_attach): Likewise. Call add_inferior.
11333 (linux_wait_for_one_inferior): New function.
11334 (linux_wait): Call it.
11335 (linux_write_memory): Add const.
11336 (initialize_low): Call set_breakpoint_data.
11337 * linux-low.h (struct linux_target_ops): Add breakpoint
11338 handling members.
11339 * server.c (attach_inferior): Remove extra add_inferior
11340 call.
11341 * server.h: Include mem-break.h. Update inferior.c
11342 prototypes.
11343 * target.c (read_inferior_memory)
11344 (write_inferior_memory): New functions.
11345 * target.h (read_inferior_memory)
11346 (write_inferior_memory): Change macros to prototypes.
11347 (struct target_ops): Update comments. Add const to write_memory
11348 definition.
11349
113502002-04-11 Daniel Jacobowitz <drow@mvista.com>
11351
11352 * linux-low.c (usr_store_inferior_registers): Support
11353 registers which are allowed to fail to store.
11354 * linux-low.h (linux_target_ops): Likewise.
11355 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11356 (ppc_cannot_store_register): FPSCR may not be storable.
11357
113582002-04-09 Daniel Jacobowitz <drow@mvista.com>
11359
11360 * server.h: Include <string.h> if HAVE_STRING_H.
11361 * ChangeLog: Correct paths in last ChangeLog entry.
11362
113632002-04-09 Daniel Jacobowitz <drow@mvista.com>
11364
11365 * linux-low.h: Remove obsolete prototypes.
11366 (struct linux_target_ops): New.
11367 (extern the_low_target): New.
11368 * linux-low.c (num_regs, regmap): Remove declarations.
11369 (register_addr): Use the_low_target explicitly.
11370 (fetch_register): Likewise.
11371 (usr_fetch_inferior_registers): Likewise.
11372 (usr_store_inferior_registers): Likewise.
11373 * linux-arm-low.c (num_regs): Remove.
11374 (arm_num_regs): Define.
11375 (arm_regmap): Renamed from regmap, made static.
11376 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11377 made static.
11378 (arm_cannot_store_register): Renamed from cannot_store_register,
11379 made static.
11380 (the_low_target): New.
11381 * linux-i386-low.c (num_regs): Remove.
11382 (i386_num_regs): Define.
11383 (i386_regmap): Renamed from regmap, made static.
11384 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11385 made static.
11386 (i386_cannot_store_register): Renamed from cannot_store_register,
11387 made static.
11388 (the_low_target): New.
11389 * linux-ia64-low.c (num_regs): Remove.
11390 (ia64_num_regs): Define.
11391 (ia64_regmap): Renamed from regmap, made static.
11392 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11393 made static.
11394 (ia64_cannot_store_register): Renamed from cannot_store_register,
11395 made static.
11396 (the_low_target): New.
11397 * linux-m68k-low.c (num_regs): Remove.
11398 (m68k_num_regs): Define.
11399 (m68k_regmap): Renamed from regmap, made static.
11400 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11401 made static.
11402 (m68k_cannot_store_register): Renamed from cannot_store_register,
11403 made static.
11404 (the_low_target): New.
11405 * linux-mips-low.c (num_regs): Remove.
11406 (mips_num_regs): Define.
11407 (mips_regmap): Renamed from regmap, made static.
11408 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11409 made static.
11410 (mips_cannot_store_register): Renamed from cannot_store_register,
11411 made static.
11412 (the_low_target): New.
11413 * linux-ppc-low.c (num_regs): Remove.
11414 (ppc_num_regs): Define.
11415 (ppc_regmap): Renamed from regmap, made static.
11416 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11417 made static.
11418 (ppc_cannot_store_register): Renamed from cannot_store_register,
11419 made static.
11420 (the_low_target): New.
11421 * linux-s390-low.c (num_regs): Remove.
11422 (s390_num_regs): Define.
11423 (s390_regmap): Renamed from regmap, made static.
11424 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11425 made static.
11426 (s390_cannot_store_register): Renamed from cannot_store_register,
11427 made static.
11428 (the_low_target): New.
11429 * linux-sh-low.c (num_regs): Remove.
11430 (sh_num_regs): Define.
11431 (sh_regmap): Renamed from regmap, made static.
11432 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11433 made static.
11434 (sh_cannot_store_register): Renamed from cannot_store_register,
11435 made static.
11436 (the_low_target): New.
11437 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11438 (the_low_target): New.
11439
114402002-04-09 Daniel Jacobowitz <drow@mvista.com>
11441
11442 * Makefile.in: Add stamp-h target.
11443 * configure.in: Create stamp-h.
11444 * configure: Regenerated.
11445
114462002-04-09 Daniel Jacobowitz <drow@mvista.com>
11447
11448 * inferiors.c: New file.
11449 * target.c: New file.
11450 * target.h: New file.
11451 * Makefile.in: Add target.o and inferiors.o. Update
11452 dependencies.
11453 * linux-low.c (inferior_pid): New static variable,
11454 moved from server.c.
11455 (linux_create_inferior): Renamed from create_inferior.
11456 Call add_inferior. Return 0 on success instead of a PID.
11457 (linux_attach): Renamed from myattach.
11458 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11459 (linux_thread_alive): Renamed from mythread_alive.
11460 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11461 child dies.
11462 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11463 (regsets_store_inferior_registers): Correct error message.
11464 Add missing ``return 0''.
11465 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11466 (linux_store_registers): Renamed from store_inferior_registers.
11467 (linux_read_memory): Renamed from read_inferior_memory.
11468 (linux_write_memory): Renamed from write_inferior_memory.
11469 (linux_target_ops): New structure.
11470 (initialize_low): Call set_target_ops ().
11471 * remote-utils.c (unhexify): New function.
11472 (hexify): New function.
11473 (input_interrupt): Send signals to ``signal_pid''.
11474 * server.c (inferior_pid): Remove.
11475 (start_inferior): Update create_inferior call.
11476 (attach_inferior): Call add_inferior.
11477 (handle_query): New function.
11478 (main): Call handle_query for `q' packets.
11479 * server.h: Include "target.h". Remove obsolete prototypes.
11480 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11481
114822002-04-09 Daniel Jacobowitz <drow@mvista.com>
11483
11484 * Makefile.in: Add WARN_CFLAGS. Update configury
11485 dependencies.
11486 * configure.in: Check for <string.h>
11487 * configure: Regenerate.
11488 * config.in: Regenerate.
11489 * gdbreplay.c: Include needed system headers.
11490 (remote_open): Remove strchr prototype.
11491 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11492 * regcache.c (supply_register): Change buf argument to const void *.
11493 (supply_register_by_name): Likewise.
11494 (collect_register): Change buf argument to void *.
11495 (collect_register_by_name): Likewise.
11496 * regcache.h: Add missing prototypes.
11497 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11498 * server.c (handle_query): New function.
11499 (attached): New static variable, moved out of main.
11500 (main): Quiet longjmp clobber warnings.
11501 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11502 * utils.c (error): Remove NORETURN.
11503 (fatal): Likewise.