]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Remove proc->priv->new_inferior
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
55d7b841
YQ
12015-07-24 Yao Qi <yao.qi@linaro.org>
2
3 * linux-low.c (linux_create_inferior): Remove setting to
4 proc->priv->new_inferior.
5 (linux_attach): Likewise.
6 (linux_low_filter_event): Likewise.
7 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
8
c06cbd92
YQ
92015-07-24 Yao Qi <yao.qi@linaro.org>
10
11 * linux-low.c (linux_arch_setup): New function.
12 (linux_low_filter_event): If proc->tdesc is NULL and
13 proc->attached is true, call the_low_target.arch_setup.
14 Otherwise, keep status pending, and return.
15 (linux_resume_one_lwp_throw): Don't call get_pc if
16 thread->while_stepping isn't NULL. Don't call
17 get_thread_regcache if proc->tdesc is NULL.
18 (need_step_over_p): Return 0 if proc->tdesc is NULL.
19 (linux_target_ops): Install arch_setup.
20 * server.c (start_inferior): Call the_target->arch_setup.
21 * target.h (struct target_ops) <arch_setup>: New field.
22 (target_arch_setup): New marco.
23 * lynx-low.c (lynx_target_ops): Update.
24 * nto-low.c (nto_target_ops): Update.
25 * spu-low.c (spu_target_ops): Update.
26 * win32-low.c (win32_target_ops): Update.
27
5ae3ebba
YQ
282015-07-24 Yao Qi <yao.qi@linaro.org>
29
30 * linux-low.c (linux_add_process): Don't set
31 proc->priv->new_inferior.
32 (linux_create_inferior): Set proc->priv->new_inferior to 1.
33 (linux_attach): Likewise.
34
eb97750b
YQ
352015-07-24 Yao Qi <yao.qi@linaro.org>
36
37 * server.c (start_inferior): Code refactor.
38
51aee833
YQ
392015-07-24 Yao Qi <yao.qi@linaro.org>
40
41 * server.c (process_serial_event): Set general_thread.
42
af1b22f3
YQ
432015-07-21 Yao Qi <yao.qi@linaro.org>
44
45 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
46 aarch64_linux_get_debug_reg_capacity.
47
554717a3
YQ
482015-07-17 Yao Qi <yao.qi@linaro.org>
49
50 * Makefile.in (aarch64-linux-hw-point.o): New rule.
51 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
52 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
53 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
54 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
55 (AARCH64_HWP_ALIGNMENT): Likewise.
56 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
57 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
58 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
59 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
60 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
61 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
62 (struct aarch64_debug_reg_state): Likewise.
63 (struct arch_lwp_info): Likewise.
64 (aarch64_align_watchpoint): Likewise.
65 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
66 (aarch64_watchpoint_length): Likewise.
67 (aarch64_point_encode_ctrl_reg): Likewise
68 (aarch64_point_is_aligned): Likewise.
69 (aarch64_align_watchpoint): Likewise.
70 (aarch64_linux_set_debug_regs):
71 (aarch64_dr_state_insert_one_point): Likewise.
72 (aarch64_dr_state_remove_one_point): Likewise.
73 (aarch64_handle_breakpoint): Likewise.
74 (aarch64_handle_aligned_watchpoint): Likewise.
75 (aarch64_handle_unaligned_watchpoint): Likewise.
76 (aarch64_handle_watchpoint): Likewise.
77
c67ca4de
YQ
782015-07-17 Yao Qi <yao.qi@linaro.org>
79
80 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
81 and don't aarch64_get_debug_reg_state. All callers update.
82 (aarch64_handle_aligned_watchpoint): Likewise.
83 (aarch64_handle_unaligned_watchpoint): Likewise.
84 (aarch64_handle_watchpoint): Likewise.
85 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
86 (aarch64_remove_point): Likewise.
87
25abf979
YQ
882015-07-17 Yao Qi <yao.qi@linaro.org>
89
90 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
91 debug_printf.
92 (aarch64_handle_unaligned_watchpoint): Likewise.
93
db1ff28b
JK
942015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
95
96 Revert the previous 3 commits:
97 Move gdb_regex* to common/
98 Move linux_find_memory_regions_full & co.
99 gdbserver build-id attribute generator
100
700ca40f
JK
1012015-07-15 Aleksandar Ristovski <aristovski@qnx.com
102 Jan Kratochvil <jan.kratochvil@redhat.com>
103
104 gdbserver build-id attribute generator.
105 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
106 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
107 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
108 (find_phdr): New.
109 (get_dynamic): Use find_pdhr to traverse program headers.
110 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
111 (compare_mapping_entry_range, struct find_memory_region_callback_data)
112 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
113 (get_hex_build_id): New.
114 (linux_qxfer_libraries_svr4): Add optional build-id attribute
115 to reply XML document.
116
9904185c
JK
1172015-07-15 Aleksandar Ristovski <aristovski@qnx.com
118 Jan Kratochvil <jan.kratochvil@redhat.com>
119
120 * target.c: Include target/target-utils.h and fcntl.h.
121 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
122 (target_fileio_read_stralloc): New functions.
123
6e5b4429
JK
1242015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
125
126 * Makefile.in (OBS): Add gdb_regex.o.
127 (gdb_regex.o): New.
128 * config.in: Rebuilt.
129 * configure: Rebuilt.
130
ddc98fbf
JK
1312015-07-15 Aleksandar Ristovski <aristovski@qnx.com
132 Jan Kratochvil <jan.kratochvil@redhat.com>
133
134 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
135 * Makefile.in (OBS): Add target-utils.o.
136 (linux-maps.o, target-utils.o): New.
137 * configure.srv (srv_linux_obj): Add linux-maps.o.
138
e57bb7a0
PL
1392015-07-15 Pierre Langlois <pierre.langlois@arm.com>
140
141 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
142 function, return 1.
143 (the_low_target): Install it.
144
586b02a9
PA
1452015-07-14 Pedro Alves <palves@redhat.com>
146
147 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
148 Instead, ignore ECHILD, and throw an error for other errnos.
149
58c1b36c
PA
1502015-07-10 Pedro Alves <palves@redhat.com>
151
152 * event-loop.c (struct callback_event) <data>: Change type to
153 gdb_client_data instance instead of gdb_client_data pointer.
154 (append_callback_event): Adjust.
155
421530db
PL
1562015-07-10 Pierre Langlois <pierre.langlois@arm.com>
157
158 * linux-aarch64-low.c: Add comments for each linux_target_ops
159 method. Remove comments already covered in target_ops and
160 linux_target_ops definitions.
161 (the_low_target): Add comments for each unimplemented method.
162
c2d65f38
YQ
1632015-07-09 Yao Qi <yao.qi@linaro.org>
164
165 * linux-aarch64-low.c (aarch64_regmap): Remove.
166 (aarch64_usrregs_info): Remove.
167 (regs_info): Set field usrregs to NULL.
168
b20a6524
MM
1692015-07-02 Markus Metzger <markus.t.metzger@intel.com>
170
171 * linux-low.c: Include "rsp-low.h"
172 (linux_low_encode_pt_config, linux_low_encode_raw): New.
173 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
174 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
175 (handle_btrace_enable_pt): New.
176 (handle_btrace_general_set): Support "pt".
177 (handle_btrace_conf_general_set): Support "pt:size".
178
96c97461
PL
1792015-06-29 Pierre Langlois <pierre.langlois@arm.com>
180
181 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
182 Z_PACKET_SW_BP.
183
37d66942
PL
1842015-06-29 Pierre Langlois <pierre.langlois@arm.com>
185
186 * linux-aarch64-low.c: Remove comment about endianness.
187 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
188 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
189 memcmp.
190
dc06243f
GB
1912015-06-24 Gary Benson <gbenson@redhat.com>
192
193 * linux-i386-ipa.c (stdint.h): Do not include.
194 * lynx-i386-low.c (stdint.h): Likewise.
195 * lynx-ppc-low.c (stdint.h): Likewise.
196 * mem-break.c (stdint.h): Likewise.
197 * thread-db.c (stdint.h): Likewise.
198 * tracepoint.c (stdint.h): Likewise.
199 * win32-low.c (stdint.h): Likewise.
200
124e13d9
SM
2012015-06-18 Simon Marchi <simon.marchi@ericsson.com>
202
203 * server.c (write_qxfer_response): Update call to
204 remote_escape_output.
205
909c2cda
JK
2062015-06-15 Aleksandar Ristovski <aristovski@qnx.com
207 Jan Kratochvil <jan.kratochvil@redhat.com>
208
209 Merge multiple hex conversions.
210 * gdbreplay.c (tohex): Rename to 'fromhex'.
211 (logchar): Use fromhex.
212
24c05f46
JK
2132015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
214
215 * server.c (handle_qxfer_libraries): Set `version' attribute for
216 <library-list>.
217
14d2069a
GB
2182015-06-10 Gary Benson <gbenson@redhat.com>
219
220 * target.h (struct target_ops) <multifs_open>: New field.
221 <multifs_unlink>: Likewise.
222 <multifs_readlink>: Likewise.
223 * linux-low.c (nat/linux-namespaces.h): New include.
224 (linux_target_ops): Initialize the_target->multifs_open,
225 the_target->multifs_unlink and the_target->multifs_readlink.
226 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
227 * hostio.c (hostio_fs_pid): New static variable.
228 (hostio_handle_new_gdb_connection): New function.
229 (handle_setfs): Likewise.
230 (handle_open): Use the_target->multifs_open as appropriate.
231 (handle_unlink): Use the_target->multifs_unlink as appropriate.
232 (handle_readlink): Use the_target->multifs_readlink as
233 appropriate.
234 (handle_vFile): Handle vFile:setfs packets.
235 * server.c (handle_query): Call hostio_handle_new_gdb_connection
236 after target_handle_new_gdb_connection.
237
4b8b5e72
GB
2382015-06-10 Gary Benson <gbenson@redhat.com>
239
240 * configure.ac (AC_CHECK_FUNCS): Add setns.
241 * config.in: Regenerate.
242 * configure: Likewise.
243 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
244 (linux-namespaces.o): New rule.
245 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
246
3ac2e371
GB
2472015-06-09 Gary Benson <gbenson@redhat.com>
248
249 * hostio.c (handle_open): Process mode argument with
250 fileio_to_host_mode.
251
ca9b78ce
YQ
2522015-06-01 Yao Qi <yao.qi@linaro.org>
253
254 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
255 * linux-x86-low.c: Likewise.
256
bfacd19d
DB
2572015-05-28 Don Breazeal <donb@codesourcery.com>
258
259 * linux-low.c (handle_extended_wait): Initialize
260 thread_info.last_resume_kind for new fork children.
261
452003ef
PA
2622015-05-15 Pedro Alves <palves@redhat.com>
263
264 * target.h (target_handle_new_gdb_connection): Rewrite using if
265 wrapped in do/while.
266
1041a03c
JB
2672015-05-14 Joel Brobecker <brobecker@adacore.com>
268
269 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
270 * configure, config.in: Regenerate.
271 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
272 Declare typedef.
273
c269dbdb
DB
2742015-05-12 Don Breazeal <donb@codesourcery.com>
275
276 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
277 PTRACE_EVENT_VFORK_DONE.
278 (linux_low_ptrace_options, extended_event_reported): Add vfork
279 events.
280 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
281 and "vforkdone" for RSP 'T' Stop Reply Packet.
282 * server.h (report_vfork_events): Declare
283 global variable.
284
3a8a0396
DB
2852015-05-12 Don Breazeal <donb@codesourcery.com>
286
287 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
288 (the_low_target) <new_fork>: Initialize new member.
289 * linux-arm-low.c (arm_new_fork): New function.
290 (the_low_target) <new_fork>: Initialize new member.
291 * linux-low.c (handle_extended_wait): Call new target function
292 new_fork.
293 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
294 * linux-mips-low.c (mips_add_watchpoint): New function
295 extracted from mips_insert_point.
296 (the_low_target) <new_fork>: Initialize new member.
297 (mips_linux_new_fork): New function.
298 (mips_insert_point): Call mips_add_watchpoint.
299 * linux-x86-low.c (x86_linux_new_fork): New function.
300 (the_low_target) <new_fork>: Initialize new member.
301
de0d863e
DB
3022015-05-12 Don Breazeal <donb@codesourcery.com>
303
304 * linux-low.c (handle_extended_wait): Implement return value,
305 rename argument 'event_child' to 'event_lwp', handle
306 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
307 (linux_low_ptrace_options): New function.
308 (linux_low_filter_event): Call linux_low_ptrace_options,
309 use different argument fo linux_enable_event_reporting,
310 use return value from handle_extended_wait.
311 (extended_event_reported): New function.
312 (linux_wait_1): Call extended_event_reported and set
313 status to report fork events.
314 (linux_write_memory): Add pid to debug message.
315 (reset_lwp_ptrace_options_callback): New function.
316 (linux_handle_new_gdb_connection): New function.
317 (linux_target_ops): Initialize new structure member.
318 * linux-low.h (struct lwp_info) <waitstatus>: New member.
319 * lynx-low.c: Initialize new structure member.
320 * remote-utils.c (prepare_resume_reply): Implement stop reason
321 "fork" for "T" stop message.
322 * server.c (handle_query): Call handle_new_gdb_connection.
323 * server.h (report_fork_events): Declare global flag.
324 * target.h (struct target_ops) <handle_new_gdb_connection>:
325 New member.
326 (target_handle_new_gdb_connection): New macro.
327 * win32-low.c: Initialize new structure member.
328
ddcbc397
DB
3292015-05-12 Don Breazeal <donb@codesourcery.com>
330
331 * mem-break.c (APPEND_TO_LIST): Define macro.
332 (clone_agent_expr): New function.
333 (clone_one_breakpoint): New function.
334 (clone_all_breakpoints): New function.
335 * mem-break.h: Declare new functions.
336
89245bc0
DB
3372015-05-12 Don Breazeal <donb@codesourcery.com>
338
339 * linux-low.c (linux_supports_fork_events): New function.
340 (linux_supports_vfork_events): New function.
341 (linux_target_ops): Initialize new structure members.
342 (initialize_low): Call linux_check_ptrace_features.
343 * lynx-low.c (lynx_target_ops): Initialize new structure
344 members.
345 * server.c (report_fork_events, report_vfork_events):
346 New global flags.
347 (handle_query): Add new features to qSupported packet and
348 response.
349 (captured_main): Initialize new global variables.
350 * target.h (struct target_ops) <supports_fork_events>:
351 New member.
352 <supports_vfork_events>: New member.
353 (target_supports_fork_events): New macro.
354 (target_supports_vfork_events): New macro.
355 * win32-low.c (win32_target_ops): Initialize new structure
356 members.
357
835205d0
GB
3582015-05-12 Gary Benson <gbenson@redhat.com>
359
360 * server.c (handle_qxfer_exec_file): Use current process
361 if annex is empty.
362
21e94bd9
SL
3632015-05-08 Sandra Loosemore <sandra@codesourcery.com>
364
365 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
366 Remove HAVE_PTRACE_GETREGS conditionals.
367 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
368 instead of PTRACE_GETREGS and PTRACE_SETREGS.
369
45614f15
YQ
3702015-05-08 Yao Qi <yao.qi@linaro.org>
371
372 * linux-low.c (linux_supports_conditional_breakpoints): New
373 function.
374 (linux_target_ops): Install new target method.
375 * lynx-low.c (lynx_target_ops): Install NULL hook for
376 supports_conditional_breakpoints.
377 * nto-low.c (nto_target_ops): Likewise.
378 * spu-low.c (spu_target_ops): Likewise.
379 * win32-low.c (win32_target_ops): Likewise.
380 * server.c (handle_query): Check
381 target_supports_conditional_breakpoints.
382 * target.h (struct target_ops) <supports_conditional_breakpoints>:
383 New field.
384 (target_supports_conditional_breakpoints): New macro.
385
80ad801e
PA
3862015-05-06 Pedro Alves <palves@redhat.com>
387
388 PR server/18081
389 * server.c (start_inferior): If the process exits, mourn it.
390
819843c7
GB
3912015-04-21 Gary Benson <gbenson@redhat.com>
392
393 * hostio.c (fileio_open_flags_to_host): Factored out to
394 fileio_to_host_openflags in common/fileio.c. Single use
395 updated.
396
a2d5a9d7
MF
3972015-04-17 Max Filippov <jcmvbkbc@gmail.com>
398
399 * linux-xtensa-low.c (xtensa_fill_gregset)
400 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
401 XCHAL_HAVE_LOOP.
402
deb44829
MF
4032015-04-17 Max Filippov <jcmvbkbc@gmail.com>
404
405 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
406 (regs_info): Replace usrregs pointer with NULL.
407
e57f1de3
GB
4082015-04-17 Gary Benson <gbenson@redhat.com>
409
410 * target.h (struct target_ops) <pid_to_exec_file>: New field.
411 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
412 * server.c (handle_qxfer_exec_file): New function.
413 (qxfer_packets): Add exec-file entry.
414 (handle_query): Report qXfer:exec-file:read as supported packet.
415
62828379
RN
4162015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
417
418 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
419
b88bb450
GB
4202015-04-09 Gary Benson <gbenson@redhat.com>
421
422 * hostio-errno.c (errno_to_fileio_error): Remove function.
423 Update caller to use remote_fileio_to_fio_error.
424
c8f4bfdd
YQ
4252015-04-09 Yao Qi <yao.qi@linaro.org>
426
427 * linux-low.c (linux_insert_point): Call
428 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
429 (linux_remove_point): Call remove_memory_breakpoint if type is
430 raw_bkpt_type_sw.
431 * linux-x86-low.c (x86_insert_point): Don't call
432 insert_memory_breakpoint.
433 (x86_remove_point): Don't call remove_memory_breakpoint.
434
41f98f02
PA
4352015-04-01 Pedro Alves <palves@redhat.com>
436 Cleber Rosa <crosa@redhat.com>
437
438 * server.c (gdbserver_usage): Reorganize and extend the usage
439 message.
440
2bf6fb9d
PA
4412015-03-24 Pedro Alves <palves@redhat.com>
442
443 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
444 output. Also dump TRAP_TRACE.
445 (linux_low_filter_event): In debug output, distinguish a
446 resume_stop SIGSTOP from a delayed SIGSTOP.
447
369f6daa
GB
4482015-03-24 Gary Benson <gbenson@redhat.com>
449
450 * linux-x86-low.c (x86_linux_new_thread): Moved to
451 nat/x86-linux.c.
452 (x86_linux_prepare_to_resume): Likewise.
453
8e5d4070
GB
4542015-03-24 Gary Benson <gbenson@redhat.com>
455
456 * Makefile.in (x86-linux-dregs.o): New rule.
457 * configure.srv: Add x86-linux-dregs.o to relevant targets.
458 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
459 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
460 (x86_linux_dr_get): Likewise.
461 (x86_linux_dr_set): Likewise.
462 (update_debug_registers_callback): Likewise.
463 (x86_linux_dr_set_addr): Likewise.
464 (x86_linux_dr_get_addr): Likewise.
465 (x86_linux_dr_set_control): Likewise.
466 (x86_linux_dr_get_control): Likewise.
467 (x86_linux_dr_get_status): Likewise.
468 (x86_linux_update_debug_registers): Likewise.
469
2b95d440
GB
4702015-03-24 Gary Benson <gbenson@redhat.com>
471
472 * linux-x86-low.c (x86_linux_update_debug_registers):
473 New function, factored out from...
474 (x86_linux_prepare_to_resume): ...this.
475
14b0bc68
GB
4762015-03-24 Gary Benson <gbenson@redhat.com>
477
478 * linux-x86-low.c (x86_linux_dr_get): Update comments.
479 (x86_linux_dr_set): Likewise.
480 (update_debug_registers_callback): Likewise.
481 (x86_linux_dr_set_addr): Likewise.
482 (x86_linux_dr_get_addr): Likewise.
483 (x86_linux_dr_set_control): Likewise.
484 (x86_linux_dr_get_control): Likewise.
485 (x86_linux_dr_get_status): Likewise.
486 (x86_linux_prepare_to_resume): Likewise.
487
5dfe6ca8
GB
4882015-03-24 Gary Benson <gbenson@redhat.com>
489
490 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
491 Use perror_with_name. Pass string through gettext.
492 (x86_linux_dr_set): Likewise.
493
d33472ad
GB
4942015-03-24 Gary Benson <gbenson@redhat.com>
495
496 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
497 (x86_linux_dr_set_addr): ...this.
498 (x86_dr_low_get_addr): Rename to...
499 (x86_linux_dr_get_addr): ...this.
500 (x86_dr_low_set_control): Rename to...
501 (x86_linux_dr_set_control): ...this.
502 (x86_dr_low_get_control): Rename to...
503 (x86_linux_dr_get_control): ...this.
504 (x86_dr_low_get_status): Rename to...
505 (x86_linux_dr_get_status): ...this.
506 (x86_dr_low): Update with new function names.
507
4b134ca1
GB
5082015-03-24 Gary Benson <gbenson@redhat.com>
509
510 * Makefile.in (x86-linux.o): New rule.
511 * configure.srv: Add x86-linux.o to relevant targets.
512 * linux-low.c (lwp_set_arch_private_info): New function.
513 (lwp_arch_private_info): Likewise.
514 * linux-x86-low.c: Include nat/x86-linux.h.
515 (arch_lwp_info): Removed structure.
516 (update_debug_registers_callback):
517 Use lwp_set_debug_registers_changed.
518 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
519 and lwp_set_debug_registers_changed.
520 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
521
34c703da
GB
5222015-03-24 Gary Benson <gbenson@redhat.com>
523
524 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
525 * linux-arm-low.c (arm_new_thread): Likewise.
526 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
527 * linux-mips-low.c (mips_linux_new_thread): Likewise.
528 * linux-x86-low.c (x86_linux_new_thread): Likewise.
529 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
530
cff068da
GB
5312015-03-24 Gary Benson <gbenson@redhat.com>
532
533 * linux-low.c (ptid_of_lwp): New function.
534 (lwp_is_stopped): Likewise.
535 (lwp_stop_reason): Likewise.
536 * linux-x86-low.c (update_debug_registers_callback):
537 Use lwp_is_stopped.
538 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
539 lwp_stop_reason.
540
b2f7c7e8
GB
5412015-03-24 Gary Benson <gbenson@redhat.com>
542
543 * linux-low.h (linux_stop_lwp): Remove declaration.
544
6d4ee8c6
GB
5452015-03-24 Gary Benson <gbenson@redhat.com>
546
547 * linux-low.h: Include nat/linux-nat.h.
548 * linux-low.c (iterate_over_lwps_args): New structure.
549 (iterate_over_lwps_filter): New function.
550 (iterate_over_lwps): Likewise.
551 * linux-x86-low.c (update_debug_registers_callback):
552 Update signature to what iterate_over_lwps expects.
553 Remove PID check that iterate_over_lwps now performs.
554 (x86_dr_low_set_addr): Use iterate_over_lwps.
555 (x86_dr_low_set_control): Likewise.
556
70a0bb6b
GB
5572015-03-24 Gary Benson <gbenson@redhat.com>
558
559 * linux-x86-low.c (x86_debug_reg_state): New function.
560 (x86_linux_prepare_to_resume): Use the above.
561
7b669087
GB
5622015-03-24 Gary Benson <gbenson@redhat.com>
563
564 * linux-low.c (current_lwp_ptid): New function.
565 * linux-x86-low.c: Include nat/linux-nat.h.
566 (x86_dr_low_get_addr): Use current_lwp_ptid.
567 (x86_dr_low_get_control): Likewise.
568 (x86_dr_low_get_status): Likewise.
569
eef49a3d
PA
5702015-03-20 Pedro Alves <palves@redhat.com>
571
572 * tracepoint.c (cmd_qtstatus): Make "str" const.
573
b2333d22
PA
5742015-03-20 Pedro Alves <palves@redhat.com>
575
576 * server.c (handle_general_set): Make "req_str" const.
577
23f238d3
PA
5782015-03-19 Pedro Alves <palves@redhat.com>
579
580 * linux-low.c (linux_resume_one_lwp): Rename to ...
581 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
582 instead call perror_with_name.
583 (check_ptrace_stopped_lwp_gone): New function.
584 (linux_resume_one_lwp): Reimplement as wrapper around
585 linux_resume_one_lwp_throw that swallows errors if the LWP is
586 gone.
587
91baf43f
PA
5882015-03-19 Pedro Alves <palves@redhat.com>
589
590 * linux-low.c (count_events_callback, select_event_lwp_callback):
591 No longer check whether the thread has resume_stop as last resume
592 kind.
593
8bf3b159
PA
5942015-03-19 Pedro Alves <palves@redhat.com>
595
596 * linux-low.c (count_events_callback, select_event_lwp_callback):
597 Use the lwp's status_pending_p field, not the thread's.
598
b90fc188
PA
5992015-03-19 Pedro Alves <palves@redhat.com>
600
601 * linux-low.c (select_event_lwp_callback): Update comments to
602 no longer mention SIGTRAP.
603
464b0089
GB
6042015-03-18 Gary Benson <gbenson@redhat.com>
605
606 * server.c (handle_query): Do not report vFile:fstat as supported.
607
aa9e327f
GB
6082015-03-11 Gary Benson <gbenson@redhat.com>
609
610 * hostio.c (sys/types.h): New include.
611 (sys/stat.h): Likewise.
612 (common-remote-fileio.h): Likewise.
613 (handle_fstat): New function.
614 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 615
791c0056
GB
6162015-03-11 Gary Benson <gbenson@redhat.com>
617
618 * configure.ac (AC_CHECK_MEMBERS): Add checks for
619 struct stat.st_blocks and struct stat.st_blksize.
620 * configure: Regenerate.
621 * config.in: Likewise.
622 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
623 (OBS): Add common-remote-fileio.o.
624 (common-remote-fileio.o): New rule.
625
9a9df970
PA
6262015-03-09 Pedro Alves <palves@redhat.com>
627
628 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
629 'struct sockaddr' pointer in 'accept' call.
630
9eb1356e
PA
6312015-03-09 Pedro Alves <palves@redhat.com>
632
633 Revert:
634 2015-03-07 Pedro Alves <palves@redhat.com>
635 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
636 or <winsock2.h> here. Instead include "gdb_socket.h".
637 (remote_open): Use union gdb_sockaddr_u.
638 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
639 or <winsock2.h> here. Instead include "gdb_socket.h".
640 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
641 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
642 or <sys/un.h>.
643 (init_named_socket, gdb_agent_helper_thread): Use union
644 gdb_sockaddr_u.
645
aac331e4
PA
6462015-03-07 Pedro Alves <palves@redhat.com>
647
648 * configure.ac (build_warnings): Move
649 -Wdeclaration-after-statement to the C-specific set.
650 * configure: Regenerate.
651
366c75fc
PA
6522015-03-07 Pedro Alves <palves@redhat.com>
653
654 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
655 or <winsock2.h> here. Instead include "gdb_socket.h".
656 (remote_open): Use union gdb_sockaddr_u.
657 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
658 or <winsock2.h> here. Instead include "gdb_socket.h".
659 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
660 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
661 or <sys/un.h>.
662 (init_named_socket, gdb_agent_helper_thread): Use union
663 gdb_sockaddr_u.
664
492d29ea
PA
6652015-03-07 Pedro Alves <palves@redhat.com>
666
667 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
668 instead.
669
60a191ed
YQ
6702015-03-06 Yao Qi <yao.qi@linaro.org>
671
672 * linux-aarch64-low.c (aarch64_insert_point): Use
673 show_debug_regs as a boolean.
674 (aarch64_remove_point): Likewise.
675
f5771b1d
PA
6762015-03-05 Pedro Alves <palves@redhat.com>
677
678 * lynx-low.c (lynx_target_ops): Install NULL hooks for
679 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
680 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
681 * nto-low.c (nto_target_ops): Likewise.
682 * spu-low.c (spu_target_ops): Likewise.
683 * win32-low.c (win32_target_ops): Likewise.
684
3e572f71
PA
6852015-03-04 Pedro Alves <palves@redhat.com>
686
72f4393d 687 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
688 Decide whether a breakpoint triggered based on the SIGTRAP's
689 siginfo.si_code.
72f4393d
L
690 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
691 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
692 (linux_low_filter_event): Check for breakpoints before checking
693 watchpoints.
694 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
695 siginfo.si_code.
72f4393d
L
696 (linux_stopped_by_sw_breakpoint)
697 (linux_supports_stopped_by_sw_breakpoint)
698 (linux_stopped_by_hw_breakpoint)
699 (linux_supports_stopped_by_hw_breakpoint): New functions.
700 (linux_target_ops): Install new target methods.
3e572f71 701
1ec68e26
PA
7022015-03-04 Pedro Alves <palves@redhat.com>
703
704 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
705 * server.c (swbreak_feature, hwbreak_feature): New globals.
706 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
707 (captured_main): Clear swbreak_feature and hwbreak_feature.
708 * server.h (swbreak_feature, hwbreak_feature): Declare.
709 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
710 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
711 supports_stopped_by_hw_breakpoint>: New fields.
712 (target_supports_stopped_by_sw_breakpoint)
713 (target_stopped_by_sw_breakpoint)
714 (target_supports_stopped_by_hw_breakpoint)
715 (target_stopped_by_hw_breakpoint): Declare.
716
15c66dd6
PA
7172015-03-04 Pedro Alves <palves@redhat.com>
718
719 enum lwp_stop_reason -> enum target_stop_reason
720 * linux-low.c (check_stopped_by_breakpoint): Adjust.
721 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
722 (linux_wait_1, stuck_in_jump_pad_callback)
723 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
724 (linux_stopped_by_watchpoint):
725 * linux-low.h (enum lwp_stop_reason): Delete.
726 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
727 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
728
98fc70d6
YQ
7292015-03-04 Yao Qi <yao.qi@linaro.org>
730
731 * Makefile.in (SFILES): Add linux-aarch64-low.c.
732
dd2ac174
GB
7332015-03-03 Gary Benson <gbenson@redhat.com>
734
735 * hostio.c (handle_vFile): Fix prefix lengths.
736
d68e53f4
MM
7372015-03-03 Markus Metzger <markus.t.metzger@intel.com>
738
739 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
740 ptr_bits.
741
bf2d68ab
AA
7422015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
743
744 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
745 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
746 (clean): Add "rm -f" for above C files.
747 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
748 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
749 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
750 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
751 * linux-s390-low.c (HWCAP_S390_VX): New macro.
752 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
753 (init_registers_s390x_vx_linux64)
754 (init_registers_s390x_tevx_linux64)
755 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
756 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
757 declarations.
758 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
759 (s390_store_vxrs_high): New functions.
760 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
761 NT_S390_VXRS_HIGH.
762 (s390_arch_setup): Add logic for selecting one of the new target
763 descriptions. Activate the new vector regsets if applicable.
764 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
765 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
766 and init_registers_s390x_tevx_linux64.
767
c966a859
PA
7682015-03-01 Pedro Alves <palves@redhat.com>
769
770 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
771 parameter.
772
4180215b
PA
7732015-02-27 Pedro Alves <palves@redhat.com>
774
775 * linux-x86-low.c (u_debugreg_offset): New function.
776 (x86_linux_dr_get, x86_linux_dr_set): Use it.
777
749bab01
PA
7782015-02-27 Pedro Alves <palves@redhat.com>
779
780 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
781 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
782 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
783 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
784 (ps_lsetfpregs, ps_getpid)
785 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
786 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
787 (ps_lsetxregs, ps_plog): Declare.
788
3c14e5a3
PA
7892015-02-27 Pedro Alves <palves@redhat.com>
790
791 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
792 IP_AGENT_EXPORT_FUNC.
793 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
794 IP_AGENT_EXPORT_FUNC.
795 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
796 (IP_AGENT_EXPORT): Delete.
797 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
798 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
799 (gdb_trampoline_buffer_error, collecting, gdb_collect)
800 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
801 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
802 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
803 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
804 (traceframe_read_count, traceframe_write_count)
805 (traceframes_created, trace_state_variables, get_raw_reg)
806 (get_trace_state_variable_value, set_trace_state_variable_value)
807 (ust_loaded, helper_thread_id, cmd_buf): Use
808 IPA_SYM_EXPORTED_NAME.
809 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
810 (tracepoints) Use IP_AGENT_EXPORT_VAR.
811 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
812 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
813 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
814 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
815 EXTERN_C_PUSH/EXTERN_C_POP.
816 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
817 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
818 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
819 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
820 (traceframe_write_count, traceframe_read_count)
821 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
822 (about_to_request_buffer_space, get_trace_state_variable_value)
823 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
824 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
825 EXTERN_C_PUSH/EXTERN_C_POP.
826 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
827 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
828 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
829 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
830 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
831 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
832 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
833 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
834 Define.
835 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
836 (IP_AGENT_EXPORT_VAR_DECL): Define.
837 (tracing): Declare.
838 (gdb_agent_get_raw_reg): Declare.
839
fe978cb0
PA
8402015-02-27 Tom Tromey <tromey@redhat.com>
841 Pedro Alves <palves@redhat.com>
842
843 Rename symbols whose names are reserved C++ keywords throughout.
844
3bc3d82a
PA
8452015-02-27 Pedro Alves <palves@redhat.com>
846
847 * Makefile.in (COMPILER): New, get it from autoconf.
848 (CXX): Get from autoconf instead.
849 (COMPILE.pre): Use COMPILER.
850 (CC-LD): Rename to ...
851 (CC_LD): ... this. Use COMPILER.
852 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
853 (CXX_FOR_TARGET): Default to g++ instead of gcc.
854 * acinclude.m4: Include build-with-cxx.m4.
855 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
856 Disable -Werror by default if building in C++ mode.
857 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
858 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
859 the C++ compiler. Save/restore CXXFLAGS too.
860 * configure: Regenerate.
861
07697489
PA
8622015-02-27 Pedro Alves <palves@redhat.com>
863
864 * acinclude.m4: Include libiberty.m4.
865 * configure.ac: Call libiberty_INIT.
866 * config.in, configure: Regenerate.
867
9beb7c4e
PA
8682015-02-26 Pedro Alves <palves@redhat.com>
869
870 * linux-low.c (linux_wait_1): When incrementing the PC past a
871 program breakpoint always use the_low_target.breakpoint_len as
872 increment, rather than the maximum between that and
873 the_low_target.decr_pc_after_break.
874
8090aef2
PA
8752015-02-23 Pedro Alves <palves@redhat.com>
876
877 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
878 thread was doing a step-over; always adjust the PC if
879 we stepped over a permanent breakpoint.
880 (linux_wait_1): If we stepped over breakpoint that was on top of a
881 permanent breakpoint, manually advance the PC past it.
882
bc9540e8
PA
8832015-02-23 Pedro Alves <palves@redhat.com>
884
885 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
886 modes.
887 (x86_fill_gregset, x86_store_gregset): Use it when handling
888 $orig_eax.
889
2db9a427
PA
8902015-02-20 Pedro Alves <palves@redhat.com>
891
892 * thread-db.c: Include "nat/linux-procfs.h".
893 (thread_db_init): Skip listing new threads if the kernel supports
894 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
895
afa8d396
PA
8962015-02-20 Pedro Alves <palves@redhat.com>
897
898 * linux-low.c (status_pending_p_callback): Use ptid_match.
899
c9587f88
AT
9002015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
901
902 PR breakpoints/16812
903 * linux-low.c (wstatus_maybe_breakpoint): Remove.
904 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
905 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
906
b05ec7a5
AT
9072015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
908
909 PR breakpoints/15956
910 * tracepoint.c (cmd_qtinit): Add check for current_thread.
911
d33501a5
MM
9122015-02-09 Markus Metzger <markus.t.metzger@intel.com>
913
914 * linux-low.c (linux_low_btrace_conf): Print size.
915 * server.c (handle_btrace_conf_general_set): New.
916 (hanle_general_set): Call handle_btrace_conf_general_set.
917 (handle_query): Report Qbtrace-conf:bts:size as supported.
918
f4abbc16
MM
9192015-02-09 Markus Metzger <markus.t.metzger@intel.com>
920
921 * linux-low.c (linux_low_enable_btrace): Update parameters.
922 (linux_low_btrace_conf): New.
923 (linux_target_ops)<to_btrace_conf>: Initialize.
924 * server.c (current_btrace_conf): New.
925 (handle_btrace_enable): Rename to ...
926 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
927 to target_enable_btrace. Update comment. Update users.
928 (handle_qxfer_btrace_conf): New.
929 (qxfer_packets): Add btrace-conf entry.
930 (handle_query): Report qXfer:btrace-conf:read as supported packet.
931 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
932 (target_ops)<read_btrace_conf>: New.
933 (target_enable_btrace): Update parameters.
934 (target_read_btrace_conf): New.
935
043c3577
MM
9362015-02-09 Markus Metzger <markus.t.metzger@intel.com>
937
938 * server.c (handle_btrace_general_set): Remove call to
939 target_supports_btrace.
940 (supported_btrace_packets): New.
941 (handle_query): Call supported_btrace_packets.
942 * target.h: include btrace-common.h.
943 (btrace_target_info): Removed.
944 (supports_btrace, target_supports_btrace): Update parameters.
945
734b0e4b
MM
9462015-02-09 Markus Metzger <markus.t.metzger@intel.com>
947
948 * Makefile.in (SFILES): Add common/btrace-common.c.
949 (OBS): Add common/btrace-common.o.
950 (btrace-common.o): Add build rules.
951 * linux-low: Include btrace-common.h.
952 (linux_low_read_btrace): Use struct btrace_data. Call
953 btrace_data_init and btrace_data_fini.
954
d6c146e9
PA
9552015-02-06 Pedro Alves <palves@redhat.com>
956
957 * thread-db.c (find_new_threads_callback): Add debug output.
958
20ba1ce6
PA
9592015-02-04 Pedro Alves <palves@redhat.com>
960
961 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
962 (resume_stopped_resumed_lwps): New function.
963 (linux_wait_for_event_filtered): Use it.
964
8cc73a39
SDJ
9652015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
966
967 * Makefile.in (SFILES): Add linux-personality.c.
968 (linux-personality.o): New rule.
969 * configure.srv (srv_linux_obj): Add linux-personality.o to the
970 list of objects to be built.
971 * linux-low.c: Include nat/linux-personality.h.
972 (linux_create_inferior): Remove code to disable address space
973 randomization (moved to ../nat/linux-personality.c). Create
974 cleanup to disable address space randomization.
975
fb23d554
SDJ
9762015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
977
978 * Makefile.in (posix-strerror.o): New rule.
979 (mingw-strerror.o): Likewise.
980 * configure: Regenerated.
981 * configure.ac: Source file ../common/common.host. Initialize new
982 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
983
cdf43629
YQ
9842015-01-14 Yao Qi <yao@codesourcery.com>
985
986 * Makefile.in (SFILES): Add nat/ppc-linux.c.
987 (ppc-linux.o): New rule.
988 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
989 * configure.ac: AC_CHECK_FUNCS(getauxval).
990 * config.in: Re-generated.
991 * configure: Re-generated.
992 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
993 ppc64_64bit_inferior_p
994
514c5338
YQ
9952015-01-14 Yao Qi <yao@codesourcery.com>
996
997 * linux-ppc-low.c: Include "nat/ppc-linux.h".
998 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
999 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1000 (PT_ORIG_R3, PT_TRAP): Likewise.
1001 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1002 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1003 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1004
3368c1e5
JB
10052015-01-10 Joel Brobecker <brobecker@adacore.com>
1006
1007 * i387-fp.c (i387_cache_to_xsave): In look over
1008 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1009 zmmh_low_space field by use of zmmh_high_space.
1010
582511be
PA
10112015-01-09 Pedro Alves <palves@redhat.com>
1012
1013 * linux-low.c (step_over_bkpt): Move higher up in the file.
1014 (handle_extended_wait): Don't store the stop_pc here.
1015 (get_stop_pc): Adjust comments and rename to ...
1016 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1017 stopped for a software breakpoint or hardware breakpoint.
1018 (thread_still_has_status_pending_p): New function.
1019 (status_pending_p_callback): Use
1020 thread_still_has_status_pending_p. If the event is no longer
1021 interesting, resume the LWP.
1022 (handle_tracepoints): Add assert.
1023 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1024 (wstatus_maybe_breakpoint): New function.
1025 (cancel_breakpoint): Delete function.
1026 (check_stopped_by_watchpoint): New function, factored out from
1027 linux_low_filter_event.
1028 (lp_status_maybe_breakpoint): Delete function.
1029 (linux_low_filter_event): Remove filter_ptid argument.
1030 Leave thread group exits pending here. Store the LWP's stop PC.
1031 Always leave events pending.
1032 (linux_wait_for_event_filtered): Pull all events out of the
1033 kernel, and leave them all pending.
1034 (count_events_callback, select_event_lwp_callback): Consider all
1035 events.
1036 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1037 (select_event_lwp): Only give preference to the stepping LWP in
1038 all-stop mode. Adjust comments.
1039 (ignore_event): New function.
1040 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1041 references to cancel_breakpoints. Adjust to renames. Also give
1042 equal priority to all LWPs that have had events in non-stop mode.
1043 If reporting a software breakpoint event, unadjust the LWP's PC.
1044 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1045 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1046 Adjust.
1047 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1048 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1049 (linux_stopped_by_watchpoint): Adjust.
1050 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1051 * linux-low.h (enum lwp_stop_reason): New.
1052 (struct lwp_info) <stop_pc>: Adjust comment.
1053 <stopped_by_watchpoint>: Delete field.
1054 <stop_reason>: New field.
1055 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1056 * mem-break.c (software_breakpoint_inserted_here)
1057 (hardware_breakpoint_inserted_here): New function.
1058 * mem-break.h (software_breakpoint_inserted_here)
1059 (hardware_breakpoint_inserted_here): Declare.
1060 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1061 (cancel_breakpoints): Delete.
1062 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1063 (upload_fast_traceframes): Remove references to
1064 cancel_breakpoints.
1065
a33e3959
PA
10662015-01-09 Pedro Alves <palves@redhat.com>
1067
1068 * thread-db.c (find_new_threads_callback): Ignore thread if the
1069 kernel thread ID is -1.
1070
8784d563
PA
10712015-01-09 Pedro Alves <palves@redhat.com>
1072
1073 * linux-low.c (linux_attach_fail_reason_string): Move to
1074 nat/linux-ptrace.c, and rename.
1075 (linux_attach_lwp): Update comment.
1076 (attach_proc_task_lwp_callback): New function.
1077 (linux_attach): Adjust to rename and use
1078 linux_proc_attach_tgid_threads.
1079 (linux_attach_fail_reason_string): Delete declaration.
1080
76f2b779
JB
10812015-01-01 Joel Brobecker <brobecker@adacore.com>
1082
1083 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1084 * server.c (gdbserver_version): Likewise.
1085
fafcc06a
SDJ
10862014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1087
1088 * remote-utils.c: Include ctype.h.
1089 (input_interrupt): Explicitly handle the case when the char
1090 received is the NUL byte. Improve the printing of non-ASCII
1091 characters.
1092
beed38b8
JB
10932014-12-16 Joel Brobecker <brobecker@adacore.com>
1094
1095 * linux-low.c (linux_low_filter_event): Update call to
1096 linux_enable_event_reporting following the addition of
1097 a new parameter to that function.
1098
bf330350
CU
10992014-12-16 Catalin Udma <catalin.udma@freescale.com>
1100
1101 PR server/17457
1102 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1103 (AARCH64_FPCR_REGNO): Likewise.
1104 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1105 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1106 (aarch64_store_fpregset): Likewise.
1107
5227d625
JB
11082014-12-15 Joel Brobecker <brobecker@adacore.com>
1109
1110 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1111 Remove FIXME comment about assumption about N.
1112
f93b65a0
JB
11132014-12-13 Joel Brobecker <brobecker@adacore.com>
1114
1115 * configure.ac: If large-file support is disabled in GDBserver,
1116 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1117 * configure: Regenerate.
1118
e5a9158d
AA
11192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1120
1121 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1122 warning upon ENODATA from ptrace.
1123 * linux-s390-low.c (s390_store_tdb): New.
1124 (s390_regsets): Add regset for NT_S390_TDB.
1125
feea5f36
AA
11262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1127
1128 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1129 without a fill_function.
1130 * linux-s390-low.c (s390_fill_last_break): Remove.
1131 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1132 (s390_arch_setup): Use regset's size instead of fill_function for
1133 loop end condition.
1134
098dbe61
AA
11352014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1136
1137 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1138 the regset's store function when ptrace returned an error.
1139 * regcache.c (get_thread_regcache): Invalidate register cache
1140 before fetching inferior's registers.
1141
28eef672
AA
11422014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1143
1144 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1145 while-loop as for-loop.
1146 (regsets_store_inferior_registers): Likewise.
1147
bdca27a2
YQ
11482014-11-28 Yao Qi <yao@codesourcery.com>
1149
1150 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1151 * config.in, configure: Re-generate.
1152 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1153 is defined.
1154
9c232dda
YQ
11552014-11-21 Yao Qi <yao@codesourcery.com>
1156
1157 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1158 (AC_CHECK_HEADERS): Remove malloc.h.
1159 * configure: Re-generated.
1160 * config.in: Re-generated.
1161 * server.h: Don't include alloca.h and malloc.h.
1162 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1163 Don't include malloc.h.
1164
43968415
JB
11652014-11-17 Joel Brobecker <brobecker@adacore.com>
1166
1167 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1168 corresponding ERRNO check in same block.
1169
40e91bc7
PA
11702014-11-12 Pedro Alves <palves@redhat.com>
1171
1172 * server.c (cont_thread): Update comment.
1173 (start_inferior, attach_inferior): No longer clear cont_thread.
1174 (handle_v_cont): No longer set cont_thread.
1175 (captured_main): Clear cont_thread each time a GDB connects.
1176
c2c118cf
PA
11772014-11-12 Pedro Alves <palves@redhat.com>
1178
1179 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1180 thread, and don't resume all threads if the Hc thread has exited.
1181
78708b7c
PA
11822014-11-12 Pedro Alves <palves@redhat.com>
1183
1184 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1185 the process group instead of to a specific LWP.
1186
a2abc7de
PA
11872014-10-15 Pedro Alves <palves@redhat.com>
1188
1189 PR server/17487
1190 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1191 parameter.
1192 (arm_set_thread_context): Delete.
1193 (the_low_target): Adjust.
1194 * win32-i386-low.c (debug_registers_changed)
1195 (debug_registers_used): Delete.
1196 (update_debug_registers_callback): New function.
1197 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1198 needing to update their debug registers.
1199 (win32_get_current_dr): New function.
1200 (x86_dr_low_get_addr, x86_dr_low_get_control)
1201 (x86_dr_low_get_status): Fetch the debug register from the thread
1202 record's context.
1203 (i386_initial_stuff): Adjust.
1204 (i386_get_thread_context): Remove current_event parameter. Don't
1205 clear debug_registers_changed nor copy DR values to
1206 debug_reg_state.
1207 (i386_set_thread_context): Delete.
1208 (i386_prepare_to_resume): New function.
1209 (i386_thread_added): Mark the thread as needing to update irs
1210 debug registers.
1211 (the_low_target): Remove i386_set_thread_context and install
1212 i386_prepare_to_resume.
1213 * win32-low.c (win32_get_thread_context): Adjust.
1214 (win32_set_thread_context): Use SetThreadContext
1215 directly.
1216 (win32_prepare_to_resume): New function.
1217 (win32_require_context): New function, factored out from ...
1218 (thread_rec): ... this.
1219 (continue_one_thread): Call win32_prepare_to_resume on each thread
1220 we're about to continue.
1221 (win32_resume): Call win32_prepare_to_resume on the event thread.
1222 * win32-low.h (struct win32_thread_info)
1223 <debug_registers_changed>: New field.
1224 (struct win32_target_ops): Change prototype of set_thread_context,
1225 delete set_thread_context and add prepare_to_resume.
1226 (win32_require_context): New declaration.
1227
a442d071
GB
12282014-10-08 Gary Benson <gbenson@redhat.com>
1229
1230 * server.h: Do not include common-exceptions.h.
1231
6f1947e8
GB
12322014-10-08 Gary Benson <gbenson@redhat.com>
1233
1234 * server.h: Do not include cleanups.h.
1235
63b434a4
JH
12362014-09-30 James Hogan <james.hogan@imgtec.com>
1237
1238 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1239 mips64-dsp-linux.c.
1240
c4d9ceb6
YQ
12412014-09-23 Yao Qi <yao@codesourcery.com>
1242
1243 * linux-low.c (lp_status_maybe_breakpoint): New function.
1244 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1245 (count_events_callback): Likewise.
1246 (select_event_lwp_callback): Likewise.
1247 (cancel_breakpoints_callback): Likewise.
1248
89a5711c
DB
12492014-09-19 Don Breazeal <donb@codesourcery.com>
1250
1251 * linux-low.c (handle_extended_wait): Call
1252 linux_ptrace_get_extended_event.
1253 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1254 linux_is_extended_waitstatus.
1255
bffc0964
JB
12562014-09-16 Joel Brobecker <brobecker@adacore.com>
1257
1258 * Makefile.in (CPPFLAGS): Define.
1259 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1260 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1261
0bfdf32f
GB
12622014-09-16 Gary Benson <gbenson@redhat.com>
1263
1264 * inferiors.h (current_inferior): Renamed as...
1265 (current_thread): New variable. All uses updated.
1266 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1267 (maybe_move_out_of_jump_pad): Likewise.
1268 (cancel_breakpoint): Likewise.
1269 (linux_low_filter_event): Likewise.
1270 (wait_for_sigstop): Likewise.
1271 (linux_resume_one_lwp): Likewise.
1272 (need_step_over_p): Likewise.
1273 (start_step_over): Likewise.
1274 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1275 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1276 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1277 and save_inferior as saved_thread.
1278 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1279 saved_thread.
1280 (regcache_invalidate_thread): Likewise.
1281 * remote-utils.c (prepare_resume_reply): Likewise.
1282 * thread-db.c (thread_db_get_tls_address): Likewise.
1283 (disable_thread_event_reporting): Likewise.
1284 (remove_thread_event_breakpoints): Likewise.
1285 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1286 as saved_thread.
1287 * target.h (set_desired_inferior): Renamed as...
1288 (set_desired_thread): New declaration. All uses updated.
1289 * server.c (myresume): Updated comment to reference thread instead
1290 of inferior.
1291 (handle_serial_event): Likewise.
1292 (handle_target_event): Likewise.
1293
361c8ade
GB
12942014-09-12 Tom Tromey <tromey@redhat.com>
1295 Gary Benson <gbenson@redhat.com>
1296
1297 * regcache.h: Include common-regcache.h.
1298 (regcache_read_pc): Don't declare.
1299 * regcache.c (get_thread_regcache_for_ptid): New function.
1300
bd9269f7
GB
13012014-09-11 Tom Tromey <tromey@redhat.com>
1302 Gary Benson <gbenson@redhat.com>
1303
1304 * symbol.c: New file.
1305 * Makefile.in (SFILES): Add symbol.c.
1306 (OBS): Add symbol.o.
1307
f8c1d06b
GB
13082014-09-11 Gary Benson <gbenson@redhat.com>
1309
1310 * target.c (target_stop_ptid, target_continue_ptid): New
1311 functions.
1312
721ec300
GB
13132014-09-11 Tom Tromey <tromey@redhat.com>
1314 Gary Benson <gbenson@redhat.com>
1315
1316 * target.h: Include target/target.h.
1317 * target.c (target_read_memory, target_read_uint32)
1318 (target_write_memory): New functions.
1319
c5e92cca
GB
13202014-09-11 Gary Benson <gbenson@redhat.com>
1321
1322 * server.h (debug_hw_points): Don't declare.
1323 * server.c (debug_hw_points): Don't define. Replace all uses
1324 with show_debug_regs.
1325 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1326 all uses with show_debug_regs.
1327
2e4bb98a
EBM
13282014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1329
1330 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1331 endianness into account.
1332 (ppc_supply_ptrace_register): Likewise.
1333
ac740bc7
JH
13342014-09-03 James Hogan <james.hogan@imgtec.com>
1335
1336 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1337 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1338
97ea6506
GB
13392014-09-03 Gary Benson <gbenson@redhat.com>
1340
1341 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1342 ALL_DEBUG_ADDRESS_REGISTERS.
1343
df7e5265
GB
13442014-09-02 Gary Benson <gbenson@redhat.com>
1345
1346 * i386-low.h: Renamed as...
1347 * x86-low.h: New file. All type, function and variable name
1348 prefixes changed from "i386_" to "x86_". All references updated.
1349 * i386-low.c: Renamed as...
1350 * x86-low.c: New file. All type, function and variable name
1351 prefixes changed from "i386_" to "x86_". All references updated.
1352
ed859da7
GB
13532014-09-02 Gary Benson <gbenson@redhat.com>
1354
1355 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1356 (x86_linux_new_thread): Likewise.
1357
860789c7
GB
13582014-08-29 Gary Benson <gbenson@redhat.com>
1359
1360 * server.h (setjmp.h): Do not include.
1361 (toplevel): Do not declare.
1362 (common-exceptions.h): Include.
1363 (cleanups.h): Likewise.
1364 * server.c (toplevel): Do not define.
1365 (exit_code): New static global.
1366 (detach_or_kill_for_exit_cleanup): New function.
1367 (main): New function. Original main renamed to...
1368 (captured_main): New function.
1369 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1370
ff55e1b5
GB
13712014-08-29 Gary Benson <gbenson@redhat.com>
1372
1373 * Makefile.in (SFILES): Add common/common-exceptions.c.
1374 (OBS): Add common-exceptions.o.
1375 (common-exceptions.o): New rule.
1376 * utils.c (prepare_to_throw_exception): New function.
1377
e9bcb658
GB
13782014-08-29 Gary Benson <gbenson@redhat.com>
1379
1380 * config.in: Regenerate.
1381 * configure: Likewise.
1382
e3180625
GB
13832014-08-29 Gary Benson <gbenson@redhat.com>
1384
1385 * Makefile.in (SFILES): Add common/cleanups.c.
1386 (OBS): cleanups.o.
1387 (cleanups.o): New rule.
1388
e3d6ba5d
GB
13892014-08-29 Gary Benson <gbenson@redhat.com>
1390
1391 * utils.c (internal_vwarning): New function.
1392
7096e886
GB
13932014-08-28 Gary Benson <gbenson@redhat.com>
1394
1395 * utils.h (fatal): Remove declaration.
1396 * utils.c (fatal): Remove function.
1397
14ce3192
GB
13982014-08-28 Gary Benson <gbenson@redhat.com>
1399
1400 * tracepoint.c (gdb_agent_init): Replace fatal with
1401 perror_with_name.
1402 (initialize_tracepoint): Likewise.
1403
50278d59
GB
14042014-08-28 Gary Benson <gbenson@redhat.com>
1405
1406 * remote-utils.c (remote_prepare): Replace fatal with error.
1407
aa96c426
GB
14082014-08-28 Gary Benson <gbenson@redhat.com>
1409
1410 * linux-low.c (linux_async): Replace fatal with warning.
1411 Tidy up and return.
1412 (linux_start_non_stop): Return -1 if linux_async failed.
1413
f7160e97
GB
14142014-08-28 Gary Benson <gbenson@redhat.com>
1415
1416 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1417 gdb_assert.
1418 (i386_dr_low_get_addr): Remove vague comment.
1419 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1420 gdb_assert.
1421
38e08fca
GB
14222014-08-28 Gary Benson <gbenson@redhat.com>
1423
1424 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1425 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1426 internal_error.
1427 (linux_resume_one_lwp): Likewise.
1428 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1429 gdb_assert.
1430 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1431 with internal_error.
1432 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1433 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1434 (find_register_by_name): Replace fatal with internal_error.
1435 (find_regno): Likewise.
1436 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1437 * thread-db.c (thread_db_create_event): Likewise.
1438 (thread_db_load_search): Likewise.
1439 (try_thread_db_load_1): Likewise.
1440 * tracepoint.c (get_jump_space_head): Replace fatal with
1441 internal_error.
1442 (claim_trampoline_space): Likewise.
1443 (have_fast_tracepoint_trampoline_buffer): Likewise.
1444 (cmd_qtstart): Likewise.
1445 (stop_tracing): Likewise.
1446 (fast_tracepoint_collecting): Likewise.
1447 (target_malloc): Likewise.
1448 (download_tracepoint): Likewise.
1449 (download_trace_state_variables): Replace check with gdb_assert.
1450 (upload_fast_traceframes): Replace fatal with internal_error.
1451
34abf635
GB
14522014-08-19 Tom Tromey <tromey@redhat.com>
1453 Gary Benson <gbenson@redhat.com>
1454
1455 * Makefile.in (SFILES): Add common/common-debug.c.
1456 (OBS): Add common-debug.o.
1457 (common-debug.o): New rule.
1458 * debug.h (debug_printf): Don't declare.
1459 * debug.c (debug_printf): Renamed and rewritten as...
1460 (debug_vprintf): New function.
1461
f6e94d78
GB
14622014-08-19 Gary Benson <gbenson@redhat.com>
1463
1464 * utils.h: Do not include print-utils.h.
1465
9239eeab
GB
14662014-08-19 Tom Tromey <tromey@redhat.com>
1467 Gary Benson <gbenson@redhat.com>
1468
1469 * server.h: Add static assertion.
1470 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1471
ef87c8bb
GB
14722014-08-19 Tom Tromey <tromey@redhat.com>
1473 Gary Benson <gbenson@redhat.com>
1474
1475 * Makefile.in (SFILES): Add common/errors.c.
1476 (OBS): Add errors.o.
1477 (IPA_OBS): Add errors-ipa.o.
1478 (errors.o): New rule.
1479 (errors-ipa.o): Likewise.
1480 * utils.h (perror_with_name, error, warning): Don't declare.
1481 * utils.c (warning): Renamed and rewritten as...
1482 (vwarning): New function.
1483 (error): Renamed and rewritten as...
1484 (verror): New function.
1485 (internal_error): Renamed and rewritten as...
1486 (internal_verror): New function.
1487
bb974a24
GB
14882014-08-07 Gary Benson <gbenson@redhat.com>
1489
1490 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1491 * configure: Regenerate.
1492 * config.in: Likewise.
1493 * server.h: Do not include errno.h.
1494 * event-loop.c: Likewise.
1495 * hostio-errno.c: Likewise.
1496 * linux-low.c: Likewise.
1497 * remote-utils.c: Likewise.
1498 * spu-low.c: Likewise.
1499 * utils.c: Likewise.
1500 * gdbreplay.c: Unconditionally include errno.h.
1501
6d3d12eb
GB
15022014-08-07 Gary Benson <gbenson@redhat.com>
1503
1504 * server.h: Do not include string.h.
1505 * event-loop.c: Likewise.
1506 * linux-low.c: Likewise.
1507 * regcache.c: Likewise.
1508 * remote-utils.c: Likewise.
1509 * spu-low.c: Likewise.
1510 * utils.c: Likewise.
1511
dccbb609
GB
15122014-08-07 Gary Benson <gbenson@redhat.com>
1513
1514 * server.h: Do not include gdb_assert.h.
1515
e76df0d0
GB
15162014-08-07 Gary Benson <gbenson@redhat.com>
1517
1518 * server.h: Do not include common-utils.h.
1519
4cb9c816
GB
15202014-08-07 Gary Benson <gbenson@redhat.com>
1521
1522 * server.h: Do not include ptid.h.
1523 * notif.h: Likewise.
1524
3995eeee
GB
15252014-08-07 Gary Benson <gbenson@redhat.com>
1526
1527 * server.h: Do not include gdb_locale.h.
1528
cb9f1a9b
GB
15292014-08-07 Gary Benson <gbenson@redhat.com>
1530
1531 * server.h: Do not include gdb/signals.h.
1532 * win32-low.c: Likewise.
1533
a5fceff8
GB
15342014-08-07 Gary Benson <gbenson@redhat.com>
1535
1536 * server.h: Do not include pathmax.h.
1537
b9391142
GB
15382014-08-07 Gary Benson <gbenson@redhat.com>
1539
1540 * server.h: Do not include libiberty.h.
1541 * linux-bfin-low.c: Likewise.
1542
0e443c87
GB
15432014-08-07 Gary Benson <gbenson@redhat.com>
1544
1545 * server.h: Do not include ansidecl.h.
1546
8ebb3f56
GB
15472014-08-07 Gary Benson <gbenson@redhat.com>
1548
1549 * linux-x86-low.c: Do not include stddef.h.
1550 * lynx-ppc-low.c: Likewise.
1551 * tracepoint.c: Likewise.
1552
8980bdf6
GB
15532014-08-07 Gary Benson <gbenson@redhat.com>
1554
1555 * server.h: Do not include stdarg.h.
1556 * nto-low.c: Likewise.
1557
d7096f71
GB
15582014-08-07 Gary Benson <gbenson@redhat.com>
1559
1560 * server.h: Do not include stdlib.h.
1561 * inferiors.c: Likewise.
1562 * linux-low.c: Likewise.
1563 * regcache.c: Likewise.
1564 * spu-low.c: Likewise.
1565 * tracepoint.c: Likewise.
1566 * utils.c: Likewise.
1567
d02f550d
GB
15682014-08-07 Gary Benson <gbenson@redhat.com>
1569
1570 * server.h: Do not include stdio.h.
1571 * linux-low.c: Likewise.
1572 * remote-utils.c: Likewise.
1573 * spu-low.c: Likewise.
1574 * utils.c: Likewise.
1575 * wincecompat.c: Likewise.
1576
87f6c4e3
GB
15772014-08-06 Gary Benson <gbenson@redhat.com>
1578
1579 * regcache.c (init_register_cache): Move conditionals inside if.
1580
7089dca4
GB
15812014-08-06 Gary Benson <gbenson@redhat.com>
1582
1583 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1584
462f517e
GB
15852014-07-31 Gary Benson <gbenson@redhat.com>
1586
1587 * ax.h: Do not include server.h.
1588 * gdbthread.h: Likewise.
1589 * lynx-low.h: Likewise.
1590 * notif.h: Likewise.
1591
976411d6
GB
15922014-07-30 Gary Benson <gbenson@redhat.com>
1593
1594 * server.h: Include common-defs.h.
1595 Do not include config.h or build-gnulib-gdbserver/config.h.
1596
d41f6d8e
GB
15972014-07-30 Gary Benson <gbenson@redhat.com>
1598
1599 * hostio-errno.c: Move server.h to top of includes list.
1600 * inferiors.c: Likewise.
1601 * linux-x86-low.c: Likewise.
1602 * notif.c: Include server.h.
1603
314c6a35
TT
16042014-07-24 Tom Tromey <tromey@redhat.com>
1605 Gary Benson <gbenson@redhat.com>
1606
1607 * server.h (CORE_ADDR): Now unsigned.
1608
69ff6be5
PA
16092014-07-16 Pedro Alves <palves@redhat.com>
1610
1611 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1612
ce9e3fe7
PA
16132014-07-15 Pedro Alves <palves@redhat.com>
1614
1615 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1616 copy.
1617
e76126e8
PA
16182014-07-11 Pedro Alves <palves@redhat.com>
1619
1620 * linux-low.c (kill_wait_lwp): New function, based on
1621 kill_one_lwp_callback, but use my_waitpid directly.
1622 (kill_one_lwp_callback, linux_kill): Use it.
1623
8e9db26e
PA
16242014-06-23 Pedro Alves <palves@redhat.com>
1625
1626 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1627 before setting DR0..DR3.
1628
698b3e08
GB
16292014-06-20 Gary Benson <gbenson@redhat.com>
1630
1631 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1632 * configure: Regenerated.
1633 * config.in: Likewise.
1634
125f8a3d
GB
16352014-06-20 Gary Benson <gbenson@redhat.com>
1636
1637 * Makefile.in (SFILES): Update locations for files moved
1638 from common to nat.
1639 (object file files): Reordered.
1640
42995dbd
GB
16412014-06-20 Gary Benson <gbenson@redhat.com>
1642
1643 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1644 (i386_dr_low_set_addr): Likewise.
1645 (i386_dr_low_get_addr): Likewise.
1646 (i386_dr_low_can_set_control): Likewise.
1647 (i386_dr_low_set_control): Likewise.
1648 (i386_dr_low_get_control): Likewise.
1649 (i386_dr_low_get_status): Likewise.
1650 (i386_get_debug_register_length): Likewise.
1651 * linux-x86-low.c (i386_dr_low_set_addr):
1652 Changed signature. Made static.
1653 (i386_dr_low_get_addr): Likewise.
1654 (i386_dr_low_set_control): Likewise.
1655 (i386_dr_low_get_control): Likewise.
1656 (i386_dr_low_get_status): Likewise.
1657 (i386_dr_low): New global variable.
1658 * win32-i386-low.c (i386_dr_low_set_addr):
1659 Changed signature. Made static.
1660 (i386_dr_low_get_addr): Likewise.
1661 (i386_dr_low_set_control): Likewise.
1662 (i386_dr_low_get_control): Likewise.
1663 (i386_dr_low_get_status): Likewise.
1664 (i386_dr_low): New global variable.
1665
e1d2394b
MS
16662014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1667
1668 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1669 * Makefile.in (AR, AR_FLAGS): Define.
1670 * configure: Regenerate.
1671
3a8ee006
GB
16722014-06-19 Gary Benson <gbenson@redhat.com>
1673
1674 * Makefile.in (i386-dregs.o): New rule.
1675 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1676 * i386-low.c (target.h): Remove include.
1677 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1678 (DR_CONTROL_SHIFT): Likewise.
1679 (DR_CONTROL_SIZE): Likewise.
1680 (DR_RW_EXECUTE): Likewise.
1681 (DR_RW_WRITE): Likewise.
1682 (DR_RW_READ): Likewise.
1683 (DR_RW_IORW): Likewise.
1684 (DR_LEN_1): Likewise.
1685 (DR_LEN_2): Likewise.
1686 (DR_LEN_4): Likewise.
1687 (DR_LEN_8): Likewise.
1688 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1689 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1690 (DR_ENABLE_SIZE): Likewise.
1691 (DR_LOCAL_SLOWDOWN): Likewise.
1692 (DR_GLOBAL_SLOWDOWN): Likewise.
1693 (DR_CONTROL_RESERVED): Likewise.
1694 (I386_DR_CONTROL_MASK): Likewise.
1695 (I386_DR_VACANT): Likewise.
1696 (I386_DR_LOCAL_ENABLE): Likewise.
1697 (I386_DR_GLOBAL_ENABLE): Likewise.
1698 (I386_DR_DISABLE): Likewise.
1699 (I386_DR_SET_RW_LEN): Likewise.
1700 (I386_DR_GET_RW_LEN): Likewise.
1701 (I386_DR_WATCH_HIT): Likewise.
1702 (i386_wp_op_t): Likewise.
1703 (i386_show_dr): Likewise.
1704 (i386_length_and_rw_bits): Likewise.
1705 (i386_insert_aligned_watchpoint): Likewise.
1706 (i386_remove_aligned_watchpoint): Likewise.
1707 (i386_handle_nonaligned_watchpoint): Likewise.
1708 i386_update_inferior_debug_regs(): Likewise.
1709 (i386_dr_insert_watchpoint): Likewise.
1710 (i386_dr_remove_watchpoint): Likewise.
1711 (i386_dr_region_ok_for_watchpoint): Likewise.
1712 (i386_dr_stopped_data_address): Likewise.
1713 (i386_dr_stopped_by_watchpoint): Likewise.
1714
8f26655c
GB
17152014-06-19 Gary Benson <gbenson@redhat.com>
1716
1717 * i386-low.c (i386_dr_show): Renamed to
1718 i386_show_dr and made static. All uses updated.
1719 (i386_dr_length_and_rw_bits): Renamed to
1720 i386_length_and_rw_bits and made static.
1721 All uses updated.
1722 (i386_dr_insert_aligned_watchpoint): Renamed to
1723 i386_insert_aligned_watchpoint and made static.
1724 All uses updated.
1725 (i386_dr_remove_aligned_watchpoint): Renamed to
1726 i386_remove_aligned_watchpoint and made static.
1727 All uses updated.
1728 (i386_dr_update_inferior_debug_regs): Renamed to
1729 i386_update_inferior_debug_regs and made static.
1730 All uses updated.
1731
b9228891
GB
17322014-06-18 Gary Benson <gbenson@redhat.com>
1733
5171def3
GB
1734 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1735 (i386_dr_low_can_set_control): Likewise.
1736 (i386_get_debug_register_length): Likewise.
1737 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1738 (i386_dr_low_can_set_control): Likewise.
1739 (i386_get_debug_register_length): Likewise.
1740
17412014-06-17 Gary Benson <gbenson@redhat.com>
1742
b9228891
GB
1743 * i386-low.h (i386-dregs.h): New include.
1744 (DR_FIRSTADDR): Now in i386-dregs.h.
1745 (DR_LASTADDR): Likewise.
1746 (DR_NADDR): Likewise.
1747 (DR_STATUS): Likewise.
1748 (DR_CONTROL): Likewise.
1749 (i386_debug_reg_state): Likewise.
1750 (i386_dr_insert_watchpoint): Likewise.
1751 (i386_dr_remove_watchpoint): Likewise.
1752 (i386_dr_region_ok_for_watchpoint): Likewise.
1753 (i386_dr_stopped_data_address): Likewise.
1754 (i386_dr_stopped_by_watchpoint): Likewise.
1755 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1756
4be83cc2
GB
17572014-06-18 Gary Benson <gbenson@redhat.com>
1758
1759 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1760 i386_dr_insert_watchpoint.
1761 (i386_low_remove_watchpoint): Renamed to
1762 i386_dr_remove_watchpoint.
1763 (i386_low_region_ok_for_watchpoint): Renamed to
1764 i386_dr_region_ok_for_watchpoint.
1765 (i386_low_stopped_data_address): Renamed to
1766 i386_dr_stopped_data_address.
1767 (i386_low_stopped_by_watchpoint): Renamed to
1768 i386_dr_stopped_by_watchpoint.
1769 * i386-low.c (i386_show_dr): Renamed to
1770 i386_dr_show and made nonstatic. All uses updated.
1771 (i386_length_and_rw_bits): Renamed to
1772 i386_dr_length_and_rw_bits and made nonstatic.
1773 All uses updated.
1774 (i386_insert_aligned_watchpoint): Renamed to
1775 i386_dr_insert_aligned_watchpoint and made nonstatic.
1776 All uses updated.
1777 (i386_remove_aligned_watchpoint): Renamed to
1778 i386_dr_remove_aligned_watchpoint and made nonstatic.
1779 All uses updated.
1780 (i386_update_inferior_debug_regs): Renamed to
1781 i386_dr_update_inferior_debug_regs and made nonstatic.
1782 All uses updated.
1783 (i386_low_insert_watchpoint): Renamed to
1784 i386_dr_insert_watchpoint. All uses updated.
1785 (i386_low_remove_watchpoint): Renamed to
1786 i386_dr_remove_watchpoint. All uses updated.
1787 (i386_low_region_ok_for_watchpoint): Renamed to
1788 i386_dr_region_ok_for_watchpoint. All uses updated.
1789 (i386_low_stopped_data_address): Renamed to
1790 i386_dr_stopped_data_address. All uses updated.
1791 (i386_low_stopped_by_watchpoint): Renamed to
1792 i386_dr_stopped_by_watchpoint. All uses updated.
1793
131aa0d4
GB
17942014-06-18 Gary Benson <gbenson@redhat.com>
1795
1796 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1797 (i386_dr_low_can_set_control): Likewise.
1798 (i386_insert_aligned_watchpoint): New check.
1799
d9305f7f
GB
18002014-06-18 Gary Benson <gbenson@redhat.com>
1801
1802 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1803 Renamed to state.
1804
e927c9fc
GB
18052014-06-18 Gary Benson <gbenson@redhat.com>
1806
1807 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1808 instead of fatal and error.
1809 (i386_handle_nonaligned_watchpoint): Likewise.
1810
1b6d4134
GB
18112014-06-18 Gary Benson <gbenson@redhat.com>
1812
1813 * i386-low.c (i386_get_debug_register_length): New macro.
1814 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1815 (i386_show_dr): Use debug_printf instead of fprintf. Use
1816 phex to format values.
1817
6e62758f
GB
18182014-06-18 Gary Benson <gbenson@redhat.com>
1819
1820 * i386-low.h: Comment changes.
1821 * i386-low.c: Likewise.
1822
fc6e2f03
GB
18232014-06-18 Gary Benson <gbenson@redhat.com>
1824
1825 * i386-low.c: Whitespace changes.
1826
f9d1eeed
TT
18272014-06-12 Tom Tromey <tromey@redhat.com>
1828
1829 * utils.c (freeargv): Remove.
1830
0b04e523
TT
18312014-06-12 Tom Tromey <tromey@redhat.com>
1832
1833 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1834 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1835 (parse_debug_format_options): Likewise.
1836 (gdbserver_usage): Likewise.
1837 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1838 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1839 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1840 against libiberty.
1841 ($(LIBGNU)): Depend on libiberty.
1842 (all-lib): Recurse into all subdirs.
1843 (install-only): Invoke "install" target in subdirs.
1844 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1845 targets.
1846 * configure: Rebuild.
1847 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1848 for vasprintf, vsnprintf, or gettimeofday.
1849 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1850 srv_tgtobj.
1851
270c9937
JB
18522014-06-05 Joel Brobecker <brobecker@adacore.com>
1853
1854 * development.sh: Delete.
1855 * Makefile.in (config.status): Adjust dependency on development.sh.
1856 * configure.ac: Adjust development.sh source call.
1857 * configure: Regenerate.
1858
0a261ed8
PA
18592014-06-02 Pedro Alves <palves@redhat.com>
1860
1861 * ax.c (gdb_free_agent_expr): New function.
1862 * ax.h (gdb_free_agent_expr): New declaration.
1863 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1864 list.
1865 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1866 static.
1867 (clear_breakpoint_conditions_and_commands): New function.
1868 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1869 (clear_breakpoint_conditions_and_commands): New declaration.
1870
e9dae05e
RR
18712014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1872
1873 * linux-aarch64-low.c (asm/ptrace.h): Include.
1874
5876f503
JK
18752014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1876
1877 Fix TLS access for -static -pthread.
1878 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1879 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1880 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1881
802e8e6d
PA
18822014-05-20 Pedro Alves <palves@redhat.com>
1883
1884 * linux-aarch64-low.c (aarch64_insert_point)
1885 (aarch64_remove_point): No longer check whether the type is
1886 supported here. Adjust to new interface.
1887 (the_low_target): Install aarch64_supports_z_point_type as
1888 supports_z_point_type method.
1889 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1890 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1891 instead of a Z packet char. Adjust.
1892 (arm_supports_z_point_type): New function.
1893 (arm_insert_point, arm_remove_point): Adjust to new interface.
1894 (the_low_target): Install arm_supports_z_point_type.
1895 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1896 (cris_insert_point, cris_remove_point): Adjust to new interface.
1897 Don't check whether the type is supported here.
1898 (the_low_target): Install cris_supports_z_point_type.
1899 * linux-low.c (linux_supports_z_point_type): New function.
1900 (linux_insert_point, linux_remove_point): Adjust to new interface.
1901 * linux-low.h (struct linux_target_ops) <insert_point,
1902 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1903 raw_breakpoint pointer parameter.
1904 <supports_z_point_type>: New method.
1905 * linux-mips-low.c (mips_supports_z_point_type): New function.
1906 (mips_insert_point, mips_remove_point): Adjust to new interface.
1907 Use mips_supports_z_point_type.
1908 (the_low_target): Install mips_supports_z_point_type.
1909 * linux-ppc-low.c (the_low_target): Install NULL as
1910 supports_z_point_type method.
1911 * linux-s390-low.c (the_low_target): Install NULL as
1912 supports_z_point_type method.
1913 * linux-sparc-low.c (the_low_target): Install NULL as
1914 supports_z_point_type method.
1915 * linux-x86-low.c (x86_supports_z_point_type): New function.
1916 (x86_insert_point): Adjust to new insert_point interface. Use
1917 insert_memory_breakpoint. Adjust to new
1918 i386_low_insert_watchpoint interface.
1919 (x86_remove_point): Adjust to remove_point interface. Use
1920 remove_memory_breakpoint. Adjust to new
1921 i386_low_remove_watchpoint interface.
1922 (the_low_target): Install x86_supports_z_point_type.
1923 * lynx-low.c (lynx_target_ops): Install NULL as
1924 supports_z_point_type callback.
1925 * nto-low.c (nto_supports_z_point_type): New.
1926 (nto_insert_point, nto_remove_point): Adjust to new interface.
1927 (nto_target_ops): Install nto_supports_z_point_type.
1928 * mem-break.c: Adjust intro comment.
1929 (struct raw_breakpoint) <raw_type, size>: New fields.
1930 <inserted>: Update comment.
1931 <shlib_disabled>: Delete field.
1932 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1933 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1934 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1935 (raw_bkpt_type_to_target_hw_bp_type): New function.
1936 (find_enabled_raw_code_breakpoint_at): New function.
1937 (find_raw_breakpoint_at): New type and size parameters. Use them.
1938 (insert_memory_breakpoint): New function, based off
1939 set_raw_breakpoint_at.
1940 (remove_memory_breakpoint): New function.
1941 (set_raw_breakpoint_at): Reimplement.
1942 (set_breakpoint): New, based on set_breakpoint_at.
1943 (set_breakpoint_at): Reimplement.
1944 (delete_raw_breakpoint): Go through the_target->remove_point
1945 instead of assuming memory breakpoints.
1946 (find_gdb_breakpoint_at): Delete.
1947 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1948 (find_gdb_breakpoint): New function.
1949 (set_gdb_breakpoint_at): Delete.
1950 (z_type_supported): New function.
1951 (set_gdb_breakpoint_1): New function, loosely based off
1952 set_gdb_breakpoint_at.
1953 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1954 (delete_gdb_breakpoint_at): Delete.
1955 (delete_gdb_breakpoint_1): New function, loosely based off
1956 delete_gdb_breakpoint_at.
1957 (delete_gdb_breakpoint): New function.
1958 (clear_gdb_breakpoint_conditions): Rename to ...
1959 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1960 breakpoint.
1961 (add_condition_to_breakpoint): Make static.
1962 (add_breakpoint_condition): Take a struct breakpoint pointer
1963 instead of an address. Adjust.
1964 (gdb_condition_true_at_breakpoint): Rename to ...
1965 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1966 z_type parameter.
1967 (gdb_condition_true_at_breakpoint): Reimplement.
1968 (add_breakpoint_commands): Take a struct breakpoint pointer
1969 instead of an address. Adjust.
1970 (gdb_no_commands_at_breakpoint): Rename to ...
1971 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1972 parameter. Return true if no breakpoint was found. Change debug
1973 output.
1974 (gdb_no_commands_at_breakpoint): Reimplement.
1975 (run_breakpoint_commands): Rename to ...
1976 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1977 and change return type to boolean.
1978 (run_breakpoint_commands): New function.
1979 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1980 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1981 breakpoint. Go through the_target->remove_point instead of
1982 assuming memory breakpoint.
1983 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1984 software and hardware breakpoints.
1985 (reinsert_raw_breakpoint): Go through the_target->insert_point
1986 instead of assuming memory breakpoint.
1987 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1988 software and hardware breakpoints.
1989 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1990 Check both software and hardware breakpoints.
1991 (validate_inserted_breakpoint): Assert the breakpoint is a
1992 software breakpoint. Set the inserted flag to -1 instead of
1993 setting shlib_disabled.
1994 (delete_disabled_breakpoints): Adjust.
1995 (validate_breakpoints): Only validate software breakpoints.
1996 Adjust to inserted flag change.
1997 (check_mem_read, check_mem_write): Skip breakpoint types other
1998 than software breakpoints. Adjust to inserted flag change.
1999 * mem-break.h (enum raw_bkpt_type): New enum.
2000 (raw_breakpoint, struct process_info): Forward declare.
2001 (Z_packet_to_target_hw_bp_type): Delete declaration.
2002 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2003 (set_gdb_breakpoint, delete_gdb_breakpoint)
2004 (clear_breakpoint_conditions): New declarations.
2005 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2006 (breakpoint_inserted_here): Update comment.
2007 (add_breakpoint_condition, add_breakpoint_commands): Replace
2008 address parameter with a breakpoint pointer parameter.
2009 (gdb_breakpoint_here): Update comment.
2010 (delete_gdb_breakpoint_at): Delete.
2011 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2012 * server.c (process_point_options): Take a struct breakpoint
2013 pointer instead of an address. Adjust.
2014 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2015 delete_gdb_breakpoint.
2016 * spu-low.c (spu_target_ops): Install NULL as
2017 supports_z_point_type method.
2018 * target.h: Include mem-break.h.
2019 (struct target_ops) <prepare_to_access_memory>: Update comment.
2020 <supports_z_point_type>: New field.
2021 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2022 instead of a char. Also take a raw breakpoint pointer.
2023 * win32-arm-low.c (the_low_target): Install NULL as
2024 supports_z_point_type.
2025 * win32-i386-low.c (i386_supports_z_point_type): New function.
2026 (i386_insert_point, i386_remove_point): Adjust to new interface.
2027 (the_low_target): Install i386_supports_z_point_type.
2028 * win32-low.c (win32_supports_z_point_type): New function.
2029 (win32_insert_point, win32_remove_point): Adjust to new interface.
2030 (win32_target_ops): Install win32_supports_z_point_type.
2031 * win32-low.h (struct win32_target_ops):
2032 <supports_z_point_type>: New method.
2033 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2034 instead of a char. Also take a raw breakpoint pointer.
2035
932539e3
PA
20362014-05-20 Pedro Alves <palves@redhat.com>
2037
2038 * mem-break.h: Include break-common.h.
2039 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2040 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2041 (Z_packet_to_target_hw_bp_type): New declaration.
2042 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2043 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2044 (Z_PACKET_ACCESS_WP): Delete macros.
2045 (Z_packet_to_hw_type): Delete function.
2046 * i386-low.h: Don't include break-common.h here.
2047 (Z_packet_to_hw_type): Delete declaration.
2048 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2049 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2050 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2051 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2052 * linux-aarch64-low.c: Don't include break-common.h here.
2053 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2054 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2055 (Z_packet_to_target_hw_bp_type): Delete function.
2056 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2057 function.
2058 (mips_insert_point, mips_remove_point): Use
2059 Z_packet_to_target_hw_bp_type.
2060
4ff0d3d8
PA
20612014-05-20 Pedro Alves <palves@redhat.com>
2062
2063 * linux-aarch64-low.c: Include break-common.h.
2064 (enum target_point_type): Delete.
2065 (Z_packet_to_point_type): Rename to ...
2066 (Z_packet_to_target_hw_bp_type): ... this, and return a
2067 target_hw_bp_type instead.
2068 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2069 instead of an enum target_point_type.
2070 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2071 breakpoint type.
2072 (aarch64_dr_state_insert_one_point)
2073 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2074 (aarch64_handle_aligned_watchpoint)
2075 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2076 Take an enum target_hw_bp_type instead of an enum
2077 target_point_type.
2078 (aarch64_supports_z_point_type): New function.
2079 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2080 use Z_packet_to_target_hw_bp_type.
2081
786dc519
JB
20822014-05-20 Joel Brobecker <brobecker@adacore.com>
2083
2084 * configure.ac: Only use -Werror by default when DEVELOPMENT
2085 is true.
2086 * configure: Regenerate.
2087
9e0aa64f
JK
20882014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2089
2090 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2091 * linux-x86-low.c (X86_64_USER_REGS): New.
2092 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2093
2b577b92
YQ
20942014-04-28 Yao Qi <yao@codesourcery.com>
2095
2096 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2097 name.
2098
94611da2
PA
20992014-04-25 Pedro Alves <palves@redhat.com>
2100
2101 PR server/16255
2102 * linux-low.c (linux_attach_fail_reason_string): New function.
2103 (linux_attach_lwp): Delete.
2104 (linux_attach_lwp_1): Rename to ...
2105 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2106 argument. Remove "initial" parameter. Return int instead of
2107 void. Don't error or warn here.
2108 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2109 failure to attach to the tgid. Call warning when failing to
2110 attach to an lwp.
2111 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2112 argument. Remove "initial" parameter. Return int instead of
2113 void. Don't error or warn here.
2114 (linux_attach_fail_reason_string): New declaration.
2115 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2116 interface change. Use linux_attach_fail_reason_string.
2117
01f9f808
MS
21182014-04-24 Michael Sturm <michael.sturm@mintel.com>
2119 Walfred Tedeschi <walfred.tedeschi@intel.com>
2120
2121 * Makefile.in: Added rules to handle new files
2122 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2123 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2124 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2125 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2126 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2127 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2128 x32-avx512-linux.o.
2129 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2130 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2131 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2132 i386/x32-avx512.xml.
2133 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2134 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2135 i386/x32-avx512-linux.xml.
2136 * i387-fp.c (num_avx512_k_registers): New constant for number
2137 of K registers.
2138 (num_avx512_zmmh_low_registers): New constant for number of
2139 lower ZMM registers (0-15).
2140 (num_avx512_zmmh_high_registers): New constant for number of
2141 higher ZMM registers (16-31).
2142 (num_avx512_ymmh_registers): New contant for number of higher
2143 YMM registers (ymm16-31 added by avx521 on x86_64).
2144 (num_avx512_xmm_registers): New constant for number of higher
2145 XMM registers (xmm16-31 added by AVX512 on x86_64).
2146 (struct i387_xsave): Add space for AVX512 registers.
2147 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2148 Add code to handle AVX512 registers.
2149 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2150 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2151 prototypei from generated file.
2152 (tdesc_amd64_avx512_linux): Likewise.
2153 (init_registers_x32_avx512_linux): Likewise.
2154 (tdesc_x32_avx512_linux): Likewise.
2155 (init_registers_i386_avx512_linux): Likewise.
2156 (tdesc_i386_avx512_linux): Likewise.
2157 (x86_64_regmap): Add AVX512 registers.
2158 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2159 mask.
2160 (initialize_low_arch): Add code to initialize AVX512 registers.
2161
51aa91f9
PA
21622014-04-23 Pedro Alves <palves@redhat.com>
2163
2164 * mem-break.c (find_gdb_breakpoint_at): Make static.
2165 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2166
a4165e94
PA
21672014-04-23 Pedro Alves <palves@redhat.com>
2168
2169 * i386-low.c: Don't include break-common.h here.
2170 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2171 prototype to take target_hw_bp_type as argument instead of a Z
2172 packet char.
2173 * i386-low.h: Include break-common.h here.
2174 (Z_packet_to_hw_type): Declare.
2175 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2176 prototypes.
2177 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2178 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2179 (x86_remove_point): Convert the packet number to a
2180 target_hw_bp_type before calling i386_low_remove_watchpoint.
2181 * win32-i386-low.c (i386_insert_point): Convert the packet number
2182 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2183 (i386_remove_point): Convert the packet number to a
2184 target_hw_bp_type before calling i386_low_remove_watchpoint.
2185
b8acf843
PA
21862014-04-23 Pedro Alves <palves@redhat.com>
2187
2188 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2189
d708bcd1
PA
21902014-04-10 Pedro Alves <palves@redhat.com>
2191
2192 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2193 Check if the condition or command is NULL before checking if the
2194 breakpoint is known. On success, return true.
2195 * mem-break.h (add_breakpoint_condition): Document return.
2196 (add_breakpoint_commands): Add describing comment.
2197 * server.c (skip_to_semicolon): New function.
2198 (process_point_options): Use it.
2199
2eec7d5b
PA
22002014-04-09 Pedro Alves <palves@redhat.com>
2201
2202 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2203 to lwpid_of.
2204
fa96cb38
PA
22052014-02-27 Pedro Alves <palves@redhat.com>
2206
2207 PR 12702
2208 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2209 macros.
2210 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2211 output.
2212 (last_thread_of_process_p): Take a PID argument instead of a
2213 thread pointer.
2214 (linux_wait_for_lwp): Delete.
2215 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2216 functions.
2217 (linux_low_filter_event): New function, party factored out from
2218 linux_wait_for_event.
2219 (linux_wait_for_event): Rename to ...
2220 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2221 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2222 sigsuspend. Check for zombie leaders.
2223 (linux_wait_for_event): Reimplement as wrapper around
2224 linux_wait_for_event_filtered.
2225 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2226 a normal or signal exit is seen, it's the whole process exiting.
2227 (wait_for_sigstop): No longer a for_each_inferior callback.
2228 Rewrite on top of linux_wait_for_event_filtered.
2229 (stop_all_lwps): Call wait_for_sigstop directly.
2230 * server.c (resume, handle_target_event): Handle
2231 TARGET_WAITKIND_NO_RESUMED.
2232
d763de10
JB
22332014-02-26 Joel Brobecker <brobecker@adacore.com>
2234
2235 * win32-low.c (psapi_get_dll_name,
2236 * win32_CreateToolhelp32Snapshot): Delete.
2237 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2238 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2239 Delete.
2240 (handle_load_dll): Add function description.
2241 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2242
850a0f76
JB
22432014-02-26 Joel Brobecker <brobecker@adacore.com>
2244
2245 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2246 Add comment.
2247 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2248 base address when calling win32_add_one_solib.
2249 (handle_load_dll): Delete local variable load_addr.
2250 Remove 0x1000 offset applied to DLL base address when calling
2251 win32_add_one_solib.
2252 (handle_unload_dll): Add comment.
2253
f25b3fc3
JB
22542014-02-26 Joel Brobecker <brobecker@adacore.com>
2255
2256 * win32-low.c (win32_add_all_dlls): Renames
2257 win32_ensure_ntdll_loaded. Rewrite function documentation.
2258 Adjust implementation to always load all DLLs.
2259 Add 0x1000 offset to DLL base address when calling
2260 win32_add_one_solib.
2261 (child_initialization_done): New static global.
2262 (do_initial_child_stuff): Set child_initialization_done to
2263 zero during child initialization, and 1 after. Replace call
2264 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2265 Add comment.
2266 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2267 (handle_unload_dll): Add function documentation.
2268 (get_child_debug_event): Ignore load and unload DLL events
2269 during child initialization.
2270
d86d4aaf
DE
22712014-02-20 Doug Evans <dje@google.com>
2272
3bc32da3 2273 Remove global all_lwps.
d86d4aaf
DE
2274 * inferiors.h (ptid_of): Move here from linux-low.h.
2275 (pid_of, lwpid_of): Ditto.
2276 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2277 parameter is a struct thread_info * now.
2278 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2279 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2280 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2281 directly.
2282 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2283 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2284 * linux-arm-low.c (update_registers_callback): Update, "entry"
2285 parameter is a struct thread_info * now.
2286 Fetch lwpid from current_inferior directly.
2287 (arm_insert_point): Pass &all_threads to find_inferior instead of
2288 &all_lwps.
2289 (arm_remove_point): Ditto.
2290 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2291 (arm_prepare_to_resume): Fetch pid from thread.
2292 (arm_read_description): Fetch lwpid from current_inferior directly.
2293 * linux-low.c (all_lwps): Delete.
2294 (delete_lwp): Delete call to remove_inferior.
2295 (handle_extended_wait): Fetch lwpid from thread.
2296 (add_lwp): Don't set lwp->entry.id. Remove call to
2297 add_inferior_to_list.
2298 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2299 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2300 (kill_one_lwp_callback): Ditto.
2301 (linux_kill): Don't dereference NULL pointer.
2302 Fetch ptid,lwpid from thread.
2303 (get_detach_signal): Fetch ptid from thread.
2304 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2305 Simplify call to regcache_invalidate_thread.
2306 (delete_lwp_callback): Update, "entry" parameter is a
2307 struct thread_info * now. Fetch pid from thread.
2308 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2309 (status_pending_p_callback): Update, "entry" parameter is a
2310 struct thread_info * now. Fetch ptid from thread.
2311 (find_lwp_pid): Update, "entry" parameter is a
2312 struct thread_info * now.
2313 (linux_wait_for_lwp): Fetch pid from thread.
2314 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2315 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2316 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2317 (dequeue_one_deferred_signal): Ditto.
2318 (cancel_breakpoint): Fetch ptid from current_inferior.
2319 (linux_wait_for_event): Pass &all_threads to find_inferior,
2320 not &all_lwps. Fetch ptid, lwpid from thread.
2321 (count_events_callback): Update, "entry" parameter is a
2322 struct thread_info * now.
2323 (select_singlestep_lwp_callback): Ditto.
2324 (select_event_lwp_callback): Ditto.
2325 (cancel_breakpoints_callback): Ditto.
2326 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2327 not &all_lwps.
2328 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2329 (unsuspend_one_lwp): Update, "entry" parameter is a
2330 struct thread_info * now.
2331 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2332 not &all_lwps.
2333 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2334 Fetch lwpid from thread, not lwp.
2335 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2336 Pass &all_threads to find_inferior, not &all_lwps.
2337 (send_sigstop): Fetch lwpid from thread, not lwp.
2338 (send_sigstop_callback): Update, "entry" parameter is a
2339 struct thread_info * now.
2340 (suspend_and_send_sigstop_callback): Ditto.
2341 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2342 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2343 struct thread_info * now.
2344 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2345 from thread, lwp.
2346 (lwp_running): Update, "entry" parameter is a
2347 struct thread_info * now.
2348 (stop_all_lwps): Fetch ptid from thread.
2349 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2350 (linux_resume_one_lwp): Fetch lwpid from thread.
2351 (linux_set_resume_request): Update, "entry" parameter is a
2352 struct thread_info * now. Fetch pid, lwpid from thread.
2353 (resume_status_pending_p): Update, "entry" parameter is a
2354 struct thread_info * now.
2355 (need_step_over_p): Ditto. Fetch lwpid from thread.
2356 (start_step_over): Fetch lwpid from thread.
2357 (linux_resume_one_thread): Update, "entry" parameter is a
2358 struct thread_info * now. Fetch lwpid from thread.
2359 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2360 (proceed_one_lwp): Update, "entry" parameter is a
2361 struct thread_info * now. Fetch lwpid from thread.
2362 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2363 struct thread_info * now.
2364 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2365 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2366 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2367 directly.
2368 (regsets_store_inferior_registers): Ditto.
2369 (fetch_register, store_register): Ditto.
2370 (linux_read_memory, linux_write_memory): Ditto.
2371 (linux_request_interrupt): Ditto.
2372 (linux_read_auxv): Ditto.
2373 (linux_xfer_siginfo): Ditto.
2374 (linux_qxfer_spu): Ditto.
2375 (linux_qxfer_libraries_svr4): Ditto.
2376 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2377 moved to inferiors.h.
2378 (get_lwp): Delete.
2379 (get_thread_lwp): Update.
2380 (struct lwp_info): Delete member "entry". Simplify comment for
2381 member "thread".
2382 (all_lwps): Delete.
2383 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2384 current_inferior directly.
2385 (update_watch_registers_callback): Update, "entry" parameter is a
2386 struct thread_info * now. Fetch pid from thread.
2387 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2388 (mips_insert_point): Fetch lwpid from current_inferior.
2389 Pass &all_threads to find_inferior, not &all_lwps.
2390 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2391 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2392 directly.
2393 (mips_stopped_data_address): Ditto.
2394 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2395 directly.
2396 * linux-tile-low.c (tile_arch_setup): Ditto.
2397 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2398 (update_debug_registers_callback): Update, "entry" parameter is a
2399 struct thread_info * now. Fetch pid from thread.
2400 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2401 Pass &all_threads to find_inferior, not &all_lwps.
2402 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2403 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2404 Pass &all_threads to find_inferior, not &all_lwps.
2405 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2406 (i386_dr_low_get_status): Ditto.
2407 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2408 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2409 (x86_linux_read_description): Ditto.
2410 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2411
3b8361aa
DE
24122014-02-20 Doug Evans <dje@google.com>
2413
2414 * inferiors.c (get_first_inferior): Fix buglet.
2415
f7667f0d
DE
24162014-02-19 Doug Evans <dje@google.com>
2417
2418 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2419 * inferiors.c (add_thread): Change result type to struct thread_info *.
2420 All callers updated.
2421 (add_lwp): Call add_thread here instead of in callers.
2422 All callers updated.
2423 * linux-low.h (get_lwp_thread): Rewrite.
2424 (struct lwp_info): New member "thread".
2425
b3312d80
DE
24262014-02-19 Doug Evans <dje@google.com>
2427
2428 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2429 All callers updated.
2430
ecc6f45c
DE
24312014-02-19 Doug Evans <dje@google.com>
2432
2433 * inferiors.c (add_thread): Fix whitespace.
2434
649ebbca
DE
24352014-02-19 Doug Evans <dje@google.com>
2436
2437 * dll.c (clear_dlls): Replace accessing list implemention details
2438 with API function.
2439 * gdbthread.h (get_first_thread): Declare.
2440 * inferiors.c (for_each_inferior_with_data): New function.
2441 (get_first_thread): New function.
2442 (find_thread_ptid): Simplify.
2443 (get_first_inferior): New function.
2444 (clear_list): Delete.
2445 (one_inferior_p): New function.
2446 (clear_inferior_list): New function.
2447 (clear_inferiors): Update.
2448 * inferiors.h (for_each_inferior_with_data): Declare.
2449 (clear_inferior_list): Declare.
2450 (one_inferior_p): Declare.
2451 (get_first_inferior): Declare.
2452 * linux-low.c (linux_wait_for_event): Replace accessing list
2453 implemention details with API function.
2454 * server.c (target_running): Ditto.
2455 (accumulate_file_name_length): New function.
2456 (emit_dll_description): New function.
2457 (handle_qxfer_libraries): Replace accessing list implemention
2458 details with API function.
2459 (handle_qxfer_threads_worker): New function.
2460 (handle_qxfer_threads_proper): Replace accessing list implemention
2461 details with API function.
2462 (handle_query): Ditto.
2463 (visit_actioned_threads_callback_ftype): New typedef.
2464 (visit_actioned_threads_data): New struct.
2465 (visit_actioned_threads): Rewrite to be find_inferior callback.
2466 (resume): Call find_inferior.
2467 (handle_status): Replace accessing list implemention
2468 details with API function.
2469 (process_serial_event): Replace accessing list implemention details
2470 with API function.
2471 * target.c (set_desired_inferior): Replace accessing list implemention
2472 details with API function.
2473 * tracepoint.c (same_process_p): New function.
2474 (gdb_agent_about_to_close): Replace accessing list implemention
2475 details with API function.
2476 * win32-low.c (child_delete_thread): Replace accessing list
2477 implemention details with API function.
2478 (match_dll_by_basename): New function.
2479 (dll_is_loaded_by_basename): New function.
2480 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2481 details call to dll_is_loaded_by_basename.
2482
80894984
DE
24832014-02-19 Doug Evans <dje@google.com>
2484
2485 * dll.h (struct dll_info): Add comment.
2486 * gdbthread.h (struct thread_info): Add comment.
2487 (current_ptid): Simplify.
2488 * inferiors.c (add_process): Update.
2489 (remove_process): Update.
2490 * inferiors.h (struct process_info): Rename member "head" to "entry".
2491 * linux-low.c (delete_lwp): Update.
2492 (add_lwp): Update.
2493 (last_thread_of_process_p): Update.
2494 (kill_one_lwp_callback, linux_kill): Update.
2495 (status_pending_p_callback): Update.
2496 (wait_for_sigstop): Update. Simplify read of ptid.
2497 (start_step_over): Update.
2498 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2499 (get_lwp_thread): Update.
2500 (struct lwp_info): Rename member "head" to "entry".
2501 * regcache.h (inferior_list_entry): Delete.
2502 * server.c (kill_inferior_callback): Update.
2503 (detach_or_kill_inferior_callback): Update.
2504 (print_started_pid): Update.
2505 (print_attached_pid): Update.
2506 (process_serial_event): Simplify read of ptid.
2507 * thread-db.c (thread_db_create_event): Update.
2508 (thread_db_get_tls_address): Update.
2509 * win32-low.c (current_inferior_ptid): Simplify.
2510
46917d26
TT
25112014-02-19 Tom Tromey <tromey@redhat.com>
2512
2513 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2514 argument.
2515 (target_supports_btrace): Update.
2516
0759a81e
YQ
25172014-02-14 Yao Qi <yao@codesourcery.com>
2518
2519 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2520 (rsp-low-ipa.o): New target.
2521
a7191e8b
TT
25222014-02-12 Tom Tromey <tromey@redhat.com>
2523
2524 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2525 convert_ascii_to_int.
2526 * regcache.c (registers_to_string): Likewise.
2527 * remote-utils.c (decode_M_packet): Likewise.
2528 * server.c (process_serial_event): Likewise.
2529
ff0e980e
TT
25302014-02-12 Tom Tromey <tromey@redhat.com>
2531
2532 * server.c (handle_query, handle_v_run): Use hex2bin, not
2533 unhexify.
2534 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2535
e9371aff
TT
25362014-02-12 Tom Tromey <tromey@redhat.com>
2537
2538 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2539 convert_int_to_ascii.
2540 * regcache.c (registers_to_string, collect_register_as_string):
2541 Likewise.
2542 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2543 Likewise.
2544 * server.c (process_serial_event): Likewise.
2545 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2546 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2547
971dc0b8
TT
25482014-02-12 Tom Tromey <tromey@redhat.com>
2549
2550 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2551 bin2hex, not hexify.
2552 * tracepoint.c (cmd_qtstatus): Likewise.
2553
0a822afb
TT
25542014-02-12 Tom Tromey <tromey@redhat.com>
2555
2556 * remote-utils.c (monitor_output): Pass explicit length to
2557 hexify.
2558
9c3d6531
TT
25592014-02-12 Tom Tromey <tromey@redhat.com>
2560
2561 * tracepoint.c: Include rsp-low.h.
2562 * server.c: Include rsp-low.h.
2563 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2564 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2565 declare.
2566 * remote-utils.c: Include rsp-low.h.
2567 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2568 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2569 (convert_int_to_ascii, convert_ascii_to_int): Move to
2570 common/rsp-low.c.
2571 * regcache.c: Include rsp-low.h.
2572 * ax.c: Include rsp-low.h.
2573 * Makefile.in (SFILES): Add common/rsp-low.c.
2574 (OBS): Add rsp-low.o.
2575 (rsp-low.o): New target.
2576
01fd3ea5
TT
25772014-02-12 Tom Tromey <tromey@redhat.com>
2578
2579 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2580 Include print-utils.h.
2581 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2582 (plongest, thirty_two, phex_nz): Remove.
2583 * Makefile.in (SFILES): Add common/print-utils.c.
2584 (OBS): Add print-utils.o.
2585 (print-utils-ipa.o): New target.
2586 (print-utils.o): New target.
2587 (IPA_OBJS): Add print-utils-ipa.o.
2588
e99dc820
TT
25892014-02-06 Tom Tromey <tromey@redhat.com>
2590
2591 * Makefile.in (SFILES): Fix indentation.
2592
ee1e2d4f
DE
25932014-02-05 Doug Evans <dje@google.com>
2594
2595 * linux-low.c (linux_wait_for_event): Improve comment.
2596 (linux_wait_1): Keep current_inferior in sync with event_child.
2597
f5a02773
DE
25982014-01-22 Doug Evans <dje@google.com>
2599
2600 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2601
87ce2a04
DE
26022014-01-22 Doug Evans <dje@google.com>
2603
2604 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2605 * configure: Regenerate.
2606 * config.in: Regenerate.
2607 * Makefile.in (SFILES): Add debug.c.
2608 (OBS): Add debug.o.
2609 * debug.c: New file.
2610 * debug.h: New file.
2611 * linux-aarch64-low.c (*): Update all debugging printfs to use
2612 debug_printf instead of fprintf.
2613 * linux-arm-low.c (*): Ditto.
2614 * linux-cris-low.c (*): Ditto.
2615 * linux-crisv32-low.c (*): Ditto.
2616 * linux-m32r-low.c (*): Ditto.
2617 * linux-sparc-low.c (*): Ditto.
2618 * linux-x86.c (*): Ditto.
2619 * linux-low.c (*): Ditto.
2620 (linux_wait_1): Add calls to debug_enter, debug_exit.
2621 (linux_wait): Remove redundant debugging printf.
2622 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2623 (linux_resume, unstop_all_lwps): Ditto.
2624 * mem-break.c (*): Update all debugging printfs to use
2625 debug_printf instead of fprintf.
2626 * remote-utils.c (*): Ditto.
2627 * thread-db.c (*): Ditto.
2628 * server.c #include <ctype.h>, "gdb_vecs.h".
2629 (debug_threads): Moved to debug.c.
2630 (*): Update all debugging printfs to use debug_printf instead of
2631 fprintf.
2632 (start_inferior): Replace call to fflush with call to debug_flush.
2633 (monitor_show_help): Mention set debug-format.
2634 (parse_debug_format_options): New function.
2635 (handle_monitor_command): Handle "monitor set debug-format".
2636 (gdbserver_usage): Mention --debug-format.
2637 (main): Parse --debug-format.
2638 * server.h (debug_threads): Declaration moved to debug.h.
2639 #include "debug.h".
2640 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2641 trace_debug_1 that uses debug_printf.
2642 (tracepoint_look_up_symbols): Update all debugging printfs to use
2643 debug_printf instead of fprintf.
2644
e671835b
BS
26452014-01-20 Baruch Siach <baruch@tkos.co.il>
2646
2647 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2648 sys/ptrace.h.
2649
b5737fa9
PA
26502014-01-17 Pedro Alves <palves@redhat.com>
2651
ea38d2a9 2652 PR build/16445
c7faa97a
PA
2653 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2654 defined after including gdb_proc_service.h.
b5737fa9 2655
40ed484e
DE
26562014-01-16 Doug Evans <dje@google.com>
2657
2658 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2659 (match_dll): Use it.
2660
969c39fb
MM
26612014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2662
2663 * target.h (target_ops) <read_btrace>: Change parameters and
2664 return type to allow error reporting.
2665 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2666 trace reading errors on.
2667 * linux-low.c (linux_low_read_btrace): Pass trace reading
2668 errors on.
2669 (linux_low_disable_btrace): New.
2670
ab7f45ba
DE
26712014-01-15 Doug Evans <dje@google.com>
2672
2673 * inferiors.c (thread_id_to_gdb_id): Delete.
2674 * inferiors.h (thread_id_to_gdb_id): Delete.
2675
66af0f44
EZ
26762014-01-13 Eli Zaretskii <eliz@gnu.org>
2677
2678 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2679 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2680 versions.
2681
9939e131
PA
26822014-01-08 Pedro Alves <palves@redhat.com>
2683
2684 * server.c (handle_status): Don't discard previous queued stop
2685 replies or thread's pending status here.
2686 (main) <disconnection>: Do it here instead.
2687
b7ea362b
PA
26882014-01-08 Pedro Alves <palves@redhat.com>
2689
2690 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2691 * server.c (visit_actioned_threads, handle_pending_status): New
2692 function.
2693 (handle_v_cont): Factor out parts to ...
2694 (resume): ... this new function. If in all-stop, and a thread
2695 being resumed has a pending status, report it without actually
2696 resuming.
2697 (myresume): Adjust to use the new 'resume' function.
2698 (clear_pending_status_callback, set_pending_status_callback)
2699 (find_status_pending_thread_callback): New functions.
2700 (handle_status): Handle the case of multiple threads having
2701 interesting statuses to report. Report threads' real last signal
2702 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2703 with an interesting thread to report the status for, instead of
2704 always reporting the status of the first thread.
2705
28498c42
JB
27062014-01-01 Joel Brobecker <brobecker@adacore.com>
2707
2708 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2709 * gdbreplay.c (gdbreplay_version): Likewise.
2710
f45c82da
YZ
27112013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2712
2713 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2714 iov.iov_len with the real length in use.
2715
379a5e2d
JB
27162013-12-13 Joel Brobecker <brobecker@adacore.com>
2717
2718 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2719 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2720 for all targets that use win32-low.c.
2721 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2722 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2723
4210d83e
PA
27242013-12-13 Pedro Alves <palves@redhat.com>
2725
2726 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2727 if equal to TARGET_WAITKIND_LOADED.
2728 * win32-low.c (cached_status): New static global.
2729 (win32_wait): Add declaration.
2730 (do_initial_child_stuff): Flush all initial pending debug events
2731 up to the initial breakpoint.
2732 (win32_wait): If CACHED_STATUS was set, return that instead
2733 of doing a real wait. Remove the code resuming the execution
2734 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2735 during the initial phase. Also remove the code changing
2736 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2737 TARGET_WAITKIND_STOPPED.
2738
e7f0d979
YQ
27392013-12-11 Yao Qi <yao@codesourcery.com>
2740
2741 * notif.c (handle_notif_ack): Return 0 if no notification
2742 matches.
2743
ebcf782c
DE
27442013-11-20 Doug Evans <dje@google.com>
2745
2746 * linux-low.c (linux_set_resume_request): Fix comment.
2747
20ad9378
DE
27482013-11-20 Doug Evans <dje@google.com>
2749
2750 * linux-low.c (resume_status_pending_p): Tweak comment.
2751
a196ebeb
WT
27522013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2753
2754 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2755 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2756 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2757 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2758 (srv_amd64_regobj): Add amd64-mpx.o.
2759 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2760 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2761 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2762 * i387-fp.c (num_pl_bnd_register) Added constant.
2763 (num_pl_bnd_cfg_registers) Added constant.
2764 (struct i387_xsave) Added reserved area and MPX fields.
2765 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2766 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2767 function.
2768 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2769 (init_registers_amd64_mpx_linux): Declare new function.
2770 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2771 (x86_64_regmap): Add MPX registers.
2772 (x86_linux_read_description): Add MPX case.
2773 (initialize_low_arch): Initialize MPX targets.
2774
0080a2f6
TT
27752013-11-18 Tom Tromey <tromey@redhat.com>
2776
2777 * configure: Rebuild.
2778 * configure.ac: Don't check for stdlib.h.
2779 * gdbreplay.c: Unconditionally include stdlib.h.
2780
2978b111
TT
27812013-11-18 Tom Tromey <tromey@redhat.com>
2782
2783 * config.in: Rebuild.
2784 * configure: Rebuild.
2785 * configure.ac: Don't use AC_HEADER_DIRENT.
2786
a3d08894
TT
27872013-11-18 Tom Tromey <tromey@redhat.com>
2788
2789 * server.h: Don't check HAVE_STRING_H.
2790 * gdbreplay.c: Don't check HAVE_STRING_H.
2791 * configure: Rebuild.
2792
0a5dd17d
TT
27932013-11-18 Tom Tromey <tromey@redhat.com>
2794
2795 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2796 LIBGNU.
2797
1bd2f0ba
TT
27982013-11-08 Tom Tromey <tromey@redhat.com>
2799
2800 * configure, config.in: Rebuild.
2801 * configure.ac: Remove unused configury.
2802
3266f10b
TT
28032013-11-08 Tom Tromey <tromey@redhat.com>
2804
2805 * acinclude.m4: Include common.m4, codeset.m4.
2806 * configure, config.in: Rebuild.
2807 * configure.ac: Use GDB_AC_COMMON.
2808
6682d959
AA
28092013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2810
2811 * linux-s390-low.c (HWCAP_S390_TE): New define.
2812 (s390_arch_setup): Consider the TE field in the HWCAP for
2813 determining 'have_regset_tdb'.
2814
fd0a4d76
SDJ
28152013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2816
2817 PR gdb/16014
2818 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2819 call to sizeof.
2820
1a3d890b
PA
28212013-10-02 Pedro Alves <palves@redhat.com>
2822
2823 * server.c (process_serial_event): Don't output "GDBserver
2824 exiting" if GDB is connected through stdio.
2825 * target.c (mywait): Likewise, be silent if GDB is connected
2826 through stdio.
2827
97ad4581
JB
28282013-10-01 Joel Brobecker <brobecker@adacore.com>
2829
2830 * lynx-low.c (lynx_add_threads_after_attach): New function.
2831 (lynx_attach): Remove call to add_thread. Add call to
2832 lynx_add_threads_after_attach instead.
2833
5b4e221c
MF
28342013-09-28 Mike Frysinger <vapier@gentoo.org>
2835
2836 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2837 * config.in, configure: Regenerated.
2838
ee47b2f8
YQ
28392013-09-18 Yao Qi <yao@codesourcery.com>
2840
2841 PR server/15959
2842 * server.c (start_inferior): Clear 'resume_info'.
2843
d6707650 28442013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2845
d6707650
JW
2846 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2847 for each register.
2848
9243dd0e 28492013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2850
9243dd0e
JW
2851 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2852 linux-tile-low.o to srv_tgtobj.
2853
c623a6ef
WN
28542013-09-16 Will Newton <will.newton@linaro.org>
2855
2856 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2857 out regs.
2858
fb71d39e
PA
28592013-09-06 Pedro Alves <palves@redhat.com>
2860
2861 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2862 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2863 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2864 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2865 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2866 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2867
8e7e9910
PA
28682013-09-06 Pedro Alves <palves@redhat.com>
2869
2870 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2871 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2872
7c3a12ca
PA
28732013-09-06 Pedro Alves <palves@redhat.com>
2874
2875 * linux-amd64-ipa.c: Include tracepoint.h.
2876 * linux-i386-ipa.c: Include tracepoint.h.
2877
8eb3d7b6
RW
28782013-09-06 Ricard Wanderlof <ricardw@axis.com>
2879
2880 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2881 (ps_get_thread_area): New function.
2882
eddddb9d
RW
28832013-09-06 Ricard Wanderlof <ricardw@axis.com>
2884
2885 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2886 (initialize_low_arch): Call init_registers_crisv32 rather than
2887 init_register_crisv32.
2888
533b0600
PA
28892013-09-05 Pedro Alves <palves@redhat.com>
2890
2891 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2892 to ...
2893 * hostio.h: ... this new file.
2894 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2895 win32-low.c: Include hostio.h.
2896
0ce3d3b5
PA
28972013-09-05 Pedro Alves <palves@redhat.com>
2898
2899 * server.h (gdb_client_data, handler_func, callback_handler_func)
2900 (delete_file_handler, add_file_handler, append_callback_event)
2901 (delete_callback_event, start_event_loop, initialize_event_loop):
2902 Move to event-loop.h and include it.
2903 * event-loop.h: New file.
2904
799cdc37
PA
29052013-09-05 Pedro Alves <palves@redhat.com>
2906
2907 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2908 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2909 (loaded_dll, unloaded_dll): Move to ...
2910 * dll.h: ... this new file.
2911 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2912
6a6bbd9d
PA
29132013-09-05 Pedro Alves <palves@redhat.com>
2914
2915 * server.h (current_process, get_thread_process, all_processes)
2916 (add_inferior_to_list, for_each_inferior, current_inferior)
2917 (remove_inferior, add_process, remove_process, find_process_pid)
2918 (have_started_inferiors_p, have_attached_inferiors_p)
2919 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2920 (clear_inferiors, find_inferior, find_inferior_id)
2921 (inferior_target_data, set_inferior_target_data)
2922 (inferior_regcache_data, set_inferior_regcache_data): Move to
2923 inferiors.h, and include it.
2924 * inferiors.h: New file.
2925
f699aaba
PA
29262013-09-05 Pedro Alves <palves@redhat.com>
2927
2928 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2929 Move ...
72f4393d 2930 * ax.h: ... here.
f699aaba 2931
c144c7a0
PA
29322013-09-05 Pedro Alves <palves@redhat.com>
2933
2934 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2935 tracepoint.h.
2936 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2937 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2938 (handle_tracepoint_general_set, handle_tracepoint_query)
2939 (tracepoint_finished_step, tracepoint_was_hit)
2940 (release_while_stepping_state_list, current_traceframe)
2941 (in_readonly_region, traceframe_read_mem)
2942 (fetch_traceframe_registers, traceframe_read_sdata)
2943 (traceframe_read_info, struct fast_tpoint_collect_status)
2944 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2945 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2946 (supply_fast_tracepoint_registers)
2947 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2948 (ipa_tdesc, claim_trampoline_space)
2949 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2950 (agent_mem_read, agent_get_trace_state_variable_value)
2951 (agent_set_trace_state_variable_value, agent_tsv_read)
2952 (agent_mem_read_string, get_raw_reg_func_addr)
2953 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2954 * tracepoint.h: ... this new file.
2955
ff42e6ab
PA
29562013-09-05 Pedro Alves <palves@redhat.com>
2957
2958 * server.h (perror_with_name, error, fatal, warning, paddress)
2959 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2960 include it.
2961 * utils.h: New file.
2962
541af0f4
PA
29632013-09-05 Pedro Alves <palves@redhat.com>
2964
2965 * server.h (remote_debug, noack_mode, transport_is_reliable)
2966 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2967 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2968 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2969 (write_enn, initialize_async_io, enable_async_io)
2970 (disable_async_io, check_remote_input_interrupt_request)
2971 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2972 (dead_thread_notify, prepare_resume_reply)
2973 (decode_address_to_semicolon, decode_address, decode_m_packet)
2974 (decode_M_packet, decode_X_packet, decode_xfer_write)
2975 (decode_search_memory_packet, unhexify, hexify)
2976 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2977 (look_up_one_symbol, relocate_instruction)
2978 (monitor_output): Move to remote-utils.h, and include it.
2979 * remote-utils.h: New file.
2980
eebdf26b
PA
29812013-09-05 Pedro Alves <palves@redhat.com>
2982
2983 * server.h (_): Delete.
2984
3aafd2ff
PA
29852013-09-02 Pedro Alves <palves@redhat.com>
2986
2987 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2988 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2989 allocated.
2990 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2991
cee83bcb
PM
29922013-09-02 Pierre Muller <muller@sourceware.org>
2993
2994 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2995 or WriteProcessMemory complete successfully and handle
2996 ERROR_PARTIAL_COPY error.
2997
9a13b2fa
PA
29982013-09-02 Pedro Alves <palves@redhat.com>
2999
3000 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3001 error instead of EIO.
3002
602e3198
JK
30032013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3004
3005 PR server/15604
3006 * linux-low.c: Include filestuff.h.
3007 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3008 * lynx-low.c: Include filestuff.h.
3009 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3010 * server.c: Include filestuff.h.
3011 (main): Call notice_open_fds.
3012 * spu-low.c: Include filestuff.h.
3013 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3014
96d7229d
LM
30152013-08-22 Luis Machado <lgustavo@codesourcery.com>
3016
3017 * Makefile.in: Explain why ../target and ../nat are not
3018 listed as include file search paths.
3019 (linux-waitpid.o): New object file rule.
3020 * configure.srv (srv_native_linux_obj): New variable.
3021 Replace all occurrences of linux native object files with
3022 $srv_native_linux_obj.
3023 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3024 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3025 (linux_enable_event_reporting): Remove declaration.
3026 (my_waitpid): Moved to common/linux-waitpid.c.
3027 (linux_wait_for_event): Pass ptid when calling
3028 linux_enable_event_reporting.
3029 (linux_supports_tracefork_flag): Remove.
3030 (linux_enable_event_reporting): Likewise.
3031 (linux_tracefork_grandchild): Remove.
3032 (STACK_SIZE): Moved to common/linux-ptrace.c.
3033 (linux_tracefork_child): Remove.
3034 (linux_test_for_tracefork): Remove.
3035 (linux_look_up_symbols): Call linux_supports_traceclone.
3036 (initialize_low): Remove call to linux_test_for_tracefork.
3037 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3038 common/linux-ptrace.h.
3039 (PTRACE_TYPE_ARG4): Likewise.
3040 Include linux-ptrace.h.
3041
32940073
PA
30422013-08-21 Pedro Alves <palves@redhat.com>
3043
3044 * config.in: Renegerate.
3045
33b60d58 30462013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3047
33b60d58
LM
3048 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3049 (SFILES): Remove $(srcdir)/common/target-common.c and
3050 add $(srcdir)/target/waitstatus.c.
3051 (OBS): Remove target-common.o and add waitstatus.o.
3052 (server_h): Remove $(srcdir)/../common/target-common.h and
3053 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3054 and $(srcdir)/../target/waitstatus.h.
3055 (target-common.o): Remove.
3056 (waitstatus.o): New target object file.
3057 * target.h: Do not include target-common.h and
3058 include target/resume.h, target/wait.h and
3059 target/waitstatus.h.
3060
b8e1b30e
LM
30612013-08-13 Luis Machado <lgustavo@codesourcery.com>
3062
3063 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3064 to PTRACE_TYPE_ARG3.
3065 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3066 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3067 PTRACE_TYPE_ARG4.
3068 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3069 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3070
7a60ad40
YQ
30712013-07-27 Jie Zhang <jie@codesourcery.com>
3072 Daniel Jacobowitz <dan@codesourcery.com>
3073 Yao Qi <yao@codesourcery.com>
3074
3075 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3076 (mips-linux-watch.o): New rule.
3077 (mips_linux_watch_h): New variable.
3078 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3079 srv_tgtobj.
3080 * linux-mips-low.c: Include mips-linux-watch.h.
3081 (struct arch_process_info, struct arch_lwp_info): New.
3082 (update_watch_registers_callback): New function.
3083 (mips_linux_new_process, mips_linux_new_thread) New functions.
3084 (mips_linux_prepare_to_resume, mips_insert_point): New
3085 functions.
3086 (mips_remove_point, mips_stopped_by_watchpoint): New
3087 functions.
3088 (rsp_bp_type_to_target_hw_bp_type): New function.
3089 (mips_stopped_data_address): New function.
3090 (the_low_target): Add watchpoint support functions.
3091
de6f69ad
YQ
30922013-07-27 Yao Qi <yao@codesourcery.com>
3093
3094 * i386-low.c: Include break-common.h.
3095 (enum target_hw_bp_type): Remove.
3096
3360c0bf
LM
30972013-07-24 Luis Machado <lgustavo@codesourcery.com>
3098
3099 * Makefile.in (SFILES): /common/target-common.c.
3100 (OBS): Add target-common.o.
3101 (server_h): Add $(srcdir)/../common/target-common.h.
3102 (target-common.o): New target.
3103 * server.c (queue_stop_reply_callback): Free
3104 status string after use.
3105 * target.c (target_waitstatus_to_string): Remove.
3106 * target.h: Include target-common.h.
3107 (resume_kind): Likewise.
3108 (target_waitkind): Likewise.
3109 (target_waitstatus): Likewise.
3110 (TARGET_WNOHANG): Likewise.
3111
bd885420
YQ
31122013-07-04 Yao Qi <yao@codesourcery.com>
3113
3114 * Makefile.in (host_alias): Use @host_noncanonical@.
3115 (target_alias): Use @target_noncanonical@.
3116 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3117 ACX_NONCANONICAL_HOST.
3118 * configure: Regenerated.
3119
3120 Revert:
3121 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3122
3123 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3124 * configure: Rebuild.
3125 * Makefile.in (version_host, version_target): Get from configure.
3126 (version.c): Use $(version_host) and $(version_target).
3127
17ef446e
PA
31282013-07-03 Pedro Alves <palves@redhat.com>
3129
3130 * Makefile.in (config.status): Depend on development.sh.
3131 * acinclude.m4: Include libmcheck.m4.
3132 * configure: Regenerate.
3133
7a9a7487
MG
31342013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3135
3136 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3137 attribute inside the parentheses.
3138 (winapi_DebugSetProcessKillOnExit): Ditto.
3139 (winapi_DebugBreakProcess): Ditto.
3140 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3141
49b64de6
MG
31422013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3143
3144 * notif.h (notif_event): Add a dummy member to avoid compiler
3145 errors.
3146
d5749ee7
PA
31472013-07-01 Pedro Alves <palves@redhat.com>
3148
3149 * hostio.c (HOSTIO_PATH_MAX): Define.
3150 (require_filename, handle_open, handle_unlink, handle_readlink):
3151 Use it.
3152
d8d2a3ee
PA
31532013-07-01 Pedro Alves <palves@redhat.com>
3154
3155 * server.h: Include "pathmax.h".
3156 * linux-low.c: Don't include sys/param.h.
3157 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3158 MAXPATHLEN.
3159 * win32-low.c: Don't include sys/param.h.
3160 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3161
bc7dea8d
PA
31622013-07-01 Pedro Alves <palves@redhat.com>
3163
3164 * event-loop.c: Don't check HAVE_UNISTD_H before including
3165 <unistd.h>.
3166 * gdbreplay.c: Likewise.
3167 * remote-utils.c: Likewise.
3168 * server.c: Likewise.
3169 * configure.ac: Don't check for unistd.h.
3170 * configure: Regenerate.
3171
d6c2da54
TT
31722013-06-28 Tom Tromey <tromey@redhat.com>
3173
3174 * Makefile.in (version.c): Use version.in, not
3175 common/version.in.
3176
257b6bec
MG
31772013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3178
3179 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3180 * configure: Rebuild.
3181 * Makefile.in (version_host, version_target): Get from configure.
3182 (version.c): Use $(version_host) and $(version_target).
3183
86ebe149
DK
31842013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3185
3186 Fix trace-status to output user name without trailing colon.
3187 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3188
f30aa5af
DK
31892013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3190
3191 Fix trace-status to output proper start-time and stop-time.
3192 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3193 output start time and stop time in hex as gdb expects.
3194
28a93511
YQ
31952013-06-26 Pedro Alves <pedro@codesourcery.com>
3196
3197 * tracepoint.c (build_traceframe_info_xml): Output trace state
3198 variables present in the trace buffer.
3199
01208463
TT
32002013-06-24 Tom Tromey <tromey@redhat.com>
3201
3202 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3203 create-version.sh.
3204 (version.o): Remove.
3205 * gdbreplay.c: Include version.h.
3206 (version, host_name): Don't declare.
3207 * server.h: Include version.h.
3208 (version, host_name): Don't declare.
3209
760256f9
PA
32102013-06-12 Pedro Alves <palves@redhat.com>
3211
3212 * linux-x86-low.c (linux_is_elf64): Delete global.
3213 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3214 with local linux_pid_exe_is_elf_64_file use.
3215
030031ee
PA
32162013-06-11 Pedro Alves <palves@redhat.com>
3217
3218 * linux-low.c (regset_disabled, disable_regset): New functions.
3219 (regsets_fetch_inferior_registers)
3220 (regsets_store_inferior_registers): Use them.
3221 (initialize_regsets_info); Don't allocate the disabled_regsets
3222 array here.
3223 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3224 comment.
3225
5da6eb0a
PA
32262013-06-11 Pedro Alves <palves@redhat.com>
3227
3228 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3229 xmalloc.
3230
7e5aaa09
PA
32312013-06-11 Pedro Alves <palves@redhat.com>
3232
3233 * linux-x86-low.c (initialize_low_arch): Call
3234 init_registers_x32_avx_linux.
3235
d878444c
JK
32362013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3237
3238 Fix compatibility with Android Bionic.
3239 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3240 it is not empty.
3241
3aee8918
PA
32422013-06-07 Pedro Alves <palves@redhat.com>
3243
5f2b57b5 3244 PR server/14823
3aee8918
PA
3245 * Makefile.in (OBS): Add tdesc.o.
3246 (IPA_OBJS): Add tdesc-ipa.o.
3247 (tdesc-ipa.o): New rule.
3248 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3249 interface.
3250 * linux-low.c (new_inferior): Delete.
3251 (disabled_regsets, num_regsets): Delete.
3252 (linux_add_process): Adjust to set the new per-process
3253 new_inferior flag.
3254 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3255 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3256 was a stop. When calling arch_setup, switch the current inferior
3257 to the thread that got an event.
3258 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3259 (regsets_fetch_inferior_registers)
3260 (regsets_store_inferior_registers): New regsets_info parameter.
3261 Adjust to use it.
3262 (linux_register_in_regsets): New regs_info parameter. Adjust to
3263 use it.
3264 (register_addr, fetch_register, store_register): New usrregs_info
3265 parameter. Adjust to use it.
3266 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3267 parameter regs_info. Adjust to use it.
3268 (linux_fetch_registers): Get the current inferior's regs_info, and
3269 adjust to use it.
3270 (linux_store_registers): Ditto.
3271 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3272 (initialize_low): Don't initialize the target_regsets here. Call
3273 initialize_low_arch.
3274 * linux-low.h (target_regsets): Delete declaration.
3275 (struct regsets_info): New.
3276 (struct usrregs_info): New.
3277 (struct regs_info): New.
3278 (struct process_info_private) <new_inferior>: New field.
3279 (struct linux_target_ops): Delete the num_regs, regmap, and
3280 regset_bitmap fields. New field regs_info.
3281 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3282 * i387-fp.c (num_xmm_registers): Delete.
3283 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3284 calls to new interface.
3285 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3286 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3287 Infer the number of xmm registers from the regcache's target
3288 description.
3289 * i387-fp.h (num_xmm_registers): Delete.
3290 * inferiors.c (add_thread): Don't install the thread's regcache
3291 here.
3292 * proc-service.c (gregset_info): Fetch the current inferior's
3293 regs_info. Adjust to use it.
3294 * regcache.c: Include tdesc.h.
3295 (register_bytes, reg_defs, num_registers)
3296 (gdbserver_expedite_regs): Delete.
3297 (get_thread_regcache): If the thread doesn't have a regcache yet,
3298 create one, instead of aborting gdbserver.
3299 (regcache_invalidate_one): Rename to ...
3300 (regcache_invalidate_thread): ... this.
3301 (regcache_invalidate_one): New.
3302 (regcache_invalidate): Only invalidate registers of the current
3303 process.
3304 (init_register_cache): Add target_desc parameter, and use it.
3305 (new_register_cache): Ditto. Assert the target description has a
3306 non zero registers_size.
3307 (regcache_cpy): Add assertions. Adjust.
3308 (realloc_register_cache, set_register_cache): Delete.
3309 (registers_to_string, registers_from_string): Adjust.
3310 (find_register_by_name, find_regno, find_register_by_number)
3311 (register_cache_size): Add target_desc parameter, and use it.
3312 (free_register_cache_thread, free_register_cache_thread_one)
3313 (regcache_release, register_cache_size): New.
3314 (register_size): Add target_desc parameter, and use it.
3315 (register_data, supply_register, supply_register_zeroed)
3316 (supply_regblock, supply_register_by_name, collect_register)
3317 (collect_register_as_string, collect_register_by_name): Adjust.
3318 * regcache.h (struct target_desc): Forward declare.
3319 (struct regcache) <tdesc>: New field.
3320 (init_register_cache, new_register_cache): Add target_desc
3321 parameter.
3322 (regcache_invalidate_thread): Declare.
3323 (regcache_invalidate_one): Delete declaration.
3324 (regcache_release): Declare.
3325 (find_register_by_number, register_cache_size, register_size)
3326 (find_regno): Add target_desc parameter.
3327 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3328 declarations.
3329 * remote-utils.c: Include tdesc.h.
3330 (outreg, prepare_resume_reply): Adjust.
3331 * server.c: Include tdesc.h.
3332 (gdbserver_xmltarget): Delete declaration.
3333 (get_features_xml, process_serial_event): Adjust.
3334 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3335 declare.
3336 (struct process_info) <tdesc>: New field.
3337 (ipa_tdesc): Declare.
3338 * tdesc.c: New file.
3339 * tdesc.h: New file.
3340 * tracepoint.c: Include tdesc.h.
3341 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3342 (get_context_regcache): Adjust to pass ipa_tdesc down.
3343 (do_action_at_tracepoint): Adjust to get the register cache size
3344 from the context regcache's description.
3345 (traceframe_walk_blocks): Adjust to get the register cache size
3346 from the current trace frame's description.
3347 (traceframe_get_pc): Adjust to get current trace frame's
3348 description and pass it down.
3349 (gdb_collect): Adjust to get the register cache size from the
3350 IPA's description.
3351 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3352 (gdbserver_xmltarget): Delete.
3353 (initialize_low_tracepoint): Set the ipa's target description.
3354 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3355 (initialize_low_tracepoint): Set the ipa's target description.
3356 * linux-x86-low.c: Include tdesc.h.
3357 [__x86_64__] (is_64bit_tdesc): New.
3358 (ps_get_thread_area, x86_get_thread_area): Use it.
3359 (i386_cannot_store_register): Rename to ...
3360 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3361 (i386_cannot_fetch_register): Rename to ...
3362 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3363 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3364 to new interface.
3365 (target_regsets): Rename to ...
3366 (x86_regsets): ... this.
3367 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3368 interface.
3369 (x86_siginfo_fixup): Use is_64bit_tdesc.
3370 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3371 (tdesc_x32_avx_linux, tdesc_x32_linux)
3372 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3373 Declare.
3374 (x86_linux_update_xmltarget): Delete.
3375 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3376 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3377 (AMD64_LINUX_USER64_CS): New.
3378 (x86_linux_read_description): New, based on
3379 x86_linux_update_xmltarget.
3380 (same_process_callback): New.
3381 (x86_arch_setup_process_callback): New.
3382 (x86_linux_update_xmltarget): New.
3383 (x86_regsets_info): New.
3384 (amd64_linux_regs_info): New.
3385 (i386_linux_usrregs_info): New.
3386 (i386_linux_regs_info): New.
3387 (x86_linux_regs_info): New.
3388 (x86_arch_setup): Reimplement.
3389 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3390 (x86_emit_ops): Ditto.
3391 (the_low_target): Adjust. Install x86_linux_regs_info,
3392 x86_cannot_fetch_register, and x86_cannot_store_register.
3393 (initialize_low_arch): New.
3394 * linux-ia64-low.c (tdesc_ia64): Declare.
3395 (ia64_fetch_register): Adjust.
3396 (ia64_usrregs_info, regs_info): New globals.
3397 (ia64_regs_info): New function.
3398 (the_low_target): Adjust.
3399 (initialize_low_arch): New function.
3400 * linux-sparc-low.c (tdesc_sparc64): Declare.
3401 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3402 Adjust.
3403 (sparc_arch_setup): New function.
3404 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3405 (the_low_target): Adjust.
3406 (initialize_low_arch): New function.
3407 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3408 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3409 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3410 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3411 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3412 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3413 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3414 (tdesc_powerpc_isa205_vsx64l): Declare.
3415 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3416 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3417 (ppc_set_pc, ppc_get_hwcap): Adjust.
3418 (ppc_usrregs_info): Forward declare.
3419 (!__powerpc64__) ppc_regmap_adjusted: New global.
3420 (ppc_arch_setup): Adjust to the current process'es target
3421 description.
3422 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3423 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3424 (ppc_store_evrregset): Adjust.
3425 (target_regsets): Rename to ...
3426 (ppc_regsets): ... this, and make static.
3427 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3428 (ppc_regs_info): New function.
3429 (the_low_target): Adjust.
3430 (initialize_low_arch): New function.
3431 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3432 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3433 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3434 (tdesc_s390x_linux64v2): Declare.
3435 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3436 (s390_fill_gregset, s390_store_last_break): Adjust.
3437 (target_regsets): Rename to ...
3438 (s390_regsets): ... this, and make static.
3439 (s390_get_pc, s390_set_pc): Adjust.
3440 (s390_get_hwcap): New target_desc parameter, and use it.
3441 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3442 (s390_arch_setup): Adjust to set the current process'es target
3443 description. Don't adjust the regmap.
3444 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3445 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3446 (regs_info_3264): New globals.
3447 (s390_regs_info): New function.
3448 (the_low_target): Adjust.
3449 (initialize_low_arch): New function.
3450 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3451 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3452 [__mips64] (init_registers_mips_linux)
3453 (init_registers_mips_dsp_linux): Delete defines.
3454 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3455 (have_dsp): New global.
3456 (mips_read_description): New, based on mips_arch_setup.
3457 (mips_arch_setup): Reimplement.
3458 (get_usrregs_info): New function.
3459 (mips_cannot_fetch_register, mips_cannot_store_register)
3460 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3461 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3462 (target_regsets): Rename to ...
3463 (mips_regsets): ... this, and make static.
3464 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3465 (dsp_regs_info, regs_info): New globals.
3466 (mips_regs_info): New function.
3467 (the_low_target): Adjust.
3468 (initialize_low_arch): New function.
3469 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3470 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3471 Declare.
3472 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3473 (arm_read_description): New, with bits factored from
3474 arm_arch_setup.
3475 (arm_arch_setup): Reimplement.
3476 (target_regsets): Rename to ...
3477 (arm_regsets): ... this, and make static.
3478 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3479 (arm_regs_info): New function.
3480 (the_low_target): Adjust.
3481 (initialize_low_arch): New function.
3482 * linux-m68k-low.c (tdesc_m68k): Declare.
3483 (target_regsets): Rename to ...
3484 (m68k_regsets): ... this, and make static.
3485 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3486 (m68k_regs_info): New function.
3487 (m68k_arch_setup): New function.
3488 (the_low_target): Adjust.
3489 (initialize_low_arch): New function.
3490 * linux-sh-low.c (tdesc_sharch): Declare.
3491 (target_regsets): Rename to ...
3492 (sh_regsets): ... this, and make static.
3493 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3494 (sh_regs_info, sh_arch_setup): New functions.
3495 (the_low_target): Adjust.
3496 (initialize_low_arch): New function.
3497 * linux-bfin-low.c (tdesc_bfin): Declare.
3498 (bfin_arch_setup): New function.
3499 (bfin_usrregs_info, regs_info): New globals.
3500 (bfin_regs_info): New function.
3501 (the_low_target): Adjust.
3502 (initialize_low_arch): New function.
3503 * linux-cris-low.c (tdesc_cris): Declare.
3504 (cris_arch_setup): New function.
3505 (cris_usrregs_info, regs_info): New globals.
3506 (cris_regs_info): New function.
3507 (the_low_target): Adjust.
3508 (initialize_low_arch): New function.
3509 * linux-cris-low.c (tdesc_crisv32): Declare.
3510 (cris_arch_setup): New function.
3511 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3512 (cris_regs_info): New function.
3513 (the_low_target): Adjust.
3514 (initialize_low_arch): New function.
3515 * linux-m32r-low.c (tdesc_m32r): Declare.
3516 (m32r_arch_setup): New function.
3517 (m32r_usrregs_info, regs_info): New globals.
3518 (m32r_regs_info): Adjust.
3519 (initialize_low_arch): New function.
3520 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3521 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3522 (tic6x_usrregs_info): Forward declare.
3523 (tic6x_read_description): New function, based on ...
3524 (tic6x_arch_setup): ... this. Reimplement.
3525 (target_regsets): Rename to ...
3526 (tic6x_regsets): ... this, and make static.
3527 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3528 (tic6x_regs_info): New function.
3529 (the_low_target): Adjust.
3530 (initialize_low_arch): New function.
3531 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3532 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3533 (target_regsets): Rename to ...
3534 (xtensa_regsets): ... this, and make static.
3535 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3536 globals.
3537 (xtensa_arch_setup, xtensa_regs_info): New functions.
3538 (the_low_target): Adjust.
3539 (initialize_low_arch): New function.
3540 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3541 (nios2_arch_setup): Set the current process'es tdesc.
3542 (target_regsets): Rename to ...
3543 (nios2_regsets): ... this.
3544 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3545 (nios2_regs_info): New function.
3546 (the_low_target): Adjust.
3547 (initialize_low_arch): New function.
a261b8f5
PA
3548 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3549 (aarch64_arch_setup): Set the current process'es tdesc.
3550 (target_regsets): Rename to ...
3551 (aarch64_regsets): ... this.
3552 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3553 (aarch64_regs_info): New function.
3554 (the_low_target): Adjust.
3555 (initialize_low_arch): New function.
3aee8918
PA
3556 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3557 globals.
3558 (target_regsets): Rename to ...
3559 (tile_regsets): ... this.
3560 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3561 (tile_regs_info): New function.
3562 (tile_arch_setup): Set the current process'es tdesc.
3563 (the_low_target): Adjust.
3564 (initialize_low_arch): New function.
3565 * spu-low.c (tdesc_spu): Declare.
3566 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3567 * win32-arm-low.c (tdesc_arm): Declare.
3568 (arm_arch_setup): New function.
3569 (the_low_target): Install arm_arch_setup instead of
3570 init_registers_arm.
3571 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3572 (init_windows_x86): Rename to ...
3573 (i386_arch_setup): ... this. Set `win32_tdesc'.
3574 (the_low_target): Adjust.
3575 * win32-low.c (win32_tdesc): New global.
3576 (child_add_thread): Don't create the thread cache here.
3577 (do_initial_child_stuff): Set the new process'es tdesc.
3578 * win32-low.h (struct target_desc): Forward declare.
3579 (win32_tdesc): Declare.
3580 * lynx-i386-low.c (tdesc_i386): Declare global.
3581 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3582 * lynx-low.c (lynx_tdesc): New global.
3583 (lynx_add_process): Set the new process'es tdesc.
3584 * lynx-low.h (struct target_desc): Forward declare.
3585 (lynx_tdesc): Declare global.
3586 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3587 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3588 * nto-low.c (nto_tdesc): New global.
3589 (do_attach): Set the new process'es tdesc.
3590 * nto-low.h (struct target_desc): Forward declare.
3591 (nto_tdesc): Declare.
3592 * nto-x86-low.c (tdesc_i386): Declare.
3593 (nto_x86_arch_setup): Set `nto_tdesc'.
3594
b1fbec62
GB
35952013-06-04 Gary Benson <gbenson@redhat.com>
3596
3597 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3598 to qSupported response when appropriate.
3599 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3600 with nonzero-length annex.
3601 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3602 arguments supplied in annex.
3603
d1ec4ce7
DE
36042013-05-31 Doug Evans <dje@google.com>
3605
ac44adcb 3606 PR server/15594
d1ec4ce7
DE
3607 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3608 64 bits in 64-cross-32 environment.
3609
9b25f2d3
PA
36102013-05-28 Pedro Alves <palves@redhat.com>
3611
3612 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3613 (aarch64-without-fpu.c): Delete rule.
3614 * configure.srv (aarch64*-*-linux*): Remove references to
3615 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3616 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3617 declaration.
3618
6740dc9c
PA
36192013-05-24 Pedro Alves <palves@redhat.com>
3620
3621 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3622 instead of strchr/decode_address. Error if the range isn't split
3623 with a ','. Don't assume there's be a ':' in the action.
3624
c2d6af84
PA
36252013-05-23 Yao Qi <yao@codesourcery.com>
3626 Pedro Alves <palves@redhat.com>
3627
3628 * linux-low.c (lwp_in_step_range): New function.
3629 (linux_wait_1): If the thread was range stepping and stopped
3630 outside the stepping range, report the stop to GDB. Otherwise,
3631 continue stepping. Add range stepping debug output.
3632 (linux_set_resume_request): Copy the step range from the resume
3633 request to the lwp.
3634 (linux_supports_range_stepping): New.
3635 (linux_target_ops) <supports_range_stepping>: Set to
3636 linux_supports_range_stepping.
3637 * linux-low.h (struct linux_target_ops)
3638 <supports_range_stepping>: New field.
3639 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3640 * linux-x86-low.c (x86_supports_range_stepping): New.
3641 (the_low_target) <supports_range_stepping>: Set to
3642 x86_supports_range_stepping.
3643 * server.c (handle_v_cont): Handle 'r' action.
3644 (handle_v_requests): Append ";r" if the target supports range
3645 stepping.
3646 * target.h (struct thread_resume) <step_range_start,
3647 step_range_end>: New fields.
3648 (struct target_ops) <supports_range_stepping>:
3649 New field.
3650 (target_supports_range_stepping): New macro.
3651
58794e1a
JB
36522013-05-17 Joel Brobecker <brobecker@adacore.com>
3653
3654 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3655 confusion in comment.
3656
d631c5a7
JB
36572013-05-17 Joel Brobecker <brobecker@adacore.com>
3658
3659 * lynx-low.c (struct process_info_private): New type.
3660 (lynx_add_process): New function.
3661 (lynx_create_inferior, lynx_attach): Replace calls to
3662 add_process by calls to lynx_add_process.
3663 (lynx_resume): If PTID is null, then try using
3664 current_process()->private->last_wait_event_ptid.
3665 Add comments.
3666 (lynx_clear_inferiors): Delete. The contents of that function
3667 has been inlined in lynx_mourn;
3668 (lynx_wait_1): Save the ptid in the process's private data.
3669 (lynx_mourn): Free the process' private data. Replace call
3670 to lynx_clear_inferiors by call to clear_inferiors.
3671
96f7a20f
YQ
36722013-05-17 Yao Qi <yao@codesourcery.com>
3673
3674 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3675 the right place.
3676
db0dfaa0
LM
36772013-05-16 Luis Machado <lgustavo@codesourcery.com>
3678
3679 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3680 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3681 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3682 PT_TEXT_END_ADDR guards. Update comments.
3683 (linux_target_op) <read_offsets>: Conditionally define to
3684 linux_read_offsets if the target is UCLIBC and if it defines
3685 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3686
68f5f838
SL
36872013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3688 Andrew Jenner <andrew@codesourcery.com>
3689
3690 * Makefile.in (SFILES): Add linux-nios2-low.c.
3691 (clean): Add action to delete nios2-linux.c.
3692 (nios2-linux.c): New rule.
3693 * configure.srv: Add nios2*-*-linux*.
3694 * linux-nios2-low.c: New.
3695
1ebff1fd
HAQ
36962013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3697
3698 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3699
f6150862
HZ
37002013-04-25 Hui Zhu <hui@codesourcery.com>
3701
3702 PR gdb/15186
f6150862
HZ
3703 * ax.c (ax_printf): Add fflush.
3704
614c279d
TT
37052013-04-22 Tom Tromey <tromey@redhat.com>
3706
3707 * Makefile.in (SFILES): Add filestuff.c.
3708 (OBS): Add filestuff.o.
3709 (filestuff.o): New target.
3710 * config.in, configure: Rebuild.
3711 * configure.ac: Check for fdwalk, pipe2.
3712
7d4e5717
PA
37132013-04-17 Pedro Alves <palves@redhat.com>
3714
3715 * configure.ac (USE_THREAD_DB): Delete variable.
3716 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3717 Don't AC_SUBST USE_THREAD_DB.
3718 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3719 * config.in, configure: Regenerate.
3720
d5c93e41
PA
37212013-04-16 Pedro Alves <palves@redhat.com>
3722
3723 * linux-low.h (struct lwp_info) <thread_known>: Move under
3724 the USE_THREAD_DB #ifdef.
3725
04f5fe89
PA
37262013-04-16 Pedro Alves <palves@redhat.com>
3727
3728 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3729 (linux-low.o): Delete rule.
3730 * linux-low.h: Always include "gdb_thread_db.h" instead of
3731 conditionally including thread_db.h.
3732 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3733 HAVE_THREAD_DB_H.
3734
480b27bf
JK
37352013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3736
3737 * Makefile.in (install-only): Fix make install regression.
3738
43662968
JK
37392013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3740
3741 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3742 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3743 installation.
3744 * gdbserver.1: Remove.
3745
3e74e146
PA
37462013-03-22 Pedro Alves <palves@redhat.com>
3747
3748 * linux-low.c (handle_extended_wait): Don't call
3749 linux_enable_event_reporting.
3750
a8347a2a
TT
37512013-03-15 Tony Theodore <tonyt@logyst.com>
3752
3753 PR build/9098:
3754 * Makefile.in (SHELL): Use @SHELL@.
3755
eeb56fa7
SDJ
37562013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3757
3758 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3759 compiler warning.
3760
4fa7e2ff
JB
37612013-03-13 Joel Brobecker <brobecker@adacore.com>
3762
3763 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3764 Remove extraneous NULL element.
3765
8ddb1965
YQ
37662013-03-13 Yao Qi <yao@codesourcery.com>
3767
3768 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3769 'V' block in trace frame.
3770
9accd112
MM
37712013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3772
3773 * target.h (struct target_ops): Add btrace ops.
3774 (target_supports_btrace): New macro.
3775 (target_enable_btrace): New macro.
3776 (target_disable_btrace): New macro.
3777 (target_read_btrace): New macro.
3778 * gdbthread.h (struct thread_info): Add btrace field.
3779 * server.c: Include btrace-common.h.
3780 (handle_btrace_general_set): New function.
3781 (handle_btrace_enable): New function.
3782 (handle_btrace_disable): New function.
3783 (handle_general_set): Call handle_btrace_general_set.
3784 (handle_qxfer_btrace): New function.
3785 (struct qxfer qxfer_packets[]): Add btrace entry.
3786 * inferiors.c (remove_thread): Disable btrace.
3787 * linux-low: Include linux-btrace.h.
3788 (linux_low_enable_btrace): New function.
3789 (linux_low_read_btrace): New function.
3790 (linux_target_ops): Add btrace ops.
3791 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3792 Add srv_linux_btrace=yes.
3793 (x86_64-*-linux*): Add linux-btrace.o.
3794 Add srv_linux_btrace=yes.
3795 * configure.ac: Define HAVE_LINUX_BTRACE.
3796 * config.in: Regenerated.
3797 * configure: Regenerated.
3798
5cc22e4c
MM
37992013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3800
3801 * server.c (handle_qxfer): Preserve error message if -3 is
3802 returned.
3803 (qxfer): Document the -3 return value.
3804
7c97f91e
MM
38052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3806
3807 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3808 (linux_btrace_h): New variable.
3809 (linux-btrace.o): New rule.
3810
be9a119c 38112013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3812 Hafiz Abid Qadeer <abidh@codesourcery.com>
3813
3814 * tracepoint.c (trace_buffer_size): New global.
3815 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3816 (init_trace_buffer): Change to one-argument function. Allocate
3817 trace buffer memory.
3818 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3819 handle QTBuffer:size packet.
3820 (cmd_bigqtbuffer_size): New function.
3821 (initialize_tracepoint): Call init_trace_buffer with
3822 DEFAULT_TRACE_BUFFER_SIZE.
3823 * server.c (handle_query): Add QTBuffer:size in the
3824 supported packets.
3825
e64f7499
YQ
38262013-03-07 Yao Qi <yao@codesourcery.com>
3827
3828 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3829 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3830 of -1.
3831 (cmd_qtsp): Adjust condition. Do post increment.
3832 Set cur_action and cur_step_action back to 0.
3833
f0ae6fc3
PA
38342013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3835
3836 PR server/15236
3837 * linux-low.c (linux_write_memory): Return early success if LEN is
3838 zero.
3839
b5b0b0af
CV
38402013-03-05 Corinna Vinschen <vinschen@redhat.de>
3841
334ad4a8 3842 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3843
589bc927
TT
38442013-02-28 Tom Tromey <tromey@redhat.com>
3845
3846 * configure.ac: Invoke AC_SYS_LARGEFILE.
3847 * configure, config.in: Rebuild.
3848
dfe07582
CV
38492013-02-28 Corinna Vinschen <vinschen@redhat.com>
3850
3851 * win32-low.c: Throughout, fix format strings and casts of
3852 printf-like functions to avoid type related warnings on all
3853 platforms.
3854 (get_child_debug_event): Print dwDebugEventCode as hex since
3855 that's how it's usually documented.
3856
736cd585
YQ
38572013-02-28 Yao Qi <yao@codesourcery.com>
3858
3859 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3860 pulongest.
3861
e1f58301
JW
38622013-02-27 Jiong Wang <jiwang@tilera.com>
3863
3864 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3865 (reg-tilegx32.c): New rule.
3866 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3867 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3868 different register info initializer according to elf class.
3869 (init_registers_tilgx32): New function. The tilegx32 register info
3870 initializer.
3871 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3872 (tile_store_gregset): Likewise.
3873
d171ca78
YQ
38742013-02-27 Yao Qi <yao@codesourcery.com>
3875
3876 * server.c (process_point_options): Print debug message when
3877 debug_threads is true.
3878
282bbdf3
YQ
38792013-02-26 Yao Qi <yao@codesourcery.com>
3880
3881 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3882
aca22551
PA
38832013-02-19 Pedro Alves <palves@redhat.com>
3884 Kai Tietz <ktietz@redhat.com>
3885
3886 PR gdb/15161
3887
3888 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3889 instead of strtoul to extract address from packet.
3890 (process_serial_event) <'z'>: Likewise.
3891
4f3cee1c
YQ
38922013-02-18 Yao Qi <yao@codesourcery.com>
3893
3894 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3895
8e1d55a3
PA
38962013-02-14 Pedro Alves <palves@redhat.com>
3897
3898 Plug memory leak.
3899
3900 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3901 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3902
458820da
PA
39032013-02-14 Pedro Alves <palves@redhat.com>
3904
3905 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3906
baea0dae
PA
39072013-02-14 Pedro Alves <palves@redhat.com>
3908
3909 * tracepoint.c (save_string): Delete.
3910 (add_tracepoint_action): Use savestring instead of save_string.
3911
0b1afbb3
PA
39122013-02-12 Pedro Alves <palves@redhat.com>
3913
3914 * linux-xtensa-low.c: Ditto.
3915 * xtensa-xtregs.c: Ditto.
3916
8a4ac37e
PA
39172013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3918
3919 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3920 thread_db.
3921
148de6bb
MS
39222013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3923
3924 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3925 aarch64_num_wp_regs and aarch64_num_bp_regs to
3926 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3927
55fac6e0
MS
39282013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3929
3930 * linux-aarch64-low.c (ps_get_thread_area): Replace
3931 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3932
176eb98c
MS
39332013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3934 Marcus Shawcroft <marcus.shawcroft@arm.com>
3935 Nigel Stephens <nigel.stephens@arm.com>
3936 Yufeng Zhang <yufeng.zhang@arm.com>
3937
3938 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3939 (aarch64.c, aarch64-without-fpu.c): New targets.
3940 * configure.srv (aarch64*-*-linux*): New.
3941 * linux-aarch64-low.c: New file.
3942
56f7af9c
MS
39432013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3944
43aaf8b6 3945 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3946 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3947 (dequeue_one_deferred_signal, linux_resume_one_thread)
3948 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3949 (linux_tracefork_grandchild, linux_test_for_tracefork)
3950 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3951 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3952 where the argument is 0.
3953
60f662b0
YQ
39542013-01-25 Yao Qi <yao@codesourcery.com>
3955
3956 * event-loop.c: Include "queue.h".
3957 (gdb_event_p): New typedef.
3958 (struct gdb_event) <next_event>: Remove.
3959 (event_queue): Change to QUEUE(gdb_event_p).
3960 (async_queue_event): Remove.
3961 (gdb_event_xfree): New.
3962 (initialize_event_loop): New.
3963 (process_event): Use API from QUEUE.
3964 (wait_for_event): Likewise.
3965 * server.c (main): Call initialize_event_loop.
3966 * server.h (initialize_event_loop): Declare.
3967
5ae4861a
YQ
39682013-01-18 Yao Qi <yao@codesourcery.com>
3969
3970 * ax.h (struct eval_agent_expr_context): New.
3971 (gdb_eval_agent_expr): Update declaration.
3972 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3973 TFRAME. Add new argument CTX.
3974 * server.h (struct eval_agent_expr_context): Declare.
3975 (agent_mem_read, agent_tsv_read): Update declaration.
3976 (agent_mem_read_string): Likewise.
3977 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3978 (add_traceframe_block): Add new argument TPOINT.
3979 Increase TPOINT->traceframe_usage.
3980 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3981 eval_tracepoint_agent_expr.
3982 (condition_true_at_tracepoint): Likewise.
3983 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3984 (agent_mem_read_string, agent_tsv_read): Likewise.
3985
85e00e85
YQ
39862013-01-16 Yao Qi <yao@codesourcery.com>
3987
3988 * linux-low.c (linux_resume_one_lwp): Don't check
3989 'lwp->bp_reinsert != 0'.
3990
4039cf45
JB
39912013-01-07 Joel Brobecker <brobecker@adacore.com>
3992 Pedro Alves <palves@redhat.com>
3993
3994 * lynx-low.c (ptrace_request_to_str): Define a temporary
3995 macro and use it to simplify this function's implementation.
3996
9044dee2
JB
39972013-01-07 Joel Brobecker <brobecker@adacore.com>
3998
3999 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4000 sets errno.
4001
e6352c8f
JB
40022013-01-07 Joel Brobecker <brobecker@adacore.com>
4003
4004 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4005
50681a27
JB
40062013-01-07 Joel Brobecker <brobecker@adacore.com>
4007
4008 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4009
3f6e77ef
JB
40102013-01-07 Joel Brobecker <brobecker@adacore.com>
4011
4012 * lynx-low.c (lynx_resume): Use the resume_info parameter
4013 to determine the ptid for the lynx_ptrace call, unless
4014 it is equal to minus_one_ptid, in which case we use the
4015 ptid of the current_inferior.
4016 (lynx_wait_1): After having received a thread create/exit
4017 event, resume the inferior's execution using the signaling
4018 thread's ptid, rather than the old ptid.
4019
7fda33ae
JB
40202013-01-07 Joel Brobecker <brobecker@adacore.com>
4021
4022 * lynx-low.c (lynx_resume): Delete variable ret.
4023
b9786c74
JB
40242013-01-01 Joel Brobecker <brobecker@adacore.com>
4025
4026 * gdbreplay.c (gdbreplay_version): Update copyright year.
4027 * server.c (gdbserver_version): Likewise.
4028
8b93d60f
JB
40292012-12-17 Joel Brobecker <brobecker@adacore.com>
4030
4031 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4032 new thread.
4033
037335a7
JB
40342012-12-17 Joel Brobecker <brobecker@adacore.com>
4035
4036 * lynx-low.c (ptrace_request_to_str): Add handling for
4037 PTRACE_GETTRACESIG.
4038
52d4cbd8
JB
40392012-12-17 Joel Brobecker <brobecker@adacore.com>
4040
4041 * lynx-low.c (lynx_attach): Delete variable new_process.
4042
ab8f6ca9
JB
40432012-12-17 Joel Brobecker <brobecker@adacore.com>
4044
4045 * lynx-low.c (lynx_create_inferior): Delete variable
4046 new_process.
4047
78cbc024
JB
40482012-12-17 Joel Brobecker <brobecker@adacore.com>
4049
4050 * lynx-low.c (ptrace_request_to_str): Do not handle
4051 PTRACE_GETTHREADLIST if this macro does not exist.
4052
14a00470
YQ
40532012-12-15 Yao Qi <yao@codesourcery.com>
4054
4055 * Makefile.in (OBS): Add notif.o.
4056 * notif.c, notif.h: New.
4057 * server.c: Include "notif.h".
4058 (struct vstop_notif) <next>: Remove.
4059 <base>: New field.
4060 (queue_stop_reply): Update.
4061 (push_event, send_next_stop_reply): Remove.
4062 (discard_queued_stop_replies): Update.
4063 (notif_stop): New variable.
4064 (handle_v_stopped): Remove.
4065 (handle_v_requests): Don't call handle_v_stopped. Call
4066 handle_ack_notif instead.
4067 (queue_stop_reply_callback): Call notif_event_enque instead
4068 of queue_stop_reply.
4069 (handle_status): Don't call send_next_stop_reply, call
4070 notif_write_event instead.
4071 (kill_inferior_callback): Likewise.
4072 (detach_or_kill_inferior_callback): Likewise.
4073 (main): Call initialize_notif.
4074 (process_serial_event): Call QUEUE_is_empty.
4075 (handle_target_event): Call notif_push instead of push event.
4076 * server.h (push_event): Remove declaration.
4077
61c125b9
TT
40782012-12-10 Tom Tromey <tromey@redhat.com>
4079
4080 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4081 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4082 macros.
4083 (.c.o): Rewrite.
4084 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4085 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4086 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4087 (amd64-linux-ipa.o, ax.o): Rewrite.
4088 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4089 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4090 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4091 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4092 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4093 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4094 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4095 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4096 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4097 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4098 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4099 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4100 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4101 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4102 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4103 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4104 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4105 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4106 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4107 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4108 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4109 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4110 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4111 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4112 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4113 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4114 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4115 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4116 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4117 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4118 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4119 (reg-tilegx.o): Remove.
4120 (all_object_files): New macro.
4121 Include .deps files.
4122 * aclocal.m4, configure: Rebuild.
4123 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4124 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4125 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4126
e90e9ad9
TT
41272012-12-05 Tom Tromey <tromey@redhat.com>
4128
4129 PR gdb/14917:
4130 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4131
02d403bf 41322012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4133
4134 * configure.ac: Check for linux/perf_event.h.
4135 * config.in: Regenerated.
4136 * configure: Regenerated.
4137
0270a750
PA
41382012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4139
4140 * hostio.c (handle_readlink): Decrease buffer size
4141 parameter passed to readlink by one byte.
4142
8c29b58e
YQ
41432012-11-26 Yao Qi <yao@codesourcery.com>
4144
4145 * configure.ac (build_warnings): Append '-Wempty-body'.
4146 * configure: Regenerated.
4147 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4148 body.
4149
8bdce1ff
PM
41502012-11-15 Pierre Muller <muller@sourceware.org>
4151
4152 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4153 * config.in: Regenerate.
4154 * configure: Regenerate.
4155 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4156 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4157 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4158 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4159 header.
4160 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4161 instead of <sys/wait.h> header.
4162 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4163
02d403bf 41642012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4165
4166 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4167 (various make rules): Remove -DGDBSERVER
4168
fbd5db48
YQ
41692012-11-09 Yao Qi <yao@codesourcery.com>
4170
4171 * spu-low.c (current_ptid): Move it to ..
4172 * gdbthread.h: ... here. New.
4173 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4174 * server.c (myresume, process_serial_event): Likewise.
4175 * thread-db.c (thread_db_find_new_threads): Likewise.
4176 * tracepoint.c (run_inferior_command): Likewise.
4177
b3dc46ff
AB
41782012-10-01 Andrew Burgess <aburgess@broadcom.com>
4179
4180 * server.c (handle_search_memory_1): Include access length in
4181 warning message.
4182
07c04788
HPN
41832012-09-05 Michael Brandt <michael.brandt@axis.com>
4184
4185 * linux-crisv32-low.c: Fix compile errors.
4186
918d227b
YQ
41872012-09-04 Yao Qi <yao@codesourcery.com>
4188
4189 * tracepoint.c (cmd_qtsv): Adjust debug message.
4190 Don't check CUR_TPOINT.
4191
18c1b81a
YQ
41922012-08-28 Yao Qi <yao@codesourcery.com>
4193
4194 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4195 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4196 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4197 Remove declarations of xmalloc, xreallloc, xstrdup and
4198 freeargv.
4199 * Makefile.in (libiberty_h): New.
4200 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4201 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4202
dc82f37b
YQ
42032012-08-23 Yao Qi <yao@codesourcery.com>
4204
4205 * server.h: Remove declaration of 'xsnprintf'.
4206
406b1477
KS
42072012-08-22 Keith Seitz <keiths@redhat.com>
4208
4209 * server.h: Include build-gnulib-gbserver/config.h.
4210 * gdbreplay.c: Likewise.
4211
e6712ff1
DE
42122012-08-08 Doug Evans <dje@google.com>
4213
4214 * Makefile.in (SFILES): Add gdb_vecs.c.
4215 (OBS): Add gdb_vecs.o.
4216 (gdb_vecs_h, host_defs_h): New variables.
4217 (thread-db.o): Add $(gdb_vecs_h) dependency.
4218 (gdb_vecs.o): New rule.
4219 * thread-db.c: #include "gdb_vecs.h".
4220 (thread_db_load_search): Use a vector to iterate over path elements.
4221 Handle text appearing after "$pdir".
4222
4223 * configure.ac: Add check for strstr.
4224 * config.in: Regenerate.
4225 * configure: Regenerate.
4226
7c3270ae
UW
42272012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4228
4229 * hostio.c (handle_pread): If pread fails, fall back to attempting
4230 lseek/read.
4231 (handle_pwrite): Likewise for pwrite.
4232
b62e2b27
UW
42332012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4234
4235 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4236 between unsupported TYPE and unimplementable ADDR/LEN combination.
4237 (arm_insert_point): Act on new return value.
4238
78a99e91
PA
42392012-07-31 Pedro Alves <palves@redhat.com>
4240
4241 * server.c (process_point_options): Only skip tokens if we find
4242 one that is unrecognized. Don't treat 'X' specially while
4243 skipping unrecognized tokens.
4244
fcf303ab
UW
42452012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4246
4247 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4248 to 4-byte-align HW breakpoint addresses for Thumb.
4249
7255706c
YQ
42502012-07-27 Yao Qi <yao@codesourcery.com>
4251
4252 PR remote/14161.
4253
4254 * server.h: Declare gdb_agent_about_to_close.
4255 * target.c (kill_inferior): Include "agent.h".
4256 New. Send command 'kill'.
4257 * target.h (kill_inferior): Removed macro.
4258 * tracepoint.c (gdb_agent_about_to_close): New.
4259 (gdb_agent_helper_thread): Handle command 'close'.
4260 Wait endlessly until the inferior stops.
4261 Install gdb_agent_remove_socket to atexit hook.
4262 (agent_socket_name): New static variable.
4263 (gdb_agent_socket_init): Replace local variable 'name' with
4264 'agent_socket_name'.
4265 (gdb_agent_remove_socket): New.
4266
5a3f286f
YQ
42672012-07-27 Yao Qi <yao@codesourcery.com>
4268
4269 * server.c (process_point_options): Stop at 'X' when parsing.
4270
961bd387
ME
42712012-07-19 Michael Eager <eager@eagercon.com>
4272
a261b8f5 4273 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4274 to hw_execute.
4275 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4276 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4277 hardware breakpoint.
4278
aa7c7447
JK
42792012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4280
4281 * gdbserver/linux-low.c (initialize_low): Call
4282 linux_ptrace_init_warnings.
4283
7f216e7c
DE
42842012-07-02 Doug Evans <dje@google.com>
4285
4286 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4287 pointer to int.
4288
d3ce09f5
SS
42892012-07-02 Stan Shebs <stan@codesourcery.com>
4290
4291 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4292 (ax.o): Add it to build rule.
4293 (ax-ipa.o): Ditto.
4294 (OBS): Add format.o.
4295 (IPA_OBS): Add format.o.
4296 * server.c (handle_query): Claim support for breakpoint commands.
4297 (process_point_options): Add command case.
4298 (process_serial_event): Leave running if there are printfs in
4299 effect.
4300 * mem-break.h (any_persistent_commands): Declare.
4301 (add_breakpoint_commands): Declare.
4302 (gdb_no_commands_at_breakpoint): Declare.
4303 (run_breakpoint_commands): Declare.
4304 * mem-break.c (struct point_command_list): New struct.
4305 (struct breakpoint): New field command_list.
4306 (any_persistent_commands): New function.
4307 (add_commands_to_breakpoint): New function.
4308 (add_breakpoint_commands): New function.
4309 (gdb_no_commands_at_breakpoint): New function.
4310 (run_breakpoint_commands): New function.
4311 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4312 locally.
4313 * ax.c: Include format.h.
4314 (ax_printf): New function.
4315 (gdb_eval_agent_expr): Add printf opcode.
4316
2f8f6aed
YQ
43172012-06-13 Yao Qi <yao@codesourcery.com>
4318
4319 * server.c (start_inferior): Remove duplicated writes to fields
4320 'last_resume_kind' and 'last_status' of 'current_inferior'.
4321
0c9070b3
YQ
43222012-06-12 Yao Qi <yao@codesourcery.com>
4323 Pedro Alves <palves@redhat.com>
4324
4325 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4326 comment.
4327 * server.c (handle_v_cont): Extend comment.
4328
c52daf70
YQ
43292012-06-11 Yao Qi <yao@codesourcery.com>
4330
4331 * linux-low.c (linux_attach): Add 'static'.
4332
d38bbb0a
YQ
43332012-06-06 Yao Qi <yao@codesourcery.com>
4334
4335 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4336
89dc0afd
JK
43372012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4338
4339 Fix gcc -flto compilation warning.
4340 * server.c (main): Make variable multi_mode and attach volatile.
4341
75f62ce7
TJB
43422012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4343
4344 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4345 if the platform doesn't know about it.
4346
65f479b6
PA
43472012-05-30 Jeff Kenton <jkenton@tilera.com>
4348
4349 * Makefile.in (SFILES): Add linux-tile-low.c.
4350 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4351 * configure.srv: Handle tilegx-*-linux*.
4352 * linux-tile-low.c: New file.
4353
0c5bf5a9
JK
43542012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4355
4356 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4357
a493e3e2
PA
43582012-05-24 Pedro Alves <palves@redhat.com>
4359
4360 PR gdb/7205
4361
43aaf8b6 4362 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4363
2ea28649
PA
43642012-05-24 Pedro Alves <palves@redhat.com>
4365
4366 PR gdb/7205
4367
4368 Replace target_signal with gdb_signal throughout.
4369
8d409d16
MR
43702012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4371
4372 * linux-low.c (linux_store_registers): Avoid the copying sequence
4373 when no data has been retrieved by ptrace.
4374
23512c01
MGD
43752012-05-22 Will Deacon <will.deacon@arm.com>
4376
4377 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4378 Include asm/ptrace.h.
4379 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4380 already defined.
4381
4934b29e
MR
43822012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4383
4384 * linux-low.c (linux_store_registers): Don't re-retrieve data
4385 with ptrace that has already been obtained from /proc. Always
4386 copy any data retrieved with ptrace to the buffer supplied.
4387
bde24c0a
PA
43882012-05-11 Yao Qi <yao@codesourcery.com>
4389 Pedro Alves <palves@redhat.com>
4390
4391 * linux-low.c (enum stopping_threads_kind): New.
4392 (stopping_threads): Change type to `enum stopping_threads_kind'.
4393 (handle_extended_wait): If stopping and suspending threads, leave
4394 the new_lwp suspended too.
4395 (linux_wait_for_event): Adjust.
4396 (stop_all_lwps): Set `stopping_threads' to
4397 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4398 whether we're suspending threads or just stopping them. Assert no
4399 recursion happens.
4400
623b6bdf
YQ
44012012-04-29 Yao Qi <yao@codesourcery.com>
4402
4403 * server.h: Move some code to ...
4404 * gdbthread.h: ... here. New.
4405 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4406 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4407 (nto-low.o, win32-low.o): Likewise.
4408 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4409 * regcache.c, remote-utils.c, server.c: Likewise.
4410 * target.c, tracepoint.c, win32-low.c: Likewise.
4411
f15f9948
TJB
44122012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4413
4414 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4415 (PTRACE_ARG4_TYPE): Likewise.
4416 (PTRACE_XFER_TYPE): Likewise.
4417 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4418 ptrace to PTRACE_ARG3_TYPE.
4419 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4420 (PTRACE_ARG4_TYPE): Likewise.
4421 (PTRACE_XFER_TYPE): Likewise.
4422 (linux_detach_one_lwp): Cast fourth argument of
4423 ptrace to long then PTRACE_ARG4_TYPE.
4424 (regsets_fetch_inferior_registers): Cast third argument of
4425 ptrace to long then PTRACE_ARG3_TYPE.
4426 (regsets_store_inferior_registers): Likewise.
4427
38ea300a
PA
44282012-04-20 Pedro Alves <palves@redhat.com>
4429
4430 * configure: Regenerate.
4431
c971b7fa
PA
44322012-04-19 Pedro Alves <palves@redhat.com>
4433
43aaf8b6 4434 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4435 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4436 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4437 (all, install-only, uninstall, clean-info, all-lib, clean): No
4438 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4439 (maintainer-clean realclean distclean): Use subdir_do.
4440 (subdir_do): New.
4441 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4442 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4443 * acinclude.m4: Include acx_configure_dir.m4.
4444 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4445 calls. Call AC_PROG_RANLIB. Configure gnulib using
4446 ACX_CONFIGURE_DIR.
4447 (GNULIB): New.
4448 (GNULIB_STDINT_H): Adjust.
4449 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4450 * gdbreplay.c: Include build-gnulib/config.h.
4451 * server.h: Likewise.
4452 * aclocal.m4: Regenerate.
4453 * config.in: Regenerate.
4454 * configure: Regenerate.
c971b7fa 4455
809277f8
PA
44562012-04-19 Pedro Alves <palves@redhat.com>
4457
4458 * Makefile.in (LIBGNU, INCGNU): Adjust.
4459 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4460 (all, install-only, uninstall, clean-info, all-lib, clean)
4461 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4462 * configure.ac: Adjust AC_OUTPUT output.
4463 * aclocal.m4: Regenerate.
4464 * configure: Regenerate.
4465
fd9bb8b8
PA
44662012-04-19 Pedro Alves <palves@redhat.com>
4467
4468 * Makefile.in (generated_files): New.
4469 (server_h): Remove the explicit dependency on config.h, and depend
4470 on $generated_files.
4471
1c298c66
PA
44722012-04-19 Pedro Alves <palves@redhat.com>
4473
4474 * Makefile.in (INCGNU): Add -Ignulib.
4475
57c4b50b
PA
44762012-04-19 Pedro Alves <palves@redhat.com>
4477
4478 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4479 (INCGNU): ... this, and spell out -I here.
4480 (GNULIB_LIB): Rename to ...
4481 (LIBGNU): ... this.
4482 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4483
1030e047
PA
44842012-04-19 Pedro Alves <palves@redhat.com>
4485
4486 * config.in: Regenerate.
4487
447d4319
PA
44882012-04-19 Pedro Alves <palves@redhat.com>
4489
4490 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4491 * server.h (memmem): Remove declaration.
4492 * config.in: Regenerate.
4493 * configure: Regenerate.
4494
aad9eab9
YQ
44952012-04-19 Yao Qi <yao@codesourcery.com>
4496
4497 * Makefile.in (SFILES): Add common/vec.c.
4498 (OBS): Add vec.o.
4499 (vec.o): New rule.
4500
3e10640f
YQ
45012012-04-19 Yao Qi <yao@codesourcery.com>
4502
4503 * remote-utils.c (prepare_resume_reply): Replace with macro
4504 target_core_of_thread.
4505 * server.c (handle_qxfer_threads_proper): Likewise.
4506 * target.h (traget_core_of_thread): New macro.
4507
71622373
PA
45082012-04-18 Pedro Alves <palves@redhat.com>
4509
4510 * aclocal.m4: Regenerate.
4511 * configure: Regenerate.
4512
80d26939
YQ
45132012-04-16 Yao Qi <yao@codesourcery.com>
4514
4515 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4516 duplicated on address.
4517
42476b70
YQ
45182012-04-16 Yao Qi <yao@codesourcery.com>
4519
4520 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4521 (struct tracepoint_action_ops) <send>: New field.
4522 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4523 (agent_expr_send, x_tracepoint_action_send): New.
4524 (l_tracepoint_action_send): New.
4525 (cmd_qtdp): Download and install tracepoint
4526 according to `use_agent'.
4527 (run_inferior_command): Add one more parameter `len'.
4528 Update callers.
4529 (tracepoint_send_agent): New.
4530 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4531
7bc83639
YQ
45322012-04-16 Yao Qi <yao@codesourcery.com>
4533
4534 * tracepoint.c (download_tracepoints): Moved to ...
4535 (cmd_qtstart): ... here.
4536
5f18041e
YQ
45372012-04-14 Yao Qi <yao@codesourcery.com>
4538
4539 * tracepoint.c: Include inttypes.h.
4540 (struct collect_memory_action): Use sized types.
4541 (struct tracepoint): Likewise.
4542 (cmd_qtdp, stop_tracing): Update print specifiers.
4543 (cmd_qtp, response_tracepoint): Likewise.
4544 (collect_data_at_tracepoint): Likewise.
4545 (collect_data_at_step): Likewise.
4546
55a8c076
YQ
45472012-04-14 Yao Qi <yao@codesourcery.com>
4548
4549 Import gnulib module inttypes.
4550 * aclocal.m4, config.in, configure: Regenerated.
4551
dc750257
YQ
45522012-04-14 Yao Qi <yao@codesourcery.com>
4553
4554 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4555 Makefile and config.status at last.
4556
0ab5faf9
YQ
45572012-04-13 Yao Qi <yao@codesourcery.com>
4558
4559 * tracepoint.c: Include stdint.h unconditionally.
4560
18f5fd81
TJB
45612012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4562
4563 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4564 on BFD_HAVE_SYS_PROCFS_TYPE.
4565 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4566 * configure: Regenerate.
4567 * config.in: Likewise.
4568
4d47af5c
L
45692012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4570
4571 * Makefile.in (clean): Also remove x32.c x32-linux.c
4572 x32-avx.c x32-avx-linux.c.
4573 (x32.o): New target.
4574 (x32.c): Likewise.
4575 (x32-linux.o): Likewise.
4576 (x32-linux.c): Likewise.
4577 (x32-avx.o): Likewise.
4578 (x32-avx.c): Likewise.
4579 (x32-avx-linux.o): Likewise.
4580 (x32-avx-linux.c): Likewise.
4581
4582 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4583 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4584 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4585 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4586 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4587 i386/x32-avx-linux.xml.
4588
4589 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4590 (init_registers_x32_avx_linux): Likwise.
4591 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4592 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4593
ecedbe58
PA
45942012-04-13 Pedro Alves <palves@redhat.com>
4595
4596 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4597 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4598 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4599 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4600 the sub-make.
4601
c92b5177
L
46022012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4603
4604 * linux-x86-low.c (compat_x32_clock_t): New.
4605 (compat_x32_siginfo_t): Likewise.
4606 (compat_x32_siginfo_from_siginfo): Likewise.
4607 (siginfo_from_compat_x32_siginfo): Likewise.
4608 (linux_is_elf64): Likewise.
4609 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4610 and siginfo_from_compat_x32_siginfo for x32.
4611 (x86_arch_setup): Set linux_is_elf64.
4612
214d508e
L
46132012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4614
4615 PR gdb/13969
4616 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4617 e_machine field.
4618 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4619 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4620 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4621 compatible with process.
4622
c9a1864a
YQ
46232012-04-12 Yao Qi <yao@codesourcery.com>
4624
4625 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4626 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4627 (install-only, install-info, clean): Handle sub dir gnulib.
4628 (all-lib, am--refresh): New targets.
4629 (memmem.o): Remove target.
4630 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4631 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4632 (AC_REPLACE_FUNCS): Remove memmem.
4633 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4634 (AC_OUTPUT): Generate Makefile in gnulib/.
4635 * aclocal.m4, config.in, configure: Regenerated.
4636
367ba2c2
MR
46372012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4638
4639 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4640
9d236627
PA
46412012-04-05 Pedro Alves <palves@redhat.com>
4642
4643 -Werror=strict-aliasing
4644
4645 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4646 pointer.
4647
111217b3
PA
46482012-04-04 Pedro Alves <palves@redhat.com>
4649
4650 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4651 (sparc_store_gregset_from_stack, sparc_store_gregset)
4652 (sparc_breakpoint_at): Fix formatting.
4653
8365dcf5
TJB
46542012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4655
4656 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4657 are available.
4658 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4659 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4660 * config.in: Regenerate.
4661 * configure: Likewise.
4662
689cc2ae
PA
46632012-03-29 Pedro Alves <palves@redhat.com>
4664
4665 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4666 Correct ptrace arguments.
4667
c14dfd32
PA
46682012-03-28 Pedro Alves <palves@redhat.com>
4669
4670 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4671 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4672 (IA64_FR1_REGNUM): New defines.
4673 (ia64_fetch_register): New.
4674 (the_low_target): Install it.
4675 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4676 field.
4677 * linux-low.c (linux_fetch_registers): Try the
4678 the_low_target.fetch_register hook first.
4679
4680 * linux-arm-low.c (the_low_target): Adjust.
4681 * linux-bfin-low.c (the_low_target): Adjust.
4682 * linux-cris-low.c (the_low_target): Adjust.
4683 * linux-crisv32-low.c (the_low_target): Adjust.
4684 * linux-m32r-low.c (the_low_target): Adjust.
4685 * linux-m68k-low.c (the_low_target): Adjust.
4686 * linux-mips-low.c (the_low_target): Adjust.
4687 * linux-ppc-low.c (the_low_target): Adjust.
4688 * linux-s390-low.c (the_low_target): Adjust.
4689 * linux-sh-low.c (the_low_target): Adjust.
4690 * linux-sparc-low.c (the_low_target): Adjust.
4691 * linux-tic6x-low.c (the_low_target): Adjust.
4692 * linux-x86-low.c (the_low_target): Adjust.
4693 * linux-xtensa-low.c (the_low_target): Adjust.
4694
63c88e13
PA
46952012-03-26 Pedro Alves <palves@redhat.com>
4696
4697 * server.c (handle_qxfer_libraries): Don't bail early if
4698 the_target->qxfer_libraries_svr4 is not NULL.
4699
fb723180
PA
47002012-03-26 Pedro Alves <palves@redhat.com>
4701
4702 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4703
0afae3cf
PA
47042012-03-23 Pedro Alves <palves@redhat.com>
4705
4706 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4707 "library-list-svr4" element's start tag when the the DSO list is
4708 empty.
4709
485f1ee4
PA
47102012-03-23 Pedro Alves <palves@redhat.com>
4711
4712 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4713 a variable whose type size is the same as the inferior's pointer
4714 size.
4715
a5362b9a
TS
47162012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4717
4718 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4719 struct siginfo.
4720 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4721 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4722 * linux-low.h: Include <signal.h>.
4723 (struct siginfo): Remove forward declaration.
4724 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4725 struct siginfo.
4726
d226c142
MF
47272012-03-21 Mike Frysinger <vapier@gentoo.org>
4728
4729 * .gitignore: Ignore more files.
4730
122f36ef
PA
47312012-03-19 Pedro Alves <palves@redhat.com>
4732 Jan Kratochvil <jan.kratochvil@redhat.com>
4733
4734 * server.c (cont_thread, general_thread): Add describing comments.
4735 (start_inferior): Clear `cont_thread'.
4736 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4737 of a process.
4738
fc3e5175
YQ
47392012-03-15 Yao Qi <yao@codesourcery.com>
4740
4741 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4742 handling to ...
4743 (cmd_qtdp): ... here.
4744
8d0d92cd
YQ
47452012-03-15 Yao Qi <yao@codesourcery.com>
4746
4747 * tracepoint.c (struct tracepoint_action_ops): New.
4748 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4749 (m_tracepoint_action_download): New.
4750 (r_tracepoint_action_download): New.
4751 (x_tracepoint_action_download): New.
4752 (l_tracepoint_action_download): New.
4753 (add_tracepoint_action): Install `action->ops' according type.
4754 (download_tracepoint_1): Move code `download' function pointer
4755 of various tracepoint_action_ops.
4756
87b0bb13
JK
47572012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4758
4759 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4760 linux_ptrace_attach_warnings.
4761
5f572dec
JK
47622012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4763
4764 * Makefile.in (linux-ptrace.o): New.
4765 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4766 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4767 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4768 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4769 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4770 of these targets.
4771 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4772
f4647387
YQ
47732012-03-08 Yao Qi <yao@codesourcery.com>
4774 Pedro Alves <palves@redhat.com>
4775
4776 Fix PR server/13392.
4777 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4778 offset of JMP insn.
4779 * tracepoint.c (remove_tracepoint): New.
4780 (cmd_qtdp): Call remove_tracepoint when failed to install.
4781
9b224c5e
PA
47822012-03-07 Pedro Alves <palves@redhat.com>
4783
4784 * linux-low.c (get_detach_signal): New.
4785 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4786 Pass on pending signals to PTRACE_DETACH. Check the result of the
4787 ptrace call.
4788 * server.c (program_signals, program_signals_p): New.
4789 (handle_general_set): Handle QProgramSignals.
4790 * server.h (program_signals, program_signals_p): Declare.
4791
e237a7e2
JK
47922012-03-05 Pedro Alves <palves@redhat.com>
4793 Jan Kratochvil <jan.kratochvil@redhat.com>
4794
4795 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4796 New comment why.
4797
5808517f
YQ
47982012-03-03 Yao Qi <yao@codesourcery.com>
4799
4800 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4801 agent_look_up_symbols.
4802
58b4daa5
YQ
48032012-03-03 Yao Qi <yao@codesourcery.com>
4804
4805 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4806 (linux-x86-low.o): Likewise.
4807 * server.h: Remove in_process_agent_loaded.
4808 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4809 common/agent.c.
4810 Update callers.
4811
8ffcbaaf
YQ
48122012-03-03 Yao Qi <yao@codesourcery.com>
4813
4814 * tracepoint.c (gdb_agent_capability): New global.
4815 (in_process_agent_loaded_ust): Renamed to
4816 `in_process_agent_supports_ust'.
4817 Update callers.
4818 (in_process_agent_supports_ust): Call agent_capability_check.
4819 (clear_installed_tracepoints): Assert that agent supports
4820 agent.
4821
d1feda86
YQ
48222012-03-03 Yao Qi <yao@codesourcery.com>
4823
4824 * linux-low.c (linux_supports_agent): New.
4825 (linux_target_ops): Initialize field `supports_agent' with
4826 linux_supports_agent.
4827 * target.h (struct target_ops) <supports_agent>: New.
4828 (target_supports_agent): New macro.
4829 * server.c (handle_general_set): Handle packet 'QAgent'.
4830 (handle_query): Send `QAgent+'.
4831 * Makefile.in (server.o): Depends on agent.h.
4832
2fa291ac
YQ
48332012-03-03 Yao Qi <yao@codesourcery.com>
4834
4835 * Makefile.in (OBS): Add agent.o.
4836 Add new rule for agent.o.
4837 Track dependence of tracepoint.c on agent.h.
4838 * tracepoint.c (run_inferior_command_1):
4839 (run_inferior_command): Call agent_run_command.
4840 (gdb_ust_connect_sync_socket): Deleted. Move it to
4841 common/agent.c.
4842 (resume_thread, stop_thread): Likewise.
4843 (gdb_ust_socket_init): Renamed to ...
4844 (gdb_agent_socket_init): ... New.
4845 (gdb_ust_thread): Renamed to ...
4846 (gdb_agent_helper_thread): ... New.
4847 (gdb_ust_init): Move some code to ...
4848 (gdb_agent_init): ... here. New.
4849 [HAVE_UST]: Call gdb_ust_init.
4850 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4851 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4852 * config.in, configure: Regenerated.
4853
05044653
PA
48542012-03-02 Pedro Alves <palves@redhat.com>
4855
4856 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4857 * linux-low.c (struct simple_pid_list): New.
4858 (stopped_pids): New a struct simple_pid_list pointer.
4859 (add_to_pid_list, pull_pid_from_list): New.
4860 (handle_extended_wait): Don't assume the first signal new children
4861 report is SIGSTOP. Adjust call to pull_pid_from_list.
4862 (linux_wait_for_lwp): Adjust.
4863
8d00225b
YQ
48642012-03-02 Yao Qi <yao@codesourcery.com>
4865
4866 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4867 debug log.
4868
19560ba5
YQ
48692012-03-02 Yao Qi <yao@codesourcery.com>
4870
4871 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4872 `stop_pc' and `tpoint'. Update caller.
4873
1faeff08
MR
48742012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4875
4876 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4877 * linux-low.c (use_linux_regsets): New macro.
4878 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4879 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4880 (linux_register_in_regsets): New function.
4881 (usr_fetch_inferior_registers): Skip registers covered by
4882 regsets.
4883 (usr_store_inferior_registers): Likewise.
4884 (usr_fetch_inferior_registers): New macro.
4885 (usr_store_inferior_registers): Likewise.
4886 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4887 (linux_store_registers): Likewise.
4888 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4889 prototype.
4890 (init_registers_mips64_dsp_linux): Likewise.
4891 (init_registers_mips_linux): New macro.
4892 (init_registers_mips_dsp_linux): Likewise.
4893 (mips_dsp_num_regs): Likewise.
4894 (DSP_BASE, DSP_CONTROL): New fallback macros.
4895 (mips_base_regs): New macro.
4896 (mips_regmap): Use it. Fix the size.
4897 (mips_dsp_regmap): New variable.
4898 (mips_dsp_regset_bitmap): Likewise.
4899 (mips_arch_setup): New function.
4900 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4901 than mips_regmap.
4902 (mips_cannot_store_register): Likewise.
4903 (the_low_target): Update .arch_setup, .num_regs and .regmap
4904 initializers. Add .regset_bitmap initializer.
4905 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4906 initializer.
4907 * linux-bfin-low.c (the_low_target): Likewise.
4908 * linux-cris-low.c (the_low_target): Likewise.
4909 * linux-crisv32-low.c (the_low_target): Likewise.
4910 * linux-ia64-low.c (the_low_target): Likewise.
4911 * linux-m32r-low.c (the_low_target): Likewise.
4912 * linux-m68k-low.c (the_low_target): Likewise.
4913 * linux-ppc-low.c (the_low_target): Likewise.
4914 * linux-s390-low.c (the_low_target): Likewise.
4915 * linux-sh-low.c (the_low_target): Likewise.
4916 * linux-sparc-low.c (the_low_target): Likewise.
4917 * linux-tic6x-low.c (the_low_target): Likewise.
4918 * linux-x86-low.c (the_low_target): Likewise.
4919 * linux-xtensa-low.c (the_low_target): Likewise.
4920 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4921 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4922 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4923 srv_xmlfiles.
4924 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4925 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4926
c03e6ccc
YQ
49272012-02-29 Yao Qi <yao@codesourcery.com>
4928 Pedro Alves <palves@redhat.com>
4929
4930 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4931 `step_over_finished' is true.
4932
644cebc9
PA
49332012-02-27 Pedro Alves <palves@redhat.com>
4934
4935 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4936 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4937
c14d7ab2
PA
49382012-02-27 Pedro Alves <palves@redhat.com>
4939
4940 PR server/9684
4941 * linux-low.c (pid_is_stopped): New.
4942 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4943
412c89dd
LM
49442012-02-25 Luis Machado <lgustavo@codesourcery.com>
4945
4946 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4947 of conditions.
4948
b745defe
MR
49492012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4950
4951 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4952
9f3a5c85
LM
49532012-02-24 Luis Machado <lgustavo@codesourcery>
4954
4955 * server.c (handle_query): Advertise support for target-side
4956 breakpoint condition evaluation.
4957 (process_point_options): New function.
4958 (process_serial_event): When inserting a breakpoint, check for
4959 a target-side condition that should be evaluated.
4960
4961 * mem-break.c: Include regcache.h and ax.h.
4962 (point_cond_list_t): New data structure.
4963 (breakpoint) <cond_list>: New field.
4964 (find_gdb_breakpoint_at): Make non-static.
4965 (delete_gdb_breakpoint_at): Clear any target-side
4966 conditions.
4967 (clear_gdb_breakpoint_conditions): New function.
4968 (add_condition_to_breakpoint): Likewise.
4969 (add_breakpoint_condition): Likewise.
4970 (gdb_condition_true_at_breakpoint): Likewise.
4971 (gdb_breakpoint_here): Return result directly instead
4972 of going through a local variable.
4973
4974 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4975 (clear_gdb_breakpoint_conditions): Likewise.
4976 (add_breakpoint_condition): Likewise.
4977 (gdb_condition_true_at_breakpoint): Likewise.
4978
4979 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4980 (need_step_over_p): Take target-side breakpoint condition into
4981 consideration.
4982
5e1dc496
LM
49832012-02-24 Luis Machado <lgustavo@codesourcery>
4984
4985 * server.h: Include tracepoint.h.
4986 (agent_mem_read, agent_get_trace_state_variable_value,
4987 agent_set_trace_state_variable_value,
4988 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4989 get_set_tsv_func_addr): New prototypes.
4990
4991 * ax.h: New include file.
4992 * ax.c: New source file.
4993
4994 * tracepoint.c: Include ax.h.
4995 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4996 agent_expr, eval_result_type): Move to ax.h.
4997 (parse_agent_expr): Rename to ...
4998 (gdb_parse_agent_expr): ... this, make it non-static and move
4999 to ax.h.
5000 (unparse_agent_expr) Rename to ...
5001 (gdb_unparse_agent_expr): ... this, make it non-static and move
5002 to ax.h.
5003 (eval_agent_expr): Rename to ...
5004 (eval_tracepoint_agent_expr): ... this.
5005 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5006 forward declarations.
5007 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5008 (agent_get_trace_state_variable_value): New function.
5009 (agent_set_trace_state_variable_value): New function.
5010 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5011 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5012 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5013 (condition_true_at_tracepoint): Likewise.
5014 (parse_agent_expr): Rename to ...
5015 (gdb_parse_agent_expr): ... this and move to ax.c.
5016 (unparse_agent_expr): Rename to ...
5017 (gdb_unparse_agent_expr): ... this and move to ax.c.
5018 (gdb_agent_op_name): Move to ax.c.
5019 (eval_agent_expr): Rename to ...
5020 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5021 and move to ax.c.
5022 (eval_tracepoint_agent_expr): New function.
5023 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5024 non-static.
5e1dc496
LM
5025 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5026 ax.c.
5027 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5028 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5029 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5030 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5031 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5032 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5033 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5034 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5035 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5036 (compile_bytecodes): Remove forward declaration.
5037 (is_goto_target): Move to ax.c.
5038 (compile_bytecodes): Move to ax.c and call
5039 agent_get_trace_state_variable_value (...) and
5040 agent_set_trace_state_variable_value (...).
5041
5042 * Makefile.in: Update ax.c and IPA dependencies.
5043
277e4e52
PA
50442012-02-24 Pedro Alves <palves@redhat.com>
5045
5046 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5047 (cmd_bigqtbuffer_circular): ... this. Only handle
5048 'QTBuffer:circular:'.
5049 (handle_tracepoint_general_set): Adjust.
5050
bf4c19f7
YQ
50512012-02-16 Yao Qi <yao@codesourcery.com>
5052
5053 * inferiors.c: Move code to ...
5054 * dll.c: .... here. New.
5055 * server.h: Declare clear_dlls.
5056 * Makefile.in (SFILES): Add dll.c.
5057 (OBS): Add dll.o
5058 (dll.o): New rule.
5059
d73f2619
YQ
50602012-02-11 Yao Qi <yao@codesourcery.com>
5061
5062 * server.c: (handle_monitor_command): Add a new parameter
5063 `own_buf'.
5064 (handle_query): Update caller.
5065
f8255c2a
JB
50662012-02-09 Joel Brobecker <brobecker@adacore.com>
5067
5068 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5069 * configure, config.in: Regenerate.
5070 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5071 is not defined.
5072
da84f473
PA
50732012-02-02 Pedro Alves <palves@redhat.com>
5074
5075 Try SIGKILL first, then PTRACE_KILL.
5076 * linux-low.c (linux_kill_one_lwp): New.
5077 (linux_kill_one_lwp): Rename to ...
5078 (kill_one_lwp_callback): ... this. Use the new
5079 linux_kill_one_lwp.
5080
e886a173
PA
50812012-02-02 Pedro Alves <palves@redhat.com>
5082
5083 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5084 inferior.
5085
be07f1a2
PA
50862012-01-27 Pedro Alves <palves@redhat.com>
5087
5088 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5089 (elf_64_file_p): Make static.
5090 (linux_pid_exe_is_elf_64_file): New.
5091 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5092 Delete declarations.
5093 (linux_pid_exe_is_elf_64_file): Declare.
5094 * linux-x86-low.c (x86_arch_setup): Use
5095 linux_pid_exe_is_elf_64_file.
5096
d8301ad1
JK
50972012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5098
5099 * linux-low.c (linux_wait_for_event_1): Rename to ...
5100 (linux_wait_for_event): ... here and merge it with former
5101 linux_wait_for_event - new variable wait_ptid, use it.
5102 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5103
01b17894
PA
51042012-01-23 Pedro Alves <palves@redhat.com>
5105
5106 * server.c (main): Avoid yet another case of infinite loop while
5107 detaching/killing after a longjmp.
5108
e825046f
JK
51092012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5110
5111 Code cleanup.
5112 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5113
b9e7b9c3
UW
51142012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5115
5116 * hostio.c (handle_readlink): New function.
5117 (handle_vFile): Call it to handle "vFile:readlink" packets.
5118
901f9912
UW
51192012-01-20 Pedro Alves <palves@redhat.com>
5120 Ulrich Weigand <ulrich.weigand@linaro.org>
5121
5122 * server.c (handle_v_requests): Only support vAttach and vRun to
5123 start multiple processes when in extended protocol mode.
5124
fc1ab1a0
PA
51252012-01-17 Pedro Alves <palves@redhat.com>
5126
5127 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5128 memalign plus mprotect to allocate the scratch buffer.
5129
7d5d4e98
PA
51302012-01-13 Pedro Alves <palves@redhat.com>
5131
5132 * server.c (attach_inferior): Clear `cont_thread'.
5133
f128d5e9
PA
51342012-01-13 Pedro Alves <palves@redhat.com>
5135
5136 * server.c (main): Avoid infinite loop while detaching/killing
5137 after a longjmp.
5138
06db92f0
DE
51392012-01-09 Doug Evans <dje@google.com>
5140
5141 * server.c (start_inferior): Set last_ptid in --wrapper case.
5142
32d92999
YQ
51432012-01-06 Yao Qi <yao@codesourcery.com>
5144
5145 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5146 defined.
5147 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5148
5e0a92a9
YQ
51492012-01-04 Yao Qi <yao@codesourcery.com>
5150
5151 * tracepoint.c (cmd_qtdp): Print debug message
5152 for static tracepoint.
5153
ae639e8c
YQ
51542012-01-04 Yao Qi <yao@codesourcery.com>
5155
5156 * tracepoint.c (trace_vdebug): Differentiate debug message
5157 between gdbserver and IPA.
5158
f72429c5
YQ
51592012-01-03 Yao Qi <yao@codesourcery.com>
5160
5161 * tracepoint.c (tracepoint_was_hit): Don't collect for
5162 static tracepoint.
5163
12c3e59c
JB
51642012-01-02 Joel Brobecker <brobecker@adacore.com>
5165
5166 * terminal.h: Reformat copyright header.
5167
67827812
JB
51682012-01-02 Joel Brobecker <brobecker@adacore.com>
5169
5170 * server.c (gdbserver_version): Update copyright year.
5171 * gdbreplay.c (gdbreplay_version): Likewise.
5172
3e52c33d
JK
51732011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5174
5175 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5176
5177 Revert:
5178 2011-12-18 Hui Zhu <teawater@gmail.com>
5179 * linux-low.c (linux_create_inferior): Save return value to ret.
5180
66f1260e
HZ
51812011-12-18 Hui Zhu <teawater@gmail.com>
5182
5183 * linux-low.c (linux_create_inferior): Save return value to ret.
5184
e77616d7
DE
51852011-12-16 Doug Evans <dje@google.com>
5186
e7b06c57
DE
5187 * linux-low.c (linux_create_inferior): If stdio connection,
5188 redirect stdin from /dev/null, stdout to stderr.
5189 * remote-utils.c (remote_is_stdio): New static global.
5190 (remote_connection_is_stdio): New function.
5191 (remote_prepare): Handle stdio connection.
5192 (remote_open): Ditto.
5193 (remote_close): Don't close stdin for stdio connections.
5194 (read_prim,write_prim): New functions. Replace all calls to
5195 read/write to these.
5196 * server.c (main): Watch for "-" argument. Move call to
5197 remote_prepare before start_inferior.
5198 * server.h (STDIO_CONNECTION_NAME): New macro.
5199 (remote_connection_is_stdio): Declare.
5200
e77616d7
DE
5201 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5202 in debugging output.
5203
82067193
YQ
52042011-12-15 Yao Qi <yao@codesourcery.com>
5205
5206 * tracepoint.c: Include sys/syscall.h.
5207 (gdb_ust_thread): Remove preprocessor conditional.
5208
82bfbe7e
PA
52092011-12-14 Pedro Alves <pedro@codesourcery.com>
5210
5211 * linux-low.c (linux_detach_one_lwp): Call
5212 the_low_target.prepare_to_resume before detaching.
5213
712c6575
YQ
52142011-12-14 Yao Qi <yao@codesourcery.com>
5215
5216 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5217 of write.
5218
d54d1edf
YQ
52192011-12-14 Yao Qi <yao@codesourcery.com>
5220
5221 * i386-low.c (i386_low_stopped_data_address): Initialize local
5222 variable `control'.
5223
6210a125
PA
52242011-12-13 Pedro Alves <pedro@codesourcery.com>
5225
5226 PR remote/13492
5227
5228 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5229 DR_CONTROL unless necessary. Extend comments.
5230 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5231 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5232
2ece8244
YQ
52332011-12-13 Yao Qi <yao@codesourcery.com>
5234
5235 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5236 macros.
5237 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5238
784867a5
JK
52392011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5240
5241 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5242 Print new debug message for such case.
5243
6bf36717
JK
52442011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5245
5246 Fix overlapping memcpy.
5247 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5248 the read_inferior_memory transfer.
5249 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5250 write_inferior_memory transfer.
5251 (set_fast_tracepoint_jump): New variable buf. Use it for the
5252 read_inferior_memory and write_inferior_memory transfers.
5253 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5254 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5255 Use it for the write_inferior_memory transfer.
5256 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5257 buffers.
5258
50275556
MR
52592011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5260
5261 * linux-low.c (fetch_register, store_register): Make code
5262 consistent, fix formatting.
5263
7325beb4
MR
52642011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5265
5266 * linux-low.c (usr_store_inferior_registers): Factor out code
5267 to handle individual registers into...
5268 (store_register): ... this new function.
5269
c642a434
UW
52702011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5271
5272 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5273 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5274 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5275 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5276 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5277 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5278 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5279 (srv_xmlfiles): Add new XML files.
5280
5281 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5282 and <sys/uio.h>.
5283 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5284 (init_registers_s390_linux32v1): Add prototype.
5285 (init_registers_s390_linux32v2): Likewise.
5286 (init_registers_s390_linux64v1): Likewise.
5287 (init_registers_s390_linux64v2): Likewise.
5288 (init_registers_s390x_linux64v1): Likewise.
5289 (init_registers_s390x_linux64v2): Likewise.
5290 (s390_num_regs): Increment to 52.
5291 (s390_regmap): Add orig_r2 register.
5292 (s390_num_regs_3264): Increment to 68.
5293 (s390_regmap_3264): Add orig_r2 register.
5294 (s390_collect_ptrace_register): Handle orig_r2 register.
5295 (s390_supply_ptrace_register): Likewise.
5296 (s390_fill_last_break): New function.
5297 (s390_store_last_break): Likewise.
5298 (s390_fill_system_call): New function.
5299 (s390_store_system_call): Likewise.
5300 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5301 register sets.
5302 (s390_check_regset): New function.
5303 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5304 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5305 Update target_regsets for available register sets.
5306
2268b414
JK
53072011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5308 Jan Kratochvil <jan.kratochvil@redhat.com>
5309
5310 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5311 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5312 New.
5313 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5314 * linux-low.h (struct process_info_private): New member r_debug.
5315 * server.c (handle_qxfer_libraries): Call
5316 the_target->qxfer_libraries_svr4.
5317 (handle_qxfer_libraries_svr4): New function.
5318 (qxfer_packets): New entry "libraries-svr4".
5319 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5320 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5321 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5322 PACKET_qXfer_libraries_svr4.
5323
d6db1fab
UW
53242011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5325
5326 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5327 PSW address/mask between 8-byte and 16-byte formats.
5328 (s390_supply_ptrace_register): Likewise.
5329 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5330 basic addressing mode bit.
5331
242f5f1c
SS
53322011-11-24 Stan Shebs <stan@codesourcery.com>
5333
5334 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5335
f196051f
SS
53362011-11-17 Stan Shebs <stan@codesourcery.com>
5337
5338 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5339 (tracing_start_time): New global.
5340 (tracing_stop_time): New global.
5341 (tracing_user_name): New global.
5342 (tracing_notes): New global.
5343 (tracing_stop_note): New global.
5344 (cmd_qtstart): Set traceframe_usage, start_time.
5345 (stop_tracing): Set stop_time.
5346 (cmd_qtstatus): Report additional status.
5347 (cmd_qtp): New function.
5348 (handle_tracepoint_query): Call it.
5349 (cmd_qtnotes): New function.
5350 (handle_tracepoint_general_set): Call it.
5351 (get_timestamp): Rename from tsv_get_timestamp.
5352
405f8e94
SS
53532011-11-14 Stan Shebs <stan@codesourcery.com>
5354 Kwok Cheung Yeung <kcy@codesourcery.com>
5355
5356 * linux-x86-low.c (small_jump_insn): New.
5357 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5358 trampoline and error message, build a trampoline and issue a small
5359 jump instruction to it.
5360 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5361 trampoline and error message.
5362 (x86_get_min_fast_tracepoint_insn_len): New.
5363 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5364 * linux-low.h (struct linux_target_ops): Add arguments to
5365 install_fast_tracepoint_jump_pad operation, add new operation.
5366 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5367 arguments.
5368 (linux_get_min_fast_tracepoint_insn_len): New function.
5369 (linux_target_op): Add new operation.
5370 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5371 (gdb_trampoline_buffer_end): Ditto.
5372 (gdb_trampoline_buffer_error): Ditto.
5373 (struct ipa_sym_addresses): Add fields for new IPA variables.
5374 (symbol_list): Add entries for new IPA variables.
5375 (struct tracepoint): Add fields to hold the address range of the
5376 trampoline used by the tracepoint.
5377 (trampoline_buffer_head): New static variable.
5378 (trampoline_buffer_tail): Ditto.
5379 (claim_trampoline_space): New function.
5380 (have_fast_tracepoint_trampoline_buffer): New function.
5381 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5382 structure.
5383 (install_fast_tracepoint): Ditto, also add error buffer argument.
5384 (cmd_qtminftpilen): New function.
5385 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5386 (fast_tracepoint_from_trampoline_address): New function.
5387 (fast_tracepoint_collecting): Handle trampoline as part of jump
5388 pad space.
5389 (set_trampoline_buffer_space): New function.
5390 (initialize_tracepoint): Initialize new IPA variables.
5391 * target.h (struct target_ops): Add arguments to
5392 install_fast_tracepoint_jump_pad operation, add new
5393 get_min_fast_tracepoint_insn_len operation.
5394 (target_get_min_fast_tracepoint_insn_len): New.
5395 (install_fast_tracepoint_jump_pad): Add arguments.
5396 * server.h (IPA_BUFSIZ): Define.
5397 * linux-i386-ipa.c: Include extra header files.
5398 (initialize_fast_tracepoint_trampoline_buffer): New function.
5399 (initialize_low_tracepoint): Call it.
5400 * server.h (set_trampoline_buffer_space): Declare.
5401 (claim_trampoline_space): Ditto.
5402 (have_fast_tracepoint_trampoline_buffer): Ditto.
5403
1e4d1764
YQ
54042011-11-14 Yao Qi <yao@codesourcery.com>
5405
5406 * server.c (handle_query): Handle InstallInTrace for qSupported.
5407 * tracepoint.c (add_tracepoint): Sort list.
5408 (install_tracepoint, download_tracepoint): New.
5409 (cmd_qtdp): Call them to install and download tracepoints.
5410 (sort_tracepoints): Removed.
5411 (cmd_qtstart): Update.
5412
5c73ff4e
YQ
54132011-11-14 Yao Qi <yao@codesourcery.com>
5414
5415 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5416 * mem-break.h: Declare.
5417 * tracepoint.c (cmd_qtstart): Move some code to ...
5418 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5419 New.
5420 (download_tracepoints): Move some code to ...
5421 (download_tracepoint_1): ... here. New.
5422
86a30030
YQ
54232011-11-08 Yao Qi <yao@codesourcery.com>
5424
5425 * remote-utils.c (relocate_instruction): A comment fix.
5426
8d26e50c
JB
54272011-11-07 Joel Brobecker <brobecker@adacore.com>
5428
5429 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5430 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5431 dr_status_mirror and dr_control_mirror from debug_reg_state.
5432 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5433 (i386_initial_stuff): Remove use of deleted globals.
5434 (i386_get_thread_context, i386_set_thread_context,
5435 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5436 from debug_reg_state.
5437
a59306a3
YQ
54382011-11-05 Yao Qi <yao@codesourcery.com>
5439
5440 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5441 address as TPOINT's.
5442
3065dfb6
SS
54432011-11-02 Stan Shebs <stan@codesourcery.com>
5444
5445 * tracepoint.c (agent_mem_read_string): New function.
5446 (eval_agent_expr): Call it for tracenz.
5447 * server.c (handle_query): Report support for tracenz.
5448
fd0d8c7c
YQ
54492011-11-02 Yao Qi <yao@codesourcery.com>
5450
5451 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5452
609086b1
YQ
54532011-11-02 Yao Qi <yao@codesourcery.com>
5454
5455 * target.h: Fix a typo in comment.
5456
b9fd1791
PA
54572011-10-31 Pedro Alves <pedro@codesourcery.com>
5458
5459 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5460 clobber the breakpoints' shadows with fast tracepoint jumps.
5461 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5462 * target.c (write_inferior_memory): Also pass MYADDR down to
5463 check_mem_write.
5464
03583c20
UW
54652011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5466
5467 * configure.ac: Check support for personality routine.
5468 * configure: Regenerate.
5469 * config.in: Likewise.
5470 * linux-low.c: Include <sys/personality.h>.
5471 Define ADDR_NO_RANDOMIZE if necessary.
5472 (linux_create_inferior): Disable address space randomization when
5473 forking inferior, if requested.
5474 (linux_supports_disable_randomization): New function.
5475 (linux_target_ops): Install it.
5476 * server.h (disable_randomization): Declare.
5477 * server.c (disable_randomization): New global variable.
5478 (handle_general_set): Handle QDisableRandomization.
5479 (handle_query): Likewise for qSupported.
5480 (main): Support --disable-randomization and --no-disable-randomization
5481 command line arguments.
5482 * target.h (struct target_ops): Add supports_disable_randomization.
5483 (target_supports_disable_randomization): New macro.
5484
723b724b
MF
54852011-09-29 Mike Frysinger <vapier@gentoo.org>
5486
5487 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5488 ifdef check.
5489 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5490 [!PT_GETDSBT] (target_loadmap): New definition.
5491 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5492 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5493 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5494 and PT_GETDSBT to LINUX_LOADMAP.
5495 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5496 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5497
55329a5c 54982011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5499
5500 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5501 (arm_linux_hwbp_cap): New static variable.
5502 (arm_linux_get_hwbp_cap): Replace by ...
5503 (arm_linux_init_hwbp_cap): ... this new function.
5504 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5505 (arm_linux_get_hw_watchpoint_count): Likewise.
5506 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5507 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5508 (arm_prepare_to_resume): Use perror_with_name instead of error.
5509
55329a5c 55102011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5511
5512 * linux-arm-low.c: Include <signal.h>.
5513 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5514 (struct arm_linux_hwbp_cap): New data type.
5515 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5516 (struct arm_linux_hw_breakpoint): New data type.
5517 (MAX_BPTS, MAX_WPTS): Define.
5518 (struct arch_process_info, struct arch_lwp_info): New data types.
5519 (arm_linux_get_hwbp_cap): New function.
5520 (arm_linux_get_hw_breakpoint_count): Likewise.
5521 (arm_linux_get_hw_watchpoint_count): Likewise.
5522 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5523 (arm_hwbp_control_initialize): Likewise.
5524 (arm_hwbp_control_is_enabled): Likewise.
5525 (arm_hwbp_control_is_initialized): Likewise.
5526 (arm_hwbp_control_disable): Likewise.
5527 (arm_linux_hw_breakpoint_equal): Likewise.
5528 (arm_linux_hw_point_initialize): Likewise.
5529 (struct update_registers_data): New data structure.
5530 (update_registers_callback: New function.
5531 (arm_insert_point): Likewise.
5532 (arm_remove_point): Likewise.
5533 (arm_stopped_by_watchpoint): Likewise.
5534 (arm_stopped_data_address): Likewise.
5535 (arm_new_process): Likewise.
5536 (arm_new_thread): Likewise.
5537 (arm_prepare_to_resume): Likewise.
5538 (the_low_target): Register arm_insert_point, arm_remove_point,
5539 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5540 arm_new_thread, and arm_prepare_to_resume.
5541
6b9801d4
SS
55422011-09-15 Stan Shebs <stan@codesourcery.com>
5543
5544 * server.h (struct emit_ops): Add compare-goto fields.
5545 * tracepoint.c (gdb_agent_op_sizes): New table.
5546 (emit_eq_goto): New function.
5547 (emit_ne_goto): New function.
5548 (emit_lt_goto): New function.
5549 (emit_le_goto): New function.
5550 (emit_gt_goto): New function.
5551 (emit_ge_goto): New function.
5552 (is_goto_target): New function.
5553 (compile_bytecodes): Recognize special cases of compare-goto
5554 combinations and call specialized emitters for them.
5555 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5556 (amd64_emit_ne_goto): New function.
5557 (amd64_emit_lt_goto): New function.
5558 (amd64_emit_le_goto): New function.
5559 (amd64_emit_gt_goto): New function.
5560 (amd64_emit_ge_goto): New function.
5561 (amd64_emit_ops): Add the new functions.
5562 (i386_emit_eq_goto): New function.
5563 (i386_emit_ne_goto): New function.
5564 (i386_emit_lt_goto): New function.
5565 (i386_emit_le_goto): New function.
5566 (i386_emit_gt_goto): New function.
5567 (i386_emit_ge_goto): New function.
5568 (i386_emit_ops): Add the new functions.
5569
bf15cbda
SS
55702011-09-08 Stan Shebs <stan@codesourcery.com>
5571
5572 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5573 (i386_emit_epilogue): Restore %ebx.
5574
943ca1dd
JZ
55752011-08-31 Jie Zhang <jzhang918@gmail.com>
5576
5577 * server.c (step_thread): Remove definition.
5578 (process_serial_event): Don't handle Hs.
5579 * server.h (step_thread): Remove declaration.
5580 * target.c (set_desired_inferior): Remove use of step_thread.
5581
e3deef73
LM
55822011-08-24 Luis Machado <lgustavo@codesourcery.com>
5583
5584 * linux-low.c: Include linux-procfs.h.
5585 (linux_attach_lwp_1): Update comments.
5586 (linux_attach): Scan for existing threads when attaching to a
5587 process that is the tgid.
5588 * Makefile.in: Update dependencies.
5589
13da1c97
LM
55902011-08-24 Luis Machado <lgustavo@codesourcery.com>
5591
5592 * configure.srv: Add linux-procfs.o dependencies.
5593
881127c9
YQ
55942011-08-14 Yao Qi <yao@codesourcery.com>
5595
5596 * target.h (struct target_ops): Fix indent.
5597 * win32-low.c (win32_target_ops): Fix comment.
5598
58dbd541
YQ
55992011-08-14 Andrew Jenner <andrew@codesourcery.com>
5600 Yao Qi <yao@codesourcery.com>
5601
5602 * Makefile.in (clean): Remove tic6x-*.c files.
5603 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5604 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5605 (tic6x-c64xp-linux.c): Likewise.
5606 * configure.srv: Add support for tic6x-*-uclinux.
5607 * linux-tic6x-low.c: New.
5608 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5609
78d85199
YQ
56102011-08-14 Andrew Stubbs <ams@codesourcery.com>
5611 Yao Qi <yao@codesourcery.com>
5612
5613 * target.h (struct target_ops): Add read_loadmap.
5614 * linux-low.c (struct target_loadseg): New type.
5615 (struct target_loadmap): New type.
5616 (linux_read_loadmap): New function.
5617 (linux_target_ops): Add linux_read_loadmap.
5618 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5619 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5620 to NULL.
78d85199 5621
a959a88d
EZ
56222011-08-05 Eli Zaretskii <eliz@gnu.org>
5623
5624 * win32-low.c: Include <stdint.h>.
5625
1ced966e
PA
56262011-07-22 Pedro Alves <pedro@codesourcery.com>
5627
5628 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5629 to the inferior here.
5630 (i386_remove_aligned_watchpoint): Ditto.
5631 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5632 fit part of the watchpoint in the debug registers.
5633 (i386_update_inferior_debug_regs): New.
5634 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5635 registers, and only update the inferior on success.
5636 (i386_low_remove_watchpoint): Ditto.
5637
d26e3629
KY
56382011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5639
5640 * linux-low.c (compare_ints, unique, list_threads, show_process,
5641 linux_core_of_thread): Delete.
5642 (linux_target_ops): Change linux_core_of_thread to
5643 linux_common_core_of_thread.
5644 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5645 * utils.c (malloc_failure): Change type of argument.
5646 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5647 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5648 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5649 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5650 (IPA_OBJS): Add common-utils-ipa.o.
5651 (ptid_h, linux_osdata_h): New macros.
5652 (server_h): Add common/common-utils.h, common/xml-utils.h,
5653 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5654 common/ptid.h.
5655 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5656 ptid.o, buffer.o): New rules.
5657 (linux-low.o): Add common/linux-osdata.h as a dependency.
5658 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5659 * configure.ac: Add AC_HEADER_DIRENT check.
5660 * config.in: Regenerate.
5661 * configure: Regenerate.
5662 * remote-utils.c (xml_escape_text): Delete.
5663 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5664 buffer_xml_printf): Move to common/buffer.c.
5665 * server.c (main): Remove call to initialize_inferiors.
5666 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5667 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5668 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5669 internal_error, gdb_assert, gdb_assert_fail): Delete.
5670 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5671 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5672 common/buffer.h.
5673 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5674 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5675 initialize_inferiors): Delete.
5676
2275a1a7
PA
56772011-07-20 Pedro Alves <pedro@codesourcery.com>
5678
5679 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5680 symbol error.
5681
0a5b1e09
PA
56822011-05-31 Pedro Alves <pedro@codesourcery.com>
5683
5684 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5685 assertion.
5686 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5687
6938fd34
YQ
56882011-05-26 Yao Qi <yao@codesourcery.com>
5689
5690 * Makefile.in (thread-db.o): Track dependence to
5691 common/gdb_thread_db.h.
5692 * thread-db.c: include gdb_thread_db.h from right place.
5693
b481f9e0
TT
56942011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5695
5696 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5697 __FILE__ and __LINE__ to internal_error.
5698
98a5dd13
DE
56992011-05-13 Doug Evans <dje@google.com>
5700
5701 * thread-db.c (try_thread_db_load_from_sdir): New function.
5702 (try_thread_db_load_from_dir): New function.
5703 (thread_db_load_search): Handle $sdir, ignore $pdir.
5704 Remove trying of system directories if search of
5705 libthread-db-search-path fails, that is now done via $sdir.
5706
d248b706
KY
57072011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5708
5709 * server.c (handle_query): Add EnableDisableTracepoints to the list
5710 of supported features.
43aaf8b6 5711 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5712 tracepoints.
43aaf8b6
PA
5713 (cmd_qtenable_disable): New.
5714 (cmd_qtstart): Install tracepoints even if disabled.
5715 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5716 receiving a QTEnable or QTDisable packet.
5717 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5718 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5719 tracepoints.
5720 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5721
84e578fb
DE
57222011-05-10 Doug Evans <dje@google.com>
5723
5724 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5725
71f55dd8
DE
57262011-05-04 Doug Evans <dje@google.com>
5727
5728 * linux-low.c (linux_join): Skip process lookup.
5729 * spu-low.c (spu_join): Ditto.
5730 * server.c (join_inferiors_callback): Delete.
5731 (process_serial_event): For 'D' packet (detach) call join_inferior
5732 directly.
5733
4d393d60
JM
57342011-05-04 Joseph Myers <joseph@codesourcery.com>
5735
5736 * README: Don't mention xscale*-*-linux*.
5737 * configure.srv (xscale*-*-linux*): Don't handle target.
5738
b00ad6ff
NF
57392011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5740
5741 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5742 casting pointers.
5743 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5744 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5745 (i386_emit_void_call_2): Likewise.
5746
af96c192
YQ
57472011-04-26 Yao Qi <yao@codesourcery.com>
5748
43aaf8b6
PA
5749 * linux-low.c: Move common macros to linux-ptrace.h.
5750 Include linux-ptrace.h.
af96c192
YQ
5751 * Makefile.in (linux_ptrace_h): New.
5752 (linux-low.o): Depends on linux-ptrace.h.
5753
03f2bd59
JK
57542011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5755
5756 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5757 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5758 (remote_prepare): New function with most of the TCP code from ...
5759 (remote_open): ... here. Detect PORT here unconditionally. Move also
5760 setting transport_is_reliable.
5761 * server.c (run_once): New variable.
5762 (gdbserver_usage): Document it.
5763 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5764 the first run if RUN_ONCE.
5765 * server.h (run_once, remote_prepare): New declarations.
5766
7a9dd1b2
TT
57672011-04-19 Tom Tromey <tromey@redhat.com>
5768
5769 * win32-low.c (handle_load_dll): Remove duplicate "the".
5770
81239425
PM
57712011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5772
5773 Remove support for old Cygwin 1.5 versions.
5774 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5775 function to avoid warning.
5776 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5777 warning.
5778
9e0627f1
PM
57792011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5780
5781 * gdbserver/server.h (Macro _): Define it if not available.
5782
588eebee
MS
57832011-03-14 Michael Snyder <msnyder@vmware.com>
5784
348af9f7 5785 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5786
43f70d4c
JB
57872011-03-10 Joel Brobecker <brobecker@adacore.com>
5788
5789 * Makefile.in (maintainer-clean realclean distclean): Remove
5790 "make ... subdir_do" command.
5791
348af9f7
MS
57922011-03-10 Michael Snyder <msnyder@vmware.com>
5793
5794 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5795
5796 * server.c (handle_v_run): Free alloced buffer on early return.
5797
e637a4f5
YQ
57982011-03-09 Yao Qi <yao@codesourcery.com>
5799
5800 Revert:
5801 2011-03-04 Yao Qi <yao@codesourcery.com>
5802
5803 * Makefile.in: Remove GNU make feature --directory.
5804
5805 2011-03-05 Yao Qi <yao@codesourcery.com>
5806
5807 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5808 (subdir_do): New make target. Copied from gdb/Makefile.
5809 (maintainer-clean, realclean, distclean, clean): Call corresponding
5810 make targets in common/Makefile.
5811
5812 2011-02-11 Yao Qi <yao@codesourcery.com>
5813
5814 * configure.ac: Call AC_PROG_RANLIB.
5815 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5816 * configure: Regenerate.
5817
e6edda56
JK
58182011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5819
5820 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5821
e5141119
JB
58222011-03-06 Yao Qi <yao@codesourcery.com>
5823
5824 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5825
64794aa4
JB
58262011-03-05 Yao Qi <yao@codesourcery.com>
5827
5828 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5829 (subdir_do): New make target. Copied from gdb/Makefile.
5830 (maintainer-clean, realclean, distclean, clean): Call corresponding
5831 make targets in common/Makefile.
5832
7a762829
YQ
58332011-03-04 Yao Qi <yao@codesourcery.com>
5834
5835 * Makefile.in: Remove GNU make feature --directory.
5836
348af9f7
MS
58372011-03-04 Michael Snyder <msnyder@vmware.com>
5838
5839 * server.c (queue_stop_reply): Call xmalloc not malloc.
5840
58412011-03-02 Michael Snyder <msnyder@vmware.com>
5842
5843 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5844
9f72fee2
MS
58452011-02-28 Michael Snyder <msnyder@vmware.com>
5846
588eebee
MS
5847 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5848 (cmd_qtframe): Ditto.
5849 (cmd_qtbuffer): Ditto.
5850 (cmd_bigqtbuffer): Ditto.
5851
9f72fee2
MS
5852 * utils.c (decimal2str): Initialize 'width' to nine, then
5853 don't mess with it.
5854
8040bd49
UW
58552011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5856
5857 * hostio.c (require_data): Free *data, not data.
5858
7e52cbd0
JK
58592011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5860
5861 * hostio.c (require_data): Use free, not xfree.
5862
9130f83e
MS
58632011-02-27 Michael Snyder <msnyder@vmware.com>
5864
4b812f4e
MS
5865 * server.c (handle_query): Discard unused value.
5866
9130f83e
MS
5867 * hostio.c (require_data): Free malloc memory before returning
5868 error.
5869
69d37113
MS
58702011-02-26 Michael Snyder <msnyder@vmware.com>
5871
5872 * linux-low.c (list_threads): Call closedir for dirent.
5873
35f5825a
MS
58742011-02-27 Michael Snyder <msnyder@vmware.com>
5875
2a589cef
MS
5876 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5877 a case statement falls through.
5878
0adea5f7
MS
5879 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5880
35f5825a
MS
5881 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5882 in comparison.
5883
238f1c74
MS
58842011-02-26 Michael Snyder <msnyder@vmware.com>
5885
5886 * utils.c (decimal2str): Eliminate dead code and dead param.
5887 (pulongest): Drop dead param from call to decimal2str.
5888 (plongest): Ditto.
5889
633ff500
JB
58902011-02-24 Joel Brobecker <brobecker@adacore.com>
5891
5892 Revert the following patch (not approved yet):
5893 2011-02-21 Hui Zhu <teawater@gmail.com>
5894 * tracepoint.c (tp_printf): New function.
5895 (eval_agent_expr): Handle gdb_agent_op_printf.
5896
f9c6ff72
HZ
58972011-02-21 Hui Zhu <teawater@gmail.com>
5898
5899 * tracepoint.c (tp_printf): New function.
5900 (eval_agent_expr): Handle gdb_agent_op_printf.
5901
94d5e490
TT
59022011-02-18 Tom Tromey <tromey@redhat.com>
5903
5904 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5905 (tracepoint.o): Likewise.
5906 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5907 (gdb_agent_op_names): Likewise.
5908
c7f96d2b
TT
59092011-02-18 Tom Tromey <tromey@redhat.com>
5910
5911 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5912 gdb_agent_op_rot>: New constants.
5913 (gdb_agent_op_names): Add pick and roll.
5914 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5915 cases.
5916
0feedb2c
JK
59172011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5918
5919 * aclocal.m4: Regenerated with aclocal-1.11.1.
5920
b3b9301e
PA
59212011-02-14 Pedro Alves <pedro@codesourcery.com>
5922
5923 * server.c (handle_qxfer_traceframe_info): New.
5924 (qxfer_packets): Register "traceframe-info".
5925 (handle_query): Report support for qXfer:traceframe-info:read+.
5926 * tracepoint.c (match_blocktype): New.
5927 (traceframe_find_block_type): Rename to ...
5928 (traceframe_walk_blocks): ... this. Add callback filter argument,
5929 and use it.
5930 (traceframe_find_block_type): New, reimplemented on top of
5931 traceframe_walk_blocks.
5932 (build_traceframe_info_xml): New.
5933 (traceframe_read_info): New.
5934 * server.h (traceframe_read_info): Declare.
5935
4f3e6fb7
YQ
59362011-02-11 Yao Qi <yao@codesourcery.com>
5937
5938 * configure.ac: Call AC_PROG_RANLIB.
5939 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5940 * configure: Regenerate.
5941
764880b7
PA
59422011-02-07 Pedro Alves <pedro@codesourcery.com>
5943
5944 * server.c (gdb_read_memory): Change return semantics to allow
5945 partial transfers.
5946 (handle_search_memory_1): Adjust.
5947 (process_serial_event) <'m' packet>: Handle partial transfers.
5948 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5949
1c79eb8a
PA
59502011-01-28 Pedro Alves <pedro@codesourcery.com>
5951
5952 * regcache.c (init_register_cache): Initialize
5953 regcache->register_status.
5954 (free_register_cache): Release regcache->register_status.
5955 (regcache_cpy): Copy register_status.
5956 (registers_to_string): Print 'x's for unavailable registers.
5957 (supply_register): Mark the register's status valid or
5958 unavailable, depending on whether a buffer was passed in or not.
5959 (supply_register_zeroed): New.
5960 (supply_regblock): Mark the registers' status valid or
5961 unavailable, depending on whether a buffer was passed in or not.
5962 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5963 (struct regcache): New `register_status' field.
5964 (supply_register_zeroed): Declare.
5965 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5966 supply_register_zeroed, rather than passing a NULL buffer to
5967 supply_register.
5968 * tracepoint.c (fetch_traceframe_registers): Update comment.
5969
85724a0e
PA
59702011-01-28 Pedro Alves <pedro@codesourcery.com>
5971
5972 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5973 buffer explicit.
5974
d08aafef
PA
59752011-01-25 Pedro Alves <pedro@codesourcery.com>
5976
5977 * server.h (decode_xfer_write): Change prototype.
5978 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5979 and don't extract the annex here.
5980 * server.c (decode_xfer_read): Remove `annex' parameter,
5981 and don't extract the annex here.
5982 (decode_xfer): New.
5983 (struct qxfer): New.
5984 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5985 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5986 (handle_qxfer_statictrace): New functions, abstracted out from
5987 handle_query, and made to use the struct qxfer interface.
5988 (handle_threads_qxfer_proper): Rename to ...
5989 (handle_qxfer_threads_proper): ... this.
5990 (handle_threads_qxfer): Rename to ...
5991 (handle_qxfer_threads): ... this. Adjust.
5992 (qxfer_packets): New array.
5993 (handle_qxfer): New function.
5994 (handle_query): Use handle_qxfer.
5995
493e2a69
MS
59962011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5997
5998 * gdbreplay.c: Shorten lines of >= 80 columns.
5999 * linux-low.c: Ditto.
6000 * linux-ppc-low.c: Ditto.
6001 * linux-s390-low.c: Ditto.
6002 * linux-sparc-low.c: Ditto.
6003 * linux-x86-low.c: Ditto.
6004 * linux-xtensa-low.c: Ditto.
6005 * mem-break.c: Ditto.
6006 * nto-low.c: Ditto.
6007 * regcache.h: Ditto.
6008 * remote-utils.c: Ditto.
6009 * server.c: Ditto.
6010 * server.h: Ditto.
6011 * thread-db.c: Ditto.
6012 * tracepoint.c: Ditto.
6013 * utils.c: Ditto.
6014 * win32-low.h: Ditto.
6015
44944448
JB
60162011-01-05 Joel Brobecker <brobecker@adacore.com>
6017
6018 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6019 update.
6020
71ce852c
JB
60212011-01-01 Joel Brobecker <brobecker@adacore.com>
6022
6023 * server.c (gdbserver_version): Update copyright year in version
6024 output.
6025 * gdbreplay.c (gdbreplay_version): Ditto.
6026
eb826dc6
MF
60272010-12-29 Jie Zhang <jie.zhang@analog.com>
6028
6029 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6030 * linux-bfin-low.c: New file.
6031 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6032 PT_DATA_ADDR for BFIN targets.
6033 * Makefile.in (SFILES): Add linux-bfin-low.c.
6034 (clean): Remove reg-bfin.c.
6035 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6036 * README: Mention supported Blackfin targets.
6037
39ab222a
MF
60382010-12-23 Mike Frysinger <vapier@gentoo.org>
6039
6040 * .gitignore: New file.
6041
a1f2ce7d
MF
60422010-11-16 Mike Frysinger <vapier@gentoo.org>
6043
6044 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6045
f474844c
JZ
60462010-10-22 Jie Zhang <jie@codesourcery.com>
6047
6048 * Makefile.in: Add FLAGS_TO_PASS variable.
6049 (install): Remove dependency of install-only and recursively
6050 invoke make for install-only.
6051
f1048712
DE
60522010-10-04 Doug Evans <dje@google.com>
6053
6054 * Makefile.in (uninstall): Use $(DESTDIR).
6055
b53a1623
PA
60562010-09-24 Pedro Alves <pedro@codesourcery.com>
6057
e6ee044d
PA
6058 PR gdb/11842
6059
b53a1623
PA
6060 * linux-x86-low.c (compat_siginfo_from_siginfo)
6061 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6062 si_code is < 0. Check for si_code == SI_TIMER before checking for
6063 si_code < 0.
6064
fa1bd1e4
JB
60652010-09-13 Joel Brobecker <brobecker@adacore.com>
6066
6067 * lynx-i386-low.c: New file.
6068 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6069
47fac8f8
JB
60702010-09-13 Joel Brobecker <brobecker@adacore.com>
6071
6072 * lynx-low.c (ptrace_request_to_str): Remove handling for
6073 request values that have been removed in LynxOS 5.x.
6074
1adfc54d
JB
60752010-09-13 Joel Brobecker <brobecker@adacore.com>
6076
6077 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6078 <ptrace.h>
6079
c2a66c29
NS
60802010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6081
6082 * configure.ac: Add --enable-inprocess-agent option.
6083 * configure: Rebuilt.
6084
32fcada3
YQ
60852010-09-06 Yao Qi <yao@codesourcery.com>
6086
6087 * linux-low.c (linux_kill): Remove unused variable.
6088 (linux_stabilize_threads): Likewise.
6089 * server.c (start_inferior): Likewise.
6090 (queue_stop_reply_callback): Likewise.
6091 * tracepoint.c (do_action_at_tracepoint): Likewise.
6092
0cccb683
YQ
60932010-09-06 Yao Qi <yao@codesourcery.com>
6094
6095 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6096 on return.
6097
423ec54c
JK
60982010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6099
6100 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6101
12ac6819
PA
61022010-09-06 Pedro Alves <pedro@codesourcery.com>
6103
6104 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6105 "$(IPA_DEPFILES)".
6106
8ed54b31
JB
61072010-09-01 Joel Brobecker <brobecker@adacore.com>
6108
6109 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6110 gdbserver/lynx-ppc-low.c: New files.
6111 * Makefile.in (lynx_low_h): New variable.
6112 (lynx-low.o, lynx-ppc-low.o): New rules.
6113 * configure.ac: On LynxOS, link with -lnetinet.
6114 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6115 * configure: regenerate.
6116
bb0116a4
JB
61172010-09-01 Joel Brobecker <brobecker@adacore.com>
6118
6119 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6120 * configure.ac: Add check for vasprintf and vsnprintf.
6121 * configure, config.in: Regenerate.
6122 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6123
a778ab81 61242010-09-01 Joel Brobecker <brobecker@adacore.com>
6125
6126 * gdbreplay.c: Move include of alloca.h up, next to include of
6127 malloc.h.
6128 * server.h: Add include of malloc.h.
6129 * mem-break.c: Remove include of malloc.h.
6130 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6131
8b034a19 61322010-09-01 Joel Brobecker <brobecker@adacore.com>
6133
6134 * Makefile.in (memmem.o): Build with -Wno-error.
6135
61362010-09-01 Joel Brobecker <brobecker@adacore.com>
6137
6138 * utils.c (xsnprintf): Make non-static.
6139 * server.h: Add xsnprintf declaration.
6140 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6141 replace calls to snprintf by calls to xsnprintf throughout.
6142
61432010-09-01 Joel Brobecker <brobecker@adacore.com>
6144
6145 * configure.ac: Add configure check for alloca.
6146 * configure, config.in: Regenerate.
6147 * server.h: Include alloca.h if it exists.
6148 * gdbreplay.c: Include alloca.h if it exists.
6149
1a981360
PA
61502010-08-28 Pedro Alves <pedro@codesourcery.com>
6151
6152 * linux-low.c (__SIGRTMIN): Define if not already defined.
6153 (linux_create_inferior): Check for __ANDROID__ rather than
6154 __SIGRTMIN.
6155 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6156 are already deferred.
6157 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6158 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6159 stopped and already has a pending signal to report.
6160 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6161 a pending signal to report or is moving out of a jump pad.
6162 (linux_init_signals): Check for __ANDROID__ rather than
6163 __SIGRTMIN.
6164
b4d51a55
PA
61652010-08-28 Pedro Alves <pedro@codesourcery.com>
6166
6167 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6168 debug_threads check. Avoid a linear search when not doing debug
6169 output.
6170
ec48365d
PA
61712010-08-27 Pedro Alves <pedro@codesourcery.com>
6172
6173 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6174 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6175 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6176 (process_event): Change local fd's type to gdb_fildes_t.
6177 (create_file_handler): Adjust prototype.
6178 (delete_file_handler): Adjust prototype.
6179 (handle_file_event): Adjust prototype. Use pfildes.
6180 (create_file_event): Adjsut prototype.
6181 * remote-utils.c (remote_desc, listen_desc): Change type to
6182 gdb_fildes_t.
6183 * server.h: New gdb_fildes_t typedef.
6184 [USE_WIN32API]: Include winsock2.h.
6185 (delete_file_handler, add_file_handler): Adjust prototypes.
6186 (pfildes): Declare.
6187 * utils.c (pfildes): New.
6188
854d88f0
PA
61892010-08-27 Pedro Alves <pedro@codesourcery.com>
6190
6191 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6192 * configure: Regenerate.
6193
0146f85b
PA
61942010-08-27 Pedro Alves <pedro@codesourcery.com>
6195
6196 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6197 (linux_done_accessing_memory): ... this.
6198 (linux_target_ops): Adjust.
6199 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6200 * nto-low.c (nto_target_ops): Adjust comment.
6201 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6202 * spu-low.c (spu_target_ops): Adjust comment.
6203 * target.h (target_ops): Rename unprepare_to_access_memory field
6204 to done_accessing_memory.
6205 (unprepare_to_access_memory): Rename to ...
6206 (done_accessing_memory): ... this.
6207
90d74c30
PA
62082010-08-26 Pedro Alves <pedro@codesourcery.com>
6209
6210 * linux-low.c (linux_prepare_to_access_memory): New.
6211 (linux_unprepare_to_access_memory): New.
6212 (linux_target_ops): Install them.
6213 * server.c (read_memory): Rename to ...
6214 (gdb_read_memory): ... this. Use
6215 prepare_to_access_memory/prepare_to_access_memory.
6216 (write_memory): Rename to ...
6217 (gdb_write_memory): ... this. Use
6218 prepare_to_access_memory/prepare_to_access_memory.
6219 (handle_search_memory_1): Adjust.
6220 (process_serial_event): Adjust.
6221 * target.h (struct target_ops): New fields
6222 prepare_to_access_memory and unprepare_to_access_memory.
6223 (prepare_to_access_memory, unprepare_to_access_memory): New.
6224 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6225 prepare_to_access_memory/prepare_to_access_memory.
6226 * nto-low.c (nto_target_ops): Adjust.
6227 * spu-low.c (spu_target_ops): Adjust.
6228 * win32-low.c (win32_target_ops): Adjust.
6229
fd467969
PA
62302010-08-26 Pedro Alves <pedro@codesourcery.com>
6231
6232 * Makefile.in (WARN_CFLAGS): Get it from configure.
6233 (WERROR_CFLAGS): New.
6234 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6235 * configure.ac: Introduce --enable-werror, which adds -Werror to
6236 the compiler command line. Enabled by default. Disable with
6237 --disable-werror. Add -Wdeclaration-after-statement
6238 Wpointer-arith and -Wformat-nonliteral to warning flags.
6239 * configure: Regenerate.
6240
331e2f5f
PA
62412010-08-26 Pedro Alves <pedro@codesourcery.com>
6242
6243 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6244
e581f2b4
PA
62452010-08-26 Pedro Alves <pedro@codesourcery.com>
6246
6247 * gdbreplay.c (remote_error): New.
6248 (gdbchar): New.
6249 (expect): Use gdbchar. Check for error reading from GDB.
6250 Clarify sync error output.
6251 (play): Check for errors writing to GDB.
6252 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6253 * remote-utils.c (getpkt): Check for errors writing to the remote
6254 descriptor.
6255
3c11dd79
PA
62562010-08-25 Pedro Alves <pedro@codesourcery.com>
6257
6258 * linux-low.c (linux_wait_1): Move non-debugging code out of
6259 `debug_threads' control.
6260
d20a8ad9
PA
62612010-08-25 Pedro Alves <pedro@codesourcery.com>
6262
6263 * linux-low.c (linux_wait_1): Don't set last_status here.
6264 * server.c (push_event, queue_stop_reply_callback): Assert we're
6265 not pushing a TARGET_WAITKIND_IGNORE event.
6266 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6267 (myresume, handle_target_event): Set the thread's last_resume_kind
6268 and last_status from the target returned status.
6269
964e4306
PA
62702010-08-25 Pedro Alves <pedro@codesourcery.com>
6271
6272 PR threads/10729
6273
6274 * linux-x86-low.c (update_debug_registers_callback): New.
6275 (i386_dr_low_set_addr): Use it.
6276 (i386_dr_low_get_addr): New.
6277 (i386_dr_low_set_control): Use update_debug_registers_callback.
6278 (i386_dr_low_get_control): New.
6279 (i386_dr_low_get_status): Adjust.
6280 * linux-low.c (linux_stop_lwp): New.
6281 * linux-low.h (linux_stop_lwp): Declare.
6282
6283 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6284 argument instead of a i386_debug_reg_state.
6285 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6286 a i386_debug_reg_state.
6287 (i386_insert_aligned_watchpoint): Adjust.
6288 (i386_remove_aligned_watchpoint): Adjust.
6289 (i386_low_stopped_data_address): Read the debug registers from the
6290 inferior instead of from the mirrors.
6291 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6292 (i386_dr_low_get_addr): Declare.
6293 (i386_dr_low_get_control): Declare.
6294 (i386_dr_low_get_status): Change prototype.
6295
6296 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6297 (i386_dr_low_get_addr): New.
6298 (i386_dr_low_get_control): New.
6299 (i386_dr_low_get_status): Adjust prototype. Return
6300 dr_status_mirror.
6301 (i386_initial_stuff): Clear dr_status_mirror and
6302 dr_control_mirror.
6303 (i386_get_thread_context): Adjust.
6304 (i386_set_thread_context): Adjust.
6305 (i386_thread_added): Adjust.
6306
5f21a75b
PA
63072010-08-24 Pedro Alves <pedro@codesourcery.com>
6308
6309 * linux-low.h (linux_thread_area): Delete declaration.
6310
3e4c1235
TS
63112010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6312
6313 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6314 after its termination.
6315
1971b033
PA
63162010-08-09 Pedro Alves <pedro@codesourcery.com>
6317
6318 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6319 (gdb_wants_all_stopped): Delete.
6320 (linux_wait_1): Don't call them.
6321 * server.c (handle_v_cont): Tag all threads as want-stopped.
6322 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6323 stopped as "client-wants-stopped".
6324
310444ac
PA
63252010-07-31 Pedro Alves <pedro@codesourcery.com>
6326
6327 * Makefile.in (signals_h): New.
6328 (server_h): Depend on it.
6329 (server.o): Don't depend on $(signals_def).
6330 (signals.o): Depend on $(signals_def).
6331
a19cae16
JK
63322010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6333
6334 * Makefile.in (signals_def): New.
6335 (server_h): Append include/gdb/signals.h and signals_def.
6336 (server.o): Append signals_def.
6337
30d50328
JK
63382010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6339
6340 * server.c (handle_target_event): Use target_signal_to_host for
6341 resume_info.sig initialization.
6342 * target.h (struct thread_resume) <sig>: New comment.
6343
5c3216e2
OS
63442010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6345
c6f46ca0
OS
6346 * server.c (handle_query): strcpy() the returned string from paddress()
6347 instead of sprintf().
5c3216e2
OS
6348 * utils.c (paddress): Return phex_nz().
6349
6bd31874
JB
63502010-07-07 Joel Brobecker <brobecker@adacore.com>
6351
6352 * server.c (handle_v_cont): Call mourn_inferior if process
6353 just exited.
6354 (myresume): Likewise.
6355
0fb4aa4b
PA
63562010-07-01 Pedro Alves <pedro@codesourcery.com>
6357
6358 Static tracepoints, and integration with UST.
6359
6360 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6361 * mem-break.c (uninsert_all_breakpoints)
6362 (reinsert_all_breakpoints): New.
6363 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6364 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6365 (gdb_agent_ust_loaded, helper_thread_id)
6366 (gdb_agent_helper_thread_id): New macros.
6367 (struct ipa_sym_addresses): Add addr_ust_loaded,
6368 addr_helper_thread_id, addr_cmd_buf.
6369 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6370 (in_process_agent_loaded_ust): New.
6371 (write_e_ust_not_loaded): New.
6372 (maybe_write_ipa_ust_not_loaded): New.
6373 (struct collect_static_trace_data_action): New.
6374 (enum tracepoint_type) <static_tracepoint>: New.
6375 (struct tracepoint) <handle>: Mention static tracepoints.
6376 (struct static_tracepoint_ctx): New.
6377 (CMD_BUF_SIZE): New.
6378 (add_tracepoint_action): Handle static tracepoint actions.
6379 (unprobe_marker_at): New.
6380 (clear_installed_tracepoints): Handle static tracepoints.
6381 (cmd_qtdp): Handle static tracepoints.
6382 (probe_marker_at): New.
6383 (cmd_qtstart): Handle static tracepoints.
6384 (response_tracepoint): Handle static tracepoints.
6385 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6386 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6387 (get_context_regcache): Handle static tracepoints.
6388 (do_action_at_tracepoint): Handle static tracepoint actions.
6389 (traceframe_find_block_type): Handle static trace data blocks.
6390 (traceframe_read_sdata): New.
6391 (download_tracepoints): Download static tracepoint actions.
6392 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6393 (GDB_PROBE_NAME): New.
6394 (ust_ops): New.
6395 (GET_UST_SYM): New.
6396 (USTF): New.
6397 (dlsym_ust): New.
6398 (ust_marker_to_static_tracepoint): New.
6399 (gdb_probe): New.
6400 (collect_ust_data_at_tracepoint): New.
6401 (gdb_ust_probe): New.
6402 (UNIX_PATH_MAX, SOCK_DIR): New.
6403 (gdb_ust_connect_sync_socket): New.
6404 (resume_thread, stop_thread): New.
6405 (run_inferior_command): New.
6406 (init_named_socket): New.
6407 (gdb_ust_socket_init): New.
6408 (cstr_to_hexstr): New.
6409 (next_st): New.
6410 (first_marker, next_marker): New.
6411 (response_ust_marker): New.
6412 (cmd_qtfstm, cmd_qtsstm): New.
6413 (unprobe_marker_at, probe_marker_at): New.
6414 (cmd_qtstmat, gdb_ust_thread): New.
6415 (gdb_ust_init): New.
6416 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6417 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6418 (ST_REGENTRY): New.
6419 (x86_64_st_collect_regmap): New.
6420 (X86_64_NUM_ST_COLLECT_GREGS): New.
6421 (AMD64_RIP_REGNUM): New.
6422 (supply_static_tracepoint_registers): New.
6423 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6424 (ST_REGENTRY): New.
6425 (i386_st_collect_regmap): New.
6426 (i386_NUM_ST_COLLECT_GREGS): New.
6427 (supply_static_tracepoint_registers): New.
6428 * server.c (handle_query): Handle qXfer:statictrace:read.
6429 <qSupported>: Report support for StaticTracepoints, and
6430 qXfer:statictrace:read features.
6431 * server.h (traceframe_read_sdata)
6432 (supply_static_tracepoint_registers): Declare.
6433 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6434 (unpack_varlen_hex): Include in IPA build.
6435 * Makefile.in (ustlibs, ustinc): New.
6436 (IPA_OBJS): Add remote-utils-ipa.o.
6437 ($(IPA_LIB)): Link -ldl and -lpthread.
6438 (UST_CFLAGS): New.
6439 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6440 * config.in, configure: Regenerate.
6441
9e4344e5
PA
64422010-06-20 Ian Lance Taylor <iant@google.com>
6443 Pedro Alves <pedro@codesourcery.com>
6444
6445 * linux-x86-low.c (always_true): Delete.
6446 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6447 trying to fool the compiler with always_true.
6448
c6beb2cb
PA
64492010-06-20 Pedro Alves <pedro@codesourcery.com>
6450
6451 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6452 conditions in gdbserver.
6453
d2ed6730
UW
64542010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6455
6456 * spu-low.c (spu_read_memory): Wrap around local store limit.
6457 (spu_write_memory): Likewise.
6458
4e29fb54
PA
64592010-06-15 Pedro Alves <pedro@codesourcery.com>
6460
6461 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6462 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6463 LONGEST uses.
6464 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6465 uses.
6466 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6467 uses with LONGEST uses.
6468
6a271cae
PA
64692010-06-14 Stan Shebs <stan@codesourcery.com>
6470 Pedro Alves <pedro@codesourcery.com>
6471
6472 Bytecode compiler.
6473
6474 * linux-x86-low.c: Include limits.h.
6475 (add_insns): New.
6476 (always_true): New.
6477 (EMIT_ASM): New.
6478 (EMIT_ASM32): New.
6479 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6480 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6481 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6482 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6483 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6484 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6485 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6486 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6487 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6488 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6489 (amd64_emit_void_call_2): New.
6490 (amd64_emit_ops): New.
6491 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6492 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6493 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6494 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6495 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6496 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6497 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6498 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6499 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6500 (i386_emit_stack_adjust, i386_emit_int_call_1)
6501 (i386_emit_void_call_2): New.
6502 (i386_emit_ops): New.
6503 (x86_emit_ops): New.
6504 (the_low_target): Install x86_emit_ops.
6505 * server.h (struct emit_ops): New.
6506 (get_raw_reg_func_addr): Declare.
6507 (current_insn_ptr, emit_error): Declare.
6508 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6509 (set_trace_state_variable_value): New defines.
6510 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6511 addr_get_trace_state_variable_value and
6512 addr_set_trace_state_variable_value.
6513 (symbol_list): New fields for get_raw_reg,
6514 get_trace_state_variable_value and set_trace_state_variable_value.
6515 (condfn): New typedef.
6516 (struct tracepoint): New field `compiled_cond'.
6517 (do_action_at_tracepoint): Clear compiled_cond.
6518 (get_trace_state_variable_value, set_trace_state_variable_value):
6519 Export in the IPA.
6520 (condition_true_at_tracepoint): If there's a compiled condition,
6521 run that.
6522 (current_insn_ptr, emit_error): New globals.
6523 (struct bytecode_address): New.
6524 (get_raw_reg_func_addr): New.
6525 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6526 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6527 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6528 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6529 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6530 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6531 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6532 (compile_tracepoint_condition, compile_bytecodes): New.
6533 * target.h (emit_ops): Forward declare.
6534 (struct target_ops): New field emit_ops.
6535 (target_emit_ops): New.
6536 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6537 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6538 * linux-low.c (linux_emit_ops): New.
6539 (linux_target_ops): Install it.
6540 * linux-low.h (struct linux_target_ops): New field emit_ops.
6541
92b72907
UW
65422010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6543
6544 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6545 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6546
fa593d66
PA
65472010-06-01 Pedro Alves <pedro@codesourcery.com>
6548 Stan Shebs <stan@codesourcery.com>
6549
6550 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6551 (all): Depend on $(extra_libraries).
6552 (install-only): Install the IPA.
6553 (IPA_OBJS, IPA_LIB): New.
6554 (clean): Remove the IPA lib.
6555 (IPAGENT_CFLAGS): New.
6556 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6557 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6558 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6559 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6560 * configure.ac: Check for atomic builtins support in the compiler.
6561 (IPA_DEPFILES, extra_libraries): Define.
6562 * configure.srv (ipa_obj): Add description.
6563 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6564 (i[34567]86-*-linux*): Set ipa_obj.
6565 (x86_64-*-linux*): Set ipa_obj.
6566 * linux-low.c (stabilizing_threads): New.
6567 (supports_fast_tracepoints): New.
6568 (linux_detach): Stabilize threads before detaching.
6569 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6570 the lwp is either not stabilizing, or is moving out of a jump pad.
6571 (linux_fast_tracepoint_collecting): New.
6572 (maybe_move_out_of_jump_pad): New.
6573 (enqueue_one_deferred_signal): New.
6574 (dequeue_one_deferred_signal): New.
6575 (linux_wait_for_event_1): If moving out of a jump pad, defer
6576 pending signals to later.
6577 (linux_stabilize_threads): New.
6578 (linux_wait_1): Check if threads need moving out of jump pads, and
6579 do it if so.
6580 (stuck_in_jump_pad_callback): New.
6581 (move_out_of_jump_pad_callback): New.
6582 (lwp_running): New.
6583 (linux_resume_one_lwp): Handle moving out of jump pads.
6584 (linux_set_resume_request): Dequeue deferred signals.
6585 (need_step_over_p): Also step over fast tracepoint jumps.
6586 (start_step_over): Also uninsert fast tracepoint jumps.
6587 (finish_step_over): Also reinsert fast tracepoint jumps.
6588 (linux_install_fast_tracepoint_jump): New.
6589 (linux_target_ops): Install linux_stabilize_threads and
6590 linux_install_fast_tracepoint_jump_pad.
6591 * linux-low.h (linux_target_ops) <get_thread_area,
6592 install_fast_tracepoint_jump_pad>: New fields.
6593 (struct lwp_info) <collecting_fast_tracepoint,
6594 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6595 (linux_get_thread_area): Declare.
6596 * linux-x86-low.c (jump_insn): New.
6597 (x86_get_thread_area): New.
6598 (append_insns): New.
6599 (push_opcode): New.
6600 (amd64_install_fast_tracepoint_jump_pad): New.
6601 (i386_install_fast_tracepoint_jump_pad): New.
6602 (x86_install_fast_tracepoint_jump_pad): New.
6603 (the_low_target): Install x86_get_thread_area and
6604 x86_install_fast_tracepoint_jump_pad.
6605 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6606 (struct fast_tracepoint_jump): New.
6607 (fast_tracepoint_jump_insn): New.
6608 (fast_tracepoint_jump_shadow): New.
6609 (find_fast_tracepoint_jump_at): New.
6610 (fast_tracepoint_jump_here): New.
6611 (delete_fast_tracepoint_jump): New.
6612 (set_fast_tracepoint_jump): New.
6613 (uninsert_fast_tracepoint_jumps_at): New.
6614 (reinsert_fast_tracepoint_jumps_at): New.
6615 (set_breakpoint_at): Use write_inferior_memory.
6616 (uninsert_raw_breakpoint): Use write_inferior_memory.
6617 (check_mem_read): Mask out fast tracepoint jumps.
6618 (check_mem_write): Mask out fast tracepoint jumps.
6619 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6620 (set_fast_tracepoint_jump): Declare.
6621 (delete_fast_tracepoint_jump)
6622 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6623 (reinsert_fast_tracepoint_jumps_at): Declare.
6624 * regcache.c: Don't compile many functions when building the
6625 in-process agent library.
6626 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6627 the register buffer in the heap.
6628 (free_register_cache): If the register buffer isn't owned by the
6629 regcache, don't free it.
6630 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6631 pre-existing register caches.
6632 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6633 type.
6634 (convert_ascii_to_int): : Constify `from' parameter type.
6635 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6636 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6637 the needed buffer in-place.
6638 (relocate_instruction): New.
6639 * server.c (handle_query) <qSymbols>: If the target supports
6640 tracepoints, give it a chance of looking up symbols. Report
6641 support for fast tracepoints.
6642 (handle_status): Stabilize threads.
6643 (process_serial_event): Adjust.
6644 * server.h (struct fast_tracepoint_jump): Forward declare.
6645 (struct process_info) <fast_tracepoint_jumps>: New field.
6646 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6647 (decode_X_packet, decode_M_packet): Adjust.
6648 (relocate_instruction): Declare.
6649 (in_process_agent_loaded): Declare.
6650 (tracepoint_look_up_symbols): Declare.
6651 (struct fast_tpoint_collect_status): Declare.
6652 (fast_tracepoint_collecting): Declare.
6653 (force_unlock_trace_buffer): Declare.
6654 (handle_tracepoint_bkpts): Declare.
6655 (initialize_low_tracepoint)
6656 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6657 * target.h (struct target_ops) <stabilize_threads,
6658 install_fast_tracepoint_jump_pad>: New fields.
6659 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6660 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6661 [HAVE_STDINT_H]: Include stdint.h.
6662 (trace_debug_1): Rename to ...
6663 (trace_vdebug): ... this.
6664 (trace_debug): Rename to ...
6665 (trace_debug_1): ... this. Add `level' parameter.
6666 (trace_debug): New.
6667 (ATTR_USED, ATTR_NOINLINE): New.
6668 (IP_AGENT_EXPORT): New.
6669 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6670 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6671 (about_to_request_buffer_space, trace_buffer_is_full)
6672 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6673 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6674 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6675 (traceframe_write_count, traceframes_created)
6676 (trace_state_variables)
6677 New renaming defines.
6678 (struct ipa_sym_addresses): New.
6679 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6680 (symbol_list): New.
6681 (ipa_sym_addrs): New.
6682 (all_tracepoint_symbols_looked_up): New.
6683 (in_process_agent_loaded): New.
6684 (write_e_ipa_not_loaded): New.
6685 (maybe_write_ipa_not_loaded): New.
6686 (tracepoint_look_up_symbols): New.
6687 (debug_threads) [IN_PROCESS_AGENT]: New.
6688 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6689 (UNKNOWN_SIDE_EFFECTS): New.
6690 (stop_tracing): New.
6691 (flush_trace_buffer): New.
6692 (stop_tracing_bkpt): New.
6693 (flush_trace_buffer_bkpt): New.
6694 (read_inferior_integer): New.
6695 (read_inferior_uinteger): New.
6696 (read_inferior_data_pointer): New.
6697 (write_inferior_data_pointer): New.
6698 (write_inferior_integer): New.
6699 (write_inferior_uinteger): New.
6700 (struct collect_static_trace_data_action): Delete.
6701 (enum tracepoint_type): New.
6702 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6703 <actions_str, step_actions, step_actions_str>: Only include in
6704 GDBserver.
fa593d66
PA
6705 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6706 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6707 (tracepoints): Use IP_AGENT_EXPORT.
6708 (last_tracepoint): Don't include in the IPA.
6709 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6710 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6711 (alloced_trace_state_variables): New.
6712 (trace_state_variables): Use IP_AGENT_EXPORT.
6713 (traceframe_t): Delete unused variable.
6714 (circular_trace_buffer): Don't include in the IPA.
6715 (trace_buffer_start): Delete.
6716 (struct trace_buffer_control): New.
6717 (trace_buffer_free): Delete.
6718 (struct ipa_trace_buffer_control): New.
6719 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6720 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6721 New.
6722 (trace_buffer_ctrl): New.
6723 (TRACE_BUFFER_CTRL_CURR): New.
6724 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6725 Reimplement as macros.
6726 (trace_buffer_wrap): Delete.
6727 (traceframe_write_count, traceframe_read_count)
6728 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6729 (struct tracepoint_hit_ctx) <type>: New field.
6730 (struct fast_tracepoint_ctx): New.
6731 (memory_barrier): New.
6732 (cmpxchg): New.
6733 (record_tracepoint_error): Update atomically in the IPA.
6734 (clear_inferior_trace_buffer): New.
6735 (about_to_request_buffer_space): New.
6736 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6737 updating the same buffer.
6738 (add_tracepoint): Default the tracepoint's type to trap
6739 tracepoint, and orig_size to -1.
6740 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6741 internal variables.
6742 (create_trace_state_variable): New parameter `gdb'. Handle it.
6743 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6744 (cmd_qtdp): Handle fast tracepoints.
6745 (cmd_qtdv): Adjust.
6746 (max_jump_pad_size): New.
6747 (gdb_jump_pad_head): New.
6748 (get_jump_space_head): New.
6749 (claim_jump_space): New.
6750 (sort_tracepoints): New.
6751 (MAX_JUMP_SIZE): New.
6752 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6753 IPA.
6754 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6755 support. Upload fast traceframes, and delete internal IPA
6756 breakpoints.
6757 (stop_tracing_handler): New.
6758 (flush_trace_buffer_handler): New.
6759 (cmd_qtstop): Upload fast tracepoints.
6760 (response_tracepoint): Handle fast tracepoints.
6761 (tracepoint_finished_step): Upload fast traceframes. Set the
6762 tracepoint hit context's tracepoint type.
6763 (handle_tracepoint_bkpts): New.
6764 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6765 type. Add comment about fast tracepoints.
6766 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6767 non-existing action_str field.
6768 (get_context_regcache): Handle fast tracepoints.
6769 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6770 to the regcache.
6771 (fast_tracepoint_from_jump_pad_address): New.
6772 (fast_tracepoint_from_ipa_tpoint_address): New.
6773 (collecting_t): New.
6774 (force_unlock_trace_buffer): New.
6775 (fast_tracepoint_collecting): New.
6776 (collecting): New.
6777 (gdb_collect): New.
6778 (write_inferior_data_ptr): New.
6779 (target_tp_heap): New.
6780 (target_malloc): New.
6781 (download_agent_expr): New.
6782 (UALIGN): New.
6783 (download_tracepoints): New.
6784 (download_trace_state_variables): New.
6785 (upload_fast_traceframes): New.
6786 (IPA_FIRST_TRACEFRAME): New.
6787 (IPA_NEXT_TRACEFRAME_1): New.
6788 (IPA_NEXT_TRACEFRAME): New.
6789 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6790 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6791 (gdb_jump_pad_buffer_end): New.
6792 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6793 (initialize_tracepoint): Adjust.
6794 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6795 buffer. Initialize the low module.
6796 * utils.c (PREFIX, TOOLNAME): New.
6797 (malloc_failure): Use PREFIX.
6798 (error): In the IPA, an error causes an exit.
6799 (fatal, warning): Use PREFIX.
6800 (internal_error): Use TOOLNAME.
6801 (NUMCELLS): Increase to 10.
6802 * configure, config.in: Regenerate.
6803
d149dd1d
PA
68042010-06-01 Pedro Alves <pedro@codesourcery.com>
6805
6806 * server.c (handle_query) <qSupported>: Do two passes over the
6807 qSupported string to avoid nesting strtok.
6808
f6528abd
JK
68092010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6810
6811 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6812 (CDEPS): New.
6813 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6814 -Wl,--dynamic-list.
6815 * configure: Regenerate.
6816 * proc-service.list: New.
6817
ca2a87a0
JK
68182010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6819
6820 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6821 New comment.
6822
363a6e9f
OS
68232010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6824
6825 * gdbreplay.c (remote_open): Check error return from socket() call by
6826 its equality to -1 not by it being negative.
6827 * remote-utils.c (remote_open): Likewise.
6828
d23b6cb1
PA
68292010-05-23 Pedro Alves <pedro@codesourcery.com>
6830
6831 * config.h: Regenerate.
6832
28d3cf85
MK
68332010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6834
6835 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6836 doesn't provide PTRACE_GET_THREAD_AREA.
6837
fea36a59
MK
68382010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6839
6840 * linux-m68k-low.c: Include <asm/ptrace.h>
6841 (ps_get_thread_area): Implement.
6842
24b066ba
DE
68432010-05-03 Doug Evans <dje@google.com>
6844
6845 * event-loop.c (struct callback_event): New struct.
6846 (callback_list): New global.
6847 (append_callback_event, delete_callback_event): New functions.
6848 (process_callback): New function.
6849 (start_event_loop): Call it.
6850 * remote-utils.c (NOT_SCHEDULED): Define.
6851 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6852 moved out of readchar.
6853 (readchar): Rewrite. Call reschedule before returning.
6854 (reset_readchar): New function.
6855 (remote_close): Call it.
6856 (process_remaining, reschedule): New functions.
6857 * server.h (callback_handler_func): New typedef.
6858 (append_callback_event, delete_callback_event): Declare.
6859
9836d6ea
PA
68602010-05-03 Pedro Alves <pedro@codesourcery.com>
6861
6862 * proc-service.c (ps_pglobal_lookup): Use
6863 thread_db_look_up_one_symbol.
6864 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6865 parameter. Use it instead of all_symbols_looked_up.
6866 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6867 field.
6868 (all_symbols_looked_up): Don't declare.
6869 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6870 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6871 field.
6872 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6873 Set all_symbols_looked_up here.
6874 (thread_db_look_up_one_symbol): New.
6875 (thread_db_get_tls_address): Adjust.
6876 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6877 thread_db object on the heap, and tentatively set it in the
6878 process structure.
6879 (thread_db_init): Don't set all_symbols_looked_up here.
6880 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6881
7984d532
PA
68822010-05-03 Pedro Alves <pedro@codesourcery.com>
6883
6884 * linux-low.c (linux_kill, linux_detach): Adjust.
6885 (status_pending_p_callback): Remove redundant statement. Check
6886 for !TARGET_WAITIKIND_IGNORE, instead of
6887 TARGET_WAITKIND_STOPPED.
6888 (handle_tracepoints): Make sure LWP is locked. Adjust.
6889 (linux_wait_for_event_1): Adjust.
6890 (linux_cancel_breakpoints): New.
6891 (unsuspend_one_lwp): New.
6892 (unsuspend_all_lwps): New.
6893 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6894 (send_sigstop_callback): Change return type to int, add new
6895 `except' parameter and handle it.
6896 (suspend_and_send_sigstop_callback): New.
6897 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6898 pass them down. If SUSPEND, also increment the lwp's suspend
6899 count.
6900 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6901 (need_step_over_p): Don't consider suspended LWPs.
6902 (start_step_over): Adjust.
6903 (proceed_one_lwp): Change return type to int, add new `except'
6904 parameter and handle it.
6905 (unsuspend_and_proceed_one_lwp): New.
6906 (proceed_all_lwps): Use find_inferior instead of
6907 for_each_inferior.
6908 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6909 also decrement the suspend count of LWPs. Pass `except' down,
6910 instead of hacking its suspend count.
6911 (linux_pause_all): Add `freeze' parameter. Adjust.
6912 (linux_unpause_all): New.
6913 (linux_target_ops): Install linux_unpause_all.
6914 * server.c (handle_status): Adjust.
6915 * target.h (struct target_ops): New fields `unpause_all' and
6916 `cancel_breakpoints'. Add new parameter to `pause_all'.
6917 (pause_all): Add new `freeze' parameter.
6918 (unpause_all): New.
6919 (cancel_breakpoints): New.
6920 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6921 cancel breakpoints.
6922 (cmd_qtstart): Pause threads.
6923 (stop_tracing): Pause threads, and cancel breakpoints.
6924 * win32-low.c (win32_target_ops): Adjust.
6925
e471f25b
PA
69262010-05-03 Pedro Alves <pedro@codesourcery.com>
6927
6928 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6929 the inferior right away from here...
6930 (linux_wait_1): ... to here, and adjust to check the thread's
6931 last_resume_kind instead of the lwp's step or stop_expected flags.
6932
1915ef4f
PA
69332010-05-02 Pedro Alves <pedro@codesourcery.com>
6934
6935 * README: Use consistent `GDB' and `GDBserver' spellings.
6936
f9e39928
PA
69372010-05-02 Pedro Alves <pedro@codesourcery.com>
6938
6939 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6940 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6941 (linux_detach_one_lwp): Assume the lwp is stopped.
6942 (any_thread_of): Delete.
6943 (linux_detach): Stop all lwps here. Don't blindly delete all
6944 breakpoints.
6945 (delete_lwp_callback): New.
6946 (linux_mourn): Delete all lwps of the process that is gone.
6947 (linux_wait_1): Don't delete the last lwp of the process here.
6948 * mem-break.h (mark_breakpoints_out): Declare.
6949 * mem-break.c (mark_breakpoints_out): New.
6950 (free_all_breakpoints): Use it.
6951 * server.c (handle_target_event): If the process is gone, mark
6952 breakpoints out.
6953 * thread-db.c (struct thread_db) <create_bp>: New field.
6954 (thread_db_enable_reporting): Fix prototype. Store a thread event
6955 breakpoint reference in the thread_db struct.
6956 (thread_db_load_search): Clear the thread_db object.
6957 (try_thread_db_load_1): Ditto.
6958 (switch_to_process): New.
6959 (disable_thread_event_reporting): Use it.
6960 (remove_thread_event_breakpoints): New.
6961 (thread_db_detach, thread_db_mourn): Use it.
6962
1e7fc18c
PA
69632010-05-01 Pedro Alves <pedro@codesourcery.com>
6964
6965 * linux-low.c (linux_enable_event_reporting): New.
6966 (linux_wait_for_event_1, handle_extended_wait): Use it.
6967
02fc4de7
PA
69682010-04-30 Pedro Alves <pedro@codesourcery.com>
6969
6970 * linux-low.c (linux_kill_one_lwp, linux_kill)
6971 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6972 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6973 SIGSTOP even if the LWP is stopped.
6974 (send_sigstop_callback): New.
6975 (stop_all_lwps): Use send_sigstop_callback instead.
6976 (linux_resume_one_thread): Adjust.
6977 (proceed_one_lwp): Still proceed an LWP that the client has
6978 requested to stop, if we haven't reported it as stopped yet. Make
6979 sure that LWPs the client want stopped, have a pending SIGSTOP.
6980
bc3b5632
DE
69812010-04-26 Doug Evans <dje@google.com>
6982
ae1ada35
DE
6983 * server.c (handle_general_set): Make static.
6984
bc3b5632
DE
6985 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6986 Print received char after testing for error/eof instead of before.
6987 (input_interrupt): Tweak comment.
6988
65730243
DE
69892010-04-23 Doug Evans <dje@google.com>
6990
6991 * server.c (start_inferior): Print inferior argv if --debug.
6992
a8ae7dc0
AR
69932010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6994
6995 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6996 * nto-x86-low.c: Include server.h
6997
1c07cc19
PM
69982010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6999
7000 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7001 be consistent with other sources of this directory.
7002 (init_registers_amd64): Correct name of source file of this function
7003 in the comment.
7004
e0a61e09
PM
70052010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7006
7007 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7008 64-bit executables.
7009
54709339
PM
70102010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7011
7012 * win32-i386-low.c: Add 64-bit support.
7013 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7014 (init_registers_amd64): Declare.
7015 (mappings): Add 64-bit version of array.
7016 (init_windows_x86): New function.
7017 (the_low_target): Change init_arch field to init_windows_x86.
7018
e8f0053d
PM
70192010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7020
7021 * win32-low.c: Adapt to support also 64-bit architecture.
7022 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7023 (get_image_name): Use SIZE_T type for local variable `done'.
7024 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7025 (toolhelp_get_dll_name): Idem.
7026 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7027 Use uintptr_t typecast to avoid warning.
7028 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7029 (handle_exception): Use phex_nz to avoid warning.
7030 (win32_wait): Remove unused local variable `process'.
7031
c481e77e
PM
70322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7033
7034 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7035 `amd64-avx.o'.
7036
12ea4b69
PM
70372010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7038
7039 * configure.ac: Use `ws2_32' library for srv_mingw.
7040 * configure: Regenerate.
7041 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7042 * remote-utils.c: Likewise.
7043
f6d1620c
L
70442010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7045
7046 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7047 if __x86_64__ is defined.
7048
8e642873
PM
70492010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7050
7051 * configure: Regenerate.
7052
711e434b
PM
70532010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7054
7055 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7056 * target.h (target_ops): New get_tib_address field.
7057 * win32-low.h (win32_thread_info): Add thread_local_base field.
7058 * win32-low.c (child_add_thread): Add tlb argument.
7059 Set thread_local_base field to TLB.
7060 (get_child_debug_event): Adapt to child_add_thread change.
7061 (win32_get_tib_address): New function.
7062 (win32_target_ops): Set get_tib_address field to
7063 win32_get_tib_address.
7064 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7065
505106cd
PA
70662010-04-12 Pedro Alves <pedro@codesourcery.com>
7067
505106cd
PA
7068 * linux-low.c (linux_mourn): Also remove the process.
7069 * server.c (handle_target_event): Don't remove the process here.
7070 * nto-low.c (nto_mourn): New.
7071 (nto_target_ops): Install it.
7072 * spu-low.c (spu_mourn): New.
7073 (spu_target_ops): Install it.
7074 * win32-low.c (win32_mourn): New.
7075 (win32_target_ops): Install it.
7076
e8470a06
PA
70772010-04-12 Pedro Alves <pedro@codesourcery.com>
7078
7079 * server.h (buffer_xml_printf): Remove redundant `;'.
7080
45ba0d02
PA
70812010-04-12 Pedro Alves <pedro@codesourcery.com>
7082
7083 * regcache.c (set_register_cache): Invalidate regcaches before
7084 changing the register cache layout.
7085 (regcache_invalidate_one): Allow a NULL regcache.
7086 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7087 regcaches before changing the register cache layout or the target
7088 regsets.
7089
59e04013
L
70902010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7091
7092 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7093 variable warning on Linux/x86-64.
7094
8336d594
PA
70952010-04-11 Pedro Alves <pedro@codesourcery.com>
7096
7097 GDBserver disconnected tracing support.
7098
7099 * linux-low.c (linux_remove_process): Delete.
7100 (add_lwp): Don't set last_resume_kind here.
7101 (linux_kill): Use `mourn'.
7102 (linux_detach): Use `thread_db_detach', and `mourn'.
7103 (linux_mourn): New.
7104 (linux_attach_lwp_1): Adjust comment.
7105 (linux_attach): last_resume_kind moved the thread_info; adjust.
7106 (status_pending_p_callback): Adjust.
7107 (linux_wait_for_event_1): Adjust.
7108 (count_events_callback, select_singlestep_lwp_callback)
7109 (select_event_lwp_callback, cancel_breakpoints_callback)
7110 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7111 (proceed_one_lwp): Adjust.
7112 (linux_async): Add debug output.
7113 (linux_thread_stopped): New.
7114 (linux_pause_all): New.
7115 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7116 linux_pause_all.
7117 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7118 (thread_db_free): Delete declaration.
7119 (thread_db_detach, thread_db_mourn): Declare.
7120 * thread-db.c (thread_db_init): Use thread_db_mourn.
7121 (thread_db_free): Delete, split in two.
7122 (disable_thread_event_reporting): New.
7123 (thread_db_detach): New.
7124 (thread_db_mourn): New.
7125
7126 * server.h (struct thread_info) <last_resume_kind>: New field.
7127 <attached>: Add comment.
7128 <gdb_detached>: New field.
7129 (handler_func): Change return type to int.
7130 (handle_serial_event, handle_target_event): Ditto.
7131 (gdb_connected): Declare.
7132 (tracing): Delete.
7133 (disconnected_tracing): Declare.
7134 (stop_tracing): Declare.
7135
7136 * server.c (handle_query) <qSupported>: Report support for
7137 disconnected tracing.
7138 (queue_stop_reply_callback): Account for running threads.
7139 (gdb_wants_thread_stopped): New.
7140 (gdb_wants_all_threads_stopped): New.
7141 (gdb_reattached_process): New.
7142 (handle_status): Clear the `gdb_detached' flag of all processes.
7143 In all-stop, stop all threads.
7144 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7145 (process_serial_event): If the remote connection breaks, or if an
7146 exit was forced with "monitor exit", force an event loop exit.
7147 Handle disconnected tracing on detach.
7148 (handle_serial_event): Adjust.
7149 (handle_target_event): If GDB isn't connected, forward events back
7150 to the inferior, unless the last process exited, in which case,
7151 exit gdbserver. Adjust interface.
7152
7153 * remote-utils.c (remote_open): Don't block in accept. Instead
7154 register an event loop source on the listen socket file
7155 descriptor. Refactor bits into ...
7156 (listen_desc): ... this new global.
7157 (gdb_connected): ... this new function.
7158 (enable_async_notification): ... this new function.
7159 (handle_accept_event): ... this new function.
7160 (remote_close): Clear remote_desc.
7161
7162 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7163
7164 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7165 New fields.
7166 (mourn_inferior): Define.
7167 (target_process_qsupported): Avoid the dangling else problem.
7168 (thread_stopped): Define.
7169 (pause_all): Define.
7170 (target_waitstatus_to_string): Declare.
7171 * target.c (target_waitstatus_to_string): New.
7172
7173 * tracepoint.c (tracing): Make extern.
7174 (disconnected_tracing): New.
7175 (stop_tracing): Make extern. Handle tracing stops due to GDB
7176 disconnecting.
7177 (cmd_qtdisconnected): New.
7178 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7179 (handle_tracepoint_general_set): Handle QTDisconnected.
7180
7181 * event-loop.c (event_handler_func): Change return type to int.
7182 (process_event): Bail out if the event handler wants the event
7183 loop to stop.
7184 (handle_file_event): Ditto.
7185 (start_event_loop): Bail out if the event handler wants the event
7186 loop to stop.
7187
7188 * nto-low.c (nto_target_ops): Adjust.
7189 * spu-low.c (spu_wait): Don't remove the process here.
7190 (spu_target_ops): Adjust.
7191 * win32-low.c (win32_wait): Don't remove the process here.
7192 (win32_target_ops): Adjust.
7193
5d267c4c
PA
71942010-04-11 Pedro Alves <pedro@codesourcery.com>
7195
7196 * regcache.c (realloc_register_cache): Invalidate inferior's
7197 regcache before recreating it.
7198
623ccd72
PA
71992010-04-09 Pedro Alves <pedro@codesourcery.com>
7200
7201 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7202
219f2f23
PA
72032010-04-09 Stan Shebs <stan@codesourcery.com>
7204 Pedro Alves <pedro@codesourcery.com>
7205
7206 * server.h (LONGEST): New.
7207 (struct thread_info) <while_stepping>: New field.
7208 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7209 Declare.
7210 (initialize_tracepoint, handle_tracepoint_general_set)
7211 (handle_tracepoint_query, tracepoint_finished_step)
7212 (tracepoint_was_hit, release_while_stepping_state_list):
7213 (current_traceframe): Declare.
7214 * server.c (handle_general_set): Handle tracepoint packets.
7215 (read_memory): New.
7216 (write_memory): New.
7217 (handle_search_memory_1): Use read_memory.
7218 (handle_query): Report support for conditional tracepoints, trace
7219 state variables, and tracepoint sources. Handle tracepoint
7220 queries.
7221 (main): Initialize the tracepoints module.
7222 (process_serial_event): Handle traceframe reads/writes.
7223
7224 * linux-low.c (handle_tracepoints): New.
7225 (linux_wait_1): Call it.
7226 (linux_resume_one_lwp): Handle while-stepping.
7227 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7228 (linux_target_ops): Install them.
7229 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7230 New field.
7231 * linux-x86-low.c (x86_supports_tracepoints): New.
7232 (the_low_target). Install it.
7233
7234 * mem-break.h (delete_breakpoint): Declare.
7235 * mem-break.c (delete_breakpoint): Make external.
7236
7237 * target.h (struct target_ops): Add `supports_tracepoints',
7238 `read_pc', and `write_pc' fields.
7239 (target_supports_tracepoints): Define.
7240 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7241 (phex_nz): New.
7242
7243 * regcache.h (struct regcache) <registers_owned>: New field.
7244 (init_register_cache, regcache_cpy): Declare.
7245 (regcache_read_pc, regcache_write_pc): Declare.
7246 (register_cache_size): Declare.
7247 (supply_regblock): Declare.
7248 * regcache.c (init_register_cache): New.
7249 (new_register_cache): Use it.
7250 (regcache_cpy): New.
7251 (register_cache_size): New.
7252 (supply_regblock): New.
7253 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7254
219f2f23
PA
7255 * tracepoint.c: New.
7256
7257 * Makefile.in (OBS): Add tracepoint.o.
7258 (tracepoint.o): New rule.
7259
3a13a53b
L
72602010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7261
7262 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7263 (i386-mmx.o): New.
7264 (i386-mmx.c): Likewise.
7265 (i386-mmx-linux.o): Likewise.
7266 (i386-mmx-linux.c): Likewise.
7267
7268 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7269 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7270 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7271 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7272
7273 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7274 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7275 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7276
1570b33e
L
72772010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7278
7279 * Makefile.in (clean): Updated.
7280 (i386-avx.o): New.
7281 (i386-avx.c): Likewise.
7282 (i386-avx-linux.o): Likewise.
7283 (i386-avx-linux.c): Likewise.
7284 (amd64-avx.o): Likewise.
7285 (amd64-avx.c): Likewise.
7286 (amd64-avx-linux.o): Likewise.
7287 (amd64-avx-linux.c): Likewise.
7288
7289 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7290 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7291 (srv_amd64_regobj): Add amd64-avx.o.
7292 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7293 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7294 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7295 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7296 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7297 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7298 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7299
7300 * i387-fp.c: Include "i386-xstate.h".
7301 (i387_xsave): New.
7302 (i387_cache_to_xsave): Likewise.
7303 (i387_xsave_to_cache): Likewise.
7304 (x86_xcr0): Likewise.
7305
7306 * i387-fp.h (i387_cache_to_xsave): Likewise.
7307 (i387_xsave_to_cache): Likewise.
7308 (x86_xcr0): Likewise.
7309
7310 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7311 * linux-crisv32-low.c (target_regsets): Likewise.
7312 * linux-m68k-low.c (target_regsets): Likewise.
7313 * linux-mips-low.c (target_regsets): Likewise.
7314 * linux-ppc-low.c (target_regsets): Likewise.
7315 * linux-s390-low.c (target_regsets): Likewise.
7316 * linux-sh-low.c (target_regsets): Likewise.
7317 * linux-sparc-low.c (target_regsets): Likewise.
7318 * linux-xtensa-low.c (target_regsets): Likewise.
7319
7320 * linux-low.c: Include <sys/uio.h>.
7321 (regsets_fetch_inferior_registers): Support nt_type.
7322 (regsets_store_inferior_registers): Likewise.
7323 (linux_process_qsupported): New.
7324 (linux_target_ops): Add linux_process_qsupported.
7325
7326 * linux-low.h (regset_info): Add nt_type.
7327 (linux_target_ops): Add process_qsupported.
7328
7329 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7330 and <sys/uio.h>.
7331 (init_registers_i386_avx_linux): New.
7332 (init_registers_amd64_avx_linux): Likewise.
7333 (xmltarget_i386_linux_no_xml): Likewise.
7334 (xmltarget_amd64_linux_no_xml): Likewise.
7335 (PTRACE_GETREGSET): Likewise.
7336 (PTRACE_SETREGSET): Likewise.
7337 (x86_fill_xstateregset): Likewise.
7338 (x86_store_xstateregset): Likewise.
7339 (use_xml): Likewise.
7340 (x86_linux_update_xmltarget): Likewise.
7341 (x86_linux_process_qsupported): Likewise.
7342 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7343 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7344 init_registers_i386_linux here. Call
7345 x86_linux_update_xmltarget.
7346 (the_low_target): Add x86_linux_process_qsupported.
7347
7348 * server.c (handle_query): Call target_process_qsupported.
7349
7350 * target.h (target_ops): Add process_qsupported.
7351 (target_process_qsupported): New.
7352
fc7238bb
PA
73532010-04-03 Pedro Alves <pedro@codesourcery.com>
7354
7355 * inferiors.c (add_thread): Set last_status kind to
7356 TARGET_WAITKIND_IGNORE.
7357 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7358 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7359 (linux_wait_1): Move `thread' local definition to block that uses
7360 it. Don't NULL initialize `event_child'.
7361 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7362 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7363 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7364
bdabb078
PA
73652010-04-01 Pedro Alves <pedro@codesourcery.com>
7366
7367 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7368 an extended waitstatus, or by a watchpoint.
7369 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7370 thread was stepping or has been stopped by a watchpoint.
7371
d3bbe7a0
PA
73722010-04-01 Pedro Alves <pedro@codesourcery.com>
7373
7374 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7375 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7376 of another, then delete the previous, and validate all
7377 breakpoints.
7378 (validate_inserted_breakpoint): New.
7379 (delete_disabled_breakpoints): New.
7380 (validate_breakpoints): New.
7381 (check_mem_read): Validate breakpoints before trusting their
7382 shadow. Delete disabled breakpoints.
7383 (check_mem_write): Validate breakpoints before trusting they
7384 should be inserted. Delete disabled breakpoints.
7385 * mem-break.h (validate_breakpoints):
7386 * server.c (handle_query): Validate breakpoints when we see a
7387 qSymbol query.
7388
8b07ae33
PA
73892010-04-01 Pedro Alves <pedro@codesourcery.com>
7390
7391 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7392 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7393 if we could tell there's a GDB breakpoint at stop_pc.
7394 (need_step_over_p): Don't do a step over if we find a GDB
7395 breakpoint at the resume PC.
7396
7397 * mem-break.c (struct raw_breakpoint): New.
7398 (enum bkpt_type): New type `gdb_breakpoint'.
7399 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7400 fields. New field `raw'.
7401 (find_raw_breakpoint_at): New.
7402 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7403 breakpoint instead.
7404 (set_breakpoint_at): Adjust.
7405 (delete_raw_breakpoint): New.
7406 (release_breakpoint): New.
7407 (delete_breakpoint): Rename to...
7408 (delete_breakpoint_1): ... this. Add proc parameter. Use
7409 release_breakpoint. Return ENOENT.
7410 (delete_breakpoint): Reimplement.
7411 (find_breakpoint_at): Delete.
7412 (find_gdb_breakpoint_at): New.
7413 (delete_breakpoint_at): Delete.
7414 (set_gdb_breakpoint_at): New.
7415 (delete_gdb_breakpoint_at): New.
7416 (gdb_breakpoint_here): New.
7417 (set_reinsert_breakpoint): Use release_breakpoint.
7418 (uninsert_breakpoint): Rename to ...
7419 (uninsert_raw_breakpoint): ... this.
7420 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7421 (reinsert_raw_breakpoint): Change parameter type to
7422 raw_breakpoint.
7423 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7424 instead.
7425 (check_breakpoints): Adjust. Use release_breakpoint.
7426 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7427 (breakpoint_inserted_here): Ditto.
7428 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7429 Don't trust the breakpoint's shadow if it is not inserted.
7430 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7431 (delete_all_breakpoints): Adjust.
7432 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7433 use delete_breakpoint_1.
7434
7435 * mem-break.h (breakpoints_supported): Delete declaration.
7436 (set_gdb_breakpoint_at): Declare.
7437 (gdb_breakpoint_here): Declare.
7438 (delete_breakpoint_at): Delete.
7439 (delete_gdb_breakpoint_at): Declare.
7440
7441 * server.h (struct raw_breakpoint): Forward declare.
7442 (struct process_info): New field `raw_breakpoints'.
7443
7444 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7445 breakpoints.
7446
6bf5e0ba
PA
74472010-03-24 Pedro Alves <pedro@codesourcery.com>
7448
7449 * linux-low.c (status_pending_p_callback): Fix comment.
7450 (linux_wait_for_event_1): Move most of the internal breakpoint
7451 handling from here...
7452 (linux_wait_1): ... to here.
7453 (count_events_callback): New.
7454 (select_singlestep_lwp_callback): New.
7455 (select_event_lwp_callback): New.
7456 (cancel_breakpoints_callback): New.
7457 (select_event_lwp): New.
7458 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7459 priority to all LWPs that have had events that should be reported
7460 to the client. Cancel breakpoints when about to reporting the
7461 event to the client, not while stopping lwps. No longer cancel
7462 finished single-steps here.
7463 (cancel_finished_single_step): Delete.
7464 (cancel_finished_single_steps): Delete.
7465
414a389f
PA
74662010-03-24 Pedro Alves <pedro@codesourcery.com>
7467
7468 * mem-break.c (enum bkpt_type): New.
7469 (struct breakpoint): New field `type'.
7470 (set_breakpoint_at): Change return type to struct breakpoint
7471 pointer. Set type to `other_breakpoint' by default.
7472 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7473 in the breakpoint list.
7474 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7475 (reinsert_breakpoint): Rename to ...
7476 (reinsert_raw_breakpoint): ... this.
7477 (reinsert_breakpoints_at): Adjust.
7478 * mem-break.h (struct breakpoint): Declare.
7479 (set_breakpoint_at): Change return type to struct breakpoint
7480 pointer.
7481
2280c721
PA
74822010-03-24 Pedro Alves <pedro@codesourcery.com>
7483
7484 * server.c (handle_query): Assign, not compare.
7485
d50171e4
PA
74862010-03-24 Pedro Alves <pedro@codesourcery.com>
7487
7488 Teach linux gdbserver to step-over-breakpoints.
7489
7490 * linux-low.c (can_hardware_single_step): New.
7491 (supports_breakpoints): New.
7492 (handle_extended_wait): If stopping threads, read the stop pc of
7493 the new cloned LWP.
7494 (get_pc): New.
7495 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7496 low target doesn't support retrieving the PC.
7497 (add_lwp): Set last_resume_kind to resume_continue.
7498 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7499 (linux_attach): Don't clear stop_expected. Set the lwp's
7500 last_resume_kind to resume_stop.
7501 (linux_detach_one_lwp): Don't check for removed breakpoints.
7502 (check_removed_breakpoint): Delete.
7503 (status_pending_p): Rename to ...
7504 (status_pending_p_callback): ... this. Don't check for removed
7505 breakpoints. Don't consider threads that are stopped from GDB's
7506 perspective.
7507 (linux_wait_for_lwp): Always read the stop_pc here.
7508 (cancel_breakpoint): New.
7509 (step_over_bkpt): New global.
7510 (linux_wait_for_event_1): Implement stepping over breakpoints.
7511 (gdb_wants_lwp_stopped): New.
7512 (gdb_wants_all_stopped): New.
7513 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7514 single-step traps here. Store the thread's last reported target
7515 wait status.
7516 (send_sigstop): Don't clear stop_expected. Always set it,
7517 instead.
7518 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7519 (cancel_finished_single_step): New.
7520 (cancel_finished_single_steps): New.
7521 (wait_for_sigstop): Don't cancel finished single-step traps here.
7522 (linux_resume_one_lwp): Don't check for removed breakpoints.
7523 Don't set `step' on non-hardware step archs.
7524 (linux_set_resume_request): Ignore resume_stop requests if already
7525 stopping or stopped. Set the lwp's last_resume_kind.
7526 (resume_status_pending_p): Don't check for removed breakpoints.
7527 (need_step_over_p): New.
7528 (start_step_over): New.
7529 (finish_step_over): New.
7530 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7531 requests. Clear the thread's last reported target waitstatus.
7532 Don't use the `suspended' flag. Don't consider pending breakpoints.
7533 (linux_resume): Start a step-over if necessary.
7534 (proceed_one_lwp): New.
7535 (proceed_all_lwps): New.
7536 (unstop_all_lwps): New.
7537 * linux-low.h (struct lwp_info): Rewrite comment for the
7538 `suspended' flag. Add the `stop_pc' field. Delete the
7539 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7540 Add `'last_resume_kind' and `need_step_over' fields.
7541 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7542 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7543 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7544 (set_raw_breakpoint_at): New.
7545 (set_breakpoint_at): Rewrite to use it.
7546 (reinsert_breakpoint_handler): Delete.
7547 (set_reinsert_breakpoint): New.
7548 (reinsert_breakpoint_by_bp): Delete.
7549 (delete_reinsert_breakpoints): New.
7550 (uninsert_breakpoint): Rewrite.
7551 (uninsert_breakpoints_at): New.
7552 (reinsert_breakpoint): Rewrite.
7553 (reinsert_breakpoints_at): New.
7554 (check_breakpoints): Rewrite.
7555 (breakpoint_here): New.
7556 (breakpoint_inserted_here): New.
7557 (check_mem_read): Adjust.
7558 * mem-break.h (breakpoints_supported, breakpoint_here)
7559 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7560 (reinsert_breakpoint_by_bp): Delete declaration.
7561 (delete_reinsert_breakpoints): Declare.
7562 (reinsert_breakpoint): Delete declaration.
7563 (reinsert_breakpoints_at): Declare.
7564 (uninsert_breakpoint): Delete declaration.
7565 (uninsert_breakpoints_at): Declare.
7566 (check_breakpoints): Adjust prototype.
7567 * server.h: Adjust include order.
7568 (struct thread_info): Declare here. Add a `last_status' field.
7569
30ba68cb
MS
75702010-03-23 Michael Snyder <msnyder@vmware.com>
7571
7572 * server.c (crc32): New function.
7573 (handle_query): Add handling for 'qCRC:' request.
7574
b9a881c2
PA
75752010-03-23 Pedro Alves <pedro@codesourcery.com>
7576
7577 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7578 lwp had been stopped by a watchpoint.
7579
e92d13d5
PA
75802010-03-16 Pedro Alves <pedro@codesourcery.com>
7581
7582 * server.h (internal_error): Declare.
7583 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7584 * utils.c (internal_error): New function.
7585
64daa791
AS
75862010-03-15 Andreas Schwab <schwab@redhat.com>
7587
7588 * configure.srv: Fix typo setting srv_regobj.
7589
f52cd8cd
PA
75902010-03-15 Pedro Alves <pedro@codesourcery.com>
7591
7592 * linux-low.c (fetch_register): Avoid passing a non string literal
7593 format to `error'.
7594 (usr_store_inferior_registers): Ditto.
7595
93ae6fdc
PA
75962010-03-14 Pedro Alves <pedro@codesourcery.com>
7597
7598 * linux-low.c (linux_write_memory): Bail out early if peeking
7599 memory failed.
7600
c3adc08c
PA
76012010-03-14 Pedro Alves <pedro@codesourcery.com>
7602
7603 * linux-low.h (struct lwp_info): New fields
7604 `stopped_by_watchpoint' and `stopped_data_address'.
7605 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7606 here, and cache them in the lwp object.
7607 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7608 directly.
7609 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7610 field.
7611 (linux_stopped_by_watchpoint): Rewrite.
7612 (linux_stopped_data_address): Rewrite.
7613
bce522a2
PA
76142010-03-06 Simo Melenius <simo.melenius@iki.fi>
7615
7616 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7617 switching the current inferior, not before.
7618
90884b2b
L
76192010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7620
7621 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7622 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7623 i386-linux.c and amd64-linux.c.
7624 (reg-i386.o): Removed.
7625 (reg-i386.c): Likewise.
7626 (reg-i386-linux.o): Likewise.
7627 (reg-i386-linux.c): Likewise.
7628 (reg-x86-64.o): Likewise.
7629 (reg-x86-64.c): Likewise.
7630 (reg-x86-64-linux.o): Likewise.
7631 (reg-x86-64-linux.c): Likewise.
7632 (i386.o): New.
7633 (i386.c): Likewise.
7634 (i386-linux.o): Likewise.
7635 (i386-linux.c): Likewise.
7636 (amd64.o): Likewise.
7637 (amd64.c): Likewise.
7638 (amd64-linux.o): Likewise.
7639 (amd64-linux.c): Likewise.
7640
7641 * configure.srv (srv_i386_regobj): New.
7642 (srv_i386_linux_regobj): Likewise.
7643 (srv_amd64_regobj): Likewise.
7644 (srv_amd64_linux_regobj): Likewise.
7645 (srv_i386_32bit_xmlfiles): Likewise.
7646 (srv_i386_64bit_xmlfiles): Likewise.
7647 (srv_i386_xmlfiles): Likewise.
7648 (srv_amd64_xmlfiles): Likewise.
7649 (srv_i386_linux_xmlfiles): Likewise.
7650 (srv_amd64_linux_xmlfiles): Likewise.
7651 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7652 srv_xmlfiles to $srv_i386_xmlfiles.
7653 (i[34567]86-*-mingw32ce*): Likewise.
7654 (i[34567]86-*-mingw*): Likewise.
7655 (i[34567]86-*-nto*): Likewise.
7656 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7657 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7658 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7659 (x86_64-*-linux*): Likewise.
7660
7661 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7662 (init_registers_amd64_linux): New.
7663 (x86_arch_setup): Replace init_registers_x86_64_linux with
7664 init_registers_amd64_linux.
7665
193f13e6
MK
76662010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7667
7668 * configure.ac: Check for libdl. If it is not available link against
7669 static libthread_db.
7670 * configure: Regenerate.
7671
85d721b8
PA
76722010-02-22 Pedro Alves <pedro@codesourcery.com>
7673
7674 PR9605
7675
7676 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7677 handing a read watchpoint.
7678 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7679
6076632b
DE
76802010-02-12 Doug Evans <dje@google.com>
7681
7682 * linux-low.c (linux_supports_tracefork_flag): Document.
7683 (linux_look_up_symbols): Add comment.
7684
3327ccf7
L
76852010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7686
7687 * regcache.c (supply_register): Clear regcache if buf is NULL.
7688
0718675c 76892010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7690 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7691
7692 * inferiors.c (find_inferior): Add function documentation.
7693 (unloaded_dll): Handle the case where the unloaded dll has not
7694 been previously registered in the dll list.
7695
177321bd
DJ
76962010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7697
7698 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7699 (thumb2_breakpoint): New.
7700 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7701
2b009048
DJ
77022010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7703
7704 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7705 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7706 breakpoints.
7707
3be029c7
PA
77082010-01-21 Pedro Alves <pedro@codesourcery.com>
7709
7710 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7711
18f5de3b
JK
77122010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7713
7714 * linux-s390-low.c (s390_collect_ptrace_register)
7715 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7716
3743bb4f
DE
77172010-01-21 Doug Evans <dje@google.com>
7718
14ce3065
DE
7719 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7720 (PTRACE_ARG4_TYPE): New macro.
7721 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7722 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7723 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7724 (usr_store_inferior_registers): Ditto.
7725 (linux_read_memory, linux_write_memory): Ditto.
7726 (linux_test_for_tracefork): Ditto.
7727
3743bb4f
DE
7728 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7729 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7730
8b315be5
PA
77312010-01-21 Pedro Alves <pedro@codesourcery.com>
7732
7733 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7734 target.
7735
85492558
PA
77362010-01-21 Pedro Alves <pedro@codesourcery.com>
7737
7738 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7739 prototype to take a regcache. Adjust.
7740
442ea881
PA
77412010-01-20 Pedro Alves <pedro@codesourcery.com>
7742
7743 * regcache.h (struct thread_info): Forward declare.
7744 (struct regcache): New.
7745 (new_register_cache): Adjust prototype.
7746 (get_thread_regcache): Declare.
7747 (free_register_cache): Adjust prototype.
7748 (registers_to_string, registers_from_string): Ditto.
7749 (supply_register, supply_register_by_name, collect_register)
7750 (collect_register_as_string, collect_register_by_name): Ditto.
7751 * regcache.c (struct inferior_regcache_data): Delete.
7752 (get_regcache): Rename to ...
7753 (get_thread_regcache): ... this. Adjust. Switch inferior before
7754 fetching registers.
7755 (regcache_invalidate_one): Adjust.
7756 (regcache_invalidate): Fix prototype.
7757 (new_register_cache): Return the new register cache.
7758 (free_register_cache): Change prototype.
7759 (realloc_register_cache): Adjust.
7760 (registers_to_string): Change prototype to take a regcache. Adjust.
7761 (registers_from_string): Ditto.
7762 (register_data): Ditto.
7763 (supply_register): Ditto.
7764 (supply_register_by_name): Ditto.
7765 (collect_register): Ditto.
7766 (collect_register_as_string): Ditto.
7767 (collect_register_by_name): Ditto.
7768 * server.c (process_serial_event): Adjust.
7769 * linux-low.h (regset_fill_func, regset_store_func): Change
7770 prototype.
7771 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7772 Change prototype.
7773 * linux-low.c (get_stop_pc): Adjust.
7774 (check_removed_breakpoint): Adjust.
7775 (linux_wait_for_event): Adjust.
7776 (linux_resume_one_lwp): Adjust.
7777 (fetch_register): Add regcache parameter. Adjust.
7778 (usr_store_inferior_registers): Ditto.
7779 (regsets_fetch_inferior_registers): Ditto.
7780 (regsets_store_inferior_registers): Ditto.
7781 (linux_fetch_registers, linux_store_registers): Ditto.
7782 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7783 regcache. Adjust.
43aaf8b6
PA
7784 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7785 Ditto.
442ea881
PA
7786 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7787 prototype to take a regcache.
7788 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7789 * remote-utils.c (convert_ascii_to_int, outreg)
7790 (prepare_resume_reply): Change prototype to take a regcache.
7791 Adjust.
7792 * target.h (struct target_ops) <fetch_registers, store_registers>:
7793 Change prototype to take a regcache.
7794 (fetch_inferior_registers, store_inferior_registers): Change
7795 prototype to take a regcache. Adjust.
7796 * proc-service.c (ps_lgetregs): Adjust.
7797 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7798 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7799 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7800 take a regcache. Adjust.
7801 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7802 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7803 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7804 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7805 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7806 (cris_cannot_fetch_register):
7807 (cris_breakpoint_at): Change prototype to take a regcache.
7808 Adjust.
7809 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7810 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7811 to take a regcache. Adjust.
7812 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7813 Adjust.
7814 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7815 take a regcache. Adjust.
7816 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7817 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7818 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7819 * linux-mips-low.c (mips_get_pc):
7820 (mips_set_pc): Change prototype to take a regcache. Adjust.
7821 (mips_reinsert_addr): Adjust.
7822 (mips_collect_register): Change prototype to take a regcache.
7823 Adjust.
7824 (mips_supply_register):
7825 (mips_collect_register_32bit, mips_supply_register_32bit)
7826 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7827 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7828 * linux-ppc-low.c (ppc_supply_ptrace_register)
7829 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7830 (parse_spufs_run): Adjust.
7831 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7832 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7833 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7834 take a regcache. Adjust.
7835 * linux-s390-low.c (s390_collect_ptrace_register)
7836 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7837 (s390_set_pc): Change prototype to take a regcache. Adjust.
7838 (s390_arch_setup): Adjust.
7839 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7840 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7841 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7842 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7843 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7844 regcache. Adjust.
7845 (sparc_breakpoint_at): Adjust.
7846 * linux-xtensa-low.c (xtensa_fill_gregset):
7847 (xtensa_store_gregset):
7848 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7849 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7850 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7851 prototype to take a regcache. Adjust.
7852 * win32-arm-low.c (arm_fetch_inferior_register)
7853 (arm_store_inferior_register): Change prototype to take a
7854 regcache. Adjust.
7855 * win32-i386-low.c (i386_fetch_inferior_register)
7856 (i386_store_inferior_register): Change prototype to take a
7857 regcache. Adjust.
7858 * win32-low.c (child_fetch_inferior_registers)
7859 (child_store_inferior_registers): Change prototype to take a
7860 regcache. Adjust.
7861 (win32_wait): Adjust.
7862 (win32_fetch_inferior_registers): Change prototype to take a
7863 regcache. Adjust.
7864 (win32_store_inferior_registers): Adjust.
7865 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7866 store_inferior_register>: Change prototype to take a regcache.
7867
60c3d7b0
DE
78682010-01-20 Doug Evans <dje@google.com>
7869
7870 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7871 #ifdef.
7872 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7873 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7874
dc146f7c
VP
78752010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7876
7877 * linux-low.c (linux_core_of_thread): New.
7878 (compare_ints, show_process, list_threads): New.
7879 (linux_qxfer_osdata): Report threads and cores.
7880 (linux_target_op): Register linux_core_of_thread.
7881 * remote-utils.c (prepare_resume_reply): Report the core.
7882 (buffer_xml_printf): Support %d specifier.
7883 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7884 New.
7885 (handle_query): Handle qXfer:threads. Announce availability
7886 thereof.
7887 * target.h (struct target_ops): New field core_of_thread.
7888
7803799a
UW
78892010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7890
7891 * Makefile.in (clean): Remove new generated files.
7892 (reg-s390.o, reg-s390.c): Remove rules.
7893 (reg-s390x.o, reg-s390x.c): Likewise.
7894 (s390-linux32.o, s390-linux32.c): Add rules.
7895 (s390-linux64.o, s390-linux64.c): Likewise.
7896 (s390x-linux64.o, s390x-linux64.c): Likewise.
7897 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7898 * linux-s390-low.c: Include <elf.h>.
7899 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7900 (init_registers_s390): Remove prototype.
7901 (init_registers_s390x): Likewise.
7902 (init_registers_s390_linux32): Add prototype.
7903 (init_registers_s390_linux64): Likewise.
7904 (init_registers_s390x_linux64): Likewise.
7905 (s390_num_regs_3264): New define.
7906 (s390_regmap_3264): New global variable.
7907 (s390_cannot_fetch_register): Remove obsolete check.
7908 (s390_cannot_store_register): Likewise.
7909 (s390_collect_ptrace_register): Handle upper/lower register halves.
7910 (s390_supply_ptrace_register): Likewise.
7911 (s390_fill_gregset): Update to register number changes.
7912 (s390_get_hwcap): New routine.
7913 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7914 Install appropriate regmap and register set.
7915
6e7ffa39
JB
79162010-01-01 Joel Brobecker <brobecker@adacore.com>
7917
7918 * server.c (gdbserver_version): Update copyright year to 2010.
7919 * gdbreplay.c (gdbreplay_version): Likewise.
7920
957f3f49
DE
79212009-12-28 Doug Evans <dje@google.com>
7922
7923 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7924 elf/external.h. Include <elf.h> instead but only if necessary.
7925
ca5c370d
PA
79262009-12-28 Pedro Alves <pedro@codesourcery.com>
7927
7928 * linux-low.c (linux_remove_process): Remove `detaching'
7929 parameter. Don't release/detach from thread_db here.
7930 (linux_kill): Release/detach from thread_db here, ...
7931 (linux_detach): ... and here, before actually detaching.
7932 (linux_wait_1): ... and here, when a process exits.
7933 * thread-db.c (any_thread_of): New.
7934 (thread_db_free): Switch the current inferior to a thread of the
7935 passed in process.
7936
4ee62156
DE
79372009-12-21 Doug Evans <dje@google.com>
7938
d90e6a88
DE
7939 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7940
c5f62d5f
DE
7941 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7942 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7943 warning ifndef __NR_tkill. Move setting of errno there too.
7944 Delete unnecessary resetting of errno after syscall.
7945 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7946
10e86dd7
DE
7947 * configure.ac: Check for dladdr.
7948 * config.in: Regenerate.
7949 * configure: Regenerate.
7950 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7951 (try_thread_db_load): Update.
7952
4ee62156
DE
7953 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7954
00f515da
DE
79552009-12-18 Doug Evans <dje@google.com>
7956
e9464885
DE
7957 * event-loop.c: Include unistd.h if it exists.
7958
07d4f67e
DE
7959 * linux-low.c (my_waitpid): Move definition away from being in
7960 between linux_tracefork_child/linux_test_for_tracefork.
7961
00f515da
DE
7962 * gdb_proc_service.h (psaddr_t): Fix type.
7963 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7964 signature to match glibc.
7965
1de1badb
DE
79662009-12-16 Doug Evans <dje@google.com>
7967
7968 * linux-low.c (linux_read_memory): Fix argument to read.
7969
aeeb81d1
PA
79702009-11-26 Pedro Alves <pedro@codesourcery.com>
7971
7972 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7973 events, don't leave current_inferior pointing at null.
7974
10357975
PA
79752009-11-26 Pedro Alves <pedro@codesourcery.com>
7976
7977 * win32-low.c (LOG): Delete.
7978 (OUTMSG): Output to stderr.
7979 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7980 on compile time LOG macro.
7981 (win32_wait): Fix debug output.
7982
cf6e3471
PA
79832009-11-26 Pedro Alves <pedro@codesourcery.com>
7984
7985 * win32-low.c (win32_add_one_solib): If the dll name is
7986 "ntdll.dll", prepend the system directory to the dll path.
7987
0c85e18e
MK
79882009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7989
7990 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7991
9ac544ce 79922009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7993 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7994
7995 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7996 * configure.ac: Check for __mcoldfire__ and set
7997 gdb_cv_m68k_is_coldfire.
7998 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7999 reg-cf.o and reg-m68k.o.
8000 * configure: Regenerated.
8001
fd7dd3e6
PA
80022009-11-16 Pedro Alves <pedro@codesourcery.com>
8003
8004 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8005 Pass it to thread_db_free.
8006 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8007 proper `detaching' argument to linux_remove_process.
8008 * linux-low.h (thread_db_free): Add `detaching' parameter.
8009 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8010 to thread_db_free.
8011 (thread_db_free): Add `detaching' parameter. Only
8012 call td_ta_clear_event if detaching from process.
8013
75aa492e
MK
80142009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8015
8016 * thread-db.c (thread_db_free): Fix typo.
8017
21e1bee4
PP
80182009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8019
8020 PR gdb/10838
8021 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8022
8838b45e
NS
80232009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8024
8025 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8026 with an i686 compiler.
8027 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8028 needed.
8029 * configure: Rebuilt.
8030
8a35fb51
SL
80312009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8032
8033 PR gdb/10783
8034
8035 * server.c (handle_search_memory_1): Correct read_addr initialization
8036 in loop for searching subsequent chunks.
8037
96f15937
PP
80382009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8039
8040 * configure.ac: New --with-libthread-db option.
8041 * thread-db.c: Allow direct dependence on libthread_db.
8042 (thread_db_free): Adjust.
8043 * config.in: Regenerate.
8044 * configure: Likewise.
889bf7c5 8045
5f7d1694
PP
80462009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8047
8048 PR gdb/10757
8049 * thread-db.c (attach_thread): New function.
8050 (maybe_attach_thread): Return success/failure.
8051 (find_new_threads_callback): Adjust.
889bf7c5
PA
8052 (thread_db_find_new_threads): Loop until no new threads.
8053
88e3b899
PA
80542009-10-13 Pedro Alves <pedro@codesourcery.com>
8055
8056 * proc-service.c (ps_lgetregs): Formatting.
8057
cdbfd419
PP
80582009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8059
8060 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8061 * configure.ac: Adjust.
8062 * linux-low.h (struct process_info_private): Move members to struct
8063 thread_db.
8064 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8065 * linux-low.c (linux_remove_process): Adjust.
8066 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8067 * server.c (handle_query): Move code ...
8068 (handle_monitor_command): ... here. New function.
8069 * target.h (struct target_ops): New member.
8070 * thread-db.c (struct thread_db): New.
8071 (libthread_db_search_path): New variable.
8072 (thread_db_create_event, thread_db_enable_reporting)
8073 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8074 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8075 (try_thread_db_load_1, dladdr_to_soname): New functions.
8076 (try_thread_db_load, thread_db_load_search): New functions.
8077 (thread_db_init): Search for libthread_db.
8078 (thread_db_free): New function.
8079 (thread_db_handle_monitor_command): Likewise.
8080 * config.in: Regenerate.
8081 * configure: Regenerate.
889bf7c5 8082
4168d2d6
UW
80832009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8084
8085 * spu-low.c (spu_kill): Wait for inferior to terminate.
8086 Call clear_inferiors.
8087 (spu_detach): Call clear_inferiors.
8088
81ecdfbb
RW
80892009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8090
8091 * aclocal.m4: Regenerate.
8092 * config.in: Likewise.
8093 * configure: Likewise.
8094
0b9ff2c0
UW
80952009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8096
8097 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8098 (parse_spufs_run): New function.
8099 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8100 (ppc_breakpoint_at): Handle SPU breakpoints.
8101
efcbbd14
UW
81022009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8103
8104 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8105 (SPUFS_MAGIC): Define.
8106 (spu_enumerate_spu_ids): New function.
8107 (linux_qxfer_spu): New function.
8108 (linux_target_ops): Install linux_qxfer_spu.
8109
f4d9bade
UW
81102009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8111
8112 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8113 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8114 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8115 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8116 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8117 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8118 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8119 (init_registers_powerpc_cell32l): Add prototype.
8120 (init_registers_powerpc_cell64l): Likewise.
8121 (ppc_arch_setup): Detect Cell/B.E. architecture.
8122
96e946ca
RW
81232009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8124
8125 * Makefile.in (datarootdir): New variable.
8126
58d6951d
DJ
81272009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8128
8129 * linux-low.c (linux_write_memory): Update debugging output.
8130 * Makefile.in (clean): Add new descriptions.
8131 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8132 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8133 * configure.srv: Add new files for arm*-*-linux*.
8134 * linux-arm-low.c: Add new declarations.
8135 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8136 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8137 (HWCAP_VFPv3D16): New.
8138 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8139 instead of __IWMMXT__.
8140 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8141 (arm_arch_setup): New.
8142 (target_regsets): Remove #ifdef. Add VFP regset.
8143 (the_low_target): Use arm_arch_setup.
8144
12b42a12
DJ
81452009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8146
8147 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8148 the main thread again.
8149
ac8c974e
AR
81502009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8151
8152 Adding Neutrino gdbserver.
8153 * configure: Regenerated.
8154 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8155 * configure.srv (i[34567]86-*-nto*): New target.
8156 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8157 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8158 (nto_comctrl) [__QNX__]: New function.
8159 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8160
4424e0c3 81612009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8162
8163 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8164 srv_tgtobj.
8165
912cf4ba
PA
81662009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8167 Pedro Alves <pedro@codesourcery.com>
8168
8169 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8170 don't support CONTEXT_EXTENDED_REGISTERS.
8171 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8172 (the_low_target): Install them.
8173 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8174 failing with ERROR_PIPE_NOT_CONNECTED.
8175
aa5ca48f
DE
81762009-06-30 Doug Evans <dje@google.com>
8177 Pierre Muller <muller@ics.u-strasbg.fr>
8178
8179 Add h/w watchpoint support to x86-linux, win32-i386.
8180 * Makefile.in (SFILES): Add i386-low.c
8181 (i386_low_h): Define.
8182 (i386-low.o): Add dependencies.
8183 (linux-x86-low.o): Add i386-low.h dependency.
8184 (win32-i386-low.o): Ditto.
8185 * i386-low.c: New file.
8186 * i386-low.h: New file.
8187 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8188 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8189 * linux-low.c (linux_add_process): Initialize arch_private.
8190 (linux_remove_process): Free arch_private.
8191 (add_lwp): Initialize arch_private.
8192 (delete_lwp): Free arch_private.
8193 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8194 provided.
8195 * linux-low.h (process_info_private): New member arch_private.
8196 (lwp_info): New member arch_private.
8197 (linux_target_ops): New members new_process, new_thread,
8198 prepare_to_resume.
8199 (ptid_of): New macro.
8200 * linux-x86-low.c: Include stddef.h, i386-low.h.
8201 (arch_process_info): New struct.
8202 (arch_lwp_info): New struct.
8203 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8204 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8205 (i386_dr_low_get_status): New function.
8206 (x86_insert_point, x86_remove_point): New functions.
8207 (x86_stopped_by_watchpoint): New function.
8208 (x86_stopped_data_address): New function.
8209 (x86_linux_new_process, x86_linux_new_thread): New functions.
8210 (x86_linux_prepare_to_resume): New function.
8211 (the_low_target): Add entries for insert_point, remove_point,
8212 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8213 prepare_to_resume.
8214 * server.c (debug_hw_points): New global.
8215 (monitor_show_help): Document set debug-hw-points.
8216 (handle_query): Process "set debug-hw-points".
8217 * server.h (debug_hw_points): Declare.
8218 (paddress): Declare.
8219 * utils.c (NUMCELLS, CELLSIZE): New macros.
8220 (get_sell, xsnprintf, paddress): New functions.
8221 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8222 remove_point, stopped_by_watchpoint, stopped_data_address.
8223 * win32-i386-low.c: Include i386-low.h.
8224 (debug_reg_state): Replaces dr.
8225 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8226 (i386_dr_low_get_status): New function.
8227 (i386_insert_point, i386_remove_point): New functions.
8228 (i386_stopped_by_watchpoint): New function.
8229 (i386_stopped_data_address): New function.
8230 (i386_initial_stuff): Update.
8231 (get_thread_context,set_thread_context,i386_thread_added): Update.
8232 (the_low_target): Add entries for insert_point,
8233 remove_point, stopped_by_watchpoint, stopped_data_address.
8234 * win32-low.c (win32_insert_watchpoint): New function.
8235 (win32_remove_watchpoint): New function.
8236 (win32_stopped_by_watchpoint): New function.
8237 (win32_stopped_data_address): New function.
8238 (win32_target_ops): Add entries for insert_watchpoint,
8239 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8240 * win32-low.h (win32_target_ops): New members insert_point,
8241 remove_point, stopped_by_watchpoint, stopped_data_address.
8242
d993e290
PA
82432009-06-25 Pedro Alves <pedro@codesourcery.com>
8244
8245 * server.c (process_serial_event): Re-return unsupported, not
8246 error, if the type isn't recognized. Re-allow supporting only
8247 insert or remove packets. Also call require_running for
8248 breakpoints. Add missing break statement to default case. Tidy.
8249 * target.h (struct target_ops): Rename insert_watchpoint to
8250 insert_point, and remove_watchpoint to remove_point.
8251
8252 * linux-low.h (struct linux_target_ops): Likewise.
8253 * linux-low.c (linux_insert_watchpoint): Rename to ...
8254 (linux_insert_point): ... this. Adjust.
8255 (linux_remove_watchpoint): Rename to ...
8256 (linux_remove_point): ... this. Adjust.
8257 (linux_target_ops): Adjust.
8258 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8259 (cris_insert_point): ... this.
8260 (cris_remove_watchpoint): Rename to ...
8261 (cris_remove_point): ... this.
8262 (the_low_target): Adjust.
8263
0f54c268
PM
82642009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8265
8266 * server.c (handle_v_kill): Pass signal_pid to
8267 kill_inferior if multi_process is zero.
8268
c6314022
AR
82692009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8270
8271 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8272 * target.h (target_ops): Comment for *_watchpoint to make it clear
8273 the functions can get types '0' and '1'.
8274
4463ce24
AR
82752009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8276
8277 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8278 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8279 * regcache.c (get_regcache): Likewise.
8280 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8281 * win32-low.c (child_fetch_inferior_registers): Remove check for
8282 regno 0.
8283
cf8fd78b
PA
82842009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8285 Pedro Alves <pedro@codesourcery.com>
8286
8287 * target.h (struct target_ops) <supports_multi_process>: New
8288 callback.
8289 (target_supports_multi_process): New.
8290 * server.c (handle_query): Even if GDB reports support, only
8291 enable multi-process if the target also supports it. Report
8292 multi-process support only if the target backend supports it.
8293 * linux-low.c (linux_supports_multi_process): New function.
8294 (linux_target_ops): Install it as target_supports_multi_process
8295 callback.
8296
47c0c975
DE
82972009-05-24 Doug Evans <dje@google.com>
8298
e09875d4
DE
8299 Global renaming of find_thread_pid to find_thread_ptid.
8300 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8301 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8302 All callers updated.
8303
e27d73f6
DE
8304 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8305 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8306 directly.
8307
47c0c975
DE
8308 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8309 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8310 (linux_resume_one_lwp): Ditto.
8311
2acc282a
DE
83122009-05-23 Doug Evans <dje@google.com>
8313
8314 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8315 from struct inferior_list_entry * to struct lwp_info *.
8316 All callers updated.
8317
9f1036c1
DE
83182009-05-13 Doug Evans <dje@google.com>
8319
8320 * linux-x86-low.c: Don't include assert.h.
8321 (x86_siginfo_fixup): Use fatal, not assert.
8322 (x86_arch_setup): Fix comment.
8323
d0722149
DE
83242009-05-12 Doug Evans <dje@google.com>
8325
8326 Biarch support for i386/amd64 gdbserver.
8327 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8328 Add linux-x86-low.c.
8329 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8330 (linux-x86-low.o): Add.
8331 * linux-x86-64-low.c: Delete.
8332 * linux-i386-low.c: Delete.
8333 * linux-x86-low.c: New file.
8334 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8335 linux-x86-low.o.
8336 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8337 linux-x86-low.o.
8338 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8339 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8340 (linux_child_pid_to_exec_file): New function.
8341 (elf_64_header_p, elf_64_file_p): New functions.
8342 (siginfo_fixup): New function.
8343 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8344 give target a chance to convert layout.
8345 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8346 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8347
fdeb2a12
DE
83482009-05-07 Doug Evans <dje@google.com>
8349
8350 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8351 (regsets_store_inferior_registers): Ditto.
8352
a6dbe5df
PA
83532009-05-06 Pedro Alves <pedro@codesourcery.com>
8354
8355 PR server/10048
8356
8357 * linux-low.c (must_set_ptrace_flags): Delete.
8358 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8359 of the global.
8360 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8361 `lwp->must_set_ptrace_flags' instead.
ba42693b 8362 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8363 (linux_wait_1): ... not here.
8364
5091eb23
DE
83652009-04-30 Doug Evans <dje@google.com>
8366
9f767825
DE
8367 * inferiors.c (started_inferior_callback): New function.
8368 (attached_inferior_callback): New function.
8369 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8370 * server.c (print_started_pid, print_attached_pid): New functions.
8371 (detach_or_kill_for_exit): New function.
8372 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8373 * server.h (have_started_inferiors_p): Declare.
8374 (have_attached_inferiors_p): Declare.
8375
5091eb23
DE
8376 * inferiors.c (remove_process): Fix memory leak, free process.
8377 * linux-low.c (linux_remove_process): New function.
8378 (linux_kill): Call it instead of remove_process.
8379 (linux_detach, linux_wait_1): Ditto.
8380
155c8968
PA
83812009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8382
8383 * configure.srv: Add x86 Windows CE target.
8384
7fe519cb
UW
83852009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8386
8387 * inferiors.c (get_thread_process): Make global.
8388 * server.h (get_thread_process): Add prototype.
8389 * thread-db.c (find_one_thread): Use get_thread_process
8390 instead of current_process.
8391 (thread_db_get_tls_address): Do not crash if called when
8392 thread layer is not yet initialized.
8393
5472f405
UW
83942009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8395
8396 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8397 * spu-low.c (current_tid): Rename to ...
8398 (current_ptid): ... this.
8399 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8400 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8401 ptid_get_lwp (current_ptid) instead of current_tid.
8402 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8403 instead of current_tid. Use find_process_pid to verify pid
8404 argument is valid. Pass proper argument to remove_process.
8405 (spu_thread_alive): Compare current_ptid instead of current_tid.
8406 (spu_resume): Likewise.
8407
55ac2b99
PA
84082009-04-02 Pedro Alves <pedro@codesourcery.com>
8409
8410 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8411 variable.
8412
95954743
PA
84132009-04-01 Pedro Alves <pedro@codesourcery.com>
8414
8415 Implement the multiprocess extensions, and add linux multiprocess
8416 support.
8417
8418 * server.h (ULONGEST): Declare.
8419 (struct ptid, ptid_t): New.
8420 (minus_one_ptid, null_ptid): Declare.
8421 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8422 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8423 (struct inferior_list_entry): Change `id' type from unsigned from
8424 to ptid_t.
8425 (struct sym_cache, struct breakpoint, struct
8426 process_info_private): Forward declare.
8427 (struct process_info): Declare.
8428 (current_process): Declare.
8429 (all_processes): Declare.
8430 (initialize_inferiors): Declare.
8431 (add_thread): Adjust to use ptid_t.
8432 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8433 (add_process, remove_process, find_thread_pid): Declare.
8434 (find_inferior_id): Adjust to use ptid_t.
8435 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8436 (multi_process): Declare.
8437 (push_event): Adjust to use ptid_t.
8438 (read_ptid, write_ptid): Declare.
8439 (prepare_resume_reply): Adjust to use ptid_t.
8440 (clear_symbol_cache): Declare.
8441 * inferiors.c (all_processes): New.
8442 (null_ptid, minus_one_ptid): New.
8443 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8444 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8445 (add_thread): Change unsigned long to ptid. Remove gdb_id
8446 parameter. Adjust.
8447 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8448 (gdb_id_to_thread): Rename to ...
8449 (find_thread_pid): ... this. Change unsigned long to ptid.
8450 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8451 (loaded_dll, pull_pid_from_list): Adjust.
8452 (add_process, remove_process, find_process_pid)
8453 (get_thread_process, current_process, initialize_inferiors): New.
8454 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8455 (struct target_waitstatus) <related_pid>: Ditto.
8456 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8457 return type to int.
8458 (struct target_ops) <join>: Add `pid' argument.
8459 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8460 (struct target_ops) <wait>: Add `ptid' field. Change return type
8461 to ptid.
8462 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8463 (mywait): Add `ptid' argument. Change return type to ptid_t.
8464 (target_pid_to_str): Declare.
8465 * target.c (set_desired_inferior): Adjust to use ptids.
8466 (mywait): Add new `ptid' argument. Adjust.
8467 (target_pid_to_str): New.
8468 * mem-break.h (free_all_breakpoints): Declare.
8469 * mem-break.c (breakpoints): Delelete.
8470 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8471 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8472 to use per-process breakpoint list.
8473 (free_all_breakpoints): New.
8474 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8475 (symbol_cache, all_symbols_looked_up): Delete.
8476 (hexchars): New.
8477 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8478 read_ptid): New.
8479 (prepare_resume_reply): Change ptid argument's type from unsigned
8480 long to ptid_t. Adjust. Implement W;process and X;process.
8481 (free_sym_cache, clear_symbol_cache): New.
8482 (look_up_one_symbol): Adjust to per-process symbol cache. *
8483 * server.c (cont_thread, general_thread, step_thread): Change type
8484 to ptid_t.
8485 (attached): Delete.
8486 (multi_process): New.
8487 (last_ptid): Change type to ptid_t.
8488 (struct vstop_notif) <ptid>: Change type to ptid_t.
8489 (queue_stop_reply, push_event): Change `ptid' argument's type to
8490 ptid_t.
8491 (discard_queued_stop_replies): Add `pid' argument.
8492 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8493 changes. Don't reference the `attached' global.
8494 (attach_inferior): Adjust to mywait interface changes.
8495 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8496 features. Handle and report "multiprocess+". Handle
8497 "qAttached:PID".
8498 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8499 changes.
8500 (handle_v_kill): New.
8501 (handle_v_stopped): Adjust to use target_pid_to_str.
8502 (handle_v_requests): Allow multiple attaches and runs when
8503 multiprocess extensions are in effect. Handle "vKill".
8504 (myresume): Adjust to use ptids.
8505 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8506 (handle_status): Adjust to discard_queued_stop_replies interface
8507 change.
8508 (first_thread_of, kill_inferior_callback)
8509 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8510 (main): Call initialize_inferiors. Adjust to use ptids, killing
8511 and detaching from all inferiors. Handle multiprocess packet
8512 variants.
8513 * linux-low.h: Include gdb_proc_service.h.
8514 (struct process_info_private): New.
8515 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8516 <lwpid_of>: Use ptid_get_lwp.
8517 (get_lwp_thread): Adjust.
8518 (struct lwp_info): Add `dead' member.
8519 (find_lwp_pid): Declare.
8520 * linux-low.c (thread_db_active): Delete.
8521 (new_inferior): Adjust comment.
8522 (inferior_pid): Delete.
8523 (linux_add_process): New.
8524 (handle_extended_wait): Adjust.
8525 (add_lwp): Change unsigned long to ptid.
8526 (linux_create_inferior): Add process to processes table. Adjust
8527 to use ptids. Don't set new_inferior here.
8528 (linux_attach_lwp): Rename to ...
8529 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8530 it. Adjust to use ptids.
8531 (linux_attach_lwp): New.
8532 (linux_attach): Add process to processes table. Don't set
8533 new_inferior here.
8534 (struct counter): New.
8535 (second_thread_of_pid_p, last_thread_of_process_p): New.
8536 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8537 multiple processes.
8538 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8539 processes. Remove process from process table.
8540 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8541 to multiple processes.
8542 (any_thread_of): New.
8543 (linux_detach): Add `pid' argument, and handle it. Remove process
8544 from processes table.
8545 (linux_join): Add `pid' argument. Handle it.
8546 (linux_thread_alive): Change unsighed long argument to ptid_t.
8547 Consider dead lwps as not being alive.
8548 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8549 threads we're not interested in.
8550 (same_lwp, find_lwp_pid): New.
8551 (linux_wait_for_lwp): Change `pid' argument's type from int to
8552 ptid_t. Adjust.
8553 (linux_wait_for_event): Rename to ...
8554 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8555 from int to ptid_t. Adjust.
8556 (linux_wait_for_event): New.
8557 (linux_wait_1): Add `ptid' argument. Change return type to
8558 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8559 that exit from the process table.
8560 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8561 Adjust.
8562 (mark_lwp_dead): New.
8563 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8564 stopping all threads, mark its main lwp as dead.
8565 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8566 ptids.
8567 (fetch_register, usr_store_inferior_registers)
8568 (regsets_fetch_inferior_registers)
8569 (regsets_store_inferior_registers, linux_read_memory)
8570 (linux_write_memory): Inline `inferior_pid'.
8571 (linux_look_up_symbols): Adjust to use per-process
8572 `thread_db_active'.
8573 (linux_request_interrupt): Adjust to use ptids.
8574 (linux_read_auxv): Inline `inferior_pid'.
8575 (initialize_low): Don't reference thread_db_active.
8576 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8577 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8578 (ps_getpid): Return the pid of the current inferior.
8579 * thread-db.c (proc_handle, thread_agent): Delete.
8580 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8581 per-process data.
8582 (find_one_thread): Change argument type to ptid_t. Adjust to
8583 per-process data.
8584 (maybe_attach_thread): Adjust to per-process data and ptids.
8585 (thread_db_find_new_threads): Ditto.
8586 (thread_db_init): Ditto.
8587 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8588 processes table. Adjust to use ptids.
8589 (spu_kill, spu_detach): Adjust interface. Remove process from
8590 processes table.
8591 (spu_join, spu_thread_alive): Adjust interface.
8592 (spu_wait): Adjust interface. Remove process from processes
8593 table. Adjust to use ptids.
8594 * win32-low.c (current_inferior_tid): Delete.
8595 (current_inferior_ptid): New.
8596 (debug_event_ptid): New.
8597 (thread_rec): Take a ptid. Adjust.
8598 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8599 (child_delete_thread): Ditto.
8600 (do_initial_child_stuff): Add `attached' argument. Add process to
8601 processes table.
8602 (child_fetch_inferior_registers, child_store_inferior_registers):
8603 Adjust.
8604 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8605 (win32_attach): Pass 1 to do_initial_child_stuff.
8606 (win32_kill): Adjust interface. Remove process from processes
8607 table.
8608 (win32_detach): Ditto.
8609 (win32_join): Adjust interface.
8610 (win32_thread_alive): Take a ptid.
8611 (win32_resume): Adjust to use ptids.
8612 (get_child_debug_event): Ditto.
8613 (win32_wait): Adjust interface. Remove exiting process from
8614 processes table.
8615
bd99dc85
PA
86162009-04-01 Pedro Alves <pedro@codesourcery.com>
8617
8618 Non-stop mode support.
8619
8620 * server.h (non_stop): Declare.
8621 (gdb_client_data, handler_func): Declare.
8622 (delete_file_handler, add_file_handler, start_event_loop):
8623 Declare.
8624 (handle_serial_event, handle_target_event, push_event)
8625 (putpkt_notif): Declare.
8626 * target.h (enum resume_kind): New.
8627 (struct thread_resume): Replace `step' field by `kind' field.
8628 (TARGET_WNOHANG): Define.
8629 (struct target_ops) <wait>: Add `options' argument.
8630 <supports_non_stop, async, start_non_stop>: New fields.
8631 (target_supports_non_stop, target_async): New.
8632 (start_non_stop): Declare.
8633 (mywait): Add `options' argument.
8634 * target.c (mywait): Add `options' argument. Print child exit
8635 notifications here.
8636 (start_non_stop): New.
8637 * server.c (non_stop, own_buf, mem_buf): New globals.
8638 (struct vstop_notif): New.
8639 (notif_queue): New global.
8640 (queue_stop_reply, push_event, discard_queued_stop_replies)
8641 (send_next_stop_reply): New.
8642 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8643 interface changes.
8644 (attach_inferior): In non-stop mode, don't wait for the target
8645 here.
8646 (handle_general_set): Handle QNonStop.
8647 (handle_query): When handling qC, return the current general
8648 thread, instead of the first thread of the list.
8649 (handle_query): If the backend supports non-stop mode, include
8650 QNonStop+ in the qSupported query response.
8651 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8652 and non-stop mode.
8653 (handle_v_attach, handle_v_run): Handle non-stop mode.
8654 (handle_v_stopped): New.
8655 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8656 (myresume): Adjust to use resume_kind. Handle non-stop.
8657 (queue_stop_reply_callback): New.
8658 (handle_status): Handle non-stop mode.
8659 (main): Clear non_stop flag on reconnection. Use the event-loop.
8660 Refactor serial protocol handling from here ...
8661 (process_serial_event): ... to this new function. When GDB
8662 selects any thread, select one here. In non-stop mode, wait until
8663 GDB acks all pending events before exiting.
8664 (handle_serial_event, handle_target_event): New.
8665 * remote-utils.c (remote_open): Install remote_desc in the event
8666 loop.
8667 (remote_close): Remove remote_desc from the event loop.
8668 (putpkt_binary): Rename to...
8669 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8670 (putpkt_binary): New as wrapper around putpkt_binary_1.
8671 (putpkt_notif): New.
8672 (prepare_resume_reply): In non-stop mode, don't change the
8673 general_thread.
8674 * event-loop.c: New.
8675 * Makefile.in (OBJ): Add event-loop.o.
8676 (event-loop.o): New rule.
8677
8678 * linux-low.h (pid_of): Moved here.
8679 (lwpid_of): New.
8680 (get_lwp_thread): Use lwpid_of.
8681 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8682 * linux-low.c (pid_of): Delete.
8683 (inferior_pid): Use lwpid_of.
8684 (linux_event_pipe): New.
8685 (target_is_async_p): New.
8686 (delete_lwp): New.
8687 (handle_extended_wait): Use lwpid_of.
8688 (add_lwp): Don't set lwpid field.
8689 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8690 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8691 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8692 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8693 first. Adjust to linux_wait_for_event interface changes. Use
8694 lwpid_of.
8695 (linux_detach): Don't delete the main lwp here.
8696 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8697 (status_pending_p): Don't consider explicitly suspended lwps.
8698 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8699 pointer. Add OPTIONS argument. Change return type to int. Use
8700 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8701 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8702 pointer. Add status pointer argument. Return a pid instead of a
8703 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8704 changes. In non-stop mode, don't switch to a random thread.
8705 (linux_wait): Rename to...
8706 (linux_wait_1): ... this. Add target_options argument, and handle
8707 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8708 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8709 clean exit and signal exit code. Don't stop all threads in
8710 non-stop mode. In all-stop mode, only stop all threads when
8711 reporting a stop to GDB. Handle explicit thread stop requests.
8712 (async_file_flush, async_file_mark): New.
8713 (linux_wait): New.
8714 (send_sigstop): Use lwpid_of.
8715 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8716 interface changes. In non-stop mode, don't switch to a random
8717 thread.
8718 (linux_resume_one_lwp): Use lwpid_of.
8719 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8720 (linux_resume_one_thread): ... this. Handle resume_stop. In
8721 non-stop mode, don't look for pending flag in all threads.
8722 (resume_status_pending_p): Don't consider explicitly suspended
8723 threads.
8724 (my_waitpid): Reimplement. Emulate __WALL.
8725 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8726 Use lwpid_of.
8727 (sigchld_handler, linux_supports_non_stop, linux_async)
8728 (linux_start_non_stop): New.
8729 (linux_target_ops): Register linux_supports_non_stop, linux_async
8730 and linux_start_non_stop.
8731 (initialize_low): Install SIGCHLD handler.
8732 * thread-db.c (thread_db_create_event, find_one_thread)
8733 (thread_db_get_tls_address): Use lwpid_of.
8734 * win32-low.c (win32_detach): Adjust to use resume_kind.
8735 (win32_wait): Add `options' argument.
8736 * spu-low.c (spu_resume): Adjust to use resume_kind.
8737 (spu_wait): Add `options' argument.
8738
5b1c542e
PA
87392009-04-01 Pedro Alves <pedro@codesourcery.com>
8740
8741 Decouple target code from remote protocol.
8742
8743 * target.h (enum target_waitkind): New.
8744 (struct target_waitstatus): New.
8745 (struct target_ops) <wait>: Return an unsigned long. Take a
8746 target_waitstatus pointer instead of a char pointer.
8747 (mywait): Likewise.
8748 * target.c (mywait): Change prototype to return an unsigned long.
8749 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8750 * server.h (thread_from_wait, old_thread_from_wait): Delete
8751 declarations.
8752 (prepare_resume_reply): Change prototype to take a
8753 target_waitstatus.
8754 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8755 (last_status, last_ptid): New.
8756 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8757 pid instead of a signal.
8758 (attach_inferior): Remove "status" and "signal" parameters.
8759 Adjust.
8760 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8761 not as an address.
8762 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8763 (handle_v_requests, myresume): Remove "status" and "signal"
8764 parameters. Adjust.
8765 (handle_status): New.
8766 (main): Delete local `status'. Adjust.
8767 * remote-utils.c: Include target.h.
8768 (prepare_resume_reply): Change prototype to take a
8769 target_waitstatus. Adjust.
8770
8771 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8772 interface.
8773 * spu-low.c (spu_wait): Adjust.
8774 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8775 Delete.
8776 (win32_wait): Adjust.
8777
2bd7c093
PA
87782009-04-01 Pedro Alves <pedro@codesourcery.com>
8779
8780 * target.h (struct thread_resume): Delete leave_stopped member.
8781 (struct target_ops): Add a `n' argument to the `resume' callback.
8782 * server.c (start_inferior): Adjust.
8783 (handle_v_cont, myresume): Adjust.
8784 * linux-low.c (check_removed_breakpoint): Adjust to resume
8785 interface change, and to removed leave_stopped field.
8786 (resume_ptr): Delete.
8787 (struct thread_resume_array): New.
8788 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8789 resume interface change.
8790 (linux_continue_one_thread, linux_queue_one_thread)
8791 (resume_status_pending_p): Check if the resume field is NULL
8792 instead of checking the leave_stopped member.
8793 (linux_resume): Adjust to the target resume interface change.
8794 * spu-low.c (spu_resume): Adjust to the target resume interface
8795 change.
8796 * win32-low.c (win32_detach, win32_resume): Ditto.
8797
c35fafde
PA
87982009-04-01 Pedro Alves <pedro@codesourcery.com>
8799
8800 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8801 flag.
8802 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8803 pending.
8804 (linux_continue_one_thread): Only preserve the stepping flag if
8805 there's a pending breakpoint.
8806
0a59d50b
PA
88072009-03-31 Pedro Alves <pedro@codesourcery.com>
8808
8809 * server.c (main): After the inferior having exited, call
8810 remote_close before exiting gdbserver.
8811
f04c6d38
TJB
88122009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8813
8814 Fix size of FPSCR in Power 7 processors.
8815 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8816 (PPC_FEATURE_HAS_DFP): New #define.
8817 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8818 size of the FPSCR.
8819
78e5cee6
PA
88202009-03-23 Pedro Alves <pedro@codesourcery.com>
8821
8822 * server.c (handle_query) Whitespace and formatting.
8823
1b3f6016
PA
88242009-03-22 Pedro Alves <pedro@codesourcery.com>
8825
8826 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8827 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8828 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8829 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8830 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8831 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8832 Makefile.in, configure.ac: Fix whitespace throughout.
8833 * configure: Regenerate.
8834
a07b2135
PA
88352009-03-22 Pedro Alves <pedro@codesourcery.com>
8836
8837 * inferiors.c (find_inferior): Make it safe for the callback
8838 function to delete the currently iterated inferior.
8839
67cc2626
PA
88402009-03-22 Pedro Alves <pedro@codesourcery.com>
8841
8842 * Makefile.in (linuw_low_h): Move higher.
8843 (thread-db.o): Depend on $(linux_low_h).
8844
54a0b537
PA
88452009-03-17 Pedro Alves <pedro@codesourcery.com>
8846
8847 Rename "process" to "lwp" throughout.
8848
8849 * linux-low.c (all_processes): Rename to...
8850 (all_lwps): ... this.
8851 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8852 (add_process): Rename to ...
8853 (add_lwp): ... this. Adjust.
8854 (linux_create_inferior): Adjust.
8855 (linux_attach_lwp): Adjust.
8856 (linux_attach): Adjust.
8857 (linux_kill_one_process): Rename to ...
8858 (linux_kill_one_lwp): ... this. Adjust.
8859 (linux_kill): Adjust.
8860 (linux_detach_one_process): Rename to ...
8861 (linux_detach_one_lwp): ... this. Adjust.
8862 (linux_detach): Adjust.
8863 (check_removed_breakpoint): Adjust.
8864 (status_pending_p): Adjust.
8865 (linux_wait_for_process): Rename to ...
8866 (linux_wait_for_lwp): ... this. Adjust.
8867 (linux_wait_for_event): Adjust.
8868 (send_sigstop): Adjust.
8869 (wait_for_sigstop): Adjust.
8870 (stop_all_processes): Rename to ...
8871 (stop_all_lwps): ... this.
8872 (linux_resume_one_process): Rename to ...
8873 (linux_resume_one_lwp): ... this. Adjust.
8874 (linux_set_resume_request, linux_continue_one_thread)
8875 (linux_queue_one_thread, resume_status_pending_p)
8876 (usr_store_inferior_registers, regsets_store_inferior_registers)
8877 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8878 Adjust.
8879 * linux-low.h (get_process): Rename to ...
8880 (get_lwp): ... this. Adjust.
8881 (get_thread_process): Rename to ...
8882 (get_thread_lwp): ... this. Adjust.
8883 (get_process_thread): Rename to ...
8884 (get_lwp_thread): ... this. Adjust.
8885 (struct process_info): Rename to ...
8886 (struct lwp_info): ... this.
8887 (all_processes): Rename to ...
8888 (all_lwps): ... this.
8889 * proc-service.c (ps_lgetregs): Adjust.
8890 * thread-db.c (thread_db_create_event, find_one_thread)
8891 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8892
0b16c5cf
PA
88932009-03-14 Pedro Alves <pedro@codesourcery.com>
8894
8895 * server.c (handle_query): Handle "qAttached".
8896
32de4b9d
NS
88972009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8898
8899 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8900 GPLv3, update license URL.
8901
2aecd87f
DE
89022009-03-01 Doug Evans <dje@google.com>
8903
93efd302 8904 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8905 (server_h): Add gdb_signals.h.
8906 (signals.o): Update.
8907 * server.h (target_signal_from_host,target_signal_to_host_p)
8908 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8909
86b1f9c5
PM
89102009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8911
8912 * remote-utils.c (getpkt): Also generate remote-debug
8913 information if noack_mode is set.
8914
4aa995e1
PA
89152009-02-06 Pedro Alves <pedro@codesourcery.com>
8916
8917 * server.c (handle_query): Report qXfer:siginfo:read and
8918 qXfer:siginfo:write as supported and handle them.
8919 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8920 * linux-low.c (linux_xfer_siginfo): New.
8921 (linux_target_ops): Set it.
8922
62709adf
PA
89232009-01-26 Pedro Alves <pedro@codesourcery.com>
8924
8925 * server.c (gdbserver_usage): Mention --remote-debug.
8926 (main): Accept '--remote-debug' switch.
8927
aef93bd7
DE
89282009-01-18 Doug Evans <dje@google.com>
8929
8930 * regcache.c (new_register_cache): No need to check result of xcalloc.
8931 * server.c (handle_search_memory): Back out calls to xmalloc,
8932 result is checked and error is returned to user upon failure.
8933 (handle_query): Ditto. Add more checks for result of malloc.
8934 (handle_v_cont): Check result of malloc, report error back to
8935 user upon failure.
8936 (handle_v_run): Ditto. Call freeargv.
8937 * server.h (freeargv): Declare.
8938 * utils.c (freeargv): New fn.
8939
54363045
DE
89402009-01-15 Doug Evans <dje@google.com>
8941
f626972c
DE
8942 * gdbreplay.c (perror_with_name): Make arg const char *.
8943 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8944 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8945 * utils.c (perror_with_name): Make arg const char *.
54363045 8946
18aae699
PA
89472009-01-14 Pedro Alves <pedro@codesourcery.com>
8948
8949 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8950 when handling a EXIT_PROCESS_DEBUG_EVENT.
8951
ff703abe
JB
89522009-01-06 Joel Brobecker <brobecker@adacore.com>
8953
8954 * gdbreplay.c (gdbreplay_version): Update copyright year.
8955 * server.c (gdbserver_version): Likewise.
8956
f21cc1a2 89572009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8958
8959 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8960 (handle_extended_wait): Improve comment.
0e21c1ec 8961
bca929d3
DE
89622008-12-13 Doug Evans <dje@google.com>
8963
8964 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8965 * server.h (ATTR_MALLOC): New macro.
8966 (xmalloc,xcalloc,xstrdup): Declare.
8967 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8968 * inferiors.c: Ditto.
8969 * linux-low.c: Ditto.
8970 * mem-break.c: Ditto.
8971 * regcache.c: Ditto.
8972 * remote-utils.c: Ditto.
8973 * server.c: Ditto.
8974 * target.c: Ditto.
8975 * win32-low.c: Ditto.
8976
97438e3f
DE
89772008-12-12 Doug Evans <dje@google.com>
8978
896c7fbb
DE
8979 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8980 in debugging printf.
8981
97438e3f
DE
8982 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8983
e3b886f8
DE
89842008-12-09 Doug Evans <dje@google.com>
8985
8986 * linux-low.h (struct process_info): Delete member tid, unused.
8987 * thread-db.c (find_one_thread): Update.
8988 (maybe_attach_thread): Update.
8989
07e059b5
VP
89902008-12-02 Pedro Alves <pedro@codesourcery.com>
8991
889bf7c5
PA
8992 * target.h (struct target_ops): Add qxfer_osdata member.
8993 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8994 and dirent.h.
8995 (linux_qxfer_osdata): New functions.
8996 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8997 callback.
8998 * server.c (handle_query): Handle "qXfer:osdata:read:".
8999 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9000 (buffer_xml_printf): New functions.
9001 * server.h (struct buffer): New.
9002 (buffer_grow_str, buffer_grow_str0): New macros.
9003 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9004 (buffer_xml_printf): Declare.
07e059b5 9005
4cab47ab
DE
90062008-11-24 Doug Evans <dje@google.com>
9007
9008 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9009
f142445f
DJ
90102008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9011
9012 * server.c (handle_v_run): Always use the supplied argument list.
9013
d0107bb6 90142008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9015
d0107bb6
BW
9016 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9017 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9018
2c4ad781
TJB
90192008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9020
9021 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9022 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9023 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9024 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9025 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9026 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9027 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9028 XML target descriptions.
9029 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9030 when inferior is running on an ISA 2.05 or later processor. Add
9031 special case to return offset for full 64-bit slot of FPSCR when
9032 in 32-bits.
9033
dfb64f85
DJ
90342008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9035
9036 * Makefile.in (SFILES, clean): Added sparc64 files.
9037 (reg-sparc64.o, reg-sparc64.c): New.
9038 * configure.srv (sparc*-*-linux*): New configuration.
9039 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9040 syscall arguments for SPARC.
9041 (regsets_store_inferior_registers): Likewise.
9042 * linux-sparc-low.c: New file.
9043
66b6e1dd
DE
90442008-10-21 Doug Evans <dje@google.com>
9045
9046 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9047 (READLINE_DIR,READLINE_DEP): Delete.
9048 (INTERNAL_CFLAGS): Update.
9049 (LINTFLAGS): Update.
9050
9b710a42
PA
90512008-10-10 Pedro Alves <pedro@codesourcery.com>
9052
9053 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9054 whole argv from the last run, not just argv[0].
9055
5822d809
PA
90562008-09-08 Pedro Alves <pedro@codesourcery.com>
9057
9058 * regcache.c (new_register_cache): Return NULL if the register
9059 cache size isn't known yet.
9060 (free_register_cache): Avoid dereferencing a NULL regcache.
9061
74aac56f
DJ
90622008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9063
9064 * configure.srv: Merge MIPS and MIPS64.
9065
400b20f5
MR
90662008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9067
9068 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9069
677c5bb1
LM
90702008-08-18 Luis Machado <luisgpm@br.ibm.com>
9071
9072 * Makefile.in: Add required vsx dependencies.
9073
9074 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9075 Declare init_registers_powerpc_vsx32l.
9076 Declare init_registers_powerpc_vsx64l.
9077 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9078 (ppc_arch_setup): Check for VSX in hwcap.
9079 (ppc_fill_vsxregset): New function.
9080 (ppc_store_vsxregset): New function.
9081 Add new VSX entry in regset_info target_regsets.
9082
9083 * configure.srv: Add new VSX dependencies.
9084
a6f3e723
SL
90852008-08-12 Pedro Alves <pedro@codesourcery.com>
9086
9087 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9088 (remote_open): Set or clear transport_is_reliable.
9089 (putpkt_binary): Don't expect acks in noack mode.
9090 (getpkt): Don't send ack/nac in noack mode.
9091 * server.c (handle_general_set): Handle QStartNoAckMode.
9092 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9093 qSupported.
9094 (main): Reset noack_mode on every connection.
9095 * server.h (noack_mode): Declare.
9096
a417dc56
RW
90972008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9098
9099 * Makefile.in (GDBREPLAY_OBS): New variable.
9100 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9101
3221518c
UW
91022008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9103 Daniel Jacobowitz <dan@codesourcery.com>
9104
9105 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9106 (usr_store_inferior_registers): Likewise.
9107 (regsets_store_inferior_registers): Likewise.
9108
ec56be1b
PA
91092008-07-31 Rolf Jansen <rj@surtec.com>
9110 Pedro Alves <pedro@codesourcery.com>
9111
9112 * configure.ac: Check for memmem declaration.
9113 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9114 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9115 (disable_packet_qfThreadInfo): Unconditionally compile.
9116 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9117 * configure, config.in: Regenerate.
9118
2fe5e3ff
DE
91192008-07-28 Doug Kwan <dougkwan@google.com>
9120
9121 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9122 (linux_write_memory): Remove declaration of errno.
9123
836acd6d
UW
91242008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9125
9126 * linux-low.c (handle_extended_wait): Do not use "status"
9127 variable uninitialized.
9128
aeba519e
PA
91292008-07-07 Pedro Alves <pedro@codesourcery.com>
9130
9131 * server.c (handle_v_attach): Inhibit reporting dll changes.
9132
db42f210
PA
91332008-06-27 Pedro Alves <pedro@codesourcery.com>
9134
9135 * remote-utils.c (prepare_resume_reply): If requested, don't
9136 output "thread:TID" in the T stop reply.
9137
9138 * server.c (disable_packet_vCont, disable_packet_Tthread)
9139 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9140 (handle_query): If requested, disable support for qC, qfThreadInfo
9141 and qsThreadInfo.
9142 (handle_v_requests): If requested, disable support for vCont.
9143 (gdbserver_show_disableable): New.
9144 (main): Handle --disable-packet and --disable-packet=LIST.
9145
9146 * server.h (disable_packet_vCont, disable_packet_Tthread)
9147 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9148
8e4c5421
CD
91492008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9150
9151 * server.c (gdbserver_usage): Mention --version.
9152
6e23a804
DJ
91532008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9154
9155 * Makefile.in (gdbreplay.o): New rule.
9156
90aa6a40
JM
91572008-06-06 Joseph Myers <joseph@codesourcery.com>
9158
9159 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9160 message, not gdbserver.
9161
c16158bc 91622008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9163 Nathan Sidwell <nathan@codesourcery.com>
9164 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9165
9166 * acinclude.m4: Include ../../config/acx.m4.
9167 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9168 * configure, config.in: Regenerate.
9169 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9170 * server.c (gdbserver_version): Print PKGVERSION.
9171 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9172 (main): Adjust gdbserver_usage calls.
9173 * gdbreplay.c (version, host_name): Add declarations.
9174 (gdbreplay_version, gdbreplay_usage): New.
9175 (main): Accept --version and --help options.
9176
aeb75bf5
DJ
91772008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9178
9179 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9180 (arm_breakpoint_at): Handle Thumb.
9181 (the_low_target): Add comment.
9182
76b233dd
UW
91832008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9184
9185 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9186
08388c79
DE
91872008-05-09 Doug Evans <dje@google.com>
9188
a3c83fae
DE
9189 * server.h (decode_search_memory_packet): Declare.
9190 * remote-utils.c (decode_search_memory_packet): New fn.
9191 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9192 (handle_search_memory): New fn.
9193 (handle_query): Process qSearch:memory packets.
9194
bb9c3d36
UW
91952008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9196
9197 * regcache.c (registers_length): Remove.
9198 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9199 full register packet.
9200 * regcache.h (registers_length): Remove prototype.
9201 * server.h (PBUFSIZ): Define to 16384.
9202
7284e1be
UW
92032008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9204
9205 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9206 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9207 powerpc-64l.o, and powerpc-altivec64l.o.
9208 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9209 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9210 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9211 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9212 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9213 to srv_xmlfiles.
9214
9215 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9216 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9217 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9218 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9219 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9220 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9221 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9222 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9223 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9224 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9225 (clean): Update.
9226
9227 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9228 (init_registers_powerpc_32l): ... this new prototype.
9229 (init_registers_powerpc_32): Remove, replace by ...
9230 (init_registers_powerpc_altivec32l): ... this new prototype.
9231 (init_registers_powerpc_e500): Remove, replace by ...
9232 (init_registers_powerpc_e500l): ... this new prototype.
9233 (init_registers_ppc64): Remove, replace by ...
9234 (init_registers_powerpc_64l): ... this new prototype.
9235 (init_registers_powerpc_64): Remove, replace by ...
9236 (init_registers_powerpc_altivec64l): ... this new prototype.
9237 (ppc_num_regs): Set to 73.
9238 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9239 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9240 (ppc_cannot_store_register): Handle orig_r3 and trap.
9241 (ppc_arch_setup): Update init_registers_... calls.
9242 (ppc_fill_gregset): Handle orig_r3 and trap.
9243
9244 * inferiors.c (clear_inferiors): Reset current_inferior.
9245
fdc59709
PB
92462008-04-23 Paolo Bonzini <bonzini@gnu.org>
9247
889bf7c5
PA
9248 * acinclude.m4: Add override.m4.
9249 * configure: Regenerate.
fdc59709 9250
c9b2f845
UW
92512008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9252
9253 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9254 initial call to init_register_ppc64.
9255
550512b8
UW
92562008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9257
43aaf8b6
PA
9258 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9259 single powerpc*-*-linux* case.
550512b8
UW
9260 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9261
b6430ec3
UW
92622008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9263
9264 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9265 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9266 from reg_xmlfiles.
9267 * linux-ppc-low.c: Include <elf.h>.
9268 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9269 (ppc_hwcap): New global variable.
9270 (ppc_regmap): Remove __SPE__ #ifdef sections.
9271 (ppc_regmap_e500): New global variable.
9272 (ppc_cannot_store_register): Update __SPE__ special case.
9273 (ppc_get_hwcap): New function.
9274 (ppc_arch_setup): Use it to determine whether inferior supports
9275 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9276 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9277 Do not access registers if target does not support AltiVec.
9278 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9279 Do not access registers if target does not support SPE.
9280 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9281
52fa2412
UW
92822008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9283
9284 * linux-low.c (disabled_regsets, num_regsets): New.
9285 (use_regsets_p): Delete.
9286 (linux_wait_for_process): Clear disabled_regsets.
9287 (regsets_fetch_inferior_registers): Check and set it.
9288 (regsets_store_inferior_registers): Likewise.
9289 (linux_fetch_registers, linux_store_registers): Do not use
9290 use_regsets_p.
9291 (initialize_low): Allocate disabled_regsets.
9292
e28b3332
DJ
92932008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9294
9295 * Makefile.in (LIBOBJS): New.
9296 (OBS): Use LIBOBJS.
9297 (memmem.o): New rule.
9298 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9299 * configure: Regenerated.
9300
4536995d
UW
93012008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9302
9303 * server.c (handle_query): Never return "unsupported" for
9304 qXfer:features:read queries.
9305
221c031f
UW
93062008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9307
9308 * server.c (get_features_xml): Fix inverted condition.
9309 (handle_query): Always support qXfer:feature:read.
9310
ccd213ac
DJ
93112008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9312
9313 * server.c (wrapper_argv): New.
9314 (start_inferior): Handle wrapper_argv. If set, expect an extra
9315 trap.
9316 (gdbserver_usage): Document --wrapper.
9317 (main): Parse --wrapper.
9318
6fe305f7
UW
93192008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9320
9321 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9322 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9323 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9324 (ppc_set_pc): Likewise.
9325 (ppc_arch_setup): New function.
9326 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9327 of collect_register.
889bf7c5 9328 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9329
5b0a002e
UW
93302008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9331
9332 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9333 instead of linux-ppc64-low.o.
9334 * linux-ppc64-low.c: Remove file.
9335 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9336 (linux-ppc64-low.o): Remove rule.
9337
9338 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9339 (init_registers_powerpc_64): Likewise.
9340 (ppc_regmap): Conditionally define depending on __powerpc64__.
9341 (ppc_cannot_store_register): Do not special-case "fpscr" when
9342 compiled on __powerpc64__.
9343 (ppc_collect_ptrace_register): New function.
9344 (ppc_supply_ptrace_register): New function.
9345 (ppc_breakpoint): Change type to "unsigned int".
9346 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9347 (the_low_target): Conditionally provide initializers for the
889bf7c5 9348 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9349 collect_ptrace_register and supply_ptrace_register members.
9350
9b4b61c8
UW
93512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9352
9353 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9354 * server.c (gdbserver_xmltarget): Define.
9355 (get_features_xml): Use it to replace "target.xml" and arch_string.
9356
9357 * configure.srv: Remove srv_xmltarget. Add XML files that were
9358 mentioned there to srv_xmlfiles instead. Remove conditional tests
9359 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9360 srv_xmlfiles and srv_regobj to include all possible choices.
9361 * configure.ac (srv_xmltarget): Remove.
9362 (srv_xmlfiles): Do not add "target.xml".
9363 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9364 checks for supplementary target information.
9365 * configure: Regenerate.
9366 * Makefile.in (XML_TARGET): Remove.
9367 (target.xml): Remove rule.
9368 (clean): Do not clean up target.xml.
9369 (.PRECIOUS): Do not mention target.xml.
9370
9371 * target.h (struct target_ops): Remove arch_string member.
9372 * linux-low.c (linux_arch_string): Remove.
9373 (linux_target_ops): Remove arch_string initializer.
9374 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9375 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9376 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9377 * spu-low.c (spu_arch_string): Remove.
9378 (spu_target_ops): Remove arch_string initializer.
9379 * win32-low.c (win32_arch_string): Remove.
9380 (win32_target_ops): Remove arch_string initializer.
9381 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9382 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9383 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9384
ee1a7ae4
UW
93852008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9386
9387 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9388 by collect_ptrace_register and supply_ptrace_register hooks.
9389 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9390 instead of checking for the_low_target.left_pad_xfer.
9391 (usr_store_inferior_registers): Use collect_ptrace_register callback
9392 instead of checking for the_low_target.left_pad_xfer.
9393
9394 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9395 (s390_supply_ptrace_register): Likewise.
9396 (s390_fill_gregset): Call s390_collect_ptrace_register.
9397 (the_low_target): Update.
9398
9399 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9400 (ppc_supply_ptrace_register): Likewise.
9401 (the_low_target): Update.
9402
9403 * linux-i386-low.c (the_low_target): Update.
9404 * linux-x86-64-low.c (the_low_target): Update.
9405
d61ddec4
UW
94062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9407
9408 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9409 reg-s390.o and reg-s390x.o.
9410
9411 * linux-low.c (new_inferior): New global variable.
9412 (linux_create_inferior, linux_attach): Set it.
9413 (linux_wait_for_process): Call the_low_target.arch_setup after the
9414 target has stopped for the first time.
9415 (initialize_low): Do not call the_low_target.arch_setup.
9416
9417 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9418 (s390_set_pc): Likewise.
9419 (s390_arch_setup): New function.
9420 (the_low_target): Use s390_arch_setup as arch_setup routine.
9421
9422 * regcache.c (realloc_register_cache): New function.
9423 (set_register_cache): Call it for each existing regcache.
9424
d05b4ac3
UW
94252008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9426
9427 * server.h (init_registers): Remove prototype.
9428
9429 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9430 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9431 instead of init_registers ().
9432 * linux-arm-low.c (init_registers_arm): Add prototype.
9433 (init_registers_arm_with_iwmmxt): Likewise.
9434 (the_low_target): Add initializer for arch_setup field.
9435 * linux-cris-low.c (init_registers_cris): Add prototype.
9436 (the_low_target): Add initializer for arch_setup field.
9437 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9438 (the_low_target): Add initializer for arch_setup field.
9439 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9440 (the_low_target): Add initializer for arch_setup field.
9441 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9442 (the_low_target): Add initializer for arch_setup field.
9443 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9444 (the_low_target): Add initializer for arch_setup field.
9445 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9446 (the_low_target): Add initializer for arch_setup field.
9447 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9448 (init_registers_mips64_linux): Likewise.
9449 (the_low_target): Add initializer for arch_setup field.
9450 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9451 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9452 (the_low_target): Add initializer for arch_setup field.
9453 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9454 (init_registers_powerpc_64): Likewise.
9455 (the_low_target): Add initializer for arch_setup field.
9456 * linux-s390-low.c (init_registers_s390): Add prototype.
9457 (init_registers_s390x): Likewise.
9458 (the_low_target): Add initializer for arch_setup field.
9459 * linux-sh-low.c (init_registers_sh): Add prototype.
9460 (the_low_target): Add initializer for arch_setup field.
9461 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9462 (the_low_target): Add initializer for arch_setup field.
9463 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9464 (the_low_target): Add initializer for arch_setup field.
9465
9466 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9467 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9468 instead of init_registers ().
9469 * win32-arm-low.c (init_registers_arm): Add prototype.
9470 (the_low_target): Add initializer for arch_setup field.
9471 * win32-i386-low.c (init_registers_i386): Add prototype.
9472 (the_low_target): Add initializer for arch_setup field.
9473
9474 * spu-low.c (init_registers_spu): Add prototype.
9475 (initialize_low): Call initialie_registers_spu () instead of
9476 initialize_registers ().
9477
fd96d250
PA
94782008-02-19 Pedro Alves <pedro@codesourcery.com>
9479
9480 * server.c (handle_v_requests): When handling the vRun and vAttach
9481 packets, if already debugging a process, don't kill it. Return an
9482 error instead.
9483
d41b6bb4
DJ
94842008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9485
9486 * server.c (handle_query): Correct length check.
9487
5ac588cf
PA
94882008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9489
9490 * win32-low.c (do_initial_child_stuff): Add process handle
9491 parameter. Set current_process_handle and current_process_id from the
9492 parameters. Clear globals.
9493 (win32_create_inferior): Don't set current_process_handle and
9494 current_process_id here. Instead pass them on the call to
9495 do_initial_child_stuff.
9496 (win32_attach): Likewise.
9497 (win32_clear_inferiors): New.
9498 (win32_kill): Don't close the current process handle or the
9499 current thread handle here. Instead call win32_clear_inferiors.
9500 (win32_detach): Don't open a new handle to the process. Call
9501 win32_clear_inferiors.
9502 (win32_join): Don't rely on current_process_handle; open a new
9503 handle using the process id.
9504 (win32_wait): Call win32_clear_inferiors when the inferior process
9505 has exited.
9506
ecd7ecbc
DJ
95072008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9508
9509 * server.c (monitor_show_help): Add "exit".
9510
1525d545
MG
95112008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9512
ecd7ecbc 9513 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9514 (clean): Add reg-xtensa.c.
9515 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9516 * configure.srv (xtensa*-*-linux*) New target.
9517 * linux-xtensa-low.c: New.
9518 * xtensa-xtregs.c: New.
1525d545 9519
59a016f0
PA
95202008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9521
9522 * hostio.c: Don't include errno.h.
9523 (errno_to_fileio_errno): Move to hostio-errno.
9524 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9525 error number outputting to the target->hostio_last_error callback.
9526 (hostio_packet_error): Use FILEIO_EINVAL directly.
9527 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9528 calls to hostio_error.
9529 * hostio-errno.c: New.
9530 * server.h (hostio_last_error_from_errno): Declare.
9531 * target.h (target_ops): Add hostio_last_error member.
9532 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9533 as hostio_last_error handler.
889bf7c5 9534 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9535 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9536 (wince_hostio_last_error): New functions.
9537 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9538 as hostio_last_error handler.
9539 (win32_target_ops) [!_WIN32_WCE]: Register
9540 hostio_last_error_from_errno as hostio_last_error handler.
9541 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9542 (hostio-errno.o): New rule.
9543 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9544 * configure.srv (srv_hostio_err_objs): New variable. Default to
9545 hostio-errno.o.
9546 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9547 * configure: Regenerate.
9548
2d717e4f
DJ
95492008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9550
9551 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9552 (linux_kill, linux_detach): Clean up the process list.
9553 * remote-utils.c (remote_open): Improve port number parsing.
9554 (putpkt_binary, input_interrupt): Only send interrupts if the target
9555 is running.
9556 * server.c (extended_protocol): Make static.
9557 (attached): Define earlier.
9558 (exit_requested, response_needed, program_argv): New variables.
9559 (target_running): New.
9560 (start_inferior): Clear attached here.
9561 (attach_inferior): Set attached here.
9562 (require_running): Define.
9563 (handle_query): Use require_running and target_running. Implement
9564 "monitor exit".
9565 (handle_v_attach, handle_v_run): New.
9566 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9567 (gdbserver_usage): Update.
9568 (main): Redo argument parsing. Handle --debug and --multi. Handle
9569 --attach along with other options or after the port. Save
9570 program_argv. Support no initial program. Resynchronize
9571 communication with GDB after an error. Handle "monitor exit".
9572 Use require_running and target_running. Always allow the extended
9573 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9574 restart in extended mode.
9575 * README: Refer to the GDB manual. Update --attach usage.
9576
7407e2de
AS
95772007-12-20 Andreas Schwab <schwab@suse.de>
9578
9579 * linux-low.c (STACK_SIZE): Define.
9580 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9581 (linux_test_for_tracefork): Likewise.
9582
b65d95c5
DJ
95832007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9584
9585 * linux-low.c (linux_wait_for_event): Update messages. Do not
9586 reinsert auto-delete breakpoints.
9587 * mem-break.c (struct breakpoint): Change return type of handler to
9588 int.
9589 (set_breakpoint_at): Update handler type.
9590 (reinsert_breakpoint_handler): Return 1 instead of calling
9591 delete_breakpoint.
9592 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9593 setting a new one.
9594 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9595 * mem-break.h (set_breakpoint_at): Update handler type.
9596 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9597 * win32-low.c (auto_delete_breakpoint): New.
9598 (get_child_debug_event): Use it.
9599
4e799345
DJ
96002007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9601
9602 * configure.ac: Check for pread and pwrite.
9603 * hostio.c (handle_pread): Fall back to lseek and read.
9604 (handle_pwrite): Fall back to lseek and write.
9605 * config.in, configure: Regenerated.
9606
27524b67
DJ
96072007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9608
9609 * server.c (myresume): Add own_buf argument.
9610 (main): Update calls.
9611
a20d5e98
DJ
96122007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9613
9614 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9615 * remote-utils.c (remote_open): Do not call disable_async_io.
9616 (block_async_io): Delete.
9617 (unblock_async_io): Make static.
9618 (initialize_async_io): New.
9619 * server.c (handle_v_cont): Handle async I/O here.
9620 (myresume): Likewise. Move other common resume tasks here...
9621 (main): ... from here. Call initialize_async_io. Disable async
9622 I/O before the main loop.
9623 * server.h (initialize_async_io): Declare.
9624 (block_async_io, unblock_async_io): Delete prototypes.
9625 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9626
b79d787e
DJ
96272007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9628
9629 * remote-utils.c (readchar): Allow binary data in received messages.
9630
d97903b2
PA
96312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9632
9633 * win32-low.c (attaching): New global.
9634 (win32_create_inferior): Clear the `attaching' global.
9635 (win32_attach): Set the `attaching' global.
9636 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9637 attaching. Only set a breakpoint at the entry point if not
9638 attaching.
9639
311de423
PA
96402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9641
9642 * server.c (main): Don't report dll events on the initial
9643 connection on attaches.
9644
6c2d16d2
PA
96452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9646
9647 * server.c (main): Relax numerical bases supported for the pid of
9648 the --attach command line argument.
9649
5ca906e6
PA
96502007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9651
9652 * win32-low.c (win32_attach): Call OpenProcess before
9653 DebugActiveProcess, not after. Add last error output to error
9654 call.
9655
9c6c8194
PA
96562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9657
9658 * win32-low.c (win32_get_thread_context)
9659 (win32_set_thread_context): New functions.
9660 (thread_rec): Use win32_get_thread_context.
9661 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9662 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9663 field.
9664
4d5d1aaa
PA
96652007-12-03 Leo Zayas
9666 Pedro Alves <pedro_alves@portugalmail.pt>
9667
9668 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9669 global variables.
9670 (child_add_thread): Minor cleanup.
9671 (child_continue): Resume artificially suspended threads before
9672 calling ContinueDebugEvent.
9673 (suspend_one_thread): New.
9674 (fake_breakpoint_event): New.
9675 (get_child_debug_event): Change return type to int. Check here if
9676 gdb sent an interrupt request. If a soft interrupt was requested,
9677 fake a breakpoint event. Return 0 if there is no event to handle,
9678 and 1 otherwise.
9679 (win32_wait): Don't check here if gdb sent an interrupt request.
9680 Ensure there is a valid event to handle.
9681 (win32_request_interrupt): Add soft interruption method as last
9682 resort.
9683
c436e841
PA
96842007-12-03 Leo Zayas
9685 Pedro Alves <pedro_alves@portugalmail.pt>
9686
9687 * win32-low.h (win32_thread_info): Add descriptions to the
9688 structure members. Replace `suspend_count' counter by a
9689 `suspended' flag.
9690 * win32-low.c (thread_rec): Update condition of when to get the
9691 context from the inferior. Rely on ContextFlags being set if it
9692 has already been retrieved. Only suspend the inferior thread if
9693 we haven't already. Warn if that fails.
9694 (continue_one_thread): s/suspend_count/suspended/. Only call
9695 ResumeThread once. Warn if that fails.
9696
e7b5fa67
PA
96972007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9698
9699 * win32-low.c (win32_wait): Don't read from the inferior when it
9700 has already exited.
9701
a385171d
PA
97022007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9703
9704 * Makefile.in (win32_low_h): New variable.
9705 (win32-low.o): Add dependency on $(win32_low_h).
9706 (win32-arm-low.o, win32-i386-low.o): New rules.
9707
f80c84b3
DJ
97082007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9709
9710 * hostio.c: Correct copyright year.
9711
a6b151f1
DJ
97122007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9713
9714 * Makefile.in (OBS): Add hostio.o.
9715 (hostio.o): New rule.
9716 * server.h (handle_vFile): Declare.
9717 * hostio.c: New file.
9718 * server.c (handle_v_requests): Take packet_len and new_packet_len
9719 for binary packets. Call handle_vFile.
9720 (main): Update call to handle_v_requests.
9721
f9387fc3
DJ
97222007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9723
9724 * linux-low.c: Include <sched.h>.
9725
51c2684e
DJ
97262007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9727
9728 * linux-low.c (linux_tracefork_grandchild): New.
9729 (linux_tracefork_child): Use clone.
9730 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9731
75f83163
JB
97322007-10-31 Joel Brobecker <brobecker@adacore.com>
9733
9734 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9735
da5898ce
DJ
97362007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9737
9738 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9739
24a09b5f
DJ
97402007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9741
9742 * inferiors.c (change_inferior_id): Delete.
9743 (add_pid_to_list, pull_pid_from_list): New.
9744 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9745 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9746 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9747 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9748 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9749 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9750 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9751 (using_threads): Always set to 1.
9752 (handle_extended_wait): New.
9753 (add_process): Do not set TID.
9754 (linux_create_inferior): Set must_set_ptrace_flags.
9755 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9756 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9757 (linux_thread_alive): Rename TID argument to LWPID.
9758 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9759 (linux_wait_for_event): Do not use TID or check using_threads. Update
9760 call to dead_thread_notify. Call handle_extended_wait.
9761 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9762 (send_sigstop): Delete sigstop_sent.
9763 (wait_for_sigstop): Avoid TID.
9764 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9765 (linux_test_for_tracefork): New.
9766 (linux_lookup_signals): Use thread_db_active and
9767 linux_supports_tracefork_flag.
9768 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9769 * linux-low.h (get_process_thread): Avoid TID.
9770 (struct process_ifo): Move thread_known and tid to the end. Remove
9771 sigstop_sent.
9772 (linux_attach_lwp, thread_db_init): Update prototypes.
9773 * server.h (change_inferior_id): Delete prototype.
9774 (add_pid_to_list, pull_pid_from_list): New prototypes.
9775 * thread-db.c (thread_db_use_events): New.
9776 (find_first_thread): Rename to...
9777 (find_one_thread): ...this. Update callers and messages. Do not
9778 call fatal. Check thread_db_use_events. Do not call
9779 change_inferior_id or new_thread_notify.
9780 (maybe_attach_thread): Update. Do not call new_thread_notify.
9781 (thread_db_init): Set thread_db_use_events. Check use_events.
9782 * utils.c (fatal, warning): Correct message prefix.
9783
30ed0a8f
DJ
97842007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9785
9786 * Makefile.in (clean): Remove new files.
9787 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9788 (powerpc-64.o, powerpc-64.c): New rules.
9789 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9790 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9791 with SPE.
9792 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9793 SPE targets.
9794 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9795 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9796 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9797 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9798 (target_regsets): Add AltiVec and SPE register sets.
9799 * configure.ac: Check for AltiVec and SPE.
9800 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9801 (ppc_fill_vrregset, ppc_store_vrregset): New.
9802 (target_regsets): Add AltiVec register set.
9803 * configure: Regenerated.
9804
fd462a61
DJ
98052007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9806
9807 * linux-low.c (O_LARGEFILE): Define.
9808 (linux_read_memory): Use /proc/PID/mem.
9809 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9810 * configure, config.in: Regenerated.
9811
69f223ed
DJ
98122007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9813
9814 * linux-low.c (linux_wait_for_event): Do not pass signals while
9815 single-stepping.
9816
aec18585
PA
98172007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9818
9819 * win32-low.c (create_process): New.
9820 (win32_create_inferior): Use create_process instead of
9821 CreateProcess. If create_process failed retry appending an ".exe"
9822 suffix. Store the GetLastError result immediatelly after
9823 create_process calls and use it on the call to error.
9824
34d86ddd
PA
98252007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9826
9827 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9828
5a0e3bd0
JB
98292007-08-23 Joel Brobecker <brobecker@adacore.com>
9830
9831 * configure.ac: Switch license to GPLv3.
9832
f88c79e6
MS
98332007-08-01 Michael Snyder <msnyder@access-company.com>
9834
9835 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9836
6b3d9b83
PA
98372007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9838
9839 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9840 typedef.
9841 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9842 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9843 CloseToolhelp32Snapshot.
9844 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9845 CloseToolhelp32Snapshot.
9846
c588c53c
MS
98472007-07-27 Michael Snyder <michael.snyder@access-company.com>
9848
9849 * server.c (main): Check for inferior exit before main loop.
9850
aa0403d9
PA
98512007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9852
9853 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9854 instead of on tmp_desc.
9855
255e7678
DJ
98562007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9857 Daniel Jacobowitz <dan@codesourcery.com>
9858
9859 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9860 (add_thread): Minor cleanups.
9861 (clear_inferiors): Move lower in the file. Clear the DLL
9862 list.
9863 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9864 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9865 (xml_escape_text): New.
9866 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9867 for qSupported.
9868 (handle_v_cont): Report errors.
9869 (gdbserver_version): Update.
9870 (main): Correct size of own_buf. Do not report initial DLL events.
9871 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9872 (unloaded_dll, xml_escape_text): New.
9873 * win32-low.c (enum target_waitkind): Update comments.
9874 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9875 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9876 (win32_EnumProcessModules, win32_GetModuleInformation)
9877 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9878 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9879 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9880 (win32_Module32First, win32_Module32Next, load_toolhelp)
9881 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9882 (get_child_debug_event): Handle DLL events.
9883 (win32_wait): Likewise.
9884
0d37add9
DJ
98852007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9886
9887 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9888 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9889
45e2715e
PA
98902007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9891
9892 * win32-low.c (handle_output_debug_string): Ignore event if not
9893 waiting.
9894
c5674cf1
PA
98952007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9896
9897 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9898
2bbe3cc1
DJ
98992007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9900
9901 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9902
ae13219e
DJ
99032007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9904
9905 * inferiors.c (change_inferior_id): Add comment.
9906 * linux-low.c (check_removed_breakpoint): Add an early
9907 prototype. Improve debug output.
9908 (linux_attach): Doc update.
9909 (linux_detach_one_process, linux_detach): Clean up before releasing
9910 each process.
9911 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9912 * linux-low.h (struct process_info): Doc improvement.
9913 * mem-break.c (delete_all_breakpoints): New.
9914 * mem-break.h (delete_all_breakpoints): New prototype.
9915 * thread-db.c (find_first_thread): New.
9916 (thread_db_create_event): Call it instead of
9917 thread_db_find_new_threads. Clean up unused variables.
9918 (maybe_attach_thread): Remove first thread handling.
9919 (thread_db_find_new_threads): Use find_first_thread.
9920 (thread_db_get_tls_address): Likewise.
9921
4105de34
DJ
99222007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9923
9924 * thread-db.c (thread_db_find_new_threads): Add prototype.
9925 (thread_db_create_event): Check for the main thread before adding
9926 a new thread.
9927 (maybe_attach_thread): Only enable event reporting if TID == 0.
9928 (thread_db_get_tls_address): Check for new threads.
9929
2b876972
DJ
99302007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9931
9932 * linux-low.c (linux_create_inferior): Try execv before execvp.
9933 * spu-low.c (spu_create_inferior): Likewise.
9934
7a245884
DJ
99352007-06-13 Mike Frysinger <vapier@gentoo.org>
9936
9937 * linux-low.c (linux_create_inferior): Change execv to execvp.
9938 * spu-low.c (spu_create_inferior): Likewies.
9939
117ce543
DJ
99402007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9941
9942 * Makefile.in (clean): Clean new files instead of deleted ones.
9943 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9944 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9945 rules.
9946 * configure.srv: Specify XML files and new regformats for MIPS and
9947 MIPS64 GNU/Linux.
9948 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9949 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9950 an entry for the restart register.
9951 (mips_cannot_fetch_register, mips_cannot_store_register)
9952 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9953 register names to match the XML descriptions.
9954 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9955 restart register instead of $0.
9956
0e7f50da
UW
99572007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9958 Markus Deuling <deuling@de.ibm.com>
9959
9960 * remote-utils.c (decode_xfer_write): New function.
9961 * server.h (decode_xfer_write): Add prototype.
9962 * server.c (handle_query): Add PACKET_LEN argument. Support
9963 qXfer:spu:read and qXfer:spu:write packets.
9964 (main): Pass packet_len to handle_query.
9965 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9966 * target.h (target_ops): Add qxfer_spu.
9967
374c1d38
UW
99682007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9969
9970 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9971 accessing non-seekable spufs files.
9972
bb63802a
UW
99732007-05-16 Markus Deuling <deuling@de.ibm.com>
9974
889bf7c5 9975 * server.c (handle_query): Add reply for qC packet.
bb63802a 9976
7390519e
PA
99772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9978 Leo Zayas <lerele@champenstudios@com>
9979
9980 * server.h (check_remote_input_interrupt_request): New function.
9981 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9982 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9983 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9984 (check_remote_input_interrupt_request): New function.
9985 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9986 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9987 winapi_GenerateConsoleCtrlEvent): New typedefs.
9988 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9989 to 250 ms.
9990 (win32_wait): Check for remote interrupt request
9991 with check_remote_input_interrupt_request.
9992 (win32_request_interrupt): New function.
9993 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9994
34b34921
PA
99952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9996
9997 * win32-low.c (debug_registers_changed,
9998 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9999 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10000 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10001 (thread_rec): Get context using the low target.
10002 (child_add_thread): Call thread_added on the low target,
10003 which does the same thing.
10004 (regptr): Delete.
10005 (do_initial_child_stuff): Remove debug registers references.
10006 Set context using the low target. Resume threads after
10007 setting the contexts.
10008 (child_continue): Remove dead variable. Remove debug
10009 registers references.
10010 (child_fetch_inferior_registers): Go through the low target.
10011 (do_child_store_inferior_registers): Remove.
10012 (child_store_inferior_registers): Go through the low target.
10013 (win32_resume): Remove debug registers references.
10014 Set context using the low target.
10015 (handle_exception): Change return type to void. Don't record
10016 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10017 first chance exception.
889bf7c5 10018 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10019 goto loop. Always return after waiting for debug event.
10020 (win32_wait): Convert to switch statement. Handle spurious
10021 events.
10022
10023 * win32-i386-low.c (debug_registers_changed,
10024 debug_registers_used): New.
10025 (initial_stuff): Rename to ...
10026 (i386_initial_stuff): ... this. Clear debug registers
10027 state variables.
10028 (store_debug_registers): Delete.
10029 (i386_get_thread_context): New.
10030 (load_debug_registers): Delete.
10031 (i386_set_thread_context): New.
10032 (i386_thread_added): New.
10033 (single_step): Rename to ...
10034 (i386_single_step): ... this.
10035 (do_fetch_inferior_registers): Rename to ...
10036 (i386_fetch_inferior_register): ... this.
10037 (i386_store_inferior_register): New.
10038 (the_low_target): Adapt to new interface.
10039
10040 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10041 (arm_get_thread_context): New.
10042 (arm_set_thread_context): New.
10043 (regptr): New.
10044 (do_fetch_inferior_registers): Rename to ...
10045 (arm_fetch_inferior_register): ... this.
10046 (arm_store_inferior_register): New.
10047 (arm_wince_breakpoint): Reimplement as unsigned long.
10048 (arm_wince_breakpoint_len): Define.
10049 (the_low_target): Adapt to new interface.
10050
10051 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10052 load_debug_registers. Add get_thread_context, set_thread_context,
10053 thread_added and store_inferior_register. Rename
10054 fetch_inferior_registers to fetch_inferior_register.
10055 (regptr): Remove declaration.
10056
dd6953e1
PA
100572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10058
10059 * linux-low.c (linux_detach): Change return type to int. Return 0.
10060 * spu-low.c (spu_detach): Likewise.
10061
444d6139
PA
100622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10063
10064 * target.h (target_ops): Change return type of detach to int.
10065 Add join.
10066 (join_inferior): New.
10067 * server.c (main): Don't skip detach support on mingw32.
10068 If the inferior doesn't support detaching return error.
10069 Call join_inferior instead of using waitpid.
10070 * linux-low.c (linux_join): New.
10071 (linux_target_op): Add linux_join.
10072 * spu-low.c (spu_join): New.
10073 (spu_target_ops): Add spu_join.
10074 * win32-low.c (win32_detach): Adapt to new interface.
10075 Reopen current_process_handle before detaching. Issue a child
10076 resume before detaching.
10077 (win32_join): New.
10078 (win32_target_op): Add win32_join.
10079
1d5315fe
PA
100802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10081
10082 * win32-low.c (win32-attach): Fix return value.
10083 * target.h (target_ops): Describe ATTACH return values.
10084
bf914831
PA
100852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10086
10087 * win32-low.c (GETPROCADDRESS): Define.
10088 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10089 (winapi_DebugSetProcessKillOnExit): Likewise.
10090 (win32_create_inferior): Force usage of ansi CreateProcessA.
10091 (win32_attach): Use GETPROCADDRESS.
10092 (win32_detach): Likewise.
10093
f72f3e60
PA
100942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10095
10096 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10097
ed50f18f
PA
100982007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10099
10100 * win32-low.c: Commit leftover changes from 2007-03-29.
10101
0c2ead7e
DJ
101022007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10103
10104 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10105 fields short instead of int. Add explicit padding.
10106 (i387_cache_to_fsave): Remove unnecessary casts.
10107 (i387_fsave_to_cache): Doc fix.
10108 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10109
73725ff3
DJ
101102007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10111
10112 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10113 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10114
d99f33d8
PA
101152007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10116
10117 * configure.srv (arm*-*-mingw32ce*): Move near the other
10118 arm targets.
10119
68070c10
PA
101202007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10121
2482afc6 10122 * configure.ac: Add errno checking.
68070c10
PA
10123 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10124 sys/file.h and malloc.h.
10125 (AC_CHECK_DECLS): Add perror.
10126 (srv_mingwce): Handle.
2482afc6 10127 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10128 win32-i386-low.o to srv_tgtobj.
10129 (i[34567]86-*-mingw*): Likewise.
10130 (arm*-*-mingw32ce*): Add case.
10131 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10132 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10133 [__MINGW32CE__] (strerror): New function.
10134 [__MINGW32CE__] (errno): Define to GetLastError.
10135 [__MINGW32CE__] (COUNTOF): New macro.
10136 (remote_open): Remove extra close call.
10137 * mem-break.c (delete_breakpoint_at): New function.
10138 * mem-break.h (delete_breakpoint_at): Declare.
10139 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10140 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10141 [USE_WIN32API] (read, write): Add char* casts.
10142 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10143 * server.h: Include wincecompat.h on Windows CE.
10144 [HAVE_ERRNO_H]: Check.
10145 (perror): Declare if not declared.
10146 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10147 (perror_with_name): Remove errno declaration.
10148 * wincecompat.h: New.
10149 * wincecompat.c: New.
10150 * win32-low.h: New.
10151 * win32-arm-low.c: New.
10152 * win32-i386-low.c: New.
10153 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10154 (OUTMSG2): Make it safe.
10155 (_T): New macro.
10156 (COUNTOF): New macro.
10157 (NUM_REGS): Get it from the low target.
10158 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10159 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10160 (thread_rec): Let low target handle debug registers.
10161 (child_add_thread): Likewise.
10162 (child_init_thread_list): Likewise.
10163 (continue_one_thread): Likewise.
10164 (regptr): New.
10165 (do_child_fetch_inferior_registers): Move to ...
10166 * win32-i386-low.c: ... here, and rename to ...
10167 (do_fetch_inferior_registers): ... this.
889bf7c5 10168 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10169 Go through the low target.
10170 (do_child_store_inferior_registers): Use regptr.
10171 (strwinerror): New function.
10172 (win32_create_inferior): Handle Windows CE.
10173 Use strwinerror instead of strerror on Windows error
10174 codes. Add program to the error output.
10175 Don't close the main thread handle on Windows CE.
10176 (win32_attach): Use coredll.dll on Windows CE.
10177 (win32_kill): Close current process and current
10178 thread handles.
10179 (win32_detach): Use coredll.dll on Windows CE.
10180 (win32_resume): Let low target handle debug registers, and
10181 step request.
10182 (handle_exception): Add/Remove initial breakpoint. Avoid
10183 non-existant WSTOPSIG on Windows CE.
10184 (win32_read_inferior_memory): Cast to remove warning.
10185 (win32_arch_string): Go through the low target.
10186 (initialize_low): Call set_breakpoint_data with the low
10187 target's breakpoint.
10188 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10189 FOP_REGNUM, mappings): Move to ...
10190 * win32-i386-low.c: ... here.
10191 * win32-low.c (win32_thread_info): Move to ...
10192 * win32-low.h: ... here.
10193 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10194 win32-arm-low.c and wincecompat.c.
10195 (all:): Add $EXEEXT.
10196 (install-only:): Likewise.
10197 (gdbserver:): Likewise.
10198 (gdbreplay:): Likewise.
10199 * config.in: Regenerate.
10200 * configure: Regenerate.
10201
41093d81
PA
102022007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10203
10204 * win32-low.c: Rename typedef thread_info to
10205 win32_thread_info throughout.
10206
544afa54
PA
102072007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10208
10209 * win32-i386-low.c: Rename to ...
10210 * win32-low.c: ... this.
10211 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10212 * Makefile.in: Likewise.
10213
bce7165d
PA
102142007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10215
10216 * remote-utils.c (monitor_output): Constify msg parameter.
10217 * server.h (monitor_output): Likewise.
10218 * win32-i386-low.c (handle_output_debug_string): New.
10219 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10220 handle_output_debug_string.
10221 (get_child_debug_event): Likewise.
10222
506c7aa0
DJ
102232007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10224
10225 * server.c (main): Correct strtoul check.
10226
42c81e2a
DJ
102272007-03-27 Jon Ringle <jon@ringle.org>
10228
10229 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10230
9453113a
DJ
102312007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10232
10233 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10234
64a69107
DJ
102352007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10236
10237 * terminal.h: Check HAVE_SGTTY_H.
10238
102392007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10240
10241 * remote-utils.c (remote_open): Print out the assigned port number.
10242
c74d0ad8
DJ
102432007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10244
10245 * remote-utils.c (monitor_output): New function.
10246 * server.c (debug_threads): Define here.
10247 (monitor_show_help): New function.
10248 (handle_query): Handle qRcmd.
10249 (main): Do not handle 'd' packet.
10250 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10251 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10252 of debug_threads.
10253
de7c3b4a
PA
102542007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10255
10256 * Makefile.in (EXEEXT): New.
10257 (clean): Use $(EXEEXT).
10258
ef57601b
PA
102592007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10260
10261 * target.h (target_ops): Rename send_signal to request_interrupt,
10262 and remove enum target_signal parameter.
10263 * linux-low.c (linux_request_interrupt): Rename from
10264 linux_send_signal, and always send SIGINT.
10265 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10266 and always send SIGINT.
10267 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10268 of send_signal.
10269 (input_interrupt): Likewise.
10270
820f2bda
PA
102712007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10272
10273 * server.c (get_features_xml): Check if target implemented
10274 arch_string.
10275 * win32-i386-low.c (win32_arch_string): New.
10276 (win32_target_ops): Add win32_arch_string as arch_string member.
10277
ab39bf24
UW
102782007-02-22 Markus Deuling <deuling@de.ibm.com>
10279
10280 * spu-low.c (spu_arch_string): New.
10281 (spu_target_ops): Add spu_arch_string.
10282
61ff6e04
DJ
102832007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10284
10285 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10286 * configure.ac: Do not check for terminal.h.
10287 * configure, config.in: Regenerated.
10288
fb1e4ffc
DJ
102892007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10290
10291 * Makefile.in (OBS): Add $(XML_BUILTIN).
10292 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10293 (clean): Update.
10294 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10295 (arm-with-iwmmxt.c): New.
10296 * config.in, configure: Regenerate.
10297 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10298 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10299 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10300 (arm*-*-linux*): Add iWMMXt and regset support.
10301 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10302 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10303 (arm_store_wmmxregset, target_regsets): New.
10304 * server.c (get_features_xml): Take annex argument. Check builtin
10305 XML documents.
10306 (handle_query): Handle multiple annexes.
10307
0f48aa01
DJ
103082007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10309
10310 * remote-utils.c [USE_WIN32API] (read, write): Define.
10311 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10312 write.
10313
23181151
DJ
103142007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10315
10316 * linux-i386-low.c (the_low_target): Set arch_string.
10317 * linux-x86-64-low.c (the_low_target): Likewise.
10318 * linux-low.c (linux_arch_string): New.
10319 (linux_target_ops): Add it.
10320 * linux-low.h (struct linux_target_ops): Add arch_string.
10321 * server.c (write_qxfer_response): Use const void * for DATA.
10322 (get_features_xml): New.
10323 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10324 * target.h (struct target_ops): Add arch_string method.
10325
9d606399
DJ
103262007-01-03 Denis Pilat <denis.pilat@st.com>
10327 Daniel Jacobowitz <dan@codesourcery.com>
10328
10329 * linux-low.c (linux_kill): Handle being called with no threads.
10330 * win32-i386-low.c (win32_kill): Likewise.
10331 (get_child_debug_event): Clear current_process_handle.
10332
103332006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10334 Daniel Jacobowitz <dan@codesourcery.com>
10335
10336 * remote-utils.c (remote_open): Check the type of specified
10337 serial port devices before opening them.
10338 * server.c (main): Kill the inferior if an error occurs during
10339 the first remote_open.
10340
a5e13d24
DJ
103412006-12-05 Markus Deuling <deuling@de.ibm.com>
10342
10343 * README: Update supported targets.
10344
186947f7
DJ
103452006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10346
10347 * Makefile.in (clean): Remove reg-mips64.c.
10348 (reg-mips64.c, reg-mips64.o): New rules.
10349 * configure.srv: Handle mips64. Include regset support for mips.
10350 * linux-mips-low.c (union mips_register): New.
10351 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10352 (mips_breakpoint, mips_breakpoint_at): Use int.
10353 (mips_collect_register, mips_supply_register)
10354 (mips_collect_register_32bit, mips_supply_register_32bit)
10355 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10356 (mips_store_fpregset, target_regsets): New.
10357 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10358
a13e2c95
UW
103592006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10360
10361 * configure.srv: Add target "spu*-*-*".
10362 * Makefile.in (clean): Remove reg-spu.c.
10363 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10364 * spu-low.c: New file.
10365
cb7283db
DJ
103662006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10367
10368 * configure.ac: Correct td_thr_tls_get_addr test.
10369 * configure: Regenerated.
10370
89be2091
DJ
103712006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10372
10373 * linux-low.c (linux_wait_for_event): Reformat. Use the
10374 pass_signals array.
10375 * remote-utils.c (decode_address_to_semicolon): New.
10376 * server.c (pass_signals, handle_general_set): New.
10377 (handle_query): Mention QPassSignals for qSupported.
10378 (main): Call handle_general_set.
10379 * server.h (pass_signals, decode_address_to_semicolon): New.
10380
000ef4f0
DJ
103812006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10382
10383 * server.c (handle_query): Correct error handling for read_auxv.
10384
b7149293
UW
103852005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10386
10387 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10388 and srv_linux_thread_db to yes.
10389 * linux-s390-low.c (s390_fill_gregset): New function.
10390 (target_regsets): Define data structure.
10391
dae5f5cf
DJ
103922006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10393
10394 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10395 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10396 * config.in, configure: Regenerated.
10397 * inferiors.c (gdb_id_to_thread): New function.
10398 (gdb_id_to_thread_id): Use it.
10399 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10400 * linux-low.h (struct process_info): Add th member.
10401 (thread_db_get_tls_address): New prototype.
10402 * remote-utils.c (decode_address): Make non-static.
10403 * server.c (handle_query): Handle qGetTLSAddr.
10404 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10405 * target.h (struct target_ops): Add get_tls_address.
10406 * thread-db.c (maybe_attach_thread): Save the thread handle.
10407 (thread_db_get_tls_address): New.
10408
32ca6d61
DJ
104092006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10410
10411 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10412 (linux_resume_one_process): Take a siginfo_t *. Update all
10413 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10414 (struct pending_signals): Add a siginfo_t.
10415 (linux_wait_for_process): Always set last_status.
10416 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10417 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10418 * linux-low.h (struct process_info): Add last_status.
10419
5ffff7c1
DJ
104202006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10421
10422 * remote-utils.c (try_rle): New function.
10423 (putpkt_binary): Use it.
10424
8695c747
DJ
104252006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10428 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10429 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10430 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10431 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10432 point registers.
10433
290fadea
RS
104342006-08-08 Richard Sandiford <richard@codesourcery.com>
10435
10436 * server.c (terminal_fd): New variable.
10437 (old_foreground_pgrp): Likewise.
10438 (restore_old_foreground_pgrp): New function.
10439 (start_inferior): Record the terminal file descriptor in terminal_fd
10440 and its original foreground group in old_foreground_pgrp. Register
10441 restore_old_foreground_pgrp with atexit().
10442
9f2e1e63
DJ
104432006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10444
10445 * server.c (handle_query): Correct qPart to qXfer.
10446
b80864fb
DJ
104472006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10448
10449 * configure.ac: Check for more headers which are missing on
10450 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10451 * configure.srv: Add Cygwin and mingw32.
10452 * remote-utils.c: Don't include headers unconditionally which
10453 are missing on mingw32. Include <winsock.h> for mingw32.
10454 (remote_open): Adjust for mingw32 support. Flush
10455 standard error after writing to it.
10456 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10457 (unblock_async_io, enable_async_io, disable_async_io)
10458 (readchar, getpkt): Update for Winsock support.
10459 (prepare_resume_reply): Expect a protocol signal number.
10460 * server.c: Disable <sys/wait.h> on mingw32.
10461 (start_inferior): Adjust for mingw32 support. Flush
10462 standard error after writing to it.
10463 (attach_inferior): Likewise. Use protocol signal
10464 numbers.
10465 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10466 and names.
10467 * win32-i386-low.c: New file.
10468 * Makefile.in (XM_CLIBS): Set.
10469 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10470 (win32-i386-low.o): New dependency rule.
10471 * linux-low.c (linux_wait): Use target signal numbers.
10472 * target.h (struct target_ops): Doc fix.
10473 * server.h (target_signal_to_name): New prototype.
10474 * gdbreplay.c: Don't include headers unconditionally which
10475 are missing on mingw32. Include <winsock.h> for mingw32.
10476 (remote_close, remote_open): Adjust for Winsock support.
10477 * configure, config.in: Regenerated.
10478
0876f84a
DJ
104792006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10480
10481 * server.c (decode_xfer_read, write_qxfer_response): New.
10482 (handle_query): Take a packet length argument. Handle
10483 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10484 the qSupported response.
10485 (main): Update call to handle_query.
10486
01f9e8fa
DJ
104872006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10488
10489 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10490 (putpkt_binary): Renamed from putpkt and adjusted for binary
10491 data.
10492 (putpkt): New wrapper for putpkt_binary.
10493 (readchar): Don't mask off the high bit.
10494 (decode_X_packet): New function.
10495 * server.c (main): Call putpkt_binary if a handler sets the packet
10496 length. Save the length of the incoming packet. Handle 'X'.
10497 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10498
be2a5f71
DJ
104992006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10500
10501 * server.c (handle_query): Handle qSupported.
10502
ea025f5f
DJ
105032006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10504
10505 * remote-utils.c (all_symbols_looked_up): New variable.
10506 (look_up_one_symbol): Check it.
10507 * server.h (look_up_one_symbol): New declaration.
10508 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10509
9308fc88
DJ
105102006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10511
10512 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10513 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10514 (PTRACE_GET_THREAD_AREA): Define.
10515 (ps_get_thread_area): New function.
10516
52fb6437
NS
105172006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10518
10519 * configure.srv (m68k*-*-uclinux*): New target.
10520 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10521 (linux_resume_one_process): Remove extraneous cast.
10522 (linux_read_offsets): New.
10523 (linux_target_op): Add linux_read_offsets on mmuless systems.
10524 * server.c (handle_query): Add qOffsets logic.
10525 * target.h (struct target_ops): Add read_offsets.
10526
21b0f40c
DJ
105272006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10528
10529 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10530 (PTRACE_GET_THREAD_AREA): Define.
10531 (ps_get_thread_area): New function.
10532 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10533 (linux-x86-64-low.o): Update.
10534
0050a760
DJ
105352006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10536
10537 * configure.ac: Remove checks for prfpregset_t.
10538 * gdb_proc_service.h: New file.
10539 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10540 new "gdb_proc_service.h".
10541 * proc-service.c: Likewise.
10542 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10543 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10544 * Makefile.in (gdb_proc_service_h): Updated.
10545 * configure, config.in: Regenerated.
10546
b92a518e
DJ
105472006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10548
10549 * remote-utils.c (prepare_resume_reply): Move declaration
10550 of gdb_id_from_wait to the top of the block.
10551
545587ee
DJ
105522006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10553
10554 * linux-low.c (regsets_store_inferior_registers): Read the regset
10555 from the target before filling it.
10556
9db87ebd
DJ
105572006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10558
10559 * server.c (attach_inferior): Return SIGTRAP for a successful
10560 attach.
10561
dd24457d
DJ
105622006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10563
10564 * Makefile.in (OBS): Add version.o.
10565 (STAGESTUFF): Delete.
10566 (version.o): Add dependencies.
10567 (version.c): Replace rule.
10568 (clean): Remove version.c.
10569 * server.c (gdbserver_version): New.
10570 (gdbserver_usage): Use printf.
10571 (main): Handle --version and --help.
10572 * server.h (version, host_name): Add declarations.
10573
6f0f660e
EZ
105742005-12-23 Eli Zaretskii <eliz@gnu.org>
10575
889bf7c5
PA
10576 * linux-arm-low.c:
10577 * linux-arm-low.c:
10578 * inferiors.c:
10579 * i387-fp.h:
10580 * i387-fp.c:
10581 * gdbreplay.c:
10582 * regcache.c:
10583 * proc-service.c:
10584 * mem-break.h:
10585 * mem-break.c:
10586 * linux-x86-64-low.c:
10587 * linux-sh-low.c:
10588 * linux-s390-low.c:
10589 * linux-ppc64-low.c:
10590 * linux-ppc-low.c:
10591 * linux-mips-low.c:
10592 * linux-m68k-low.c:
10593 * linux-m32r-low.c:
10594 * linux-low.h:
10595 * linux-low.c:
10596 * linux-ia64-low.c:
10597 * linux-i386-low.c:
10598 * linux-crisv32-low.c:
10599 * thread-db.c:
10600 * terminal.h:
10601 * target.h:
10602 * target.c:
10603 * server.h:
10604 * server.c:
10605 * remote-utils.c:
10606 * regcache.h:
10607 * utils.c:
10608 * Makefile.in:
10609 * configure.ac:
6f0f660e
EZ
10610 * gdbserver.1: Add (C) after Copyright. Update the FSF
10611 address.
10612
9d1fb177
DJ
106132005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10614
10615 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10616 (arm_breakpoint_at): Recognize both breakpoints.
10617 (the_low_target): Use the correct breakpoint instruction.
10618
011a70c2
DJ
106192005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10620
10621 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10622 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10623 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10624 (the_low_target): Update.
10625
7fb85e41
AS
106262005-10-25 Andreas Schwab <schwab@suse.de>
10627
10628 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10629
10630 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10631 (ia64_num_regs): Reduce to 462.
10632
3db0444b
DJ
106332005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10634
10635 * acinclude.m4: Correct quoting.
10636 * aclocal.m4: Regenerated.
10637
10638 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10639 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10640 (thread_db_init): Call thread_db_err_str.
10641 * configure.ac: Check for TD_VERSION.
10642 * config.in, configure: Regenerated.
10643
bee0189a
DJ
106442005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10645
10646 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10647
e9d25b98
DJ
106482005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10649
10650 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10651 is not available. Define HAVE_PTRACE_GETREGS if it is.
10652 * config.in, configure: Regenerated.
10653 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10654 * linux-i386-low.c, linux-m68k-low.c: Update to use
10655 HAVE_PTRACE_GETREGS.
10656 * linux-low.c (regsets_fetch_inferior_registers)
10657 (regsets_store_inferior_registers): Only return 0 if we processed
10658 GENERAL_REGS.
10659 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10660 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10661
a06660f7
DJ
106622005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10663
10664 * inferiors.c (struct thread_info): Add gdb_id.
10665 (add_thread): Add gdb_id argument.
10666 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10667 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10668 calls to add_thread.
10669 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10670 * server.c (handle_query): Use thread_to_gdb_id.
10671 (handle_v_cont, main): Use gdb_id_to_thread_id.
10672 * server.h (add_thread): Update prototype.
10673 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10674 prototypes.
10675
5a1f5858
DJ
106762005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10677
10678 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10679 left-padded registers.
10680 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10681 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10682
e122f1f5
SE
106832005-07-01 Steve Ellcey <sje@cup.hp.com>
10684
10685 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10686 * configure: Regenerate.
10687 * config.in: Regenerate.
10688 * server.h (NEED_DECLARATION_STRERROR):
10689 Replace with !HAVE_DECL_STRERROR.
10690
d592fa2f
DJ
106912005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10692
10693 * linux-low.c (linux_wait, linux_send_signal): Don't test
10694 an unsigned long variable for > 0 if it could be MAX_ULONG.
10695 * server.c (myresume): Likewise.
10696 * target.c (set_desired_inferior): Likewise.
10697
ccbd4912
MK
106982005-06-13 Mark Kettenis <kettenis@gnu.org>
10699
10700 * configure.ac: Simplify and improve check for socklen_t.
10701 * configure, config.in: Regenerate.
10702
f450004a
DJ
107032005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10704
10705 * acconfig.h: Remove.
10706 * configure.ac: Add a test for socklen_t. Use three-argument
10707 AC_DEFINE throughout.
10708 * config.in: Regenerated using autoheader 2.59.
10709 * configure: Regenerated.
10710
10711 * gdbreplay.c (socklen_t): Provide a default.
10712 (remote_open): Use socklen_t.
10713 * remote-utils.c (socklen_t): Provide a default.
10714 (remote_open): Use socklen_t.
10715 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10716 unsigned char.
10717
10718 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10719 char for buffers.
10720 * linux-low.c (linux_read_memory, linux_write_memory)
10721 (linux_read_auxv): Likewise.
10722 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10723 (check_mem_write): Likewise.
10724 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10725 Likewise.
10726 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10727 (registers_from_string, register_data): Likewise.
10728 * server.c (handle_query, main): Likewise.
10729 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10730 (decode_M_packet): Likewise.
10731 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10732 * target.h (struct target_ops): Update read_memory, write_memory,
10733 and read_auxv.
10734 (read_inferior_memory, write_inferior_memory): Update.
10735 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10736 to unsigned char *.
10737 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10738 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10739 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10740 linux-s390-low.c, linux-sh-low.c: Update for changes in
10741 read_inferior_memory and the_low_target->breakpoint.
10742
eee84df1
DJ
107432005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10744
10745 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10746 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10747 * configure.srv: Add powerpc64-*-linux*.
10748 * linux-ppc64-low.c: New file.
10749
45b134e5
OF
107502005-05-23 Orjan Friberg <orjanf@axis.com>
10751
10752 * linux-cris-low.c: New file with support for CRIS.
10753 * linux-crisv32-low.c: Ditto for CRISv32.
10754 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10755 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10756 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10757 reg-crisv32.o, and reg-crisv32.c to make rules.
10758 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10759 recognized targets.
10760
48d93c75
UW
107612005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10762
10763 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10764 of sizeof (PTRACE_XFER_TYPE).
10765 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10766
e013ee27
OF
107672005-05-12 Orjan Friberg <orjanf@axis.com>
10768
889bf7c5 10769 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10770 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10771 pointers for hardware watchpoint support.
10772 * linux-low.h (struct linux_target_ops): Ditto.
10773 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10774 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10775 to linux_target_ops.
10776 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10777 reply packet.
10778 * server.c (main): Recognize 'Z' and 'z' packets.
10779
b0ded00b
UW
107802005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10781
10782 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10783 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10784 (the_low_target): Add new members.
10785
8643e2ad
DJ
107862005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10787
10788 * proc-service.c (ps_lgetregs): Search all_processes instead of
10789 all_threads.
10790
fc620387
DJ
107912005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10792
10793 * server.c (start_inferior): Change return type to int.
10794 (attach_inferior): Change sigptr to int *.
10795 (handle_v_cont, handle_v_requests): Change signal to int *.
10796 (main): Change signal to int.
10797
107982005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10799
10800 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10801 * configure.srv: Add m32r*-*-linux*.
10802 * linux-m32r-low.c: New file.
10803
e0e76420
DJ
108042005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10805
10806 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10807
a1928bad
DJ
108082005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10809
10810 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10811 Take unsigned long arguments for PIDs.
10812 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10813 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10814 (wait_for_sigstop, linux_resume_one_process)
10815 (regsets_fetch_inferior_registers, linux_send_signal)
10816 (linux_read_auxv): Likewise. Update the types of variables holding
10817 PIDs. Update format string specifiers.
10818 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10819 * remote-utils.c (prepare_resume_reply): Likewise.
10820 * server.c (cont_thread, general_thread, step_thread)
10821 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10822 unsigned long.
10823 (handle_query): Update format specifiers.
10824 (handle_v_cont, main): Use strtoul for thread IDs.
10825 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10826 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10827 (general_thread, step_thread, thread_from_wait)
10828 (old_thread_from_wait): Update.
10829 * target.h (struct thread_resume): Use unsigned long for THREAD.
10830 (struct target_ops): Use unsigned long for arguments to attach and
10831 thread_alive.
10832
dcdb98d2
DJ
108332005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10834
10835 * acinclude.m4: Include bfd/bfd.m4 directly.
10836 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10837 <agriffis@toolchain.org>.
10838 * aclocal.m4, configure: Regenerated.
10839
bec39cab
AC
108402005-01-07 Andrew Cagney <cagney@gnu.org>
10841
10842 * configure.ac: Rename configure.in, require autoconf 2.59.
10843 * configure: Re-generate.
10844
434c4c77
DJ
108452004-12-08 Daniel Jacobowitz <dan@debian.org>
10846
10847 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10848 LIBS when finished.
10849 * aclocal.m4: Regenerated.
10850 * configure: Regenerated.
10851
db1d3e1b
AS
108522004-11-21 Andreas Schwab <schwab@suse.de>
10853
10854 * linux-m68k-low.c (m68k_num_gregs): Define.
10855 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10856 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10857 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10858 (m68k_breakpoint_at): New. Add to the_low_target.
10859
10860 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10861 srv_linux_thread_db to yes.
10862
43360365
JB
108632004-10-20 Joel Brobecker <brobecker@gnat.com>
10864
10865 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10866 (ARCH_SET_FS): Likewise.
10867 (ARCH_GET_FS): Likewise.
10868 (ARCH_GET_GS): Likewise.
10869
fd500816
DJ
108702004-10-16 Daniel Jacobowitz <dan@debian.org>
10871
10872 * linux-i386-low.c (ps_get_thread_area): New.
10873 * linux-x86-64-low.c (ps_get_thread_area): New.
10874 * linux-low.c: Include <sys/syscall.h>.
10875 (linux_kill_one_process): Don't kill the first thread here.
10876 (linux_kill): Kill the first thread here.
10877 (kill_lwp): New function.
10878 (send_sigstop, linux_send_signal): Use it.
10879 * proc-service.c: Clean up #ifdefs.
10880 (fpregset_info): Delete.
10881 (ps_lgetregs): Update and enable implementation.
10882 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10883 implementations.
10884 * remote-utils.c (struct sym_cache, symbol_cache): New.
10885 (input_interrupt): Print a clearer message.
10886 (async_io_enabled): New variable.
10887 (enable_async_io, disable_async_io): Use it. Update comments.
10888 (look_up_one_symbol): Use the symbol cache.
10889 * thread-db.c (thread_db_look_up_symbols): New function.
10890 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10891
f6de3c42
DJ
108922004-10-16 Daniel Jacobowitz <dan@debian.org>
10893
10894 * configure.in: Test for -rdynamic.
10895 * configure: Regenerated.
10896 * Makefile (INTERNAL_LDFLAGS): New.
10897 (gdbserver, gdbreplay): Use it.
10898
2c0fc042
AC
108992004-09-02 Andrew Cagney <cagney@gnu.org>
10900
10901 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10902
075b3282
DJ
109032004-03-23 Daniel Jacobowitz <drow@mvista.com>
10904
10905 * linux-low.c (linux_wait): Clear all_processes list also.
10906
fa6a77dc
DJ
109072004-03-12 Daniel Jacobowitz <drow@mvista.com>
10908
10909 * linux-low.c: Include <errno.h>. Remove extern declaration of
10910 errno.
10911
6d782a97
DJ
109122004-03-12 Daniel Jacobowitz <drow@mvista.com>
10913
10914 * gdbreplay.c, server.h, utils.c: Update copyright years.
10915
3a7fb99b
DJ
109162004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10917
10918 * server.c (main): Print child status or termination signal from
10919 variable 'signal', not 'sig'.
10920
c3e735a6
DJ
109212004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10922
10923 * linux-low.c (linux_read_memory): Change return type to
10924 int. Check for and return error from ptrace().
10925 * target.c (read_inferior_memory): Change return type to int. Pass
10926 back return status from the_target->read_memory().
10927 * target.h (struct target_ops): Adapt *read_memory() prototype.
10928 Update comment.
10929 (read_inferior_memory): Adapt prototype.
10930 * server.c (main): Return an error packet if
10931 read_inferior_memory() returns an error.
10932
a59d1c82
DJ
109332004-03-04 Daniel Jacobowitz <drow@mvista.com>
10934
10935 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10936 Unify with other clean targets.
10937
dc3f8883
DJ
109382004-02-29 Daniel Jacobowitz <drow@mvista.com>
10939
10940 * server.c (handle_v_cont): Call set_desired_inferior.
10941
89a208da
DJ
109422004-02-29 Daniel Jacobowitz <drow@mvista.com>
10943
10944 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10945
62ea82f5
DJ
109462004-02-29 Daniel Jacobowitz <drow@mvista.com>
10947
10948 * linux-low.c (linux_wait): Unblock async I/O.
10949 (linux_resume): Block and enable async I/O.
10950 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10951 * server.h (block_async_io, unblock_async_io): Add prototypes.
10952
6910d122
DJ
109532004-02-29 Daniel Jacobowitz <drow@mvista.com>
10954
10955 * remote-utils.c (remote_open): Print a status notice after
10956 opening a TCP port.
10957 * server.c (attach_inferior): Print a status notice after
10958 attaching.
10959
109602004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10961
10962 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10963
c89dc5d4
DJ
109642004-02-26 Daniel Jacobowitz <drow@mvista.com>
10965
10966 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10967 error packet.
10968 * server.c, target.h: Update copyright years.
10969
4b8dad4a
RM
109702004-02-25 Roland McGrath <roland@redhat.com>
10971
10972 * target.h (struct target_ops): New member `read_auxv'.
10973 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10974 * linux-low.c (linux_read_auxv): New function.
10975 (linux_target_ops): Initialize `read_auxv' member to that.
10976
d7446758
JB
109772004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10978
10979 Committed by Jim Blandy <jimb@redhat.com>.
10980
10981 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10982 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10983 instead of GPR_SIZE to distiguish s390 and s390x targets.
10984
5544ad89
DJ
109852004-01-31 Daniel Jacobowitz <drow@mvista.com>
10986
10987 * linux-low.c: Update copyright year.
10988 (check_removed_breakpoint): Clear pending_is_breakpoint.
10989 (linux_set_resume_request, linux_queue_one_thread)
10990 (resume_status_pending_p): New functions.
10991 (linux_continue_one_thread): Use process->resume.
10992 (linux_resume): Only resume threads if there are no pending events.
10993 * linux-low.h (struct process_info): Add resume request
10994 pointer.
10995
2a68b70e
DJ
109962004-01-30 Daniel Jacobowitz <drow@mvista.com>
10997
10998 * regcache.c (new_register_cache): Clear the allocated register
10999 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11000
64386c31
DJ
110012003-10-13 Daniel Jacobowitz <drow@mvista.com>
11002
11003 * linux-low.c (linux_resume): Take a struct thread_resume *
11004 argument.
11005 (linux_wait): Update call.
11006 (resume_ptr): New static variable.
11007 (linux_continue_one_thread): Renamed from
11008 linux_continue_one_process. Use resume_ptr.
11009 (linux_resume): Use linux_continue_one_thread.
11010 * server.c (handle_v_cont, handle_v_requests): New functions.
11011 (myresume): New function.
11012 (main): Handle 'v' case.
11013 * target.h (struct thread_resume): New type.
11014 (struct target_ops): Change argument of "resume" to struct
11015 thread_resume *.
11016 (myresume): Delete macro.
11017
c938e9b0
L
110182003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11019
11020 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11021 (uninstall): Support DESTDIR.
11022
7f313d07
BC
11023Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11024
11025 * configure.srv: Add xscale*linux copy of arm*linux entry.
11026
3b2fc2ea
DJ
110272003-07-24 Daniel Jacobowitz <drow@mvista.com>
11028
11029 * linux-arm-low.c (arm_reinsert_addr): New function.
11030 (the_low_target): Add arm_reinsert_addr.
11031
1c0a559e
MK
110322003-07-08 Mark Kettenis <kettenis@gnu.org>
11033
11034 * mem-break.c: Remove whitespace at end of file.
11035
43d5792c
DJ
110362003-06-28 Daniel Jacobowitz <drow@mvista.com>
11037
11038 * configure.in: Check whether we need to prototype strerror.
11039 * server.h: Optionally prototype strerror.
11040 * gdbreplay.c (perror_with_name): Use strerror.
11041 * linux-low.c (linux_attach_lwp): Use strerror.
11042 * utils.c (perror_with_name): Use strerror.
11043 * config.in, configure: Regenerated.
11044
c8a86edf
DJ
110452003-06-28 Daniel Jacobowitz <drow@mvista.com>
11046
11047 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11048 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11049
73d37363
DJ
110502003-06-20 Daniel Jacobowitz <drow@mvista.com>
11051
11052 * Makefile.in (SFILES): Update.
11053 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11054 low-sun3.c: Remove files.
11055
6ad8ae5c
DJ
110562003-06-17 Daniel Jacobowitz <drow@mvista.com>
11057
11058 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11059 (linux_detach_one_process, linux_detach): New functions.
11060 (linux_target_ops): Add linux_detach.
11061 * server.c (main): Handle 'D' packet.
11062 * target.h (struct target_ops): Add "detach" member.
11063 (detach_inferior): Define.
11064
1581182a
MK
110652003-06-13 Mark Kettenis <kettenis@gnu.org>
11066
11067 From Kelley Cook <kelleycook@wideopenwest.com>:
11068 * configure.srv: Accept i[34567]86 variants.
11069
e5379b03
DJ
110702003-06-05 Daniel Jacobowitz <drow@mvista.com>
11071
11072 * linux-low.c (linux_wait_for_event): Correct comment typos.
11073 (linux_resume_one_process): Call check_removed_breakpoint.
11074 (linux_send_signal): New function.
11075 (linux_target_ops): Add linux_send_signal.
11076 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11077 of kill.
11078 * target.h (struct target_ops): Add send_signal.
11079
2ff29de4
JB
110802003-05-29 Jim Blandy <jimb@redhat.com>
11081
11082 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11083 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11084 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11085 away part of the register's value.
11086
254787d4
DJ
110872003-03-26 Daniel Jacobowitz <drow@mvista.com>
11088
11089 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11090 (linux_wait_for_event, linux_init_signals): Likewise.
11091
94e10508
DJ
110922003-03-17 Daniel Jacobowitz <drow@mvista.com>
11093
11094 * configure.in: Check for stdlib.h.
11095 * configure: Regenerated.
11096 * config.in: Regenerated.
11097
4c0711e0
DJ
110982003-01-04 Andreas Schwab <schwab@suse.de>
11099
11100 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11101
ef66e766
AC
111022003-01-02 Andrew Cagney <ac131313@redhat.com>
11103
11104 * Makefile.in: Remove obsolete code.
11105
a1358604
DJ
111062002-11-20 Daniel Jacobowitz <drow@mvista.com>
11107
11108 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11109 defined(PT_FPR0_HI).
11110
23ce3b1c
DJ
111112002-11-17 Stuart Hughes <seh@zee2.com>
11112
11113 * linux-arm-low.c (arm_num_regs): Increase.
11114 (arm_regmap): Include status register.
11115
111162002-11-17 Daniel Jacobowitz <drow@mvista.com>
11117
11118 * linux-low.c (register_addr): Remove incorrect -1 check.
11119
a9fa9f7d
DJ
111202002-08-29 Daniel Jacobowitz <drow@mvista.com>
11121
11122 * linux-low.c (linux_create_inferior): Call setpgid. Return
11123 the new PID.
11124 (unstopped_p, linux_signal_pid): Remove.
11125 (linux_target_ops): Remove linux_signal_pid.
11126 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11127 global instead of target method.
11128 * target.h (struct target_ops): Remove signal_pid. Update comment
11129 for create_inferior.
11130 * server.c (signal_pid): New variable.
11131 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11132 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11133 (attach_inferior): Set signal_pid.
11134
17574093
DJ
111352002-08-23 Daniel Jacobowitz <drow@mvista.com>
11136
11137 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11138
111392002-08-20 Jim Blandy <jimb@redhat.com>
11140
11141 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11142 default for this.
11143
111442002-08-01 Andrew Cagney <cagney@redhat.com>
11145
11146 * Makefile.in: Make chill references obsolete.
11147
111482002-07-24 Kevin Buettner <kevinb@redhat.com>
11149
11150 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11151 * configure: Regenerate.
11152 * config.in: Regenerate.
11153
111542002-07-09 David O'Brien <obrien@FreeBSD.org>
11155
11156 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11157 (perror_with_name, remote_close, remote_open, expect, play): Static.
11158
111592002-07-04 Michal Ludvig <mludvig@suse.cz>
11160
4b8dad4a 11161 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11162 byte offsets instead of an array of indexes.
11163 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11164
111652002-06-13 Daniel Jacobowitz <drow@mvista.com>
11166
11167 * regcache.c: Add comment.
11168
111692002-06-11 Daniel Jacobowitz <drow@mvista.com>
11170
11171 * thread-db.c: New file.
11172 * proc-service.c: New file.
11173 * acinclude.m4: New file.
11174 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11175 proc-service.o, and thread-db.o.
11176 (linux-low.o): Add USE_THREAD_DB.
11177 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11178 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11179 * aclocal.m4: Regenerated.
11180 * config.in: Regenerated.
11181 * configure: Regenerated.
11182 * configure.in: Check for proc_service.h, sys/procfs.h,
11183 thread_db.h, and linux/elf.h headrs.
11184 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11185 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11186 Check for -lthread_db and thread support.
11187 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11188 PowerPC, and SuperH.
11189 * i387-fp.c: Constify arguments.
11190 * i387-fp.h: Likewise.
11191 * inferiors.c: (struct thread_info): Renamed from
11192 `struct inferior_info'. Remove PID member. Use generic inferior
11193 list header. All uses updated.
11194 (inferiors, signal_pid): Removed.
11195 (all_threads): New variable.
11196 (get_thread): Define.
11197 (add_inferior_to_list): New function.
11198 (for_each_inferior): New function.
11199 (change_inferior_id): New function.
11200 (add_inferior): Removed.
11201 (remove_inferior): New function.
11202 (add_thread): New function.
11203 (free_one_thread): New function.
11204 (remove_thread): New function.
11205 (clear_inferiors): Use for_each_inferior and free_one_thread.
11206 (find_inferior): New function.
11207 (find_inferior_id): New function.
11208 (inferior_target_data): Update argument type.
11209 (set_inferior_target_data): Likewise.
11210 (inferior_regcache_data): Likewise.
11211 (set_inferior_regcache_data): Likewise.
11212 * linux-low.c (linux_bp_reinsert): Remove.
11213 (all_processes, stopping_threads, using_thrads)
11214 (struct pending_signals, debug_threads, pid_of): New.
11215 (inferior_pid): Replace with macro.
11216 (struct inferior_linux_data): Remove.
11217 (get_stop_pc, add_process): New functions.
11218 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11219 Use add_process and add_thread.
11220 (linux_attach_lwp): New function, based on old linux_attach. Use
11221 add_process and add_thread. Set stop_expected for new threads.
11222 (linux_attach): New function.
11223 (linux_kill_one_process): New function.
11224 (linux_kill): Kill all LWPs.
11225 (linux_thread_alive): Use find_inferior_id.
11226 (check_removed_breakpoints, status_pending_p): New functions.
11227 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11228 Update. Use WNOHANG. Wait for cloned processes also. Update process
11229 struct for the found process.
11230 (linux_wait_for_event): New function.
11231 (linux_wait): Use it. Support LWPs.
11232 (send_sigstop, wait_for_sigstop, stop_all_processes)
11233 (linux_resume_one_process, linux_continue_one_process): New functions.
11234 (linux_resume): Support LWPs.
11235 (REGISTER_RAW_SIZE): Remove.
11236 (fetch_register): Use register_size instead. Call supply_register.
11237 (usr_store_inferior_registers): Likewise. Call collect_register.
11238 Fix recursive case.
11239 (regsets_fetch_inferior_registers): Improve error message.
11240 (regsets_store_inferior_registers): Add debugging.
11241 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11242 (unstopped_p, linux_signal_pid): New functions.
11243 (linux_target_ops): Add linux_signal_pid.
11244 (linux_init_signals): New function.
11245 (initialize_low): Call it. Initialize using_threads.
11246 * regcache.c (inferior_regcache_data): Add valid
11247 flag.
11248 (get_regcache): Fetch registers lazily. Add fetch argument
11249 and update all callers.
11250 (regcache_invalidate_one, regcache_invalidate): New
11251 functions.
11252 (new_register_cache): Renamed from create_register_cache.
11253 Return the new regcache.
11254 (free_register_cache): Change argument to a void *.
11255 (registers_to_string, registers_from_string): Call get_regcache
11256 with fetch flag set.
11257 (register_data): Make static. Pass fetch flag to get_regcache.
11258 (supply_register): Call get_regcache with fetch flag clear.
11259 (collect_register): Call get_regcache with fetch flag set.
11260 (collect_register_as_string): New function.
11261 * regcache.h: Update.
11262 * remote-utils.c (putpkt): Flush after debug output and use
11263 stderr.
11264 Handle input interrupts while waiting for an ACK.
11265 (input_interrupt): Use signal_pid method.
11266 (getpkt): Flush after debug output and use stderr.
11267 (outreg): Use collect_register_as_string.
11268 (new_thread_notify, dead_thread_notify): New functions.
11269 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11270 and general_thread.
11271 (look_up_one_symbol): Flush after debug output.
11272 * server.c (step_thread, server_waiting): New variables.
11273 (start_inferior): Don't use signal_pid. Update call to mywait.
11274 (attach_inferior): Update call to mywait.
11275 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11276 (main): Don't fetch/store registers explicitly. Use
11277 set_desired_inferior. Support proposed ``Hs'' packet. Update
11278 calls to mywait.
11279 * server.h: Update.
11280 (struct inferior_list, struct_inferior_list_entry): New.
11281 * target.c (set_desired_inferior): New.
11282 (write_inferior_memory): Constify.
11283 (mywait): New function.
11284 * target.h: Update.
11285 (struct target_ops): New signal_pid method.
11286 (mywait): Removed macro, added prototype.
11287
11288 * linux-low.h (regset_func): Removed.
11289 (regset_fill_func, regset_store_func): New.
11290 (enum regset_type): New.
11291 (struct regset_info): Add type field. Use new operation types.
11292 (struct linux_target_ops): stop_pc renamed to get_pc.
11293 Add decr_pc_after_break and breakpoint_at.
11294 (get_process, get_thread_proess, get_process_thread)
11295 (strut process_info, all_processes, linux_attach_lwp)
11296 (thread_db_init): New.
11297
11298 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11299 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11300 (the_low_target): Add new members.
11301 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11302 (i386_store_fpxregset): Constify.
11303 (target_regsets): Add new kind identifier.
11304 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11305 (i386_set_pc): Add debugging.
11306 (i386_breakpoint_at): New function.
11307 (the_low_target): Add new members.
11308 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11309 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11310 (mips_breakpoint_at): New.
11311 (the_low_target): Add new members.
11312 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11313 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11314 (the_low_target): Add new members.
11315 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11316 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11317 (the_low_target): Add new members.
11318 * linux-x86-64-low.c (target_regsets): Add new kind
11319 identifier.
11320
113212002-05-15 Daniel Jacobowitz <drow@mvista.com>
11322
11323 From Martin Pool <mbp@samba.org>:
11324 * server.c (gdbserver_usage): New function.
11325 (main): Call it.
11326
113272002-05-14 Daniel Jacobowitz <drow@mvista.com>
11328
11329 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11330 stop_at -> stop_pc.
11331
113322002-05-04 Andrew Cagney <ac131313@redhat.com>
11333
11334 * Makefile.in: Remove obsolete code.
11335
113362002-04-24 Michal Ludvig <mludvig@suse.cz>
11337
11338 * linux-low.c (regsets_fetch_inferior_registers),
11339 (regsets_store_inferior_registers): Removed cast to int from
11340 ptrace() calls.
11341 * regcache.h: Added declaration of struct inferior_info.
11342
113432002-04-20 Daniel Jacobowitz <drow@mvista.com>
11344
11345 * inferiors.c (struct inferior_info): Add regcache_data.
11346 (add_inferior): Call create_register_cache.
11347 (clear_inferiors): Call free_register_cache.
11348 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11349 * regcache.c (struct inferior_regcache_data): New.
11350 (registers): Remove.
11351 (get_regcache): New function.
11352 (create_register_cache, free_register_cache): New functions.
11353 (set_register_cache): Don't initialize the register cache here.
11354 (registers_to_string, registers_from_string, register_data): Call
11355 get_regcache.
11356 * regcache.h: Add prototypes.
11357 * server.h: Likewise.
11358
113592002-04-20 Daniel Jacobowitz <drow@mvista.com>
11360
11361 * mem-break.c: New file.
11362 * mem-break.h: New file.
11363 * Makefile.in: Add mem-break.o rule; update server.h
11364 dependencies.
11365 * inferiors.c (struct inferior_info): Add target_data
11366 member.
11367 (clear_inferiors): Free target_data member if set.
11368 (inferior_target_data, set_inferior_target_data): New functions.
11369 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11370 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11371 * linux-low.c (linux_bp_reinsert): New variable.
11372 (struct inferior_linux_data): New.
11373 (linux_create_inferior): Use set_inferior_target_data.
11374 (linux_attach): Likewise. Call add_inferior.
11375 (linux_wait_for_one_inferior): New function.
11376 (linux_wait): Call it.
11377 (linux_write_memory): Add const.
11378 (initialize_low): Call set_breakpoint_data.
11379 * linux-low.h (struct linux_target_ops): Add breakpoint
11380 handling members.
11381 * server.c (attach_inferior): Remove extra add_inferior
11382 call.
11383 * server.h: Include mem-break.h. Update inferior.c
11384 prototypes.
11385 * target.c (read_inferior_memory)
11386 (write_inferior_memory): New functions.
11387 * target.h (read_inferior_memory)
11388 (write_inferior_memory): Change macros to prototypes.
11389 (struct target_ops): Update comments. Add const to write_memory
11390 definition.
11391
113922002-04-11 Daniel Jacobowitz <drow@mvista.com>
11393
11394 * linux-low.c (usr_store_inferior_registers): Support
11395 registers which are allowed to fail to store.
11396 * linux-low.h (linux_target_ops): Likewise.
11397 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11398 (ppc_cannot_store_register): FPSCR may not be storable.
11399
114002002-04-09 Daniel Jacobowitz <drow@mvista.com>
11401
11402 * server.h: Include <string.h> if HAVE_STRING_H.
11403 * ChangeLog: Correct paths in last ChangeLog entry.
11404
114052002-04-09 Daniel Jacobowitz <drow@mvista.com>
11406
11407 * linux-low.h: Remove obsolete prototypes.
11408 (struct linux_target_ops): New.
11409 (extern the_low_target): New.
11410 * linux-low.c (num_regs, regmap): Remove declarations.
11411 (register_addr): Use the_low_target explicitly.
11412 (fetch_register): Likewise.
11413 (usr_fetch_inferior_registers): Likewise.
11414 (usr_store_inferior_registers): Likewise.
11415 * linux-arm-low.c (num_regs): Remove.
11416 (arm_num_regs): Define.
11417 (arm_regmap): Renamed from regmap, made static.
11418 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11419 made static.
11420 (arm_cannot_store_register): Renamed from cannot_store_register,
11421 made static.
11422 (the_low_target): New.
11423 * linux-i386-low.c (num_regs): Remove.
11424 (i386_num_regs): Define.
11425 (i386_regmap): Renamed from regmap, made static.
11426 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11427 made static.
11428 (i386_cannot_store_register): Renamed from cannot_store_register,
11429 made static.
11430 (the_low_target): New.
11431 * linux-ia64-low.c (num_regs): Remove.
11432 (ia64_num_regs): Define.
11433 (ia64_regmap): Renamed from regmap, made static.
11434 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11435 made static.
11436 (ia64_cannot_store_register): Renamed from cannot_store_register,
11437 made static.
11438 (the_low_target): New.
11439 * linux-m68k-low.c (num_regs): Remove.
11440 (m68k_num_regs): Define.
11441 (m68k_regmap): Renamed from regmap, made static.
11442 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11443 made static.
11444 (m68k_cannot_store_register): Renamed from cannot_store_register,
11445 made static.
11446 (the_low_target): New.
11447 * linux-mips-low.c (num_regs): Remove.
11448 (mips_num_regs): Define.
11449 (mips_regmap): Renamed from regmap, made static.
11450 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11451 made static.
11452 (mips_cannot_store_register): Renamed from cannot_store_register,
11453 made static.
11454 (the_low_target): New.
11455 * linux-ppc-low.c (num_regs): Remove.
11456 (ppc_num_regs): Define.
11457 (ppc_regmap): Renamed from regmap, made static.
11458 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11459 made static.
11460 (ppc_cannot_store_register): Renamed from cannot_store_register,
11461 made static.
11462 (the_low_target): New.
11463 * linux-s390-low.c (num_regs): Remove.
11464 (s390_num_regs): Define.
11465 (s390_regmap): Renamed from regmap, made static.
11466 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11467 made static.
11468 (s390_cannot_store_register): Renamed from cannot_store_register,
11469 made static.
11470 (the_low_target): New.
11471 * linux-sh-low.c (num_regs): Remove.
11472 (sh_num_regs): Define.
11473 (sh_regmap): Renamed from regmap, made static.
11474 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11475 made static.
11476 (sh_cannot_store_register): Renamed from cannot_store_register,
11477 made static.
11478 (the_low_target): New.
11479 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11480 (the_low_target): New.
11481
114822002-04-09 Daniel Jacobowitz <drow@mvista.com>
11483
11484 * Makefile.in: Add stamp-h target.
11485 * configure.in: Create stamp-h.
11486 * configure: Regenerated.
11487
114882002-04-09 Daniel Jacobowitz <drow@mvista.com>
11489
11490 * inferiors.c: New file.
11491 * target.c: New file.
11492 * target.h: New file.
11493 * Makefile.in: Add target.o and inferiors.o. Update
11494 dependencies.
11495 * linux-low.c (inferior_pid): New static variable,
11496 moved from server.c.
11497 (linux_create_inferior): Renamed from create_inferior.
11498 Call add_inferior. Return 0 on success instead of a PID.
11499 (linux_attach): Renamed from myattach.
11500 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11501 (linux_thread_alive): Renamed from mythread_alive.
11502 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11503 child dies.
11504 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11505 (regsets_store_inferior_registers): Correct error message.
11506 Add missing ``return 0''.
11507 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11508 (linux_store_registers): Renamed from store_inferior_registers.
11509 (linux_read_memory): Renamed from read_inferior_memory.
11510 (linux_write_memory): Renamed from write_inferior_memory.
11511 (linux_target_ops): New structure.
11512 (initialize_low): Call set_target_ops ().
11513 * remote-utils.c (unhexify): New function.
11514 (hexify): New function.
11515 (input_interrupt): Send signals to ``signal_pid''.
11516 * server.c (inferior_pid): Remove.
11517 (start_inferior): Update create_inferior call.
11518 (attach_inferior): Call add_inferior.
11519 (handle_query): New function.
11520 (main): Call handle_query for `q' packets.
11521 * server.h: Include "target.h". Remove obsolete prototypes.
11522 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11523
115242002-04-09 Daniel Jacobowitz <drow@mvista.com>
11525
11526 * Makefile.in: Add WARN_CFLAGS. Update configury
11527 dependencies.
11528 * configure.in: Check for <string.h>
11529 * configure: Regenerate.
11530 * config.in: Regenerate.
11531 * gdbreplay.c: Include needed system headers.
11532 (remote_open): Remove strchr prototype.
11533 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11534 * regcache.c (supply_register): Change buf argument to const void *.
11535 (supply_register_by_name): Likewise.
11536 (collect_register): Change buf argument to void *.
11537 (collect_register_by_name): Likewise.
11538 * regcache.h: Add missing prototypes.
11539 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11540 * server.c (handle_query): New function.
11541 (attached): New static variable, moved out of main.
11542 (main): Quiet longjmp clobber warnings.
11543 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11544 * utils.c (error): Remove NORETURN.
11545 (fatal): Likewise.