Set proc->priv->new_inferior out of linux_add_process
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
5ae3ebba
YQ
12015-07-24 Yao Qi <yao.qi@linaro.org>
2
3 * linux-low.c (linux_add_process): Don't set
4 proc->priv->new_inferior.
5 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6 (linux_attach): Likewise.
7
eb97750b
YQ
82015-07-24 Yao Qi <yao.qi@linaro.org>
9
10 * server.c (start_inferior): Code refactor.
11
51aee833
YQ
122015-07-24 Yao Qi <yao.qi@linaro.org>
13
14 * server.c (process_serial_event): Set general_thread.
15
af1b22f3
YQ
162015-07-21 Yao Qi <yao.qi@linaro.org>
17
18 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
19 aarch64_linux_get_debug_reg_capacity.
20
554717a3
YQ
212015-07-17 Yao Qi <yao.qi@linaro.org>
22
23 * Makefile.in (aarch64-linux-hw-point.o): New rule.
24 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
25 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
26 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
27 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
28 (AARCH64_HWP_ALIGNMENT): Likewise.
29 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
30 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
31 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
32 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
33 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
34 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
35 (struct aarch64_debug_reg_state): Likewise.
36 (struct arch_lwp_info): Likewise.
37 (aarch64_align_watchpoint): Likewise.
38 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
39 (aarch64_watchpoint_length): Likewise.
40 (aarch64_point_encode_ctrl_reg): Likewise
41 (aarch64_point_is_aligned): Likewise.
42 (aarch64_align_watchpoint): Likewise.
43 (aarch64_linux_set_debug_regs):
44 (aarch64_dr_state_insert_one_point): Likewise.
45 (aarch64_dr_state_remove_one_point): Likewise.
46 (aarch64_handle_breakpoint): Likewise.
47 (aarch64_handle_aligned_watchpoint): Likewise.
48 (aarch64_handle_unaligned_watchpoint): Likewise.
49 (aarch64_handle_watchpoint): Likewise.
50
c67ca4de
YQ
512015-07-17 Yao Qi <yao.qi@linaro.org>
52
53 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
54 and don't aarch64_get_debug_reg_state. All callers update.
55 (aarch64_handle_aligned_watchpoint): Likewise.
56 (aarch64_handle_unaligned_watchpoint): Likewise.
57 (aarch64_handle_watchpoint): Likewise.
58 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
59 (aarch64_remove_point): Likewise.
60
25abf979
YQ
612015-07-17 Yao Qi <yao.qi@linaro.org>
62
63 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
64 debug_printf.
65 (aarch64_handle_unaligned_watchpoint): Likewise.
66
db1ff28b
JK
672015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
68
69 Revert the previous 3 commits:
70 Move gdb_regex* to common/
71 Move linux_find_memory_regions_full & co.
72 gdbserver build-id attribute generator
73
700ca40f
JK
742015-07-15 Aleksandar Ristovski <aristovski@qnx.com
75 Jan Kratochvil <jan.kratochvil@redhat.com>
76
77 gdbserver build-id attribute generator.
78 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
79 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
80 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
81 (find_phdr): New.
82 (get_dynamic): Use find_pdhr to traverse program headers.
83 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
84 (compare_mapping_entry_range, struct find_memory_region_callback_data)
85 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
86 (get_hex_build_id): New.
87 (linux_qxfer_libraries_svr4): Add optional build-id attribute
88 to reply XML document.
89
9904185c
JK
902015-07-15 Aleksandar Ristovski <aristovski@qnx.com
91 Jan Kratochvil <jan.kratochvil@redhat.com>
92
93 * target.c: Include target/target-utils.h and fcntl.h.
94 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
95 (target_fileio_read_stralloc): New functions.
96
6e5b4429
JK
972015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
98
99 * Makefile.in (OBS): Add gdb_regex.o.
100 (gdb_regex.o): New.
101 * config.in: Rebuilt.
102 * configure: Rebuilt.
103
ddc98fbf
JK
1042015-07-15 Aleksandar Ristovski <aristovski@qnx.com
105 Jan Kratochvil <jan.kratochvil@redhat.com>
106
107 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
108 * Makefile.in (OBS): Add target-utils.o.
109 (linux-maps.o, target-utils.o): New.
110 * configure.srv (srv_linux_obj): Add linux-maps.o.
111
e57bb7a0
PL
1122015-07-15 Pierre Langlois <pierre.langlois@arm.com>
113
114 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
115 function, return 1.
116 (the_low_target): Install it.
117
586b02a9
PA
1182015-07-14 Pedro Alves <palves@redhat.com>
119
120 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
121 Instead, ignore ECHILD, and throw an error for other errnos.
122
58c1b36c
PA
1232015-07-10 Pedro Alves <palves@redhat.com>
124
125 * event-loop.c (struct callback_event) <data>: Change type to
126 gdb_client_data instance instead of gdb_client_data pointer.
127 (append_callback_event): Adjust.
128
421530db
PL
1292015-07-10 Pierre Langlois <pierre.langlois@arm.com>
130
131 * linux-aarch64-low.c: Add comments for each linux_target_ops
132 method. Remove comments already covered in target_ops and
133 linux_target_ops definitions.
134 (the_low_target): Add comments for each unimplemented method.
135
c2d65f38
YQ
1362015-07-09 Yao Qi <yao.qi@linaro.org>
137
138 * linux-aarch64-low.c (aarch64_regmap): Remove.
139 (aarch64_usrregs_info): Remove.
140 (regs_info): Set field usrregs to NULL.
141
b20a6524
MM
1422015-07-02 Markus Metzger <markus.t.metzger@intel.com>
143
144 * linux-low.c: Include "rsp-low.h"
145 (linux_low_encode_pt_config, linux_low_encode_raw): New.
146 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
147 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
148 (handle_btrace_enable_pt): New.
149 (handle_btrace_general_set): Support "pt".
150 (handle_btrace_conf_general_set): Support "pt:size".
151
96c97461
PL
1522015-06-29 Pierre Langlois <pierre.langlois@arm.com>
153
154 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
155 Z_PACKET_SW_BP.
156
37d66942
PL
1572015-06-29 Pierre Langlois <pierre.langlois@arm.com>
158
159 * linux-aarch64-low.c: Remove comment about endianness.
160 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
161 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
162 memcmp.
163
dc06243f
GB
1642015-06-24 Gary Benson <gbenson@redhat.com>
165
166 * linux-i386-ipa.c (stdint.h): Do not include.
167 * lynx-i386-low.c (stdint.h): Likewise.
168 * lynx-ppc-low.c (stdint.h): Likewise.
169 * mem-break.c (stdint.h): Likewise.
170 * thread-db.c (stdint.h): Likewise.
171 * tracepoint.c (stdint.h): Likewise.
172 * win32-low.c (stdint.h): Likewise.
173
124e13d9
SM
1742015-06-18 Simon Marchi <simon.marchi@ericsson.com>
175
176 * server.c (write_qxfer_response): Update call to
177 remote_escape_output.
178
909c2cda
JK
1792015-06-15 Aleksandar Ristovski <aristovski@qnx.com
180 Jan Kratochvil <jan.kratochvil@redhat.com>
181
182 Merge multiple hex conversions.
183 * gdbreplay.c (tohex): Rename to 'fromhex'.
184 (logchar): Use fromhex.
185
24c05f46
JK
1862015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
187
188 * server.c (handle_qxfer_libraries): Set `version' attribute for
189 <library-list>.
190
14d2069a
GB
1912015-06-10 Gary Benson <gbenson@redhat.com>
192
193 * target.h (struct target_ops) <multifs_open>: New field.
194 <multifs_unlink>: Likewise.
195 <multifs_readlink>: Likewise.
196 * linux-low.c (nat/linux-namespaces.h): New include.
197 (linux_target_ops): Initialize the_target->multifs_open,
198 the_target->multifs_unlink and the_target->multifs_readlink.
199 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
200 * hostio.c (hostio_fs_pid): New static variable.
201 (hostio_handle_new_gdb_connection): New function.
202 (handle_setfs): Likewise.
203 (handle_open): Use the_target->multifs_open as appropriate.
204 (handle_unlink): Use the_target->multifs_unlink as appropriate.
205 (handle_readlink): Use the_target->multifs_readlink as
206 appropriate.
207 (handle_vFile): Handle vFile:setfs packets.
208 * server.c (handle_query): Call hostio_handle_new_gdb_connection
209 after target_handle_new_gdb_connection.
210
4b8b5e72
GB
2112015-06-10 Gary Benson <gbenson@redhat.com>
212
213 * configure.ac (AC_CHECK_FUNCS): Add setns.
214 * config.in: Regenerate.
215 * configure: Likewise.
216 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
217 (linux-namespaces.o): New rule.
218 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
219
3ac2e371
GB
2202015-06-09 Gary Benson <gbenson@redhat.com>
221
222 * hostio.c (handle_open): Process mode argument with
223 fileio_to_host_mode.
224
ca9b78ce
YQ
2252015-06-01 Yao Qi <yao.qi@linaro.org>
226
227 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
228 * linux-x86-low.c: Likewise.
229
bfacd19d
DB
2302015-05-28 Don Breazeal <donb@codesourcery.com>
231
232 * linux-low.c (handle_extended_wait): Initialize
233 thread_info.last_resume_kind for new fork children.
234
452003ef
PA
2352015-05-15 Pedro Alves <palves@redhat.com>
236
237 * target.h (target_handle_new_gdb_connection): Rewrite using if
238 wrapped in do/while.
239
1041a03c
JB
2402015-05-14 Joel Brobecker <brobecker@adacore.com>
241
242 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
243 * configure, config.in: Regenerate.
244 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
245 Declare typedef.
246
c269dbdb
DB
2472015-05-12 Don Breazeal <donb@codesourcery.com>
248
249 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
250 PTRACE_EVENT_VFORK_DONE.
251 (linux_low_ptrace_options, extended_event_reported): Add vfork
252 events.
253 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
254 and "vforkdone" for RSP 'T' Stop Reply Packet.
255 * server.h (report_vfork_events): Declare
256 global variable.
257
3a8a0396
DB
2582015-05-12 Don Breazeal <donb@codesourcery.com>
259
260 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
261 (the_low_target) <new_fork>: Initialize new member.
262 * linux-arm-low.c (arm_new_fork): New function.
263 (the_low_target) <new_fork>: Initialize new member.
264 * linux-low.c (handle_extended_wait): Call new target function
265 new_fork.
266 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
267 * linux-mips-low.c (mips_add_watchpoint): New function
268 extracted from mips_insert_point.
269 (the_low_target) <new_fork>: Initialize new member.
270 (mips_linux_new_fork): New function.
271 (mips_insert_point): Call mips_add_watchpoint.
272 * linux-x86-low.c (x86_linux_new_fork): New function.
273 (the_low_target) <new_fork>: Initialize new member.
274
de0d863e
DB
2752015-05-12 Don Breazeal <donb@codesourcery.com>
276
277 * linux-low.c (handle_extended_wait): Implement return value,
278 rename argument 'event_child' to 'event_lwp', handle
279 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
280 (linux_low_ptrace_options): New function.
281 (linux_low_filter_event): Call linux_low_ptrace_options,
282 use different argument fo linux_enable_event_reporting,
283 use return value from handle_extended_wait.
284 (extended_event_reported): New function.
285 (linux_wait_1): Call extended_event_reported and set
286 status to report fork events.
287 (linux_write_memory): Add pid to debug message.
288 (reset_lwp_ptrace_options_callback): New function.
289 (linux_handle_new_gdb_connection): New function.
290 (linux_target_ops): Initialize new structure member.
291 * linux-low.h (struct lwp_info) <waitstatus>: New member.
292 * lynx-low.c: Initialize new structure member.
293 * remote-utils.c (prepare_resume_reply): Implement stop reason
294 "fork" for "T" stop message.
295 * server.c (handle_query): Call handle_new_gdb_connection.
296 * server.h (report_fork_events): Declare global flag.
297 * target.h (struct target_ops) <handle_new_gdb_connection>:
298 New member.
299 (target_handle_new_gdb_connection): New macro.
300 * win32-low.c: Initialize new structure member.
301
ddcbc397
DB
3022015-05-12 Don Breazeal <donb@codesourcery.com>
303
304 * mem-break.c (APPEND_TO_LIST): Define macro.
305 (clone_agent_expr): New function.
306 (clone_one_breakpoint): New function.
307 (clone_all_breakpoints): New function.
308 * mem-break.h: Declare new functions.
309
89245bc0
DB
3102015-05-12 Don Breazeal <donb@codesourcery.com>
311
312 * linux-low.c (linux_supports_fork_events): New function.
313 (linux_supports_vfork_events): New function.
314 (linux_target_ops): Initialize new structure members.
315 (initialize_low): Call linux_check_ptrace_features.
316 * lynx-low.c (lynx_target_ops): Initialize new structure
317 members.
318 * server.c (report_fork_events, report_vfork_events):
319 New global flags.
320 (handle_query): Add new features to qSupported packet and
321 response.
322 (captured_main): Initialize new global variables.
323 * target.h (struct target_ops) <supports_fork_events>:
324 New member.
325 <supports_vfork_events>: New member.
326 (target_supports_fork_events): New macro.
327 (target_supports_vfork_events): New macro.
328 * win32-low.c (win32_target_ops): Initialize new structure
329 members.
330
835205d0
GB
3312015-05-12 Gary Benson <gbenson@redhat.com>
332
333 * server.c (handle_qxfer_exec_file): Use current process
334 if annex is empty.
335
21e94bd9
SL
3362015-05-08 Sandra Loosemore <sandra@codesourcery.com>
337
338 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
339 Remove HAVE_PTRACE_GETREGS conditionals.
340 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
341 instead of PTRACE_GETREGS and PTRACE_SETREGS.
342
45614f15
YQ
3432015-05-08 Yao Qi <yao.qi@linaro.org>
344
345 * linux-low.c (linux_supports_conditional_breakpoints): New
346 function.
347 (linux_target_ops): Install new target method.
348 * lynx-low.c (lynx_target_ops): Install NULL hook for
349 supports_conditional_breakpoints.
350 * nto-low.c (nto_target_ops): Likewise.
351 * spu-low.c (spu_target_ops): Likewise.
352 * win32-low.c (win32_target_ops): Likewise.
353 * server.c (handle_query): Check
354 target_supports_conditional_breakpoints.
355 * target.h (struct target_ops) <supports_conditional_breakpoints>:
356 New field.
357 (target_supports_conditional_breakpoints): New macro.
358
80ad801e
PA
3592015-05-06 Pedro Alves <palves@redhat.com>
360
361 PR server/18081
362 * server.c (start_inferior): If the process exits, mourn it.
363
819843c7
GB
3642015-04-21 Gary Benson <gbenson@redhat.com>
365
366 * hostio.c (fileio_open_flags_to_host): Factored out to
367 fileio_to_host_openflags in common/fileio.c. Single use
368 updated.
369
a2d5a9d7
MF
3702015-04-17 Max Filippov <jcmvbkbc@gmail.com>
371
372 * linux-xtensa-low.c (xtensa_fill_gregset)
373 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
374 XCHAL_HAVE_LOOP.
375
deb44829
MF
3762015-04-17 Max Filippov <jcmvbkbc@gmail.com>
377
378 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
379 (regs_info): Replace usrregs pointer with NULL.
380
e57f1de3
GB
3812015-04-17 Gary Benson <gbenson@redhat.com>
382
383 * target.h (struct target_ops) <pid_to_exec_file>: New field.
384 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
385 * server.c (handle_qxfer_exec_file): New function.
386 (qxfer_packets): Add exec-file entry.
387 (handle_query): Report qXfer:exec-file:read as supported packet.
388
62828379
RN
3892015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
390
391 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
392
b88bb450
GB
3932015-04-09 Gary Benson <gbenson@redhat.com>
394
395 * hostio-errno.c (errno_to_fileio_error): Remove function.
396 Update caller to use remote_fileio_to_fio_error.
397
c8f4bfdd
YQ
3982015-04-09 Yao Qi <yao.qi@linaro.org>
399
400 * linux-low.c (linux_insert_point): Call
401 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
402 (linux_remove_point): Call remove_memory_breakpoint if type is
403 raw_bkpt_type_sw.
404 * linux-x86-low.c (x86_insert_point): Don't call
405 insert_memory_breakpoint.
406 (x86_remove_point): Don't call remove_memory_breakpoint.
407
41f98f02
PA
4082015-04-01 Pedro Alves <palves@redhat.com>
409 Cleber Rosa <crosa@redhat.com>
410
411 * server.c (gdbserver_usage): Reorganize and extend the usage
412 message.
413
2bf6fb9d
PA
4142015-03-24 Pedro Alves <palves@redhat.com>
415
416 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
417 output. Also dump TRAP_TRACE.
418 (linux_low_filter_event): In debug output, distinguish a
419 resume_stop SIGSTOP from a delayed SIGSTOP.
420
369f6daa
GB
4212015-03-24 Gary Benson <gbenson@redhat.com>
422
423 * linux-x86-low.c (x86_linux_new_thread): Moved to
424 nat/x86-linux.c.
425 (x86_linux_prepare_to_resume): Likewise.
426
8e5d4070
GB
4272015-03-24 Gary Benson <gbenson@redhat.com>
428
429 * Makefile.in (x86-linux-dregs.o): New rule.
430 * configure.srv: Add x86-linux-dregs.o to relevant targets.
431 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
432 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
433 (x86_linux_dr_get): Likewise.
434 (x86_linux_dr_set): Likewise.
435 (update_debug_registers_callback): Likewise.
436 (x86_linux_dr_set_addr): Likewise.
437 (x86_linux_dr_get_addr): Likewise.
438 (x86_linux_dr_set_control): Likewise.
439 (x86_linux_dr_get_control): Likewise.
440 (x86_linux_dr_get_status): Likewise.
441 (x86_linux_update_debug_registers): Likewise.
442
2b95d440
GB
4432015-03-24 Gary Benson <gbenson@redhat.com>
444
445 * linux-x86-low.c (x86_linux_update_debug_registers):
446 New function, factored out from...
447 (x86_linux_prepare_to_resume): ...this.
448
14b0bc68
GB
4492015-03-24 Gary Benson <gbenson@redhat.com>
450
451 * linux-x86-low.c (x86_linux_dr_get): Update comments.
452 (x86_linux_dr_set): Likewise.
453 (update_debug_registers_callback): Likewise.
454 (x86_linux_dr_set_addr): Likewise.
455 (x86_linux_dr_get_addr): Likewise.
456 (x86_linux_dr_set_control): Likewise.
457 (x86_linux_dr_get_control): Likewise.
458 (x86_linux_dr_get_status): Likewise.
459 (x86_linux_prepare_to_resume): Likewise.
460
5dfe6ca8
GB
4612015-03-24 Gary Benson <gbenson@redhat.com>
462
463 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
464 Use perror_with_name. Pass string through gettext.
465 (x86_linux_dr_set): Likewise.
466
d33472ad
GB
4672015-03-24 Gary Benson <gbenson@redhat.com>
468
469 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
470 (x86_linux_dr_set_addr): ...this.
471 (x86_dr_low_get_addr): Rename to...
472 (x86_linux_dr_get_addr): ...this.
473 (x86_dr_low_set_control): Rename to...
474 (x86_linux_dr_set_control): ...this.
475 (x86_dr_low_get_control): Rename to...
476 (x86_linux_dr_get_control): ...this.
477 (x86_dr_low_get_status): Rename to...
478 (x86_linux_dr_get_status): ...this.
479 (x86_dr_low): Update with new function names.
480
4b134ca1
GB
4812015-03-24 Gary Benson <gbenson@redhat.com>
482
483 * Makefile.in (x86-linux.o): New rule.
484 * configure.srv: Add x86-linux.o to relevant targets.
485 * linux-low.c (lwp_set_arch_private_info): New function.
486 (lwp_arch_private_info): Likewise.
487 * linux-x86-low.c: Include nat/x86-linux.h.
488 (arch_lwp_info): Removed structure.
489 (update_debug_registers_callback):
490 Use lwp_set_debug_registers_changed.
491 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
492 and lwp_set_debug_registers_changed.
493 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
494
34c703da
GB
4952015-03-24 Gary Benson <gbenson@redhat.com>
496
497 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
498 * linux-arm-low.c (arm_new_thread): Likewise.
499 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
500 * linux-mips-low.c (mips_linux_new_thread): Likewise.
501 * linux-x86-low.c (x86_linux_new_thread): Likewise.
502 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
503
cff068da
GB
5042015-03-24 Gary Benson <gbenson@redhat.com>
505
506 * linux-low.c (ptid_of_lwp): New function.
507 (lwp_is_stopped): Likewise.
508 (lwp_stop_reason): Likewise.
509 * linux-x86-low.c (update_debug_registers_callback):
510 Use lwp_is_stopped.
511 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
512 lwp_stop_reason.
513
b2f7c7e8
GB
5142015-03-24 Gary Benson <gbenson@redhat.com>
515
516 * linux-low.h (linux_stop_lwp): Remove declaration.
517
6d4ee8c6
GB
5182015-03-24 Gary Benson <gbenson@redhat.com>
519
520 * linux-low.h: Include nat/linux-nat.h.
521 * linux-low.c (iterate_over_lwps_args): New structure.
522 (iterate_over_lwps_filter): New function.
523 (iterate_over_lwps): Likewise.
524 * linux-x86-low.c (update_debug_registers_callback):
525 Update signature to what iterate_over_lwps expects.
526 Remove PID check that iterate_over_lwps now performs.
527 (x86_dr_low_set_addr): Use iterate_over_lwps.
528 (x86_dr_low_set_control): Likewise.
529
70a0bb6b
GB
5302015-03-24 Gary Benson <gbenson@redhat.com>
531
532 * linux-x86-low.c (x86_debug_reg_state): New function.
533 (x86_linux_prepare_to_resume): Use the above.
534
7b669087
GB
5352015-03-24 Gary Benson <gbenson@redhat.com>
536
537 * linux-low.c (current_lwp_ptid): New function.
538 * linux-x86-low.c: Include nat/linux-nat.h.
539 (x86_dr_low_get_addr): Use current_lwp_ptid.
540 (x86_dr_low_get_control): Likewise.
541 (x86_dr_low_get_status): Likewise.
542
eef49a3d
PA
5432015-03-20 Pedro Alves <palves@redhat.com>
544
545 * tracepoint.c (cmd_qtstatus): Make "str" const.
546
b2333d22
PA
5472015-03-20 Pedro Alves <palves@redhat.com>
548
549 * server.c (handle_general_set): Make "req_str" const.
550
23f238d3
PA
5512015-03-19 Pedro Alves <palves@redhat.com>
552
553 * linux-low.c (linux_resume_one_lwp): Rename to ...
554 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
555 instead call perror_with_name.
556 (check_ptrace_stopped_lwp_gone): New function.
557 (linux_resume_one_lwp): Reimplement as wrapper around
558 linux_resume_one_lwp_throw that swallows errors if the LWP is
559 gone.
560
91baf43f
PA
5612015-03-19 Pedro Alves <palves@redhat.com>
562
563 * linux-low.c (count_events_callback, select_event_lwp_callback):
564 No longer check whether the thread has resume_stop as last resume
565 kind.
566
8bf3b159
PA
5672015-03-19 Pedro Alves <palves@redhat.com>
568
569 * linux-low.c (count_events_callback, select_event_lwp_callback):
570 Use the lwp's status_pending_p field, not the thread's.
571
b90fc188
PA
5722015-03-19 Pedro Alves <palves@redhat.com>
573
574 * linux-low.c (select_event_lwp_callback): Update comments to
575 no longer mention SIGTRAP.
576
464b0089
GB
5772015-03-18 Gary Benson <gbenson@redhat.com>
578
579 * server.c (handle_query): Do not report vFile:fstat as supported.
580
aa9e327f
GB
5812015-03-11 Gary Benson <gbenson@redhat.com>
582
583 * hostio.c (sys/types.h): New include.
584 (sys/stat.h): Likewise.
585 (common-remote-fileio.h): Likewise.
586 (handle_fstat): New function.
587 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 588
791c0056
GB
5892015-03-11 Gary Benson <gbenson@redhat.com>
590
591 * configure.ac (AC_CHECK_MEMBERS): Add checks for
592 struct stat.st_blocks and struct stat.st_blksize.
593 * configure: Regenerate.
594 * config.in: Likewise.
595 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
596 (OBS): Add common-remote-fileio.o.
597 (common-remote-fileio.o): New rule.
598
9a9df970
PA
5992015-03-09 Pedro Alves <palves@redhat.com>
600
601 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
602 'struct sockaddr' pointer in 'accept' call.
603
9eb1356e
PA
6042015-03-09 Pedro Alves <palves@redhat.com>
605
606 Revert:
607 2015-03-07 Pedro Alves <palves@redhat.com>
608 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
609 or <winsock2.h> here. Instead include "gdb_socket.h".
610 (remote_open): Use union gdb_sockaddr_u.
611 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
612 or <winsock2.h> here. Instead include "gdb_socket.h".
613 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
614 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
615 or <sys/un.h>.
616 (init_named_socket, gdb_agent_helper_thread): Use union
617 gdb_sockaddr_u.
618
aac331e4
PA
6192015-03-07 Pedro Alves <palves@redhat.com>
620
621 * configure.ac (build_warnings): Move
622 -Wdeclaration-after-statement to the C-specific set.
623 * configure: Regenerate.
624
366c75fc
PA
6252015-03-07 Pedro Alves <palves@redhat.com>
626
627 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
628 or <winsock2.h> here. Instead include "gdb_socket.h".
629 (remote_open): Use union gdb_sockaddr_u.
630 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
631 or <winsock2.h> here. Instead include "gdb_socket.h".
632 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
633 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
634 or <sys/un.h>.
635 (init_named_socket, gdb_agent_helper_thread): Use union
636 gdb_sockaddr_u.
637
492d29ea
PA
6382015-03-07 Pedro Alves <palves@redhat.com>
639
640 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
641 instead.
642
60a191ed
YQ
6432015-03-06 Yao Qi <yao.qi@linaro.org>
644
645 * linux-aarch64-low.c (aarch64_insert_point): Use
646 show_debug_regs as a boolean.
647 (aarch64_remove_point): Likewise.
648
f5771b1d
PA
6492015-03-05 Pedro Alves <palves@redhat.com>
650
651 * lynx-low.c (lynx_target_ops): Install NULL hooks for
652 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
653 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
654 * nto-low.c (nto_target_ops): Likewise.
655 * spu-low.c (spu_target_ops): Likewise.
656 * win32-low.c (win32_target_ops): Likewise.
657
3e572f71
PA
6582015-03-04 Pedro Alves <palves@redhat.com>
659
72f4393d 660 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
661 Decide whether a breakpoint triggered based on the SIGTRAP's
662 siginfo.si_code.
72f4393d
L
663 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
664 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
665 (linux_low_filter_event): Check for breakpoints before checking
666 watchpoints.
667 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
668 siginfo.si_code.
72f4393d
L
669 (linux_stopped_by_sw_breakpoint)
670 (linux_supports_stopped_by_sw_breakpoint)
671 (linux_stopped_by_hw_breakpoint)
672 (linux_supports_stopped_by_hw_breakpoint): New functions.
673 (linux_target_ops): Install new target methods.
3e572f71 674
1ec68e26
PA
6752015-03-04 Pedro Alves <palves@redhat.com>
676
677 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
678 * server.c (swbreak_feature, hwbreak_feature): New globals.
679 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
680 (captured_main): Clear swbreak_feature and hwbreak_feature.
681 * server.h (swbreak_feature, hwbreak_feature): Declare.
682 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
683 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
684 supports_stopped_by_hw_breakpoint>: New fields.
685 (target_supports_stopped_by_sw_breakpoint)
686 (target_stopped_by_sw_breakpoint)
687 (target_supports_stopped_by_hw_breakpoint)
688 (target_stopped_by_hw_breakpoint): Declare.
689
15c66dd6
PA
6902015-03-04 Pedro Alves <palves@redhat.com>
691
692 enum lwp_stop_reason -> enum target_stop_reason
693 * linux-low.c (check_stopped_by_breakpoint): Adjust.
694 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
695 (linux_wait_1, stuck_in_jump_pad_callback)
696 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
697 (linux_stopped_by_watchpoint):
698 * linux-low.h (enum lwp_stop_reason): Delete.
699 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
700 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
701
98fc70d6
YQ
7022015-03-04 Yao Qi <yao.qi@linaro.org>
703
704 * Makefile.in (SFILES): Add linux-aarch64-low.c.
705
dd2ac174
GB
7062015-03-03 Gary Benson <gbenson@redhat.com>
707
708 * hostio.c (handle_vFile): Fix prefix lengths.
709
d68e53f4
MM
7102015-03-03 Markus Metzger <markus.t.metzger@intel.com>
711
712 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
713 ptr_bits.
714
bf2d68ab
AA
7152015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
716
717 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
718 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
719 (clean): Add "rm -f" for above C files.
720 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
721 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
722 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
723 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
724 * linux-s390-low.c (HWCAP_S390_VX): New macro.
725 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
726 (init_registers_s390x_vx_linux64)
727 (init_registers_s390x_tevx_linux64)
728 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
729 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
730 declarations.
731 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
732 (s390_store_vxrs_high): New functions.
733 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
734 NT_S390_VXRS_HIGH.
735 (s390_arch_setup): Add logic for selecting one of the new target
736 descriptions. Activate the new vector regsets if applicable.
737 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
738 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
739 and init_registers_s390x_tevx_linux64.
740
c966a859
PA
7412015-03-01 Pedro Alves <palves@redhat.com>
742
743 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
744 parameter.
745
4180215b
PA
7462015-02-27 Pedro Alves <palves@redhat.com>
747
748 * linux-x86-low.c (u_debugreg_offset): New function.
749 (x86_linux_dr_get, x86_linux_dr_set): Use it.
750
749bab01
PA
7512015-02-27 Pedro Alves <palves@redhat.com>
752
753 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
754 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
755 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
756 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
757 (ps_lsetfpregs, ps_getpid)
758 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
759 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
760 (ps_lsetxregs, ps_plog): Declare.
761
3c14e5a3
PA
7622015-02-27 Pedro Alves <palves@redhat.com>
763
764 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
765 IP_AGENT_EXPORT_FUNC.
766 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
767 IP_AGENT_EXPORT_FUNC.
768 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
769 (IP_AGENT_EXPORT): Delete.
770 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
771 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
772 (gdb_trampoline_buffer_error, collecting, gdb_collect)
773 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
774 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
775 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
776 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
777 (traceframe_read_count, traceframe_write_count)
778 (traceframes_created, trace_state_variables, get_raw_reg)
779 (get_trace_state_variable_value, set_trace_state_variable_value)
780 (ust_loaded, helper_thread_id, cmd_buf): Use
781 IPA_SYM_EXPORTED_NAME.
782 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
783 (tracepoints) Use IP_AGENT_EXPORT_VAR.
784 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
785 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
786 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
787 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
788 EXTERN_C_PUSH/EXTERN_C_POP.
789 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
790 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
791 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
792 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
793 (traceframe_write_count, traceframe_read_count)
794 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
795 (about_to_request_buffer_space, get_trace_state_variable_value)
796 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
797 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
798 EXTERN_C_PUSH/EXTERN_C_POP.
799 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
800 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
801 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
802 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
803 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
804 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
805 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
806 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
807 Define.
808 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
809 (IP_AGENT_EXPORT_VAR_DECL): Define.
810 (tracing): Declare.
811 (gdb_agent_get_raw_reg): Declare.
812
fe978cb0
PA
8132015-02-27 Tom Tromey <tromey@redhat.com>
814 Pedro Alves <palves@redhat.com>
815
816 Rename symbols whose names are reserved C++ keywords throughout.
817
3bc3d82a
PA
8182015-02-27 Pedro Alves <palves@redhat.com>
819
820 * Makefile.in (COMPILER): New, get it from autoconf.
821 (CXX): Get from autoconf instead.
822 (COMPILE.pre): Use COMPILER.
823 (CC-LD): Rename to ...
824 (CC_LD): ... this. Use COMPILER.
825 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
826 (CXX_FOR_TARGET): Default to g++ instead of gcc.
827 * acinclude.m4: Include build-with-cxx.m4.
828 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
829 Disable -Werror by default if building in C++ mode.
830 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
831 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
832 the C++ compiler. Save/restore CXXFLAGS too.
833 * configure: Regenerate.
834
07697489
PA
8352015-02-27 Pedro Alves <palves@redhat.com>
836
837 * acinclude.m4: Include libiberty.m4.
838 * configure.ac: Call libiberty_INIT.
839 * config.in, configure: Regenerate.
840
9beb7c4e
PA
8412015-02-26 Pedro Alves <palves@redhat.com>
842
843 * linux-low.c (linux_wait_1): When incrementing the PC past a
844 program breakpoint always use the_low_target.breakpoint_len as
845 increment, rather than the maximum between that and
846 the_low_target.decr_pc_after_break.
847
8090aef2
PA
8482015-02-23 Pedro Alves <palves@redhat.com>
849
850 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
851 thread was doing a step-over; always adjust the PC if
852 we stepped over a permanent breakpoint.
853 (linux_wait_1): If we stepped over breakpoint that was on top of a
854 permanent breakpoint, manually advance the PC past it.
855
bc9540e8
PA
8562015-02-23 Pedro Alves <palves@redhat.com>
857
858 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
859 modes.
860 (x86_fill_gregset, x86_store_gregset): Use it when handling
861 $orig_eax.
862
2db9a427
PA
8632015-02-20 Pedro Alves <palves@redhat.com>
864
865 * thread-db.c: Include "nat/linux-procfs.h".
866 (thread_db_init): Skip listing new threads if the kernel supports
867 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
868
afa8d396
PA
8692015-02-20 Pedro Alves <palves@redhat.com>
870
871 * linux-low.c (status_pending_p_callback): Use ptid_match.
872
c9587f88
AT
8732015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
874
875 PR breakpoints/16812
876 * linux-low.c (wstatus_maybe_breakpoint): Remove.
877 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
878 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
879
b05ec7a5
AT
8802015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
881
882 PR breakpoints/15956
883 * tracepoint.c (cmd_qtinit): Add check for current_thread.
884
d33501a5
MM
8852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
886
887 * linux-low.c (linux_low_btrace_conf): Print size.
888 * server.c (handle_btrace_conf_general_set): New.
889 (hanle_general_set): Call handle_btrace_conf_general_set.
890 (handle_query): Report Qbtrace-conf:bts:size as supported.
891
f4abbc16
MM
8922015-02-09 Markus Metzger <markus.t.metzger@intel.com>
893
894 * linux-low.c (linux_low_enable_btrace): Update parameters.
895 (linux_low_btrace_conf): New.
896 (linux_target_ops)<to_btrace_conf>: Initialize.
897 * server.c (current_btrace_conf): New.
898 (handle_btrace_enable): Rename to ...
899 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
900 to target_enable_btrace. Update comment. Update users.
901 (handle_qxfer_btrace_conf): New.
902 (qxfer_packets): Add btrace-conf entry.
903 (handle_query): Report qXfer:btrace-conf:read as supported packet.
904 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
905 (target_ops)<read_btrace_conf>: New.
906 (target_enable_btrace): Update parameters.
907 (target_read_btrace_conf): New.
908
043c3577
MM
9092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
910
911 * server.c (handle_btrace_general_set): Remove call to
912 target_supports_btrace.
913 (supported_btrace_packets): New.
914 (handle_query): Call supported_btrace_packets.
915 * target.h: include btrace-common.h.
916 (btrace_target_info): Removed.
917 (supports_btrace, target_supports_btrace): Update parameters.
918
734b0e4b
MM
9192015-02-09 Markus Metzger <markus.t.metzger@intel.com>
920
921 * Makefile.in (SFILES): Add common/btrace-common.c.
922 (OBS): Add common/btrace-common.o.
923 (btrace-common.o): Add build rules.
924 * linux-low: Include btrace-common.h.
925 (linux_low_read_btrace): Use struct btrace_data. Call
926 btrace_data_init and btrace_data_fini.
927
d6c146e9
PA
9282015-02-06 Pedro Alves <palves@redhat.com>
929
930 * thread-db.c (find_new_threads_callback): Add debug output.
931
20ba1ce6
PA
9322015-02-04 Pedro Alves <palves@redhat.com>
933
934 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
935 (resume_stopped_resumed_lwps): New function.
936 (linux_wait_for_event_filtered): Use it.
937
8cc73a39
SDJ
9382015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
939
940 * Makefile.in (SFILES): Add linux-personality.c.
941 (linux-personality.o): New rule.
942 * configure.srv (srv_linux_obj): Add linux-personality.o to the
943 list of objects to be built.
944 * linux-low.c: Include nat/linux-personality.h.
945 (linux_create_inferior): Remove code to disable address space
946 randomization (moved to ../nat/linux-personality.c). Create
947 cleanup to disable address space randomization.
948
fb23d554
SDJ
9492015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
950
951 * Makefile.in (posix-strerror.o): New rule.
952 (mingw-strerror.o): Likewise.
953 * configure: Regenerated.
954 * configure.ac: Source file ../common/common.host. Initialize new
955 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
956
cdf43629
YQ
9572015-01-14 Yao Qi <yao@codesourcery.com>
958
959 * Makefile.in (SFILES): Add nat/ppc-linux.c.
960 (ppc-linux.o): New rule.
961 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
962 * configure.ac: AC_CHECK_FUNCS(getauxval).
963 * config.in: Re-generated.
964 * configure: Re-generated.
965 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
966 ppc64_64bit_inferior_p
967
514c5338
YQ
9682015-01-14 Yao Qi <yao@codesourcery.com>
969
970 * linux-ppc-low.c: Include "nat/ppc-linux.h".
971 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
972 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
973 (PT_ORIG_R3, PT_TRAP): Likewise.
974 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
975 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
976 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
977
3368c1e5
JB
9782015-01-10 Joel Brobecker <brobecker@adacore.com>
979
980 * i387-fp.c (i387_cache_to_xsave): In look over
981 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
982 zmmh_low_space field by use of zmmh_high_space.
983
582511be
PA
9842015-01-09 Pedro Alves <palves@redhat.com>
985
986 * linux-low.c (step_over_bkpt): Move higher up in the file.
987 (handle_extended_wait): Don't store the stop_pc here.
988 (get_stop_pc): Adjust comments and rename to ...
989 (check_stopped_by_breakpoint): ... this. Record whether the LWP
990 stopped for a software breakpoint or hardware breakpoint.
991 (thread_still_has_status_pending_p): New function.
992 (status_pending_p_callback): Use
993 thread_still_has_status_pending_p. If the event is no longer
994 interesting, resume the LWP.
995 (handle_tracepoints): Add assert.
996 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
997 (wstatus_maybe_breakpoint): New function.
998 (cancel_breakpoint): Delete function.
999 (check_stopped_by_watchpoint): New function, factored out from
1000 linux_low_filter_event.
1001 (lp_status_maybe_breakpoint): Delete function.
1002 (linux_low_filter_event): Remove filter_ptid argument.
1003 Leave thread group exits pending here. Store the LWP's stop PC.
1004 Always leave events pending.
1005 (linux_wait_for_event_filtered): Pull all events out of the
1006 kernel, and leave them all pending.
1007 (count_events_callback, select_event_lwp_callback): Consider all
1008 events.
1009 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1010 (select_event_lwp): Only give preference to the stepping LWP in
1011 all-stop mode. Adjust comments.
1012 (ignore_event): New function.
1013 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1014 references to cancel_breakpoints. Adjust to renames. Also give
1015 equal priority to all LWPs that have had events in non-stop mode.
1016 If reporting a software breakpoint event, unadjust the LWP's PC.
1017 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1018 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1019 Adjust.
1020 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1021 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1022 (linux_stopped_by_watchpoint): Adjust.
1023 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1024 * linux-low.h (enum lwp_stop_reason): New.
1025 (struct lwp_info) <stop_pc>: Adjust comment.
1026 <stopped_by_watchpoint>: Delete field.
1027 <stop_reason>: New field.
1028 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1029 * mem-break.c (software_breakpoint_inserted_here)
1030 (hardware_breakpoint_inserted_here): New function.
1031 * mem-break.h (software_breakpoint_inserted_here)
1032 (hardware_breakpoint_inserted_here): Declare.
1033 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1034 (cancel_breakpoints): Delete.
1035 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1036 (upload_fast_traceframes): Remove references to
1037 cancel_breakpoints.
1038
a33e3959
PA
10392015-01-09 Pedro Alves <palves@redhat.com>
1040
1041 * thread-db.c (find_new_threads_callback): Ignore thread if the
1042 kernel thread ID is -1.
1043
8784d563
PA
10442015-01-09 Pedro Alves <palves@redhat.com>
1045
1046 * linux-low.c (linux_attach_fail_reason_string): Move to
1047 nat/linux-ptrace.c, and rename.
1048 (linux_attach_lwp): Update comment.
1049 (attach_proc_task_lwp_callback): New function.
1050 (linux_attach): Adjust to rename and use
1051 linux_proc_attach_tgid_threads.
1052 (linux_attach_fail_reason_string): Delete declaration.
1053
76f2b779
JB
10542015-01-01 Joel Brobecker <brobecker@adacore.com>
1055
1056 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1057 * server.c (gdbserver_version): Likewise.
1058
fafcc06a
SDJ
10592014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1060
1061 * remote-utils.c: Include ctype.h.
1062 (input_interrupt): Explicitly handle the case when the char
1063 received is the NUL byte. Improve the printing of non-ASCII
1064 characters.
1065
beed38b8
JB
10662014-12-16 Joel Brobecker <brobecker@adacore.com>
1067
1068 * linux-low.c (linux_low_filter_event): Update call to
1069 linux_enable_event_reporting following the addition of
1070 a new parameter to that function.
1071
bf330350
CU
10722014-12-16 Catalin Udma <catalin.udma@freescale.com>
1073
1074 PR server/17457
1075 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1076 (AARCH64_FPCR_REGNO): Likewise.
1077 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1078 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1079 (aarch64_store_fpregset): Likewise.
1080
5227d625
JB
10812014-12-15 Joel Brobecker <brobecker@adacore.com>
1082
1083 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1084 Remove FIXME comment about assumption about N.
1085
f93b65a0
JB
10862014-12-13 Joel Brobecker <brobecker@adacore.com>
1087
1088 * configure.ac: If large-file support is disabled in GDBserver,
1089 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1090 * configure: Regenerate.
1091
e5a9158d
AA
10922014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1093
1094 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1095 warning upon ENODATA from ptrace.
1096 * linux-s390-low.c (s390_store_tdb): New.
1097 (s390_regsets): Add regset for NT_S390_TDB.
1098
feea5f36
AA
10992014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1100
1101 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1102 without a fill_function.
1103 * linux-s390-low.c (s390_fill_last_break): Remove.
1104 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1105 (s390_arch_setup): Use regset's size instead of fill_function for
1106 loop end condition.
1107
098dbe61
AA
11082014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1109
1110 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1111 the regset's store function when ptrace returned an error.
1112 * regcache.c (get_thread_regcache): Invalidate register cache
1113 before fetching inferior's registers.
1114
28eef672
AA
11152014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1116
1117 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1118 while-loop as for-loop.
1119 (regsets_store_inferior_registers): Likewise.
1120
bdca27a2
YQ
11212014-11-28 Yao Qi <yao@codesourcery.com>
1122
1123 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1124 * config.in, configure: Re-generate.
1125 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1126 is defined.
1127
9c232dda
YQ
11282014-11-21 Yao Qi <yao@codesourcery.com>
1129
1130 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1131 (AC_CHECK_HEADERS): Remove malloc.h.
1132 * configure: Re-generated.
1133 * config.in: Re-generated.
1134 * server.h: Don't include alloca.h and malloc.h.
1135 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1136 Don't include malloc.h.
1137
43968415
JB
11382014-11-17 Joel Brobecker <brobecker@adacore.com>
1139
1140 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1141 corresponding ERRNO check in same block.
1142
40e91bc7
PA
11432014-11-12 Pedro Alves <palves@redhat.com>
1144
1145 * server.c (cont_thread): Update comment.
1146 (start_inferior, attach_inferior): No longer clear cont_thread.
1147 (handle_v_cont): No longer set cont_thread.
1148 (captured_main): Clear cont_thread each time a GDB connects.
1149
c2c118cf
PA
11502014-11-12 Pedro Alves <palves@redhat.com>
1151
1152 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1153 thread, and don't resume all threads if the Hc thread has exited.
1154
78708b7c
PA
11552014-11-12 Pedro Alves <palves@redhat.com>
1156
1157 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1158 the process group instead of to a specific LWP.
1159
a2abc7de
PA
11602014-10-15 Pedro Alves <palves@redhat.com>
1161
1162 PR server/17487
1163 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1164 parameter.
1165 (arm_set_thread_context): Delete.
1166 (the_low_target): Adjust.
1167 * win32-i386-low.c (debug_registers_changed)
1168 (debug_registers_used): Delete.
1169 (update_debug_registers_callback): New function.
1170 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1171 needing to update their debug registers.
1172 (win32_get_current_dr): New function.
1173 (x86_dr_low_get_addr, x86_dr_low_get_control)
1174 (x86_dr_low_get_status): Fetch the debug register from the thread
1175 record's context.
1176 (i386_initial_stuff): Adjust.
1177 (i386_get_thread_context): Remove current_event parameter. Don't
1178 clear debug_registers_changed nor copy DR values to
1179 debug_reg_state.
1180 (i386_set_thread_context): Delete.
1181 (i386_prepare_to_resume): New function.
1182 (i386_thread_added): Mark the thread as needing to update irs
1183 debug registers.
1184 (the_low_target): Remove i386_set_thread_context and install
1185 i386_prepare_to_resume.
1186 * win32-low.c (win32_get_thread_context): Adjust.
1187 (win32_set_thread_context): Use SetThreadContext
1188 directly.
1189 (win32_prepare_to_resume): New function.
1190 (win32_require_context): New function, factored out from ...
1191 (thread_rec): ... this.
1192 (continue_one_thread): Call win32_prepare_to_resume on each thread
1193 we're about to continue.
1194 (win32_resume): Call win32_prepare_to_resume on the event thread.
1195 * win32-low.h (struct win32_thread_info)
1196 <debug_registers_changed>: New field.
1197 (struct win32_target_ops): Change prototype of set_thread_context,
1198 delete set_thread_context and add prepare_to_resume.
1199 (win32_require_context): New declaration.
1200
a442d071
GB
12012014-10-08 Gary Benson <gbenson@redhat.com>
1202
1203 * server.h: Do not include common-exceptions.h.
1204
6f1947e8
GB
12052014-10-08 Gary Benson <gbenson@redhat.com>
1206
1207 * server.h: Do not include cleanups.h.
1208
63b434a4
JH
12092014-09-30 James Hogan <james.hogan@imgtec.com>
1210
1211 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1212 mips64-dsp-linux.c.
1213
c4d9ceb6
YQ
12142014-09-23 Yao Qi <yao@codesourcery.com>
1215
1216 * linux-low.c (lp_status_maybe_breakpoint): New function.
1217 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1218 (count_events_callback): Likewise.
1219 (select_event_lwp_callback): Likewise.
1220 (cancel_breakpoints_callback): Likewise.
1221
89a5711c
DB
12222014-09-19 Don Breazeal <donb@codesourcery.com>
1223
1224 * linux-low.c (handle_extended_wait): Call
1225 linux_ptrace_get_extended_event.
1226 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1227 linux_is_extended_waitstatus.
1228
bffc0964
JB
12292014-09-16 Joel Brobecker <brobecker@adacore.com>
1230
1231 * Makefile.in (CPPFLAGS): Define.
1232 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1233 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1234
0bfdf32f
GB
12352014-09-16 Gary Benson <gbenson@redhat.com>
1236
1237 * inferiors.h (current_inferior): Renamed as...
1238 (current_thread): New variable. All uses updated.
1239 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1240 (maybe_move_out_of_jump_pad): Likewise.
1241 (cancel_breakpoint): Likewise.
1242 (linux_low_filter_event): Likewise.
1243 (wait_for_sigstop): Likewise.
1244 (linux_resume_one_lwp): Likewise.
1245 (need_step_over_p): Likewise.
1246 (start_step_over): Likewise.
1247 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1248 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1249 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1250 and save_inferior as saved_thread.
1251 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1252 saved_thread.
1253 (regcache_invalidate_thread): Likewise.
1254 * remote-utils.c (prepare_resume_reply): Likewise.
1255 * thread-db.c (thread_db_get_tls_address): Likewise.
1256 (disable_thread_event_reporting): Likewise.
1257 (remove_thread_event_breakpoints): Likewise.
1258 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1259 as saved_thread.
1260 * target.h (set_desired_inferior): Renamed as...
1261 (set_desired_thread): New declaration. All uses updated.
1262 * server.c (myresume): Updated comment to reference thread instead
1263 of inferior.
1264 (handle_serial_event): Likewise.
1265 (handle_target_event): Likewise.
1266
361c8ade
GB
12672014-09-12 Tom Tromey <tromey@redhat.com>
1268 Gary Benson <gbenson@redhat.com>
1269
1270 * regcache.h: Include common-regcache.h.
1271 (regcache_read_pc): Don't declare.
1272 * regcache.c (get_thread_regcache_for_ptid): New function.
1273
bd9269f7
GB
12742014-09-11 Tom Tromey <tromey@redhat.com>
1275 Gary Benson <gbenson@redhat.com>
1276
1277 * symbol.c: New file.
1278 * Makefile.in (SFILES): Add symbol.c.
1279 (OBS): Add symbol.o.
1280
f8c1d06b
GB
12812014-09-11 Gary Benson <gbenson@redhat.com>
1282
1283 * target.c (target_stop_ptid, target_continue_ptid): New
1284 functions.
1285
721ec300
GB
12862014-09-11 Tom Tromey <tromey@redhat.com>
1287 Gary Benson <gbenson@redhat.com>
1288
1289 * target.h: Include target/target.h.
1290 * target.c (target_read_memory, target_read_uint32)
1291 (target_write_memory): New functions.
1292
c5e92cca
GB
12932014-09-11 Gary Benson <gbenson@redhat.com>
1294
1295 * server.h (debug_hw_points): Don't declare.
1296 * server.c (debug_hw_points): Don't define. Replace all uses
1297 with show_debug_regs.
1298 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1299 all uses with show_debug_regs.
1300
2e4bb98a
EBM
13012014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1302
1303 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1304 endianness into account.
1305 (ppc_supply_ptrace_register): Likewise.
1306
ac740bc7
JH
13072014-09-03 James Hogan <james.hogan@imgtec.com>
1308
1309 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1310 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1311
97ea6506
GB
13122014-09-03 Gary Benson <gbenson@redhat.com>
1313
1314 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1315 ALL_DEBUG_ADDRESS_REGISTERS.
1316
df7e5265
GB
13172014-09-02 Gary Benson <gbenson@redhat.com>
1318
1319 * i386-low.h: Renamed as...
1320 * x86-low.h: New file. All type, function and variable name
1321 prefixes changed from "i386_" to "x86_". All references updated.
1322 * i386-low.c: Renamed as...
1323 * x86-low.c: New file. All type, function and variable name
1324 prefixes changed from "i386_" to "x86_". All references updated.
1325
ed859da7
GB
13262014-09-02 Gary Benson <gbenson@redhat.com>
1327
1328 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1329 (x86_linux_new_thread): Likewise.
1330
860789c7
GB
13312014-08-29 Gary Benson <gbenson@redhat.com>
1332
1333 * server.h (setjmp.h): Do not include.
1334 (toplevel): Do not declare.
1335 (common-exceptions.h): Include.
1336 (cleanups.h): Likewise.
1337 * server.c (toplevel): Do not define.
1338 (exit_code): New static global.
1339 (detach_or_kill_for_exit_cleanup): New function.
1340 (main): New function. Original main renamed to...
1341 (captured_main): New function.
1342 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1343
ff55e1b5
GB
13442014-08-29 Gary Benson <gbenson@redhat.com>
1345
1346 * Makefile.in (SFILES): Add common/common-exceptions.c.
1347 (OBS): Add common-exceptions.o.
1348 (common-exceptions.o): New rule.
1349 * utils.c (prepare_to_throw_exception): New function.
1350
e9bcb658
GB
13512014-08-29 Gary Benson <gbenson@redhat.com>
1352
1353 * config.in: Regenerate.
1354 * configure: Likewise.
1355
e3180625
GB
13562014-08-29 Gary Benson <gbenson@redhat.com>
1357
1358 * Makefile.in (SFILES): Add common/cleanups.c.
1359 (OBS): cleanups.o.
1360 (cleanups.o): New rule.
1361
e3d6ba5d
GB
13622014-08-29 Gary Benson <gbenson@redhat.com>
1363
1364 * utils.c (internal_vwarning): New function.
1365
7096e886
GB
13662014-08-28 Gary Benson <gbenson@redhat.com>
1367
1368 * utils.h (fatal): Remove declaration.
1369 * utils.c (fatal): Remove function.
1370
14ce3192
GB
13712014-08-28 Gary Benson <gbenson@redhat.com>
1372
1373 * tracepoint.c (gdb_agent_init): Replace fatal with
1374 perror_with_name.
1375 (initialize_tracepoint): Likewise.
1376
50278d59
GB
13772014-08-28 Gary Benson <gbenson@redhat.com>
1378
1379 * remote-utils.c (remote_prepare): Replace fatal with error.
1380
aa96c426
GB
13812014-08-28 Gary Benson <gbenson@redhat.com>
1382
1383 * linux-low.c (linux_async): Replace fatal with warning.
1384 Tidy up and return.
1385 (linux_start_non_stop): Return -1 if linux_async failed.
1386
f7160e97
GB
13872014-08-28 Gary Benson <gbenson@redhat.com>
1388
1389 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1390 gdb_assert.
1391 (i386_dr_low_get_addr): Remove vague comment.
1392 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1393 gdb_assert.
1394
38e08fca
GB
13952014-08-28 Gary Benson <gbenson@redhat.com>
1396
1397 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1398 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1399 internal_error.
1400 (linux_resume_one_lwp): Likewise.
1401 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1402 gdb_assert.
1403 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1404 with internal_error.
1405 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1406 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1407 (find_register_by_name): Replace fatal with internal_error.
1408 (find_regno): Likewise.
1409 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1410 * thread-db.c (thread_db_create_event): Likewise.
1411 (thread_db_load_search): Likewise.
1412 (try_thread_db_load_1): Likewise.
1413 * tracepoint.c (get_jump_space_head): Replace fatal with
1414 internal_error.
1415 (claim_trampoline_space): Likewise.
1416 (have_fast_tracepoint_trampoline_buffer): Likewise.
1417 (cmd_qtstart): Likewise.
1418 (stop_tracing): Likewise.
1419 (fast_tracepoint_collecting): Likewise.
1420 (target_malloc): Likewise.
1421 (download_tracepoint): Likewise.
1422 (download_trace_state_variables): Replace check with gdb_assert.
1423 (upload_fast_traceframes): Replace fatal with internal_error.
1424
34abf635
GB
14252014-08-19 Tom Tromey <tromey@redhat.com>
1426 Gary Benson <gbenson@redhat.com>
1427
1428 * Makefile.in (SFILES): Add common/common-debug.c.
1429 (OBS): Add common-debug.o.
1430 (common-debug.o): New rule.
1431 * debug.h (debug_printf): Don't declare.
1432 * debug.c (debug_printf): Renamed and rewritten as...
1433 (debug_vprintf): New function.
1434
f6e94d78
GB
14352014-08-19 Gary Benson <gbenson@redhat.com>
1436
1437 * utils.h: Do not include print-utils.h.
1438
9239eeab
GB
14392014-08-19 Tom Tromey <tromey@redhat.com>
1440 Gary Benson <gbenson@redhat.com>
1441
1442 * server.h: Add static assertion.
1443 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1444
ef87c8bb
GB
14452014-08-19 Tom Tromey <tromey@redhat.com>
1446 Gary Benson <gbenson@redhat.com>
1447
1448 * Makefile.in (SFILES): Add common/errors.c.
1449 (OBS): Add errors.o.
1450 (IPA_OBS): Add errors-ipa.o.
1451 (errors.o): New rule.
1452 (errors-ipa.o): Likewise.
1453 * utils.h (perror_with_name, error, warning): Don't declare.
1454 * utils.c (warning): Renamed and rewritten as...
1455 (vwarning): New function.
1456 (error): Renamed and rewritten as...
1457 (verror): New function.
1458 (internal_error): Renamed and rewritten as...
1459 (internal_verror): New function.
1460
bb974a24
GB
14612014-08-07 Gary Benson <gbenson@redhat.com>
1462
1463 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1464 * configure: Regenerate.
1465 * config.in: Likewise.
1466 * server.h: Do not include errno.h.
1467 * event-loop.c: Likewise.
1468 * hostio-errno.c: Likewise.
1469 * linux-low.c: Likewise.
1470 * remote-utils.c: Likewise.
1471 * spu-low.c: Likewise.
1472 * utils.c: Likewise.
1473 * gdbreplay.c: Unconditionally include errno.h.
1474
6d3d12eb
GB
14752014-08-07 Gary Benson <gbenson@redhat.com>
1476
1477 * server.h: Do not include string.h.
1478 * event-loop.c: Likewise.
1479 * linux-low.c: Likewise.
1480 * regcache.c: Likewise.
1481 * remote-utils.c: Likewise.
1482 * spu-low.c: Likewise.
1483 * utils.c: Likewise.
1484
dccbb609
GB
14852014-08-07 Gary Benson <gbenson@redhat.com>
1486
1487 * server.h: Do not include gdb_assert.h.
1488
e76df0d0
GB
14892014-08-07 Gary Benson <gbenson@redhat.com>
1490
1491 * server.h: Do not include common-utils.h.
1492
4cb9c816
GB
14932014-08-07 Gary Benson <gbenson@redhat.com>
1494
1495 * server.h: Do not include ptid.h.
1496 * notif.h: Likewise.
1497
3995eeee
GB
14982014-08-07 Gary Benson <gbenson@redhat.com>
1499
1500 * server.h: Do not include gdb_locale.h.
1501
cb9f1a9b
GB
15022014-08-07 Gary Benson <gbenson@redhat.com>
1503
1504 * server.h: Do not include gdb/signals.h.
1505 * win32-low.c: Likewise.
1506
a5fceff8
GB
15072014-08-07 Gary Benson <gbenson@redhat.com>
1508
1509 * server.h: Do not include pathmax.h.
1510
b9391142
GB
15112014-08-07 Gary Benson <gbenson@redhat.com>
1512
1513 * server.h: Do not include libiberty.h.
1514 * linux-bfin-low.c: Likewise.
1515
0e443c87
GB
15162014-08-07 Gary Benson <gbenson@redhat.com>
1517
1518 * server.h: Do not include ansidecl.h.
1519
8ebb3f56
GB
15202014-08-07 Gary Benson <gbenson@redhat.com>
1521
1522 * linux-x86-low.c: Do not include stddef.h.
1523 * lynx-ppc-low.c: Likewise.
1524 * tracepoint.c: Likewise.
1525
8980bdf6
GB
15262014-08-07 Gary Benson <gbenson@redhat.com>
1527
1528 * server.h: Do not include stdarg.h.
1529 * nto-low.c: Likewise.
1530
d7096f71
GB
15312014-08-07 Gary Benson <gbenson@redhat.com>
1532
1533 * server.h: Do not include stdlib.h.
1534 * inferiors.c: Likewise.
1535 * linux-low.c: Likewise.
1536 * regcache.c: Likewise.
1537 * spu-low.c: Likewise.
1538 * tracepoint.c: Likewise.
1539 * utils.c: Likewise.
1540
d02f550d
GB
15412014-08-07 Gary Benson <gbenson@redhat.com>
1542
1543 * server.h: Do not include stdio.h.
1544 * linux-low.c: Likewise.
1545 * remote-utils.c: Likewise.
1546 * spu-low.c: Likewise.
1547 * utils.c: Likewise.
1548 * wincecompat.c: Likewise.
1549
87f6c4e3
GB
15502014-08-06 Gary Benson <gbenson@redhat.com>
1551
1552 * regcache.c (init_register_cache): Move conditionals inside if.
1553
7089dca4
GB
15542014-08-06 Gary Benson <gbenson@redhat.com>
1555
1556 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1557
462f517e
GB
15582014-07-31 Gary Benson <gbenson@redhat.com>
1559
1560 * ax.h: Do not include server.h.
1561 * gdbthread.h: Likewise.
1562 * lynx-low.h: Likewise.
1563 * notif.h: Likewise.
1564
976411d6
GB
15652014-07-30 Gary Benson <gbenson@redhat.com>
1566
1567 * server.h: Include common-defs.h.
1568 Do not include config.h or build-gnulib-gdbserver/config.h.
1569
d41f6d8e
GB
15702014-07-30 Gary Benson <gbenson@redhat.com>
1571
1572 * hostio-errno.c: Move server.h to top of includes list.
1573 * inferiors.c: Likewise.
1574 * linux-x86-low.c: Likewise.
1575 * notif.c: Include server.h.
1576
314c6a35
TT
15772014-07-24 Tom Tromey <tromey@redhat.com>
1578 Gary Benson <gbenson@redhat.com>
1579
1580 * server.h (CORE_ADDR): Now unsigned.
1581
69ff6be5
PA
15822014-07-16 Pedro Alves <palves@redhat.com>
1583
1584 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1585
ce9e3fe7
PA
15862014-07-15 Pedro Alves <palves@redhat.com>
1587
1588 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1589 copy.
1590
e76126e8
PA
15912014-07-11 Pedro Alves <palves@redhat.com>
1592
1593 * linux-low.c (kill_wait_lwp): New function, based on
1594 kill_one_lwp_callback, but use my_waitpid directly.
1595 (kill_one_lwp_callback, linux_kill): Use it.
1596
8e9db26e
PA
15972014-06-23 Pedro Alves <palves@redhat.com>
1598
1599 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1600 before setting DR0..DR3.
1601
698b3e08
GB
16022014-06-20 Gary Benson <gbenson@redhat.com>
1603
1604 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1605 * configure: Regenerated.
1606 * config.in: Likewise.
1607
125f8a3d
GB
16082014-06-20 Gary Benson <gbenson@redhat.com>
1609
1610 * Makefile.in (SFILES): Update locations for files moved
1611 from common to nat.
1612 (object file files): Reordered.
1613
42995dbd
GB
16142014-06-20 Gary Benson <gbenson@redhat.com>
1615
1616 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1617 (i386_dr_low_set_addr): Likewise.
1618 (i386_dr_low_get_addr): Likewise.
1619 (i386_dr_low_can_set_control): Likewise.
1620 (i386_dr_low_set_control): Likewise.
1621 (i386_dr_low_get_control): Likewise.
1622 (i386_dr_low_get_status): Likewise.
1623 (i386_get_debug_register_length): Likewise.
1624 * linux-x86-low.c (i386_dr_low_set_addr):
1625 Changed signature. Made static.
1626 (i386_dr_low_get_addr): Likewise.
1627 (i386_dr_low_set_control): Likewise.
1628 (i386_dr_low_get_control): Likewise.
1629 (i386_dr_low_get_status): Likewise.
1630 (i386_dr_low): New global variable.
1631 * win32-i386-low.c (i386_dr_low_set_addr):
1632 Changed signature. Made static.
1633 (i386_dr_low_get_addr): Likewise.
1634 (i386_dr_low_set_control): Likewise.
1635 (i386_dr_low_get_control): Likewise.
1636 (i386_dr_low_get_status): Likewise.
1637 (i386_dr_low): New global variable.
1638
e1d2394b
MS
16392014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1640
1641 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1642 * Makefile.in (AR, AR_FLAGS): Define.
1643 * configure: Regenerate.
1644
3a8ee006
GB
16452014-06-19 Gary Benson <gbenson@redhat.com>
1646
1647 * Makefile.in (i386-dregs.o): New rule.
1648 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1649 * i386-low.c (target.h): Remove include.
1650 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1651 (DR_CONTROL_SHIFT): Likewise.
1652 (DR_CONTROL_SIZE): Likewise.
1653 (DR_RW_EXECUTE): Likewise.
1654 (DR_RW_WRITE): Likewise.
1655 (DR_RW_READ): Likewise.
1656 (DR_RW_IORW): Likewise.
1657 (DR_LEN_1): Likewise.
1658 (DR_LEN_2): Likewise.
1659 (DR_LEN_4): Likewise.
1660 (DR_LEN_8): Likewise.
1661 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1662 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1663 (DR_ENABLE_SIZE): Likewise.
1664 (DR_LOCAL_SLOWDOWN): Likewise.
1665 (DR_GLOBAL_SLOWDOWN): Likewise.
1666 (DR_CONTROL_RESERVED): Likewise.
1667 (I386_DR_CONTROL_MASK): Likewise.
1668 (I386_DR_VACANT): Likewise.
1669 (I386_DR_LOCAL_ENABLE): Likewise.
1670 (I386_DR_GLOBAL_ENABLE): Likewise.
1671 (I386_DR_DISABLE): Likewise.
1672 (I386_DR_SET_RW_LEN): Likewise.
1673 (I386_DR_GET_RW_LEN): Likewise.
1674 (I386_DR_WATCH_HIT): Likewise.
1675 (i386_wp_op_t): Likewise.
1676 (i386_show_dr): Likewise.
1677 (i386_length_and_rw_bits): Likewise.
1678 (i386_insert_aligned_watchpoint): Likewise.
1679 (i386_remove_aligned_watchpoint): Likewise.
1680 (i386_handle_nonaligned_watchpoint): Likewise.
1681 i386_update_inferior_debug_regs(): Likewise.
1682 (i386_dr_insert_watchpoint): Likewise.
1683 (i386_dr_remove_watchpoint): Likewise.
1684 (i386_dr_region_ok_for_watchpoint): Likewise.
1685 (i386_dr_stopped_data_address): Likewise.
1686 (i386_dr_stopped_by_watchpoint): Likewise.
1687
8f26655c
GB
16882014-06-19 Gary Benson <gbenson@redhat.com>
1689
1690 * i386-low.c (i386_dr_show): Renamed to
1691 i386_show_dr and made static. All uses updated.
1692 (i386_dr_length_and_rw_bits): Renamed to
1693 i386_length_and_rw_bits and made static.
1694 All uses updated.
1695 (i386_dr_insert_aligned_watchpoint): Renamed to
1696 i386_insert_aligned_watchpoint and made static.
1697 All uses updated.
1698 (i386_dr_remove_aligned_watchpoint): Renamed to
1699 i386_remove_aligned_watchpoint and made static.
1700 All uses updated.
1701 (i386_dr_update_inferior_debug_regs): Renamed to
1702 i386_update_inferior_debug_regs and made static.
1703 All uses updated.
1704
b9228891
GB
17052014-06-18 Gary Benson <gbenson@redhat.com>
1706
5171def3
GB
1707 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1708 (i386_dr_low_can_set_control): Likewise.
1709 (i386_get_debug_register_length): Likewise.
1710 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1711 (i386_dr_low_can_set_control): Likewise.
1712 (i386_get_debug_register_length): Likewise.
1713
17142014-06-17 Gary Benson <gbenson@redhat.com>
1715
b9228891
GB
1716 * i386-low.h (i386-dregs.h): New include.
1717 (DR_FIRSTADDR): Now in i386-dregs.h.
1718 (DR_LASTADDR): Likewise.
1719 (DR_NADDR): Likewise.
1720 (DR_STATUS): Likewise.
1721 (DR_CONTROL): Likewise.
1722 (i386_debug_reg_state): Likewise.
1723 (i386_dr_insert_watchpoint): Likewise.
1724 (i386_dr_remove_watchpoint): Likewise.
1725 (i386_dr_region_ok_for_watchpoint): Likewise.
1726 (i386_dr_stopped_data_address): Likewise.
1727 (i386_dr_stopped_by_watchpoint): Likewise.
1728 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1729
4be83cc2
GB
17302014-06-18 Gary Benson <gbenson@redhat.com>
1731
1732 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1733 i386_dr_insert_watchpoint.
1734 (i386_low_remove_watchpoint): Renamed to
1735 i386_dr_remove_watchpoint.
1736 (i386_low_region_ok_for_watchpoint): Renamed to
1737 i386_dr_region_ok_for_watchpoint.
1738 (i386_low_stopped_data_address): Renamed to
1739 i386_dr_stopped_data_address.
1740 (i386_low_stopped_by_watchpoint): Renamed to
1741 i386_dr_stopped_by_watchpoint.
1742 * i386-low.c (i386_show_dr): Renamed to
1743 i386_dr_show and made nonstatic. All uses updated.
1744 (i386_length_and_rw_bits): Renamed to
1745 i386_dr_length_and_rw_bits and made nonstatic.
1746 All uses updated.
1747 (i386_insert_aligned_watchpoint): Renamed to
1748 i386_dr_insert_aligned_watchpoint and made nonstatic.
1749 All uses updated.
1750 (i386_remove_aligned_watchpoint): Renamed to
1751 i386_dr_remove_aligned_watchpoint and made nonstatic.
1752 All uses updated.
1753 (i386_update_inferior_debug_regs): Renamed to
1754 i386_dr_update_inferior_debug_regs and made nonstatic.
1755 All uses updated.
1756 (i386_low_insert_watchpoint): Renamed to
1757 i386_dr_insert_watchpoint. All uses updated.
1758 (i386_low_remove_watchpoint): Renamed to
1759 i386_dr_remove_watchpoint. All uses updated.
1760 (i386_low_region_ok_for_watchpoint): Renamed to
1761 i386_dr_region_ok_for_watchpoint. All uses updated.
1762 (i386_low_stopped_data_address): Renamed to
1763 i386_dr_stopped_data_address. All uses updated.
1764 (i386_low_stopped_by_watchpoint): Renamed to
1765 i386_dr_stopped_by_watchpoint. All uses updated.
1766
131aa0d4
GB
17672014-06-18 Gary Benson <gbenson@redhat.com>
1768
1769 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1770 (i386_dr_low_can_set_control): Likewise.
1771 (i386_insert_aligned_watchpoint): New check.
1772
d9305f7f
GB
17732014-06-18 Gary Benson <gbenson@redhat.com>
1774
1775 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1776 Renamed to state.
1777
e927c9fc
GB
17782014-06-18 Gary Benson <gbenson@redhat.com>
1779
1780 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1781 instead of fatal and error.
1782 (i386_handle_nonaligned_watchpoint): Likewise.
1783
1b6d4134
GB
17842014-06-18 Gary Benson <gbenson@redhat.com>
1785
1786 * i386-low.c (i386_get_debug_register_length): New macro.
1787 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1788 (i386_show_dr): Use debug_printf instead of fprintf. Use
1789 phex to format values.
1790
6e62758f
GB
17912014-06-18 Gary Benson <gbenson@redhat.com>
1792
1793 * i386-low.h: Comment changes.
1794 * i386-low.c: Likewise.
1795
fc6e2f03
GB
17962014-06-18 Gary Benson <gbenson@redhat.com>
1797
1798 * i386-low.c: Whitespace changes.
1799
f9d1eeed
TT
18002014-06-12 Tom Tromey <tromey@redhat.com>
1801
1802 * utils.c (freeargv): Remove.
1803
0b04e523
TT
18042014-06-12 Tom Tromey <tromey@redhat.com>
1805
1806 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1807 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1808 (parse_debug_format_options): Likewise.
1809 (gdbserver_usage): Likewise.
1810 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1811 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1812 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1813 against libiberty.
1814 ($(LIBGNU)): Depend on libiberty.
1815 (all-lib): Recurse into all subdirs.
1816 (install-only): Invoke "install" target in subdirs.
1817 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1818 targets.
1819 * configure: Rebuild.
1820 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1821 for vasprintf, vsnprintf, or gettimeofday.
1822 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1823 srv_tgtobj.
1824
270c9937
JB
18252014-06-05 Joel Brobecker <brobecker@adacore.com>
1826
1827 * development.sh: Delete.
1828 * Makefile.in (config.status): Adjust dependency on development.sh.
1829 * configure.ac: Adjust development.sh source call.
1830 * configure: Regenerate.
1831
0a261ed8
PA
18322014-06-02 Pedro Alves <palves@redhat.com>
1833
1834 * ax.c (gdb_free_agent_expr): New function.
1835 * ax.h (gdb_free_agent_expr): New declaration.
1836 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1837 list.
1838 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1839 static.
1840 (clear_breakpoint_conditions_and_commands): New function.
1841 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1842 (clear_breakpoint_conditions_and_commands): New declaration.
1843
e9dae05e
RR
18442014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1845
1846 * linux-aarch64-low.c (asm/ptrace.h): Include.
1847
5876f503
JK
18482014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1849
1850 Fix TLS access for -static -pthread.
1851 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1852 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1853 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1854
802e8e6d
PA
18552014-05-20 Pedro Alves <palves@redhat.com>
1856
1857 * linux-aarch64-low.c (aarch64_insert_point)
1858 (aarch64_remove_point): No longer check whether the type is
1859 supported here. Adjust to new interface.
1860 (the_low_target): Install aarch64_supports_z_point_type as
1861 supports_z_point_type method.
1862 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1863 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1864 instead of a Z packet char. Adjust.
1865 (arm_supports_z_point_type): New function.
1866 (arm_insert_point, arm_remove_point): Adjust to new interface.
1867 (the_low_target): Install arm_supports_z_point_type.
1868 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1869 (cris_insert_point, cris_remove_point): Adjust to new interface.
1870 Don't check whether the type is supported here.
1871 (the_low_target): Install cris_supports_z_point_type.
1872 * linux-low.c (linux_supports_z_point_type): New function.
1873 (linux_insert_point, linux_remove_point): Adjust to new interface.
1874 * linux-low.h (struct linux_target_ops) <insert_point,
1875 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1876 raw_breakpoint pointer parameter.
1877 <supports_z_point_type>: New method.
1878 * linux-mips-low.c (mips_supports_z_point_type): New function.
1879 (mips_insert_point, mips_remove_point): Adjust to new interface.
1880 Use mips_supports_z_point_type.
1881 (the_low_target): Install mips_supports_z_point_type.
1882 * linux-ppc-low.c (the_low_target): Install NULL as
1883 supports_z_point_type method.
1884 * linux-s390-low.c (the_low_target): Install NULL as
1885 supports_z_point_type method.
1886 * linux-sparc-low.c (the_low_target): Install NULL as
1887 supports_z_point_type method.
1888 * linux-x86-low.c (x86_supports_z_point_type): New function.
1889 (x86_insert_point): Adjust to new insert_point interface. Use
1890 insert_memory_breakpoint. Adjust to new
1891 i386_low_insert_watchpoint interface.
1892 (x86_remove_point): Adjust to remove_point interface. Use
1893 remove_memory_breakpoint. Adjust to new
1894 i386_low_remove_watchpoint interface.
1895 (the_low_target): Install x86_supports_z_point_type.
1896 * lynx-low.c (lynx_target_ops): Install NULL as
1897 supports_z_point_type callback.
1898 * nto-low.c (nto_supports_z_point_type): New.
1899 (nto_insert_point, nto_remove_point): Adjust to new interface.
1900 (nto_target_ops): Install nto_supports_z_point_type.
1901 * mem-break.c: Adjust intro comment.
1902 (struct raw_breakpoint) <raw_type, size>: New fields.
1903 <inserted>: Update comment.
1904 <shlib_disabled>: Delete field.
1905 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1906 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1907 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1908 (raw_bkpt_type_to_target_hw_bp_type): New function.
1909 (find_enabled_raw_code_breakpoint_at): New function.
1910 (find_raw_breakpoint_at): New type and size parameters. Use them.
1911 (insert_memory_breakpoint): New function, based off
1912 set_raw_breakpoint_at.
1913 (remove_memory_breakpoint): New function.
1914 (set_raw_breakpoint_at): Reimplement.
1915 (set_breakpoint): New, based on set_breakpoint_at.
1916 (set_breakpoint_at): Reimplement.
1917 (delete_raw_breakpoint): Go through the_target->remove_point
1918 instead of assuming memory breakpoints.
1919 (find_gdb_breakpoint_at): Delete.
1920 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1921 (find_gdb_breakpoint): New function.
1922 (set_gdb_breakpoint_at): Delete.
1923 (z_type_supported): New function.
1924 (set_gdb_breakpoint_1): New function, loosely based off
1925 set_gdb_breakpoint_at.
1926 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1927 (delete_gdb_breakpoint_at): Delete.
1928 (delete_gdb_breakpoint_1): New function, loosely based off
1929 delete_gdb_breakpoint_at.
1930 (delete_gdb_breakpoint): New function.
1931 (clear_gdb_breakpoint_conditions): Rename to ...
1932 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1933 breakpoint.
1934 (add_condition_to_breakpoint): Make static.
1935 (add_breakpoint_condition): Take a struct breakpoint pointer
1936 instead of an address. Adjust.
1937 (gdb_condition_true_at_breakpoint): Rename to ...
1938 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1939 z_type parameter.
1940 (gdb_condition_true_at_breakpoint): Reimplement.
1941 (add_breakpoint_commands): Take a struct breakpoint pointer
1942 instead of an address. Adjust.
1943 (gdb_no_commands_at_breakpoint): Rename to ...
1944 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1945 parameter. Return true if no breakpoint was found. Change debug
1946 output.
1947 (gdb_no_commands_at_breakpoint): Reimplement.
1948 (run_breakpoint_commands): Rename to ...
1949 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1950 and change return type to boolean.
1951 (run_breakpoint_commands): New function.
1952 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1953 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1954 breakpoint. Go through the_target->remove_point instead of
1955 assuming memory breakpoint.
1956 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1957 software and hardware breakpoints.
1958 (reinsert_raw_breakpoint): Go through the_target->insert_point
1959 instead of assuming memory breakpoint.
1960 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1961 software and hardware breakpoints.
1962 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1963 Check both software and hardware breakpoints.
1964 (validate_inserted_breakpoint): Assert the breakpoint is a
1965 software breakpoint. Set the inserted flag to -1 instead of
1966 setting shlib_disabled.
1967 (delete_disabled_breakpoints): Adjust.
1968 (validate_breakpoints): Only validate software breakpoints.
1969 Adjust to inserted flag change.
1970 (check_mem_read, check_mem_write): Skip breakpoint types other
1971 than software breakpoints. Adjust to inserted flag change.
1972 * mem-break.h (enum raw_bkpt_type): New enum.
1973 (raw_breakpoint, struct process_info): Forward declare.
1974 (Z_packet_to_target_hw_bp_type): Delete declaration.
1975 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1976 (set_gdb_breakpoint, delete_gdb_breakpoint)
1977 (clear_breakpoint_conditions): New declarations.
1978 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1979 (breakpoint_inserted_here): Update comment.
1980 (add_breakpoint_condition, add_breakpoint_commands): Replace
1981 address parameter with a breakpoint pointer parameter.
1982 (gdb_breakpoint_here): Update comment.
1983 (delete_gdb_breakpoint_at): Delete.
1984 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1985 * server.c (process_point_options): Take a struct breakpoint
1986 pointer instead of an address. Adjust.
1987 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1988 delete_gdb_breakpoint.
1989 * spu-low.c (spu_target_ops): Install NULL as
1990 supports_z_point_type method.
1991 * target.h: Include mem-break.h.
1992 (struct target_ops) <prepare_to_access_memory>: Update comment.
1993 <supports_z_point_type>: New field.
1994 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1995 instead of a char. Also take a raw breakpoint pointer.
1996 * win32-arm-low.c (the_low_target): Install NULL as
1997 supports_z_point_type.
1998 * win32-i386-low.c (i386_supports_z_point_type): New function.
1999 (i386_insert_point, i386_remove_point): Adjust to new interface.
2000 (the_low_target): Install i386_supports_z_point_type.
2001 * win32-low.c (win32_supports_z_point_type): New function.
2002 (win32_insert_point, win32_remove_point): Adjust to new interface.
2003 (win32_target_ops): Install win32_supports_z_point_type.
2004 * win32-low.h (struct win32_target_ops):
2005 <supports_z_point_type>: New method.
2006 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2007 instead of a char. Also take a raw breakpoint pointer.
2008
932539e3
PA
20092014-05-20 Pedro Alves <palves@redhat.com>
2010
2011 * mem-break.h: Include break-common.h.
2012 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2013 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2014 (Z_packet_to_target_hw_bp_type): New declaration.
2015 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2016 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2017 (Z_PACKET_ACCESS_WP): Delete macros.
2018 (Z_packet_to_hw_type): Delete function.
2019 * i386-low.h: Don't include break-common.h here.
2020 (Z_packet_to_hw_type): Delete declaration.
2021 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2022 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2023 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2024 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2025 * linux-aarch64-low.c: Don't include break-common.h here.
2026 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2027 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2028 (Z_packet_to_target_hw_bp_type): Delete function.
2029 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2030 function.
2031 (mips_insert_point, mips_remove_point): Use
2032 Z_packet_to_target_hw_bp_type.
2033
4ff0d3d8
PA
20342014-05-20 Pedro Alves <palves@redhat.com>
2035
2036 * linux-aarch64-low.c: Include break-common.h.
2037 (enum target_point_type): Delete.
2038 (Z_packet_to_point_type): Rename to ...
2039 (Z_packet_to_target_hw_bp_type): ... this, and return a
2040 target_hw_bp_type instead.
2041 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2042 instead of an enum target_point_type.
2043 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2044 breakpoint type.
2045 (aarch64_dr_state_insert_one_point)
2046 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2047 (aarch64_handle_aligned_watchpoint)
2048 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2049 Take an enum target_hw_bp_type instead of an enum
2050 target_point_type.
2051 (aarch64_supports_z_point_type): New function.
2052 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2053 use Z_packet_to_target_hw_bp_type.
2054
786dc519
JB
20552014-05-20 Joel Brobecker <brobecker@adacore.com>
2056
2057 * configure.ac: Only use -Werror by default when DEVELOPMENT
2058 is true.
2059 * configure: Regenerate.
2060
9e0aa64f
JK
20612014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2062
2063 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2064 * linux-x86-low.c (X86_64_USER_REGS): New.
2065 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2066
2b577b92
YQ
20672014-04-28 Yao Qi <yao@codesourcery.com>
2068
2069 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2070 name.
2071
94611da2
PA
20722014-04-25 Pedro Alves <palves@redhat.com>
2073
2074 PR server/16255
2075 * linux-low.c (linux_attach_fail_reason_string): New function.
2076 (linux_attach_lwp): Delete.
2077 (linux_attach_lwp_1): Rename to ...
2078 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2079 argument. Remove "initial" parameter. Return int instead of
2080 void. Don't error or warn here.
2081 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2082 failure to attach to the tgid. Call warning when failing to
2083 attach to an lwp.
2084 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2085 argument. Remove "initial" parameter. Return int instead of
2086 void. Don't error or warn here.
2087 (linux_attach_fail_reason_string): New declaration.
2088 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2089 interface change. Use linux_attach_fail_reason_string.
2090
01f9f808
MS
20912014-04-24 Michael Sturm <michael.sturm@mintel.com>
2092 Walfred Tedeschi <walfred.tedeschi@intel.com>
2093
2094 * Makefile.in: Added rules to handle new files
2095 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2096 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2097 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2098 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2099 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2100 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2101 x32-avx512-linux.o.
2102 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2103 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2104 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2105 i386/x32-avx512.xml.
2106 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2107 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2108 i386/x32-avx512-linux.xml.
2109 * i387-fp.c (num_avx512_k_registers): New constant for number
2110 of K registers.
2111 (num_avx512_zmmh_low_registers): New constant for number of
2112 lower ZMM registers (0-15).
2113 (num_avx512_zmmh_high_registers): New constant for number of
2114 higher ZMM registers (16-31).
2115 (num_avx512_ymmh_registers): New contant for number of higher
2116 YMM registers (ymm16-31 added by avx521 on x86_64).
2117 (num_avx512_xmm_registers): New constant for number of higher
2118 XMM registers (xmm16-31 added by AVX512 on x86_64).
2119 (struct i387_xsave): Add space for AVX512 registers.
2120 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2121 Add code to handle AVX512 registers.
2122 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2123 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2124 prototypei from generated file.
2125 (tdesc_amd64_avx512_linux): Likewise.
2126 (init_registers_x32_avx512_linux): Likewise.
2127 (tdesc_x32_avx512_linux): Likewise.
2128 (init_registers_i386_avx512_linux): Likewise.
2129 (tdesc_i386_avx512_linux): Likewise.
2130 (x86_64_regmap): Add AVX512 registers.
2131 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2132 mask.
2133 (initialize_low_arch): Add code to initialize AVX512 registers.
2134
51aa91f9
PA
21352014-04-23 Pedro Alves <palves@redhat.com>
2136
2137 * mem-break.c (find_gdb_breakpoint_at): Make static.
2138 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2139
a4165e94
PA
21402014-04-23 Pedro Alves <palves@redhat.com>
2141
2142 * i386-low.c: Don't include break-common.h here.
2143 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2144 prototype to take target_hw_bp_type as argument instead of a Z
2145 packet char.
2146 * i386-low.h: Include break-common.h here.
2147 (Z_packet_to_hw_type): Declare.
2148 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2149 prototypes.
2150 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2151 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2152 (x86_remove_point): Convert the packet number to a
2153 target_hw_bp_type before calling i386_low_remove_watchpoint.
2154 * win32-i386-low.c (i386_insert_point): Convert the packet number
2155 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2156 (i386_remove_point): Convert the packet number to a
2157 target_hw_bp_type before calling i386_low_remove_watchpoint.
2158
b8acf843
PA
21592014-04-23 Pedro Alves <palves@redhat.com>
2160
2161 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2162
d708bcd1
PA
21632014-04-10 Pedro Alves <palves@redhat.com>
2164
2165 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2166 Check if the condition or command is NULL before checking if the
2167 breakpoint is known. On success, return true.
2168 * mem-break.h (add_breakpoint_condition): Document return.
2169 (add_breakpoint_commands): Add describing comment.
2170 * server.c (skip_to_semicolon): New function.
2171 (process_point_options): Use it.
2172
2eec7d5b
PA
21732014-04-09 Pedro Alves <palves@redhat.com>
2174
2175 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2176 to lwpid_of.
2177
fa96cb38
PA
21782014-02-27 Pedro Alves <palves@redhat.com>
2179
2180 PR 12702
2181 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2182 macros.
2183 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2184 output.
2185 (last_thread_of_process_p): Take a PID argument instead of a
2186 thread pointer.
2187 (linux_wait_for_lwp): Delete.
2188 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2189 functions.
2190 (linux_low_filter_event): New function, party factored out from
2191 linux_wait_for_event.
2192 (linux_wait_for_event): Rename to ...
2193 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2194 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2195 sigsuspend. Check for zombie leaders.
2196 (linux_wait_for_event): Reimplement as wrapper around
2197 linux_wait_for_event_filtered.
2198 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2199 a normal or signal exit is seen, it's the whole process exiting.
2200 (wait_for_sigstop): No longer a for_each_inferior callback.
2201 Rewrite on top of linux_wait_for_event_filtered.
2202 (stop_all_lwps): Call wait_for_sigstop directly.
2203 * server.c (resume, handle_target_event): Handle
2204 TARGET_WAITKIND_NO_RESUMED.
2205
d763de10
JB
22062014-02-26 Joel Brobecker <brobecker@adacore.com>
2207
2208 * win32-low.c (psapi_get_dll_name,
2209 * win32_CreateToolhelp32Snapshot): Delete.
2210 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2211 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2212 Delete.
2213 (handle_load_dll): Add function description.
2214 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2215
850a0f76
JB
22162014-02-26 Joel Brobecker <brobecker@adacore.com>
2217
2218 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2219 Add comment.
2220 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2221 base address when calling win32_add_one_solib.
2222 (handle_load_dll): Delete local variable load_addr.
2223 Remove 0x1000 offset applied to DLL base address when calling
2224 win32_add_one_solib.
2225 (handle_unload_dll): Add comment.
2226
f25b3fc3
JB
22272014-02-26 Joel Brobecker <brobecker@adacore.com>
2228
2229 * win32-low.c (win32_add_all_dlls): Renames
2230 win32_ensure_ntdll_loaded. Rewrite function documentation.
2231 Adjust implementation to always load all DLLs.
2232 Add 0x1000 offset to DLL base address when calling
2233 win32_add_one_solib.
2234 (child_initialization_done): New static global.
2235 (do_initial_child_stuff): Set child_initialization_done to
2236 zero during child initialization, and 1 after. Replace call
2237 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2238 Add comment.
2239 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2240 (handle_unload_dll): Add function documentation.
2241 (get_child_debug_event): Ignore load and unload DLL events
2242 during child initialization.
2243
d86d4aaf
DE
22442014-02-20 Doug Evans <dje@google.com>
2245
3bc32da3 2246 Remove global all_lwps.
d86d4aaf
DE
2247 * inferiors.h (ptid_of): Move here from linux-low.h.
2248 (pid_of, lwpid_of): Ditto.
2249 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2250 parameter is a struct thread_info * now.
2251 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2252 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2253 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2254 directly.
2255 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2256 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2257 * linux-arm-low.c (update_registers_callback): Update, "entry"
2258 parameter is a struct thread_info * now.
2259 Fetch lwpid from current_inferior directly.
2260 (arm_insert_point): Pass &all_threads to find_inferior instead of
2261 &all_lwps.
2262 (arm_remove_point): Ditto.
2263 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2264 (arm_prepare_to_resume): Fetch pid from thread.
2265 (arm_read_description): Fetch lwpid from current_inferior directly.
2266 * linux-low.c (all_lwps): Delete.
2267 (delete_lwp): Delete call to remove_inferior.
2268 (handle_extended_wait): Fetch lwpid from thread.
2269 (add_lwp): Don't set lwp->entry.id. Remove call to
2270 add_inferior_to_list.
2271 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2272 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2273 (kill_one_lwp_callback): Ditto.
2274 (linux_kill): Don't dereference NULL pointer.
2275 Fetch ptid,lwpid from thread.
2276 (get_detach_signal): Fetch ptid from thread.
2277 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2278 Simplify call to regcache_invalidate_thread.
2279 (delete_lwp_callback): Update, "entry" parameter is a
2280 struct thread_info * now. Fetch pid from thread.
2281 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2282 (status_pending_p_callback): Update, "entry" parameter is a
2283 struct thread_info * now. Fetch ptid from thread.
2284 (find_lwp_pid): Update, "entry" parameter is a
2285 struct thread_info * now.
2286 (linux_wait_for_lwp): Fetch pid from thread.
2287 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2288 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2289 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2290 (dequeue_one_deferred_signal): Ditto.
2291 (cancel_breakpoint): Fetch ptid from current_inferior.
2292 (linux_wait_for_event): Pass &all_threads to find_inferior,
2293 not &all_lwps. Fetch ptid, lwpid from thread.
2294 (count_events_callback): Update, "entry" parameter is a
2295 struct thread_info * now.
2296 (select_singlestep_lwp_callback): Ditto.
2297 (select_event_lwp_callback): Ditto.
2298 (cancel_breakpoints_callback): Ditto.
2299 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2300 not &all_lwps.
2301 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2302 (unsuspend_one_lwp): Update, "entry" parameter is a
2303 struct thread_info * now.
2304 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2305 not &all_lwps.
2306 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2307 Fetch lwpid from thread, not lwp.
2308 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2309 Pass &all_threads to find_inferior, not &all_lwps.
2310 (send_sigstop): Fetch lwpid from thread, not lwp.
2311 (send_sigstop_callback): Update, "entry" parameter is a
2312 struct thread_info * now.
2313 (suspend_and_send_sigstop_callback): Ditto.
2314 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2315 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2316 struct thread_info * now.
2317 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2318 from thread, lwp.
2319 (lwp_running): Update, "entry" parameter is a
2320 struct thread_info * now.
2321 (stop_all_lwps): Fetch ptid from thread.
2322 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2323 (linux_resume_one_lwp): Fetch lwpid from thread.
2324 (linux_set_resume_request): Update, "entry" parameter is a
2325 struct thread_info * now. Fetch pid, lwpid from thread.
2326 (resume_status_pending_p): Update, "entry" parameter is a
2327 struct thread_info * now.
2328 (need_step_over_p): Ditto. Fetch lwpid from thread.
2329 (start_step_over): Fetch lwpid from thread.
2330 (linux_resume_one_thread): Update, "entry" parameter is a
2331 struct thread_info * now. Fetch lwpid from thread.
2332 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2333 (proceed_one_lwp): Update, "entry" parameter is a
2334 struct thread_info * now. Fetch lwpid from thread.
2335 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2336 struct thread_info * now.
2337 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2338 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2339 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2340 directly.
2341 (regsets_store_inferior_registers): Ditto.
2342 (fetch_register, store_register): Ditto.
2343 (linux_read_memory, linux_write_memory): Ditto.
2344 (linux_request_interrupt): Ditto.
2345 (linux_read_auxv): Ditto.
2346 (linux_xfer_siginfo): Ditto.
2347 (linux_qxfer_spu): Ditto.
2348 (linux_qxfer_libraries_svr4): Ditto.
2349 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2350 moved to inferiors.h.
2351 (get_lwp): Delete.
2352 (get_thread_lwp): Update.
2353 (struct lwp_info): Delete member "entry". Simplify comment for
2354 member "thread".
2355 (all_lwps): Delete.
2356 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2357 current_inferior directly.
2358 (update_watch_registers_callback): Update, "entry" parameter is a
2359 struct thread_info * now. Fetch pid from thread.
2360 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2361 (mips_insert_point): Fetch lwpid from current_inferior.
2362 Pass &all_threads to find_inferior, not &all_lwps.
2363 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2364 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2365 directly.
2366 (mips_stopped_data_address): Ditto.
2367 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2368 directly.
2369 * linux-tile-low.c (tile_arch_setup): Ditto.
2370 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2371 (update_debug_registers_callback): Update, "entry" parameter is a
2372 struct thread_info * now. Fetch pid from thread.
2373 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2374 Pass &all_threads to find_inferior, not &all_lwps.
2375 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2376 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2377 Pass &all_threads to find_inferior, not &all_lwps.
2378 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2379 (i386_dr_low_get_status): Ditto.
2380 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2381 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2382 (x86_linux_read_description): Ditto.
2383 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2384
3b8361aa
DE
23852014-02-20 Doug Evans <dje@google.com>
2386
2387 * inferiors.c (get_first_inferior): Fix buglet.
2388
f7667f0d
DE
23892014-02-19 Doug Evans <dje@google.com>
2390
2391 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2392 * inferiors.c (add_thread): Change result type to struct thread_info *.
2393 All callers updated.
2394 (add_lwp): Call add_thread here instead of in callers.
2395 All callers updated.
2396 * linux-low.h (get_lwp_thread): Rewrite.
2397 (struct lwp_info): New member "thread".
2398
b3312d80
DE
23992014-02-19 Doug Evans <dje@google.com>
2400
2401 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2402 All callers updated.
2403
ecc6f45c
DE
24042014-02-19 Doug Evans <dje@google.com>
2405
2406 * inferiors.c (add_thread): Fix whitespace.
2407
649ebbca
DE
24082014-02-19 Doug Evans <dje@google.com>
2409
2410 * dll.c (clear_dlls): Replace accessing list implemention details
2411 with API function.
2412 * gdbthread.h (get_first_thread): Declare.
2413 * inferiors.c (for_each_inferior_with_data): New function.
2414 (get_first_thread): New function.
2415 (find_thread_ptid): Simplify.
2416 (get_first_inferior): New function.
2417 (clear_list): Delete.
2418 (one_inferior_p): New function.
2419 (clear_inferior_list): New function.
2420 (clear_inferiors): Update.
2421 * inferiors.h (for_each_inferior_with_data): Declare.
2422 (clear_inferior_list): Declare.
2423 (one_inferior_p): Declare.
2424 (get_first_inferior): Declare.
2425 * linux-low.c (linux_wait_for_event): Replace accessing list
2426 implemention details with API function.
2427 * server.c (target_running): Ditto.
2428 (accumulate_file_name_length): New function.
2429 (emit_dll_description): New function.
2430 (handle_qxfer_libraries): Replace accessing list implemention
2431 details with API function.
2432 (handle_qxfer_threads_worker): New function.
2433 (handle_qxfer_threads_proper): Replace accessing list implemention
2434 details with API function.
2435 (handle_query): Ditto.
2436 (visit_actioned_threads_callback_ftype): New typedef.
2437 (visit_actioned_threads_data): New struct.
2438 (visit_actioned_threads): Rewrite to be find_inferior callback.
2439 (resume): Call find_inferior.
2440 (handle_status): Replace accessing list implemention
2441 details with API function.
2442 (process_serial_event): Replace accessing list implemention details
2443 with API function.
2444 * target.c (set_desired_inferior): Replace accessing list implemention
2445 details with API function.
2446 * tracepoint.c (same_process_p): New function.
2447 (gdb_agent_about_to_close): Replace accessing list implemention
2448 details with API function.
2449 * win32-low.c (child_delete_thread): Replace accessing list
2450 implemention details with API function.
2451 (match_dll_by_basename): New function.
2452 (dll_is_loaded_by_basename): New function.
2453 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2454 details call to dll_is_loaded_by_basename.
2455
80894984
DE
24562014-02-19 Doug Evans <dje@google.com>
2457
2458 * dll.h (struct dll_info): Add comment.
2459 * gdbthread.h (struct thread_info): Add comment.
2460 (current_ptid): Simplify.
2461 * inferiors.c (add_process): Update.
2462 (remove_process): Update.
2463 * inferiors.h (struct process_info): Rename member "head" to "entry".
2464 * linux-low.c (delete_lwp): Update.
2465 (add_lwp): Update.
2466 (last_thread_of_process_p): Update.
2467 (kill_one_lwp_callback, linux_kill): Update.
2468 (status_pending_p_callback): Update.
2469 (wait_for_sigstop): Update. Simplify read of ptid.
2470 (start_step_over): Update.
2471 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2472 (get_lwp_thread): Update.
2473 (struct lwp_info): Rename member "head" to "entry".
2474 * regcache.h (inferior_list_entry): Delete.
2475 * server.c (kill_inferior_callback): Update.
2476 (detach_or_kill_inferior_callback): Update.
2477 (print_started_pid): Update.
2478 (print_attached_pid): Update.
2479 (process_serial_event): Simplify read of ptid.
2480 * thread-db.c (thread_db_create_event): Update.
2481 (thread_db_get_tls_address): Update.
2482 * win32-low.c (current_inferior_ptid): Simplify.
2483
46917d26
TT
24842014-02-19 Tom Tromey <tromey@redhat.com>
2485
2486 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2487 argument.
2488 (target_supports_btrace): Update.
2489
0759a81e
YQ
24902014-02-14 Yao Qi <yao@codesourcery.com>
2491
2492 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2493 (rsp-low-ipa.o): New target.
2494
a7191e8b
TT
24952014-02-12 Tom Tromey <tromey@redhat.com>
2496
2497 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2498 convert_ascii_to_int.
2499 * regcache.c (registers_to_string): Likewise.
2500 * remote-utils.c (decode_M_packet): Likewise.
2501 * server.c (process_serial_event): Likewise.
2502
ff0e980e
TT
25032014-02-12 Tom Tromey <tromey@redhat.com>
2504
2505 * server.c (handle_query, handle_v_run): Use hex2bin, not
2506 unhexify.
2507 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2508
e9371aff
TT
25092014-02-12 Tom Tromey <tromey@redhat.com>
2510
2511 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2512 convert_int_to_ascii.
2513 * regcache.c (registers_to_string, collect_register_as_string):
2514 Likewise.
2515 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2516 Likewise.
2517 * server.c (process_serial_event): Likewise.
2518 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2519 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2520
971dc0b8
TT
25212014-02-12 Tom Tromey <tromey@redhat.com>
2522
2523 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2524 bin2hex, not hexify.
2525 * tracepoint.c (cmd_qtstatus): Likewise.
2526
0a822afb
TT
25272014-02-12 Tom Tromey <tromey@redhat.com>
2528
2529 * remote-utils.c (monitor_output): Pass explicit length to
2530 hexify.
2531
9c3d6531
TT
25322014-02-12 Tom Tromey <tromey@redhat.com>
2533
2534 * tracepoint.c: Include rsp-low.h.
2535 * server.c: Include rsp-low.h.
2536 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2537 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2538 declare.
2539 * remote-utils.c: Include rsp-low.h.
2540 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2541 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2542 (convert_int_to_ascii, convert_ascii_to_int): Move to
2543 common/rsp-low.c.
2544 * regcache.c: Include rsp-low.h.
2545 * ax.c: Include rsp-low.h.
2546 * Makefile.in (SFILES): Add common/rsp-low.c.
2547 (OBS): Add rsp-low.o.
2548 (rsp-low.o): New target.
2549
01fd3ea5
TT
25502014-02-12 Tom Tromey <tromey@redhat.com>
2551
2552 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2553 Include print-utils.h.
2554 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2555 (plongest, thirty_two, phex_nz): Remove.
2556 * Makefile.in (SFILES): Add common/print-utils.c.
2557 (OBS): Add print-utils.o.
2558 (print-utils-ipa.o): New target.
2559 (print-utils.o): New target.
2560 (IPA_OBJS): Add print-utils-ipa.o.
2561
e99dc820
TT
25622014-02-06 Tom Tromey <tromey@redhat.com>
2563
2564 * Makefile.in (SFILES): Fix indentation.
2565
ee1e2d4f
DE
25662014-02-05 Doug Evans <dje@google.com>
2567
2568 * linux-low.c (linux_wait_for_event): Improve comment.
2569 (linux_wait_1): Keep current_inferior in sync with event_child.
2570
f5a02773
DE
25712014-01-22 Doug Evans <dje@google.com>
2572
2573 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2574
87ce2a04
DE
25752014-01-22 Doug Evans <dje@google.com>
2576
2577 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2578 * configure: Regenerate.
2579 * config.in: Regenerate.
2580 * Makefile.in (SFILES): Add debug.c.
2581 (OBS): Add debug.o.
2582 * debug.c: New file.
2583 * debug.h: New file.
2584 * linux-aarch64-low.c (*): Update all debugging printfs to use
2585 debug_printf instead of fprintf.
2586 * linux-arm-low.c (*): Ditto.
2587 * linux-cris-low.c (*): Ditto.
2588 * linux-crisv32-low.c (*): Ditto.
2589 * linux-m32r-low.c (*): Ditto.
2590 * linux-sparc-low.c (*): Ditto.
2591 * linux-x86.c (*): Ditto.
2592 * linux-low.c (*): Ditto.
2593 (linux_wait_1): Add calls to debug_enter, debug_exit.
2594 (linux_wait): Remove redundant debugging printf.
2595 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2596 (linux_resume, unstop_all_lwps): Ditto.
2597 * mem-break.c (*): Update all debugging printfs to use
2598 debug_printf instead of fprintf.
2599 * remote-utils.c (*): Ditto.
2600 * thread-db.c (*): Ditto.
2601 * server.c #include <ctype.h>, "gdb_vecs.h".
2602 (debug_threads): Moved to debug.c.
2603 (*): Update all debugging printfs to use debug_printf instead of
2604 fprintf.
2605 (start_inferior): Replace call to fflush with call to debug_flush.
2606 (monitor_show_help): Mention set debug-format.
2607 (parse_debug_format_options): New function.
2608 (handle_monitor_command): Handle "monitor set debug-format".
2609 (gdbserver_usage): Mention --debug-format.
2610 (main): Parse --debug-format.
2611 * server.h (debug_threads): Declaration moved to debug.h.
2612 #include "debug.h".
2613 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2614 trace_debug_1 that uses debug_printf.
2615 (tracepoint_look_up_symbols): Update all debugging printfs to use
2616 debug_printf instead of fprintf.
2617
e671835b
BS
26182014-01-20 Baruch Siach <baruch@tkos.co.il>
2619
2620 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2621 sys/ptrace.h.
2622
b5737fa9
PA
26232014-01-17 Pedro Alves <palves@redhat.com>
2624
ea38d2a9 2625 PR build/16445
c7faa97a
PA
2626 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2627 defined after including gdb_proc_service.h.
b5737fa9 2628
40ed484e
DE
26292014-01-16 Doug Evans <dje@google.com>
2630
2631 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2632 (match_dll): Use it.
2633
969c39fb
MM
26342014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2635
2636 * target.h (target_ops) <read_btrace>: Change parameters and
2637 return type to allow error reporting.
2638 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2639 trace reading errors on.
2640 * linux-low.c (linux_low_read_btrace): Pass trace reading
2641 errors on.
2642 (linux_low_disable_btrace): New.
2643
ab7f45ba
DE
26442014-01-15 Doug Evans <dje@google.com>
2645
2646 * inferiors.c (thread_id_to_gdb_id): Delete.
2647 * inferiors.h (thread_id_to_gdb_id): Delete.
2648
66af0f44
EZ
26492014-01-13 Eli Zaretskii <eliz@gnu.org>
2650
2651 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2652 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2653 versions.
2654
9939e131
PA
26552014-01-08 Pedro Alves <palves@redhat.com>
2656
2657 * server.c (handle_status): Don't discard previous queued stop
2658 replies or thread's pending status here.
2659 (main) <disconnection>: Do it here instead.
2660
b7ea362b
PA
26612014-01-08 Pedro Alves <palves@redhat.com>
2662
2663 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2664 * server.c (visit_actioned_threads, handle_pending_status): New
2665 function.
2666 (handle_v_cont): Factor out parts to ...
2667 (resume): ... this new function. If in all-stop, and a thread
2668 being resumed has a pending status, report it without actually
2669 resuming.
2670 (myresume): Adjust to use the new 'resume' function.
2671 (clear_pending_status_callback, set_pending_status_callback)
2672 (find_status_pending_thread_callback): New functions.
2673 (handle_status): Handle the case of multiple threads having
2674 interesting statuses to report. Report threads' real last signal
2675 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2676 with an interesting thread to report the status for, instead of
2677 always reporting the status of the first thread.
2678
28498c42
JB
26792014-01-01 Joel Brobecker <brobecker@adacore.com>
2680
2681 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2682 * gdbreplay.c (gdbreplay_version): Likewise.
2683
f45c82da
YZ
26842013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2685
2686 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2687 iov.iov_len with the real length in use.
2688
379a5e2d
JB
26892013-12-13 Joel Brobecker <brobecker@adacore.com>
2690
2691 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2692 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2693 for all targets that use win32-low.c.
2694 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2695 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2696
4210d83e
PA
26972013-12-13 Pedro Alves <palves@redhat.com>
2698
2699 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2700 if equal to TARGET_WAITKIND_LOADED.
2701 * win32-low.c (cached_status): New static global.
2702 (win32_wait): Add declaration.
2703 (do_initial_child_stuff): Flush all initial pending debug events
2704 up to the initial breakpoint.
2705 (win32_wait): If CACHED_STATUS was set, return that instead
2706 of doing a real wait. Remove the code resuming the execution
2707 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2708 during the initial phase. Also remove the code changing
2709 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2710 TARGET_WAITKIND_STOPPED.
2711
e7f0d979
YQ
27122013-12-11 Yao Qi <yao@codesourcery.com>
2713
2714 * notif.c (handle_notif_ack): Return 0 if no notification
2715 matches.
2716
ebcf782c
DE
27172013-11-20 Doug Evans <dje@google.com>
2718
2719 * linux-low.c (linux_set_resume_request): Fix comment.
2720
20ad9378
DE
27212013-11-20 Doug Evans <dje@google.com>
2722
2723 * linux-low.c (resume_status_pending_p): Tweak comment.
2724
a196ebeb
WT
27252013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2726
2727 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2728 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2729 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2730 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2731 (srv_amd64_regobj): Add amd64-mpx.o.
2732 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2733 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2734 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2735 * i387-fp.c (num_pl_bnd_register) Added constant.
2736 (num_pl_bnd_cfg_registers) Added constant.
2737 (struct i387_xsave) Added reserved area and MPX fields.
2738 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2739 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2740 function.
2741 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2742 (init_registers_amd64_mpx_linux): Declare new function.
2743 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2744 (x86_64_regmap): Add MPX registers.
2745 (x86_linux_read_description): Add MPX case.
2746 (initialize_low_arch): Initialize MPX targets.
2747
0080a2f6
TT
27482013-11-18 Tom Tromey <tromey@redhat.com>
2749
2750 * configure: Rebuild.
2751 * configure.ac: Don't check for stdlib.h.
2752 * gdbreplay.c: Unconditionally include stdlib.h.
2753
2978b111
TT
27542013-11-18 Tom Tromey <tromey@redhat.com>
2755
2756 * config.in: Rebuild.
2757 * configure: Rebuild.
2758 * configure.ac: Don't use AC_HEADER_DIRENT.
2759
a3d08894
TT
27602013-11-18 Tom Tromey <tromey@redhat.com>
2761
2762 * server.h: Don't check HAVE_STRING_H.
2763 * gdbreplay.c: Don't check HAVE_STRING_H.
2764 * configure: Rebuild.
2765
0a5dd17d
TT
27662013-11-18 Tom Tromey <tromey@redhat.com>
2767
2768 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2769 LIBGNU.
2770
1bd2f0ba
TT
27712013-11-08 Tom Tromey <tromey@redhat.com>
2772
2773 * configure, config.in: Rebuild.
2774 * configure.ac: Remove unused configury.
2775
3266f10b
TT
27762013-11-08 Tom Tromey <tromey@redhat.com>
2777
2778 * acinclude.m4: Include common.m4, codeset.m4.
2779 * configure, config.in: Rebuild.
2780 * configure.ac: Use GDB_AC_COMMON.
2781
6682d959
AA
27822013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2783
2784 * linux-s390-low.c (HWCAP_S390_TE): New define.
2785 (s390_arch_setup): Consider the TE field in the HWCAP for
2786 determining 'have_regset_tdb'.
2787
fd0a4d76
SDJ
27882013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2789
2790 PR gdb/16014
2791 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2792 call to sizeof.
2793
1a3d890b
PA
27942013-10-02 Pedro Alves <palves@redhat.com>
2795
2796 * server.c (process_serial_event): Don't output "GDBserver
2797 exiting" if GDB is connected through stdio.
2798 * target.c (mywait): Likewise, be silent if GDB is connected
2799 through stdio.
2800
97ad4581
JB
28012013-10-01 Joel Brobecker <brobecker@adacore.com>
2802
2803 * lynx-low.c (lynx_add_threads_after_attach): New function.
2804 (lynx_attach): Remove call to add_thread. Add call to
2805 lynx_add_threads_after_attach instead.
2806
5b4e221c
MF
28072013-09-28 Mike Frysinger <vapier@gentoo.org>
2808
2809 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2810 * config.in, configure: Regenerated.
2811
ee47b2f8
YQ
28122013-09-18 Yao Qi <yao@codesourcery.com>
2813
2814 PR server/15959
2815 * server.c (start_inferior): Clear 'resume_info'.
2816
d6707650 28172013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2818
d6707650
JW
2819 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2820 for each register.
2821
9243dd0e 28222013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2823
9243dd0e
JW
2824 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2825 linux-tile-low.o to srv_tgtobj.
2826
c623a6ef
WN
28272013-09-16 Will Newton <will.newton@linaro.org>
2828
2829 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2830 out regs.
2831
fb71d39e
PA
28322013-09-06 Pedro Alves <palves@redhat.com>
2833
2834 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2835 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2836 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2837 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2838 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2839 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2840
8e7e9910
PA
28412013-09-06 Pedro Alves <palves@redhat.com>
2842
2843 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2844 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2845
7c3a12ca
PA
28462013-09-06 Pedro Alves <palves@redhat.com>
2847
2848 * linux-amd64-ipa.c: Include tracepoint.h.
2849 * linux-i386-ipa.c: Include tracepoint.h.
2850
8eb3d7b6
RW
28512013-09-06 Ricard Wanderlof <ricardw@axis.com>
2852
2853 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2854 (ps_get_thread_area): New function.
2855
eddddb9d
RW
28562013-09-06 Ricard Wanderlof <ricardw@axis.com>
2857
2858 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2859 (initialize_low_arch): Call init_registers_crisv32 rather than
2860 init_register_crisv32.
2861
533b0600
PA
28622013-09-05 Pedro Alves <palves@redhat.com>
2863
2864 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2865 to ...
2866 * hostio.h: ... this new file.
2867 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2868 win32-low.c: Include hostio.h.
2869
0ce3d3b5
PA
28702013-09-05 Pedro Alves <palves@redhat.com>
2871
2872 * server.h (gdb_client_data, handler_func, callback_handler_func)
2873 (delete_file_handler, add_file_handler, append_callback_event)
2874 (delete_callback_event, start_event_loop, initialize_event_loop):
2875 Move to event-loop.h and include it.
2876 * event-loop.h: New file.
2877
799cdc37
PA
28782013-09-05 Pedro Alves <palves@redhat.com>
2879
2880 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2881 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2882 (loaded_dll, unloaded_dll): Move to ...
2883 * dll.h: ... this new file.
2884 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2885
6a6bbd9d
PA
28862013-09-05 Pedro Alves <palves@redhat.com>
2887
2888 * server.h (current_process, get_thread_process, all_processes)
2889 (add_inferior_to_list, for_each_inferior, current_inferior)
2890 (remove_inferior, add_process, remove_process, find_process_pid)
2891 (have_started_inferiors_p, have_attached_inferiors_p)
2892 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2893 (clear_inferiors, find_inferior, find_inferior_id)
2894 (inferior_target_data, set_inferior_target_data)
2895 (inferior_regcache_data, set_inferior_regcache_data): Move to
2896 inferiors.h, and include it.
2897 * inferiors.h: New file.
2898
f699aaba
PA
28992013-09-05 Pedro Alves <palves@redhat.com>
2900
2901 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2902 Move ...
72f4393d 2903 * ax.h: ... here.
f699aaba 2904
c144c7a0
PA
29052013-09-05 Pedro Alves <palves@redhat.com>
2906
2907 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2908 tracepoint.h.
2909 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2910 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2911 (handle_tracepoint_general_set, handle_tracepoint_query)
2912 (tracepoint_finished_step, tracepoint_was_hit)
2913 (release_while_stepping_state_list, current_traceframe)
2914 (in_readonly_region, traceframe_read_mem)
2915 (fetch_traceframe_registers, traceframe_read_sdata)
2916 (traceframe_read_info, struct fast_tpoint_collect_status)
2917 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2918 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2919 (supply_fast_tracepoint_registers)
2920 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2921 (ipa_tdesc, claim_trampoline_space)
2922 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2923 (agent_mem_read, agent_get_trace_state_variable_value)
2924 (agent_set_trace_state_variable_value, agent_tsv_read)
2925 (agent_mem_read_string, get_raw_reg_func_addr)
2926 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2927 * tracepoint.h: ... this new file.
2928
ff42e6ab
PA
29292013-09-05 Pedro Alves <palves@redhat.com>
2930
2931 * server.h (perror_with_name, error, fatal, warning, paddress)
2932 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2933 include it.
2934 * utils.h: New file.
2935
541af0f4
PA
29362013-09-05 Pedro Alves <palves@redhat.com>
2937
2938 * server.h (remote_debug, noack_mode, transport_is_reliable)
2939 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2940 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2941 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2942 (write_enn, initialize_async_io, enable_async_io)
2943 (disable_async_io, check_remote_input_interrupt_request)
2944 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2945 (dead_thread_notify, prepare_resume_reply)
2946 (decode_address_to_semicolon, decode_address, decode_m_packet)
2947 (decode_M_packet, decode_X_packet, decode_xfer_write)
2948 (decode_search_memory_packet, unhexify, hexify)
2949 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2950 (look_up_one_symbol, relocate_instruction)
2951 (monitor_output): Move to remote-utils.h, and include it.
2952 * remote-utils.h: New file.
2953
eebdf26b
PA
29542013-09-05 Pedro Alves <palves@redhat.com>
2955
2956 * server.h (_): Delete.
2957
3aafd2ff
PA
29582013-09-02 Pedro Alves <palves@redhat.com>
2959
2960 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2961 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2962 allocated.
2963 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2964
cee83bcb
PM
29652013-09-02 Pierre Muller <muller@sourceware.org>
2966
2967 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2968 or WriteProcessMemory complete successfully and handle
2969 ERROR_PARTIAL_COPY error.
2970
9a13b2fa
PA
29712013-09-02 Pedro Alves <palves@redhat.com>
2972
2973 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2974 error instead of EIO.
2975
602e3198
JK
29762013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2977
2978 PR server/15604
2979 * linux-low.c: Include filestuff.h.
2980 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2981 * lynx-low.c: Include filestuff.h.
2982 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2983 * server.c: Include filestuff.h.
2984 (main): Call notice_open_fds.
2985 * spu-low.c: Include filestuff.h.
2986 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2987
96d7229d
LM
29882013-08-22 Luis Machado <lgustavo@codesourcery.com>
2989
2990 * Makefile.in: Explain why ../target and ../nat are not
2991 listed as include file search paths.
2992 (linux-waitpid.o): New object file rule.
2993 * configure.srv (srv_native_linux_obj): New variable.
2994 Replace all occurrences of linux native object files with
2995 $srv_native_linux_obj.
2996 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2997 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2998 (linux_enable_event_reporting): Remove declaration.
2999 (my_waitpid): Moved to common/linux-waitpid.c.
3000 (linux_wait_for_event): Pass ptid when calling
3001 linux_enable_event_reporting.
3002 (linux_supports_tracefork_flag): Remove.
3003 (linux_enable_event_reporting): Likewise.
3004 (linux_tracefork_grandchild): Remove.
3005 (STACK_SIZE): Moved to common/linux-ptrace.c.
3006 (linux_tracefork_child): Remove.
3007 (linux_test_for_tracefork): Remove.
3008 (linux_look_up_symbols): Call linux_supports_traceclone.
3009 (initialize_low): Remove call to linux_test_for_tracefork.
3010 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3011 common/linux-ptrace.h.
3012 (PTRACE_TYPE_ARG4): Likewise.
3013 Include linux-ptrace.h.
3014
32940073
PA
30152013-08-21 Pedro Alves <palves@redhat.com>
3016
3017 * config.in: Renegerate.
3018
33b60d58 30192013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3020
33b60d58
LM
3021 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3022 (SFILES): Remove $(srcdir)/common/target-common.c and
3023 add $(srcdir)/target/waitstatus.c.
3024 (OBS): Remove target-common.o and add waitstatus.o.
3025 (server_h): Remove $(srcdir)/../common/target-common.h and
3026 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3027 and $(srcdir)/../target/waitstatus.h.
3028 (target-common.o): Remove.
3029 (waitstatus.o): New target object file.
3030 * target.h: Do not include target-common.h and
3031 include target/resume.h, target/wait.h and
3032 target/waitstatus.h.
3033
b8e1b30e
LM
30342013-08-13 Luis Machado <lgustavo@codesourcery.com>
3035
3036 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3037 to PTRACE_TYPE_ARG3.
3038 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3039 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3040 PTRACE_TYPE_ARG4.
3041 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3042 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3043
7a60ad40
YQ
30442013-07-27 Jie Zhang <jie@codesourcery.com>
3045 Daniel Jacobowitz <dan@codesourcery.com>
3046 Yao Qi <yao@codesourcery.com>
3047
3048 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3049 (mips-linux-watch.o): New rule.
3050 (mips_linux_watch_h): New variable.
3051 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3052 srv_tgtobj.
3053 * linux-mips-low.c: Include mips-linux-watch.h.
3054 (struct arch_process_info, struct arch_lwp_info): New.
3055 (update_watch_registers_callback): New function.
3056 (mips_linux_new_process, mips_linux_new_thread) New functions.
3057 (mips_linux_prepare_to_resume, mips_insert_point): New
3058 functions.
3059 (mips_remove_point, mips_stopped_by_watchpoint): New
3060 functions.
3061 (rsp_bp_type_to_target_hw_bp_type): New function.
3062 (mips_stopped_data_address): New function.
3063 (the_low_target): Add watchpoint support functions.
3064
de6f69ad
YQ
30652013-07-27 Yao Qi <yao@codesourcery.com>
3066
3067 * i386-low.c: Include break-common.h.
3068 (enum target_hw_bp_type): Remove.
3069
3360c0bf
LM
30702013-07-24 Luis Machado <lgustavo@codesourcery.com>
3071
3072 * Makefile.in (SFILES): /common/target-common.c.
3073 (OBS): Add target-common.o.
3074 (server_h): Add $(srcdir)/../common/target-common.h.
3075 (target-common.o): New target.
3076 * server.c (queue_stop_reply_callback): Free
3077 status string after use.
3078 * target.c (target_waitstatus_to_string): Remove.
3079 * target.h: Include target-common.h.
3080 (resume_kind): Likewise.
3081 (target_waitkind): Likewise.
3082 (target_waitstatus): Likewise.
3083 (TARGET_WNOHANG): Likewise.
3084
bd885420
YQ
30852013-07-04 Yao Qi <yao@codesourcery.com>
3086
3087 * Makefile.in (host_alias): Use @host_noncanonical@.
3088 (target_alias): Use @target_noncanonical@.
3089 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3090 ACX_NONCANONICAL_HOST.
3091 * configure: Regenerated.
3092
3093 Revert:
3094 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3095
3096 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3097 * configure: Rebuild.
3098 * Makefile.in (version_host, version_target): Get from configure.
3099 (version.c): Use $(version_host) and $(version_target).
3100
17ef446e
PA
31012013-07-03 Pedro Alves <palves@redhat.com>
3102
3103 * Makefile.in (config.status): Depend on development.sh.
3104 * acinclude.m4: Include libmcheck.m4.
3105 * configure: Regenerate.
3106
7a9a7487
MG
31072013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3108
3109 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3110 attribute inside the parentheses.
3111 (winapi_DebugSetProcessKillOnExit): Ditto.
3112 (winapi_DebugBreakProcess): Ditto.
3113 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3114
49b64de6
MG
31152013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3116
3117 * notif.h (notif_event): Add a dummy member to avoid compiler
3118 errors.
3119
d5749ee7
PA
31202013-07-01 Pedro Alves <palves@redhat.com>
3121
3122 * hostio.c (HOSTIO_PATH_MAX): Define.
3123 (require_filename, handle_open, handle_unlink, handle_readlink):
3124 Use it.
3125
d8d2a3ee
PA
31262013-07-01 Pedro Alves <palves@redhat.com>
3127
3128 * server.h: Include "pathmax.h".
3129 * linux-low.c: Don't include sys/param.h.
3130 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3131 MAXPATHLEN.
3132 * win32-low.c: Don't include sys/param.h.
3133 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3134
bc7dea8d
PA
31352013-07-01 Pedro Alves <palves@redhat.com>
3136
3137 * event-loop.c: Don't check HAVE_UNISTD_H before including
3138 <unistd.h>.
3139 * gdbreplay.c: Likewise.
3140 * remote-utils.c: Likewise.
3141 * server.c: Likewise.
3142 * configure.ac: Don't check for unistd.h.
3143 * configure: Regenerate.
3144
d6c2da54
TT
31452013-06-28 Tom Tromey <tromey@redhat.com>
3146
3147 * Makefile.in (version.c): Use version.in, not
3148 common/version.in.
3149
257b6bec
MG
31502013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3151
3152 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3153 * configure: Rebuild.
3154 * Makefile.in (version_host, version_target): Get from configure.
3155 (version.c): Use $(version_host) and $(version_target).
3156
86ebe149
DK
31572013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3158
3159 Fix trace-status to output user name without trailing colon.
3160 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3161
f30aa5af
DK
31622013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3163
3164 Fix trace-status to output proper start-time and stop-time.
3165 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3166 output start time and stop time in hex as gdb expects.
3167
28a93511
YQ
31682013-06-26 Pedro Alves <pedro@codesourcery.com>
3169
3170 * tracepoint.c (build_traceframe_info_xml): Output trace state
3171 variables present in the trace buffer.
3172
01208463
TT
31732013-06-24 Tom Tromey <tromey@redhat.com>
3174
3175 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3176 create-version.sh.
3177 (version.o): Remove.
3178 * gdbreplay.c: Include version.h.
3179 (version, host_name): Don't declare.
3180 * server.h: Include version.h.
3181 (version, host_name): Don't declare.
3182
760256f9
PA
31832013-06-12 Pedro Alves <palves@redhat.com>
3184
3185 * linux-x86-low.c (linux_is_elf64): Delete global.
3186 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3187 with local linux_pid_exe_is_elf_64_file use.
3188
030031ee
PA
31892013-06-11 Pedro Alves <palves@redhat.com>
3190
3191 * linux-low.c (regset_disabled, disable_regset): New functions.
3192 (regsets_fetch_inferior_registers)
3193 (regsets_store_inferior_registers): Use them.
3194 (initialize_regsets_info); Don't allocate the disabled_regsets
3195 array here.
3196 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3197 comment.
3198
5da6eb0a
PA
31992013-06-11 Pedro Alves <palves@redhat.com>
3200
3201 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3202 xmalloc.
3203
7e5aaa09
PA
32042013-06-11 Pedro Alves <palves@redhat.com>
3205
3206 * linux-x86-low.c (initialize_low_arch): Call
3207 init_registers_x32_avx_linux.
3208
d878444c
JK
32092013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3210
3211 Fix compatibility with Android Bionic.
3212 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3213 it is not empty.
3214
3aee8918
PA
32152013-06-07 Pedro Alves <palves@redhat.com>
3216
5f2b57b5 3217 PR server/14823
3aee8918
PA
3218 * Makefile.in (OBS): Add tdesc.o.
3219 (IPA_OBJS): Add tdesc-ipa.o.
3220 (tdesc-ipa.o): New rule.
3221 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3222 interface.
3223 * linux-low.c (new_inferior): Delete.
3224 (disabled_regsets, num_regsets): Delete.
3225 (linux_add_process): Adjust to set the new per-process
3226 new_inferior flag.
3227 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3228 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3229 was a stop. When calling arch_setup, switch the current inferior
3230 to the thread that got an event.
3231 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3232 (regsets_fetch_inferior_registers)
3233 (regsets_store_inferior_registers): New regsets_info parameter.
3234 Adjust to use it.
3235 (linux_register_in_regsets): New regs_info parameter. Adjust to
3236 use it.
3237 (register_addr, fetch_register, store_register): New usrregs_info
3238 parameter. Adjust to use it.
3239 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3240 parameter regs_info. Adjust to use it.
3241 (linux_fetch_registers): Get the current inferior's regs_info, and
3242 adjust to use it.
3243 (linux_store_registers): Ditto.
3244 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3245 (initialize_low): Don't initialize the target_regsets here. Call
3246 initialize_low_arch.
3247 * linux-low.h (target_regsets): Delete declaration.
3248 (struct regsets_info): New.
3249 (struct usrregs_info): New.
3250 (struct regs_info): New.
3251 (struct process_info_private) <new_inferior>: New field.
3252 (struct linux_target_ops): Delete the num_regs, regmap, and
3253 regset_bitmap fields. New field regs_info.
3254 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3255 * i387-fp.c (num_xmm_registers): Delete.
3256 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3257 calls to new interface.
3258 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3259 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3260 Infer the number of xmm registers from the regcache's target
3261 description.
3262 * i387-fp.h (num_xmm_registers): Delete.
3263 * inferiors.c (add_thread): Don't install the thread's regcache
3264 here.
3265 * proc-service.c (gregset_info): Fetch the current inferior's
3266 regs_info. Adjust to use it.
3267 * regcache.c: Include tdesc.h.
3268 (register_bytes, reg_defs, num_registers)
3269 (gdbserver_expedite_regs): Delete.
3270 (get_thread_regcache): If the thread doesn't have a regcache yet,
3271 create one, instead of aborting gdbserver.
3272 (regcache_invalidate_one): Rename to ...
3273 (regcache_invalidate_thread): ... this.
3274 (regcache_invalidate_one): New.
3275 (regcache_invalidate): Only invalidate registers of the current
3276 process.
3277 (init_register_cache): Add target_desc parameter, and use it.
3278 (new_register_cache): Ditto. Assert the target description has a
3279 non zero registers_size.
3280 (regcache_cpy): Add assertions. Adjust.
3281 (realloc_register_cache, set_register_cache): Delete.
3282 (registers_to_string, registers_from_string): Adjust.
3283 (find_register_by_name, find_regno, find_register_by_number)
3284 (register_cache_size): Add target_desc parameter, and use it.
3285 (free_register_cache_thread, free_register_cache_thread_one)
3286 (regcache_release, register_cache_size): New.
3287 (register_size): Add target_desc parameter, and use it.
3288 (register_data, supply_register, supply_register_zeroed)
3289 (supply_regblock, supply_register_by_name, collect_register)
3290 (collect_register_as_string, collect_register_by_name): Adjust.
3291 * regcache.h (struct target_desc): Forward declare.
3292 (struct regcache) <tdesc>: New field.
3293 (init_register_cache, new_register_cache): Add target_desc
3294 parameter.
3295 (regcache_invalidate_thread): Declare.
3296 (regcache_invalidate_one): Delete declaration.
3297 (regcache_release): Declare.
3298 (find_register_by_number, register_cache_size, register_size)
3299 (find_regno): Add target_desc parameter.
3300 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3301 declarations.
3302 * remote-utils.c: Include tdesc.h.
3303 (outreg, prepare_resume_reply): Adjust.
3304 * server.c: Include tdesc.h.
3305 (gdbserver_xmltarget): Delete declaration.
3306 (get_features_xml, process_serial_event): Adjust.
3307 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3308 declare.
3309 (struct process_info) <tdesc>: New field.
3310 (ipa_tdesc): Declare.
3311 * tdesc.c: New file.
3312 * tdesc.h: New file.
3313 * tracepoint.c: Include tdesc.h.
3314 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3315 (get_context_regcache): Adjust to pass ipa_tdesc down.
3316 (do_action_at_tracepoint): Adjust to get the register cache size
3317 from the context regcache's description.
3318 (traceframe_walk_blocks): Adjust to get the register cache size
3319 from the current trace frame's description.
3320 (traceframe_get_pc): Adjust to get current trace frame's
3321 description and pass it down.
3322 (gdb_collect): Adjust to get the register cache size from the
3323 IPA's description.
3324 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3325 (gdbserver_xmltarget): Delete.
3326 (initialize_low_tracepoint): Set the ipa's target description.
3327 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3328 (initialize_low_tracepoint): Set the ipa's target description.
3329 * linux-x86-low.c: Include tdesc.h.
3330 [__x86_64__] (is_64bit_tdesc): New.
3331 (ps_get_thread_area, x86_get_thread_area): Use it.
3332 (i386_cannot_store_register): Rename to ...
3333 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3334 (i386_cannot_fetch_register): Rename to ...
3335 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3336 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3337 to new interface.
3338 (target_regsets): Rename to ...
3339 (x86_regsets): ... this.
3340 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3341 interface.
3342 (x86_siginfo_fixup): Use is_64bit_tdesc.
3343 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3344 (tdesc_x32_avx_linux, tdesc_x32_linux)
3345 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3346 Declare.
3347 (x86_linux_update_xmltarget): Delete.
3348 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3349 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3350 (AMD64_LINUX_USER64_CS): New.
3351 (x86_linux_read_description): New, based on
3352 x86_linux_update_xmltarget.
3353 (same_process_callback): New.
3354 (x86_arch_setup_process_callback): New.
3355 (x86_linux_update_xmltarget): New.
3356 (x86_regsets_info): New.
3357 (amd64_linux_regs_info): New.
3358 (i386_linux_usrregs_info): New.
3359 (i386_linux_regs_info): New.
3360 (x86_linux_regs_info): New.
3361 (x86_arch_setup): Reimplement.
3362 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3363 (x86_emit_ops): Ditto.
3364 (the_low_target): Adjust. Install x86_linux_regs_info,
3365 x86_cannot_fetch_register, and x86_cannot_store_register.
3366 (initialize_low_arch): New.
3367 * linux-ia64-low.c (tdesc_ia64): Declare.
3368 (ia64_fetch_register): Adjust.
3369 (ia64_usrregs_info, regs_info): New globals.
3370 (ia64_regs_info): New function.
3371 (the_low_target): Adjust.
3372 (initialize_low_arch): New function.
3373 * linux-sparc-low.c (tdesc_sparc64): Declare.
3374 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3375 Adjust.
3376 (sparc_arch_setup): New function.
3377 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3378 (the_low_target): Adjust.
3379 (initialize_low_arch): New function.
3380 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3381 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3382 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3383 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3384 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3385 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3386 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3387 (tdesc_powerpc_isa205_vsx64l): Declare.
3388 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3389 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3390 (ppc_set_pc, ppc_get_hwcap): Adjust.
3391 (ppc_usrregs_info): Forward declare.
3392 (!__powerpc64__) ppc_regmap_adjusted: New global.
3393 (ppc_arch_setup): Adjust to the current process'es target
3394 description.
3395 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3396 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3397 (ppc_store_evrregset): Adjust.
3398 (target_regsets): Rename to ...
3399 (ppc_regsets): ... this, and make static.
3400 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3401 (ppc_regs_info): New function.
3402 (the_low_target): Adjust.
3403 (initialize_low_arch): New function.
3404 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3405 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3406 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3407 (tdesc_s390x_linux64v2): Declare.
3408 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3409 (s390_fill_gregset, s390_store_last_break): Adjust.
3410 (target_regsets): Rename to ...
3411 (s390_regsets): ... this, and make static.
3412 (s390_get_pc, s390_set_pc): Adjust.
3413 (s390_get_hwcap): New target_desc parameter, and use it.
3414 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3415 (s390_arch_setup): Adjust to set the current process'es target
3416 description. Don't adjust the regmap.
3417 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3418 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3419 (regs_info_3264): New globals.
3420 (s390_regs_info): New function.
3421 (the_low_target): Adjust.
3422 (initialize_low_arch): New function.
3423 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3424 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3425 [__mips64] (init_registers_mips_linux)
3426 (init_registers_mips_dsp_linux): Delete defines.
3427 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3428 (have_dsp): New global.
3429 (mips_read_description): New, based on mips_arch_setup.
3430 (mips_arch_setup): Reimplement.
3431 (get_usrregs_info): New function.
3432 (mips_cannot_fetch_register, mips_cannot_store_register)
3433 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3434 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3435 (target_regsets): Rename to ...
3436 (mips_regsets): ... this, and make static.
3437 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3438 (dsp_regs_info, regs_info): New globals.
3439 (mips_regs_info): New function.
3440 (the_low_target): Adjust.
3441 (initialize_low_arch): New function.
3442 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3443 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3444 Declare.
3445 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3446 (arm_read_description): New, with bits factored from
3447 arm_arch_setup.
3448 (arm_arch_setup): Reimplement.
3449 (target_regsets): Rename to ...
3450 (arm_regsets): ... this, and make static.
3451 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3452 (arm_regs_info): New function.
3453 (the_low_target): Adjust.
3454 (initialize_low_arch): New function.
3455 * linux-m68k-low.c (tdesc_m68k): Declare.
3456 (target_regsets): Rename to ...
3457 (m68k_regsets): ... this, and make static.
3458 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3459 (m68k_regs_info): New function.
3460 (m68k_arch_setup): New function.
3461 (the_low_target): Adjust.
3462 (initialize_low_arch): New function.
3463 * linux-sh-low.c (tdesc_sharch): Declare.
3464 (target_regsets): Rename to ...
3465 (sh_regsets): ... this, and make static.
3466 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3467 (sh_regs_info, sh_arch_setup): New functions.
3468 (the_low_target): Adjust.
3469 (initialize_low_arch): New function.
3470 * linux-bfin-low.c (tdesc_bfin): Declare.
3471 (bfin_arch_setup): New function.
3472 (bfin_usrregs_info, regs_info): New globals.
3473 (bfin_regs_info): New function.
3474 (the_low_target): Adjust.
3475 (initialize_low_arch): New function.
3476 * linux-cris-low.c (tdesc_cris): Declare.
3477 (cris_arch_setup): New function.
3478 (cris_usrregs_info, regs_info): New globals.
3479 (cris_regs_info): New function.
3480 (the_low_target): Adjust.
3481 (initialize_low_arch): New function.
3482 * linux-cris-low.c (tdesc_crisv32): Declare.
3483 (cris_arch_setup): New function.
3484 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3485 (cris_regs_info): New function.
3486 (the_low_target): Adjust.
3487 (initialize_low_arch): New function.
3488 * linux-m32r-low.c (tdesc_m32r): Declare.
3489 (m32r_arch_setup): New function.
3490 (m32r_usrregs_info, regs_info): New globals.
3491 (m32r_regs_info): Adjust.
3492 (initialize_low_arch): New function.
3493 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3494 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3495 (tic6x_usrregs_info): Forward declare.
3496 (tic6x_read_description): New function, based on ...
3497 (tic6x_arch_setup): ... this. Reimplement.
3498 (target_regsets): Rename to ...
3499 (tic6x_regsets): ... this, and make static.
3500 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3501 (tic6x_regs_info): New function.
3502 (the_low_target): Adjust.
3503 (initialize_low_arch): New function.
3504 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3505 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3506 (target_regsets): Rename to ...
3507 (xtensa_regsets): ... this, and make static.
3508 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3509 globals.
3510 (xtensa_arch_setup, xtensa_regs_info): New functions.
3511 (the_low_target): Adjust.
3512 (initialize_low_arch): New function.
3513 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3514 (nios2_arch_setup): Set the current process'es tdesc.
3515 (target_regsets): Rename to ...
3516 (nios2_regsets): ... this.
3517 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3518 (nios2_regs_info): New function.
3519 (the_low_target): Adjust.
3520 (initialize_low_arch): New function.
a261b8f5
PA
3521 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3522 (aarch64_arch_setup): Set the current process'es tdesc.
3523 (target_regsets): Rename to ...
3524 (aarch64_regsets): ... this.
3525 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3526 (aarch64_regs_info): New function.
3527 (the_low_target): Adjust.
3528 (initialize_low_arch): New function.
3aee8918
PA
3529 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3530 globals.
3531 (target_regsets): Rename to ...
3532 (tile_regsets): ... this.
3533 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3534 (tile_regs_info): New function.
3535 (tile_arch_setup): Set the current process'es tdesc.
3536 (the_low_target): Adjust.
3537 (initialize_low_arch): New function.
3538 * spu-low.c (tdesc_spu): Declare.
3539 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3540 * win32-arm-low.c (tdesc_arm): Declare.
3541 (arm_arch_setup): New function.
3542 (the_low_target): Install arm_arch_setup instead of
3543 init_registers_arm.
3544 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3545 (init_windows_x86): Rename to ...
3546 (i386_arch_setup): ... this. Set `win32_tdesc'.
3547 (the_low_target): Adjust.
3548 * win32-low.c (win32_tdesc): New global.
3549 (child_add_thread): Don't create the thread cache here.
3550 (do_initial_child_stuff): Set the new process'es tdesc.
3551 * win32-low.h (struct target_desc): Forward declare.
3552 (win32_tdesc): Declare.
3553 * lynx-i386-low.c (tdesc_i386): Declare global.
3554 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3555 * lynx-low.c (lynx_tdesc): New global.
3556 (lynx_add_process): Set the new process'es tdesc.
3557 * lynx-low.h (struct target_desc): Forward declare.
3558 (lynx_tdesc): Declare global.
3559 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3560 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3561 * nto-low.c (nto_tdesc): New global.
3562 (do_attach): Set the new process'es tdesc.
3563 * nto-low.h (struct target_desc): Forward declare.
3564 (nto_tdesc): Declare.
3565 * nto-x86-low.c (tdesc_i386): Declare.
3566 (nto_x86_arch_setup): Set `nto_tdesc'.
3567
b1fbec62
GB
35682013-06-04 Gary Benson <gbenson@redhat.com>
3569
3570 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3571 to qSupported response when appropriate.
3572 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3573 with nonzero-length annex.
3574 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3575 arguments supplied in annex.
3576
d1ec4ce7
DE
35772013-05-31 Doug Evans <dje@google.com>
3578
ac44adcb 3579 PR server/15594
d1ec4ce7
DE
3580 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3581 64 bits in 64-cross-32 environment.
3582
9b25f2d3
PA
35832013-05-28 Pedro Alves <palves@redhat.com>
3584
3585 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3586 (aarch64-without-fpu.c): Delete rule.
3587 * configure.srv (aarch64*-*-linux*): Remove references to
3588 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3589 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3590 declaration.
3591
6740dc9c
PA
35922013-05-24 Pedro Alves <palves@redhat.com>
3593
3594 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3595 instead of strchr/decode_address. Error if the range isn't split
3596 with a ','. Don't assume there's be a ':' in the action.
3597
c2d6af84
PA
35982013-05-23 Yao Qi <yao@codesourcery.com>
3599 Pedro Alves <palves@redhat.com>
3600
3601 * linux-low.c (lwp_in_step_range): New function.
3602 (linux_wait_1): If the thread was range stepping and stopped
3603 outside the stepping range, report the stop to GDB. Otherwise,
3604 continue stepping. Add range stepping debug output.
3605 (linux_set_resume_request): Copy the step range from the resume
3606 request to the lwp.
3607 (linux_supports_range_stepping): New.
3608 (linux_target_ops) <supports_range_stepping>: Set to
3609 linux_supports_range_stepping.
3610 * linux-low.h (struct linux_target_ops)
3611 <supports_range_stepping>: New field.
3612 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3613 * linux-x86-low.c (x86_supports_range_stepping): New.
3614 (the_low_target) <supports_range_stepping>: Set to
3615 x86_supports_range_stepping.
3616 * server.c (handle_v_cont): Handle 'r' action.
3617 (handle_v_requests): Append ";r" if the target supports range
3618 stepping.
3619 * target.h (struct thread_resume) <step_range_start,
3620 step_range_end>: New fields.
3621 (struct target_ops) <supports_range_stepping>:
3622 New field.
3623 (target_supports_range_stepping): New macro.
3624
58794e1a
JB
36252013-05-17 Joel Brobecker <brobecker@adacore.com>
3626
3627 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3628 confusion in comment.
3629
d631c5a7
JB
36302013-05-17 Joel Brobecker <brobecker@adacore.com>
3631
3632 * lynx-low.c (struct process_info_private): New type.
3633 (lynx_add_process): New function.
3634 (lynx_create_inferior, lynx_attach): Replace calls to
3635 add_process by calls to lynx_add_process.
3636 (lynx_resume): If PTID is null, then try using
3637 current_process()->private->last_wait_event_ptid.
3638 Add comments.
3639 (lynx_clear_inferiors): Delete. The contents of that function
3640 has been inlined in lynx_mourn;
3641 (lynx_wait_1): Save the ptid in the process's private data.
3642 (lynx_mourn): Free the process' private data. Replace call
3643 to lynx_clear_inferiors by call to clear_inferiors.
3644
96f7a20f
YQ
36452013-05-17 Yao Qi <yao@codesourcery.com>
3646
3647 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3648 the right place.
3649
db0dfaa0
LM
36502013-05-16 Luis Machado <lgustavo@codesourcery.com>
3651
3652 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3653 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3654 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3655 PT_TEXT_END_ADDR guards. Update comments.
3656 (linux_target_op) <read_offsets>: Conditionally define to
3657 linux_read_offsets if the target is UCLIBC and if it defines
3658 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3659
68f5f838
SL
36602013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3661 Andrew Jenner <andrew@codesourcery.com>
3662
3663 * Makefile.in (SFILES): Add linux-nios2-low.c.
3664 (clean): Add action to delete nios2-linux.c.
3665 (nios2-linux.c): New rule.
3666 * configure.srv: Add nios2*-*-linux*.
3667 * linux-nios2-low.c: New.
3668
1ebff1fd
HAQ
36692013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3670
3671 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3672
f6150862
HZ
36732013-04-25 Hui Zhu <hui@codesourcery.com>
3674
3675 PR gdb/15186
f6150862
HZ
3676 * ax.c (ax_printf): Add fflush.
3677
614c279d
TT
36782013-04-22 Tom Tromey <tromey@redhat.com>
3679
3680 * Makefile.in (SFILES): Add filestuff.c.
3681 (OBS): Add filestuff.o.
3682 (filestuff.o): New target.
3683 * config.in, configure: Rebuild.
3684 * configure.ac: Check for fdwalk, pipe2.
3685
7d4e5717
PA
36862013-04-17 Pedro Alves <palves@redhat.com>
3687
3688 * configure.ac (USE_THREAD_DB): Delete variable.
3689 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3690 Don't AC_SUBST USE_THREAD_DB.
3691 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3692 * config.in, configure: Regenerate.
3693
d5c93e41
PA
36942013-04-16 Pedro Alves <palves@redhat.com>
3695
3696 * linux-low.h (struct lwp_info) <thread_known>: Move under
3697 the USE_THREAD_DB #ifdef.
3698
04f5fe89
PA
36992013-04-16 Pedro Alves <palves@redhat.com>
3700
3701 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3702 (linux-low.o): Delete rule.
3703 * linux-low.h: Always include "gdb_thread_db.h" instead of
3704 conditionally including thread_db.h.
3705 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3706 HAVE_THREAD_DB_H.
3707
480b27bf
JK
37082013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3709
3710 * Makefile.in (install-only): Fix make install regression.
3711
43662968
JK
37122013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3713
3714 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3715 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3716 installation.
3717 * gdbserver.1: Remove.
3718
3e74e146
PA
37192013-03-22 Pedro Alves <palves@redhat.com>
3720
3721 * linux-low.c (handle_extended_wait): Don't call
3722 linux_enable_event_reporting.
3723
a8347a2a
TT
37242013-03-15 Tony Theodore <tonyt@logyst.com>
3725
3726 PR build/9098:
3727 * Makefile.in (SHELL): Use @SHELL@.
3728
eeb56fa7
SDJ
37292013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3730
3731 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3732 compiler warning.
3733
4fa7e2ff
JB
37342013-03-13 Joel Brobecker <brobecker@adacore.com>
3735
3736 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3737 Remove extraneous NULL element.
3738
8ddb1965
YQ
37392013-03-13 Yao Qi <yao@codesourcery.com>
3740
3741 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3742 'V' block in trace frame.
3743
9accd112
MM
37442013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3745
3746 * target.h (struct target_ops): Add btrace ops.
3747 (target_supports_btrace): New macro.
3748 (target_enable_btrace): New macro.
3749 (target_disable_btrace): New macro.
3750 (target_read_btrace): New macro.
3751 * gdbthread.h (struct thread_info): Add btrace field.
3752 * server.c: Include btrace-common.h.
3753 (handle_btrace_general_set): New function.
3754 (handle_btrace_enable): New function.
3755 (handle_btrace_disable): New function.
3756 (handle_general_set): Call handle_btrace_general_set.
3757 (handle_qxfer_btrace): New function.
3758 (struct qxfer qxfer_packets[]): Add btrace entry.
3759 * inferiors.c (remove_thread): Disable btrace.
3760 * linux-low: Include linux-btrace.h.
3761 (linux_low_enable_btrace): New function.
3762 (linux_low_read_btrace): New function.
3763 (linux_target_ops): Add btrace ops.
3764 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3765 Add srv_linux_btrace=yes.
3766 (x86_64-*-linux*): Add linux-btrace.o.
3767 Add srv_linux_btrace=yes.
3768 * configure.ac: Define HAVE_LINUX_BTRACE.
3769 * config.in: Regenerated.
3770 * configure: Regenerated.
3771
5cc22e4c
MM
37722013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3773
3774 * server.c (handle_qxfer): Preserve error message if -3 is
3775 returned.
3776 (qxfer): Document the -3 return value.
3777
7c97f91e
MM
37782013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3779
3780 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3781 (linux_btrace_h): New variable.
3782 (linux-btrace.o): New rule.
3783
be9a119c 37842013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3785 Hafiz Abid Qadeer <abidh@codesourcery.com>
3786
3787 * tracepoint.c (trace_buffer_size): New global.
3788 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3789 (init_trace_buffer): Change to one-argument function. Allocate
3790 trace buffer memory.
3791 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3792 handle QTBuffer:size packet.
3793 (cmd_bigqtbuffer_size): New function.
3794 (initialize_tracepoint): Call init_trace_buffer with
3795 DEFAULT_TRACE_BUFFER_SIZE.
3796 * server.c (handle_query): Add QTBuffer:size in the
3797 supported packets.
3798
e64f7499
YQ
37992013-03-07 Yao Qi <yao@codesourcery.com>
3800
3801 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3802 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3803 of -1.
3804 (cmd_qtsp): Adjust condition. Do post increment.
3805 Set cur_action and cur_step_action back to 0.
3806
f0ae6fc3
PA
38072013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3808
3809 PR server/15236
3810 * linux-low.c (linux_write_memory): Return early success if LEN is
3811 zero.
3812
b5b0b0af
CV
38132013-03-05 Corinna Vinschen <vinschen@redhat.de>
3814
334ad4a8 3815 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3816
589bc927
TT
38172013-02-28 Tom Tromey <tromey@redhat.com>
3818
3819 * configure.ac: Invoke AC_SYS_LARGEFILE.
3820 * configure, config.in: Rebuild.
3821
dfe07582
CV
38222013-02-28 Corinna Vinschen <vinschen@redhat.com>
3823
3824 * win32-low.c: Throughout, fix format strings and casts of
3825 printf-like functions to avoid type related warnings on all
3826 platforms.
3827 (get_child_debug_event): Print dwDebugEventCode as hex since
3828 that's how it's usually documented.
3829
736cd585
YQ
38302013-02-28 Yao Qi <yao@codesourcery.com>
3831
3832 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3833 pulongest.
3834
e1f58301
JW
38352013-02-27 Jiong Wang <jiwang@tilera.com>
3836
3837 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3838 (reg-tilegx32.c): New rule.
3839 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3840 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3841 different register info initializer according to elf class.
3842 (init_registers_tilgx32): New function. The tilegx32 register info
3843 initializer.
3844 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3845 (tile_store_gregset): Likewise.
3846
d171ca78
YQ
38472013-02-27 Yao Qi <yao@codesourcery.com>
3848
3849 * server.c (process_point_options): Print debug message when
3850 debug_threads is true.
3851
282bbdf3
YQ
38522013-02-26 Yao Qi <yao@codesourcery.com>
3853
3854 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3855
aca22551
PA
38562013-02-19 Pedro Alves <palves@redhat.com>
3857 Kai Tietz <ktietz@redhat.com>
3858
3859 PR gdb/15161
3860
3861 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3862 instead of strtoul to extract address from packet.
3863 (process_serial_event) <'z'>: Likewise.
3864
4f3cee1c
YQ
38652013-02-18 Yao Qi <yao@codesourcery.com>
3866
3867 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3868
8e1d55a3
PA
38692013-02-14 Pedro Alves <palves@redhat.com>
3870
3871 Plug memory leak.
3872
3873 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3874 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3875
458820da
PA
38762013-02-14 Pedro Alves <palves@redhat.com>
3877
3878 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3879
baea0dae
PA
38802013-02-14 Pedro Alves <palves@redhat.com>
3881
3882 * tracepoint.c (save_string): Delete.
3883 (add_tracepoint_action): Use savestring instead of save_string.
3884
0b1afbb3
PA
38852013-02-12 Pedro Alves <palves@redhat.com>
3886
3887 * linux-xtensa-low.c: Ditto.
3888 * xtensa-xtregs.c: Ditto.
3889
8a4ac37e
PA
38902013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3891
3892 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3893 thread_db.
3894
148de6bb
MS
38952013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3896
3897 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3898 aarch64_num_wp_regs and aarch64_num_bp_regs to
3899 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3900
55fac6e0
MS
39012013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3902
3903 * linux-aarch64-low.c (ps_get_thread_area): Replace
3904 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3905
176eb98c
MS
39062013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3907 Marcus Shawcroft <marcus.shawcroft@arm.com>
3908 Nigel Stephens <nigel.stephens@arm.com>
3909 Yufeng Zhang <yufeng.zhang@arm.com>
3910
3911 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3912 (aarch64.c, aarch64-without-fpu.c): New targets.
3913 * configure.srv (aarch64*-*-linux*): New.
3914 * linux-aarch64-low.c: New file.
3915
56f7af9c
MS
39162013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3917
43aaf8b6 3918 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3919 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3920 (dequeue_one_deferred_signal, linux_resume_one_thread)
3921 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3922 (linux_tracefork_grandchild, linux_test_for_tracefork)
3923 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3924 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3925 where the argument is 0.
3926
60f662b0
YQ
39272013-01-25 Yao Qi <yao@codesourcery.com>
3928
3929 * event-loop.c: Include "queue.h".
3930 (gdb_event_p): New typedef.
3931 (struct gdb_event) <next_event>: Remove.
3932 (event_queue): Change to QUEUE(gdb_event_p).
3933 (async_queue_event): Remove.
3934 (gdb_event_xfree): New.
3935 (initialize_event_loop): New.
3936 (process_event): Use API from QUEUE.
3937 (wait_for_event): Likewise.
3938 * server.c (main): Call initialize_event_loop.
3939 * server.h (initialize_event_loop): Declare.
3940
5ae4861a
YQ
39412013-01-18 Yao Qi <yao@codesourcery.com>
3942
3943 * ax.h (struct eval_agent_expr_context): New.
3944 (gdb_eval_agent_expr): Update declaration.
3945 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3946 TFRAME. Add new argument CTX.
3947 * server.h (struct eval_agent_expr_context): Declare.
3948 (agent_mem_read, agent_tsv_read): Update declaration.
3949 (agent_mem_read_string): Likewise.
3950 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3951 (add_traceframe_block): Add new argument TPOINT.
3952 Increase TPOINT->traceframe_usage.
3953 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3954 eval_tracepoint_agent_expr.
3955 (condition_true_at_tracepoint): Likewise.
3956 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3957 (agent_mem_read_string, agent_tsv_read): Likewise.
3958
85e00e85
YQ
39592013-01-16 Yao Qi <yao@codesourcery.com>
3960
3961 * linux-low.c (linux_resume_one_lwp): Don't check
3962 'lwp->bp_reinsert != 0'.
3963
4039cf45
JB
39642013-01-07 Joel Brobecker <brobecker@adacore.com>
3965 Pedro Alves <palves@redhat.com>
3966
3967 * lynx-low.c (ptrace_request_to_str): Define a temporary
3968 macro and use it to simplify this function's implementation.
3969
9044dee2
JB
39702013-01-07 Joel Brobecker <brobecker@adacore.com>
3971
3972 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3973 sets errno.
3974
e6352c8f
JB
39752013-01-07 Joel Brobecker <brobecker@adacore.com>
3976
3977 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3978
50681a27
JB
39792013-01-07 Joel Brobecker <brobecker@adacore.com>
3980
3981 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3982
3f6e77ef
JB
39832013-01-07 Joel Brobecker <brobecker@adacore.com>
3984
3985 * lynx-low.c (lynx_resume): Use the resume_info parameter
3986 to determine the ptid for the lynx_ptrace call, unless
3987 it is equal to minus_one_ptid, in which case we use the
3988 ptid of the current_inferior.
3989 (lynx_wait_1): After having received a thread create/exit
3990 event, resume the inferior's execution using the signaling
3991 thread's ptid, rather than the old ptid.
3992
7fda33ae
JB
39932013-01-07 Joel Brobecker <brobecker@adacore.com>
3994
3995 * lynx-low.c (lynx_resume): Delete variable ret.
3996
b9786c74
JB
39972013-01-01 Joel Brobecker <brobecker@adacore.com>
3998
3999 * gdbreplay.c (gdbreplay_version): Update copyright year.
4000 * server.c (gdbserver_version): Likewise.
4001
8b93d60f
JB
40022012-12-17 Joel Brobecker <brobecker@adacore.com>
4003
4004 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4005 new thread.
4006
037335a7
JB
40072012-12-17 Joel Brobecker <brobecker@adacore.com>
4008
4009 * lynx-low.c (ptrace_request_to_str): Add handling for
4010 PTRACE_GETTRACESIG.
4011
52d4cbd8
JB
40122012-12-17 Joel Brobecker <brobecker@adacore.com>
4013
4014 * lynx-low.c (lynx_attach): Delete variable new_process.
4015
ab8f6ca9
JB
40162012-12-17 Joel Brobecker <brobecker@adacore.com>
4017
4018 * lynx-low.c (lynx_create_inferior): Delete variable
4019 new_process.
4020
78cbc024
JB
40212012-12-17 Joel Brobecker <brobecker@adacore.com>
4022
4023 * lynx-low.c (ptrace_request_to_str): Do not handle
4024 PTRACE_GETTHREADLIST if this macro does not exist.
4025
14a00470
YQ
40262012-12-15 Yao Qi <yao@codesourcery.com>
4027
4028 * Makefile.in (OBS): Add notif.o.
4029 * notif.c, notif.h: New.
4030 * server.c: Include "notif.h".
4031 (struct vstop_notif) <next>: Remove.
4032 <base>: New field.
4033 (queue_stop_reply): Update.
4034 (push_event, send_next_stop_reply): Remove.
4035 (discard_queued_stop_replies): Update.
4036 (notif_stop): New variable.
4037 (handle_v_stopped): Remove.
4038 (handle_v_requests): Don't call handle_v_stopped. Call
4039 handle_ack_notif instead.
4040 (queue_stop_reply_callback): Call notif_event_enque instead
4041 of queue_stop_reply.
4042 (handle_status): Don't call send_next_stop_reply, call
4043 notif_write_event instead.
4044 (kill_inferior_callback): Likewise.
4045 (detach_or_kill_inferior_callback): Likewise.
4046 (main): Call initialize_notif.
4047 (process_serial_event): Call QUEUE_is_empty.
4048 (handle_target_event): Call notif_push instead of push event.
4049 * server.h (push_event): Remove declaration.
4050
61c125b9
TT
40512012-12-10 Tom Tromey <tromey@redhat.com>
4052
4053 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4054 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4055 macros.
4056 (.c.o): Rewrite.
4057 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4058 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4059 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4060 (amd64-linux-ipa.o, ax.o): Rewrite.
4061 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4062 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4063 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4064 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4065 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4066 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4067 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4068 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4069 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4070 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4071 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4072 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4073 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4074 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4075 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4076 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4077 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4078 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4079 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4080 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4081 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4082 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4083 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4084 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4085 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4086 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4087 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4088 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4089 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4090 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4091 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4092 (reg-tilegx.o): Remove.
4093 (all_object_files): New macro.
4094 Include .deps files.
4095 * aclocal.m4, configure: Rebuild.
4096 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4097 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4098 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4099
e90e9ad9
TT
41002012-12-05 Tom Tromey <tromey@redhat.com>
4101
4102 PR gdb/14917:
4103 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4104
02d403bf 41052012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4106
4107 * configure.ac: Check for linux/perf_event.h.
4108 * config.in: Regenerated.
4109 * configure: Regenerated.
4110
0270a750
PA
41112012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4112
4113 * hostio.c (handle_readlink): Decrease buffer size
4114 parameter passed to readlink by one byte.
4115
8c29b58e
YQ
41162012-11-26 Yao Qi <yao@codesourcery.com>
4117
4118 * configure.ac (build_warnings): Append '-Wempty-body'.
4119 * configure: Regenerated.
4120 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4121 body.
4122
8bdce1ff
PM
41232012-11-15 Pierre Muller <muller@sourceware.org>
4124
4125 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4126 * config.in: Regenerate.
4127 * configure: Regenerate.
4128 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4129 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4130 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4131 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4132 header.
4133 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4134 instead of <sys/wait.h> header.
4135 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4136
02d403bf 41372012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4138
4139 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4140 (various make rules): Remove -DGDBSERVER
4141
fbd5db48
YQ
41422012-11-09 Yao Qi <yao@codesourcery.com>
4143
4144 * spu-low.c (current_ptid): Move it to ..
4145 * gdbthread.h: ... here. New.
4146 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4147 * server.c (myresume, process_serial_event): Likewise.
4148 * thread-db.c (thread_db_find_new_threads): Likewise.
4149 * tracepoint.c (run_inferior_command): Likewise.
4150
b3dc46ff
AB
41512012-10-01 Andrew Burgess <aburgess@broadcom.com>
4152
4153 * server.c (handle_search_memory_1): Include access length in
4154 warning message.
4155
07c04788
HPN
41562012-09-05 Michael Brandt <michael.brandt@axis.com>
4157
4158 * linux-crisv32-low.c: Fix compile errors.
4159
918d227b
YQ
41602012-09-04 Yao Qi <yao@codesourcery.com>
4161
4162 * tracepoint.c (cmd_qtsv): Adjust debug message.
4163 Don't check CUR_TPOINT.
4164
18c1b81a
YQ
41652012-08-28 Yao Qi <yao@codesourcery.com>
4166
4167 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4168 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4169 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4170 Remove declarations of xmalloc, xreallloc, xstrdup and
4171 freeargv.
4172 * Makefile.in (libiberty_h): New.
4173 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4174 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4175
dc82f37b
YQ
41762012-08-23 Yao Qi <yao@codesourcery.com>
4177
4178 * server.h: Remove declaration of 'xsnprintf'.
4179
406b1477
KS
41802012-08-22 Keith Seitz <keiths@redhat.com>
4181
4182 * server.h: Include build-gnulib-gbserver/config.h.
4183 * gdbreplay.c: Likewise.
4184
e6712ff1
DE
41852012-08-08 Doug Evans <dje@google.com>
4186
4187 * Makefile.in (SFILES): Add gdb_vecs.c.
4188 (OBS): Add gdb_vecs.o.
4189 (gdb_vecs_h, host_defs_h): New variables.
4190 (thread-db.o): Add $(gdb_vecs_h) dependency.
4191 (gdb_vecs.o): New rule.
4192 * thread-db.c: #include "gdb_vecs.h".
4193 (thread_db_load_search): Use a vector to iterate over path elements.
4194 Handle text appearing after "$pdir".
4195
4196 * configure.ac: Add check for strstr.
4197 * config.in: Regenerate.
4198 * configure: Regenerate.
4199
7c3270ae
UW
42002012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4201
4202 * hostio.c (handle_pread): If pread fails, fall back to attempting
4203 lseek/read.
4204 (handle_pwrite): Likewise for pwrite.
4205
b62e2b27
UW
42062012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4207
4208 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4209 between unsupported TYPE and unimplementable ADDR/LEN combination.
4210 (arm_insert_point): Act on new return value.
4211
78a99e91
PA
42122012-07-31 Pedro Alves <palves@redhat.com>
4213
4214 * server.c (process_point_options): Only skip tokens if we find
4215 one that is unrecognized. Don't treat 'X' specially while
4216 skipping unrecognized tokens.
4217
fcf303ab
UW
42182012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4219
4220 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4221 to 4-byte-align HW breakpoint addresses for Thumb.
4222
7255706c
YQ
42232012-07-27 Yao Qi <yao@codesourcery.com>
4224
4225 PR remote/14161.
4226
4227 * server.h: Declare gdb_agent_about_to_close.
4228 * target.c (kill_inferior): Include "agent.h".
4229 New. Send command 'kill'.
4230 * target.h (kill_inferior): Removed macro.
4231 * tracepoint.c (gdb_agent_about_to_close): New.
4232 (gdb_agent_helper_thread): Handle command 'close'.
4233 Wait endlessly until the inferior stops.
4234 Install gdb_agent_remove_socket to atexit hook.
4235 (agent_socket_name): New static variable.
4236 (gdb_agent_socket_init): Replace local variable 'name' with
4237 'agent_socket_name'.
4238 (gdb_agent_remove_socket): New.
4239
5a3f286f
YQ
42402012-07-27 Yao Qi <yao@codesourcery.com>
4241
4242 * server.c (process_point_options): Stop at 'X' when parsing.
4243
961bd387
ME
42442012-07-19 Michael Eager <eager@eagercon.com>
4245
a261b8f5 4246 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4247 to hw_execute.
4248 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4249 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4250 hardware breakpoint.
4251
aa7c7447
JK
42522012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4253
4254 * gdbserver/linux-low.c (initialize_low): Call
4255 linux_ptrace_init_warnings.
4256
7f216e7c
DE
42572012-07-02 Doug Evans <dje@google.com>
4258
4259 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4260 pointer to int.
4261
d3ce09f5
SS
42622012-07-02 Stan Shebs <stan@codesourcery.com>
4263
4264 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4265 (ax.o): Add it to build rule.
4266 (ax-ipa.o): Ditto.
4267 (OBS): Add format.o.
4268 (IPA_OBS): Add format.o.
4269 * server.c (handle_query): Claim support for breakpoint commands.
4270 (process_point_options): Add command case.
4271 (process_serial_event): Leave running if there are printfs in
4272 effect.
4273 * mem-break.h (any_persistent_commands): Declare.
4274 (add_breakpoint_commands): Declare.
4275 (gdb_no_commands_at_breakpoint): Declare.
4276 (run_breakpoint_commands): Declare.
4277 * mem-break.c (struct point_command_list): New struct.
4278 (struct breakpoint): New field command_list.
4279 (any_persistent_commands): New function.
4280 (add_commands_to_breakpoint): New function.
4281 (add_breakpoint_commands): New function.
4282 (gdb_no_commands_at_breakpoint): New function.
4283 (run_breakpoint_commands): New function.
4284 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4285 locally.
4286 * ax.c: Include format.h.
4287 (ax_printf): New function.
4288 (gdb_eval_agent_expr): Add printf opcode.
4289
2f8f6aed
YQ
42902012-06-13 Yao Qi <yao@codesourcery.com>
4291
4292 * server.c (start_inferior): Remove duplicated writes to fields
4293 'last_resume_kind' and 'last_status' of 'current_inferior'.
4294
0c9070b3
YQ
42952012-06-12 Yao Qi <yao@codesourcery.com>
4296 Pedro Alves <palves@redhat.com>
4297
4298 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4299 comment.
4300 * server.c (handle_v_cont): Extend comment.
4301
c52daf70
YQ
43022012-06-11 Yao Qi <yao@codesourcery.com>
4303
4304 * linux-low.c (linux_attach): Add 'static'.
4305
d38bbb0a
YQ
43062012-06-06 Yao Qi <yao@codesourcery.com>
4307
4308 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4309
89dc0afd
JK
43102012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4311
4312 Fix gcc -flto compilation warning.
4313 * server.c (main): Make variable multi_mode and attach volatile.
4314
75f62ce7
TJB
43152012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4316
4317 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4318 if the platform doesn't know about it.
4319
65f479b6
PA
43202012-05-30 Jeff Kenton <jkenton@tilera.com>
4321
4322 * Makefile.in (SFILES): Add linux-tile-low.c.
4323 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4324 * configure.srv: Handle tilegx-*-linux*.
4325 * linux-tile-low.c: New file.
4326
0c5bf5a9
JK
43272012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4328
4329 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4330
a493e3e2
PA
43312012-05-24 Pedro Alves <palves@redhat.com>
4332
4333 PR gdb/7205
4334
43aaf8b6 4335 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4336
2ea28649
PA
43372012-05-24 Pedro Alves <palves@redhat.com>
4338
4339 PR gdb/7205
4340
4341 Replace target_signal with gdb_signal throughout.
4342
8d409d16
MR
43432012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4344
4345 * linux-low.c (linux_store_registers): Avoid the copying sequence
4346 when no data has been retrieved by ptrace.
4347
23512c01
MGD
43482012-05-22 Will Deacon <will.deacon@arm.com>
4349
4350 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4351 Include asm/ptrace.h.
4352 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4353 already defined.
4354
4934b29e
MR
43552012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4356
4357 * linux-low.c (linux_store_registers): Don't re-retrieve data
4358 with ptrace that has already been obtained from /proc. Always
4359 copy any data retrieved with ptrace to the buffer supplied.
4360
bde24c0a
PA
43612012-05-11 Yao Qi <yao@codesourcery.com>
4362 Pedro Alves <palves@redhat.com>
4363
4364 * linux-low.c (enum stopping_threads_kind): New.
4365 (stopping_threads): Change type to `enum stopping_threads_kind'.
4366 (handle_extended_wait): If stopping and suspending threads, leave
4367 the new_lwp suspended too.
4368 (linux_wait_for_event): Adjust.
4369 (stop_all_lwps): Set `stopping_threads' to
4370 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4371 whether we're suspending threads or just stopping them. Assert no
4372 recursion happens.
4373
623b6bdf
YQ
43742012-04-29 Yao Qi <yao@codesourcery.com>
4375
4376 * server.h: Move some code to ...
4377 * gdbthread.h: ... here. New.
4378 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4379 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4380 (nto-low.o, win32-low.o): Likewise.
4381 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4382 * regcache.c, remote-utils.c, server.c: Likewise.
4383 * target.c, tracepoint.c, win32-low.c: Likewise.
4384
f15f9948
TJB
43852012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4386
4387 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4388 (PTRACE_ARG4_TYPE): Likewise.
4389 (PTRACE_XFER_TYPE): Likewise.
4390 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4391 ptrace to PTRACE_ARG3_TYPE.
4392 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4393 (PTRACE_ARG4_TYPE): Likewise.
4394 (PTRACE_XFER_TYPE): Likewise.
4395 (linux_detach_one_lwp): Cast fourth argument of
4396 ptrace to long then PTRACE_ARG4_TYPE.
4397 (regsets_fetch_inferior_registers): Cast third argument of
4398 ptrace to long then PTRACE_ARG3_TYPE.
4399 (regsets_store_inferior_registers): Likewise.
4400
38ea300a
PA
44012012-04-20 Pedro Alves <palves@redhat.com>
4402
4403 * configure: Regenerate.
4404
c971b7fa
PA
44052012-04-19 Pedro Alves <palves@redhat.com>
4406
43aaf8b6 4407 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4408 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4409 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4410 (all, install-only, uninstall, clean-info, all-lib, clean): No
4411 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4412 (maintainer-clean realclean distclean): Use subdir_do.
4413 (subdir_do): New.
4414 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4415 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4416 * acinclude.m4: Include acx_configure_dir.m4.
4417 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4418 calls. Call AC_PROG_RANLIB. Configure gnulib using
4419 ACX_CONFIGURE_DIR.
4420 (GNULIB): New.
4421 (GNULIB_STDINT_H): Adjust.
4422 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4423 * gdbreplay.c: Include build-gnulib/config.h.
4424 * server.h: Likewise.
4425 * aclocal.m4: Regenerate.
4426 * config.in: Regenerate.
4427 * configure: Regenerate.
c971b7fa 4428
809277f8
PA
44292012-04-19 Pedro Alves <palves@redhat.com>
4430
4431 * Makefile.in (LIBGNU, INCGNU): Adjust.
4432 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4433 (all, install-only, uninstall, clean-info, all-lib, clean)
4434 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4435 * configure.ac: Adjust AC_OUTPUT output.
4436 * aclocal.m4: Regenerate.
4437 * configure: Regenerate.
4438
fd9bb8b8
PA
44392012-04-19 Pedro Alves <palves@redhat.com>
4440
4441 * Makefile.in (generated_files): New.
4442 (server_h): Remove the explicit dependency on config.h, and depend
4443 on $generated_files.
4444
1c298c66
PA
44452012-04-19 Pedro Alves <palves@redhat.com>
4446
4447 * Makefile.in (INCGNU): Add -Ignulib.
4448
57c4b50b
PA
44492012-04-19 Pedro Alves <palves@redhat.com>
4450
4451 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4452 (INCGNU): ... this, and spell out -I here.
4453 (GNULIB_LIB): Rename to ...
4454 (LIBGNU): ... this.
4455 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4456
1030e047
PA
44572012-04-19 Pedro Alves <palves@redhat.com>
4458
4459 * config.in: Regenerate.
4460
447d4319
PA
44612012-04-19 Pedro Alves <palves@redhat.com>
4462
4463 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4464 * server.h (memmem): Remove declaration.
4465 * config.in: Regenerate.
4466 * configure: Regenerate.
4467
aad9eab9
YQ
44682012-04-19 Yao Qi <yao@codesourcery.com>
4469
4470 * Makefile.in (SFILES): Add common/vec.c.
4471 (OBS): Add vec.o.
4472 (vec.o): New rule.
4473
3e10640f
YQ
44742012-04-19 Yao Qi <yao@codesourcery.com>
4475
4476 * remote-utils.c (prepare_resume_reply): Replace with macro
4477 target_core_of_thread.
4478 * server.c (handle_qxfer_threads_proper): Likewise.
4479 * target.h (traget_core_of_thread): New macro.
4480
71622373
PA
44812012-04-18 Pedro Alves <palves@redhat.com>
4482
4483 * aclocal.m4: Regenerate.
4484 * configure: Regenerate.
4485
80d26939
YQ
44862012-04-16 Yao Qi <yao@codesourcery.com>
4487
4488 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4489 duplicated on address.
4490
42476b70
YQ
44912012-04-16 Yao Qi <yao@codesourcery.com>
4492
4493 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4494 (struct tracepoint_action_ops) <send>: New field.
4495 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4496 (agent_expr_send, x_tracepoint_action_send): New.
4497 (l_tracepoint_action_send): New.
4498 (cmd_qtdp): Download and install tracepoint
4499 according to `use_agent'.
4500 (run_inferior_command): Add one more parameter `len'.
4501 Update callers.
4502 (tracepoint_send_agent): New.
4503 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4504
7bc83639
YQ
45052012-04-16 Yao Qi <yao@codesourcery.com>
4506
4507 * tracepoint.c (download_tracepoints): Moved to ...
4508 (cmd_qtstart): ... here.
4509
5f18041e
YQ
45102012-04-14 Yao Qi <yao@codesourcery.com>
4511
4512 * tracepoint.c: Include inttypes.h.
4513 (struct collect_memory_action): Use sized types.
4514 (struct tracepoint): Likewise.
4515 (cmd_qtdp, stop_tracing): Update print specifiers.
4516 (cmd_qtp, response_tracepoint): Likewise.
4517 (collect_data_at_tracepoint): Likewise.
4518 (collect_data_at_step): Likewise.
4519
55a8c076
YQ
45202012-04-14 Yao Qi <yao@codesourcery.com>
4521
4522 Import gnulib module inttypes.
4523 * aclocal.m4, config.in, configure: Regenerated.
4524
dc750257
YQ
45252012-04-14 Yao Qi <yao@codesourcery.com>
4526
4527 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4528 Makefile and config.status at last.
4529
0ab5faf9
YQ
45302012-04-13 Yao Qi <yao@codesourcery.com>
4531
4532 * tracepoint.c: Include stdint.h unconditionally.
4533
18f5fd81
TJB
45342012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4535
4536 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4537 on BFD_HAVE_SYS_PROCFS_TYPE.
4538 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4539 * configure: Regenerate.
4540 * config.in: Likewise.
4541
4d47af5c
L
45422012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4543
4544 * Makefile.in (clean): Also remove x32.c x32-linux.c
4545 x32-avx.c x32-avx-linux.c.
4546 (x32.o): New target.
4547 (x32.c): Likewise.
4548 (x32-linux.o): Likewise.
4549 (x32-linux.c): Likewise.
4550 (x32-avx.o): Likewise.
4551 (x32-avx.c): Likewise.
4552 (x32-avx-linux.o): Likewise.
4553 (x32-avx-linux.c): Likewise.
4554
4555 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4556 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4557 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4558 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4559 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4560 i386/x32-avx-linux.xml.
4561
4562 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4563 (init_registers_x32_avx_linux): Likwise.
4564 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4565 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4566
ecedbe58
PA
45672012-04-13 Pedro Alves <palves@redhat.com>
4568
4569 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4570 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4571 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4572 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4573 the sub-make.
4574
c92b5177
L
45752012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4576
4577 * linux-x86-low.c (compat_x32_clock_t): New.
4578 (compat_x32_siginfo_t): Likewise.
4579 (compat_x32_siginfo_from_siginfo): Likewise.
4580 (siginfo_from_compat_x32_siginfo): Likewise.
4581 (linux_is_elf64): Likewise.
4582 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4583 and siginfo_from_compat_x32_siginfo for x32.
4584 (x86_arch_setup): Set linux_is_elf64.
4585
214d508e
L
45862012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4587
4588 PR gdb/13969
4589 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4590 e_machine field.
4591 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4592 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4593 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4594 compatible with process.
4595
c9a1864a
YQ
45962012-04-12 Yao Qi <yao@codesourcery.com>
4597
4598 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4599 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4600 (install-only, install-info, clean): Handle sub dir gnulib.
4601 (all-lib, am--refresh): New targets.
4602 (memmem.o): Remove target.
4603 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4604 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4605 (AC_REPLACE_FUNCS): Remove memmem.
4606 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4607 (AC_OUTPUT): Generate Makefile in gnulib/.
4608 * aclocal.m4, config.in, configure: Regenerated.
4609
367ba2c2
MR
46102012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4611
4612 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4613
9d236627
PA
46142012-04-05 Pedro Alves <palves@redhat.com>
4615
4616 -Werror=strict-aliasing
4617
4618 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4619 pointer.
4620
111217b3
PA
46212012-04-04 Pedro Alves <palves@redhat.com>
4622
4623 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4624 (sparc_store_gregset_from_stack, sparc_store_gregset)
4625 (sparc_breakpoint_at): Fix formatting.
4626
8365dcf5
TJB
46272012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4628
4629 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4630 are available.
4631 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4632 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4633 * config.in: Regenerate.
4634 * configure: Likewise.
4635
689cc2ae
PA
46362012-03-29 Pedro Alves <palves@redhat.com>
4637
4638 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4639 Correct ptrace arguments.
4640
c14dfd32
PA
46412012-03-28 Pedro Alves <palves@redhat.com>
4642
4643 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4644 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4645 (IA64_FR1_REGNUM): New defines.
4646 (ia64_fetch_register): New.
4647 (the_low_target): Install it.
4648 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4649 field.
4650 * linux-low.c (linux_fetch_registers): Try the
4651 the_low_target.fetch_register hook first.
4652
4653 * linux-arm-low.c (the_low_target): Adjust.
4654 * linux-bfin-low.c (the_low_target): Adjust.
4655 * linux-cris-low.c (the_low_target): Adjust.
4656 * linux-crisv32-low.c (the_low_target): Adjust.
4657 * linux-m32r-low.c (the_low_target): Adjust.
4658 * linux-m68k-low.c (the_low_target): Adjust.
4659 * linux-mips-low.c (the_low_target): Adjust.
4660 * linux-ppc-low.c (the_low_target): Adjust.
4661 * linux-s390-low.c (the_low_target): Adjust.
4662 * linux-sh-low.c (the_low_target): Adjust.
4663 * linux-sparc-low.c (the_low_target): Adjust.
4664 * linux-tic6x-low.c (the_low_target): Adjust.
4665 * linux-x86-low.c (the_low_target): Adjust.
4666 * linux-xtensa-low.c (the_low_target): Adjust.
4667
63c88e13
PA
46682012-03-26 Pedro Alves <palves@redhat.com>
4669
4670 * server.c (handle_qxfer_libraries): Don't bail early if
4671 the_target->qxfer_libraries_svr4 is not NULL.
4672
fb723180
PA
46732012-03-26 Pedro Alves <palves@redhat.com>
4674
4675 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4676
0afae3cf
PA
46772012-03-23 Pedro Alves <palves@redhat.com>
4678
4679 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4680 "library-list-svr4" element's start tag when the the DSO list is
4681 empty.
4682
485f1ee4
PA
46832012-03-23 Pedro Alves <palves@redhat.com>
4684
4685 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4686 a variable whose type size is the same as the inferior's pointer
4687 size.
4688
a5362b9a
TS
46892012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4690
4691 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4692 struct siginfo.
4693 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4694 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4695 * linux-low.h: Include <signal.h>.
4696 (struct siginfo): Remove forward declaration.
4697 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4698 struct siginfo.
4699
d226c142
MF
47002012-03-21 Mike Frysinger <vapier@gentoo.org>
4701
4702 * .gitignore: Ignore more files.
4703
122f36ef
PA
47042012-03-19 Pedro Alves <palves@redhat.com>
4705 Jan Kratochvil <jan.kratochvil@redhat.com>
4706
4707 * server.c (cont_thread, general_thread): Add describing comments.
4708 (start_inferior): Clear `cont_thread'.
4709 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4710 of a process.
4711
fc3e5175
YQ
47122012-03-15 Yao Qi <yao@codesourcery.com>
4713
4714 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4715 handling to ...
4716 (cmd_qtdp): ... here.
4717
8d0d92cd
YQ
47182012-03-15 Yao Qi <yao@codesourcery.com>
4719
4720 * tracepoint.c (struct tracepoint_action_ops): New.
4721 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4722 (m_tracepoint_action_download): New.
4723 (r_tracepoint_action_download): New.
4724 (x_tracepoint_action_download): New.
4725 (l_tracepoint_action_download): New.
4726 (add_tracepoint_action): Install `action->ops' according type.
4727 (download_tracepoint_1): Move code `download' function pointer
4728 of various tracepoint_action_ops.
4729
87b0bb13
JK
47302012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4731
4732 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4733 linux_ptrace_attach_warnings.
4734
5f572dec
JK
47352012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4736
4737 * Makefile.in (linux-ptrace.o): New.
4738 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4739 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4740 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4741 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4742 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4743 of these targets.
4744 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4745
f4647387
YQ
47462012-03-08 Yao Qi <yao@codesourcery.com>
4747 Pedro Alves <palves@redhat.com>
4748
4749 Fix PR server/13392.
4750 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4751 offset of JMP insn.
4752 * tracepoint.c (remove_tracepoint): New.
4753 (cmd_qtdp): Call remove_tracepoint when failed to install.
4754
9b224c5e
PA
47552012-03-07 Pedro Alves <palves@redhat.com>
4756
4757 * linux-low.c (get_detach_signal): New.
4758 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4759 Pass on pending signals to PTRACE_DETACH. Check the result of the
4760 ptrace call.
4761 * server.c (program_signals, program_signals_p): New.
4762 (handle_general_set): Handle QProgramSignals.
4763 * server.h (program_signals, program_signals_p): Declare.
4764
e237a7e2
JK
47652012-03-05 Pedro Alves <palves@redhat.com>
4766 Jan Kratochvil <jan.kratochvil@redhat.com>
4767
4768 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4769 New comment why.
4770
5808517f
YQ
47712012-03-03 Yao Qi <yao@codesourcery.com>
4772
4773 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4774 agent_look_up_symbols.
4775
58b4daa5
YQ
47762012-03-03 Yao Qi <yao@codesourcery.com>
4777
4778 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4779 (linux-x86-low.o): Likewise.
4780 * server.h: Remove in_process_agent_loaded.
4781 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4782 common/agent.c.
4783 Update callers.
4784
8ffcbaaf
YQ
47852012-03-03 Yao Qi <yao@codesourcery.com>
4786
4787 * tracepoint.c (gdb_agent_capability): New global.
4788 (in_process_agent_loaded_ust): Renamed to
4789 `in_process_agent_supports_ust'.
4790 Update callers.
4791 (in_process_agent_supports_ust): Call agent_capability_check.
4792 (clear_installed_tracepoints): Assert that agent supports
4793 agent.
4794
d1feda86
YQ
47952012-03-03 Yao Qi <yao@codesourcery.com>
4796
4797 * linux-low.c (linux_supports_agent): New.
4798 (linux_target_ops): Initialize field `supports_agent' with
4799 linux_supports_agent.
4800 * target.h (struct target_ops) <supports_agent>: New.
4801 (target_supports_agent): New macro.
4802 * server.c (handle_general_set): Handle packet 'QAgent'.
4803 (handle_query): Send `QAgent+'.
4804 * Makefile.in (server.o): Depends on agent.h.
4805
2fa291ac
YQ
48062012-03-03 Yao Qi <yao@codesourcery.com>
4807
4808 * Makefile.in (OBS): Add agent.o.
4809 Add new rule for agent.o.
4810 Track dependence of tracepoint.c on agent.h.
4811 * tracepoint.c (run_inferior_command_1):
4812 (run_inferior_command): Call agent_run_command.
4813 (gdb_ust_connect_sync_socket): Deleted. Move it to
4814 common/agent.c.
4815 (resume_thread, stop_thread): Likewise.
4816 (gdb_ust_socket_init): Renamed to ...
4817 (gdb_agent_socket_init): ... New.
4818 (gdb_ust_thread): Renamed to ...
4819 (gdb_agent_helper_thread): ... New.
4820 (gdb_ust_init): Move some code to ...
4821 (gdb_agent_init): ... here. New.
4822 [HAVE_UST]: Call gdb_ust_init.
4823 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4824 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4825 * config.in, configure: Regenerated.
4826
05044653
PA
48272012-03-02 Pedro Alves <palves@redhat.com>
4828
4829 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4830 * linux-low.c (struct simple_pid_list): New.
4831 (stopped_pids): New a struct simple_pid_list pointer.
4832 (add_to_pid_list, pull_pid_from_list): New.
4833 (handle_extended_wait): Don't assume the first signal new children
4834 report is SIGSTOP. Adjust call to pull_pid_from_list.
4835 (linux_wait_for_lwp): Adjust.
4836
8d00225b
YQ
48372012-03-02 Yao Qi <yao@codesourcery.com>
4838
4839 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4840 debug log.
4841
19560ba5
YQ
48422012-03-02 Yao Qi <yao@codesourcery.com>
4843
4844 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4845 `stop_pc' and `tpoint'. Update caller.
4846
1faeff08
MR
48472012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4848
4849 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4850 * linux-low.c (use_linux_regsets): New macro.
4851 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4852 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4853 (linux_register_in_regsets): New function.
4854 (usr_fetch_inferior_registers): Skip registers covered by
4855 regsets.
4856 (usr_store_inferior_registers): Likewise.
4857 (usr_fetch_inferior_registers): New macro.
4858 (usr_store_inferior_registers): Likewise.
4859 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4860 (linux_store_registers): Likewise.
4861 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4862 prototype.
4863 (init_registers_mips64_dsp_linux): Likewise.
4864 (init_registers_mips_linux): New macro.
4865 (init_registers_mips_dsp_linux): Likewise.
4866 (mips_dsp_num_regs): Likewise.
4867 (DSP_BASE, DSP_CONTROL): New fallback macros.
4868 (mips_base_regs): New macro.
4869 (mips_regmap): Use it. Fix the size.
4870 (mips_dsp_regmap): New variable.
4871 (mips_dsp_regset_bitmap): Likewise.
4872 (mips_arch_setup): New function.
4873 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4874 than mips_regmap.
4875 (mips_cannot_store_register): Likewise.
4876 (the_low_target): Update .arch_setup, .num_regs and .regmap
4877 initializers. Add .regset_bitmap initializer.
4878 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4879 initializer.
4880 * linux-bfin-low.c (the_low_target): Likewise.
4881 * linux-cris-low.c (the_low_target): Likewise.
4882 * linux-crisv32-low.c (the_low_target): Likewise.
4883 * linux-ia64-low.c (the_low_target): Likewise.
4884 * linux-m32r-low.c (the_low_target): Likewise.
4885 * linux-m68k-low.c (the_low_target): Likewise.
4886 * linux-ppc-low.c (the_low_target): Likewise.
4887 * linux-s390-low.c (the_low_target): Likewise.
4888 * linux-sh-low.c (the_low_target): Likewise.
4889 * linux-sparc-low.c (the_low_target): Likewise.
4890 * linux-tic6x-low.c (the_low_target): Likewise.
4891 * linux-x86-low.c (the_low_target): Likewise.
4892 * linux-xtensa-low.c (the_low_target): Likewise.
4893 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4894 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4895 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4896 srv_xmlfiles.
4897 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4898 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4899
c03e6ccc
YQ
49002012-02-29 Yao Qi <yao@codesourcery.com>
4901 Pedro Alves <palves@redhat.com>
4902
4903 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4904 `step_over_finished' is true.
4905
644cebc9
PA
49062012-02-27 Pedro Alves <palves@redhat.com>
4907
4908 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4909 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4910
c14d7ab2
PA
49112012-02-27 Pedro Alves <palves@redhat.com>
4912
4913 PR server/9684
4914 * linux-low.c (pid_is_stopped): New.
4915 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4916
412c89dd
LM
49172012-02-25 Luis Machado <lgustavo@codesourcery.com>
4918
4919 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4920 of conditions.
4921
b745defe
MR
49222012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4923
4924 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4925
9f3a5c85
LM
49262012-02-24 Luis Machado <lgustavo@codesourcery>
4927
4928 * server.c (handle_query): Advertise support for target-side
4929 breakpoint condition evaluation.
4930 (process_point_options): New function.
4931 (process_serial_event): When inserting a breakpoint, check for
4932 a target-side condition that should be evaluated.
4933
4934 * mem-break.c: Include regcache.h and ax.h.
4935 (point_cond_list_t): New data structure.
4936 (breakpoint) <cond_list>: New field.
4937 (find_gdb_breakpoint_at): Make non-static.
4938 (delete_gdb_breakpoint_at): Clear any target-side
4939 conditions.
4940 (clear_gdb_breakpoint_conditions): New function.
4941 (add_condition_to_breakpoint): Likewise.
4942 (add_breakpoint_condition): Likewise.
4943 (gdb_condition_true_at_breakpoint): Likewise.
4944 (gdb_breakpoint_here): Return result directly instead
4945 of going through a local variable.
4946
4947 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4948 (clear_gdb_breakpoint_conditions): Likewise.
4949 (add_breakpoint_condition): Likewise.
4950 (gdb_condition_true_at_breakpoint): Likewise.
4951
4952 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4953 (need_step_over_p): Take target-side breakpoint condition into
4954 consideration.
4955
5e1dc496
LM
49562012-02-24 Luis Machado <lgustavo@codesourcery>
4957
4958 * server.h: Include tracepoint.h.
4959 (agent_mem_read, agent_get_trace_state_variable_value,
4960 agent_set_trace_state_variable_value,
4961 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4962 get_set_tsv_func_addr): New prototypes.
4963
4964 * ax.h: New include file.
4965 * ax.c: New source file.
4966
4967 * tracepoint.c: Include ax.h.
4968 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4969 agent_expr, eval_result_type): Move to ax.h.
4970 (parse_agent_expr): Rename to ...
4971 (gdb_parse_agent_expr): ... this, make it non-static and move
4972 to ax.h.
4973 (unparse_agent_expr) Rename to ...
4974 (gdb_unparse_agent_expr): ... this, make it non-static and move
4975 to ax.h.
4976 (eval_agent_expr): Rename to ...
4977 (eval_tracepoint_agent_expr): ... this.
4978 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4979 forward declarations.
4980 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4981 (agent_get_trace_state_variable_value): New function.
4982 (agent_set_trace_state_variable_value): New function.
4983 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4984 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4985 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4986 (condition_true_at_tracepoint): Likewise.
4987 (parse_agent_expr): Rename to ...
4988 (gdb_parse_agent_expr): ... this and move to ax.c.
4989 (unparse_agent_expr): Rename to ...
4990 (gdb_unparse_agent_expr): ... this and move to ax.c.
4991 (gdb_agent_op_name): Move to ax.c.
4992 (eval_agent_expr): Rename to ...
4993 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4994 and move to ax.c.
4995 (eval_tracepoint_agent_expr): New function.
4996 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4997 non-static.
5e1dc496
LM
4998 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4999 ax.c.
5000 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5001 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5002 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5003 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5004 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5005 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5006 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5007 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5008 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5009 (compile_bytecodes): Remove forward declaration.
5010 (is_goto_target): Move to ax.c.
5011 (compile_bytecodes): Move to ax.c and call
5012 agent_get_trace_state_variable_value (...) and
5013 agent_set_trace_state_variable_value (...).
5014
5015 * Makefile.in: Update ax.c and IPA dependencies.
5016
277e4e52
PA
50172012-02-24 Pedro Alves <palves@redhat.com>
5018
5019 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5020 (cmd_bigqtbuffer_circular): ... this. Only handle
5021 'QTBuffer:circular:'.
5022 (handle_tracepoint_general_set): Adjust.
5023
bf4c19f7
YQ
50242012-02-16 Yao Qi <yao@codesourcery.com>
5025
5026 * inferiors.c: Move code to ...
5027 * dll.c: .... here. New.
5028 * server.h: Declare clear_dlls.
5029 * Makefile.in (SFILES): Add dll.c.
5030 (OBS): Add dll.o
5031 (dll.o): New rule.
5032
d73f2619
YQ
50332012-02-11 Yao Qi <yao@codesourcery.com>
5034
5035 * server.c: (handle_monitor_command): Add a new parameter
5036 `own_buf'.
5037 (handle_query): Update caller.
5038
f8255c2a
JB
50392012-02-09 Joel Brobecker <brobecker@adacore.com>
5040
5041 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5042 * configure, config.in: Regenerate.
5043 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5044 is not defined.
5045
da84f473
PA
50462012-02-02 Pedro Alves <palves@redhat.com>
5047
5048 Try SIGKILL first, then PTRACE_KILL.
5049 * linux-low.c (linux_kill_one_lwp): New.
5050 (linux_kill_one_lwp): Rename to ...
5051 (kill_one_lwp_callback): ... this. Use the new
5052 linux_kill_one_lwp.
5053
e886a173
PA
50542012-02-02 Pedro Alves <palves@redhat.com>
5055
5056 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5057 inferior.
5058
be07f1a2
PA
50592012-01-27 Pedro Alves <palves@redhat.com>
5060
5061 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5062 (elf_64_file_p): Make static.
5063 (linux_pid_exe_is_elf_64_file): New.
5064 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5065 Delete declarations.
5066 (linux_pid_exe_is_elf_64_file): Declare.
5067 * linux-x86-low.c (x86_arch_setup): Use
5068 linux_pid_exe_is_elf_64_file.
5069
d8301ad1
JK
50702012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5071
5072 * linux-low.c (linux_wait_for_event_1): Rename to ...
5073 (linux_wait_for_event): ... here and merge it with former
5074 linux_wait_for_event - new variable wait_ptid, use it.
5075 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5076
01b17894
PA
50772012-01-23 Pedro Alves <palves@redhat.com>
5078
5079 * server.c (main): Avoid yet another case of infinite loop while
5080 detaching/killing after a longjmp.
5081
e825046f
JK
50822012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5083
5084 Code cleanup.
5085 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5086
b9e7b9c3
UW
50872012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5088
5089 * hostio.c (handle_readlink): New function.
5090 (handle_vFile): Call it to handle "vFile:readlink" packets.
5091
901f9912
UW
50922012-01-20 Pedro Alves <palves@redhat.com>
5093 Ulrich Weigand <ulrich.weigand@linaro.org>
5094
5095 * server.c (handle_v_requests): Only support vAttach and vRun to
5096 start multiple processes when in extended protocol mode.
5097
fc1ab1a0
PA
50982012-01-17 Pedro Alves <palves@redhat.com>
5099
5100 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5101 memalign plus mprotect to allocate the scratch buffer.
5102
7d5d4e98
PA
51032012-01-13 Pedro Alves <palves@redhat.com>
5104
5105 * server.c (attach_inferior): Clear `cont_thread'.
5106
f128d5e9
PA
51072012-01-13 Pedro Alves <palves@redhat.com>
5108
5109 * server.c (main): Avoid infinite loop while detaching/killing
5110 after a longjmp.
5111
06db92f0
DE
51122012-01-09 Doug Evans <dje@google.com>
5113
5114 * server.c (start_inferior): Set last_ptid in --wrapper case.
5115
32d92999
YQ
51162012-01-06 Yao Qi <yao@codesourcery.com>
5117
5118 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5119 defined.
5120 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5121
5e0a92a9
YQ
51222012-01-04 Yao Qi <yao@codesourcery.com>
5123
5124 * tracepoint.c (cmd_qtdp): Print debug message
5125 for static tracepoint.
5126
ae639e8c
YQ
51272012-01-04 Yao Qi <yao@codesourcery.com>
5128
5129 * tracepoint.c (trace_vdebug): Differentiate debug message
5130 between gdbserver and IPA.
5131
f72429c5
YQ
51322012-01-03 Yao Qi <yao@codesourcery.com>
5133
5134 * tracepoint.c (tracepoint_was_hit): Don't collect for
5135 static tracepoint.
5136
12c3e59c
JB
51372012-01-02 Joel Brobecker <brobecker@adacore.com>
5138
5139 * terminal.h: Reformat copyright header.
5140
67827812
JB
51412012-01-02 Joel Brobecker <brobecker@adacore.com>
5142
5143 * server.c (gdbserver_version): Update copyright year.
5144 * gdbreplay.c (gdbreplay_version): Likewise.
5145
3e52c33d
JK
51462011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5147
5148 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5149
5150 Revert:
5151 2011-12-18 Hui Zhu <teawater@gmail.com>
5152 * linux-low.c (linux_create_inferior): Save return value to ret.
5153
66f1260e
HZ
51542011-12-18 Hui Zhu <teawater@gmail.com>
5155
5156 * linux-low.c (linux_create_inferior): Save return value to ret.
5157
e77616d7
DE
51582011-12-16 Doug Evans <dje@google.com>
5159
e7b06c57
DE
5160 * linux-low.c (linux_create_inferior): If stdio connection,
5161 redirect stdin from /dev/null, stdout to stderr.
5162 * remote-utils.c (remote_is_stdio): New static global.
5163 (remote_connection_is_stdio): New function.
5164 (remote_prepare): Handle stdio connection.
5165 (remote_open): Ditto.
5166 (remote_close): Don't close stdin for stdio connections.
5167 (read_prim,write_prim): New functions. Replace all calls to
5168 read/write to these.
5169 * server.c (main): Watch for "-" argument. Move call to
5170 remote_prepare before start_inferior.
5171 * server.h (STDIO_CONNECTION_NAME): New macro.
5172 (remote_connection_is_stdio): Declare.
5173
e77616d7
DE
5174 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5175 in debugging output.
5176
82067193
YQ
51772011-12-15 Yao Qi <yao@codesourcery.com>
5178
5179 * tracepoint.c: Include sys/syscall.h.
5180 (gdb_ust_thread): Remove preprocessor conditional.
5181
82bfbe7e
PA
51822011-12-14 Pedro Alves <pedro@codesourcery.com>
5183
5184 * linux-low.c (linux_detach_one_lwp): Call
5185 the_low_target.prepare_to_resume before detaching.
5186
712c6575
YQ
51872011-12-14 Yao Qi <yao@codesourcery.com>
5188
5189 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5190 of write.
5191
d54d1edf
YQ
51922011-12-14 Yao Qi <yao@codesourcery.com>
5193
5194 * i386-low.c (i386_low_stopped_data_address): Initialize local
5195 variable `control'.
5196
6210a125
PA
51972011-12-13 Pedro Alves <pedro@codesourcery.com>
5198
5199 PR remote/13492
5200
5201 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5202 DR_CONTROL unless necessary. Extend comments.
5203 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5204 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5205
2ece8244
YQ
52062011-12-13 Yao Qi <yao@codesourcery.com>
5207
5208 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5209 macros.
5210 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5211
784867a5
JK
52122011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5213
5214 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5215 Print new debug message for such case.
5216
6bf36717
JK
52172011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5218
5219 Fix overlapping memcpy.
5220 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5221 the read_inferior_memory transfer.
5222 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5223 write_inferior_memory transfer.
5224 (set_fast_tracepoint_jump): New variable buf. Use it for the
5225 read_inferior_memory and write_inferior_memory transfers.
5226 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5227 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5228 Use it for the write_inferior_memory transfer.
5229 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5230 buffers.
5231
50275556
MR
52322011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5233
5234 * linux-low.c (fetch_register, store_register): Make code
5235 consistent, fix formatting.
5236
7325beb4
MR
52372011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5238
5239 * linux-low.c (usr_store_inferior_registers): Factor out code
5240 to handle individual registers into...
5241 (store_register): ... this new function.
5242
c642a434
UW
52432011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5244
5245 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5246 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5247 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5248 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5249 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5250 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5251 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5252 (srv_xmlfiles): Add new XML files.
5253
5254 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5255 and <sys/uio.h>.
5256 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5257 (init_registers_s390_linux32v1): Add prototype.
5258 (init_registers_s390_linux32v2): Likewise.
5259 (init_registers_s390_linux64v1): Likewise.
5260 (init_registers_s390_linux64v2): Likewise.
5261 (init_registers_s390x_linux64v1): Likewise.
5262 (init_registers_s390x_linux64v2): Likewise.
5263 (s390_num_regs): Increment to 52.
5264 (s390_regmap): Add orig_r2 register.
5265 (s390_num_regs_3264): Increment to 68.
5266 (s390_regmap_3264): Add orig_r2 register.
5267 (s390_collect_ptrace_register): Handle orig_r2 register.
5268 (s390_supply_ptrace_register): Likewise.
5269 (s390_fill_last_break): New function.
5270 (s390_store_last_break): Likewise.
5271 (s390_fill_system_call): New function.
5272 (s390_store_system_call): Likewise.
5273 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5274 register sets.
5275 (s390_check_regset): New function.
5276 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5277 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5278 Update target_regsets for available register sets.
5279
2268b414
JK
52802011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5281 Jan Kratochvil <jan.kratochvil@redhat.com>
5282
5283 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5284 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5285 New.
5286 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5287 * linux-low.h (struct process_info_private): New member r_debug.
5288 * server.c (handle_qxfer_libraries): Call
5289 the_target->qxfer_libraries_svr4.
5290 (handle_qxfer_libraries_svr4): New function.
5291 (qxfer_packets): New entry "libraries-svr4".
5292 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5293 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5294 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5295 PACKET_qXfer_libraries_svr4.
5296
d6db1fab
UW
52972011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5298
5299 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5300 PSW address/mask between 8-byte and 16-byte formats.
5301 (s390_supply_ptrace_register): Likewise.
5302 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5303 basic addressing mode bit.
5304
242f5f1c
SS
53052011-11-24 Stan Shebs <stan@codesourcery.com>
5306
5307 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5308
f196051f
SS
53092011-11-17 Stan Shebs <stan@codesourcery.com>
5310
5311 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5312 (tracing_start_time): New global.
5313 (tracing_stop_time): New global.
5314 (tracing_user_name): New global.
5315 (tracing_notes): New global.
5316 (tracing_stop_note): New global.
5317 (cmd_qtstart): Set traceframe_usage, start_time.
5318 (stop_tracing): Set stop_time.
5319 (cmd_qtstatus): Report additional status.
5320 (cmd_qtp): New function.
5321 (handle_tracepoint_query): Call it.
5322 (cmd_qtnotes): New function.
5323 (handle_tracepoint_general_set): Call it.
5324 (get_timestamp): Rename from tsv_get_timestamp.
5325
405f8e94
SS
53262011-11-14 Stan Shebs <stan@codesourcery.com>
5327 Kwok Cheung Yeung <kcy@codesourcery.com>
5328
5329 * linux-x86-low.c (small_jump_insn): New.
5330 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5331 trampoline and error message, build a trampoline and issue a small
5332 jump instruction to it.
5333 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5334 trampoline and error message.
5335 (x86_get_min_fast_tracepoint_insn_len): New.
5336 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5337 * linux-low.h (struct linux_target_ops): Add arguments to
5338 install_fast_tracepoint_jump_pad operation, add new operation.
5339 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5340 arguments.
5341 (linux_get_min_fast_tracepoint_insn_len): New function.
5342 (linux_target_op): Add new operation.
5343 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5344 (gdb_trampoline_buffer_end): Ditto.
5345 (gdb_trampoline_buffer_error): Ditto.
5346 (struct ipa_sym_addresses): Add fields for new IPA variables.
5347 (symbol_list): Add entries for new IPA variables.
5348 (struct tracepoint): Add fields to hold the address range of the
5349 trampoline used by the tracepoint.
5350 (trampoline_buffer_head): New static variable.
5351 (trampoline_buffer_tail): Ditto.
5352 (claim_trampoline_space): New function.
5353 (have_fast_tracepoint_trampoline_buffer): New function.
5354 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5355 structure.
5356 (install_fast_tracepoint): Ditto, also add error buffer argument.
5357 (cmd_qtminftpilen): New function.
5358 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5359 (fast_tracepoint_from_trampoline_address): New function.
5360 (fast_tracepoint_collecting): Handle trampoline as part of jump
5361 pad space.
5362 (set_trampoline_buffer_space): New function.
5363 (initialize_tracepoint): Initialize new IPA variables.
5364 * target.h (struct target_ops): Add arguments to
5365 install_fast_tracepoint_jump_pad operation, add new
5366 get_min_fast_tracepoint_insn_len operation.
5367 (target_get_min_fast_tracepoint_insn_len): New.
5368 (install_fast_tracepoint_jump_pad): Add arguments.
5369 * server.h (IPA_BUFSIZ): Define.
5370 * linux-i386-ipa.c: Include extra header files.
5371 (initialize_fast_tracepoint_trampoline_buffer): New function.
5372 (initialize_low_tracepoint): Call it.
5373 * server.h (set_trampoline_buffer_space): Declare.
5374 (claim_trampoline_space): Ditto.
5375 (have_fast_tracepoint_trampoline_buffer): Ditto.
5376
1e4d1764
YQ
53772011-11-14 Yao Qi <yao@codesourcery.com>
5378
5379 * server.c (handle_query): Handle InstallInTrace for qSupported.
5380 * tracepoint.c (add_tracepoint): Sort list.
5381 (install_tracepoint, download_tracepoint): New.
5382 (cmd_qtdp): Call them to install and download tracepoints.
5383 (sort_tracepoints): Removed.
5384 (cmd_qtstart): Update.
5385
5c73ff4e
YQ
53862011-11-14 Yao Qi <yao@codesourcery.com>
5387
5388 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5389 * mem-break.h: Declare.
5390 * tracepoint.c (cmd_qtstart): Move some code to ...
5391 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5392 New.
5393 (download_tracepoints): Move some code to ...
5394 (download_tracepoint_1): ... here. New.
5395
86a30030
YQ
53962011-11-08 Yao Qi <yao@codesourcery.com>
5397
5398 * remote-utils.c (relocate_instruction): A comment fix.
5399
8d26e50c
JB
54002011-11-07 Joel Brobecker <brobecker@adacore.com>
5401
5402 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5403 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5404 dr_status_mirror and dr_control_mirror from debug_reg_state.
5405 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5406 (i386_initial_stuff): Remove use of deleted globals.
5407 (i386_get_thread_context, i386_set_thread_context,
5408 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5409 from debug_reg_state.
5410
a59306a3
YQ
54112011-11-05 Yao Qi <yao@codesourcery.com>
5412
5413 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5414 address as TPOINT's.
5415
3065dfb6
SS
54162011-11-02 Stan Shebs <stan@codesourcery.com>
5417
5418 * tracepoint.c (agent_mem_read_string): New function.
5419 (eval_agent_expr): Call it for tracenz.
5420 * server.c (handle_query): Report support for tracenz.
5421
fd0d8c7c
YQ
54222011-11-02 Yao Qi <yao@codesourcery.com>
5423
5424 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5425
609086b1
YQ
54262011-11-02 Yao Qi <yao@codesourcery.com>
5427
5428 * target.h: Fix a typo in comment.
5429
b9fd1791
PA
54302011-10-31 Pedro Alves <pedro@codesourcery.com>
5431
5432 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5433 clobber the breakpoints' shadows with fast tracepoint jumps.
5434 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5435 * target.c (write_inferior_memory): Also pass MYADDR down to
5436 check_mem_write.
5437
03583c20
UW
54382011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5439
5440 * configure.ac: Check support for personality routine.
5441 * configure: Regenerate.
5442 * config.in: Likewise.
5443 * linux-low.c: Include <sys/personality.h>.
5444 Define ADDR_NO_RANDOMIZE if necessary.
5445 (linux_create_inferior): Disable address space randomization when
5446 forking inferior, if requested.
5447 (linux_supports_disable_randomization): New function.
5448 (linux_target_ops): Install it.
5449 * server.h (disable_randomization): Declare.
5450 * server.c (disable_randomization): New global variable.
5451 (handle_general_set): Handle QDisableRandomization.
5452 (handle_query): Likewise for qSupported.
5453 (main): Support --disable-randomization and --no-disable-randomization
5454 command line arguments.
5455 * target.h (struct target_ops): Add supports_disable_randomization.
5456 (target_supports_disable_randomization): New macro.
5457
723b724b
MF
54582011-09-29 Mike Frysinger <vapier@gentoo.org>
5459
5460 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5461 ifdef check.
5462 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5463 [!PT_GETDSBT] (target_loadmap): New definition.
5464 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5465 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5466 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5467 and PT_GETDSBT to LINUX_LOADMAP.
5468 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5469 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5470
55329a5c 54712011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5472
5473 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5474 (arm_linux_hwbp_cap): New static variable.
5475 (arm_linux_get_hwbp_cap): Replace by ...
5476 (arm_linux_init_hwbp_cap): ... this new function.
5477 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5478 (arm_linux_get_hw_watchpoint_count): Likewise.
5479 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5480 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5481 (arm_prepare_to_resume): Use perror_with_name instead of error.
5482
55329a5c 54832011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5484
5485 * linux-arm-low.c: Include <signal.h>.
5486 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5487 (struct arm_linux_hwbp_cap): New data type.
5488 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5489 (struct arm_linux_hw_breakpoint): New data type.
5490 (MAX_BPTS, MAX_WPTS): Define.
5491 (struct arch_process_info, struct arch_lwp_info): New data types.
5492 (arm_linux_get_hwbp_cap): New function.
5493 (arm_linux_get_hw_breakpoint_count): Likewise.
5494 (arm_linux_get_hw_watchpoint_count): Likewise.
5495 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5496 (arm_hwbp_control_initialize): Likewise.
5497 (arm_hwbp_control_is_enabled): Likewise.
5498 (arm_hwbp_control_is_initialized): Likewise.
5499 (arm_hwbp_control_disable): Likewise.
5500 (arm_linux_hw_breakpoint_equal): Likewise.
5501 (arm_linux_hw_point_initialize): Likewise.
5502 (struct update_registers_data): New data structure.
5503 (update_registers_callback: New function.
5504 (arm_insert_point): Likewise.
5505 (arm_remove_point): Likewise.
5506 (arm_stopped_by_watchpoint): Likewise.
5507 (arm_stopped_data_address): Likewise.
5508 (arm_new_process): Likewise.
5509 (arm_new_thread): Likewise.
5510 (arm_prepare_to_resume): Likewise.
5511 (the_low_target): Register arm_insert_point, arm_remove_point,
5512 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5513 arm_new_thread, and arm_prepare_to_resume.
5514
6b9801d4
SS
55152011-09-15 Stan Shebs <stan@codesourcery.com>
5516
5517 * server.h (struct emit_ops): Add compare-goto fields.
5518 * tracepoint.c (gdb_agent_op_sizes): New table.
5519 (emit_eq_goto): New function.
5520 (emit_ne_goto): New function.
5521 (emit_lt_goto): New function.
5522 (emit_le_goto): New function.
5523 (emit_gt_goto): New function.
5524 (emit_ge_goto): New function.
5525 (is_goto_target): New function.
5526 (compile_bytecodes): Recognize special cases of compare-goto
5527 combinations and call specialized emitters for them.
5528 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5529 (amd64_emit_ne_goto): New function.
5530 (amd64_emit_lt_goto): New function.
5531 (amd64_emit_le_goto): New function.
5532 (amd64_emit_gt_goto): New function.
5533 (amd64_emit_ge_goto): New function.
5534 (amd64_emit_ops): Add the new functions.
5535 (i386_emit_eq_goto): New function.
5536 (i386_emit_ne_goto): New function.
5537 (i386_emit_lt_goto): New function.
5538 (i386_emit_le_goto): New function.
5539 (i386_emit_gt_goto): New function.
5540 (i386_emit_ge_goto): New function.
5541 (i386_emit_ops): Add the new functions.
5542
bf15cbda
SS
55432011-09-08 Stan Shebs <stan@codesourcery.com>
5544
5545 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5546 (i386_emit_epilogue): Restore %ebx.
5547
943ca1dd
JZ
55482011-08-31 Jie Zhang <jzhang918@gmail.com>
5549
5550 * server.c (step_thread): Remove definition.
5551 (process_serial_event): Don't handle Hs.
5552 * server.h (step_thread): Remove declaration.
5553 * target.c (set_desired_inferior): Remove use of step_thread.
5554
e3deef73
LM
55552011-08-24 Luis Machado <lgustavo@codesourcery.com>
5556
5557 * linux-low.c: Include linux-procfs.h.
5558 (linux_attach_lwp_1): Update comments.
5559 (linux_attach): Scan for existing threads when attaching to a
5560 process that is the tgid.
5561 * Makefile.in: Update dependencies.
5562
13da1c97
LM
55632011-08-24 Luis Machado <lgustavo@codesourcery.com>
5564
5565 * configure.srv: Add linux-procfs.o dependencies.
5566
881127c9
YQ
55672011-08-14 Yao Qi <yao@codesourcery.com>
5568
5569 * target.h (struct target_ops): Fix indent.
5570 * win32-low.c (win32_target_ops): Fix comment.
5571
58dbd541
YQ
55722011-08-14 Andrew Jenner <andrew@codesourcery.com>
5573 Yao Qi <yao@codesourcery.com>
5574
5575 * Makefile.in (clean): Remove tic6x-*.c files.
5576 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5577 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5578 (tic6x-c64xp-linux.c): Likewise.
5579 * configure.srv: Add support for tic6x-*-uclinux.
5580 * linux-tic6x-low.c: New.
5581 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5582
78d85199
YQ
55832011-08-14 Andrew Stubbs <ams@codesourcery.com>
5584 Yao Qi <yao@codesourcery.com>
5585
5586 * target.h (struct target_ops): Add read_loadmap.
5587 * linux-low.c (struct target_loadseg): New type.
5588 (struct target_loadmap): New type.
5589 (linux_read_loadmap): New function.
5590 (linux_target_ops): Add linux_read_loadmap.
5591 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5592 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5593 to NULL.
78d85199 5594
a959a88d
EZ
55952011-08-05 Eli Zaretskii <eliz@gnu.org>
5596
5597 * win32-low.c: Include <stdint.h>.
5598
1ced966e
PA
55992011-07-22 Pedro Alves <pedro@codesourcery.com>
5600
5601 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5602 to the inferior here.
5603 (i386_remove_aligned_watchpoint): Ditto.
5604 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5605 fit part of the watchpoint in the debug registers.
5606 (i386_update_inferior_debug_regs): New.
5607 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5608 registers, and only update the inferior on success.
5609 (i386_low_remove_watchpoint): Ditto.
5610
d26e3629
KY
56112011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5612
5613 * linux-low.c (compare_ints, unique, list_threads, show_process,
5614 linux_core_of_thread): Delete.
5615 (linux_target_ops): Change linux_core_of_thread to
5616 linux_common_core_of_thread.
5617 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5618 * utils.c (malloc_failure): Change type of argument.
5619 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5620 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5621 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5622 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5623 (IPA_OBJS): Add common-utils-ipa.o.
5624 (ptid_h, linux_osdata_h): New macros.
5625 (server_h): Add common/common-utils.h, common/xml-utils.h,
5626 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5627 common/ptid.h.
5628 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5629 ptid.o, buffer.o): New rules.
5630 (linux-low.o): Add common/linux-osdata.h as a dependency.
5631 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5632 * configure.ac: Add AC_HEADER_DIRENT check.
5633 * config.in: Regenerate.
5634 * configure: Regenerate.
5635 * remote-utils.c (xml_escape_text): Delete.
5636 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5637 buffer_xml_printf): Move to common/buffer.c.
5638 * server.c (main): Remove call to initialize_inferiors.
5639 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5640 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5641 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5642 internal_error, gdb_assert, gdb_assert_fail): Delete.
5643 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5644 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5645 common/buffer.h.
5646 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5647 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5648 initialize_inferiors): Delete.
5649
2275a1a7
PA
56502011-07-20 Pedro Alves <pedro@codesourcery.com>
5651
5652 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5653 symbol error.
5654
0a5b1e09
PA
56552011-05-31 Pedro Alves <pedro@codesourcery.com>
5656
5657 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5658 assertion.
5659 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5660
6938fd34
YQ
56612011-05-26 Yao Qi <yao@codesourcery.com>
5662
5663 * Makefile.in (thread-db.o): Track dependence to
5664 common/gdb_thread_db.h.
5665 * thread-db.c: include gdb_thread_db.h from right place.
5666
b481f9e0
TT
56672011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5668
5669 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5670 __FILE__ and __LINE__ to internal_error.
5671
98a5dd13
DE
56722011-05-13 Doug Evans <dje@google.com>
5673
5674 * thread-db.c (try_thread_db_load_from_sdir): New function.
5675 (try_thread_db_load_from_dir): New function.
5676 (thread_db_load_search): Handle $sdir, ignore $pdir.
5677 Remove trying of system directories if search of
5678 libthread-db-search-path fails, that is now done via $sdir.
5679
d248b706
KY
56802011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5681
5682 * server.c (handle_query): Add EnableDisableTracepoints to the list
5683 of supported features.
43aaf8b6 5684 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5685 tracepoints.
43aaf8b6
PA
5686 (cmd_qtenable_disable): New.
5687 (cmd_qtstart): Install tracepoints even if disabled.
5688 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5689 receiving a QTEnable or QTDisable packet.
5690 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5691 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5692 tracepoints.
5693 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5694
84e578fb
DE
56952011-05-10 Doug Evans <dje@google.com>
5696
5697 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5698
71f55dd8
DE
56992011-05-04 Doug Evans <dje@google.com>
5700
5701 * linux-low.c (linux_join): Skip process lookup.
5702 * spu-low.c (spu_join): Ditto.
5703 * server.c (join_inferiors_callback): Delete.
5704 (process_serial_event): For 'D' packet (detach) call join_inferior
5705 directly.
5706
4d393d60
JM
57072011-05-04 Joseph Myers <joseph@codesourcery.com>
5708
5709 * README: Don't mention xscale*-*-linux*.
5710 * configure.srv (xscale*-*-linux*): Don't handle target.
5711
b00ad6ff
NF
57122011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5713
5714 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5715 casting pointers.
5716 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5717 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5718 (i386_emit_void_call_2): Likewise.
5719
af96c192
YQ
57202011-04-26 Yao Qi <yao@codesourcery.com>
5721
43aaf8b6
PA
5722 * linux-low.c: Move common macros to linux-ptrace.h.
5723 Include linux-ptrace.h.
af96c192
YQ
5724 * Makefile.in (linux_ptrace_h): New.
5725 (linux-low.o): Depends on linux-ptrace.h.
5726
03f2bd59
JK
57272011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5728
5729 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5730 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5731 (remote_prepare): New function with most of the TCP code from ...
5732 (remote_open): ... here. Detect PORT here unconditionally. Move also
5733 setting transport_is_reliable.
5734 * server.c (run_once): New variable.
5735 (gdbserver_usage): Document it.
5736 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5737 the first run if RUN_ONCE.
5738 * server.h (run_once, remote_prepare): New declarations.
5739
7a9dd1b2
TT
57402011-04-19 Tom Tromey <tromey@redhat.com>
5741
5742 * win32-low.c (handle_load_dll): Remove duplicate "the".
5743
81239425
PM
57442011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5745
5746 Remove support for old Cygwin 1.5 versions.
5747 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5748 function to avoid warning.
5749 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5750 warning.
5751
9e0627f1
PM
57522011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5753
5754 * gdbserver/server.h (Macro _): Define it if not available.
5755
588eebee
MS
57562011-03-14 Michael Snyder <msnyder@vmware.com>
5757
348af9f7 5758 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5759
43f70d4c
JB
57602011-03-10 Joel Brobecker <brobecker@adacore.com>
5761
5762 * Makefile.in (maintainer-clean realclean distclean): Remove
5763 "make ... subdir_do" command.
5764
348af9f7
MS
57652011-03-10 Michael Snyder <msnyder@vmware.com>
5766
5767 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5768
5769 * server.c (handle_v_run): Free alloced buffer on early return.
5770
e637a4f5
YQ
57712011-03-09 Yao Qi <yao@codesourcery.com>
5772
5773 Revert:
5774 2011-03-04 Yao Qi <yao@codesourcery.com>
5775
5776 * Makefile.in: Remove GNU make feature --directory.
5777
5778 2011-03-05 Yao Qi <yao@codesourcery.com>
5779
5780 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5781 (subdir_do): New make target. Copied from gdb/Makefile.
5782 (maintainer-clean, realclean, distclean, clean): Call corresponding
5783 make targets in common/Makefile.
5784
5785 2011-02-11 Yao Qi <yao@codesourcery.com>
5786
5787 * configure.ac: Call AC_PROG_RANLIB.
5788 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5789 * configure: Regenerate.
5790
e6edda56
JK
57912011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5792
5793 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5794
e5141119
JB
57952011-03-06 Yao Qi <yao@codesourcery.com>
5796
5797 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5798
64794aa4
JB
57992011-03-05 Yao Qi <yao@codesourcery.com>
5800
5801 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5802 (subdir_do): New make target. Copied from gdb/Makefile.
5803 (maintainer-clean, realclean, distclean, clean): Call corresponding
5804 make targets in common/Makefile.
5805
7a762829
YQ
58062011-03-04 Yao Qi <yao@codesourcery.com>
5807
5808 * Makefile.in: Remove GNU make feature --directory.
5809
348af9f7
MS
58102011-03-04 Michael Snyder <msnyder@vmware.com>
5811
5812 * server.c (queue_stop_reply): Call xmalloc not malloc.
5813
58142011-03-02 Michael Snyder <msnyder@vmware.com>
5815
5816 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5817
9f72fee2
MS
58182011-02-28 Michael Snyder <msnyder@vmware.com>
5819
588eebee
MS
5820 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5821 (cmd_qtframe): Ditto.
5822 (cmd_qtbuffer): Ditto.
5823 (cmd_bigqtbuffer): Ditto.
5824
9f72fee2
MS
5825 * utils.c (decimal2str): Initialize 'width' to nine, then
5826 don't mess with it.
5827
8040bd49
UW
58282011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5829
5830 * hostio.c (require_data): Free *data, not data.
5831
7e52cbd0
JK
58322011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5833
5834 * hostio.c (require_data): Use free, not xfree.
5835
9130f83e
MS
58362011-02-27 Michael Snyder <msnyder@vmware.com>
5837
4b812f4e
MS
5838 * server.c (handle_query): Discard unused value.
5839
9130f83e
MS
5840 * hostio.c (require_data): Free malloc memory before returning
5841 error.
5842
69d37113
MS
58432011-02-26 Michael Snyder <msnyder@vmware.com>
5844
5845 * linux-low.c (list_threads): Call closedir for dirent.
5846
35f5825a
MS
58472011-02-27 Michael Snyder <msnyder@vmware.com>
5848
2a589cef
MS
5849 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5850 a case statement falls through.
5851
0adea5f7
MS
5852 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5853
35f5825a
MS
5854 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5855 in comparison.
5856
238f1c74
MS
58572011-02-26 Michael Snyder <msnyder@vmware.com>
5858
5859 * utils.c (decimal2str): Eliminate dead code and dead param.
5860 (pulongest): Drop dead param from call to decimal2str.
5861 (plongest): Ditto.
5862
633ff500
JB
58632011-02-24 Joel Brobecker <brobecker@adacore.com>
5864
5865 Revert the following patch (not approved yet):
5866 2011-02-21 Hui Zhu <teawater@gmail.com>
5867 * tracepoint.c (tp_printf): New function.
5868 (eval_agent_expr): Handle gdb_agent_op_printf.
5869
f9c6ff72
HZ
58702011-02-21 Hui Zhu <teawater@gmail.com>
5871
5872 * tracepoint.c (tp_printf): New function.
5873 (eval_agent_expr): Handle gdb_agent_op_printf.
5874
94d5e490
TT
58752011-02-18 Tom Tromey <tromey@redhat.com>
5876
5877 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5878 (tracepoint.o): Likewise.
5879 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5880 (gdb_agent_op_names): Likewise.
5881
c7f96d2b
TT
58822011-02-18 Tom Tromey <tromey@redhat.com>
5883
5884 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5885 gdb_agent_op_rot>: New constants.
5886 (gdb_agent_op_names): Add pick and roll.
5887 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5888 cases.
5889
0feedb2c
JK
58902011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5891
5892 * aclocal.m4: Regenerated with aclocal-1.11.1.
5893
b3b9301e
PA
58942011-02-14 Pedro Alves <pedro@codesourcery.com>
5895
5896 * server.c (handle_qxfer_traceframe_info): New.
5897 (qxfer_packets): Register "traceframe-info".
5898 (handle_query): Report support for qXfer:traceframe-info:read+.
5899 * tracepoint.c (match_blocktype): New.
5900 (traceframe_find_block_type): Rename to ...
5901 (traceframe_walk_blocks): ... this. Add callback filter argument,
5902 and use it.
5903 (traceframe_find_block_type): New, reimplemented on top of
5904 traceframe_walk_blocks.
5905 (build_traceframe_info_xml): New.
5906 (traceframe_read_info): New.
5907 * server.h (traceframe_read_info): Declare.
5908
4f3e6fb7
YQ
59092011-02-11 Yao Qi <yao@codesourcery.com>
5910
5911 * configure.ac: Call AC_PROG_RANLIB.
5912 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5913 * configure: Regenerate.
5914
764880b7
PA
59152011-02-07 Pedro Alves <pedro@codesourcery.com>
5916
5917 * server.c (gdb_read_memory): Change return semantics to allow
5918 partial transfers.
5919 (handle_search_memory_1): Adjust.
5920 (process_serial_event) <'m' packet>: Handle partial transfers.
5921 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5922
1c79eb8a
PA
59232011-01-28 Pedro Alves <pedro@codesourcery.com>
5924
5925 * regcache.c (init_register_cache): Initialize
5926 regcache->register_status.
5927 (free_register_cache): Release regcache->register_status.
5928 (regcache_cpy): Copy register_status.
5929 (registers_to_string): Print 'x's for unavailable registers.
5930 (supply_register): Mark the register's status valid or
5931 unavailable, depending on whether a buffer was passed in or not.
5932 (supply_register_zeroed): New.
5933 (supply_regblock): Mark the registers' status valid or
5934 unavailable, depending on whether a buffer was passed in or not.
5935 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5936 (struct regcache): New `register_status' field.
5937 (supply_register_zeroed): Declare.
5938 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5939 supply_register_zeroed, rather than passing a NULL buffer to
5940 supply_register.
5941 * tracepoint.c (fetch_traceframe_registers): Update comment.
5942
85724a0e
PA
59432011-01-28 Pedro Alves <pedro@codesourcery.com>
5944
5945 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5946 buffer explicit.
5947
d08aafef
PA
59482011-01-25 Pedro Alves <pedro@codesourcery.com>
5949
5950 * server.h (decode_xfer_write): Change prototype.
5951 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5952 and don't extract the annex here.
5953 * server.c (decode_xfer_read): Remove `annex' parameter,
5954 and don't extract the annex here.
5955 (decode_xfer): New.
5956 (struct qxfer): New.
5957 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5958 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5959 (handle_qxfer_statictrace): New functions, abstracted out from
5960 handle_query, and made to use the struct qxfer interface.
5961 (handle_threads_qxfer_proper): Rename to ...
5962 (handle_qxfer_threads_proper): ... this.
5963 (handle_threads_qxfer): Rename to ...
5964 (handle_qxfer_threads): ... this. Adjust.
5965 (qxfer_packets): New array.
5966 (handle_qxfer): New function.
5967 (handle_query): Use handle_qxfer.
5968
493e2a69
MS
59692011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5970
5971 * gdbreplay.c: Shorten lines of >= 80 columns.
5972 * linux-low.c: Ditto.
5973 * linux-ppc-low.c: Ditto.
5974 * linux-s390-low.c: Ditto.
5975 * linux-sparc-low.c: Ditto.
5976 * linux-x86-low.c: Ditto.
5977 * linux-xtensa-low.c: Ditto.
5978 * mem-break.c: Ditto.
5979 * nto-low.c: Ditto.
5980 * regcache.h: Ditto.
5981 * remote-utils.c: Ditto.
5982 * server.c: Ditto.
5983 * server.h: Ditto.
5984 * thread-db.c: Ditto.
5985 * tracepoint.c: Ditto.
5986 * utils.c: Ditto.
5987 * win32-low.h: Ditto.
5988
44944448
JB
59892011-01-05 Joel Brobecker <brobecker@adacore.com>
5990
5991 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5992 update.
5993
71ce852c
JB
59942011-01-01 Joel Brobecker <brobecker@adacore.com>
5995
5996 * server.c (gdbserver_version): Update copyright year in version
5997 output.
5998 * gdbreplay.c (gdbreplay_version): Ditto.
5999
eb826dc6
MF
60002010-12-29 Jie Zhang <jie.zhang@analog.com>
6001
6002 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6003 * linux-bfin-low.c: New file.
6004 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6005 PT_DATA_ADDR for BFIN targets.
6006 * Makefile.in (SFILES): Add linux-bfin-low.c.
6007 (clean): Remove reg-bfin.c.
6008 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6009 * README: Mention supported Blackfin targets.
6010
39ab222a
MF
60112010-12-23 Mike Frysinger <vapier@gentoo.org>
6012
6013 * .gitignore: New file.
6014
a1f2ce7d
MF
60152010-11-16 Mike Frysinger <vapier@gentoo.org>
6016
6017 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6018
f474844c
JZ
60192010-10-22 Jie Zhang <jie@codesourcery.com>
6020
6021 * Makefile.in: Add FLAGS_TO_PASS variable.
6022 (install): Remove dependency of install-only and recursively
6023 invoke make for install-only.
6024
f1048712
DE
60252010-10-04 Doug Evans <dje@google.com>
6026
6027 * Makefile.in (uninstall): Use $(DESTDIR).
6028
b53a1623
PA
60292010-09-24 Pedro Alves <pedro@codesourcery.com>
6030
e6ee044d
PA
6031 PR gdb/11842
6032
b53a1623
PA
6033 * linux-x86-low.c (compat_siginfo_from_siginfo)
6034 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6035 si_code is < 0. Check for si_code == SI_TIMER before checking for
6036 si_code < 0.
6037
fa1bd1e4
JB
60382010-09-13 Joel Brobecker <brobecker@adacore.com>
6039
6040 * lynx-i386-low.c: New file.
6041 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6042
47fac8f8
JB
60432010-09-13 Joel Brobecker <brobecker@adacore.com>
6044
6045 * lynx-low.c (ptrace_request_to_str): Remove handling for
6046 request values that have been removed in LynxOS 5.x.
6047
1adfc54d
JB
60482010-09-13 Joel Brobecker <brobecker@adacore.com>
6049
6050 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6051 <ptrace.h>
6052
c2a66c29
NS
60532010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6054
6055 * configure.ac: Add --enable-inprocess-agent option.
6056 * configure: Rebuilt.
6057
32fcada3
YQ
60582010-09-06 Yao Qi <yao@codesourcery.com>
6059
6060 * linux-low.c (linux_kill): Remove unused variable.
6061 (linux_stabilize_threads): Likewise.
6062 * server.c (start_inferior): Likewise.
6063 (queue_stop_reply_callback): Likewise.
6064 * tracepoint.c (do_action_at_tracepoint): Likewise.
6065
0cccb683
YQ
60662010-09-06 Yao Qi <yao@codesourcery.com>
6067
6068 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6069 on return.
6070
423ec54c
JK
60712010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6072
6073 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6074
12ac6819
PA
60752010-09-06 Pedro Alves <pedro@codesourcery.com>
6076
6077 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6078 "$(IPA_DEPFILES)".
6079
8ed54b31
JB
60802010-09-01 Joel Brobecker <brobecker@adacore.com>
6081
6082 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6083 gdbserver/lynx-ppc-low.c: New files.
6084 * Makefile.in (lynx_low_h): New variable.
6085 (lynx-low.o, lynx-ppc-low.o): New rules.
6086 * configure.ac: On LynxOS, link with -lnetinet.
6087 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6088 * configure: regenerate.
6089
bb0116a4
JB
60902010-09-01 Joel Brobecker <brobecker@adacore.com>
6091
6092 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6093 * configure.ac: Add check for vasprintf and vsnprintf.
6094 * configure, config.in: Regenerate.
6095 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6096
a778ab81 60972010-09-01 Joel Brobecker <brobecker@adacore.com>
6098
6099 * gdbreplay.c: Move include of alloca.h up, next to include of
6100 malloc.h.
6101 * server.h: Add include of malloc.h.
6102 * mem-break.c: Remove include of malloc.h.
6103 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6104
8b034a19 61052010-09-01 Joel Brobecker <brobecker@adacore.com>
6106
6107 * Makefile.in (memmem.o): Build with -Wno-error.
6108
61092010-09-01 Joel Brobecker <brobecker@adacore.com>
6110
6111 * utils.c (xsnprintf): Make non-static.
6112 * server.h: Add xsnprintf declaration.
6113 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6114 replace calls to snprintf by calls to xsnprintf throughout.
6115
61162010-09-01 Joel Brobecker <brobecker@adacore.com>
6117
6118 * configure.ac: Add configure check for alloca.
6119 * configure, config.in: Regenerate.
6120 * server.h: Include alloca.h if it exists.
6121 * gdbreplay.c: Include alloca.h if it exists.
6122
1a981360
PA
61232010-08-28 Pedro Alves <pedro@codesourcery.com>
6124
6125 * linux-low.c (__SIGRTMIN): Define if not already defined.
6126 (linux_create_inferior): Check for __ANDROID__ rather than
6127 __SIGRTMIN.
6128 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6129 are already deferred.
6130 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6131 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6132 stopped and already has a pending signal to report.
6133 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6134 a pending signal to report or is moving out of a jump pad.
6135 (linux_init_signals): Check for __ANDROID__ rather than
6136 __SIGRTMIN.
6137
b4d51a55
PA
61382010-08-28 Pedro Alves <pedro@codesourcery.com>
6139
6140 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6141 debug_threads check. Avoid a linear search when not doing debug
6142 output.
6143
ec48365d
PA
61442010-08-27 Pedro Alves <pedro@codesourcery.com>
6145
6146 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6147 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6148 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6149 (process_event): Change local fd's type to gdb_fildes_t.
6150 (create_file_handler): Adjust prototype.
6151 (delete_file_handler): Adjust prototype.
6152 (handle_file_event): Adjust prototype. Use pfildes.
6153 (create_file_event): Adjsut prototype.
6154 * remote-utils.c (remote_desc, listen_desc): Change type to
6155 gdb_fildes_t.
6156 * server.h: New gdb_fildes_t typedef.
6157 [USE_WIN32API]: Include winsock2.h.
6158 (delete_file_handler, add_file_handler): Adjust prototypes.
6159 (pfildes): Declare.
6160 * utils.c (pfildes): New.
6161
854d88f0
PA
61622010-08-27 Pedro Alves <pedro@codesourcery.com>
6163
6164 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6165 * configure: Regenerate.
6166
0146f85b
PA
61672010-08-27 Pedro Alves <pedro@codesourcery.com>
6168
6169 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6170 (linux_done_accessing_memory): ... this.
6171 (linux_target_ops): Adjust.
6172 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6173 * nto-low.c (nto_target_ops): Adjust comment.
6174 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6175 * spu-low.c (spu_target_ops): Adjust comment.
6176 * target.h (target_ops): Rename unprepare_to_access_memory field
6177 to done_accessing_memory.
6178 (unprepare_to_access_memory): Rename to ...
6179 (done_accessing_memory): ... this.
6180
90d74c30
PA
61812010-08-26 Pedro Alves <pedro@codesourcery.com>
6182
6183 * linux-low.c (linux_prepare_to_access_memory): New.
6184 (linux_unprepare_to_access_memory): New.
6185 (linux_target_ops): Install them.
6186 * server.c (read_memory): Rename to ...
6187 (gdb_read_memory): ... this. Use
6188 prepare_to_access_memory/prepare_to_access_memory.
6189 (write_memory): Rename to ...
6190 (gdb_write_memory): ... this. Use
6191 prepare_to_access_memory/prepare_to_access_memory.
6192 (handle_search_memory_1): Adjust.
6193 (process_serial_event): Adjust.
6194 * target.h (struct target_ops): New fields
6195 prepare_to_access_memory and unprepare_to_access_memory.
6196 (prepare_to_access_memory, unprepare_to_access_memory): New.
6197 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6198 prepare_to_access_memory/prepare_to_access_memory.
6199 * nto-low.c (nto_target_ops): Adjust.
6200 * spu-low.c (spu_target_ops): Adjust.
6201 * win32-low.c (win32_target_ops): Adjust.
6202
fd467969
PA
62032010-08-26 Pedro Alves <pedro@codesourcery.com>
6204
6205 * Makefile.in (WARN_CFLAGS): Get it from configure.
6206 (WERROR_CFLAGS): New.
6207 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6208 * configure.ac: Introduce --enable-werror, which adds -Werror to
6209 the compiler command line. Enabled by default. Disable with
6210 --disable-werror. Add -Wdeclaration-after-statement
6211 Wpointer-arith and -Wformat-nonliteral to warning flags.
6212 * configure: Regenerate.
6213
331e2f5f
PA
62142010-08-26 Pedro Alves <pedro@codesourcery.com>
6215
6216 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6217
e581f2b4
PA
62182010-08-26 Pedro Alves <pedro@codesourcery.com>
6219
6220 * gdbreplay.c (remote_error): New.
6221 (gdbchar): New.
6222 (expect): Use gdbchar. Check for error reading from GDB.
6223 Clarify sync error output.
6224 (play): Check for errors writing to GDB.
6225 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6226 * remote-utils.c (getpkt): Check for errors writing to the remote
6227 descriptor.
6228
3c11dd79
PA
62292010-08-25 Pedro Alves <pedro@codesourcery.com>
6230
6231 * linux-low.c (linux_wait_1): Move non-debugging code out of
6232 `debug_threads' control.
6233
d20a8ad9
PA
62342010-08-25 Pedro Alves <pedro@codesourcery.com>
6235
6236 * linux-low.c (linux_wait_1): Don't set last_status here.
6237 * server.c (push_event, queue_stop_reply_callback): Assert we're
6238 not pushing a TARGET_WAITKIND_IGNORE event.
6239 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6240 (myresume, handle_target_event): Set the thread's last_resume_kind
6241 and last_status from the target returned status.
6242
964e4306
PA
62432010-08-25 Pedro Alves <pedro@codesourcery.com>
6244
6245 PR threads/10729
6246
6247 * linux-x86-low.c (update_debug_registers_callback): New.
6248 (i386_dr_low_set_addr): Use it.
6249 (i386_dr_low_get_addr): New.
6250 (i386_dr_low_set_control): Use update_debug_registers_callback.
6251 (i386_dr_low_get_control): New.
6252 (i386_dr_low_get_status): Adjust.
6253 * linux-low.c (linux_stop_lwp): New.
6254 * linux-low.h (linux_stop_lwp): Declare.
6255
6256 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6257 argument instead of a i386_debug_reg_state.
6258 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6259 a i386_debug_reg_state.
6260 (i386_insert_aligned_watchpoint): Adjust.
6261 (i386_remove_aligned_watchpoint): Adjust.
6262 (i386_low_stopped_data_address): Read the debug registers from the
6263 inferior instead of from the mirrors.
6264 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6265 (i386_dr_low_get_addr): Declare.
6266 (i386_dr_low_get_control): Declare.
6267 (i386_dr_low_get_status): Change prototype.
6268
6269 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6270 (i386_dr_low_get_addr): New.
6271 (i386_dr_low_get_control): New.
6272 (i386_dr_low_get_status): Adjust prototype. Return
6273 dr_status_mirror.
6274 (i386_initial_stuff): Clear dr_status_mirror and
6275 dr_control_mirror.
6276 (i386_get_thread_context): Adjust.
6277 (i386_set_thread_context): Adjust.
6278 (i386_thread_added): Adjust.
6279
5f21a75b
PA
62802010-08-24 Pedro Alves <pedro@codesourcery.com>
6281
6282 * linux-low.h (linux_thread_area): Delete declaration.
6283
3e4c1235
TS
62842010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6285
6286 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6287 after its termination.
6288
1971b033
PA
62892010-08-09 Pedro Alves <pedro@codesourcery.com>
6290
6291 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6292 (gdb_wants_all_stopped): Delete.
6293 (linux_wait_1): Don't call them.
6294 * server.c (handle_v_cont): Tag all threads as want-stopped.
6295 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6296 stopped as "client-wants-stopped".
6297
310444ac
PA
62982010-07-31 Pedro Alves <pedro@codesourcery.com>
6299
6300 * Makefile.in (signals_h): New.
6301 (server_h): Depend on it.
6302 (server.o): Don't depend on $(signals_def).
6303 (signals.o): Depend on $(signals_def).
6304
a19cae16
JK
63052010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6306
6307 * Makefile.in (signals_def): New.
6308 (server_h): Append include/gdb/signals.h and signals_def.
6309 (server.o): Append signals_def.
6310
30d50328
JK
63112010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6312
6313 * server.c (handle_target_event): Use target_signal_to_host for
6314 resume_info.sig initialization.
6315 * target.h (struct thread_resume) <sig>: New comment.
6316
5c3216e2
OS
63172010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6318
c6f46ca0
OS
6319 * server.c (handle_query): strcpy() the returned string from paddress()
6320 instead of sprintf().
5c3216e2
OS
6321 * utils.c (paddress): Return phex_nz().
6322
6bd31874
JB
63232010-07-07 Joel Brobecker <brobecker@adacore.com>
6324
6325 * server.c (handle_v_cont): Call mourn_inferior if process
6326 just exited.
6327 (myresume): Likewise.
6328
0fb4aa4b
PA
63292010-07-01 Pedro Alves <pedro@codesourcery.com>
6330
6331 Static tracepoints, and integration with UST.
6332
6333 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6334 * mem-break.c (uninsert_all_breakpoints)
6335 (reinsert_all_breakpoints): New.
6336 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6337 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6338 (gdb_agent_ust_loaded, helper_thread_id)
6339 (gdb_agent_helper_thread_id): New macros.
6340 (struct ipa_sym_addresses): Add addr_ust_loaded,
6341 addr_helper_thread_id, addr_cmd_buf.
6342 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6343 (in_process_agent_loaded_ust): New.
6344 (write_e_ust_not_loaded): New.
6345 (maybe_write_ipa_ust_not_loaded): New.
6346 (struct collect_static_trace_data_action): New.
6347 (enum tracepoint_type) <static_tracepoint>: New.
6348 (struct tracepoint) <handle>: Mention static tracepoints.
6349 (struct static_tracepoint_ctx): New.
6350 (CMD_BUF_SIZE): New.
6351 (add_tracepoint_action): Handle static tracepoint actions.
6352 (unprobe_marker_at): New.
6353 (clear_installed_tracepoints): Handle static tracepoints.
6354 (cmd_qtdp): Handle static tracepoints.
6355 (probe_marker_at): New.
6356 (cmd_qtstart): Handle static tracepoints.
6357 (response_tracepoint): Handle static tracepoints.
6358 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6359 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6360 (get_context_regcache): Handle static tracepoints.
6361 (do_action_at_tracepoint): Handle static tracepoint actions.
6362 (traceframe_find_block_type): Handle static trace data blocks.
6363 (traceframe_read_sdata): New.
6364 (download_tracepoints): Download static tracepoint actions.
6365 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6366 (GDB_PROBE_NAME): New.
6367 (ust_ops): New.
6368 (GET_UST_SYM): New.
6369 (USTF): New.
6370 (dlsym_ust): New.
6371 (ust_marker_to_static_tracepoint): New.
6372 (gdb_probe): New.
6373 (collect_ust_data_at_tracepoint): New.
6374 (gdb_ust_probe): New.
6375 (UNIX_PATH_MAX, SOCK_DIR): New.
6376 (gdb_ust_connect_sync_socket): New.
6377 (resume_thread, stop_thread): New.
6378 (run_inferior_command): New.
6379 (init_named_socket): New.
6380 (gdb_ust_socket_init): New.
6381 (cstr_to_hexstr): New.
6382 (next_st): New.
6383 (first_marker, next_marker): New.
6384 (response_ust_marker): New.
6385 (cmd_qtfstm, cmd_qtsstm): New.
6386 (unprobe_marker_at, probe_marker_at): New.
6387 (cmd_qtstmat, gdb_ust_thread): New.
6388 (gdb_ust_init): New.
6389 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6390 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6391 (ST_REGENTRY): New.
6392 (x86_64_st_collect_regmap): New.
6393 (X86_64_NUM_ST_COLLECT_GREGS): New.
6394 (AMD64_RIP_REGNUM): New.
6395 (supply_static_tracepoint_registers): New.
6396 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6397 (ST_REGENTRY): New.
6398 (i386_st_collect_regmap): New.
6399 (i386_NUM_ST_COLLECT_GREGS): New.
6400 (supply_static_tracepoint_registers): New.
6401 * server.c (handle_query): Handle qXfer:statictrace:read.
6402 <qSupported>: Report support for StaticTracepoints, and
6403 qXfer:statictrace:read features.
6404 * server.h (traceframe_read_sdata)
6405 (supply_static_tracepoint_registers): Declare.
6406 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6407 (unpack_varlen_hex): Include in IPA build.
6408 * Makefile.in (ustlibs, ustinc): New.
6409 (IPA_OBJS): Add remote-utils-ipa.o.
6410 ($(IPA_LIB)): Link -ldl and -lpthread.
6411 (UST_CFLAGS): New.
6412 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6413 * config.in, configure: Regenerate.
6414
9e4344e5
PA
64152010-06-20 Ian Lance Taylor <iant@google.com>
6416 Pedro Alves <pedro@codesourcery.com>
6417
6418 * linux-x86-low.c (always_true): Delete.
6419 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6420 trying to fool the compiler with always_true.
6421
c6beb2cb
PA
64222010-06-20 Pedro Alves <pedro@codesourcery.com>
6423
6424 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6425 conditions in gdbserver.
6426
d2ed6730
UW
64272010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6428
6429 * spu-low.c (spu_read_memory): Wrap around local store limit.
6430 (spu_write_memory): Likewise.
6431
4e29fb54
PA
64322010-06-15 Pedro Alves <pedro@codesourcery.com>
6433
6434 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6435 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6436 LONGEST uses.
6437 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6438 uses.
6439 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6440 uses with LONGEST uses.
6441
6a271cae
PA
64422010-06-14 Stan Shebs <stan@codesourcery.com>
6443 Pedro Alves <pedro@codesourcery.com>
6444
6445 Bytecode compiler.
6446
6447 * linux-x86-low.c: Include limits.h.
6448 (add_insns): New.
6449 (always_true): New.
6450 (EMIT_ASM): New.
6451 (EMIT_ASM32): New.
6452 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6453 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6454 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6455 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6456 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6457 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6458 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6459 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6460 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6461 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6462 (amd64_emit_void_call_2): New.
6463 (amd64_emit_ops): New.
6464 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6465 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6466 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6467 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6468 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6469 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6470 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6471 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6472 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6473 (i386_emit_stack_adjust, i386_emit_int_call_1)
6474 (i386_emit_void_call_2): New.
6475 (i386_emit_ops): New.
6476 (x86_emit_ops): New.
6477 (the_low_target): Install x86_emit_ops.
6478 * server.h (struct emit_ops): New.
6479 (get_raw_reg_func_addr): Declare.
6480 (current_insn_ptr, emit_error): Declare.
6481 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6482 (set_trace_state_variable_value): New defines.
6483 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6484 addr_get_trace_state_variable_value and
6485 addr_set_trace_state_variable_value.
6486 (symbol_list): New fields for get_raw_reg,
6487 get_trace_state_variable_value and set_trace_state_variable_value.
6488 (condfn): New typedef.
6489 (struct tracepoint): New field `compiled_cond'.
6490 (do_action_at_tracepoint): Clear compiled_cond.
6491 (get_trace_state_variable_value, set_trace_state_variable_value):
6492 Export in the IPA.
6493 (condition_true_at_tracepoint): If there's a compiled condition,
6494 run that.
6495 (current_insn_ptr, emit_error): New globals.
6496 (struct bytecode_address): New.
6497 (get_raw_reg_func_addr): New.
6498 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6499 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6500 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6501 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6502 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6503 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6504 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6505 (compile_tracepoint_condition, compile_bytecodes): New.
6506 * target.h (emit_ops): Forward declare.
6507 (struct target_ops): New field emit_ops.
6508 (target_emit_ops): New.
6509 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6510 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6511 * linux-low.c (linux_emit_ops): New.
6512 (linux_target_ops): Install it.
6513 * linux-low.h (struct linux_target_ops): New field emit_ops.
6514
92b72907
UW
65152010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6516
6517 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6518 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6519
fa593d66
PA
65202010-06-01 Pedro Alves <pedro@codesourcery.com>
6521 Stan Shebs <stan@codesourcery.com>
6522
6523 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6524 (all): Depend on $(extra_libraries).
6525 (install-only): Install the IPA.
6526 (IPA_OBJS, IPA_LIB): New.
6527 (clean): Remove the IPA lib.
6528 (IPAGENT_CFLAGS): New.
6529 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6530 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6531 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6532 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6533 * configure.ac: Check for atomic builtins support in the compiler.
6534 (IPA_DEPFILES, extra_libraries): Define.
6535 * configure.srv (ipa_obj): Add description.
6536 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6537 (i[34567]86-*-linux*): Set ipa_obj.
6538 (x86_64-*-linux*): Set ipa_obj.
6539 * linux-low.c (stabilizing_threads): New.
6540 (supports_fast_tracepoints): New.
6541 (linux_detach): Stabilize threads before detaching.
6542 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6543 the lwp is either not stabilizing, or is moving out of a jump pad.
6544 (linux_fast_tracepoint_collecting): New.
6545 (maybe_move_out_of_jump_pad): New.
6546 (enqueue_one_deferred_signal): New.
6547 (dequeue_one_deferred_signal): New.
6548 (linux_wait_for_event_1): If moving out of a jump pad, defer
6549 pending signals to later.
6550 (linux_stabilize_threads): New.
6551 (linux_wait_1): Check if threads need moving out of jump pads, and
6552 do it if so.
6553 (stuck_in_jump_pad_callback): New.
6554 (move_out_of_jump_pad_callback): New.
6555 (lwp_running): New.
6556 (linux_resume_one_lwp): Handle moving out of jump pads.
6557 (linux_set_resume_request): Dequeue deferred signals.
6558 (need_step_over_p): Also step over fast tracepoint jumps.
6559 (start_step_over): Also uninsert fast tracepoint jumps.
6560 (finish_step_over): Also reinsert fast tracepoint jumps.
6561 (linux_install_fast_tracepoint_jump): New.
6562 (linux_target_ops): Install linux_stabilize_threads and
6563 linux_install_fast_tracepoint_jump_pad.
6564 * linux-low.h (linux_target_ops) <get_thread_area,
6565 install_fast_tracepoint_jump_pad>: New fields.
6566 (struct lwp_info) <collecting_fast_tracepoint,
6567 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6568 (linux_get_thread_area): Declare.
6569 * linux-x86-low.c (jump_insn): New.
6570 (x86_get_thread_area): New.
6571 (append_insns): New.
6572 (push_opcode): New.
6573 (amd64_install_fast_tracepoint_jump_pad): New.
6574 (i386_install_fast_tracepoint_jump_pad): New.
6575 (x86_install_fast_tracepoint_jump_pad): New.
6576 (the_low_target): Install x86_get_thread_area and
6577 x86_install_fast_tracepoint_jump_pad.
6578 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6579 (struct fast_tracepoint_jump): New.
6580 (fast_tracepoint_jump_insn): New.
6581 (fast_tracepoint_jump_shadow): New.
6582 (find_fast_tracepoint_jump_at): New.
6583 (fast_tracepoint_jump_here): New.
6584 (delete_fast_tracepoint_jump): New.
6585 (set_fast_tracepoint_jump): New.
6586 (uninsert_fast_tracepoint_jumps_at): New.
6587 (reinsert_fast_tracepoint_jumps_at): New.
6588 (set_breakpoint_at): Use write_inferior_memory.
6589 (uninsert_raw_breakpoint): Use write_inferior_memory.
6590 (check_mem_read): Mask out fast tracepoint jumps.
6591 (check_mem_write): Mask out fast tracepoint jumps.
6592 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6593 (set_fast_tracepoint_jump): Declare.
6594 (delete_fast_tracepoint_jump)
6595 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6596 (reinsert_fast_tracepoint_jumps_at): Declare.
6597 * regcache.c: Don't compile many functions when building the
6598 in-process agent library.
6599 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6600 the register buffer in the heap.
6601 (free_register_cache): If the register buffer isn't owned by the
6602 regcache, don't free it.
6603 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6604 pre-existing register caches.
6605 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6606 type.
6607 (convert_ascii_to_int): : Constify `from' parameter type.
6608 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6609 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6610 the needed buffer in-place.
6611 (relocate_instruction): New.
6612 * server.c (handle_query) <qSymbols>: If the target supports
6613 tracepoints, give it a chance of looking up symbols. Report
6614 support for fast tracepoints.
6615 (handle_status): Stabilize threads.
6616 (process_serial_event): Adjust.
6617 * server.h (struct fast_tracepoint_jump): Forward declare.
6618 (struct process_info) <fast_tracepoint_jumps>: New field.
6619 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6620 (decode_X_packet, decode_M_packet): Adjust.
6621 (relocate_instruction): Declare.
6622 (in_process_agent_loaded): Declare.
6623 (tracepoint_look_up_symbols): Declare.
6624 (struct fast_tpoint_collect_status): Declare.
6625 (fast_tracepoint_collecting): Declare.
6626 (force_unlock_trace_buffer): Declare.
6627 (handle_tracepoint_bkpts): Declare.
6628 (initialize_low_tracepoint)
6629 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6630 * target.h (struct target_ops) <stabilize_threads,
6631 install_fast_tracepoint_jump_pad>: New fields.
6632 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6633 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6634 [HAVE_STDINT_H]: Include stdint.h.
6635 (trace_debug_1): Rename to ...
6636 (trace_vdebug): ... this.
6637 (trace_debug): Rename to ...
6638 (trace_debug_1): ... this. Add `level' parameter.
6639 (trace_debug): New.
6640 (ATTR_USED, ATTR_NOINLINE): New.
6641 (IP_AGENT_EXPORT): New.
6642 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6643 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6644 (about_to_request_buffer_space, trace_buffer_is_full)
6645 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6646 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6647 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6648 (traceframe_write_count, traceframes_created)
6649 (trace_state_variables)
6650 New renaming defines.
6651 (struct ipa_sym_addresses): New.
6652 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6653 (symbol_list): New.
6654 (ipa_sym_addrs): New.
6655 (all_tracepoint_symbols_looked_up): New.
6656 (in_process_agent_loaded): New.
6657 (write_e_ipa_not_loaded): New.
6658 (maybe_write_ipa_not_loaded): New.
6659 (tracepoint_look_up_symbols): New.
6660 (debug_threads) [IN_PROCESS_AGENT]: New.
6661 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6662 (UNKNOWN_SIDE_EFFECTS): New.
6663 (stop_tracing): New.
6664 (flush_trace_buffer): New.
6665 (stop_tracing_bkpt): New.
6666 (flush_trace_buffer_bkpt): New.
6667 (read_inferior_integer): New.
6668 (read_inferior_uinteger): New.
6669 (read_inferior_data_pointer): New.
6670 (write_inferior_data_pointer): New.
6671 (write_inferior_integer): New.
6672 (write_inferior_uinteger): New.
6673 (struct collect_static_trace_data_action): Delete.
6674 (enum tracepoint_type): New.
6675 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6676 <actions_str, step_actions, step_actions_str>: Only include in
6677 GDBserver.
fa593d66
PA
6678 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6679 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6680 (tracepoints): Use IP_AGENT_EXPORT.
6681 (last_tracepoint): Don't include in the IPA.
6682 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6683 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6684 (alloced_trace_state_variables): New.
6685 (trace_state_variables): Use IP_AGENT_EXPORT.
6686 (traceframe_t): Delete unused variable.
6687 (circular_trace_buffer): Don't include in the IPA.
6688 (trace_buffer_start): Delete.
6689 (struct trace_buffer_control): New.
6690 (trace_buffer_free): Delete.
6691 (struct ipa_trace_buffer_control): New.
6692 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6693 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6694 New.
6695 (trace_buffer_ctrl): New.
6696 (TRACE_BUFFER_CTRL_CURR): New.
6697 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6698 Reimplement as macros.
6699 (trace_buffer_wrap): Delete.
6700 (traceframe_write_count, traceframe_read_count)
6701 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6702 (struct tracepoint_hit_ctx) <type>: New field.
6703 (struct fast_tracepoint_ctx): New.
6704 (memory_barrier): New.
6705 (cmpxchg): New.
6706 (record_tracepoint_error): Update atomically in the IPA.
6707 (clear_inferior_trace_buffer): New.
6708 (about_to_request_buffer_space): New.
6709 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6710 updating the same buffer.
6711 (add_tracepoint): Default the tracepoint's type to trap
6712 tracepoint, and orig_size to -1.
6713 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6714 internal variables.
6715 (create_trace_state_variable): New parameter `gdb'. Handle it.
6716 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6717 (cmd_qtdp): Handle fast tracepoints.
6718 (cmd_qtdv): Adjust.
6719 (max_jump_pad_size): New.
6720 (gdb_jump_pad_head): New.
6721 (get_jump_space_head): New.
6722 (claim_jump_space): New.
6723 (sort_tracepoints): New.
6724 (MAX_JUMP_SIZE): New.
6725 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6726 IPA.
6727 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6728 support. Upload fast traceframes, and delete internal IPA
6729 breakpoints.
6730 (stop_tracing_handler): New.
6731 (flush_trace_buffer_handler): New.
6732 (cmd_qtstop): Upload fast tracepoints.
6733 (response_tracepoint): Handle fast tracepoints.
6734 (tracepoint_finished_step): Upload fast traceframes. Set the
6735 tracepoint hit context's tracepoint type.
6736 (handle_tracepoint_bkpts): New.
6737 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6738 type. Add comment about fast tracepoints.
6739 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6740 non-existing action_str field.
6741 (get_context_regcache): Handle fast tracepoints.
6742 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6743 to the regcache.
6744 (fast_tracepoint_from_jump_pad_address): New.
6745 (fast_tracepoint_from_ipa_tpoint_address): New.
6746 (collecting_t): New.
6747 (force_unlock_trace_buffer): New.
6748 (fast_tracepoint_collecting): New.
6749 (collecting): New.
6750 (gdb_collect): New.
6751 (write_inferior_data_ptr): New.
6752 (target_tp_heap): New.
6753 (target_malloc): New.
6754 (download_agent_expr): New.
6755 (UALIGN): New.
6756 (download_tracepoints): New.
6757 (download_trace_state_variables): New.
6758 (upload_fast_traceframes): New.
6759 (IPA_FIRST_TRACEFRAME): New.
6760 (IPA_NEXT_TRACEFRAME_1): New.
6761 (IPA_NEXT_TRACEFRAME): New.
6762 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6763 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6764 (gdb_jump_pad_buffer_end): New.
6765 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6766 (initialize_tracepoint): Adjust.
6767 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6768 buffer. Initialize the low module.
6769 * utils.c (PREFIX, TOOLNAME): New.
6770 (malloc_failure): Use PREFIX.
6771 (error): In the IPA, an error causes an exit.
6772 (fatal, warning): Use PREFIX.
6773 (internal_error): Use TOOLNAME.
6774 (NUMCELLS): Increase to 10.
6775 * configure, config.in: Regenerate.
6776
d149dd1d
PA
67772010-06-01 Pedro Alves <pedro@codesourcery.com>
6778
6779 * server.c (handle_query) <qSupported>: Do two passes over the
6780 qSupported string to avoid nesting strtok.
6781
f6528abd
JK
67822010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6783
6784 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6785 (CDEPS): New.
6786 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6787 -Wl,--dynamic-list.
6788 * configure: Regenerate.
6789 * proc-service.list: New.
6790
ca2a87a0
JK
67912010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6792
6793 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6794 New comment.
6795
363a6e9f
OS
67962010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6797
6798 * gdbreplay.c (remote_open): Check error return from socket() call by
6799 its equality to -1 not by it being negative.
6800 * remote-utils.c (remote_open): Likewise.
6801
d23b6cb1
PA
68022010-05-23 Pedro Alves <pedro@codesourcery.com>
6803
6804 * config.h: Regenerate.
6805
28d3cf85
MK
68062010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6807
6808 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6809 doesn't provide PTRACE_GET_THREAD_AREA.
6810
fea36a59
MK
68112010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6812
6813 * linux-m68k-low.c: Include <asm/ptrace.h>
6814 (ps_get_thread_area): Implement.
6815
24b066ba
DE
68162010-05-03 Doug Evans <dje@google.com>
6817
6818 * event-loop.c (struct callback_event): New struct.
6819 (callback_list): New global.
6820 (append_callback_event, delete_callback_event): New functions.
6821 (process_callback): New function.
6822 (start_event_loop): Call it.
6823 * remote-utils.c (NOT_SCHEDULED): Define.
6824 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6825 moved out of readchar.
6826 (readchar): Rewrite. Call reschedule before returning.
6827 (reset_readchar): New function.
6828 (remote_close): Call it.
6829 (process_remaining, reschedule): New functions.
6830 * server.h (callback_handler_func): New typedef.
6831 (append_callback_event, delete_callback_event): Declare.
6832
9836d6ea
PA
68332010-05-03 Pedro Alves <pedro@codesourcery.com>
6834
6835 * proc-service.c (ps_pglobal_lookup): Use
6836 thread_db_look_up_one_symbol.
6837 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6838 parameter. Use it instead of all_symbols_looked_up.
6839 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6840 field.
6841 (all_symbols_looked_up): Don't declare.
6842 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6843 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6844 field.
6845 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6846 Set all_symbols_looked_up here.
6847 (thread_db_look_up_one_symbol): New.
6848 (thread_db_get_tls_address): Adjust.
6849 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6850 thread_db object on the heap, and tentatively set it in the
6851 process structure.
6852 (thread_db_init): Don't set all_symbols_looked_up here.
6853 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6854
7984d532
PA
68552010-05-03 Pedro Alves <pedro@codesourcery.com>
6856
6857 * linux-low.c (linux_kill, linux_detach): Adjust.
6858 (status_pending_p_callback): Remove redundant statement. Check
6859 for !TARGET_WAITIKIND_IGNORE, instead of
6860 TARGET_WAITKIND_STOPPED.
6861 (handle_tracepoints): Make sure LWP is locked. Adjust.
6862 (linux_wait_for_event_1): Adjust.
6863 (linux_cancel_breakpoints): New.
6864 (unsuspend_one_lwp): New.
6865 (unsuspend_all_lwps): New.
6866 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6867 (send_sigstop_callback): Change return type to int, add new
6868 `except' parameter and handle it.
6869 (suspend_and_send_sigstop_callback): New.
6870 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6871 pass them down. If SUSPEND, also increment the lwp's suspend
6872 count.
6873 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6874 (need_step_over_p): Don't consider suspended LWPs.
6875 (start_step_over): Adjust.
6876 (proceed_one_lwp): Change return type to int, add new `except'
6877 parameter and handle it.
6878 (unsuspend_and_proceed_one_lwp): New.
6879 (proceed_all_lwps): Use find_inferior instead of
6880 for_each_inferior.
6881 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6882 also decrement the suspend count of LWPs. Pass `except' down,
6883 instead of hacking its suspend count.
6884 (linux_pause_all): Add `freeze' parameter. Adjust.
6885 (linux_unpause_all): New.
6886 (linux_target_ops): Install linux_unpause_all.
6887 * server.c (handle_status): Adjust.
6888 * target.h (struct target_ops): New fields `unpause_all' and
6889 `cancel_breakpoints'. Add new parameter to `pause_all'.
6890 (pause_all): Add new `freeze' parameter.
6891 (unpause_all): New.
6892 (cancel_breakpoints): New.
6893 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6894 cancel breakpoints.
6895 (cmd_qtstart): Pause threads.
6896 (stop_tracing): Pause threads, and cancel breakpoints.
6897 * win32-low.c (win32_target_ops): Adjust.
6898
e471f25b
PA
68992010-05-03 Pedro Alves <pedro@codesourcery.com>
6900
6901 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6902 the inferior right away from here...
6903 (linux_wait_1): ... to here, and adjust to check the thread's
6904 last_resume_kind instead of the lwp's step or stop_expected flags.
6905
1915ef4f
PA
69062010-05-02 Pedro Alves <pedro@codesourcery.com>
6907
6908 * README: Use consistent `GDB' and `GDBserver' spellings.
6909
f9e39928
PA
69102010-05-02 Pedro Alves <pedro@codesourcery.com>
6911
6912 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6913 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6914 (linux_detach_one_lwp): Assume the lwp is stopped.
6915 (any_thread_of): Delete.
6916 (linux_detach): Stop all lwps here. Don't blindly delete all
6917 breakpoints.
6918 (delete_lwp_callback): New.
6919 (linux_mourn): Delete all lwps of the process that is gone.
6920 (linux_wait_1): Don't delete the last lwp of the process here.
6921 * mem-break.h (mark_breakpoints_out): Declare.
6922 * mem-break.c (mark_breakpoints_out): New.
6923 (free_all_breakpoints): Use it.
6924 * server.c (handle_target_event): If the process is gone, mark
6925 breakpoints out.
6926 * thread-db.c (struct thread_db) <create_bp>: New field.
6927 (thread_db_enable_reporting): Fix prototype. Store a thread event
6928 breakpoint reference in the thread_db struct.
6929 (thread_db_load_search): Clear the thread_db object.
6930 (try_thread_db_load_1): Ditto.
6931 (switch_to_process): New.
6932 (disable_thread_event_reporting): Use it.
6933 (remove_thread_event_breakpoints): New.
6934 (thread_db_detach, thread_db_mourn): Use it.
6935
1e7fc18c
PA
69362010-05-01 Pedro Alves <pedro@codesourcery.com>
6937
6938 * linux-low.c (linux_enable_event_reporting): New.
6939 (linux_wait_for_event_1, handle_extended_wait): Use it.
6940
02fc4de7
PA
69412010-04-30 Pedro Alves <pedro@codesourcery.com>
6942
6943 * linux-low.c (linux_kill_one_lwp, linux_kill)
6944 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6945 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6946 SIGSTOP even if the LWP is stopped.
6947 (send_sigstop_callback): New.
6948 (stop_all_lwps): Use send_sigstop_callback instead.
6949 (linux_resume_one_thread): Adjust.
6950 (proceed_one_lwp): Still proceed an LWP that the client has
6951 requested to stop, if we haven't reported it as stopped yet. Make
6952 sure that LWPs the client want stopped, have a pending SIGSTOP.
6953
bc3b5632
DE
69542010-04-26 Doug Evans <dje@google.com>
6955
ae1ada35
DE
6956 * server.c (handle_general_set): Make static.
6957
bc3b5632
DE
6958 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6959 Print received char after testing for error/eof instead of before.
6960 (input_interrupt): Tweak comment.
6961
65730243
DE
69622010-04-23 Doug Evans <dje@google.com>
6963
6964 * server.c (start_inferior): Print inferior argv if --debug.
6965
a8ae7dc0
AR
69662010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6967
6968 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6969 * nto-x86-low.c: Include server.h
6970
1c07cc19
PM
69712010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6972
6973 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6974 be consistent with other sources of this directory.
6975 (init_registers_amd64): Correct name of source file of this function
6976 in the comment.
6977
e0a61e09
PM
69782010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6979
6980 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6981 64-bit executables.
6982
54709339
PM
69832010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6984
6985 * win32-i386-low.c: Add 64-bit support.
6986 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6987 (init_registers_amd64): Declare.
6988 (mappings): Add 64-bit version of array.
6989 (init_windows_x86): New function.
6990 (the_low_target): Change init_arch field to init_windows_x86.
6991
e8f0053d
PM
69922010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6993
6994 * win32-low.c: Adapt to support also 64-bit architecture.
6995 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6996 (get_image_name): Use SIZE_T type for local variable `done'.
6997 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6998 (toolhelp_get_dll_name): Idem.
6999 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7000 Use uintptr_t typecast to avoid warning.
7001 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7002 (handle_exception): Use phex_nz to avoid warning.
7003 (win32_wait): Remove unused local variable `process'.
7004
c481e77e
PM
70052010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7006
7007 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7008 `amd64-avx.o'.
7009
12ea4b69
PM
70102010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7011
7012 * configure.ac: Use `ws2_32' library for srv_mingw.
7013 * configure: Regenerate.
7014 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7015 * remote-utils.c: Likewise.
7016
f6d1620c
L
70172010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7018
7019 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7020 if __x86_64__ is defined.
7021
8e642873
PM
70222010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7023
7024 * configure: Regenerate.
7025
711e434b
PM
70262010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7027
7028 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7029 * target.h (target_ops): New get_tib_address field.
7030 * win32-low.h (win32_thread_info): Add thread_local_base field.
7031 * win32-low.c (child_add_thread): Add tlb argument.
7032 Set thread_local_base field to TLB.
7033 (get_child_debug_event): Adapt to child_add_thread change.
7034 (win32_get_tib_address): New function.
7035 (win32_target_ops): Set get_tib_address field to
7036 win32_get_tib_address.
7037 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7038
505106cd
PA
70392010-04-12 Pedro Alves <pedro@codesourcery.com>
7040
505106cd
PA
7041 * linux-low.c (linux_mourn): Also remove the process.
7042 * server.c (handle_target_event): Don't remove the process here.
7043 * nto-low.c (nto_mourn): New.
7044 (nto_target_ops): Install it.
7045 * spu-low.c (spu_mourn): New.
7046 (spu_target_ops): Install it.
7047 * win32-low.c (win32_mourn): New.
7048 (win32_target_ops): Install it.
7049
e8470a06
PA
70502010-04-12 Pedro Alves <pedro@codesourcery.com>
7051
7052 * server.h (buffer_xml_printf): Remove redundant `;'.
7053
45ba0d02
PA
70542010-04-12 Pedro Alves <pedro@codesourcery.com>
7055
7056 * regcache.c (set_register_cache): Invalidate regcaches before
7057 changing the register cache layout.
7058 (regcache_invalidate_one): Allow a NULL regcache.
7059 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7060 regcaches before changing the register cache layout or the target
7061 regsets.
7062
59e04013
L
70632010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7064
7065 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7066 variable warning on Linux/x86-64.
7067
8336d594
PA
70682010-04-11 Pedro Alves <pedro@codesourcery.com>
7069
7070 GDBserver disconnected tracing support.
7071
7072 * linux-low.c (linux_remove_process): Delete.
7073 (add_lwp): Don't set last_resume_kind here.
7074 (linux_kill): Use `mourn'.
7075 (linux_detach): Use `thread_db_detach', and `mourn'.
7076 (linux_mourn): New.
7077 (linux_attach_lwp_1): Adjust comment.
7078 (linux_attach): last_resume_kind moved the thread_info; adjust.
7079 (status_pending_p_callback): Adjust.
7080 (linux_wait_for_event_1): Adjust.
7081 (count_events_callback, select_singlestep_lwp_callback)
7082 (select_event_lwp_callback, cancel_breakpoints_callback)
7083 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7084 (proceed_one_lwp): Adjust.
7085 (linux_async): Add debug output.
7086 (linux_thread_stopped): New.
7087 (linux_pause_all): New.
7088 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7089 linux_pause_all.
7090 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7091 (thread_db_free): Delete declaration.
7092 (thread_db_detach, thread_db_mourn): Declare.
7093 * thread-db.c (thread_db_init): Use thread_db_mourn.
7094 (thread_db_free): Delete, split in two.
7095 (disable_thread_event_reporting): New.
7096 (thread_db_detach): New.
7097 (thread_db_mourn): New.
7098
7099 * server.h (struct thread_info) <last_resume_kind>: New field.
7100 <attached>: Add comment.
7101 <gdb_detached>: New field.
7102 (handler_func): Change return type to int.
7103 (handle_serial_event, handle_target_event): Ditto.
7104 (gdb_connected): Declare.
7105 (tracing): Delete.
7106 (disconnected_tracing): Declare.
7107 (stop_tracing): Declare.
7108
7109 * server.c (handle_query) <qSupported>: Report support for
7110 disconnected tracing.
7111 (queue_stop_reply_callback): Account for running threads.
7112 (gdb_wants_thread_stopped): New.
7113 (gdb_wants_all_threads_stopped): New.
7114 (gdb_reattached_process): New.
7115 (handle_status): Clear the `gdb_detached' flag of all processes.
7116 In all-stop, stop all threads.
7117 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7118 (process_serial_event): If the remote connection breaks, or if an
7119 exit was forced with "monitor exit", force an event loop exit.
7120 Handle disconnected tracing on detach.
7121 (handle_serial_event): Adjust.
7122 (handle_target_event): If GDB isn't connected, forward events back
7123 to the inferior, unless the last process exited, in which case,
7124 exit gdbserver. Adjust interface.
7125
7126 * remote-utils.c (remote_open): Don't block in accept. Instead
7127 register an event loop source on the listen socket file
7128 descriptor. Refactor bits into ...
7129 (listen_desc): ... this new global.
7130 (gdb_connected): ... this new function.
7131 (enable_async_notification): ... this new function.
7132 (handle_accept_event): ... this new function.
7133 (remote_close): Clear remote_desc.
7134
7135 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7136
7137 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7138 New fields.
7139 (mourn_inferior): Define.
7140 (target_process_qsupported): Avoid the dangling else problem.
7141 (thread_stopped): Define.
7142 (pause_all): Define.
7143 (target_waitstatus_to_string): Declare.
7144 * target.c (target_waitstatus_to_string): New.
7145
7146 * tracepoint.c (tracing): Make extern.
7147 (disconnected_tracing): New.
7148 (stop_tracing): Make extern. Handle tracing stops due to GDB
7149 disconnecting.
7150 (cmd_qtdisconnected): New.
7151 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7152 (handle_tracepoint_general_set): Handle QTDisconnected.
7153
7154 * event-loop.c (event_handler_func): Change return type to int.
7155 (process_event): Bail out if the event handler wants the event
7156 loop to stop.
7157 (handle_file_event): Ditto.
7158 (start_event_loop): Bail out if the event handler wants the event
7159 loop to stop.
7160
7161 * nto-low.c (nto_target_ops): Adjust.
7162 * spu-low.c (spu_wait): Don't remove the process here.
7163 (spu_target_ops): Adjust.
7164 * win32-low.c (win32_wait): Don't remove the process here.
7165 (win32_target_ops): Adjust.
7166
5d267c4c
PA
71672010-04-11 Pedro Alves <pedro@codesourcery.com>
7168
7169 * regcache.c (realloc_register_cache): Invalidate inferior's
7170 regcache before recreating it.
7171
623ccd72
PA
71722010-04-09 Pedro Alves <pedro@codesourcery.com>
7173
7174 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7175
219f2f23
PA
71762010-04-09 Stan Shebs <stan@codesourcery.com>
7177 Pedro Alves <pedro@codesourcery.com>
7178
7179 * server.h (LONGEST): New.
7180 (struct thread_info) <while_stepping>: New field.
7181 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7182 Declare.
7183 (initialize_tracepoint, handle_tracepoint_general_set)
7184 (handle_tracepoint_query, tracepoint_finished_step)
7185 (tracepoint_was_hit, release_while_stepping_state_list):
7186 (current_traceframe): Declare.
7187 * server.c (handle_general_set): Handle tracepoint packets.
7188 (read_memory): New.
7189 (write_memory): New.
7190 (handle_search_memory_1): Use read_memory.
7191 (handle_query): Report support for conditional tracepoints, trace
7192 state variables, and tracepoint sources. Handle tracepoint
7193 queries.
7194 (main): Initialize the tracepoints module.
7195 (process_serial_event): Handle traceframe reads/writes.
7196
7197 * linux-low.c (handle_tracepoints): New.
7198 (linux_wait_1): Call it.
7199 (linux_resume_one_lwp): Handle while-stepping.
7200 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7201 (linux_target_ops): Install them.
7202 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7203 New field.
7204 * linux-x86-low.c (x86_supports_tracepoints): New.
7205 (the_low_target). Install it.
7206
7207 * mem-break.h (delete_breakpoint): Declare.
7208 * mem-break.c (delete_breakpoint): Make external.
7209
7210 * target.h (struct target_ops): Add `supports_tracepoints',
7211 `read_pc', and `write_pc' fields.
7212 (target_supports_tracepoints): Define.
7213 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7214 (phex_nz): New.
7215
7216 * regcache.h (struct regcache) <registers_owned>: New field.
7217 (init_register_cache, regcache_cpy): Declare.
7218 (regcache_read_pc, regcache_write_pc): Declare.
7219 (register_cache_size): Declare.
7220 (supply_regblock): Declare.
7221 * regcache.c (init_register_cache): New.
7222 (new_register_cache): Use it.
7223 (regcache_cpy): New.
7224 (register_cache_size): New.
7225 (supply_regblock): New.
7226 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7227
219f2f23
PA
7228 * tracepoint.c: New.
7229
7230 * Makefile.in (OBS): Add tracepoint.o.
7231 (tracepoint.o): New rule.
7232
3a13a53b
L
72332010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7234
7235 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7236 (i386-mmx.o): New.
7237 (i386-mmx.c): Likewise.
7238 (i386-mmx-linux.o): Likewise.
7239 (i386-mmx-linux.c): Likewise.
7240
7241 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7242 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7243 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7244 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7245
7246 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7247 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7248 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7249
1570b33e
L
72502010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7251
7252 * Makefile.in (clean): Updated.
7253 (i386-avx.o): New.
7254 (i386-avx.c): Likewise.
7255 (i386-avx-linux.o): Likewise.
7256 (i386-avx-linux.c): Likewise.
7257 (amd64-avx.o): Likewise.
7258 (amd64-avx.c): Likewise.
7259 (amd64-avx-linux.o): Likewise.
7260 (amd64-avx-linux.c): Likewise.
7261
7262 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7263 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7264 (srv_amd64_regobj): Add amd64-avx.o.
7265 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7266 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7267 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7268 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7269 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7270 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7271 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7272
7273 * i387-fp.c: Include "i386-xstate.h".
7274 (i387_xsave): New.
7275 (i387_cache_to_xsave): Likewise.
7276 (i387_xsave_to_cache): Likewise.
7277 (x86_xcr0): Likewise.
7278
7279 * i387-fp.h (i387_cache_to_xsave): Likewise.
7280 (i387_xsave_to_cache): Likewise.
7281 (x86_xcr0): Likewise.
7282
7283 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7284 * linux-crisv32-low.c (target_regsets): Likewise.
7285 * linux-m68k-low.c (target_regsets): Likewise.
7286 * linux-mips-low.c (target_regsets): Likewise.
7287 * linux-ppc-low.c (target_regsets): Likewise.
7288 * linux-s390-low.c (target_regsets): Likewise.
7289 * linux-sh-low.c (target_regsets): Likewise.
7290 * linux-sparc-low.c (target_regsets): Likewise.
7291 * linux-xtensa-low.c (target_regsets): Likewise.
7292
7293 * linux-low.c: Include <sys/uio.h>.
7294 (regsets_fetch_inferior_registers): Support nt_type.
7295 (regsets_store_inferior_registers): Likewise.
7296 (linux_process_qsupported): New.
7297 (linux_target_ops): Add linux_process_qsupported.
7298
7299 * linux-low.h (regset_info): Add nt_type.
7300 (linux_target_ops): Add process_qsupported.
7301
7302 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7303 and <sys/uio.h>.
7304 (init_registers_i386_avx_linux): New.
7305 (init_registers_amd64_avx_linux): Likewise.
7306 (xmltarget_i386_linux_no_xml): Likewise.
7307 (xmltarget_amd64_linux_no_xml): Likewise.
7308 (PTRACE_GETREGSET): Likewise.
7309 (PTRACE_SETREGSET): Likewise.
7310 (x86_fill_xstateregset): Likewise.
7311 (x86_store_xstateregset): Likewise.
7312 (use_xml): Likewise.
7313 (x86_linux_update_xmltarget): Likewise.
7314 (x86_linux_process_qsupported): Likewise.
7315 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7316 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7317 init_registers_i386_linux here. Call
7318 x86_linux_update_xmltarget.
7319 (the_low_target): Add x86_linux_process_qsupported.
7320
7321 * server.c (handle_query): Call target_process_qsupported.
7322
7323 * target.h (target_ops): Add process_qsupported.
7324 (target_process_qsupported): New.
7325
fc7238bb
PA
73262010-04-03 Pedro Alves <pedro@codesourcery.com>
7327
7328 * inferiors.c (add_thread): Set last_status kind to
7329 TARGET_WAITKIND_IGNORE.
7330 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7331 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7332 (linux_wait_1): Move `thread' local definition to block that uses
7333 it. Don't NULL initialize `event_child'.
7334 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7335 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7336 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7337
bdabb078
PA
73382010-04-01 Pedro Alves <pedro@codesourcery.com>
7339
7340 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7341 an extended waitstatus, or by a watchpoint.
7342 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7343 thread was stepping or has been stopped by a watchpoint.
7344
d3bbe7a0
PA
73452010-04-01 Pedro Alves <pedro@codesourcery.com>
7346
7347 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7348 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7349 of another, then delete the previous, and validate all
7350 breakpoints.
7351 (validate_inserted_breakpoint): New.
7352 (delete_disabled_breakpoints): New.
7353 (validate_breakpoints): New.
7354 (check_mem_read): Validate breakpoints before trusting their
7355 shadow. Delete disabled breakpoints.
7356 (check_mem_write): Validate breakpoints before trusting they
7357 should be inserted. Delete disabled breakpoints.
7358 * mem-break.h (validate_breakpoints):
7359 * server.c (handle_query): Validate breakpoints when we see a
7360 qSymbol query.
7361
8b07ae33
PA
73622010-04-01 Pedro Alves <pedro@codesourcery.com>
7363
7364 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7365 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7366 if we could tell there's a GDB breakpoint at stop_pc.
7367 (need_step_over_p): Don't do a step over if we find a GDB
7368 breakpoint at the resume PC.
7369
7370 * mem-break.c (struct raw_breakpoint): New.
7371 (enum bkpt_type): New type `gdb_breakpoint'.
7372 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7373 fields. New field `raw'.
7374 (find_raw_breakpoint_at): New.
7375 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7376 breakpoint instead.
7377 (set_breakpoint_at): Adjust.
7378 (delete_raw_breakpoint): New.
7379 (release_breakpoint): New.
7380 (delete_breakpoint): Rename to...
7381 (delete_breakpoint_1): ... this. Add proc parameter. Use
7382 release_breakpoint. Return ENOENT.
7383 (delete_breakpoint): Reimplement.
7384 (find_breakpoint_at): Delete.
7385 (find_gdb_breakpoint_at): New.
7386 (delete_breakpoint_at): Delete.
7387 (set_gdb_breakpoint_at): New.
7388 (delete_gdb_breakpoint_at): New.
7389 (gdb_breakpoint_here): New.
7390 (set_reinsert_breakpoint): Use release_breakpoint.
7391 (uninsert_breakpoint): Rename to ...
7392 (uninsert_raw_breakpoint): ... this.
7393 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7394 (reinsert_raw_breakpoint): Change parameter type to
7395 raw_breakpoint.
7396 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7397 instead.
7398 (check_breakpoints): Adjust. Use release_breakpoint.
7399 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7400 (breakpoint_inserted_here): Ditto.
7401 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7402 Don't trust the breakpoint's shadow if it is not inserted.
7403 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7404 (delete_all_breakpoints): Adjust.
7405 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7406 use delete_breakpoint_1.
7407
7408 * mem-break.h (breakpoints_supported): Delete declaration.
7409 (set_gdb_breakpoint_at): Declare.
7410 (gdb_breakpoint_here): Declare.
7411 (delete_breakpoint_at): Delete.
7412 (delete_gdb_breakpoint_at): Declare.
7413
7414 * server.h (struct raw_breakpoint): Forward declare.
7415 (struct process_info): New field `raw_breakpoints'.
7416
7417 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7418 breakpoints.
7419
6bf5e0ba
PA
74202010-03-24 Pedro Alves <pedro@codesourcery.com>
7421
7422 * linux-low.c (status_pending_p_callback): Fix comment.
7423 (linux_wait_for_event_1): Move most of the internal breakpoint
7424 handling from here...
7425 (linux_wait_1): ... to here.
7426 (count_events_callback): New.
7427 (select_singlestep_lwp_callback): New.
7428 (select_event_lwp_callback): New.
7429 (cancel_breakpoints_callback): New.
7430 (select_event_lwp): New.
7431 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7432 priority to all LWPs that have had events that should be reported
7433 to the client. Cancel breakpoints when about to reporting the
7434 event to the client, not while stopping lwps. No longer cancel
7435 finished single-steps here.
7436 (cancel_finished_single_step): Delete.
7437 (cancel_finished_single_steps): Delete.
7438
414a389f
PA
74392010-03-24 Pedro Alves <pedro@codesourcery.com>
7440
7441 * mem-break.c (enum bkpt_type): New.
7442 (struct breakpoint): New field `type'.
7443 (set_breakpoint_at): Change return type to struct breakpoint
7444 pointer. Set type to `other_breakpoint' by default.
7445 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7446 in the breakpoint list.
7447 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7448 (reinsert_breakpoint): Rename to ...
7449 (reinsert_raw_breakpoint): ... this.
7450 (reinsert_breakpoints_at): Adjust.
7451 * mem-break.h (struct breakpoint): Declare.
7452 (set_breakpoint_at): Change return type to struct breakpoint
7453 pointer.
7454
2280c721
PA
74552010-03-24 Pedro Alves <pedro@codesourcery.com>
7456
7457 * server.c (handle_query): Assign, not compare.
7458
d50171e4
PA
74592010-03-24 Pedro Alves <pedro@codesourcery.com>
7460
7461 Teach linux gdbserver to step-over-breakpoints.
7462
7463 * linux-low.c (can_hardware_single_step): New.
7464 (supports_breakpoints): New.
7465 (handle_extended_wait): If stopping threads, read the stop pc of
7466 the new cloned LWP.
7467 (get_pc): New.
7468 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7469 low target doesn't support retrieving the PC.
7470 (add_lwp): Set last_resume_kind to resume_continue.
7471 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7472 (linux_attach): Don't clear stop_expected. Set the lwp's
7473 last_resume_kind to resume_stop.
7474 (linux_detach_one_lwp): Don't check for removed breakpoints.
7475 (check_removed_breakpoint): Delete.
7476 (status_pending_p): Rename to ...
7477 (status_pending_p_callback): ... this. Don't check for removed
7478 breakpoints. Don't consider threads that are stopped from GDB's
7479 perspective.
7480 (linux_wait_for_lwp): Always read the stop_pc here.
7481 (cancel_breakpoint): New.
7482 (step_over_bkpt): New global.
7483 (linux_wait_for_event_1): Implement stepping over breakpoints.
7484 (gdb_wants_lwp_stopped): New.
7485 (gdb_wants_all_stopped): New.
7486 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7487 single-step traps here. Store the thread's last reported target
7488 wait status.
7489 (send_sigstop): Don't clear stop_expected. Always set it,
7490 instead.
7491 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7492 (cancel_finished_single_step): New.
7493 (cancel_finished_single_steps): New.
7494 (wait_for_sigstop): Don't cancel finished single-step traps here.
7495 (linux_resume_one_lwp): Don't check for removed breakpoints.
7496 Don't set `step' on non-hardware step archs.
7497 (linux_set_resume_request): Ignore resume_stop requests if already
7498 stopping or stopped. Set the lwp's last_resume_kind.
7499 (resume_status_pending_p): Don't check for removed breakpoints.
7500 (need_step_over_p): New.
7501 (start_step_over): New.
7502 (finish_step_over): New.
7503 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7504 requests. Clear the thread's last reported target waitstatus.
7505 Don't use the `suspended' flag. Don't consider pending breakpoints.
7506 (linux_resume): Start a step-over if necessary.
7507 (proceed_one_lwp): New.
7508 (proceed_all_lwps): New.
7509 (unstop_all_lwps): New.
7510 * linux-low.h (struct lwp_info): Rewrite comment for the
7511 `suspended' flag. Add the `stop_pc' field. Delete the
7512 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7513 Add `'last_resume_kind' and `need_step_over' fields.
7514 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7515 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7516 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7517 (set_raw_breakpoint_at): New.
7518 (set_breakpoint_at): Rewrite to use it.
7519 (reinsert_breakpoint_handler): Delete.
7520 (set_reinsert_breakpoint): New.
7521 (reinsert_breakpoint_by_bp): Delete.
7522 (delete_reinsert_breakpoints): New.
7523 (uninsert_breakpoint): Rewrite.
7524 (uninsert_breakpoints_at): New.
7525 (reinsert_breakpoint): Rewrite.
7526 (reinsert_breakpoints_at): New.
7527 (check_breakpoints): Rewrite.
7528 (breakpoint_here): New.
7529 (breakpoint_inserted_here): New.
7530 (check_mem_read): Adjust.
7531 * mem-break.h (breakpoints_supported, breakpoint_here)
7532 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7533 (reinsert_breakpoint_by_bp): Delete declaration.
7534 (delete_reinsert_breakpoints): Declare.
7535 (reinsert_breakpoint): Delete declaration.
7536 (reinsert_breakpoints_at): Declare.
7537 (uninsert_breakpoint): Delete declaration.
7538 (uninsert_breakpoints_at): Declare.
7539 (check_breakpoints): Adjust prototype.
7540 * server.h: Adjust include order.
7541 (struct thread_info): Declare here. Add a `last_status' field.
7542
30ba68cb
MS
75432010-03-23 Michael Snyder <msnyder@vmware.com>
7544
7545 * server.c (crc32): New function.
7546 (handle_query): Add handling for 'qCRC:' request.
7547
b9a881c2
PA
75482010-03-23 Pedro Alves <pedro@codesourcery.com>
7549
7550 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7551 lwp had been stopped by a watchpoint.
7552
e92d13d5
PA
75532010-03-16 Pedro Alves <pedro@codesourcery.com>
7554
7555 * server.h (internal_error): Declare.
7556 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7557 * utils.c (internal_error): New function.
7558
64daa791
AS
75592010-03-15 Andreas Schwab <schwab@redhat.com>
7560
7561 * configure.srv: Fix typo setting srv_regobj.
7562
f52cd8cd
PA
75632010-03-15 Pedro Alves <pedro@codesourcery.com>
7564
7565 * linux-low.c (fetch_register): Avoid passing a non string literal
7566 format to `error'.
7567 (usr_store_inferior_registers): Ditto.
7568
93ae6fdc
PA
75692010-03-14 Pedro Alves <pedro@codesourcery.com>
7570
7571 * linux-low.c (linux_write_memory): Bail out early if peeking
7572 memory failed.
7573
c3adc08c
PA
75742010-03-14 Pedro Alves <pedro@codesourcery.com>
7575
7576 * linux-low.h (struct lwp_info): New fields
7577 `stopped_by_watchpoint' and `stopped_data_address'.
7578 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7579 here, and cache them in the lwp object.
7580 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7581 directly.
7582 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7583 field.
7584 (linux_stopped_by_watchpoint): Rewrite.
7585 (linux_stopped_data_address): Rewrite.
7586
bce522a2
PA
75872010-03-06 Simo Melenius <simo.melenius@iki.fi>
7588
7589 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7590 switching the current inferior, not before.
7591
90884b2b
L
75922010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7593
7594 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7595 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7596 i386-linux.c and amd64-linux.c.
7597 (reg-i386.o): Removed.
7598 (reg-i386.c): Likewise.
7599 (reg-i386-linux.o): Likewise.
7600 (reg-i386-linux.c): Likewise.
7601 (reg-x86-64.o): Likewise.
7602 (reg-x86-64.c): Likewise.
7603 (reg-x86-64-linux.o): Likewise.
7604 (reg-x86-64-linux.c): Likewise.
7605 (i386.o): New.
7606 (i386.c): Likewise.
7607 (i386-linux.o): Likewise.
7608 (i386-linux.c): Likewise.
7609 (amd64.o): Likewise.
7610 (amd64.c): Likewise.
7611 (amd64-linux.o): Likewise.
7612 (amd64-linux.c): Likewise.
7613
7614 * configure.srv (srv_i386_regobj): New.
7615 (srv_i386_linux_regobj): Likewise.
7616 (srv_amd64_regobj): Likewise.
7617 (srv_amd64_linux_regobj): Likewise.
7618 (srv_i386_32bit_xmlfiles): Likewise.
7619 (srv_i386_64bit_xmlfiles): Likewise.
7620 (srv_i386_xmlfiles): Likewise.
7621 (srv_amd64_xmlfiles): Likewise.
7622 (srv_i386_linux_xmlfiles): Likewise.
7623 (srv_amd64_linux_xmlfiles): Likewise.
7624 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7625 srv_xmlfiles to $srv_i386_xmlfiles.
7626 (i[34567]86-*-mingw32ce*): Likewise.
7627 (i[34567]86-*-mingw*): Likewise.
7628 (i[34567]86-*-nto*): Likewise.
7629 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7630 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7631 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7632 (x86_64-*-linux*): Likewise.
7633
7634 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7635 (init_registers_amd64_linux): New.
7636 (x86_arch_setup): Replace init_registers_x86_64_linux with
7637 init_registers_amd64_linux.
7638
193f13e6
MK
76392010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7640
7641 * configure.ac: Check for libdl. If it is not available link against
7642 static libthread_db.
7643 * configure: Regenerate.
7644
85d721b8
PA
76452010-02-22 Pedro Alves <pedro@codesourcery.com>
7646
7647 PR9605
7648
7649 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7650 handing a read watchpoint.
7651 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7652
6076632b
DE
76532010-02-12 Doug Evans <dje@google.com>
7654
7655 * linux-low.c (linux_supports_tracefork_flag): Document.
7656 (linux_look_up_symbols): Add comment.
7657
3327ccf7
L
76582010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7659
7660 * regcache.c (supply_register): Clear regcache if buf is NULL.
7661
0718675c 76622010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7663 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7664
7665 * inferiors.c (find_inferior): Add function documentation.
7666 (unloaded_dll): Handle the case where the unloaded dll has not
7667 been previously registered in the dll list.
7668
177321bd
DJ
76692010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7670
7671 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7672 (thumb2_breakpoint): New.
7673 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7674
2b009048
DJ
76752010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7676
7677 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7678 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7679 breakpoints.
7680
3be029c7
PA
76812010-01-21 Pedro Alves <pedro@codesourcery.com>
7682
7683 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7684
18f5de3b
JK
76852010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7686
7687 * linux-s390-low.c (s390_collect_ptrace_register)
7688 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7689
3743bb4f
DE
76902010-01-21 Doug Evans <dje@google.com>
7691
14ce3065
DE
7692 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7693 (PTRACE_ARG4_TYPE): New macro.
7694 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7695 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7696 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7697 (usr_store_inferior_registers): Ditto.
7698 (linux_read_memory, linux_write_memory): Ditto.
7699 (linux_test_for_tracefork): Ditto.
7700
3743bb4f
DE
7701 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7702 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7703
8b315be5
PA
77042010-01-21 Pedro Alves <pedro@codesourcery.com>
7705
7706 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7707 target.
7708
85492558
PA
77092010-01-21 Pedro Alves <pedro@codesourcery.com>
7710
7711 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7712 prototype to take a regcache. Adjust.
7713
442ea881
PA
77142010-01-20 Pedro Alves <pedro@codesourcery.com>
7715
7716 * regcache.h (struct thread_info): Forward declare.
7717 (struct regcache): New.
7718 (new_register_cache): Adjust prototype.
7719 (get_thread_regcache): Declare.
7720 (free_register_cache): Adjust prototype.
7721 (registers_to_string, registers_from_string): Ditto.
7722 (supply_register, supply_register_by_name, collect_register)
7723 (collect_register_as_string, collect_register_by_name): Ditto.
7724 * regcache.c (struct inferior_regcache_data): Delete.
7725 (get_regcache): Rename to ...
7726 (get_thread_regcache): ... this. Adjust. Switch inferior before
7727 fetching registers.
7728 (regcache_invalidate_one): Adjust.
7729 (regcache_invalidate): Fix prototype.
7730 (new_register_cache): Return the new register cache.
7731 (free_register_cache): Change prototype.
7732 (realloc_register_cache): Adjust.
7733 (registers_to_string): Change prototype to take a regcache. Adjust.
7734 (registers_from_string): Ditto.
7735 (register_data): Ditto.
7736 (supply_register): Ditto.
7737 (supply_register_by_name): Ditto.
7738 (collect_register): Ditto.
7739 (collect_register_as_string): Ditto.
7740 (collect_register_by_name): Ditto.
7741 * server.c (process_serial_event): Adjust.
7742 * linux-low.h (regset_fill_func, regset_store_func): Change
7743 prototype.
7744 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7745 Change prototype.
7746 * linux-low.c (get_stop_pc): Adjust.
7747 (check_removed_breakpoint): Adjust.
7748 (linux_wait_for_event): Adjust.
7749 (linux_resume_one_lwp): Adjust.
7750 (fetch_register): Add regcache parameter. Adjust.
7751 (usr_store_inferior_registers): Ditto.
7752 (regsets_fetch_inferior_registers): Ditto.
7753 (regsets_store_inferior_registers): Ditto.
7754 (linux_fetch_registers, linux_store_registers): Ditto.
7755 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7756 regcache. Adjust.
43aaf8b6
PA
7757 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7758 Ditto.
442ea881
PA
7759 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7760 prototype to take a regcache.
7761 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7762 * remote-utils.c (convert_ascii_to_int, outreg)
7763 (prepare_resume_reply): Change prototype to take a regcache.
7764 Adjust.
7765 * target.h (struct target_ops) <fetch_registers, store_registers>:
7766 Change prototype to take a regcache.
7767 (fetch_inferior_registers, store_inferior_registers): Change
7768 prototype to take a regcache. Adjust.
7769 * proc-service.c (ps_lgetregs): Adjust.
7770 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7771 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7772 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7773 take a regcache. Adjust.
7774 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7775 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7776 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7777 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7778 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7779 (cris_cannot_fetch_register):
7780 (cris_breakpoint_at): Change prototype to take a regcache.
7781 Adjust.
7782 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7783 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7784 to take a regcache. Adjust.
7785 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7786 Adjust.
7787 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7788 take a regcache. Adjust.
7789 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7790 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7791 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7792 * linux-mips-low.c (mips_get_pc):
7793 (mips_set_pc): Change prototype to take a regcache. Adjust.
7794 (mips_reinsert_addr): Adjust.
7795 (mips_collect_register): Change prototype to take a regcache.
7796 Adjust.
7797 (mips_supply_register):
7798 (mips_collect_register_32bit, mips_supply_register_32bit)
7799 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7800 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7801 * linux-ppc-low.c (ppc_supply_ptrace_register)
7802 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7803 (parse_spufs_run): Adjust.
7804 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7805 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7806 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7807 take a regcache. Adjust.
7808 * linux-s390-low.c (s390_collect_ptrace_register)
7809 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7810 (s390_set_pc): Change prototype to take a regcache. Adjust.
7811 (s390_arch_setup): Adjust.
7812 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7813 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7814 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7815 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7816 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7817 regcache. Adjust.
7818 (sparc_breakpoint_at): Adjust.
7819 * linux-xtensa-low.c (xtensa_fill_gregset):
7820 (xtensa_store_gregset):
7821 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7822 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7823 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7824 prototype to take a regcache. Adjust.
7825 * win32-arm-low.c (arm_fetch_inferior_register)
7826 (arm_store_inferior_register): Change prototype to take a
7827 regcache. Adjust.
7828 * win32-i386-low.c (i386_fetch_inferior_register)
7829 (i386_store_inferior_register): Change prototype to take a
7830 regcache. Adjust.
7831 * win32-low.c (child_fetch_inferior_registers)
7832 (child_store_inferior_registers): Change prototype to take a
7833 regcache. Adjust.
7834 (win32_wait): Adjust.
7835 (win32_fetch_inferior_registers): Change prototype to take a
7836 regcache. Adjust.
7837 (win32_store_inferior_registers): Adjust.
7838 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7839 store_inferior_register>: Change prototype to take a regcache.
7840
60c3d7b0
DE
78412010-01-20 Doug Evans <dje@google.com>
7842
7843 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7844 #ifdef.
7845 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7846 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7847
dc146f7c
VP
78482010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7849
7850 * linux-low.c (linux_core_of_thread): New.
7851 (compare_ints, show_process, list_threads): New.
7852 (linux_qxfer_osdata): Report threads and cores.
7853 (linux_target_op): Register linux_core_of_thread.
7854 * remote-utils.c (prepare_resume_reply): Report the core.
7855 (buffer_xml_printf): Support %d specifier.
7856 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7857 New.
7858 (handle_query): Handle qXfer:threads. Announce availability
7859 thereof.
7860 * target.h (struct target_ops): New field core_of_thread.
7861
7803799a
UW
78622010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7863
7864 * Makefile.in (clean): Remove new generated files.
7865 (reg-s390.o, reg-s390.c): Remove rules.
7866 (reg-s390x.o, reg-s390x.c): Likewise.
7867 (s390-linux32.o, s390-linux32.c): Add rules.
7868 (s390-linux64.o, s390-linux64.c): Likewise.
7869 (s390x-linux64.o, s390x-linux64.c): Likewise.
7870 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7871 * linux-s390-low.c: Include <elf.h>.
7872 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7873 (init_registers_s390): Remove prototype.
7874 (init_registers_s390x): Likewise.
7875 (init_registers_s390_linux32): Add prototype.
7876 (init_registers_s390_linux64): Likewise.
7877 (init_registers_s390x_linux64): Likewise.
7878 (s390_num_regs_3264): New define.
7879 (s390_regmap_3264): New global variable.
7880 (s390_cannot_fetch_register): Remove obsolete check.
7881 (s390_cannot_store_register): Likewise.
7882 (s390_collect_ptrace_register): Handle upper/lower register halves.
7883 (s390_supply_ptrace_register): Likewise.
7884 (s390_fill_gregset): Update to register number changes.
7885 (s390_get_hwcap): New routine.
7886 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7887 Install appropriate regmap and register set.
7888
6e7ffa39
JB
78892010-01-01 Joel Brobecker <brobecker@adacore.com>
7890
7891 * server.c (gdbserver_version): Update copyright year to 2010.
7892 * gdbreplay.c (gdbreplay_version): Likewise.
7893
957f3f49
DE
78942009-12-28 Doug Evans <dje@google.com>
7895
7896 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7897 elf/external.h. Include <elf.h> instead but only if necessary.
7898
ca5c370d
PA
78992009-12-28 Pedro Alves <pedro@codesourcery.com>
7900
7901 * linux-low.c (linux_remove_process): Remove `detaching'
7902 parameter. Don't release/detach from thread_db here.
7903 (linux_kill): Release/detach from thread_db here, ...
7904 (linux_detach): ... and here, before actually detaching.
7905 (linux_wait_1): ... and here, when a process exits.
7906 * thread-db.c (any_thread_of): New.
7907 (thread_db_free): Switch the current inferior to a thread of the
7908 passed in process.
7909
4ee62156
DE
79102009-12-21 Doug Evans <dje@google.com>
7911
d90e6a88
DE
7912 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7913
c5f62d5f
DE
7914 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7915 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7916 warning ifndef __NR_tkill. Move setting of errno there too.
7917 Delete unnecessary resetting of errno after syscall.
7918 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7919
10e86dd7
DE
7920 * configure.ac: Check for dladdr.
7921 * config.in: Regenerate.
7922 * configure: Regenerate.
7923 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7924 (try_thread_db_load): Update.
7925
4ee62156
DE
7926 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7927
00f515da
DE
79282009-12-18 Doug Evans <dje@google.com>
7929
e9464885
DE
7930 * event-loop.c: Include unistd.h if it exists.
7931
07d4f67e
DE
7932 * linux-low.c (my_waitpid): Move definition away from being in
7933 between linux_tracefork_child/linux_test_for_tracefork.
7934
00f515da
DE
7935 * gdb_proc_service.h (psaddr_t): Fix type.
7936 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7937 signature to match glibc.
7938
1de1badb
DE
79392009-12-16 Doug Evans <dje@google.com>
7940
7941 * linux-low.c (linux_read_memory): Fix argument to read.
7942
aeeb81d1
PA
79432009-11-26 Pedro Alves <pedro@codesourcery.com>
7944
7945 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7946 events, don't leave current_inferior pointing at null.
7947
10357975
PA
79482009-11-26 Pedro Alves <pedro@codesourcery.com>
7949
7950 * win32-low.c (LOG): Delete.
7951 (OUTMSG): Output to stderr.
7952 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7953 on compile time LOG macro.
7954 (win32_wait): Fix debug output.
7955
cf6e3471
PA
79562009-11-26 Pedro Alves <pedro@codesourcery.com>
7957
7958 * win32-low.c (win32_add_one_solib): If the dll name is
7959 "ntdll.dll", prepend the system directory to the dll path.
7960
0c85e18e
MK
79612009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7962
7963 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7964
9ac544ce 79652009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7966 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7967
7968 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7969 * configure.ac: Check for __mcoldfire__ and set
7970 gdb_cv_m68k_is_coldfire.
7971 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7972 reg-cf.o and reg-m68k.o.
7973 * configure: Regenerated.
7974
fd7dd3e6
PA
79752009-11-16 Pedro Alves <pedro@codesourcery.com>
7976
7977 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7978 Pass it to thread_db_free.
7979 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7980 proper `detaching' argument to linux_remove_process.
7981 * linux-low.h (thread_db_free): Add `detaching' parameter.
7982 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7983 to thread_db_free.
7984 (thread_db_free): Add `detaching' parameter. Only
7985 call td_ta_clear_event if detaching from process.
7986
75aa492e
MK
79872009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7988
7989 * thread-db.c (thread_db_free): Fix typo.
7990
21e1bee4
PP
79912009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7992
7993 PR gdb/10838
7994 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7995
8838b45e
NS
79962009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7997
7998 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7999 with an i686 compiler.
8000 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8001 needed.
8002 * configure: Rebuilt.
8003
8a35fb51
SL
80042009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8005
8006 PR gdb/10783
8007
8008 * server.c (handle_search_memory_1): Correct read_addr initialization
8009 in loop for searching subsequent chunks.
8010
96f15937
PP
80112009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8012
8013 * configure.ac: New --with-libthread-db option.
8014 * thread-db.c: Allow direct dependence on libthread_db.
8015 (thread_db_free): Adjust.
8016 * config.in: Regenerate.
8017 * configure: Likewise.
889bf7c5 8018
5f7d1694
PP
80192009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8020
8021 PR gdb/10757
8022 * thread-db.c (attach_thread): New function.
8023 (maybe_attach_thread): Return success/failure.
8024 (find_new_threads_callback): Adjust.
889bf7c5
PA
8025 (thread_db_find_new_threads): Loop until no new threads.
8026
88e3b899
PA
80272009-10-13 Pedro Alves <pedro@codesourcery.com>
8028
8029 * proc-service.c (ps_lgetregs): Formatting.
8030
cdbfd419
PP
80312009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8032
8033 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8034 * configure.ac: Adjust.
8035 * linux-low.h (struct process_info_private): Move members to struct
8036 thread_db.
8037 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8038 * linux-low.c (linux_remove_process): Adjust.
8039 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8040 * server.c (handle_query): Move code ...
8041 (handle_monitor_command): ... here. New function.
8042 * target.h (struct target_ops): New member.
8043 * thread-db.c (struct thread_db): New.
8044 (libthread_db_search_path): New variable.
8045 (thread_db_create_event, thread_db_enable_reporting)
8046 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8047 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8048 (try_thread_db_load_1, dladdr_to_soname): New functions.
8049 (try_thread_db_load, thread_db_load_search): New functions.
8050 (thread_db_init): Search for libthread_db.
8051 (thread_db_free): New function.
8052 (thread_db_handle_monitor_command): Likewise.
8053 * config.in: Regenerate.
8054 * configure: Regenerate.
889bf7c5 8055
4168d2d6
UW
80562009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8057
8058 * spu-low.c (spu_kill): Wait for inferior to terminate.
8059 Call clear_inferiors.
8060 (spu_detach): Call clear_inferiors.
8061
81ecdfbb
RW
80622009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8063
8064 * aclocal.m4: Regenerate.
8065 * config.in: Likewise.
8066 * configure: Likewise.
8067
0b9ff2c0
UW
80682009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8069
8070 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8071 (parse_spufs_run): New function.
8072 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8073 (ppc_breakpoint_at): Handle SPU breakpoints.
8074
efcbbd14
UW
80752009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8076
8077 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8078 (SPUFS_MAGIC): Define.
8079 (spu_enumerate_spu_ids): New function.
8080 (linux_qxfer_spu): New function.
8081 (linux_target_ops): Install linux_qxfer_spu.
8082
f4d9bade
UW
80832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8084
8085 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8086 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8087 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8088 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8089 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8090 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8091 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8092 (init_registers_powerpc_cell32l): Add prototype.
8093 (init_registers_powerpc_cell64l): Likewise.
8094 (ppc_arch_setup): Detect Cell/B.E. architecture.
8095
96e946ca
RW
80962009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8097
8098 * Makefile.in (datarootdir): New variable.
8099
58d6951d
DJ
81002009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8101
8102 * linux-low.c (linux_write_memory): Update debugging output.
8103 * Makefile.in (clean): Add new descriptions.
8104 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8105 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8106 * configure.srv: Add new files for arm*-*-linux*.
8107 * linux-arm-low.c: Add new declarations.
8108 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8109 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8110 (HWCAP_VFPv3D16): New.
8111 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8112 instead of __IWMMXT__.
8113 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8114 (arm_arch_setup): New.
8115 (target_regsets): Remove #ifdef. Add VFP regset.
8116 (the_low_target): Use arm_arch_setup.
8117
12b42a12
DJ
81182009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8119
8120 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8121 the main thread again.
8122
ac8c974e
AR
81232009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8124
8125 Adding Neutrino gdbserver.
8126 * configure: Regenerated.
8127 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8128 * configure.srv (i[34567]86-*-nto*): New target.
8129 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8130 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8131 (nto_comctrl) [__QNX__]: New function.
8132 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8133
4424e0c3 81342009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8135
8136 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8137 srv_tgtobj.
8138
912cf4ba
PA
81392009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8140 Pedro Alves <pedro@codesourcery.com>
8141
8142 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8143 don't support CONTEXT_EXTENDED_REGISTERS.
8144 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8145 (the_low_target): Install them.
8146 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8147 failing with ERROR_PIPE_NOT_CONNECTED.
8148
aa5ca48f
DE
81492009-06-30 Doug Evans <dje@google.com>
8150 Pierre Muller <muller@ics.u-strasbg.fr>
8151
8152 Add h/w watchpoint support to x86-linux, win32-i386.
8153 * Makefile.in (SFILES): Add i386-low.c
8154 (i386_low_h): Define.
8155 (i386-low.o): Add dependencies.
8156 (linux-x86-low.o): Add i386-low.h dependency.
8157 (win32-i386-low.o): Ditto.
8158 * i386-low.c: New file.
8159 * i386-low.h: New file.
8160 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8161 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8162 * linux-low.c (linux_add_process): Initialize arch_private.
8163 (linux_remove_process): Free arch_private.
8164 (add_lwp): Initialize arch_private.
8165 (delete_lwp): Free arch_private.
8166 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8167 provided.
8168 * linux-low.h (process_info_private): New member arch_private.
8169 (lwp_info): New member arch_private.
8170 (linux_target_ops): New members new_process, new_thread,
8171 prepare_to_resume.
8172 (ptid_of): New macro.
8173 * linux-x86-low.c: Include stddef.h, i386-low.h.
8174 (arch_process_info): New struct.
8175 (arch_lwp_info): New struct.
8176 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8177 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8178 (i386_dr_low_get_status): New function.
8179 (x86_insert_point, x86_remove_point): New functions.
8180 (x86_stopped_by_watchpoint): New function.
8181 (x86_stopped_data_address): New function.
8182 (x86_linux_new_process, x86_linux_new_thread): New functions.
8183 (x86_linux_prepare_to_resume): New function.
8184 (the_low_target): Add entries for insert_point, remove_point,
8185 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8186 prepare_to_resume.
8187 * server.c (debug_hw_points): New global.
8188 (monitor_show_help): Document set debug-hw-points.
8189 (handle_query): Process "set debug-hw-points".
8190 * server.h (debug_hw_points): Declare.
8191 (paddress): Declare.
8192 * utils.c (NUMCELLS, CELLSIZE): New macros.
8193 (get_sell, xsnprintf, paddress): New functions.
8194 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8195 remove_point, stopped_by_watchpoint, stopped_data_address.
8196 * win32-i386-low.c: Include i386-low.h.
8197 (debug_reg_state): Replaces dr.
8198 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8199 (i386_dr_low_get_status): New function.
8200 (i386_insert_point, i386_remove_point): New functions.
8201 (i386_stopped_by_watchpoint): New function.
8202 (i386_stopped_data_address): New function.
8203 (i386_initial_stuff): Update.
8204 (get_thread_context,set_thread_context,i386_thread_added): Update.
8205 (the_low_target): Add entries for insert_point,
8206 remove_point, stopped_by_watchpoint, stopped_data_address.
8207 * win32-low.c (win32_insert_watchpoint): New function.
8208 (win32_remove_watchpoint): New function.
8209 (win32_stopped_by_watchpoint): New function.
8210 (win32_stopped_data_address): New function.
8211 (win32_target_ops): Add entries for insert_watchpoint,
8212 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8213 * win32-low.h (win32_target_ops): New members insert_point,
8214 remove_point, stopped_by_watchpoint, stopped_data_address.
8215
d993e290
PA
82162009-06-25 Pedro Alves <pedro@codesourcery.com>
8217
8218 * server.c (process_serial_event): Re-return unsupported, not
8219 error, if the type isn't recognized. Re-allow supporting only
8220 insert or remove packets. Also call require_running for
8221 breakpoints. Add missing break statement to default case. Tidy.
8222 * target.h (struct target_ops): Rename insert_watchpoint to
8223 insert_point, and remove_watchpoint to remove_point.
8224
8225 * linux-low.h (struct linux_target_ops): Likewise.
8226 * linux-low.c (linux_insert_watchpoint): Rename to ...
8227 (linux_insert_point): ... this. Adjust.
8228 (linux_remove_watchpoint): Rename to ...
8229 (linux_remove_point): ... this. Adjust.
8230 (linux_target_ops): Adjust.
8231 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8232 (cris_insert_point): ... this.
8233 (cris_remove_watchpoint): Rename to ...
8234 (cris_remove_point): ... this.
8235 (the_low_target): Adjust.
8236
0f54c268
PM
82372009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8238
8239 * server.c (handle_v_kill): Pass signal_pid to
8240 kill_inferior if multi_process is zero.
8241
c6314022
AR
82422009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8243
8244 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8245 * target.h (target_ops): Comment for *_watchpoint to make it clear
8246 the functions can get types '0' and '1'.
8247
4463ce24
AR
82482009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8249
8250 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8251 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8252 * regcache.c (get_regcache): Likewise.
8253 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8254 * win32-low.c (child_fetch_inferior_registers): Remove check for
8255 regno 0.
8256
cf8fd78b
PA
82572009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8258 Pedro Alves <pedro@codesourcery.com>
8259
8260 * target.h (struct target_ops) <supports_multi_process>: New
8261 callback.
8262 (target_supports_multi_process): New.
8263 * server.c (handle_query): Even if GDB reports support, only
8264 enable multi-process if the target also supports it. Report
8265 multi-process support only if the target backend supports it.
8266 * linux-low.c (linux_supports_multi_process): New function.
8267 (linux_target_ops): Install it as target_supports_multi_process
8268 callback.
8269
47c0c975
DE
82702009-05-24 Doug Evans <dje@google.com>
8271
e09875d4
DE
8272 Global renaming of find_thread_pid to find_thread_ptid.
8273 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8274 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8275 All callers updated.
8276
e27d73f6
DE
8277 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8278 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8279 directly.
8280
47c0c975
DE
8281 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8282 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8283 (linux_resume_one_lwp): Ditto.
8284
2acc282a
DE
82852009-05-23 Doug Evans <dje@google.com>
8286
8287 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8288 from struct inferior_list_entry * to struct lwp_info *.
8289 All callers updated.
8290
9f1036c1
DE
82912009-05-13 Doug Evans <dje@google.com>
8292
8293 * linux-x86-low.c: Don't include assert.h.
8294 (x86_siginfo_fixup): Use fatal, not assert.
8295 (x86_arch_setup): Fix comment.
8296
d0722149
DE
82972009-05-12 Doug Evans <dje@google.com>
8298
8299 Biarch support for i386/amd64 gdbserver.
8300 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8301 Add linux-x86-low.c.
8302 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8303 (linux-x86-low.o): Add.
8304 * linux-x86-64-low.c: Delete.
8305 * linux-i386-low.c: Delete.
8306 * linux-x86-low.c: New file.
8307 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8308 linux-x86-low.o.
8309 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8310 linux-x86-low.o.
8311 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8312 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8313 (linux_child_pid_to_exec_file): New function.
8314 (elf_64_header_p, elf_64_file_p): New functions.
8315 (siginfo_fixup): New function.
8316 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8317 give target a chance to convert layout.
8318 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8319 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8320
fdeb2a12
DE
83212009-05-07 Doug Evans <dje@google.com>
8322
8323 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8324 (regsets_store_inferior_registers): Ditto.
8325
a6dbe5df
PA
83262009-05-06 Pedro Alves <pedro@codesourcery.com>
8327
8328 PR server/10048
8329
8330 * linux-low.c (must_set_ptrace_flags): Delete.
8331 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8332 of the global.
8333 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8334 `lwp->must_set_ptrace_flags' instead.
ba42693b 8335 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8336 (linux_wait_1): ... not here.
8337
5091eb23
DE
83382009-04-30 Doug Evans <dje@google.com>
8339
9f767825
DE
8340 * inferiors.c (started_inferior_callback): New function.
8341 (attached_inferior_callback): New function.
8342 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8343 * server.c (print_started_pid, print_attached_pid): New functions.
8344 (detach_or_kill_for_exit): New function.
8345 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8346 * server.h (have_started_inferiors_p): Declare.
8347 (have_attached_inferiors_p): Declare.
8348
5091eb23
DE
8349 * inferiors.c (remove_process): Fix memory leak, free process.
8350 * linux-low.c (linux_remove_process): New function.
8351 (linux_kill): Call it instead of remove_process.
8352 (linux_detach, linux_wait_1): Ditto.
8353
155c8968
PA
83542009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8355
8356 * configure.srv: Add x86 Windows CE target.
8357
7fe519cb
UW
83582009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8359
8360 * inferiors.c (get_thread_process): Make global.
8361 * server.h (get_thread_process): Add prototype.
8362 * thread-db.c (find_one_thread): Use get_thread_process
8363 instead of current_process.
8364 (thread_db_get_tls_address): Do not crash if called when
8365 thread layer is not yet initialized.
8366
5472f405
UW
83672009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8368
8369 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8370 * spu-low.c (current_tid): Rename to ...
8371 (current_ptid): ... this.
8372 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8373 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8374 ptid_get_lwp (current_ptid) instead of current_tid.
8375 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8376 instead of current_tid. Use find_process_pid to verify pid
8377 argument is valid. Pass proper argument to remove_process.
8378 (spu_thread_alive): Compare current_ptid instead of current_tid.
8379 (spu_resume): Likewise.
8380
55ac2b99
PA
83812009-04-02 Pedro Alves <pedro@codesourcery.com>
8382
8383 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8384 variable.
8385
95954743
PA
83862009-04-01 Pedro Alves <pedro@codesourcery.com>
8387
8388 Implement the multiprocess extensions, and add linux multiprocess
8389 support.
8390
8391 * server.h (ULONGEST): Declare.
8392 (struct ptid, ptid_t): New.
8393 (minus_one_ptid, null_ptid): Declare.
8394 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8395 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8396 (struct inferior_list_entry): Change `id' type from unsigned from
8397 to ptid_t.
8398 (struct sym_cache, struct breakpoint, struct
8399 process_info_private): Forward declare.
8400 (struct process_info): Declare.
8401 (current_process): Declare.
8402 (all_processes): Declare.
8403 (initialize_inferiors): Declare.
8404 (add_thread): Adjust to use ptid_t.
8405 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8406 (add_process, remove_process, find_thread_pid): Declare.
8407 (find_inferior_id): Adjust to use ptid_t.
8408 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8409 (multi_process): Declare.
8410 (push_event): Adjust to use ptid_t.
8411 (read_ptid, write_ptid): Declare.
8412 (prepare_resume_reply): Adjust to use ptid_t.
8413 (clear_symbol_cache): Declare.
8414 * inferiors.c (all_processes): New.
8415 (null_ptid, minus_one_ptid): New.
8416 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8417 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8418 (add_thread): Change unsigned long to ptid. Remove gdb_id
8419 parameter. Adjust.
8420 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8421 (gdb_id_to_thread): Rename to ...
8422 (find_thread_pid): ... this. Change unsigned long to ptid.
8423 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8424 (loaded_dll, pull_pid_from_list): Adjust.
8425 (add_process, remove_process, find_process_pid)
8426 (get_thread_process, current_process, initialize_inferiors): New.
8427 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8428 (struct target_waitstatus) <related_pid>: Ditto.
8429 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8430 return type to int.
8431 (struct target_ops) <join>: Add `pid' argument.
8432 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8433 (struct target_ops) <wait>: Add `ptid' field. Change return type
8434 to ptid.
8435 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8436 (mywait): Add `ptid' argument. Change return type to ptid_t.
8437 (target_pid_to_str): Declare.
8438 * target.c (set_desired_inferior): Adjust to use ptids.
8439 (mywait): Add new `ptid' argument. Adjust.
8440 (target_pid_to_str): New.
8441 * mem-break.h (free_all_breakpoints): Declare.
8442 * mem-break.c (breakpoints): Delelete.
8443 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8444 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8445 to use per-process breakpoint list.
8446 (free_all_breakpoints): New.
8447 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8448 (symbol_cache, all_symbols_looked_up): Delete.
8449 (hexchars): New.
8450 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8451 read_ptid): New.
8452 (prepare_resume_reply): Change ptid argument's type from unsigned
8453 long to ptid_t. Adjust. Implement W;process and X;process.
8454 (free_sym_cache, clear_symbol_cache): New.
8455 (look_up_one_symbol): Adjust to per-process symbol cache. *
8456 * server.c (cont_thread, general_thread, step_thread): Change type
8457 to ptid_t.
8458 (attached): Delete.
8459 (multi_process): New.
8460 (last_ptid): Change type to ptid_t.
8461 (struct vstop_notif) <ptid>: Change type to ptid_t.
8462 (queue_stop_reply, push_event): Change `ptid' argument's type to
8463 ptid_t.
8464 (discard_queued_stop_replies): Add `pid' argument.
8465 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8466 changes. Don't reference the `attached' global.
8467 (attach_inferior): Adjust to mywait interface changes.
8468 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8469 features. Handle and report "multiprocess+". Handle
8470 "qAttached:PID".
8471 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8472 changes.
8473 (handle_v_kill): New.
8474 (handle_v_stopped): Adjust to use target_pid_to_str.
8475 (handle_v_requests): Allow multiple attaches and runs when
8476 multiprocess extensions are in effect. Handle "vKill".
8477 (myresume): Adjust to use ptids.
8478 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8479 (handle_status): Adjust to discard_queued_stop_replies interface
8480 change.
8481 (first_thread_of, kill_inferior_callback)
8482 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8483 (main): Call initialize_inferiors. Adjust to use ptids, killing
8484 and detaching from all inferiors. Handle multiprocess packet
8485 variants.
8486 * linux-low.h: Include gdb_proc_service.h.
8487 (struct process_info_private): New.
8488 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8489 <lwpid_of>: Use ptid_get_lwp.
8490 (get_lwp_thread): Adjust.
8491 (struct lwp_info): Add `dead' member.
8492 (find_lwp_pid): Declare.
8493 * linux-low.c (thread_db_active): Delete.
8494 (new_inferior): Adjust comment.
8495 (inferior_pid): Delete.
8496 (linux_add_process): New.
8497 (handle_extended_wait): Adjust.
8498 (add_lwp): Change unsigned long to ptid.
8499 (linux_create_inferior): Add process to processes table. Adjust
8500 to use ptids. Don't set new_inferior here.
8501 (linux_attach_lwp): Rename to ...
8502 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8503 it. Adjust to use ptids.
8504 (linux_attach_lwp): New.
8505 (linux_attach): Add process to processes table. Don't set
8506 new_inferior here.
8507 (struct counter): New.
8508 (second_thread_of_pid_p, last_thread_of_process_p): New.
8509 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8510 multiple processes.
8511 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8512 processes. Remove process from process table.
8513 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8514 to multiple processes.
8515 (any_thread_of): New.
8516 (linux_detach): Add `pid' argument, and handle it. Remove process
8517 from processes table.
8518 (linux_join): Add `pid' argument. Handle it.
8519 (linux_thread_alive): Change unsighed long argument to ptid_t.
8520 Consider dead lwps as not being alive.
8521 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8522 threads we're not interested in.
8523 (same_lwp, find_lwp_pid): New.
8524 (linux_wait_for_lwp): Change `pid' argument's type from int to
8525 ptid_t. Adjust.
8526 (linux_wait_for_event): Rename to ...
8527 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8528 from int to ptid_t. Adjust.
8529 (linux_wait_for_event): New.
8530 (linux_wait_1): Add `ptid' argument. Change return type to
8531 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8532 that exit from the process table.
8533 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8534 Adjust.
8535 (mark_lwp_dead): New.
8536 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8537 stopping all threads, mark its main lwp as dead.
8538 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8539 ptids.
8540 (fetch_register, usr_store_inferior_registers)
8541 (regsets_fetch_inferior_registers)
8542 (regsets_store_inferior_registers, linux_read_memory)
8543 (linux_write_memory): Inline `inferior_pid'.
8544 (linux_look_up_symbols): Adjust to use per-process
8545 `thread_db_active'.
8546 (linux_request_interrupt): Adjust to use ptids.
8547 (linux_read_auxv): Inline `inferior_pid'.
8548 (initialize_low): Don't reference thread_db_active.
8549 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8550 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8551 (ps_getpid): Return the pid of the current inferior.
8552 * thread-db.c (proc_handle, thread_agent): Delete.
8553 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8554 per-process data.
8555 (find_one_thread): Change argument type to ptid_t. Adjust to
8556 per-process data.
8557 (maybe_attach_thread): Adjust to per-process data and ptids.
8558 (thread_db_find_new_threads): Ditto.
8559 (thread_db_init): Ditto.
8560 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8561 processes table. Adjust to use ptids.
8562 (spu_kill, spu_detach): Adjust interface. Remove process from
8563 processes table.
8564 (spu_join, spu_thread_alive): Adjust interface.
8565 (spu_wait): Adjust interface. Remove process from processes
8566 table. Adjust to use ptids.
8567 * win32-low.c (current_inferior_tid): Delete.
8568 (current_inferior_ptid): New.
8569 (debug_event_ptid): New.
8570 (thread_rec): Take a ptid. Adjust.
8571 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8572 (child_delete_thread): Ditto.
8573 (do_initial_child_stuff): Add `attached' argument. Add process to
8574 processes table.
8575 (child_fetch_inferior_registers, child_store_inferior_registers):
8576 Adjust.
8577 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8578 (win32_attach): Pass 1 to do_initial_child_stuff.
8579 (win32_kill): Adjust interface. Remove process from processes
8580 table.
8581 (win32_detach): Ditto.
8582 (win32_join): Adjust interface.
8583 (win32_thread_alive): Take a ptid.
8584 (win32_resume): Adjust to use ptids.
8585 (get_child_debug_event): Ditto.
8586 (win32_wait): Adjust interface. Remove exiting process from
8587 processes table.
8588
bd99dc85
PA
85892009-04-01 Pedro Alves <pedro@codesourcery.com>
8590
8591 Non-stop mode support.
8592
8593 * server.h (non_stop): Declare.
8594 (gdb_client_data, handler_func): Declare.
8595 (delete_file_handler, add_file_handler, start_event_loop):
8596 Declare.
8597 (handle_serial_event, handle_target_event, push_event)
8598 (putpkt_notif): Declare.
8599 * target.h (enum resume_kind): New.
8600 (struct thread_resume): Replace `step' field by `kind' field.
8601 (TARGET_WNOHANG): Define.
8602 (struct target_ops) <wait>: Add `options' argument.
8603 <supports_non_stop, async, start_non_stop>: New fields.
8604 (target_supports_non_stop, target_async): New.
8605 (start_non_stop): Declare.
8606 (mywait): Add `options' argument.
8607 * target.c (mywait): Add `options' argument. Print child exit
8608 notifications here.
8609 (start_non_stop): New.
8610 * server.c (non_stop, own_buf, mem_buf): New globals.
8611 (struct vstop_notif): New.
8612 (notif_queue): New global.
8613 (queue_stop_reply, push_event, discard_queued_stop_replies)
8614 (send_next_stop_reply): New.
8615 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8616 interface changes.
8617 (attach_inferior): In non-stop mode, don't wait for the target
8618 here.
8619 (handle_general_set): Handle QNonStop.
8620 (handle_query): When handling qC, return the current general
8621 thread, instead of the first thread of the list.
8622 (handle_query): If the backend supports non-stop mode, include
8623 QNonStop+ in the qSupported query response.
8624 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8625 and non-stop mode.
8626 (handle_v_attach, handle_v_run): Handle non-stop mode.
8627 (handle_v_stopped): New.
8628 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8629 (myresume): Adjust to use resume_kind. Handle non-stop.
8630 (queue_stop_reply_callback): New.
8631 (handle_status): Handle non-stop mode.
8632 (main): Clear non_stop flag on reconnection. Use the event-loop.
8633 Refactor serial protocol handling from here ...
8634 (process_serial_event): ... to this new function. When GDB
8635 selects any thread, select one here. In non-stop mode, wait until
8636 GDB acks all pending events before exiting.
8637 (handle_serial_event, handle_target_event): New.
8638 * remote-utils.c (remote_open): Install remote_desc in the event
8639 loop.
8640 (remote_close): Remove remote_desc from the event loop.
8641 (putpkt_binary): Rename to...
8642 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8643 (putpkt_binary): New as wrapper around putpkt_binary_1.
8644 (putpkt_notif): New.
8645 (prepare_resume_reply): In non-stop mode, don't change the
8646 general_thread.
8647 * event-loop.c: New.
8648 * Makefile.in (OBJ): Add event-loop.o.
8649 (event-loop.o): New rule.
8650
8651 * linux-low.h (pid_of): Moved here.
8652 (lwpid_of): New.
8653 (get_lwp_thread): Use lwpid_of.
8654 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8655 * linux-low.c (pid_of): Delete.
8656 (inferior_pid): Use lwpid_of.
8657 (linux_event_pipe): New.
8658 (target_is_async_p): New.
8659 (delete_lwp): New.
8660 (handle_extended_wait): Use lwpid_of.
8661 (add_lwp): Don't set lwpid field.
8662 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8663 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8664 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8665 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8666 first. Adjust to linux_wait_for_event interface changes. Use
8667 lwpid_of.
8668 (linux_detach): Don't delete the main lwp here.
8669 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8670 (status_pending_p): Don't consider explicitly suspended lwps.
8671 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8672 pointer. Add OPTIONS argument. Change return type to int. Use
8673 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8674 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8675 pointer. Add status pointer argument. Return a pid instead of a
8676 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8677 changes. In non-stop mode, don't switch to a random thread.
8678 (linux_wait): Rename to...
8679 (linux_wait_1): ... this. Add target_options argument, and handle
8680 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8681 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8682 clean exit and signal exit code. Don't stop all threads in
8683 non-stop mode. In all-stop mode, only stop all threads when
8684 reporting a stop to GDB. Handle explicit thread stop requests.
8685 (async_file_flush, async_file_mark): New.
8686 (linux_wait): New.
8687 (send_sigstop): Use lwpid_of.
8688 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8689 interface changes. In non-stop mode, don't switch to a random
8690 thread.
8691 (linux_resume_one_lwp): Use lwpid_of.
8692 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8693 (linux_resume_one_thread): ... this. Handle resume_stop. In
8694 non-stop mode, don't look for pending flag in all threads.
8695 (resume_status_pending_p): Don't consider explicitly suspended
8696 threads.
8697 (my_waitpid): Reimplement. Emulate __WALL.
8698 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8699 Use lwpid_of.
8700 (sigchld_handler, linux_supports_non_stop, linux_async)
8701 (linux_start_non_stop): New.
8702 (linux_target_ops): Register linux_supports_non_stop, linux_async
8703 and linux_start_non_stop.
8704 (initialize_low): Install SIGCHLD handler.
8705 * thread-db.c (thread_db_create_event, find_one_thread)
8706 (thread_db_get_tls_address): Use lwpid_of.
8707 * win32-low.c (win32_detach): Adjust to use resume_kind.
8708 (win32_wait): Add `options' argument.
8709 * spu-low.c (spu_resume): Adjust to use resume_kind.
8710 (spu_wait): Add `options' argument.
8711
5b1c542e
PA
87122009-04-01 Pedro Alves <pedro@codesourcery.com>
8713
8714 Decouple target code from remote protocol.
8715
8716 * target.h (enum target_waitkind): New.
8717 (struct target_waitstatus): New.
8718 (struct target_ops) <wait>: Return an unsigned long. Take a
8719 target_waitstatus pointer instead of a char pointer.
8720 (mywait): Likewise.
8721 * target.c (mywait): Change prototype to return an unsigned long.
8722 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8723 * server.h (thread_from_wait, old_thread_from_wait): Delete
8724 declarations.
8725 (prepare_resume_reply): Change prototype to take a
8726 target_waitstatus.
8727 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8728 (last_status, last_ptid): New.
8729 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8730 pid instead of a signal.
8731 (attach_inferior): Remove "status" and "signal" parameters.
8732 Adjust.
8733 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8734 not as an address.
8735 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8736 (handle_v_requests, myresume): Remove "status" and "signal"
8737 parameters. Adjust.
8738 (handle_status): New.
8739 (main): Delete local `status'. Adjust.
8740 * remote-utils.c: Include target.h.
8741 (prepare_resume_reply): Change prototype to take a
8742 target_waitstatus. Adjust.
8743
8744 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8745 interface.
8746 * spu-low.c (spu_wait): Adjust.
8747 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8748 Delete.
8749 (win32_wait): Adjust.
8750
2bd7c093
PA
87512009-04-01 Pedro Alves <pedro@codesourcery.com>
8752
8753 * target.h (struct thread_resume): Delete leave_stopped member.
8754 (struct target_ops): Add a `n' argument to the `resume' callback.
8755 * server.c (start_inferior): Adjust.
8756 (handle_v_cont, myresume): Adjust.
8757 * linux-low.c (check_removed_breakpoint): Adjust to resume
8758 interface change, and to removed leave_stopped field.
8759 (resume_ptr): Delete.
8760 (struct thread_resume_array): New.
8761 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8762 resume interface change.
8763 (linux_continue_one_thread, linux_queue_one_thread)
8764 (resume_status_pending_p): Check if the resume field is NULL
8765 instead of checking the leave_stopped member.
8766 (linux_resume): Adjust to the target resume interface change.
8767 * spu-low.c (spu_resume): Adjust to the target resume interface
8768 change.
8769 * win32-low.c (win32_detach, win32_resume): Ditto.
8770
c35fafde
PA
87712009-04-01 Pedro Alves <pedro@codesourcery.com>
8772
8773 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8774 flag.
8775 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8776 pending.
8777 (linux_continue_one_thread): Only preserve the stepping flag if
8778 there's a pending breakpoint.
8779
0a59d50b
PA
87802009-03-31 Pedro Alves <pedro@codesourcery.com>
8781
8782 * server.c (main): After the inferior having exited, call
8783 remote_close before exiting gdbserver.
8784
f04c6d38
TJB
87852009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8786
8787 Fix size of FPSCR in Power 7 processors.
8788 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8789 (PPC_FEATURE_HAS_DFP): New #define.
8790 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8791 size of the FPSCR.
8792
78e5cee6
PA
87932009-03-23 Pedro Alves <pedro@codesourcery.com>
8794
8795 * server.c (handle_query) Whitespace and formatting.
8796
1b3f6016
PA
87972009-03-22 Pedro Alves <pedro@codesourcery.com>
8798
8799 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8800 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8801 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8802 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8803 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8804 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8805 Makefile.in, configure.ac: Fix whitespace throughout.
8806 * configure: Regenerate.
8807
a07b2135
PA
88082009-03-22 Pedro Alves <pedro@codesourcery.com>
8809
8810 * inferiors.c (find_inferior): Make it safe for the callback
8811 function to delete the currently iterated inferior.
8812
67cc2626
PA
88132009-03-22 Pedro Alves <pedro@codesourcery.com>
8814
8815 * Makefile.in (linuw_low_h): Move higher.
8816 (thread-db.o): Depend on $(linux_low_h).
8817
54a0b537
PA
88182009-03-17 Pedro Alves <pedro@codesourcery.com>
8819
8820 Rename "process" to "lwp" throughout.
8821
8822 * linux-low.c (all_processes): Rename to...
8823 (all_lwps): ... this.
8824 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8825 (add_process): Rename to ...
8826 (add_lwp): ... this. Adjust.
8827 (linux_create_inferior): Adjust.
8828 (linux_attach_lwp): Adjust.
8829 (linux_attach): Adjust.
8830 (linux_kill_one_process): Rename to ...
8831 (linux_kill_one_lwp): ... this. Adjust.
8832 (linux_kill): Adjust.
8833 (linux_detach_one_process): Rename to ...
8834 (linux_detach_one_lwp): ... this. Adjust.
8835 (linux_detach): Adjust.
8836 (check_removed_breakpoint): Adjust.
8837 (status_pending_p): Adjust.
8838 (linux_wait_for_process): Rename to ...
8839 (linux_wait_for_lwp): ... this. Adjust.
8840 (linux_wait_for_event): Adjust.
8841 (send_sigstop): Adjust.
8842 (wait_for_sigstop): Adjust.
8843 (stop_all_processes): Rename to ...
8844 (stop_all_lwps): ... this.
8845 (linux_resume_one_process): Rename to ...
8846 (linux_resume_one_lwp): ... this. Adjust.
8847 (linux_set_resume_request, linux_continue_one_thread)
8848 (linux_queue_one_thread, resume_status_pending_p)
8849 (usr_store_inferior_registers, regsets_store_inferior_registers)
8850 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8851 Adjust.
8852 * linux-low.h (get_process): Rename to ...
8853 (get_lwp): ... this. Adjust.
8854 (get_thread_process): Rename to ...
8855 (get_thread_lwp): ... this. Adjust.
8856 (get_process_thread): Rename to ...
8857 (get_lwp_thread): ... this. Adjust.
8858 (struct process_info): Rename to ...
8859 (struct lwp_info): ... this.
8860 (all_processes): Rename to ...
8861 (all_lwps): ... this.
8862 * proc-service.c (ps_lgetregs): Adjust.
8863 * thread-db.c (thread_db_create_event, find_one_thread)
8864 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8865
0b16c5cf
PA
88662009-03-14 Pedro Alves <pedro@codesourcery.com>
8867
8868 * server.c (handle_query): Handle "qAttached".
8869
32de4b9d
NS
88702009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8871
8872 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8873 GPLv3, update license URL.
8874
2aecd87f
DE
88752009-03-01 Doug Evans <dje@google.com>
8876
93efd302 8877 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8878 (server_h): Add gdb_signals.h.
8879 (signals.o): Update.
8880 * server.h (target_signal_from_host,target_signal_to_host_p)
8881 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8882
86b1f9c5
PM
88832009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8884
8885 * remote-utils.c (getpkt): Also generate remote-debug
8886 information if noack_mode is set.
8887
4aa995e1
PA
88882009-02-06 Pedro Alves <pedro@codesourcery.com>
8889
8890 * server.c (handle_query): Report qXfer:siginfo:read and
8891 qXfer:siginfo:write as supported and handle them.
8892 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8893 * linux-low.c (linux_xfer_siginfo): New.
8894 (linux_target_ops): Set it.
8895
62709adf
PA
88962009-01-26 Pedro Alves <pedro@codesourcery.com>
8897
8898 * server.c (gdbserver_usage): Mention --remote-debug.
8899 (main): Accept '--remote-debug' switch.
8900
aef93bd7
DE
89012009-01-18 Doug Evans <dje@google.com>
8902
8903 * regcache.c (new_register_cache): No need to check result of xcalloc.
8904 * server.c (handle_search_memory): Back out calls to xmalloc,
8905 result is checked and error is returned to user upon failure.
8906 (handle_query): Ditto. Add more checks for result of malloc.
8907 (handle_v_cont): Check result of malloc, report error back to
8908 user upon failure.
8909 (handle_v_run): Ditto. Call freeargv.
8910 * server.h (freeargv): Declare.
8911 * utils.c (freeargv): New fn.
8912
54363045
DE
89132009-01-15 Doug Evans <dje@google.com>
8914
f626972c
DE
8915 * gdbreplay.c (perror_with_name): Make arg const char *.
8916 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8917 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8918 * utils.c (perror_with_name): Make arg const char *.
54363045 8919
18aae699
PA
89202009-01-14 Pedro Alves <pedro@codesourcery.com>
8921
8922 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8923 when handling a EXIT_PROCESS_DEBUG_EVENT.
8924
ff703abe
JB
89252009-01-06 Joel Brobecker <brobecker@adacore.com>
8926
8927 * gdbreplay.c (gdbreplay_version): Update copyright year.
8928 * server.c (gdbserver_version): Likewise.
8929
f21cc1a2 89302009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8931
8932 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8933 (handle_extended_wait): Improve comment.
0e21c1ec 8934
bca929d3
DE
89352008-12-13 Doug Evans <dje@google.com>
8936
8937 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8938 * server.h (ATTR_MALLOC): New macro.
8939 (xmalloc,xcalloc,xstrdup): Declare.
8940 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8941 * inferiors.c: Ditto.
8942 * linux-low.c: Ditto.
8943 * mem-break.c: Ditto.
8944 * regcache.c: Ditto.
8945 * remote-utils.c: Ditto.
8946 * server.c: Ditto.
8947 * target.c: Ditto.
8948 * win32-low.c: Ditto.
8949
97438e3f
DE
89502008-12-12 Doug Evans <dje@google.com>
8951
896c7fbb
DE
8952 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8953 in debugging printf.
8954
97438e3f
DE
8955 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8956
e3b886f8
DE
89572008-12-09 Doug Evans <dje@google.com>
8958
8959 * linux-low.h (struct process_info): Delete member tid, unused.
8960 * thread-db.c (find_one_thread): Update.
8961 (maybe_attach_thread): Update.
8962
07e059b5
VP
89632008-12-02 Pedro Alves <pedro@codesourcery.com>
8964
889bf7c5
PA
8965 * target.h (struct target_ops): Add qxfer_osdata member.
8966 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8967 and dirent.h.
8968 (linux_qxfer_osdata): New functions.
8969 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8970 callback.
8971 * server.c (handle_query): Handle "qXfer:osdata:read:".
8972 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8973 (buffer_xml_printf): New functions.
8974 * server.h (struct buffer): New.
8975 (buffer_grow_str, buffer_grow_str0): New macros.
8976 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8977 (buffer_xml_printf): Declare.
07e059b5 8978
4cab47ab
DE
89792008-11-24 Doug Evans <dje@google.com>
8980
8981 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8982
f142445f
DJ
89832008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8984
8985 * server.c (handle_v_run): Always use the supplied argument list.
8986
d0107bb6 89872008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8988
d0107bb6
BW
8989 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8990 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8991
2c4ad781
TJB
89922008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8993
8994 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8995 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8996 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8997 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8998 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8999 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9000 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9001 XML target descriptions.
9002 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9003 when inferior is running on an ISA 2.05 or later processor. Add
9004 special case to return offset for full 64-bit slot of FPSCR when
9005 in 32-bits.
9006
dfb64f85
DJ
90072008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9008
9009 * Makefile.in (SFILES, clean): Added sparc64 files.
9010 (reg-sparc64.o, reg-sparc64.c): New.
9011 * configure.srv (sparc*-*-linux*): New configuration.
9012 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9013 syscall arguments for SPARC.
9014 (regsets_store_inferior_registers): Likewise.
9015 * linux-sparc-low.c: New file.
9016
66b6e1dd
DE
90172008-10-21 Doug Evans <dje@google.com>
9018
9019 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9020 (READLINE_DIR,READLINE_DEP): Delete.
9021 (INTERNAL_CFLAGS): Update.
9022 (LINTFLAGS): Update.
9023
9b710a42
PA
90242008-10-10 Pedro Alves <pedro@codesourcery.com>
9025
9026 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9027 whole argv from the last run, not just argv[0].
9028
5822d809
PA
90292008-09-08 Pedro Alves <pedro@codesourcery.com>
9030
9031 * regcache.c (new_register_cache): Return NULL if the register
9032 cache size isn't known yet.
9033 (free_register_cache): Avoid dereferencing a NULL regcache.
9034
74aac56f
DJ
90352008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9036
9037 * configure.srv: Merge MIPS and MIPS64.
9038
400b20f5
MR
90392008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9040
9041 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9042
677c5bb1
LM
90432008-08-18 Luis Machado <luisgpm@br.ibm.com>
9044
9045 * Makefile.in: Add required vsx dependencies.
9046
9047 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9048 Declare init_registers_powerpc_vsx32l.
9049 Declare init_registers_powerpc_vsx64l.
9050 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9051 (ppc_arch_setup): Check for VSX in hwcap.
9052 (ppc_fill_vsxregset): New function.
9053 (ppc_store_vsxregset): New function.
9054 Add new VSX entry in regset_info target_regsets.
9055
9056 * configure.srv: Add new VSX dependencies.
9057
a6f3e723
SL
90582008-08-12 Pedro Alves <pedro@codesourcery.com>
9059
9060 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9061 (remote_open): Set or clear transport_is_reliable.
9062 (putpkt_binary): Don't expect acks in noack mode.
9063 (getpkt): Don't send ack/nac in noack mode.
9064 * server.c (handle_general_set): Handle QStartNoAckMode.
9065 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9066 qSupported.
9067 (main): Reset noack_mode on every connection.
9068 * server.h (noack_mode): Declare.
9069
a417dc56
RW
90702008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9071
9072 * Makefile.in (GDBREPLAY_OBS): New variable.
9073 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9074
3221518c
UW
90752008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9076 Daniel Jacobowitz <dan@codesourcery.com>
9077
9078 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9079 (usr_store_inferior_registers): Likewise.
9080 (regsets_store_inferior_registers): Likewise.
9081
ec56be1b
PA
90822008-07-31 Rolf Jansen <rj@surtec.com>
9083 Pedro Alves <pedro@codesourcery.com>
9084
9085 * configure.ac: Check for memmem declaration.
9086 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9087 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9088 (disable_packet_qfThreadInfo): Unconditionally compile.
9089 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9090 * configure, config.in: Regenerate.
9091
2fe5e3ff
DE
90922008-07-28 Doug Kwan <dougkwan@google.com>
9093
9094 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9095 (linux_write_memory): Remove declaration of errno.
9096
836acd6d
UW
90972008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9098
9099 * linux-low.c (handle_extended_wait): Do not use "status"
9100 variable uninitialized.
9101
aeba519e
PA
91022008-07-07 Pedro Alves <pedro@codesourcery.com>
9103
9104 * server.c (handle_v_attach): Inhibit reporting dll changes.
9105
db42f210
PA
91062008-06-27 Pedro Alves <pedro@codesourcery.com>
9107
9108 * remote-utils.c (prepare_resume_reply): If requested, don't
9109 output "thread:TID" in the T stop reply.
9110
9111 * server.c (disable_packet_vCont, disable_packet_Tthread)
9112 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9113 (handle_query): If requested, disable support for qC, qfThreadInfo
9114 and qsThreadInfo.
9115 (handle_v_requests): If requested, disable support for vCont.
9116 (gdbserver_show_disableable): New.
9117 (main): Handle --disable-packet and --disable-packet=LIST.
9118
9119 * server.h (disable_packet_vCont, disable_packet_Tthread)
9120 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9121
8e4c5421
CD
91222008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9123
9124 * server.c (gdbserver_usage): Mention --version.
9125
6e23a804
DJ
91262008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9127
9128 * Makefile.in (gdbreplay.o): New rule.
9129
90aa6a40
JM
91302008-06-06 Joseph Myers <joseph@codesourcery.com>
9131
9132 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9133 message, not gdbserver.
9134
c16158bc 91352008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9136 Nathan Sidwell <nathan@codesourcery.com>
9137 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9138
9139 * acinclude.m4: Include ../../config/acx.m4.
9140 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9141 * configure, config.in: Regenerate.
9142 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9143 * server.c (gdbserver_version): Print PKGVERSION.
9144 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9145 (main): Adjust gdbserver_usage calls.
9146 * gdbreplay.c (version, host_name): Add declarations.
9147 (gdbreplay_version, gdbreplay_usage): New.
9148 (main): Accept --version and --help options.
9149
aeb75bf5
DJ
91502008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9151
9152 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9153 (arm_breakpoint_at): Handle Thumb.
9154 (the_low_target): Add comment.
9155
76b233dd
UW
91562008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9157
9158 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9159
08388c79
DE
91602008-05-09 Doug Evans <dje@google.com>
9161
a3c83fae
DE
9162 * server.h (decode_search_memory_packet): Declare.
9163 * remote-utils.c (decode_search_memory_packet): New fn.
9164 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9165 (handle_search_memory): New fn.
9166 (handle_query): Process qSearch:memory packets.
9167
bb9c3d36
UW
91682008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9169
9170 * regcache.c (registers_length): Remove.
9171 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9172 full register packet.
9173 * regcache.h (registers_length): Remove prototype.
9174 * server.h (PBUFSIZ): Define to 16384.
9175
7284e1be
UW
91762008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9177
9178 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9179 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9180 powerpc-64l.o, and powerpc-altivec64l.o.
9181 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9182 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9183 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9184 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9185 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9186 to srv_xmlfiles.
9187
9188 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9189 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9190 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9191 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9192 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9193 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9194 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9195 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9196 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9197 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9198 (clean): Update.
9199
9200 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9201 (init_registers_powerpc_32l): ... this new prototype.
9202 (init_registers_powerpc_32): Remove, replace by ...
9203 (init_registers_powerpc_altivec32l): ... this new prototype.
9204 (init_registers_powerpc_e500): Remove, replace by ...
9205 (init_registers_powerpc_e500l): ... this new prototype.
9206 (init_registers_ppc64): Remove, replace by ...
9207 (init_registers_powerpc_64l): ... this new prototype.
9208 (init_registers_powerpc_64): Remove, replace by ...
9209 (init_registers_powerpc_altivec64l): ... this new prototype.
9210 (ppc_num_regs): Set to 73.
9211 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9212 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9213 (ppc_cannot_store_register): Handle orig_r3 and trap.
9214 (ppc_arch_setup): Update init_registers_... calls.
9215 (ppc_fill_gregset): Handle orig_r3 and trap.
9216
9217 * inferiors.c (clear_inferiors): Reset current_inferior.
9218
fdc59709
PB
92192008-04-23 Paolo Bonzini <bonzini@gnu.org>
9220
889bf7c5
PA
9221 * acinclude.m4: Add override.m4.
9222 * configure: Regenerate.
fdc59709 9223
c9b2f845
UW
92242008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9225
9226 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9227 initial call to init_register_ppc64.
9228
550512b8
UW
92292008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9230
43aaf8b6
PA
9231 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9232 single powerpc*-*-linux* case.
550512b8
UW
9233 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9234
b6430ec3
UW
92352008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9236
9237 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9238 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9239 from reg_xmlfiles.
9240 * linux-ppc-low.c: Include <elf.h>.
9241 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9242 (ppc_hwcap): New global variable.
9243 (ppc_regmap): Remove __SPE__ #ifdef sections.
9244 (ppc_regmap_e500): New global variable.
9245 (ppc_cannot_store_register): Update __SPE__ special case.
9246 (ppc_get_hwcap): New function.
9247 (ppc_arch_setup): Use it to determine whether inferior supports
9248 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9249 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9250 Do not access registers if target does not support AltiVec.
9251 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9252 Do not access registers if target does not support SPE.
9253 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9254
52fa2412
UW
92552008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9256
9257 * linux-low.c (disabled_regsets, num_regsets): New.
9258 (use_regsets_p): Delete.
9259 (linux_wait_for_process): Clear disabled_regsets.
9260 (regsets_fetch_inferior_registers): Check and set it.
9261 (regsets_store_inferior_registers): Likewise.
9262 (linux_fetch_registers, linux_store_registers): Do not use
9263 use_regsets_p.
9264 (initialize_low): Allocate disabled_regsets.
9265
e28b3332
DJ
92662008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9267
9268 * Makefile.in (LIBOBJS): New.
9269 (OBS): Use LIBOBJS.
9270 (memmem.o): New rule.
9271 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9272 * configure: Regenerated.
9273
4536995d
UW
92742008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9275
9276 * server.c (handle_query): Never return "unsupported" for
9277 qXfer:features:read queries.
9278
221c031f
UW
92792008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9280
9281 * server.c (get_features_xml): Fix inverted condition.
9282 (handle_query): Always support qXfer:feature:read.
9283
ccd213ac
DJ
92842008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9285
9286 * server.c (wrapper_argv): New.
9287 (start_inferior): Handle wrapper_argv. If set, expect an extra
9288 trap.
9289 (gdbserver_usage): Document --wrapper.
9290 (main): Parse --wrapper.
9291
6fe305f7
UW
92922008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9293
9294 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9295 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9296 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9297 (ppc_set_pc): Likewise.
9298 (ppc_arch_setup): New function.
9299 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9300 of collect_register.
889bf7c5 9301 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9302
5b0a002e
UW
93032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9304
9305 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9306 instead of linux-ppc64-low.o.
9307 * linux-ppc64-low.c: Remove file.
9308 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9309 (linux-ppc64-low.o): Remove rule.
9310
9311 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9312 (init_registers_powerpc_64): Likewise.
9313 (ppc_regmap): Conditionally define depending on __powerpc64__.
9314 (ppc_cannot_store_register): Do not special-case "fpscr" when
9315 compiled on __powerpc64__.
9316 (ppc_collect_ptrace_register): New function.
9317 (ppc_supply_ptrace_register): New function.
9318 (ppc_breakpoint): Change type to "unsigned int".
9319 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9320 (the_low_target): Conditionally provide initializers for the
889bf7c5 9321 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9322 collect_ptrace_register and supply_ptrace_register members.
9323
9b4b61c8
UW
93242008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9325
9326 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9327 * server.c (gdbserver_xmltarget): Define.
9328 (get_features_xml): Use it to replace "target.xml" and arch_string.
9329
9330 * configure.srv: Remove srv_xmltarget. Add XML files that were
9331 mentioned there to srv_xmlfiles instead. Remove conditional tests
9332 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9333 srv_xmlfiles and srv_regobj to include all possible choices.
9334 * configure.ac (srv_xmltarget): Remove.
9335 (srv_xmlfiles): Do not add "target.xml".
9336 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9337 checks for supplementary target information.
9338 * configure: Regenerate.
9339 * Makefile.in (XML_TARGET): Remove.
9340 (target.xml): Remove rule.
9341 (clean): Do not clean up target.xml.
9342 (.PRECIOUS): Do not mention target.xml.
9343
9344 * target.h (struct target_ops): Remove arch_string member.
9345 * linux-low.c (linux_arch_string): Remove.
9346 (linux_target_ops): Remove arch_string initializer.
9347 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9348 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9349 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9350 * spu-low.c (spu_arch_string): Remove.
9351 (spu_target_ops): Remove arch_string initializer.
9352 * win32-low.c (win32_arch_string): Remove.
9353 (win32_target_ops): Remove arch_string initializer.
9354 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9355 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9356 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9357
ee1a7ae4
UW
93582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9359
9360 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9361 by collect_ptrace_register and supply_ptrace_register hooks.
9362 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9363 instead of checking for the_low_target.left_pad_xfer.
9364 (usr_store_inferior_registers): Use collect_ptrace_register callback
9365 instead of checking for the_low_target.left_pad_xfer.
9366
9367 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9368 (s390_supply_ptrace_register): Likewise.
9369 (s390_fill_gregset): Call s390_collect_ptrace_register.
9370 (the_low_target): Update.
9371
9372 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9373 (ppc_supply_ptrace_register): Likewise.
9374 (the_low_target): Update.
9375
9376 * linux-i386-low.c (the_low_target): Update.
9377 * linux-x86-64-low.c (the_low_target): Update.
9378
d61ddec4
UW
93792008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9380
9381 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9382 reg-s390.o and reg-s390x.o.
9383
9384 * linux-low.c (new_inferior): New global variable.
9385 (linux_create_inferior, linux_attach): Set it.
9386 (linux_wait_for_process): Call the_low_target.arch_setup after the
9387 target has stopped for the first time.
9388 (initialize_low): Do not call the_low_target.arch_setup.
9389
9390 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9391 (s390_set_pc): Likewise.
9392 (s390_arch_setup): New function.
9393 (the_low_target): Use s390_arch_setup as arch_setup routine.
9394
9395 * regcache.c (realloc_register_cache): New function.
9396 (set_register_cache): Call it for each existing regcache.
9397
d05b4ac3
UW
93982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9399
9400 * server.h (init_registers): Remove prototype.
9401
9402 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9403 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9404 instead of init_registers ().
9405 * linux-arm-low.c (init_registers_arm): Add prototype.
9406 (init_registers_arm_with_iwmmxt): Likewise.
9407 (the_low_target): Add initializer for arch_setup field.
9408 * linux-cris-low.c (init_registers_cris): Add prototype.
9409 (the_low_target): Add initializer for arch_setup field.
9410 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9411 (the_low_target): Add initializer for arch_setup field.
9412 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9413 (the_low_target): Add initializer for arch_setup field.
9414 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9415 (the_low_target): Add initializer for arch_setup field.
9416 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9417 (the_low_target): Add initializer for arch_setup field.
9418 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9419 (the_low_target): Add initializer for arch_setup field.
9420 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9421 (init_registers_mips64_linux): Likewise.
9422 (the_low_target): Add initializer for arch_setup field.
9423 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9424 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9425 (the_low_target): Add initializer for arch_setup field.
9426 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9427 (init_registers_powerpc_64): Likewise.
9428 (the_low_target): Add initializer for arch_setup field.
9429 * linux-s390-low.c (init_registers_s390): Add prototype.
9430 (init_registers_s390x): Likewise.
9431 (the_low_target): Add initializer for arch_setup field.
9432 * linux-sh-low.c (init_registers_sh): Add prototype.
9433 (the_low_target): Add initializer for arch_setup field.
9434 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9435 (the_low_target): Add initializer for arch_setup field.
9436 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9437 (the_low_target): Add initializer for arch_setup field.
9438
9439 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9440 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9441 instead of init_registers ().
9442 * win32-arm-low.c (init_registers_arm): Add prototype.
9443 (the_low_target): Add initializer for arch_setup field.
9444 * win32-i386-low.c (init_registers_i386): Add prototype.
9445 (the_low_target): Add initializer for arch_setup field.
9446
9447 * spu-low.c (init_registers_spu): Add prototype.
9448 (initialize_low): Call initialie_registers_spu () instead of
9449 initialize_registers ().
9450
fd96d250
PA
94512008-02-19 Pedro Alves <pedro@codesourcery.com>
9452
9453 * server.c (handle_v_requests): When handling the vRun and vAttach
9454 packets, if already debugging a process, don't kill it. Return an
9455 error instead.
9456
d41b6bb4
DJ
94572008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9458
9459 * server.c (handle_query): Correct length check.
9460
5ac588cf
PA
94612008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9462
9463 * win32-low.c (do_initial_child_stuff): Add process handle
9464 parameter. Set current_process_handle and current_process_id from the
9465 parameters. Clear globals.
9466 (win32_create_inferior): Don't set current_process_handle and
9467 current_process_id here. Instead pass them on the call to
9468 do_initial_child_stuff.
9469 (win32_attach): Likewise.
9470 (win32_clear_inferiors): New.
9471 (win32_kill): Don't close the current process handle or the
9472 current thread handle here. Instead call win32_clear_inferiors.
9473 (win32_detach): Don't open a new handle to the process. Call
9474 win32_clear_inferiors.
9475 (win32_join): Don't rely on current_process_handle; open a new
9476 handle using the process id.
9477 (win32_wait): Call win32_clear_inferiors when the inferior process
9478 has exited.
9479
ecd7ecbc
DJ
94802008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9481
9482 * server.c (monitor_show_help): Add "exit".
9483
1525d545
MG
94842008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9485
ecd7ecbc 9486 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9487 (clean): Add reg-xtensa.c.
9488 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9489 * configure.srv (xtensa*-*-linux*) New target.
9490 * linux-xtensa-low.c: New.
9491 * xtensa-xtregs.c: New.
1525d545 9492
59a016f0
PA
94932008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9494
9495 * hostio.c: Don't include errno.h.
9496 (errno_to_fileio_errno): Move to hostio-errno.
9497 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9498 error number outputting to the target->hostio_last_error callback.
9499 (hostio_packet_error): Use FILEIO_EINVAL directly.
9500 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9501 calls to hostio_error.
9502 * hostio-errno.c: New.
9503 * server.h (hostio_last_error_from_errno): Declare.
9504 * target.h (target_ops): Add hostio_last_error member.
9505 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9506 as hostio_last_error handler.
889bf7c5 9507 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9508 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9509 (wince_hostio_last_error): New functions.
9510 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9511 as hostio_last_error handler.
9512 (win32_target_ops) [!_WIN32_WCE]: Register
9513 hostio_last_error_from_errno as hostio_last_error handler.
9514 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9515 (hostio-errno.o): New rule.
9516 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9517 * configure.srv (srv_hostio_err_objs): New variable. Default to
9518 hostio-errno.o.
9519 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9520 * configure: Regenerate.
9521
2d717e4f
DJ
95222008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9523
9524 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9525 (linux_kill, linux_detach): Clean up the process list.
9526 * remote-utils.c (remote_open): Improve port number parsing.
9527 (putpkt_binary, input_interrupt): Only send interrupts if the target
9528 is running.
9529 * server.c (extended_protocol): Make static.
9530 (attached): Define earlier.
9531 (exit_requested, response_needed, program_argv): New variables.
9532 (target_running): New.
9533 (start_inferior): Clear attached here.
9534 (attach_inferior): Set attached here.
9535 (require_running): Define.
9536 (handle_query): Use require_running and target_running. Implement
9537 "monitor exit".
9538 (handle_v_attach, handle_v_run): New.
9539 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9540 (gdbserver_usage): Update.
9541 (main): Redo argument parsing. Handle --debug and --multi. Handle
9542 --attach along with other options or after the port. Save
9543 program_argv. Support no initial program. Resynchronize
9544 communication with GDB after an error. Handle "monitor exit".
9545 Use require_running and target_running. Always allow the extended
9546 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9547 restart in extended mode.
9548 * README: Refer to the GDB manual. Update --attach usage.
9549
7407e2de
AS
95502007-12-20 Andreas Schwab <schwab@suse.de>
9551
9552 * linux-low.c (STACK_SIZE): Define.
9553 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9554 (linux_test_for_tracefork): Likewise.
9555
b65d95c5
DJ
95562007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9557
9558 * linux-low.c (linux_wait_for_event): Update messages. Do not
9559 reinsert auto-delete breakpoints.
9560 * mem-break.c (struct breakpoint): Change return type of handler to
9561 int.
9562 (set_breakpoint_at): Update handler type.
9563 (reinsert_breakpoint_handler): Return 1 instead of calling
9564 delete_breakpoint.
9565 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9566 setting a new one.
9567 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9568 * mem-break.h (set_breakpoint_at): Update handler type.
9569 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9570 * win32-low.c (auto_delete_breakpoint): New.
9571 (get_child_debug_event): Use it.
9572
4e799345
DJ
95732007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9574
9575 * configure.ac: Check for pread and pwrite.
9576 * hostio.c (handle_pread): Fall back to lseek and read.
9577 (handle_pwrite): Fall back to lseek and write.
9578 * config.in, configure: Regenerated.
9579
27524b67
DJ
95802007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9581
9582 * server.c (myresume): Add own_buf argument.
9583 (main): Update calls.
9584
a20d5e98
DJ
95852007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9586
9587 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9588 * remote-utils.c (remote_open): Do not call disable_async_io.
9589 (block_async_io): Delete.
9590 (unblock_async_io): Make static.
9591 (initialize_async_io): New.
9592 * server.c (handle_v_cont): Handle async I/O here.
9593 (myresume): Likewise. Move other common resume tasks here...
9594 (main): ... from here. Call initialize_async_io. Disable async
9595 I/O before the main loop.
9596 * server.h (initialize_async_io): Declare.
9597 (block_async_io, unblock_async_io): Delete prototypes.
9598 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9599
b79d787e
DJ
96002007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9601
9602 * remote-utils.c (readchar): Allow binary data in received messages.
9603
d97903b2
PA
96042007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9605
9606 * win32-low.c (attaching): New global.
9607 (win32_create_inferior): Clear the `attaching' global.
9608 (win32_attach): Set the `attaching' global.
9609 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9610 attaching. Only set a breakpoint at the entry point if not
9611 attaching.
9612
311de423
PA
96132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9614
9615 * server.c (main): Don't report dll events on the initial
9616 connection on attaches.
9617
6c2d16d2
PA
96182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9619
9620 * server.c (main): Relax numerical bases supported for the pid of
9621 the --attach command line argument.
9622
5ca906e6
PA
96232007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9624
9625 * win32-low.c (win32_attach): Call OpenProcess before
9626 DebugActiveProcess, not after. Add last error output to error
9627 call.
9628
9c6c8194
PA
96292007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9630
9631 * win32-low.c (win32_get_thread_context)
9632 (win32_set_thread_context): New functions.
9633 (thread_rec): Use win32_get_thread_context.
9634 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9635 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9636 field.
9637
4d5d1aaa
PA
96382007-12-03 Leo Zayas
9639 Pedro Alves <pedro_alves@portugalmail.pt>
9640
9641 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9642 global variables.
9643 (child_add_thread): Minor cleanup.
9644 (child_continue): Resume artificially suspended threads before
9645 calling ContinueDebugEvent.
9646 (suspend_one_thread): New.
9647 (fake_breakpoint_event): New.
9648 (get_child_debug_event): Change return type to int. Check here if
9649 gdb sent an interrupt request. If a soft interrupt was requested,
9650 fake a breakpoint event. Return 0 if there is no event to handle,
9651 and 1 otherwise.
9652 (win32_wait): Don't check here if gdb sent an interrupt request.
9653 Ensure there is a valid event to handle.
9654 (win32_request_interrupt): Add soft interruption method as last
9655 resort.
9656
c436e841
PA
96572007-12-03 Leo Zayas
9658 Pedro Alves <pedro_alves@portugalmail.pt>
9659
9660 * win32-low.h (win32_thread_info): Add descriptions to the
9661 structure members. Replace `suspend_count' counter by a
9662 `suspended' flag.
9663 * win32-low.c (thread_rec): Update condition of when to get the
9664 context from the inferior. Rely on ContextFlags being set if it
9665 has already been retrieved. Only suspend the inferior thread if
9666 we haven't already. Warn if that fails.
9667 (continue_one_thread): s/suspend_count/suspended/. Only call
9668 ResumeThread once. Warn if that fails.
9669
e7b5fa67
PA
96702007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9671
9672 * win32-low.c (win32_wait): Don't read from the inferior when it
9673 has already exited.
9674
a385171d
PA
96752007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9676
9677 * Makefile.in (win32_low_h): New variable.
9678 (win32-low.o): Add dependency on $(win32_low_h).
9679 (win32-arm-low.o, win32-i386-low.o): New rules.
9680
f80c84b3
DJ
96812007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9682
9683 * hostio.c: Correct copyright year.
9684
a6b151f1
DJ
96852007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9686
9687 * Makefile.in (OBS): Add hostio.o.
9688 (hostio.o): New rule.
9689 * server.h (handle_vFile): Declare.
9690 * hostio.c: New file.
9691 * server.c (handle_v_requests): Take packet_len and new_packet_len
9692 for binary packets. Call handle_vFile.
9693 (main): Update call to handle_v_requests.
9694
f9387fc3
DJ
96952007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9696
9697 * linux-low.c: Include <sched.h>.
9698
51c2684e
DJ
96992007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9700
9701 * linux-low.c (linux_tracefork_grandchild): New.
9702 (linux_tracefork_child): Use clone.
9703 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9704
75f83163
JB
97052007-10-31 Joel Brobecker <brobecker@adacore.com>
9706
9707 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9708
da5898ce
DJ
97092007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9710
9711 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9712
24a09b5f
DJ
97132007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9714
9715 * inferiors.c (change_inferior_id): Delete.
9716 (add_pid_to_list, pull_pid_from_list): New.
9717 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9718 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9719 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9720 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9721 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9722 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9723 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9724 (using_threads): Always set to 1.
9725 (handle_extended_wait): New.
9726 (add_process): Do not set TID.
9727 (linux_create_inferior): Set must_set_ptrace_flags.
9728 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9729 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9730 (linux_thread_alive): Rename TID argument to LWPID.
9731 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9732 (linux_wait_for_event): Do not use TID or check using_threads. Update
9733 call to dead_thread_notify. Call handle_extended_wait.
9734 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9735 (send_sigstop): Delete sigstop_sent.
9736 (wait_for_sigstop): Avoid TID.
9737 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9738 (linux_test_for_tracefork): New.
9739 (linux_lookup_signals): Use thread_db_active and
9740 linux_supports_tracefork_flag.
9741 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9742 * linux-low.h (get_process_thread): Avoid TID.
9743 (struct process_ifo): Move thread_known and tid to the end. Remove
9744 sigstop_sent.
9745 (linux_attach_lwp, thread_db_init): Update prototypes.
9746 * server.h (change_inferior_id): Delete prototype.
9747 (add_pid_to_list, pull_pid_from_list): New prototypes.
9748 * thread-db.c (thread_db_use_events): New.
9749 (find_first_thread): Rename to...
9750 (find_one_thread): ...this. Update callers and messages. Do not
9751 call fatal. Check thread_db_use_events. Do not call
9752 change_inferior_id or new_thread_notify.
9753 (maybe_attach_thread): Update. Do not call new_thread_notify.
9754 (thread_db_init): Set thread_db_use_events. Check use_events.
9755 * utils.c (fatal, warning): Correct message prefix.
9756
30ed0a8f
DJ
97572007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9758
9759 * Makefile.in (clean): Remove new files.
9760 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9761 (powerpc-64.o, powerpc-64.c): New rules.
9762 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9763 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9764 with SPE.
9765 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9766 SPE targets.
9767 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9768 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9769 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9770 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9771 (target_regsets): Add AltiVec and SPE register sets.
9772 * configure.ac: Check for AltiVec and SPE.
9773 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9774 (ppc_fill_vrregset, ppc_store_vrregset): New.
9775 (target_regsets): Add AltiVec register set.
9776 * configure: Regenerated.
9777
fd462a61
DJ
97782007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9779
9780 * linux-low.c (O_LARGEFILE): Define.
9781 (linux_read_memory): Use /proc/PID/mem.
9782 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9783 * configure, config.in: Regenerated.
9784
69f223ed
DJ
97852007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9786
9787 * linux-low.c (linux_wait_for_event): Do not pass signals while
9788 single-stepping.
9789
aec18585
PA
97902007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9791
9792 * win32-low.c (create_process): New.
9793 (win32_create_inferior): Use create_process instead of
9794 CreateProcess. If create_process failed retry appending an ".exe"
9795 suffix. Store the GetLastError result immediatelly after
9796 create_process calls and use it on the call to error.
9797
34d86ddd
PA
97982007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9799
9800 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9801
5a0e3bd0
JB
98022007-08-23 Joel Brobecker <brobecker@adacore.com>
9803
9804 * configure.ac: Switch license to GPLv3.
9805
f88c79e6
MS
98062007-08-01 Michael Snyder <msnyder@access-company.com>
9807
9808 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9809
6b3d9b83
PA
98102007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9811
9812 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9813 typedef.
9814 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9815 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9816 CloseToolhelp32Snapshot.
9817 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9818 CloseToolhelp32Snapshot.
9819
c588c53c
MS
98202007-07-27 Michael Snyder <michael.snyder@access-company.com>
9821
9822 * server.c (main): Check for inferior exit before main loop.
9823
aa0403d9
PA
98242007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9825
9826 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9827 instead of on tmp_desc.
9828
255e7678
DJ
98292007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9830 Daniel Jacobowitz <dan@codesourcery.com>
9831
9832 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9833 (add_thread): Minor cleanups.
9834 (clear_inferiors): Move lower in the file. Clear the DLL
9835 list.
9836 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9837 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9838 (xml_escape_text): New.
9839 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9840 for qSupported.
9841 (handle_v_cont): Report errors.
9842 (gdbserver_version): Update.
9843 (main): Correct size of own_buf. Do not report initial DLL events.
9844 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9845 (unloaded_dll, xml_escape_text): New.
9846 * win32-low.c (enum target_waitkind): Update comments.
9847 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9848 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9849 (win32_EnumProcessModules, win32_GetModuleInformation)
9850 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9851 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9852 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9853 (win32_Module32First, win32_Module32Next, load_toolhelp)
9854 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9855 (get_child_debug_event): Handle DLL events.
9856 (win32_wait): Likewise.
9857
0d37add9
DJ
98582007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9859
9860 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9861 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9862
45e2715e
PA
98632007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9864
9865 * win32-low.c (handle_output_debug_string): Ignore event if not
9866 waiting.
9867
c5674cf1
PA
98682007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9869
9870 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9871
2bbe3cc1
DJ
98722007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9873
9874 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9875
ae13219e
DJ
98762007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9877
9878 * inferiors.c (change_inferior_id): Add comment.
9879 * linux-low.c (check_removed_breakpoint): Add an early
9880 prototype. Improve debug output.
9881 (linux_attach): Doc update.
9882 (linux_detach_one_process, linux_detach): Clean up before releasing
9883 each process.
9884 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9885 * linux-low.h (struct process_info): Doc improvement.
9886 * mem-break.c (delete_all_breakpoints): New.
9887 * mem-break.h (delete_all_breakpoints): New prototype.
9888 * thread-db.c (find_first_thread): New.
9889 (thread_db_create_event): Call it instead of
9890 thread_db_find_new_threads. Clean up unused variables.
9891 (maybe_attach_thread): Remove first thread handling.
9892 (thread_db_find_new_threads): Use find_first_thread.
9893 (thread_db_get_tls_address): Likewise.
9894
4105de34
DJ
98952007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9896
9897 * thread-db.c (thread_db_find_new_threads): Add prototype.
9898 (thread_db_create_event): Check for the main thread before adding
9899 a new thread.
9900 (maybe_attach_thread): Only enable event reporting if TID == 0.
9901 (thread_db_get_tls_address): Check for new threads.
9902
2b876972
DJ
99032007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9904
9905 * linux-low.c (linux_create_inferior): Try execv before execvp.
9906 * spu-low.c (spu_create_inferior): Likewise.
9907
7a245884
DJ
99082007-06-13 Mike Frysinger <vapier@gentoo.org>
9909
9910 * linux-low.c (linux_create_inferior): Change execv to execvp.
9911 * spu-low.c (spu_create_inferior): Likewies.
9912
117ce543
DJ
99132007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9914
9915 * Makefile.in (clean): Clean new files instead of deleted ones.
9916 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9917 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9918 rules.
9919 * configure.srv: Specify XML files and new regformats for MIPS and
9920 MIPS64 GNU/Linux.
9921 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9922 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9923 an entry for the restart register.
9924 (mips_cannot_fetch_register, mips_cannot_store_register)
9925 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9926 register names to match the XML descriptions.
9927 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9928 restart register instead of $0.
9929
0e7f50da
UW
99302007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9931 Markus Deuling <deuling@de.ibm.com>
9932
9933 * remote-utils.c (decode_xfer_write): New function.
9934 * server.h (decode_xfer_write): Add prototype.
9935 * server.c (handle_query): Add PACKET_LEN argument. Support
9936 qXfer:spu:read and qXfer:spu:write packets.
9937 (main): Pass packet_len to handle_query.
9938 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9939 * target.h (target_ops): Add qxfer_spu.
9940
374c1d38
UW
99412007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9942
9943 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9944 accessing non-seekable spufs files.
9945
bb63802a
UW
99462007-05-16 Markus Deuling <deuling@de.ibm.com>
9947
889bf7c5 9948 * server.c (handle_query): Add reply for qC packet.
bb63802a 9949
7390519e
PA
99502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9951 Leo Zayas <lerele@champenstudios@com>
9952
9953 * server.h (check_remote_input_interrupt_request): New function.
9954 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9955 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9956 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9957 (check_remote_input_interrupt_request): New function.
9958 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9959 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9960 winapi_GenerateConsoleCtrlEvent): New typedefs.
9961 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9962 to 250 ms.
9963 (win32_wait): Check for remote interrupt request
9964 with check_remote_input_interrupt_request.
9965 (win32_request_interrupt): New function.
9966 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9967
34b34921
PA
99682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9969
9970 * win32-low.c (debug_registers_changed,
9971 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9972 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9973 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9974 (thread_rec): Get context using the low target.
9975 (child_add_thread): Call thread_added on the low target,
9976 which does the same thing.
9977 (regptr): Delete.
9978 (do_initial_child_stuff): Remove debug registers references.
9979 Set context using the low target. Resume threads after
9980 setting the contexts.
9981 (child_continue): Remove dead variable. Remove debug
9982 registers references.
9983 (child_fetch_inferior_registers): Go through the low target.
9984 (do_child_store_inferior_registers): Remove.
9985 (child_store_inferior_registers): Go through the low target.
9986 (win32_resume): Remove debug registers references.
9987 Set context using the low target.
9988 (handle_exception): Change return type to void. Don't record
9989 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9990 first chance exception.
889bf7c5 9991 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9992 goto loop. Always return after waiting for debug event.
9993 (win32_wait): Convert to switch statement. Handle spurious
9994 events.
9995
9996 * win32-i386-low.c (debug_registers_changed,
9997 debug_registers_used): New.
9998 (initial_stuff): Rename to ...
9999 (i386_initial_stuff): ... this. Clear debug registers
10000 state variables.
10001 (store_debug_registers): Delete.
10002 (i386_get_thread_context): New.
10003 (load_debug_registers): Delete.
10004 (i386_set_thread_context): New.
10005 (i386_thread_added): New.
10006 (single_step): Rename to ...
10007 (i386_single_step): ... this.
10008 (do_fetch_inferior_registers): Rename to ...
10009 (i386_fetch_inferior_register): ... this.
10010 (i386_store_inferior_register): New.
10011 (the_low_target): Adapt to new interface.
10012
10013 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10014 (arm_get_thread_context): New.
10015 (arm_set_thread_context): New.
10016 (regptr): New.
10017 (do_fetch_inferior_registers): Rename to ...
10018 (arm_fetch_inferior_register): ... this.
10019 (arm_store_inferior_register): New.
10020 (arm_wince_breakpoint): Reimplement as unsigned long.
10021 (arm_wince_breakpoint_len): Define.
10022 (the_low_target): Adapt to new interface.
10023
10024 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10025 load_debug_registers. Add get_thread_context, set_thread_context,
10026 thread_added and store_inferior_register. Rename
10027 fetch_inferior_registers to fetch_inferior_register.
10028 (regptr): Remove declaration.
10029
dd6953e1
PA
100302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10031
10032 * linux-low.c (linux_detach): Change return type to int. Return 0.
10033 * spu-low.c (spu_detach): Likewise.
10034
444d6139
PA
100352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10036
10037 * target.h (target_ops): Change return type of detach to int.
10038 Add join.
10039 (join_inferior): New.
10040 * server.c (main): Don't skip detach support on mingw32.
10041 If the inferior doesn't support detaching return error.
10042 Call join_inferior instead of using waitpid.
10043 * linux-low.c (linux_join): New.
10044 (linux_target_op): Add linux_join.
10045 * spu-low.c (spu_join): New.
10046 (spu_target_ops): Add spu_join.
10047 * win32-low.c (win32_detach): Adapt to new interface.
10048 Reopen current_process_handle before detaching. Issue a child
10049 resume before detaching.
10050 (win32_join): New.
10051 (win32_target_op): Add win32_join.
10052
1d5315fe
PA
100532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10054
10055 * win32-low.c (win32-attach): Fix return value.
10056 * target.h (target_ops): Describe ATTACH return values.
10057
bf914831
PA
100582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10059
10060 * win32-low.c (GETPROCADDRESS): Define.
10061 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10062 (winapi_DebugSetProcessKillOnExit): Likewise.
10063 (win32_create_inferior): Force usage of ansi CreateProcessA.
10064 (win32_attach): Use GETPROCADDRESS.
10065 (win32_detach): Likewise.
10066
f72f3e60
PA
100672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10068
10069 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10070
ed50f18f
PA
100712007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10072
10073 * win32-low.c: Commit leftover changes from 2007-03-29.
10074
0c2ead7e
DJ
100752007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10076
10077 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10078 fields short instead of int. Add explicit padding.
10079 (i387_cache_to_fsave): Remove unnecessary casts.
10080 (i387_fsave_to_cache): Doc fix.
10081 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10082
73725ff3
DJ
100832007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10084
10085 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10086 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10087
d99f33d8
PA
100882007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10089
10090 * configure.srv (arm*-*-mingw32ce*): Move near the other
10091 arm targets.
10092
68070c10
PA
100932007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10094
2482afc6 10095 * configure.ac: Add errno checking.
68070c10
PA
10096 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10097 sys/file.h and malloc.h.
10098 (AC_CHECK_DECLS): Add perror.
10099 (srv_mingwce): Handle.
2482afc6 10100 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10101 win32-i386-low.o to srv_tgtobj.
10102 (i[34567]86-*-mingw*): Likewise.
10103 (arm*-*-mingw32ce*): Add case.
10104 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10105 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10106 [__MINGW32CE__] (strerror): New function.
10107 [__MINGW32CE__] (errno): Define to GetLastError.
10108 [__MINGW32CE__] (COUNTOF): New macro.
10109 (remote_open): Remove extra close call.
10110 * mem-break.c (delete_breakpoint_at): New function.
10111 * mem-break.h (delete_breakpoint_at): Declare.
10112 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10113 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10114 [USE_WIN32API] (read, write): Add char* casts.
10115 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10116 * server.h: Include wincecompat.h on Windows CE.
10117 [HAVE_ERRNO_H]: Check.
10118 (perror): Declare if not declared.
10119 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10120 (perror_with_name): Remove errno declaration.
10121 * wincecompat.h: New.
10122 * wincecompat.c: New.
10123 * win32-low.h: New.
10124 * win32-arm-low.c: New.
10125 * win32-i386-low.c: New.
10126 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10127 (OUTMSG2): Make it safe.
10128 (_T): New macro.
10129 (COUNTOF): New macro.
10130 (NUM_REGS): Get it from the low target.
10131 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10132 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10133 (thread_rec): Let low target handle debug registers.
10134 (child_add_thread): Likewise.
10135 (child_init_thread_list): Likewise.
10136 (continue_one_thread): Likewise.
10137 (regptr): New.
10138 (do_child_fetch_inferior_registers): Move to ...
10139 * win32-i386-low.c: ... here, and rename to ...
10140 (do_fetch_inferior_registers): ... this.
889bf7c5 10141 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10142 Go through the low target.
10143 (do_child_store_inferior_registers): Use regptr.
10144 (strwinerror): New function.
10145 (win32_create_inferior): Handle Windows CE.
10146 Use strwinerror instead of strerror on Windows error
10147 codes. Add program to the error output.
10148 Don't close the main thread handle on Windows CE.
10149 (win32_attach): Use coredll.dll on Windows CE.
10150 (win32_kill): Close current process and current
10151 thread handles.
10152 (win32_detach): Use coredll.dll on Windows CE.
10153 (win32_resume): Let low target handle debug registers, and
10154 step request.
10155 (handle_exception): Add/Remove initial breakpoint. Avoid
10156 non-existant WSTOPSIG on Windows CE.
10157 (win32_read_inferior_memory): Cast to remove warning.
10158 (win32_arch_string): Go through the low target.
10159 (initialize_low): Call set_breakpoint_data with the low
10160 target's breakpoint.
10161 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10162 FOP_REGNUM, mappings): Move to ...
10163 * win32-i386-low.c: ... here.
10164 * win32-low.c (win32_thread_info): Move to ...
10165 * win32-low.h: ... here.
10166 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10167 win32-arm-low.c and wincecompat.c.
10168 (all:): Add $EXEEXT.
10169 (install-only:): Likewise.
10170 (gdbserver:): Likewise.
10171 (gdbreplay:): Likewise.
10172 * config.in: Regenerate.
10173 * configure: Regenerate.
10174
41093d81
PA
101752007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10176
10177 * win32-low.c: Rename typedef thread_info to
10178 win32_thread_info throughout.
10179
544afa54
PA
101802007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10181
10182 * win32-i386-low.c: Rename to ...
10183 * win32-low.c: ... this.
10184 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10185 * Makefile.in: Likewise.
10186
bce7165d
PA
101872007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10188
10189 * remote-utils.c (monitor_output): Constify msg parameter.
10190 * server.h (monitor_output): Likewise.
10191 * win32-i386-low.c (handle_output_debug_string): New.
10192 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10193 handle_output_debug_string.
10194 (get_child_debug_event): Likewise.
10195
506c7aa0
DJ
101962007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10197
10198 * server.c (main): Correct strtoul check.
10199
42c81e2a
DJ
102002007-03-27 Jon Ringle <jon@ringle.org>
10201
10202 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10203
9453113a
DJ
102042007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10205
10206 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10207
64a69107
DJ
102082007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10209
10210 * terminal.h: Check HAVE_SGTTY_H.
10211
102122007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10213
10214 * remote-utils.c (remote_open): Print out the assigned port number.
10215
c74d0ad8
DJ
102162007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10217
10218 * remote-utils.c (monitor_output): New function.
10219 * server.c (debug_threads): Define here.
10220 (monitor_show_help): New function.
10221 (handle_query): Handle qRcmd.
10222 (main): Do not handle 'd' packet.
10223 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10224 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10225 of debug_threads.
10226
de7c3b4a
PA
102272007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10228
10229 * Makefile.in (EXEEXT): New.
10230 (clean): Use $(EXEEXT).
10231
ef57601b
PA
102322007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10233
10234 * target.h (target_ops): Rename send_signal to request_interrupt,
10235 and remove enum target_signal parameter.
10236 * linux-low.c (linux_request_interrupt): Rename from
10237 linux_send_signal, and always send SIGINT.
10238 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10239 and always send SIGINT.
10240 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10241 of send_signal.
10242 (input_interrupt): Likewise.
10243
820f2bda
PA
102442007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10245
10246 * server.c (get_features_xml): Check if target implemented
10247 arch_string.
10248 * win32-i386-low.c (win32_arch_string): New.
10249 (win32_target_ops): Add win32_arch_string as arch_string member.
10250
ab39bf24
UW
102512007-02-22 Markus Deuling <deuling@de.ibm.com>
10252
10253 * spu-low.c (spu_arch_string): New.
10254 (spu_target_ops): Add spu_arch_string.
10255
61ff6e04
DJ
102562007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10257
10258 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10259 * configure.ac: Do not check for terminal.h.
10260 * configure, config.in: Regenerated.
10261
fb1e4ffc
DJ
102622007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10263
10264 * Makefile.in (OBS): Add $(XML_BUILTIN).
10265 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10266 (clean): Update.
10267 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10268 (arm-with-iwmmxt.c): New.
10269 * config.in, configure: Regenerate.
10270 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10271 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10272 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10273 (arm*-*-linux*): Add iWMMXt and regset support.
10274 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10275 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10276 (arm_store_wmmxregset, target_regsets): New.
10277 * server.c (get_features_xml): Take annex argument. Check builtin
10278 XML documents.
10279 (handle_query): Handle multiple annexes.
10280
0f48aa01
DJ
102812007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10282
10283 * remote-utils.c [USE_WIN32API] (read, write): Define.
10284 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10285 write.
10286
23181151
DJ
102872007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10288
10289 * linux-i386-low.c (the_low_target): Set arch_string.
10290 * linux-x86-64-low.c (the_low_target): Likewise.
10291 * linux-low.c (linux_arch_string): New.
10292 (linux_target_ops): Add it.
10293 * linux-low.h (struct linux_target_ops): Add arch_string.
10294 * server.c (write_qxfer_response): Use const void * for DATA.
10295 (get_features_xml): New.
10296 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10297 * target.h (struct target_ops): Add arch_string method.
10298
9d606399
DJ
102992007-01-03 Denis Pilat <denis.pilat@st.com>
10300 Daniel Jacobowitz <dan@codesourcery.com>
10301
10302 * linux-low.c (linux_kill): Handle being called with no threads.
10303 * win32-i386-low.c (win32_kill): Likewise.
10304 (get_child_debug_event): Clear current_process_handle.
10305
103062006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10307 Daniel Jacobowitz <dan@codesourcery.com>
10308
10309 * remote-utils.c (remote_open): Check the type of specified
10310 serial port devices before opening them.
10311 * server.c (main): Kill the inferior if an error occurs during
10312 the first remote_open.
10313
a5e13d24
DJ
103142006-12-05 Markus Deuling <deuling@de.ibm.com>
10315
10316 * README: Update supported targets.
10317
186947f7
DJ
103182006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10319
10320 * Makefile.in (clean): Remove reg-mips64.c.
10321 (reg-mips64.c, reg-mips64.o): New rules.
10322 * configure.srv: Handle mips64. Include regset support for mips.
10323 * linux-mips-low.c (union mips_register): New.
10324 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10325 (mips_breakpoint, mips_breakpoint_at): Use int.
10326 (mips_collect_register, mips_supply_register)
10327 (mips_collect_register_32bit, mips_supply_register_32bit)
10328 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10329 (mips_store_fpregset, target_regsets): New.
10330 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10331
a13e2c95
UW
103322006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10333
10334 * configure.srv: Add target "spu*-*-*".
10335 * Makefile.in (clean): Remove reg-spu.c.
10336 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10337 * spu-low.c: New file.
10338
cb7283db
DJ
103392006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10340
10341 * configure.ac: Correct td_thr_tls_get_addr test.
10342 * configure: Regenerated.
10343
89be2091
DJ
103442006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10345
10346 * linux-low.c (linux_wait_for_event): Reformat. Use the
10347 pass_signals array.
10348 * remote-utils.c (decode_address_to_semicolon): New.
10349 * server.c (pass_signals, handle_general_set): New.
10350 (handle_query): Mention QPassSignals for qSupported.
10351 (main): Call handle_general_set.
10352 * server.h (pass_signals, decode_address_to_semicolon): New.
10353
000ef4f0
DJ
103542006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10355
10356 * server.c (handle_query): Correct error handling for read_auxv.
10357
b7149293
UW
103582005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10359
10360 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10361 and srv_linux_thread_db to yes.
10362 * linux-s390-low.c (s390_fill_gregset): New function.
10363 (target_regsets): Define data structure.
10364
dae5f5cf
DJ
103652006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10366
10367 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10368 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10369 * config.in, configure: Regenerated.
10370 * inferiors.c (gdb_id_to_thread): New function.
10371 (gdb_id_to_thread_id): Use it.
10372 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10373 * linux-low.h (struct process_info): Add th member.
10374 (thread_db_get_tls_address): New prototype.
10375 * remote-utils.c (decode_address): Make non-static.
10376 * server.c (handle_query): Handle qGetTLSAddr.
10377 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10378 * target.h (struct target_ops): Add get_tls_address.
10379 * thread-db.c (maybe_attach_thread): Save the thread handle.
10380 (thread_db_get_tls_address): New.
10381
32ca6d61
DJ
103822006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10383
10384 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10385 (linux_resume_one_process): Take a siginfo_t *. Update all
10386 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10387 (struct pending_signals): Add a siginfo_t.
10388 (linux_wait_for_process): Always set last_status.
10389 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10390 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10391 * linux-low.h (struct process_info): Add last_status.
10392
5ffff7c1
DJ
103932006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10394
10395 * remote-utils.c (try_rle): New function.
10396 (putpkt_binary): Use it.
10397
8695c747
DJ
103982006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10399
10400 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10401 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10402 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10403 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10404 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10405 point registers.
10406
290fadea
RS
104072006-08-08 Richard Sandiford <richard@codesourcery.com>
10408
10409 * server.c (terminal_fd): New variable.
10410 (old_foreground_pgrp): Likewise.
10411 (restore_old_foreground_pgrp): New function.
10412 (start_inferior): Record the terminal file descriptor in terminal_fd
10413 and its original foreground group in old_foreground_pgrp. Register
10414 restore_old_foreground_pgrp with atexit().
10415
9f2e1e63
DJ
104162006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10417
10418 * server.c (handle_query): Correct qPart to qXfer.
10419
b80864fb
DJ
104202006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10421
10422 * configure.ac: Check for more headers which are missing on
10423 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10424 * configure.srv: Add Cygwin and mingw32.
10425 * remote-utils.c: Don't include headers unconditionally which
10426 are missing on mingw32. Include <winsock.h> for mingw32.
10427 (remote_open): Adjust for mingw32 support. Flush
10428 standard error after writing to it.
10429 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10430 (unblock_async_io, enable_async_io, disable_async_io)
10431 (readchar, getpkt): Update for Winsock support.
10432 (prepare_resume_reply): Expect a protocol signal number.
10433 * server.c: Disable <sys/wait.h> on mingw32.
10434 (start_inferior): Adjust for mingw32 support. Flush
10435 standard error after writing to it.
10436 (attach_inferior): Likewise. Use protocol signal
10437 numbers.
10438 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10439 and names.
10440 * win32-i386-low.c: New file.
10441 * Makefile.in (XM_CLIBS): Set.
10442 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10443 (win32-i386-low.o): New dependency rule.
10444 * linux-low.c (linux_wait): Use target signal numbers.
10445 * target.h (struct target_ops): Doc fix.
10446 * server.h (target_signal_to_name): New prototype.
10447 * gdbreplay.c: Don't include headers unconditionally which
10448 are missing on mingw32. Include <winsock.h> for mingw32.
10449 (remote_close, remote_open): Adjust for Winsock support.
10450 * configure, config.in: Regenerated.
10451
0876f84a
DJ
104522006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10453
10454 * server.c (decode_xfer_read, write_qxfer_response): New.
10455 (handle_query): Take a packet length argument. Handle
10456 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10457 the qSupported response.
10458 (main): Update call to handle_query.
10459
01f9e8fa
DJ
104602006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10461
10462 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10463 (putpkt_binary): Renamed from putpkt and adjusted for binary
10464 data.
10465 (putpkt): New wrapper for putpkt_binary.
10466 (readchar): Don't mask off the high bit.
10467 (decode_X_packet): New function.
10468 * server.c (main): Call putpkt_binary if a handler sets the packet
10469 length. Save the length of the incoming packet. Handle 'X'.
10470 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10471
be2a5f71
DJ
104722006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10473
10474 * server.c (handle_query): Handle qSupported.
10475
ea025f5f
DJ
104762006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10477
10478 * remote-utils.c (all_symbols_looked_up): New variable.
10479 (look_up_one_symbol): Check it.
10480 * server.h (look_up_one_symbol): New declaration.
10481 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10482
9308fc88
DJ
104832006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10484
10485 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10486 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10487 (PTRACE_GET_THREAD_AREA): Define.
10488 (ps_get_thread_area): New function.
10489
52fb6437
NS
104902006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10491
10492 * configure.srv (m68k*-*-uclinux*): New target.
10493 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10494 (linux_resume_one_process): Remove extraneous cast.
10495 (linux_read_offsets): New.
10496 (linux_target_op): Add linux_read_offsets on mmuless systems.
10497 * server.c (handle_query): Add qOffsets logic.
10498 * target.h (struct target_ops): Add read_offsets.
10499
21b0f40c
DJ
105002006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10501
10502 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10503 (PTRACE_GET_THREAD_AREA): Define.
10504 (ps_get_thread_area): New function.
10505 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10506 (linux-x86-64-low.o): Update.
10507
0050a760
DJ
105082006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10509
10510 * configure.ac: Remove checks for prfpregset_t.
10511 * gdb_proc_service.h: New file.
10512 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10513 new "gdb_proc_service.h".
10514 * proc-service.c: Likewise.
10515 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10516 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10517 * Makefile.in (gdb_proc_service_h): Updated.
10518 * configure, config.in: Regenerated.
10519
b92a518e
DJ
105202006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10521
10522 * remote-utils.c (prepare_resume_reply): Move declaration
10523 of gdb_id_from_wait to the top of the block.
10524
545587ee
DJ
105252006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10526
10527 * linux-low.c (regsets_store_inferior_registers): Read the regset
10528 from the target before filling it.
10529
9db87ebd
DJ
105302006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10531
10532 * server.c (attach_inferior): Return SIGTRAP for a successful
10533 attach.
10534
dd24457d
DJ
105352006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10536
10537 * Makefile.in (OBS): Add version.o.
10538 (STAGESTUFF): Delete.
10539 (version.o): Add dependencies.
10540 (version.c): Replace rule.
10541 (clean): Remove version.c.
10542 * server.c (gdbserver_version): New.
10543 (gdbserver_usage): Use printf.
10544 (main): Handle --version and --help.
10545 * server.h (version, host_name): Add declarations.
10546
6f0f660e
EZ
105472005-12-23 Eli Zaretskii <eliz@gnu.org>
10548
889bf7c5
PA
10549 * linux-arm-low.c:
10550 * linux-arm-low.c:
10551 * inferiors.c:
10552 * i387-fp.h:
10553 * i387-fp.c:
10554 * gdbreplay.c:
10555 * regcache.c:
10556 * proc-service.c:
10557 * mem-break.h:
10558 * mem-break.c:
10559 * linux-x86-64-low.c:
10560 * linux-sh-low.c:
10561 * linux-s390-low.c:
10562 * linux-ppc64-low.c:
10563 * linux-ppc-low.c:
10564 * linux-mips-low.c:
10565 * linux-m68k-low.c:
10566 * linux-m32r-low.c:
10567 * linux-low.h:
10568 * linux-low.c:
10569 * linux-ia64-low.c:
10570 * linux-i386-low.c:
10571 * linux-crisv32-low.c:
10572 * thread-db.c:
10573 * terminal.h:
10574 * target.h:
10575 * target.c:
10576 * server.h:
10577 * server.c:
10578 * remote-utils.c:
10579 * regcache.h:
10580 * utils.c:
10581 * Makefile.in:
10582 * configure.ac:
6f0f660e
EZ
10583 * gdbserver.1: Add (C) after Copyright. Update the FSF
10584 address.
10585
9d1fb177
DJ
105862005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10587
10588 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10589 (arm_breakpoint_at): Recognize both breakpoints.
10590 (the_low_target): Use the correct breakpoint instruction.
10591
011a70c2
DJ
105922005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10593
10594 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10595 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10596 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10597 (the_low_target): Update.
10598
7fb85e41
AS
105992005-10-25 Andreas Schwab <schwab@suse.de>
10600
10601 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10602
10603 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10604 (ia64_num_regs): Reduce to 462.
10605
3db0444b
DJ
106062005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10607
10608 * acinclude.m4: Correct quoting.
10609 * aclocal.m4: Regenerated.
10610
10611 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10612 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10613 (thread_db_init): Call thread_db_err_str.
10614 * configure.ac: Check for TD_VERSION.
10615 * config.in, configure: Regenerated.
10616
bee0189a
DJ
106172005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10618
10619 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10620
e9d25b98
DJ
106212005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10622
10623 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10624 is not available. Define HAVE_PTRACE_GETREGS if it is.
10625 * config.in, configure: Regenerated.
10626 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10627 * linux-i386-low.c, linux-m68k-low.c: Update to use
10628 HAVE_PTRACE_GETREGS.
10629 * linux-low.c (regsets_fetch_inferior_registers)
10630 (regsets_store_inferior_registers): Only return 0 if we processed
10631 GENERAL_REGS.
10632 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10633 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10634
a06660f7
DJ
106352005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10636
10637 * inferiors.c (struct thread_info): Add gdb_id.
10638 (add_thread): Add gdb_id argument.
10639 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10640 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10641 calls to add_thread.
10642 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10643 * server.c (handle_query): Use thread_to_gdb_id.
10644 (handle_v_cont, main): Use gdb_id_to_thread_id.
10645 * server.h (add_thread): Update prototype.
10646 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10647 prototypes.
10648
5a1f5858
DJ
106492005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10650
10651 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10652 left-padded registers.
10653 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10654 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10655
e122f1f5
SE
106562005-07-01 Steve Ellcey <sje@cup.hp.com>
10657
10658 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10659 * configure: Regenerate.
10660 * config.in: Regenerate.
10661 * server.h (NEED_DECLARATION_STRERROR):
10662 Replace with !HAVE_DECL_STRERROR.
10663
d592fa2f
DJ
106642005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10665
10666 * linux-low.c (linux_wait, linux_send_signal): Don't test
10667 an unsigned long variable for > 0 if it could be MAX_ULONG.
10668 * server.c (myresume): Likewise.
10669 * target.c (set_desired_inferior): Likewise.
10670
ccbd4912
MK
106712005-06-13 Mark Kettenis <kettenis@gnu.org>
10672
10673 * configure.ac: Simplify and improve check for socklen_t.
10674 * configure, config.in: Regenerate.
10675
f450004a
DJ
106762005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10677
10678 * acconfig.h: Remove.
10679 * configure.ac: Add a test for socklen_t. Use three-argument
10680 AC_DEFINE throughout.
10681 * config.in: Regenerated using autoheader 2.59.
10682 * configure: Regenerated.
10683
10684 * gdbreplay.c (socklen_t): Provide a default.
10685 (remote_open): Use socklen_t.
10686 * remote-utils.c (socklen_t): Provide a default.
10687 (remote_open): Use socklen_t.
10688 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10689 unsigned char.
10690
10691 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10692 char for buffers.
10693 * linux-low.c (linux_read_memory, linux_write_memory)
10694 (linux_read_auxv): Likewise.
10695 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10696 (check_mem_write): Likewise.
10697 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10698 Likewise.
10699 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10700 (registers_from_string, register_data): Likewise.
10701 * server.c (handle_query, main): Likewise.
10702 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10703 (decode_M_packet): Likewise.
10704 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10705 * target.h (struct target_ops): Update read_memory, write_memory,
10706 and read_auxv.
10707 (read_inferior_memory, write_inferior_memory): Update.
10708 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10709 to unsigned char *.
10710 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10711 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10712 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10713 linux-s390-low.c, linux-sh-low.c: Update for changes in
10714 read_inferior_memory and the_low_target->breakpoint.
10715
eee84df1
DJ
107162005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10717
10718 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10719 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10720 * configure.srv: Add powerpc64-*-linux*.
10721 * linux-ppc64-low.c: New file.
10722
45b134e5
OF
107232005-05-23 Orjan Friberg <orjanf@axis.com>
10724
10725 * linux-cris-low.c: New file with support for CRIS.
10726 * linux-crisv32-low.c: Ditto for CRISv32.
10727 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10728 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10729 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10730 reg-crisv32.o, and reg-crisv32.c to make rules.
10731 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10732 recognized targets.
10733
48d93c75
UW
107342005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10735
10736 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10737 of sizeof (PTRACE_XFER_TYPE).
10738 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10739
e013ee27
OF
107402005-05-12 Orjan Friberg <orjanf@axis.com>
10741
889bf7c5 10742 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10743 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10744 pointers for hardware watchpoint support.
10745 * linux-low.h (struct linux_target_ops): Ditto.
10746 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10747 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10748 to linux_target_ops.
10749 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10750 reply packet.
10751 * server.c (main): Recognize 'Z' and 'z' packets.
10752
b0ded00b
UW
107532005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10754
10755 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10756 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10757 (the_low_target): Add new members.
10758
8643e2ad
DJ
107592005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10760
10761 * proc-service.c (ps_lgetregs): Search all_processes instead of
10762 all_threads.
10763
fc620387
DJ
107642005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10765
10766 * server.c (start_inferior): Change return type to int.
10767 (attach_inferior): Change sigptr to int *.
10768 (handle_v_cont, handle_v_requests): Change signal to int *.
10769 (main): Change signal to int.
10770
107712005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10772
10773 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10774 * configure.srv: Add m32r*-*-linux*.
10775 * linux-m32r-low.c: New file.
10776
e0e76420
DJ
107772005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10778
10779 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10780
a1928bad
DJ
107812005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10782
10783 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10784 Take unsigned long arguments for PIDs.
10785 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10786 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10787 (wait_for_sigstop, linux_resume_one_process)
10788 (regsets_fetch_inferior_registers, linux_send_signal)
10789 (linux_read_auxv): Likewise. Update the types of variables holding
10790 PIDs. Update format string specifiers.
10791 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10792 * remote-utils.c (prepare_resume_reply): Likewise.
10793 * server.c (cont_thread, general_thread, step_thread)
10794 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10795 unsigned long.
10796 (handle_query): Update format specifiers.
10797 (handle_v_cont, main): Use strtoul for thread IDs.
10798 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10799 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10800 (general_thread, step_thread, thread_from_wait)
10801 (old_thread_from_wait): Update.
10802 * target.h (struct thread_resume): Use unsigned long for THREAD.
10803 (struct target_ops): Use unsigned long for arguments to attach and
10804 thread_alive.
10805
dcdb98d2
DJ
108062005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10807
10808 * acinclude.m4: Include bfd/bfd.m4 directly.
10809 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10810 <agriffis@toolchain.org>.
10811 * aclocal.m4, configure: Regenerated.
10812
bec39cab
AC
108132005-01-07 Andrew Cagney <cagney@gnu.org>
10814
10815 * configure.ac: Rename configure.in, require autoconf 2.59.
10816 * configure: Re-generate.
10817
434c4c77
DJ
108182004-12-08 Daniel Jacobowitz <dan@debian.org>
10819
10820 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10821 LIBS when finished.
10822 * aclocal.m4: Regenerated.
10823 * configure: Regenerated.
10824
db1d3e1b
AS
108252004-11-21 Andreas Schwab <schwab@suse.de>
10826
10827 * linux-m68k-low.c (m68k_num_gregs): Define.
10828 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10829 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10830 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10831 (m68k_breakpoint_at): New. Add to the_low_target.
10832
10833 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10834 srv_linux_thread_db to yes.
10835
43360365
JB
108362004-10-20 Joel Brobecker <brobecker@gnat.com>
10837
10838 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10839 (ARCH_SET_FS): Likewise.
10840 (ARCH_GET_FS): Likewise.
10841 (ARCH_GET_GS): Likewise.
10842
fd500816
DJ
108432004-10-16 Daniel Jacobowitz <dan@debian.org>
10844
10845 * linux-i386-low.c (ps_get_thread_area): New.
10846 * linux-x86-64-low.c (ps_get_thread_area): New.
10847 * linux-low.c: Include <sys/syscall.h>.
10848 (linux_kill_one_process): Don't kill the first thread here.
10849 (linux_kill): Kill the first thread here.
10850 (kill_lwp): New function.
10851 (send_sigstop, linux_send_signal): Use it.
10852 * proc-service.c: Clean up #ifdefs.
10853 (fpregset_info): Delete.
10854 (ps_lgetregs): Update and enable implementation.
10855 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10856 implementations.
10857 * remote-utils.c (struct sym_cache, symbol_cache): New.
10858 (input_interrupt): Print a clearer message.
10859 (async_io_enabled): New variable.
10860 (enable_async_io, disable_async_io): Use it. Update comments.
10861 (look_up_one_symbol): Use the symbol cache.
10862 * thread-db.c (thread_db_look_up_symbols): New function.
10863 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10864
f6de3c42
DJ
108652004-10-16 Daniel Jacobowitz <dan@debian.org>
10866
10867 * configure.in: Test for -rdynamic.
10868 * configure: Regenerated.
10869 * Makefile (INTERNAL_LDFLAGS): New.
10870 (gdbserver, gdbreplay): Use it.
10871
2c0fc042
AC
108722004-09-02 Andrew Cagney <cagney@gnu.org>
10873
10874 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10875
075b3282
DJ
108762004-03-23 Daniel Jacobowitz <drow@mvista.com>
10877
10878 * linux-low.c (linux_wait): Clear all_processes list also.
10879
fa6a77dc
DJ
108802004-03-12 Daniel Jacobowitz <drow@mvista.com>
10881
10882 * linux-low.c: Include <errno.h>. Remove extern declaration of
10883 errno.
10884
6d782a97
DJ
108852004-03-12 Daniel Jacobowitz <drow@mvista.com>
10886
10887 * gdbreplay.c, server.h, utils.c: Update copyright years.
10888
3a7fb99b
DJ
108892004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10890
10891 * server.c (main): Print child status or termination signal from
10892 variable 'signal', not 'sig'.
10893
c3e735a6
DJ
108942004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10895
10896 * linux-low.c (linux_read_memory): Change return type to
10897 int. Check for and return error from ptrace().
10898 * target.c (read_inferior_memory): Change return type to int. Pass
10899 back return status from the_target->read_memory().
10900 * target.h (struct target_ops): Adapt *read_memory() prototype.
10901 Update comment.
10902 (read_inferior_memory): Adapt prototype.
10903 * server.c (main): Return an error packet if
10904 read_inferior_memory() returns an error.
10905
a59d1c82
DJ
109062004-03-04 Daniel Jacobowitz <drow@mvista.com>
10907
10908 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10909 Unify with other clean targets.
10910
dc3f8883
DJ
109112004-02-29 Daniel Jacobowitz <drow@mvista.com>
10912
10913 * server.c (handle_v_cont): Call set_desired_inferior.
10914
89a208da
DJ
109152004-02-29 Daniel Jacobowitz <drow@mvista.com>
10916
10917 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10918
62ea82f5
DJ
109192004-02-29 Daniel Jacobowitz <drow@mvista.com>
10920
10921 * linux-low.c (linux_wait): Unblock async I/O.
10922 (linux_resume): Block and enable async I/O.
10923 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10924 * server.h (block_async_io, unblock_async_io): Add prototypes.
10925
6910d122
DJ
109262004-02-29 Daniel Jacobowitz <drow@mvista.com>
10927
10928 * remote-utils.c (remote_open): Print a status notice after
10929 opening a TCP port.
10930 * server.c (attach_inferior): Print a status notice after
10931 attaching.
10932
109332004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10934
10935 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10936
c89dc5d4
DJ
109372004-02-26 Daniel Jacobowitz <drow@mvista.com>
10938
10939 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10940 error packet.
10941 * server.c, target.h: Update copyright years.
10942
4b8dad4a
RM
109432004-02-25 Roland McGrath <roland@redhat.com>
10944
10945 * target.h (struct target_ops): New member `read_auxv'.
10946 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10947 * linux-low.c (linux_read_auxv): New function.
10948 (linux_target_ops): Initialize `read_auxv' member to that.
10949
d7446758
JB
109502004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10951
10952 Committed by Jim Blandy <jimb@redhat.com>.
10953
10954 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10955 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10956 instead of GPR_SIZE to distiguish s390 and s390x targets.
10957
5544ad89
DJ
109582004-01-31 Daniel Jacobowitz <drow@mvista.com>
10959
10960 * linux-low.c: Update copyright year.
10961 (check_removed_breakpoint): Clear pending_is_breakpoint.
10962 (linux_set_resume_request, linux_queue_one_thread)
10963 (resume_status_pending_p): New functions.
10964 (linux_continue_one_thread): Use process->resume.
10965 (linux_resume): Only resume threads if there are no pending events.
10966 * linux-low.h (struct process_info): Add resume request
10967 pointer.
10968
2a68b70e
DJ
109692004-01-30 Daniel Jacobowitz <drow@mvista.com>
10970
10971 * regcache.c (new_register_cache): Clear the allocated register
10972 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10973
64386c31
DJ
109742003-10-13 Daniel Jacobowitz <drow@mvista.com>
10975
10976 * linux-low.c (linux_resume): Take a struct thread_resume *
10977 argument.
10978 (linux_wait): Update call.
10979 (resume_ptr): New static variable.
10980 (linux_continue_one_thread): Renamed from
10981 linux_continue_one_process. Use resume_ptr.
10982 (linux_resume): Use linux_continue_one_thread.
10983 * server.c (handle_v_cont, handle_v_requests): New functions.
10984 (myresume): New function.
10985 (main): Handle 'v' case.
10986 * target.h (struct thread_resume): New type.
10987 (struct target_ops): Change argument of "resume" to struct
10988 thread_resume *.
10989 (myresume): Delete macro.
10990
c938e9b0
L
109912003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10992
10993 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10994 (uninstall): Support DESTDIR.
10995
7f313d07
BC
10996Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10997
10998 * configure.srv: Add xscale*linux copy of arm*linux entry.
10999
3b2fc2ea
DJ
110002003-07-24 Daniel Jacobowitz <drow@mvista.com>
11001
11002 * linux-arm-low.c (arm_reinsert_addr): New function.
11003 (the_low_target): Add arm_reinsert_addr.
11004
1c0a559e
MK
110052003-07-08 Mark Kettenis <kettenis@gnu.org>
11006
11007 * mem-break.c: Remove whitespace at end of file.
11008
43d5792c
DJ
110092003-06-28 Daniel Jacobowitz <drow@mvista.com>
11010
11011 * configure.in: Check whether we need to prototype strerror.
11012 * server.h: Optionally prototype strerror.
11013 * gdbreplay.c (perror_with_name): Use strerror.
11014 * linux-low.c (linux_attach_lwp): Use strerror.
11015 * utils.c (perror_with_name): Use strerror.
11016 * config.in, configure: Regenerated.
11017
c8a86edf
DJ
110182003-06-28 Daniel Jacobowitz <drow@mvista.com>
11019
11020 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11021 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11022
73d37363
DJ
110232003-06-20 Daniel Jacobowitz <drow@mvista.com>
11024
11025 * Makefile.in (SFILES): Update.
11026 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11027 low-sun3.c: Remove files.
11028
6ad8ae5c
DJ
110292003-06-17 Daniel Jacobowitz <drow@mvista.com>
11030
11031 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11032 (linux_detach_one_process, linux_detach): New functions.
11033 (linux_target_ops): Add linux_detach.
11034 * server.c (main): Handle 'D' packet.
11035 * target.h (struct target_ops): Add "detach" member.
11036 (detach_inferior): Define.
11037
1581182a
MK
110382003-06-13 Mark Kettenis <kettenis@gnu.org>
11039
11040 From Kelley Cook <kelleycook@wideopenwest.com>:
11041 * configure.srv: Accept i[34567]86 variants.
11042
e5379b03
DJ
110432003-06-05 Daniel Jacobowitz <drow@mvista.com>
11044
11045 * linux-low.c (linux_wait_for_event): Correct comment typos.
11046 (linux_resume_one_process): Call check_removed_breakpoint.
11047 (linux_send_signal): New function.
11048 (linux_target_ops): Add linux_send_signal.
11049 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11050 of kill.
11051 * target.h (struct target_ops): Add send_signal.
11052
2ff29de4
JB
110532003-05-29 Jim Blandy <jimb@redhat.com>
11054
11055 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11056 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11057 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11058 away part of the register's value.
11059
254787d4
DJ
110602003-03-26 Daniel Jacobowitz <drow@mvista.com>
11061
11062 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11063 (linux_wait_for_event, linux_init_signals): Likewise.
11064
94e10508
DJ
110652003-03-17 Daniel Jacobowitz <drow@mvista.com>
11066
11067 * configure.in: Check for stdlib.h.
11068 * configure: Regenerated.
11069 * config.in: Regenerated.
11070
4c0711e0
DJ
110712003-01-04 Andreas Schwab <schwab@suse.de>
11072
11073 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11074
ef66e766
AC
110752003-01-02 Andrew Cagney <ac131313@redhat.com>
11076
11077 * Makefile.in: Remove obsolete code.
11078
a1358604
DJ
110792002-11-20 Daniel Jacobowitz <drow@mvista.com>
11080
11081 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11082 defined(PT_FPR0_HI).
11083
23ce3b1c
DJ
110842002-11-17 Stuart Hughes <seh@zee2.com>
11085
11086 * linux-arm-low.c (arm_num_regs): Increase.
11087 (arm_regmap): Include status register.
11088
110892002-11-17 Daniel Jacobowitz <drow@mvista.com>
11090
11091 * linux-low.c (register_addr): Remove incorrect -1 check.
11092
a9fa9f7d
DJ
110932002-08-29 Daniel Jacobowitz <drow@mvista.com>
11094
11095 * linux-low.c (linux_create_inferior): Call setpgid. Return
11096 the new PID.
11097 (unstopped_p, linux_signal_pid): Remove.
11098 (linux_target_ops): Remove linux_signal_pid.
11099 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11100 global instead of target method.
11101 * target.h (struct target_ops): Remove signal_pid. Update comment
11102 for create_inferior.
11103 * server.c (signal_pid): New variable.
11104 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11105 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11106 (attach_inferior): Set signal_pid.
11107
17574093
DJ
111082002-08-23 Daniel Jacobowitz <drow@mvista.com>
11109
11110 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11111
111122002-08-20 Jim Blandy <jimb@redhat.com>
11113
11114 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11115 default for this.
11116
111172002-08-01 Andrew Cagney <cagney@redhat.com>
11118
11119 * Makefile.in: Make chill references obsolete.
11120
111212002-07-24 Kevin Buettner <kevinb@redhat.com>
11122
11123 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11124 * configure: Regenerate.
11125 * config.in: Regenerate.
11126
111272002-07-09 David O'Brien <obrien@FreeBSD.org>
11128
11129 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11130 (perror_with_name, remote_close, remote_open, expect, play): Static.
11131
111322002-07-04 Michal Ludvig <mludvig@suse.cz>
11133
4b8dad4a 11134 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11135 byte offsets instead of an array of indexes.
11136 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11137
111382002-06-13 Daniel Jacobowitz <drow@mvista.com>
11139
11140 * regcache.c: Add comment.
11141
111422002-06-11 Daniel Jacobowitz <drow@mvista.com>
11143
11144 * thread-db.c: New file.
11145 * proc-service.c: New file.
11146 * acinclude.m4: New file.
11147 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11148 proc-service.o, and thread-db.o.
11149 (linux-low.o): Add USE_THREAD_DB.
11150 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11151 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11152 * aclocal.m4: Regenerated.
11153 * config.in: Regenerated.
11154 * configure: Regenerated.
11155 * configure.in: Check for proc_service.h, sys/procfs.h,
11156 thread_db.h, and linux/elf.h headrs.
11157 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11158 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11159 Check for -lthread_db and thread support.
11160 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11161 PowerPC, and SuperH.
11162 * i387-fp.c: Constify arguments.
11163 * i387-fp.h: Likewise.
11164 * inferiors.c: (struct thread_info): Renamed from
11165 `struct inferior_info'. Remove PID member. Use generic inferior
11166 list header. All uses updated.
11167 (inferiors, signal_pid): Removed.
11168 (all_threads): New variable.
11169 (get_thread): Define.
11170 (add_inferior_to_list): New function.
11171 (for_each_inferior): New function.
11172 (change_inferior_id): New function.
11173 (add_inferior): Removed.
11174 (remove_inferior): New function.
11175 (add_thread): New function.
11176 (free_one_thread): New function.
11177 (remove_thread): New function.
11178 (clear_inferiors): Use for_each_inferior and free_one_thread.
11179 (find_inferior): New function.
11180 (find_inferior_id): New function.
11181 (inferior_target_data): Update argument type.
11182 (set_inferior_target_data): Likewise.
11183 (inferior_regcache_data): Likewise.
11184 (set_inferior_regcache_data): Likewise.
11185 * linux-low.c (linux_bp_reinsert): Remove.
11186 (all_processes, stopping_threads, using_thrads)
11187 (struct pending_signals, debug_threads, pid_of): New.
11188 (inferior_pid): Replace with macro.
11189 (struct inferior_linux_data): Remove.
11190 (get_stop_pc, add_process): New functions.
11191 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11192 Use add_process and add_thread.
11193 (linux_attach_lwp): New function, based on old linux_attach. Use
11194 add_process and add_thread. Set stop_expected for new threads.
11195 (linux_attach): New function.
11196 (linux_kill_one_process): New function.
11197 (linux_kill): Kill all LWPs.
11198 (linux_thread_alive): Use find_inferior_id.
11199 (check_removed_breakpoints, status_pending_p): New functions.
11200 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11201 Update. Use WNOHANG. Wait for cloned processes also. Update process
11202 struct for the found process.
11203 (linux_wait_for_event): New function.
11204 (linux_wait): Use it. Support LWPs.
11205 (send_sigstop, wait_for_sigstop, stop_all_processes)
11206 (linux_resume_one_process, linux_continue_one_process): New functions.
11207 (linux_resume): Support LWPs.
11208 (REGISTER_RAW_SIZE): Remove.
11209 (fetch_register): Use register_size instead. Call supply_register.
11210 (usr_store_inferior_registers): Likewise. Call collect_register.
11211 Fix recursive case.
11212 (regsets_fetch_inferior_registers): Improve error message.
11213 (regsets_store_inferior_registers): Add debugging.
11214 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11215 (unstopped_p, linux_signal_pid): New functions.
11216 (linux_target_ops): Add linux_signal_pid.
11217 (linux_init_signals): New function.
11218 (initialize_low): Call it. Initialize using_threads.
11219 * regcache.c (inferior_regcache_data): Add valid
11220 flag.
11221 (get_regcache): Fetch registers lazily. Add fetch argument
11222 and update all callers.
11223 (regcache_invalidate_one, regcache_invalidate): New
11224 functions.
11225 (new_register_cache): Renamed from create_register_cache.
11226 Return the new regcache.
11227 (free_register_cache): Change argument to a void *.
11228 (registers_to_string, registers_from_string): Call get_regcache
11229 with fetch flag set.
11230 (register_data): Make static. Pass fetch flag to get_regcache.
11231 (supply_register): Call get_regcache with fetch flag clear.
11232 (collect_register): Call get_regcache with fetch flag set.
11233 (collect_register_as_string): New function.
11234 * regcache.h: Update.
11235 * remote-utils.c (putpkt): Flush after debug output and use
11236 stderr.
11237 Handle input interrupts while waiting for an ACK.
11238 (input_interrupt): Use signal_pid method.
11239 (getpkt): Flush after debug output and use stderr.
11240 (outreg): Use collect_register_as_string.
11241 (new_thread_notify, dead_thread_notify): New functions.
11242 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11243 and general_thread.
11244 (look_up_one_symbol): Flush after debug output.
11245 * server.c (step_thread, server_waiting): New variables.
11246 (start_inferior): Don't use signal_pid. Update call to mywait.
11247 (attach_inferior): Update call to mywait.
11248 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11249 (main): Don't fetch/store registers explicitly. Use
11250 set_desired_inferior. Support proposed ``Hs'' packet. Update
11251 calls to mywait.
11252 * server.h: Update.
11253 (struct inferior_list, struct_inferior_list_entry): New.
11254 * target.c (set_desired_inferior): New.
11255 (write_inferior_memory): Constify.
11256 (mywait): New function.
11257 * target.h: Update.
11258 (struct target_ops): New signal_pid method.
11259 (mywait): Removed macro, added prototype.
11260
11261 * linux-low.h (regset_func): Removed.
11262 (regset_fill_func, regset_store_func): New.
11263 (enum regset_type): New.
11264 (struct regset_info): Add type field. Use new operation types.
11265 (struct linux_target_ops): stop_pc renamed to get_pc.
11266 Add decr_pc_after_break and breakpoint_at.
11267 (get_process, get_thread_proess, get_process_thread)
11268 (strut process_info, all_processes, linux_attach_lwp)
11269 (thread_db_init): New.
11270
11271 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11272 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11273 (the_low_target): Add new members.
11274 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11275 (i386_store_fpxregset): Constify.
11276 (target_regsets): Add new kind identifier.
11277 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11278 (i386_set_pc): Add debugging.
11279 (i386_breakpoint_at): New function.
11280 (the_low_target): Add new members.
11281 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11282 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11283 (mips_breakpoint_at): New.
11284 (the_low_target): Add new members.
11285 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11286 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11287 (the_low_target): Add new members.
11288 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11289 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11290 (the_low_target): Add new members.
11291 * linux-x86-64-low.c (target_regsets): Add new kind
11292 identifier.
11293
112942002-05-15 Daniel Jacobowitz <drow@mvista.com>
11295
11296 From Martin Pool <mbp@samba.org>:
11297 * server.c (gdbserver_usage): New function.
11298 (main): Call it.
11299
113002002-05-14 Daniel Jacobowitz <drow@mvista.com>
11301
11302 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11303 stop_at -> stop_pc.
11304
113052002-05-04 Andrew Cagney <ac131313@redhat.com>
11306
11307 * Makefile.in: Remove obsolete code.
11308
113092002-04-24 Michal Ludvig <mludvig@suse.cz>
11310
11311 * linux-low.c (regsets_fetch_inferior_registers),
11312 (regsets_store_inferior_registers): Removed cast to int from
11313 ptrace() calls.
11314 * regcache.h: Added declaration of struct inferior_info.
11315
113162002-04-20 Daniel Jacobowitz <drow@mvista.com>
11317
11318 * inferiors.c (struct inferior_info): Add regcache_data.
11319 (add_inferior): Call create_register_cache.
11320 (clear_inferiors): Call free_register_cache.
11321 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11322 * regcache.c (struct inferior_regcache_data): New.
11323 (registers): Remove.
11324 (get_regcache): New function.
11325 (create_register_cache, free_register_cache): New functions.
11326 (set_register_cache): Don't initialize the register cache here.
11327 (registers_to_string, registers_from_string, register_data): Call
11328 get_regcache.
11329 * regcache.h: Add prototypes.
11330 * server.h: Likewise.
11331
113322002-04-20 Daniel Jacobowitz <drow@mvista.com>
11333
11334 * mem-break.c: New file.
11335 * mem-break.h: New file.
11336 * Makefile.in: Add mem-break.o rule; update server.h
11337 dependencies.
11338 * inferiors.c (struct inferior_info): Add target_data
11339 member.
11340 (clear_inferiors): Free target_data member if set.
11341 (inferior_target_data, set_inferior_target_data): New functions.
11342 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11343 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11344 * linux-low.c (linux_bp_reinsert): New variable.
11345 (struct inferior_linux_data): New.
11346 (linux_create_inferior): Use set_inferior_target_data.
11347 (linux_attach): Likewise. Call add_inferior.
11348 (linux_wait_for_one_inferior): New function.
11349 (linux_wait): Call it.
11350 (linux_write_memory): Add const.
11351 (initialize_low): Call set_breakpoint_data.
11352 * linux-low.h (struct linux_target_ops): Add breakpoint
11353 handling members.
11354 * server.c (attach_inferior): Remove extra add_inferior
11355 call.
11356 * server.h: Include mem-break.h. Update inferior.c
11357 prototypes.
11358 * target.c (read_inferior_memory)
11359 (write_inferior_memory): New functions.
11360 * target.h (read_inferior_memory)
11361 (write_inferior_memory): Change macros to prototypes.
11362 (struct target_ops): Update comments. Add const to write_memory
11363 definition.
11364
113652002-04-11 Daniel Jacobowitz <drow@mvista.com>
11366
11367 * linux-low.c (usr_store_inferior_registers): Support
11368 registers which are allowed to fail to store.
11369 * linux-low.h (linux_target_ops): Likewise.
11370 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11371 (ppc_cannot_store_register): FPSCR may not be storable.
11372
113732002-04-09 Daniel Jacobowitz <drow@mvista.com>
11374
11375 * server.h: Include <string.h> if HAVE_STRING_H.
11376 * ChangeLog: Correct paths in last ChangeLog entry.
11377
113782002-04-09 Daniel Jacobowitz <drow@mvista.com>
11379
11380 * linux-low.h: Remove obsolete prototypes.
11381 (struct linux_target_ops): New.
11382 (extern the_low_target): New.
11383 * linux-low.c (num_regs, regmap): Remove declarations.
11384 (register_addr): Use the_low_target explicitly.
11385 (fetch_register): Likewise.
11386 (usr_fetch_inferior_registers): Likewise.
11387 (usr_store_inferior_registers): Likewise.
11388 * linux-arm-low.c (num_regs): Remove.
11389 (arm_num_regs): Define.
11390 (arm_regmap): Renamed from regmap, made static.
11391 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11392 made static.
11393 (arm_cannot_store_register): Renamed from cannot_store_register,
11394 made static.
11395 (the_low_target): New.
11396 * linux-i386-low.c (num_regs): Remove.
11397 (i386_num_regs): Define.
11398 (i386_regmap): Renamed from regmap, made static.
11399 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11400 made static.
11401 (i386_cannot_store_register): Renamed from cannot_store_register,
11402 made static.
11403 (the_low_target): New.
11404 * linux-ia64-low.c (num_regs): Remove.
11405 (ia64_num_regs): Define.
11406 (ia64_regmap): Renamed from regmap, made static.
11407 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11408 made static.
11409 (ia64_cannot_store_register): Renamed from cannot_store_register,
11410 made static.
11411 (the_low_target): New.
11412 * linux-m68k-low.c (num_regs): Remove.
11413 (m68k_num_regs): Define.
11414 (m68k_regmap): Renamed from regmap, made static.
11415 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11416 made static.
11417 (m68k_cannot_store_register): Renamed from cannot_store_register,
11418 made static.
11419 (the_low_target): New.
11420 * linux-mips-low.c (num_regs): Remove.
11421 (mips_num_regs): Define.
11422 (mips_regmap): Renamed from regmap, made static.
11423 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11424 made static.
11425 (mips_cannot_store_register): Renamed from cannot_store_register,
11426 made static.
11427 (the_low_target): New.
11428 * linux-ppc-low.c (num_regs): Remove.
11429 (ppc_num_regs): Define.
11430 (ppc_regmap): Renamed from regmap, made static.
11431 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11432 made static.
11433 (ppc_cannot_store_register): Renamed from cannot_store_register,
11434 made static.
11435 (the_low_target): New.
11436 * linux-s390-low.c (num_regs): Remove.
11437 (s390_num_regs): Define.
11438 (s390_regmap): Renamed from regmap, made static.
11439 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11440 made static.
11441 (s390_cannot_store_register): Renamed from cannot_store_register,
11442 made static.
11443 (the_low_target): New.
11444 * linux-sh-low.c (num_regs): Remove.
11445 (sh_num_regs): Define.
11446 (sh_regmap): Renamed from regmap, made static.
11447 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11448 made static.
11449 (sh_cannot_store_register): Renamed from cannot_store_register,
11450 made static.
11451 (the_low_target): New.
11452 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11453 (the_low_target): New.
11454
114552002-04-09 Daniel Jacobowitz <drow@mvista.com>
11456
11457 * Makefile.in: Add stamp-h target.
11458 * configure.in: Create stamp-h.
11459 * configure: Regenerated.
11460
114612002-04-09 Daniel Jacobowitz <drow@mvista.com>
11462
11463 * inferiors.c: New file.
11464 * target.c: New file.
11465 * target.h: New file.
11466 * Makefile.in: Add target.o and inferiors.o. Update
11467 dependencies.
11468 * linux-low.c (inferior_pid): New static variable,
11469 moved from server.c.
11470 (linux_create_inferior): Renamed from create_inferior.
11471 Call add_inferior. Return 0 on success instead of a PID.
11472 (linux_attach): Renamed from myattach.
11473 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11474 (linux_thread_alive): Renamed from mythread_alive.
11475 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11476 child dies.
11477 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11478 (regsets_store_inferior_registers): Correct error message.
11479 Add missing ``return 0''.
11480 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11481 (linux_store_registers): Renamed from store_inferior_registers.
11482 (linux_read_memory): Renamed from read_inferior_memory.
11483 (linux_write_memory): Renamed from write_inferior_memory.
11484 (linux_target_ops): New structure.
11485 (initialize_low): Call set_target_ops ().
11486 * remote-utils.c (unhexify): New function.
11487 (hexify): New function.
11488 (input_interrupt): Send signals to ``signal_pid''.
11489 * server.c (inferior_pid): Remove.
11490 (start_inferior): Update create_inferior call.
11491 (attach_inferior): Call add_inferior.
11492 (handle_query): New function.
11493 (main): Call handle_query for `q' packets.
11494 * server.h: Include "target.h". Remove obsolete prototypes.
11495 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11496
114972002-04-09 Daniel Jacobowitz <drow@mvista.com>
11498
11499 * Makefile.in: Add WARN_CFLAGS. Update configury
11500 dependencies.
11501 * configure.in: Check for <string.h>
11502 * configure: Regenerate.
11503 * config.in: Regenerate.
11504 * gdbreplay.c: Include needed system headers.
11505 (remote_open): Remove strchr prototype.
11506 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11507 * regcache.c (supply_register): Change buf argument to const void *.
11508 (supply_register_by_name): Likewise.
11509 (collect_register): Change buf argument to void *.
11510 (collect_register_by_name): Likewise.
11511 * regcache.h: Add missing prototypes.
11512 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11513 * server.c (handle_query): New function.
11514 (attached): New static variable, moved out of main.
11515 (main): Quiet longjmp clobber warnings.
11516 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11517 * utils.c (error): Remove NORETURN.
11518 (fatal): Likewise.
This page took 2.079942 seconds and 4 git commands to generate.