]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
avoid compiler warnings in remote-m32r-sdi.c
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
ae91f625
MK
12016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2
3 PR gdb/13808
4 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5 * configure.srv: Ditto.
6 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
7 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
9 (init_registers_amd64_linux): Remove prototype.
10 (tdesc_amd64_linux): Remove declaration.
11 (get_ipa_tdesc): New function.
12 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
13 initialize remaining tdescs.
14 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
15 (init_registers_i386_linux): Remove prototype.
16 (tdesc_i386_linux): Remove declaration.
17 (get_ipa_tdesc): New function.
18 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
19 initialize remaining tdescs.
20 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
21 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
22 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
23 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
24 (x86_get_ipa_tdesc_idx): New function.
25 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
26 * linux-x86-tdesc.h: New file.
27 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
28 (target_get_ipa_tdesc_idx): New macro.
29 * tracepoint.c (ipa_tdesc_idx): New macro.
30 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
31 (symbol_list): Add ipa_tdesc_idx.
32 (cmd_qtstart): Write ipa_tdesc_idx in the target.
33 (ipa_tdesc): Remove.
34 (ipa_tdesc_idx): New variable.
35 (get_context_regcache): Use get_ipa_tdesc.
36 (gdb_collect): Ditto.
37 (gdb_probe): Ditto.
38 * tracepoint.h (get_ipa_tdesc): New prototype.
39 (ipa_tdesc): Remove.
40
e7ad2f14
PA
412016-02-24 Pedro Alves <palves@redhat.com>
42
43 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
44 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
45 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
46 Factor out common code between the USE_SIGTRAP_SIGINFO and
47 !USE_SIGTRAP_SIGINFO blocks.
48 (linux_low_filter_event): Call save_stop_reason instead of
49 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
50 Update comments.
51 (linux_wait_1): Update comments.
52
657f9cde
WW
532016-02-24 Wei-cheng Wang <cole945@gmail.com>
54
55 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
56 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
57 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
58 ppc_insert_point, ppc_remove_point.
59
b00b61e1
MK
602016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
61
62 * linux-s390-low.c (s390_supports_z_point_type): New function.
63 (struct linux_target_ops): Wire s390_supports_z_point_type in.
64
553cb527
YQ
652016-02-16 Yao Qi <yao.qi@linaro.org>
66
67 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
68 PC. Get pc from regcache_read_pc.
69
a5652c21
YQ
702016-02-12 Yao Qi <yao.qi@linaro.org>
71
72 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
73 or linux_get_pc_32bit.
74 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
75
ed443b61
YQ
762016-02-12 Yao Qi <yao.qi@linaro.org>
77
78 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
79 arm_linux_get_next_pcs_fixup.
80
020ecd38
MK
812016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
82
83 * tracepoint.c (x_tracepoint_action_download): Change
84 write_inferior_data_ptr to write_inferior_data_pointer.
85 (cmd_qtstart): Likewise.
86 (write_inferior_data_ptr): Remove.
87 (download_agent_expr): Change write_inferior_data_ptr to
88 write_inferior_data_pointer.
89 (download_tracepoint_1): Likewise.
90 (download_tracepoint): Likewise.
91 (download_trace_state_variables): Likewise.
92
7cae9051
WW
932016-02-11 Wei-cheng Wang <cole945@gmail.com>
94 Marcin Kościelnicki <koriakin@0x04.net>
95
96 * tracepoint.c (struct tracepoint_action_ops): Remove.
97 (struct tracepoint_action): Remove ops.
98 (m_tracepoint_action_download, r_tracepoint_action_download)
99 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
100 size and offset accordingly.
101 (m_tracepoint_action_ops, r_tracepoint_action_ops)
102 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
103 (tracepoint_action_send, tracepoint_action_download): New functions.
104 Helpers for trace action handlers.
105 (add_tracepoint_action): Remove setup actions ops.
106 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
107
9f6a71b4
YQ
1082016-02-10 Yao Qi <yao.qi@linaro.org>
109
110 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
111
1e94266c
SM
1122016-02-09 Simon Marchi <simon.marchi@ericsson.com>
113
114 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
115 to AC_OUTPUT.
116 * configure: Regenerate.
117
8adce034
SM
1182016-02-09 Simon Marchi <simon.marchi@ericsson.com>
119
120 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
121 void * to gdb_byte *.
122 * linux-low.c (siginfo_fixup): Likewise.
123 (linux_xfer_siginfo): Likewise.
124 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
125 Likewise.
126 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
127
93813b37
WT
1282016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
129
130 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
131 to srv_tgtobj.
132 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
133 to srv_tgtobj.
134 * linux-x86-low.c [__x86_64__]: Include
135 "nat/amd64-linux-siginfo.h".
136 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
137 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
138 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
139 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
140 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
141 (cpt_si_fd, si_timerid, si_overrun): Move from
142 nat/amd64-linux-siginfo.c.
143 * Makefile.in (amd64-linux-siginfo.o:): New rule.
144
8424cc97
SM
1452016-01-28 Simon Marchi <simon.marchi@ericsson.com>
146
147 * server.c (skip_to_semicolon): Remove.
148 (process_point_options): Use strchrnul instead of
149 skip_to_semicolon.
150
4d18591b
YQ
1512016-01-26 Yao Qi <yao.qi@linaro.org>
152
153 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
154 * linux-low.c (install_software_single_step_breakpoints): Don't
155 call regcache_read_pc.
156 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
157 argument pc.
158
d8020970
YQ
1592016-01-26 Yao Qi <yao.qi@linaro.org>
160
161 * linux-low.c (install_software_single_step_breakpoints): Call
162 regcache_read_pc instead of get_pc.
163
8b207339
YQ
1642016-01-26 Yao Qi <yao.qi@linaro.org>
165
166 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
167 (unblock_async_io): Rename to ...
168 (block_unblock_async_io): ... it. New function.
169 (enable_async_io): Don't install SIGIO handler. Unblock it
170 instead.
171 (disable_async_io): Don't ignore SIGIO. Block it instead.
172 (initialize_async_io): Install SIGIO handler. Don't call
173 unblock_async_io.
174
18879fef
YQ
1752016-01-26 Yao Qi <yao.qi@linaro.org>
176
177 * remote-utils.c (getpkt): If the buffer isn't empty, and the
178 first character is '\003', call *the_target->request_interrupt.
179
a0f8e08a
YQ
1802016-01-25 Yao Qi <yao.qi@linaro.org>
181
182 * remote-utils.c (new_thread_notify): Remove.
183 (dead_thread_notify): Likewise.
184 * remote-utils.h (new_thread_notify): Remove declaration.
185 (dead_thread_notify): Likewise.
186
cc5fd9ab
MK
1872016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
188
189 * gdb.trace/pending.exp: Fix expected message on continue.
190
99e8eb11
MK
1912016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
192
193 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
194 it works properly on big-endian machines where sizeof (CORE_ADDR)
195 != sizeof (void *).
196
a994041d
PA
1972016-01-21 Pedro Alves <palves@redhat.com>
198
199 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
200 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
201 * configure: Regenerate.
202
f7a6a40d
YQ
2032016-01-21 Yao Qi <yao.qi@linaro.org>
204
205 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
206 is_thumb and set it according to CPSR saved on the stack.
207 (get_next_pcs_syscall_next_pc): Pass is_thumb to
208 arm_sigreturn_next_pc.
209
6f69e520
YQ
2102016-01-18 Yao Qi <yao.qi@linaro.org>
211
212 * linux-low.c (linux_set_pc_64bit): New function.
213 (linux_get_pc_64bit): New function.
214 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
215 Declare.
216 * linux-sparc-low.c (debug_threads): Remove declaration.
217 (sparc_get_pc): Remove.
218 (the_low_target): Use linux_get_pc_64bit instead of
219 sparc_get_pc.
220 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
221 (the_low_target): Use linux_get_pc_64bit and
222 linux_set_pc_64bit.
223
276d4552
YQ
2242016-01-18 Yao Qi <yao.qi@linaro.org>
225
226 * linux-arm-low.c (debug_threads): Remove declaration.
227 (arm_get_pc, arm_set_pc): Remove.
228 (the_low_target): Use linux_get_pc_32bit and
229 linux_set_pc_32bit.
230 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
231 (the_low_target): Use linux_get_pc_32bit and
232 linux_set_pc_32bit.
233 * linux-cris-low.c (debug_threads): Remove declaration.
234 (cris_get_pc, cris_set_pc,): Remove.
235 (the_low_target): Use linux_get_pc_32bit and
236 linux_set_pc_32bit.
237 * linux-crisv32-low.c (debug_threads): Remove declaration.
238 (cris_get_pc, cris_set_pc): Remove.
239 (the_low_target): Use linux_get_pc_32bit and
240 linux_set_pc_32bit.
241 * linux-low.c: Include inttypes.h.
242 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
243 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
244 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
245 (the_low_target): Use linux_get_pc_32bit and
246 linux_set_pc_32bit.
247 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
248 (the_low_target): Use linux_get_pc_32bit and
249 linux_set_pc_32bit.
250 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
251 (the_low_target): Use linux_get_pc_32bit and
252 linux_set_pc_32bit.
253 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
254 (the_low_target): Use linux_get_pc_32bit and
255 linux_set_pc_32bit.
256 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
257 (the_low_target): Use linux_get_pc_32bit and
258 linux_set_pc_32bit.
259
eb0edac8
GB
2602016-01-18 Gary Benson <gbenson@redhat.com>
261
262 * configure.ac (AC_FUNC_FORK): New check.
263 * config.in: Regenerate.
264 * configure: Likewise.
265
1b451dda
YQ
2662016-01-14 Yao Qi <yao.qi@linaro.org>
267
268 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
269 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
270 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
271 arm_get_next_pcs_ctor.
272
82075af2
JS
2732016-01-12 Josh Stone <jistone@redhat.com>
274 Philippe Waroquiers <philippe.waroquiers@skynet.be>
275
276 * inferiors.h: Include "gdb_vecs.h".
277 (struct process_info): Add syscalls_to_catch.
278 * inferiors.c (remove_process): Free syscalls_to_catch.
279 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
280 syscall_return stops.
281 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
282 * server.c (handle_general_set): Handle QCatchSyscalls.
283 (handle_query): Report support for QCatchSyscalls.
284 * target.h (struct target_ops): Add supports_catch_syscall.
285 (target_supports_catch_syscall): New macro.
286 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
287 (struct lwp_info): Add syscall_state.
288 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
289 Maintain syscall_state and syscalls_to_catch across exec.
290 (get_syscall_trapinfo): New function, proxy to the_low_target.
291 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
292 (linux_low_filter_event): Toggle syscall_state entry/return for
293 syscall traps, and set it ignored for all others.
294 (gdb_catching_syscalls_p): New function.
295 (gdb_catch_this_syscall_p): New function.
296 (linux_wait_1): Handle SYSCALL_SIGTRAP.
297 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
298 (linux_supports_catch_syscall): New function.
299 (linux_target_ops): Install it.
300 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
301 (the_low_target): Install it.
302
8f13a3ce
MF
3032016-01-12 Mike Frysinger <vapier@gentoo.org>
304
305 * acinclude.m4: Include new ../warning.m4 file.
306 * configure: Regenerated.
307 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
308
5b3da067
MF
3092016-01-12 Mike Frysinger <vapier@gentoo.org>
310
311 * ax.c (is_goto_target): Mark static.
312 * linux-low.c (register_addr): Likewise.
313 (linux_fetch_registers, linux_store_registers): Likewise.
314 * mem-break.c (any_persistent_commands): Fix old prototype.
315 (add_commands_to_breakpoint): Mark static.
316 * regcache.c (find_register_by_name): Delete unused func.
317 * remote-utils.c (hex_or_minus_one): Mark static.
318 * server.c (monitor_show_help): Mark static.
319 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
320 handle_v_requests): Likewise.
321
bc504a31
PA
3222016-01-12 Pedro Alves <palves@redhat.com>
323
324 Remove use of the registered trademark symbol throughout.
325
5a0dd67a
YQ
3262016-01-08 Yao Qi <yao.qi@linaro.org>
327
328 * remote-utils.c (getpkt): If c is '\003', call target hook
329 request_interrupt.
330
b2ca446f
YQ
3312016-01-06 Yao Qi <yao.qi@linaro.org>
332
333 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
334 linux-aarch32-low.c.
335 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
336 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
337 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
338 (thumb2_breakpoint): Declare.
339 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
340 linux-aarch32-low.h.
341 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
342 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
343 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
344
edd88788
JB
3452016-01-01 Joel Brobecker <brobecker@adacore.com>
346
347 * gdbreplay.c (gdbreplay_version): Change copyright year in
348 version message.
349 * server.c (gdbserver_version): Likewise.
350
65da7f14
PP
3512015-12-28 Patrick Palka <patrick@parcs.ath.cx>
352
353 * server.c (crc32_table): Delete.
354 (crc32): Use libiberty's xcrc32 function.
355
4abd5ed2
JB
3562015-12-22 Joel Brobecker <brobecker@adacore.com>
357
358 * lynx-low.c (lynx_delete_thread_callback): New function.
359 (lynx_mourn): Properly delete our process and all of its
360 threads. Remove call to clear_inferiors.
361
0e50fe5c
JB
3622015-12-22 Joel Brobecker <brobecker@adacore.com>
363
364 * target.c (thread_search_callback): Add check that
365 the thread_stopped target callback is not NULL before
366 calling it.
367
35adc03f
YQ
3682015-12-21 Yao Qi <yao.qi@linaro.org>
369
370 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
371 arm breakpoint.
372
bd2b2909
AT
3732015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
374
375 * server.c (handle_query): Call target_supports_software_single_step.
376
7fe5e27e
AT
3772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
378
379 * linux-low.c (single_step): New function.
380 (linux_resume_one_lwp_throw): Call single_step.
381 (start_step_over): Likewise.
382
d9311bfa
AT
3832015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
384
385 * Makefile.in (SFILES): Append arch/arm-linux.c,
386 arch/arm-get-next-pcs.c.
387 (arm-linux.o): New rule.
388 (arm-get-next-pcs.o): New rule.
389 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
390 arm-linux.o.
391 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
392 to linux-aarch32-low.c.
393 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
394 (arm_breakpoint_len, thumb_breakpoint): Likewise.
395 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
396 (thumb2_breakpoint_len): Likewise.
397 (arm_is_thumb_mode): Make non-static.
398 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
399 from linux-aarch32-low.c.
400 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
401 (arm_breakpoint_len, thumb_breakpoint): Likewise.
402 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
403 (thumb2_breakpoint_len): Likewise.
404 (arm_is_thumb_mode): New declaration.
405 * linux-arm-low.c: Include arch/arm-linux.h
406 aarch/arm-get-next-pcs.h, sys/syscall.h.
407 (get_next_pcs_ops): New struct.
408 (get_next_pcs_addr_bits_remove): New function.
409 (get_next_pcs_is_thumb): New function.
410 (get_next_pcs_read_memory_unsigned_integer): Likewise.
411 (arm_sigreturn_next_pc): Likewise.
412 (get_next_pcs_syscall_next_pc): Likewise.
413 (arm_gdbserver_get_next_pcs): Likewise.
414 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
415 Initialize.
416 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
417 * server.h: Include gdb_vecs.h.
418
68ce2059
AT
4192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
420
421 * Makefile.in (SFILES): Append common/common-regcache.c.
422 (OBS): Append common-regcache.o.
423 (common-regcache.o): New rule.
424 * regcache.c (init_register_cache): Initialize cache to
425 REG_UNAVAILABLE.
426 (regcache_raw_read_unsigned): New function.
427 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
428 register_status enum.
429
fa5308bd
AT
4302015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
431
432 * linux-aarch64-low.c (the_low_targets): Rename
433 breakpoint_reinsert_addr to get_next_pcs.
434 * linux-arm-low.c (the_low_targets): Likewise.
435 * linux-bfin-low.c (the_low_targets): Likewise.
436 * linux-cris-low.c (the_low_targets): Likewise.
437 * linux-crisv32-low.c (the_low_targets): Likewise.
438 * linux-low.c (can_software_single_step): Likewise.
439 (install_software_single_step_breakpoints): New function.
440 (start_step_over): Use install_software_single_step_breakpoints.
441 * linux-low.h: New CORE_ADDR vector.
442 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
443 get_next_pcs.
444 * linux-mips-low.c (the_low_targets): Likewise.
445 * linux-nios2-low.c (the_low_targets): Likewise.
446 * linux-sparc-low.c (the_low_targets): Likewise.
447
4a6ed09b
PA
4482015-12-17 Pedro Alves <palves@redhat.com>
449
450 * linux-low.c (linux_kill_one_lwp): Remove references to
451 LinuxThreads.
452 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
453 to 'kill'.
454 (linux_init_signals): Delete.
455 (initialize_low): Adjust.
456 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
457
7544db95
PA
4582015-12-16 Pedro Alves <palves@redhat.com>
459
460 * configure.ac (compiler warning flags): When testing a
461 -Wno-foo option, check whether -Wfoo works instead.
462 * configure: Regenerate.
463
8020350c
DB
4642015-12-11 Don Breazeal <donb@codesourcery.com>
465
466 * server.c (process_serial_event): Don't exit from gdbserver
467 in remote mode if there are still active inferiors.
468
db91f502
YQ
4692015-12-11 Yao Qi <yao.qi@linaro.org>
470
471 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
472 arm_breakpoint_at if the process is 32-bit.
473
b37a6290
YQ
4742015-12-11 Yao Qi <yao.qi@linaro.org>
475
476 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
477 arm breakpoint.
478
17b1509a
YQ
4792015-12-07 Yao Qi <yao.qi@linaro.org>
480
481 * configure.srv: Append arm.o to srv_tgtobj for
482 aarch64*-*-linux* target.
483 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
484 from linux-arm-low.c.
485 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
486 (arm_breakpoint_len, thumb_breakpoint): Likewise.
487 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
488 (thumb2_breakpoint_len): Likewise.
489 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
490 (arm_breakpoint_kinds): Likewise.
491 (arm_breakpoint_kind_from_pc): Likewise.
492 (arm_sw_breakpoint_from_kind): Likewise.
493 (arm_breakpoint_kind_from_current_state): Likewise.
494 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
495 (arm_sw_breakpoint_from_kind): Declare.
496 (arm_breakpoint_kind_from_current_state): Declare.
497 (arm_breakpoint_at): Declare.
498 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
499 arm_sw_breakpoint_from_kind if process is 32-bit.
500 (aarch64_breakpoint_kind_from_pc): New function.
501 (aarch64_breakpoint_kind_from_current_state): New function.
502 (the_low_target): Initialize fields breakpoint_kind_from_pc
503 and breakpoint_kind_from_current_state.
504 * linux-arm-low.c (arm_breakpoint_kinds): Move to
505 linux-aarch32-low.c.
506 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
507 (arm_breakpoint, arm_breakpoint_len): Likewise.
508 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
509 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
510 (arm_is_thumb_mode): Likewise.
511 (arm_breakpoint_at): Likewise.
512 (arm_breakpoint_kind_from_pc): Likewise.
513 (arm_sw_breakpoint_from_kind): Likewise.
514 (arm_breakpoint_kind_from_current_state): Likewise.
515
516 Revert:
517 2015-08-04 Yao Qi <yao.qi@linaro.org>
518
519 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
520 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
521 * server.c (extended_protocol): Remove "static".
522 * server.h (extended_protocol): Declare it.
523
ece66d65
JS
5242015-12-04 Josh Stone <jistone@redhat.com>
525
526 * target.h (struct target_ops) <arch_setup>: Rename to ...
527 (struct target_ops) <post_create_inferior>: ... this.
528 (target_arch_setup): Rename to ...
529 (target_post_create_inferior): ... this, calling post_create_inferior.
530 * server.c (start_inferior): Update target_arch_setup calls to
531 target_post_create_inferior.
532 * linux-low.c (linux_low_ptrace_options): Forward declare.
533 (linux_arch_setup): Update its comment for general use.
534 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
535 (struct linux_target_ops): Use linux_post_create_inferior.
536 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
537 to post_create_inferior.
538 * nto-low.c (struct nto_target_ops): Likewise.
539 * spu-low.c (struct spu_target_ops): Likewise.
540 * win32-low.c (struct win32_target_ops): Likewise.
541
e58c48b4
AT
5422015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
543
544 * linux-arm-low.c: Remove duplicate arch/arm.h include.
545
fbec8956
AT
5462015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
547
548 * linux-arm-low.c (arm_reinsert_addr): Remove function.
549 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
550 * linux-cris-low.c (cris_reinsert_addr> Remove function.
551 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
552 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
553 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
554 * linux-mips-low.c (mips_reinsert_addr): Remove function.
555 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
556 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
557 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
558 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
559 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
560
9b4c5f87
AT
5612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
562
563 * linux-low.c (linux_look_up_symbols): Don't call
564 linux_supports_traceclone.
565 * linux-low.h (thread_db_init): Remove use_events argument.
566 * thread-db.c (thread_db_use_event): Remove global variable.
567 (struct thread_db) <td_thr_event_enable_p>: Remove field.
568 (struct thread_db) <td_create_bp>: Remove field.
569 (thread_db_create_event): Remove function.
570 (thread_db_enable_reporting): Likewise.
571 (find_one_thread): Don't check for thread_db_use_events.
572 (attach_thread): Likewise.
573 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
574 (try_thread_db_load_1): Don't check for thread_db_use_events.
575 (thread_db_init): Remove use_events argument and thread events
576 handling.
577 (remove_thread_event_breakpoints): Remove function.
578 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
579
7d00775e
AT
5802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
581
582 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
583 New function.
584 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
585 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
586 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
587 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
588 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
589 Initialize.
590 * linux-crisv32-low.c (cris_supports_hardware_single_step):
591 New function.
592 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
593 * linux-low.c (can_hardware_single_step): Use
594 supports_hardware_single_step.
595 (can_software_single_step): New function.
596 (start_step_over): Call can_software_single_step.
597 (linux_supports_hardware_single_step): New function.
598 (struct target_ops) <supports_software_single_step>: Initialize.
599 * linux-low.h (struct linux_target_ops)
600 <supports_hardware_single_step>: Initialize.
601 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
602 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
603 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
604 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
605 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
606 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
607 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
608 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
609 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
610 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
611 Initialize.
612 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
613 (struct linux_target_ops) <tile_supports_hardware_single_step>:
614 Initialize.
615 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
616 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
617 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
618 New function.
619 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
620 * target.h (struct target_ops): <supports_software_single_step>:
621 New field.
622 (target_supports_software_single_step): New macro.
623
2d97cd35
AT
6242015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
625
626 * linux-low.c (linux_wait_1): Fix pc advance condition.
627 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
628 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
629
769ef81f
AT
6302015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
631
632 * linux-arm-low.c (arm_is_thumb_mode): New function.
633 (arm_breakpoint_at): Use arm_is_thumb_mode.
634 (arm_breakpoint_kind_from_current_state): New function.
635 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
636 Initialize.
637 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
638 (linux_breakpoint_kind_from_current_state): New function.
639 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
640 * linux-low.h (struct linux_target_ops)
641 <breakpoint_kind_from_current_state>: New field.
642 * target.h (struct target_ops): Likewise.
643 (target_breakpoint_kind_from_current_state): New macro.
644
1bebeeca
PA
6452015-11-30 Pedro Alves <palves@redhat.com>
646
647 * linux-low.c (linux_resume): Wake up the event loop before
648 returning.
649
a67a9fae
PA
6502015-11-30 Pedro Alves <palves@redhat.com>
651
652 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
653 check.
654 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
655 to -1.
656 * target.c (struct thread_search): New structure.
657 (thread_search_callback): New function.
658 (prev_general_thread): New global.
659 (prepare_to_access_memory, done_accessing_memory): New functions.
660 * target.h (prepare_to_access_memory, done_accessing_memory):
661 Replace macros with function declarations.
662
f2faf941
PA
6632015-11-30 Pedro Alves <palves@redhat.com>
664
665 PR 14618
666 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
667 report TARGET_WAITKIND_NO_RESUMED.
668 * remote-utils.c (prepare_resume_reply): Handle
669 TARGET_WAITKIND_NO_RESUMED.
670 * server.c (report_no_resumed): New global.
671 (handle_query) <qSupported>: Handle "no-resumed+". Report
672 "no-resumed+" support.
673 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
674 return error if the client doesn't support no-resumed events.
675 (push_stop_notification): New function.
676 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
677 events if the client supports them.
678
a681f9c9
PA
6792015-11-30 Pedro Alves <palves@redhat.com>
680
681 * linux-low.c (thread_still_has_status_pending_p): Don't check
682 vCont;t here.
683 (lwp_resumed): New function.
684 (status_pending_p_callback): Return early if the LWP is not
685 supposed to be resumed.
686
65706a29
PA
6872015-11-30 Pedro Alves <palves@redhat.com>
688
689 * linux-low.c (handle_extended_wait): Assert that the LWP's
690 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
691 thread create events, leave the new child's status pending.
692 (linux_low_filter_event): If GDB wants to hear about thread exit
693 events, leave the LWP marked dead and don't delete it.
694 (linux_wait_for_event_filtered): Don't check for thread exit.
695 (filter_exit_event): New function.
696 (linux_wait_1): Use it, when returning an exit event.
697 (linux_resume_one_lwp_throw): Assert that the LWP's
698 waitstatus is TARGET_WAITKIND_IGNORE.
699 * remote-utils.c (prepare_resume_reply): Handle
700 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
701 * server.c (report_thread_events): New global.
702 (handle_general_set): Handle QThreadEvents.
703 (handle_query) <qSupported>: Handle and report QThreadEvents+;
704 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
705 TARGET_WAITKIND_THREAD_EXITED.
706 * server.h (report_thread_events): Declare.
707
56cf4bed
PA
7082015-11-30 Pedro Alves <palves@redhat.com>
709
710 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
711 the thread's last_resume_kind was resume_stop.
712
500c1d85
PA
7132015-11-30 Pedro Alves <palves@redhat.com>
714
715 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
716 before returning.
717
de979965
PA
7182015-11-30 Pedro Alves <palves@redhat.com>
719
720 * server.c (handle_v_requests): Handle vCtrlC.
721
34c65914
PA
7222015-11-30 Pedro Alves <palves@redhat.com>
723
724 * gdbthread.h (find_any_thread_of_pid): Declare.
725 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
726 functions.
727 * server.c (handle_query): If current_thread is NULL, look for
728 another thread of the selected process.
729
79efa585 7302015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 731 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
732
733 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
734 * server.c (handle_qxfer_threads_worker): Refactor to include thread
735 name in reply.
736 * target.h (struct target_ops) <thread_name>: New field.
737 (target_thread_name): New macro.
738
80d82c19
JB
7392015-11-23 Joel Brobecker <brobecker@adacore.com>
740
741 * regcache.h (regcache_invalidate_pid): Add declaration.
742 * regcache.c (regcache_invalidate_pid): New function, extracted
743 from regcache_invalidate.
744 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
745 Add trivial documentation comment.
746 * lynx-low.c: Use regcache_invalidate_pid instead of
747 regcache_invalidate.
748
64da5dd5
JB
7492015-11-23 Joel Brobecker <brobecker@adacore.com>
750
751 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
752 and Elf64_auxv_t if the target is Android.
753
37ce4055
DE
7542015-11-22 Doug Evans <xdje42@gmail.com>
755
756 * target.h: #include <sys/types.h>.
757
06e03fff
PA
7582015-11-19 Pedro Alves <palves@redhat.com>
759
760 * linux-low.c (linux_process_qsupported): Change prototype.
761 Adjust.
762 * linux-low.h (struct linux_target_ops) <process_qsupported>:
763 Change prototype.
764 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
765 and adjust to loop over all features.
766 * server.c (handle_query) <qSupported>: Adjust to call
767 target_process_qsupported once, passing it a vector of unprocessed
768 features.
769 * target.h (struct target_ops) <process_qsupported>: Change
770 prototype.
771 (target_process_qsupported): Adjust.
772
9a084706
PA
7732015-11-19 Pedro Alves <palves@redhat.com>
774
775 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
776 mode.
777 * configure: Regenerate.
778
dad44a1f
PA
7792015-11-19 Pedro Alves <palves@redhat.com>
780
781 * configure: Regenerate.
782
231c0592
YQ
7832015-11-19 Yao Qi <yao.qi@linaro.org>
784
785 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
786 type to uint32_t.
787
6c1c9a8b
YQ
7882015-11-19 Yao Qi <yao.qi@linaro.org>
789
790 * linux-aarch64-low.c (enum aarch64_operand_type): New.
791 (struct aarch64_operand): Move enum out.
792
9caa3311
YQ
7932015-11-19 Yao Qi <yao.qi@linaro.org>
794
795 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
796 struct user_fpsimd_state *.
797 (aarch64_store_fpregset): Likewise.
798
6a69a054
YQ
7992015-11-19 Yao Qi <yao.qi@linaro.org>
800
801 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
802 struct user_pt_regs *.
803 (aarch64_store_gregset): Likewise.
804
1798301e
PA
8052015-11-18 Pedro Alves <palves@redhat.com>
806
807 * Makefile.in (all_object_files): Add $IPA_OBJS.
808
ce7715e2
PA
8092015-11-17 Pedro Alves <palves@redhat.com>
810
811 * win32-low.c (win32_resume): Use gdb_signal_from_host,
812 GDB_SIGNAL_0 and gdb_signal_to_string.
813
c0879059
PA
8142015-11-17 Pedro Alves <palves@redhat.com>
815
816 * win32-low.c (handle_output_debug_string): Remove parameter.
817 (win32_kill): Remove our_status local and adjust call to
818 handle_output_debug_string.
819 (get_child_debug_event): Adjust call to
820 handle_output_debug_string.
821
1996e237
SM
8222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
823
824 * linux-mips-low.c (mips_fill_gregset): Add cast.
825 (mips_store_gregset): Likewise.
826 (mips_fill_fpregset): Likewise.
827 (mips_store_fpregset): Likewise.
828
cbec665b
SM
8292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
830
831 * linux-mips-low.c (mips_add_watchpoint): Rename private to
832 priv.
833
eb3e3c67
SM
8342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
835
836 * linux-mips-low.c (mips_linux_new_thread): Change type of
837 watch_type to enum target_hw_bp_type.
838
171de4b8
SM
8392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
840
841 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
842 Change return type to arm_hwbp_type.
843
04248ead
SM
8442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
845
846 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
847 (arm_store_gregset): Likewise.
848 * linux-arm-low.c (arm_get_hwcap): Likewise.
849 (arm_read_description): Likewise.
850
04b3479c
SM
8512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
852
853 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
854
2bc84e8a
SM
8552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
856
857 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
858 (ppc_fill_vsxregset): Likewise.
859 (ppc_store_vsxregset): Likewise.
860 (ppc_fill_vrregset): Likewise.
861 (ppc_store_vrregset): Likewise.
862 (ppc_fill_evrregset): Likewise.
863 (ppc_store_evrregset): Likewise.
864
e6c5bb05
SM
8652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
866
867 * linux-ppc-low.c (ppc_usrregs_info): Remove
868 forward-declaration.
869 (ppc_arch_setup): Move lower in file.
870
7ea45d72
SM
8712015-10-30 Simon Marchi <simon.marchi@ericsson.com>
872
873 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
874 (ps_pdwrite): Likewise.
875
69291610
HW
8762015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
877
878 * linux-arm-low.c (arm_new_thread): Move pointer dereference
879 to after assert checks.
880
b42945fd
SM
8812015-10-29 Simon Marchi <simon.marchi@ericsson.com>
882
883 * proc-service.c (ps_pdread): Add/adjust casts.
884 (ps_pdwrite): Add/adjust casts.
885
d6f85c84
SM
8862015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
887
888 * server.c (handle_search_memory_1): Cast return value of
889 memmem.
890
f98cd059
SM
8912015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
892
893 * server.c (write_qxfer_response): Change type of data to
894 gdb_byte *.
895
d2412fa5
PA
8962015-10-29 Pedro Alves <palves@redhat.com>
897
898 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
899
c17414a2
PA
9002015-10-29 Pedro Alves <palves@redhat.com>
901
902 * tracepoint.c (clear_installed_tracepoints): Add casts.
903
e053fbc4
PA
9042015-10-29 Pedro Alves <palves@redhat.com>
905
906 * server.c (handle_v_cont, process_serial_event): Add enum
907 gdb_signal casts to signal parsing code.
908
add67df8
PA
9092015-10-29 Pedro Alves <palves@redhat.com>
910
911 * linux-low.h (NULL_REGSET): Define.
912 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
913 * linux-arm-low.c (arm_regsets): Likewise.
914 * linux-crisv32-low.c (cris_regsets): Likewise.
915 * linux-m68k-low.c (m68k_regsets): Likewise.
916 * linux-mips-low.c (mips_regsets): Likewise.
917 * linux-nios2-low.c (nios2_regsets): Likewise.
918 * linux-ppc-low.c (ppc_regsets): Likewise.
919 * linux-s390-low.c (s390_regsets): Likewise.
920 * linux-sh-low.c (sh_regsets): Likewise.
921 * linux-sparc-low.c (sparc_regsets): Likewise.
922 * linux-tic6x-low.c (tic6x_regsets): Likewise.
923 * linux-tile-low.c (tile_regsets): Likewise.
924 * linux-x86-low.c (x86_regsets): Likewise.
925 * linux-xtensa-low.c (xtensa_regsets): Likewise.
926
50bc912a
PA
9272015-10-29 Pedro Alves <palves@redhat.com>
928
929 * linux-low.h (NULL_REGSET): Define.
930 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
931 * linux-arm-low.c (arm_regsets): Likewise.
932 * linux-crisv32-low.c (cris_regsets): Likewise.
933 * linux-m68k-low.c (m68k_regsets): Likewise.
934 * linux-mips-low.c (mips_regsets): Likewise.
935 * linux-nios2-low.c (nios2_regsets): Likewise.
936 * linux-ppc-low.c (ppc_regsets): Likewise.
937 * linux-s390-low.c (s390_regsets): Likewise.
938 * linux-sh-low.c (sh_regsets): Likewise.
939 * linux-sparc-low.c (sparc_regsets): Likewise.
940 * linux-tic6x-low.c (tic6x_regsets): Likewise.
941 * linux-tile-low.c (tile_regsets): Likewise.
942 * linux-x86-low.c (x86_regsets): Likewise.
943 * linux-xtensa-low.c (xtensa_regsets): Likewise.
944
682b2546
DE
9452015-10-26 Doug Evans <dje@google.com>
946
947 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
948
963843d4
DE
9492015-10-26 Doug Evans <dje@google.com>
950
951 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
952
d41401ac
DE
9532015-10-26 Doug Evans <dje@google.com>
954
955 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
956 for debug_printf.
957 (attach_thread, find_new_threads_callback): Ditto.
958
3db28855
AT
9592015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
960
961 * mem-break.h (set_breakpoint_data): Remove.
962
fb78e89c
AT
9632015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
964
965 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
966 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
967 (initialize_low): Remove set_breakpoint_data call.
968 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
969 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
970 (initialize_low): Remove set_breakpoint_data call.
971 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
972 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
973 (initialize_low): Remove set_breakpoint_data call.
974
2e6ee069
AT
9752015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
976
977 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
978 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
979 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
980 * target.h (target_breakpoint_kind_from_pc): New macro.
981
1652a986
AT
9822015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
983
984 * linux-low.c (default_breakpoint_kind_from_pc): New function.
985 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
986 the default breakpoint kind.
987
abeead09
AT
9882015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
989
990 * linux-arm-low.c (arm_supports_z_point_type): Add software
991 breakpoint support.
992
b0b4b501
AT
9932015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
994
995 * linux-arm-low.c: Refactor breakpoint definitions.
996 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
997 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
998
8689682c
AT
9992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1000
1001 * Makefile.in: Add arm.c/o.
1002 * configure.srv: Likewise.
1003 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1004 (arm_breakpoint_kind_from_pc): New function.
1005 (arm_sw_breakpoint_from_kind): Return proper kind.
1006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1007
27165294
AT
10082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1009
1010 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1011 removal.
1012 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1013 (struct raw_breakpoint) <size>: Remove.
1014 (struct raw_breakpoint) <kind>: Add.
1015 (bp_size): New function.
1016 (bp_opcode): Likewise.
1017 (find_raw_breakpoint_at): Adjust for kind.
1018 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1019 (remove_memory_breakpoint): Adjust for kind call bp_size.
1020 (set_raw_breakpoint_at): Adjust for kind.
1021 (set_breakpoint): Likewise.
1022 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1023 (delete_raw_breakpoint): Adjust for kind.
1024 (delete_breakpoint): Likewise.
1025 (find_gdb_breakpoint): Likewise.
1026 (set_gdb_breakpoint_1): Likewise.
1027 (set_gdb_breakpoint): Likewise.
1028 (delete_gdb_breakpoint_1): Likewise.
1029 (delete_gdb_breakpoint): Likewise.
1030 (uninsert_raw_breakpoint): Likewise.
1031 (reinsert_raw_breakpoint): Likewise.
1032 (set_breakpoint_data): Remove.
1033 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1034 (check_mem_read): Adjust for kind call bp_size.
1035 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1036 (clone_one_breakpoint): Adjust for kind.
1037 * mem-break.h (set_gdb_breakpoint): Likewise.
1038 (delete_gdb_breakpoint): Likewise.
1039 * server.c (process_serial_event): Likewise.
1040
dd373349
AT
10412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1042
1043 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1044 (struct linux_target_ops) <breakpoint>: Remove.
1045 (struct linux_target_ops) <breakpoint_len>: Remove.
1046 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1047 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1048 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1049 (arm_sw_breakpoint_from_kind): New function.
1050 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1051 (struct linux_target_ops) <breakpoint>: Remove.
1052 (struct linux_target_ops) <breakpoint_len>: Remove.
1053 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1054 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1055 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1056 (struct linux_target_ops) <breakpoint>: Remove.
1057 (struct linux_target_ops) <breakpoint_len>: Remove.
1058 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1059 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1060 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1061 (struct linux_target_ops) <breakpoint>: Remove.
1062 (struct linux_target_ops) <breakpoint_len>: Remove.
1063 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1064 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1065 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1066 and sw_breakpoint_from_kind to increment the pc.
1067 (linux_breakpoint_kind_from_pc): New function.
1068 (linux_sw_breakpoint_from_kind): New function.
1069 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1070 (initialize_low): Call breakpoint_kind_from_pc and
1071 sw_breakpoint_from_kind to replace breakpoint_data/len.
1072 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1073 New field.
1074 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1075 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1076 (struct linux_target_ops) <breakpoint>: Remove.
1077 (struct linux_target_ops) <breakpoint_len>: Remove.
1078 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1079 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1080 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1081 (struct linux_target_ops) <breakpoint>: Remove.
1082 (struct linux_target_ops) <breakpoint_len>: Remove.
1083 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1084 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1085 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1086 (struct linux_target_ops) <breakpoint>: Remove.
1087 (struct linux_target_ops) <breakpoint_len>: Remove.
1088 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1089 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1090 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1091 (struct linux_target_ops) <breakpoint>: Remove.
1092 (struct linux_target_ops) <breakpoint_len>: Remove.
1093 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1094 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1095 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1096 (struct linux_target_ops) <breakpoint>: Remove.
1097 (struct linux_target_ops) <breakpoint_len>: Remove.
1098 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1099 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1100 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1101 (struct linux_target_ops) <breakpoint>: Remove.
1102 (struct linux_target_ops) <breakpoint_len>: Remove.
1103 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1104 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1105 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1106 (struct linux_target_ops) <breakpoint>: Remove.
1107 (struct linux_target_ops) <breakpoint_len>: Remove.
1108 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1109 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1110 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1111 (struct linux_target_ops) <breakpoint>: Remove.
1112 (struct linux_target_ops) <breakpoint_len>: Remove.
1113 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1114 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1115 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1116 (struct linux_target_ops) <breakpoint>: Remove.
1117 (struct linux_target_ops) <breakpoint_len>: Remove.
1118 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1119 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1120 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1121 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1122 (struct linux_target_ops) <breakpoint>: Remove.
1123 (struct linux_target_ops) <breakpoint_len>: Remove.
1124 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1125 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1126 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1127 (struct linux_target_ops) <breakpoint>: Remove.
1128 (struct linux_target_ops) <breakpoint_len>: Remove.
1129 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1130 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1131
4cd98a19
AT
11322015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1133
1134 * linux-cris-low.c (cris_get_pc): Remove void arg.
1135
774ee6d2
AR
11362015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1137
1138 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1139 variable name.
1140
833dcd29
AR
11412015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1142
1143 * inferiors.c (thread_pid_matches_callback): New function.
1144 (find_thread_process): New function.
1145 (remove_thread): Reset current_thread.
1146 (remove_process): Assert threads have been removed first.
1147
8d689ee5
YQ
11482015-10-15 Yao Qi <yao.qi@linaro.org>
1149
1150 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1151 if it is 3.
1152 (aarch64_remove_point): Likewise.
1153 * regcache.c (regcache_register_size): New function.
1154
1c2e1515
YQ
11552015-10-12 Yao Qi <yao.qi@linaro.org>
1156
1157 * linux-aarch64-low.c: Update all callers as emit_load_store
1158 is renamed to aarch64_emit_load_store.
1159
e1c587c3
YQ
11602015-10-12 Yao Qi <yao.qi@linaro.org>
1161
1162 * linux-aarch64-low.c: Update all callers of function renaming
1163 from emit_insn to aarch64_emit_insn.
1164
b6542f81
YQ
11652015-10-12 Yao Qi <yao.qi@linaro.org>
1166
1167 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1168 arch/aarch64-insn.h.
1169 (struct aarch64_memory_operand): Likewise.
1170 (ENCODE): Likewise.
1171 (emit_insn): Move to arch/aarch64-insn.c.
1172 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1173 (emit_load_store): Move to arch/aarch64-insn.c.
1174 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1175 (can_encode_int32): Remove.
1176
246994ce
YQ
11772015-10-12 Yao Qi <yao.qi@linaro.org>
1178
1179 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1180 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1181 (aarch64_relocate_instruction): Likewise.
1182 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1183 (struct aarch64_insn_visitor): Likewise.
1184
0badd99f
YQ
11852015-10-12 Yao Qi <yao.qi@linaro.org>
1186
1187 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1188 (struct aarch64_insn_visitor): New.
1189 (struct aarch64_insn_relocation_data): New.
1190 (aarch64_ftrace_insn_reloc_b): New function.
1191 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1192 (aarch64_ftrace_insn_reloc_cb): Likewise.
1193 (aarch64_ftrace_insn_reloc_tb): Likewise.
1194 (aarch64_ftrace_insn_reloc_adr): Likewise.
1195 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1196 (aarch64_ftrace_insn_reloc_others): Likewise.
1197 (visitor): New.
1198 (aarch64_relocate_instruction): Use visitor.
1199
dfaffe9d
YQ
12002015-10-12 Yao Qi <yao.qi@linaro.org>
1201
1202 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1203 int. Add argument buf.
1204 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1205 aarch64_relocate_instruction.
1206
70b439f0
YQ
12072015-10-12 Yao Qi <yao.qi@linaro.org>
1208
1209 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1210 argument insn. Remove local variable insn. Don't call
1211 target_read_uint32.
1212 (aarch64_install_fast_tracepoint_jump_pad): Call
1213 target_read_uint32.
1214
7781c06f
YQ
12152015-09-30 Yao Qi <yao.qi@linaro.org>
1216
1217 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1218 (emit_load_store_pair): Likewise.
1219
9a3c8263
SM
12202015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1221
1222 * dll.c (match_dll): Add cast(s).
1223 (unloaded_dll): Likewise.
1224 * linux-low.c (second_thread_of_pid_p): Likewise.
1225 (delete_lwp_callback): Likewise.
1226 (count_events_callback): Likewise.
1227 (select_event_lwp_callback): Likewise.
1228 (linux_set_resume_request): Likewise.
1229 * server.c (accumulate_file_name_length): Likewise.
1230 (emit_dll_description): Likewise.
1231 (handle_qxfer_threads_worker): Likewise.
1232 (visit_actioned_threads): Likewise.
1233 * thread-db.c (any_thread_of): Likewise.
1234 * tracepoint.c (same_process_p): Likewise.
1235 (match_blocktype): Likewise.
1236 (build_traceframe_info_xml): Likewise.
1237
224c3ddb
SM
12382015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1239
1240 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1241 assignment.
1242 (gdb_unparse_agent_expr): Likewise.
1243 * hostio.c (require_data): Likewise.
1244 (handle_pread): Likewise.
1245 * linux-low.c (disable_regset): Likewise.
1246 (fetch_register): Likewise.
1247 (store_register): Likewise.
1248 (get_dynamic): Likewise.
1249 (linux_qxfer_libraries_svr4): Likewise.
1250 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1251 (set_fast_tracepoint_jump): Likewise.
1252 (uninsert_fast_tracepoint_jumps_at): Likewise.
1253 (reinsert_fast_tracepoint_jumps_at): Likewise.
1254 (validate_inserted_breakpoint): Likewise.
1255 (clone_agent_expr): Likewise.
1256 * regcache.c (init_register_cache): Likewise.
1257 * remote-utils.c (putpkt_binary_1): Likewise.
1258 (decode_M_packet): Likewise.
1259 (decode_X_packet): Likewise.
1260 (look_up_one_symbol): Likewise.
1261 (relocate_instruction): Likewise.
1262 (monitor_output): Likewise.
1263 * server.c (handle_search_memory): Likewise.
1264 (handle_qxfer_exec_file): Likewise.
1265 (handle_qxfer_libraries): Likewise.
1266 (handle_qxfer): Likewise.
1267 (handle_query): Likewise.
1268 (handle_v_cont): Likewise.
1269 (handle_v_run): Likewise.
1270 (captured_main): Likewise.
1271 * target.c (write_inferior_memory): Likewise.
1272 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1273 * tracepoint.c (init_trace_buffer): Likewise.
1274 (add_tracepoint_action): Likewise.
1275 (add_traceframe): Likewise.
1276 (add_traceframe_block): Likewise.
1277 (cmd_qtdpsrc): Likewise.
1278 (cmd_qtdv): Likewise.
1279 (cmd_qtstatus): Likewise.
1280 (response_source): Likewise.
1281 (response_tsv): Likewise.
1282 (cmd_qtnotes): Likewise.
1283 (gdb_collect): Likewise.
1284 (initialize_tracepoint): Likewise.
1285
afbe19f8
PL
12862015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1287
1288 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1289 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1290 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1291 <NOP>: New.
1292 (enum aarch64_condition_codes): New enum.
1293 (w0): New static global.
1294 (fp): Likewise.
1295 (lr): Likewise.
1296 (struct aarch64_memory_operand) <type>: New
1297 MEMORY_OPERAND_POSTINDEX type.
1298 (postindex_memory_operand): New helper function.
1299 (emit_ret): New function.
1300 (emit_load_store_pair): New function, factored out of emit_stp
1301 with support for MEMORY_OPERAND_POSTINDEX.
1302 (emit_stp): Rewrite using emit_load_store_pair.
1303 (emit_ldp): New function.
1304 (emit_load_store): Likewise.
1305 (emit_ldr): Mention post-index instruction in comment.
1306 (emit_ldrh): New function.
1307 (emit_ldrb): New function.
1308 (emit_ldrsw): Mention post-index instruction in comment.
1309 (emit_str): Likewise.
1310 (emit_subs): New function.
1311 (emit_cmp): Likewise.
1312 (emit_and): Likewise.
1313 (emit_orr): Likewise.
1314 (emit_orn): Likewise.
1315 (emit_eor): Likewise.
1316 (emit_mvn): Likewise.
1317 (emit_lslv): Likewise.
1318 (emit_lsrv): Likewise.
1319 (emit_asrv): Likewise.
1320 (emit_mul): Likewise.
1321 (emit_sbfm): Likewise.
1322 (emit_sbfx): Likewise.
1323 (emit_ubfm): Likewise.
1324 (emit_ubfx): Likewise.
1325 (emit_csinc): Likewise.
1326 (emit_cset): Likewise.
1327 (emit_nop): Likewise.
1328 (emit_ops_insns): New helper function.
1329 (emit_pop): Likewise.
1330 (emit_push): Likewise.
1331 (aarch64_emit_prologue): New function.
1332 (aarch64_emit_epilogue): Likewise.
1333 (aarch64_emit_add): Likewise.
1334 (aarch64_emit_sub): Likewise.
1335 (aarch64_emit_mul): Likewise.
1336 (aarch64_emit_lsh): Likewise.
1337 (aarch64_emit_rsh_signed): Likewise.
1338 (aarch64_emit_rsh_unsigned): Likewise.
1339 (aarch64_emit_ext): Likewise.
1340 (aarch64_emit_log_not): Likewise.
1341 (aarch64_emit_bit_and): Likewise.
1342 (aarch64_emit_bit_or): Likewise.
1343 (aarch64_emit_bit_xor): Likewise.
1344 (aarch64_emit_bit_not): Likewise.
1345 (aarch64_emit_equal): Likewise.
1346 (aarch64_emit_less_signed): Likewise.
1347 (aarch64_emit_less_unsigned): Likewise.
1348 (aarch64_emit_ref): Likewise.
1349 (aarch64_emit_if_goto): Likewise.
1350 (aarch64_emit_goto): Likewise.
1351 (aarch64_write_goto_address): Likewise.
1352 (aarch64_emit_const): Likewise.
1353 (aarch64_emit_call): Likewise.
1354 (aarch64_emit_reg): Likewise.
1355 (aarch64_emit_pop): Likewise.
1356 (aarch64_emit_stack_flush): Likewise.
1357 (aarch64_emit_zero_ext): Likewise.
1358 (aarch64_emit_swap): Likewise.
1359 (aarch64_emit_stack_adjust): Likewise.
1360 (aarch64_emit_int_call_1): Likewise.
1361 (aarch64_emit_void_call_2): Likewise.
1362 (aarch64_emit_eq_goto): Likewise.
1363 (aarch64_emit_ne_goto): Likewise.
1364 (aarch64_emit_lt_goto): Likewise.
1365 (aarch64_emit_le_goto): Likewise.
1366 (aarch64_emit_gt_goto): Likewise.
1367 (aarch64_emit_ge_got): Likewise.
1368 (aarch64_emit_ops_impl): New static global variable.
1369 (aarch64_emit_ops): New target function, return
1370 &aarch64_emit_ops_impl.
1371 (struct linux_target_ops): Install it.
1372
bb903df0
PL
13732015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1374
1375 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1376 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1377 aarch64-ipa.o.
1378 * linux-aarch64-ipa.c: New file.
1379 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1380 and endian.h.
1381 (aarch64_get_thread_area): New target method.
1382 (extract_signed_bitfield): New helper function.
1383 (aarch64_decode_ldr_literal): New function.
1384 (enum aarch64_opcodes): New enum.
1385 (struct aarch64_register): New struct.
1386 (struct aarch64_operand): New struct.
1387 (x0): New static global.
1388 (x1): Likewise.
1389 (x2): Likewise.
1390 (x3): Likewise.
1391 (x4): Likewise.
1392 (w2): Likewise.
1393 (ip0): Likewise.
1394 (sp): Likewise.
1395 (xzr): Likewise.
1396 (aarch64_register): New helper function.
1397 (register_operand): Likewise.
1398 (immediate_operand): Likewise.
1399 (struct aarch64_memory_operand): New struct.
1400 (offset_memory_operand): New helper function.
1401 (preindex_memory_operand): Likewise.
1402 (enum aarch64_system_control_registers): New enum.
1403 (ENCODE): New macro.
1404 (emit_insn): New helper function.
1405 (emit_b): New function.
1406 (emit_bcond): Likewise.
1407 (emit_cb): Likewise.
1408 (emit_tb): Likewise.
1409 (emit_blr): Likewise.
1410 (emit_stp): Likewise.
1411 (emit_ldp_q_offset): Likewise.
1412 (emit_stp_q_offset): Likewise.
1413 (emit_load_store): Likewise.
1414 (emit_ldr): Likewise.
1415 (emit_ldrsw): Likewise.
1416 (emit_str): Likewise.
1417 (emit_ldaxr): Likewise.
1418 (emit_stxr): Likewise.
1419 (emit_stlr): Likewise.
1420 (emit_data_processing_reg): Likewise.
1421 (emit_data_processing): Likewise.
1422 (emit_add): Likewise.
1423 (emit_sub): Likewise.
1424 (emit_mov): Likewise.
1425 (emit_movk): Likewise.
1426 (emit_mov_addr): Likewise.
1427 (emit_mrs): Likewise.
1428 (emit_msr): Likewise.
1429 (emit_sevl): Likewise.
1430 (emit_wfe): Likewise.
1431 (append_insns): Likewise.
1432 (can_encode_int32_in): New helper function.
1433 (aarch64_relocate_instruction): New function.
1434 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1435 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1436 (struct linux_target_ops): Install aarch64_get_thread_area,
1437 aarch64_install_fast_tracepoint_jump_pad and
1438 aarch64_get_min_fast_tracepoint_insn_len.
1439
787749ea
PL
14402015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1441
1442 * Makefile.in (aarch64-insn.o): New rule.
1443 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1444
9812b2e6
YQ
14452015-09-21 Yao Qi <yao.qi@linaro.org>
1446
1447 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1448
18fe412b
YQ
14492015-09-21 Yao Qi <yao.qi@linaro.org>
1450
1451 * tracepoint.c (max_jump_pad_size): Remove.
1452
a0cc84cd
YQ
14532015-09-18 Yao Qi <yao.qi@linaro.org>
1454
1455 * linux-aarch64-low.c: Don't include sys/uio.h.
1456 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1457
d78908cf
WW
14582015-09-16 Wei-cheng Wang <cole945@gmail.com>
1459
1460 * tracepoint.c (eval_result_type): Change prototype.
1461 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1462
d57e0d50
PA
14632015-09-15 Pedro Alves <palves@redhat.com>
1464
1465 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1466 Check whether to report exec events instead of checking whether
1467 multiprocess is enabled.
1468
5a676acc
PA
14692015-09-15 Pedro Alves <palves@redhat.com>
1470
1471 PR remote/18965
1472 * remote-utils.c (prepare_resume_reply): Merge
1473 TARGET_WAITKIND_VFORK_DONE switch case with the
1474 TARGET_WAITKIND_FORKED case.
1475
7c5d0fad
YQ
14762015-09-15 Yao Qi <yao.qi@linaro.org>
1477
1478 * server.c (handle_query): Check string comparison using
1479 "else if" instead of "if".
1480
750ce8d1
YQ
14812015-09-15 Yao Qi <yao.qi@linaro.org>
1482
1483 * server.c (vCont_supported): New global variable.
1484 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1485 matches. Append ";vContSupported+" to own_buf.
1486 (handle_v_requests): Append ";s;S" to own_buf if target supports
1487 hardware single step or vCont_supported is false.
1488 (capture_main): Set vCont_supported to zero.
1489
70b90b91
YQ
14902015-09-15 Yao Qi <yao.qi@linaro.org>
1491
1492 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1493 it to ...
1494 (linux_supports_hardware_single_step): ... New function.
1495 (linux_target_ops): Update.
1496 * lynx-low.c (lynx_target_ops): Set field
1497 supports_hardware_single_step to target_can_do_hardware_single_step.
1498 * nto-low.c (nto_target_ops): Likewise.
1499 * spu-low.c (spu_target_ops): Likewise.
1500 * win32-low.c (win32_target_ops): Likewise.
1501 * target.c (target_can_do_hardware_single_step): New function.
1502 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1503 Remove. <supports_hardware_single_step>: New field.
1504 (target_supports_conditional_breakpoints): Remove.
1505 (target_supports_hardware_single_step): New macro.
1506 (target_can_do_hardware_single_step): Declare.
1507 * server.c (handle_query): Use target_supports_hardware_single_step
1508 instead of target_supports_conditional_breakpoints.
1509
ade90bde
YQ
15102015-09-15 Yao Qi <yao.qi@linaro.org>
1511
1512 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1513 function.
1514 (struct linux_target_ops the_low_target): Install
1515 aarch64_linux_siginfo_fixup.
1516
94585166
DB
15172015-09-11 Don Breazeal <donb@codesourcery.com>
1518 Luis Machado <lgustavo@codesourcery.com>
1519
1520 * linux-low.c (linux_mourn): Static declaration.
1521 (linux_arch_setup): Move in front of
1522 handle_extended_wait.
1523 (linux_arch_setup_thread): New function.
1524 (handle_extended_wait): Handle exec events. Call
1525 linux_arch_setup_thread. Make event_lwp argument a
1526 pointer-to-a-pointer.
1527 (check_zombie_leaders): Do not check stopped threads.
1528 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1529 (linux_low_filter_event): Add lwp and thread for exec'ing
1530 non-leader thread if leader thread has been deleted.
1531 Refactor code into linux_arch_setup_thread and call it.
1532 Pass child lwp pointer by reference to handle_extended_wait.
1533 (linux_wait_for_event_filtered): Update comment.
1534 (linux_wait_1): Prevent clobbering exec event status.
1535 (linux_supports_exec_events): New function.
1536 (linux_target_ops) <supports_exec_events>: Initialize new member.
1537 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1538 new member.
1539 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1540 * server.c (report_exec_events): New global variable.
1541 (handle_query): Handle qSupported query for exec-events feature.
1542 (captured_main): Initialize report_exec_events.
1543 * server.h (report_exec_events): Declare new global variable.
1544 * target.h (struct target_ops) <supports_exec_events>: New
1545 member.
1546 (target_supports_exec_events): New macro.
1547 * win32-low.c (win32_target_ops) <supports_exec_events>:
1548 Initialize new member.
1549
0568462b
MM
15502015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1551
1552 * linux-low.c (linux_low_enable_btrace): Remove.
1553 (linux_target_ops): Replace linux_low_enable_btrace with
1554 linux_enable_btrace.
1555
39edd165
YQ
15562015-09-03 Yao Qi <yao.qi@linaro.org>
1557
1558 * linux-aarch64-low.c (aarch64_insert_point): Call
1559 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1560 returns true.
1561
1db33b5a
UW
15622015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1563
1564 * linux-low.c (check_stopped_by_breakpoint): Use
1565 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1566
ab290430
PA
15672015-08-27 Pedro Alves <palves@redhat.com>
1568
1569 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1570
8d749320
SM
15712015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1572
6711b7f8
SM
1573 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1574 the XNEW-family equivalent.
8d749320
SM
1575 (compile_bytecodes): Likewise.
1576 * dll.c (loaded_dll): Likewise.
1577 * event-loop.c (append_callback_event): Likewise.
1578 (create_file_handler): Likewise.
1579 (create_file_event): Likewise.
1580 * hostio.c (handle_open): Likewise.
1581 * inferiors.c (add_thread): Likewise.
1582 (add_process): Likewise.
1583 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1584 * linux-arm-low.c (arm_new_process): Likewise.
1585 (arm_new_thread): Likewise.
1586 * linux-low.c (add_to_pid_list): Likewise.
1587 (linux_add_process): Likewise.
1588 (handle_extended_wait): Likewise.
1589 (add_lwp): Likewise.
1590 (enqueue_one_deferred_signal): Likewise.
1591 (enqueue_pending_signal): Likewise.
1592 (linux_resume_one_lwp_throw): Likewise.
1593 (linux_resume_one_thread): Likewise.
1594 (linux_read_memory): Likewise.
1595 (linux_write_memory): Likewise.
1596 * linux-mips-low.c (mips_linux_new_process): Likewise.
1597 (mips_linux_new_thread): Likewise.
1598 (mips_add_watchpoint): Likewise.
1599 * linux-x86-low.c (initialize_low_arch): Likewise.
1600 * lynx-low.c (lynx_add_process): Likewise.
1601 * mem-break.c (set_raw_breakpoint_at): Likewise.
1602 (set_breakpoint): Likewise.
1603 (add_condition_to_breakpoint): Likewise.
1604 (add_commands_to_breakpoint): Likewise.
1605 (clone_agent_expr): Likewise.
1606 (clone_one_breakpoint): Likewise.
1607 * regcache.c (new_register_cache): Likewise.
1608 * remote-utils.c (look_up_one_symbol): Likewise.
1609 * server.c (queue_stop_reply): Likewise.
1610 (start_inferior): Likewise.
1611 (queue_stop_reply_callback): Likewise.
1612 (handle_target_event): Likewise.
1613 * spu-low.c (fetch_ppc_memory): Likewise.
1614 (store_ppc_memory): Likewise.
1615 * target.c (set_target_ops): Likewise.
1616 * thread-db.c (thread_db_load_search): Likewise.
1617 (try_thread_db_load_1): Likewise.
1618 * tracepoint.c (add_tracepoint): Likewise.
1619 (add_tracepoint_action): Likewise.
1620 (create_trace_state_variable): Likewise.
1621 (cmd_qtdpsrc): Likewise.
1622 (cmd_qtro): Likewise.
1623 (add_while_stepping_state): Likewise.
1624 * win32-low.c (child_add_thread): Likewise.
1625 (get_image_name): Likewise.
1626
ed8b7b42
YQ
16272015-08-25 Yao Qi <yao.qi@linaro.org>
1628
1629 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1630
db3cb7cb
YQ
16312015-08-25 Yao Qi <yao.qi@linaro.org>
1632
1633 * Makefile.in (aarch64-linux.o): New rule.
1634 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1635 srv_tgtobj.
1636 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1637 (aarch64_init_debug_reg_state): Make it extern.
1638 (aarch64_linux_prepare_to_resume): Remove.
1639
f6011a1c
YQ
16402015-08-25 Yao Qi <yao.qi@linaro.org>
1641
1642 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1643 lwp_arch_private_info and ptid_of_lwp.
1644
88e2cf7e
YQ
16452015-08-25 Yao Qi <yao.qi@linaro.org>
1646
1647 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1648 Find proc_info by find_process_pid. All callers updated.
1649
5e35436e
YQ
16502015-08-25 Yao Qi <yao.qi@linaro.org>
1651
1652 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1653 Remove.
1654 (debug_reg_change_callback): Remove.
1655 (aarch64_notify_debug_reg_change): Remove.
1656
4a8a7965
YQ
16572015-08-25 Yao Qi <yao.qi@linaro.org>
1658
1659 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1660 Call current_lwp_ptid.
1661
32a271ee
YQ
16622015-08-25 Yao Qi <yao.qi@linaro.org>
1663
1664 * linux-aarch64-low.c (debug_reg_change_callback): Use
1665 debug_printf.
1666
0d51c8d7
YQ
16672015-08-25 Yao Qi <yao.qi@linaro.org>
1668
1669 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1670
31a43dd5
YQ
16712015-08-25 Yao Qi <yao.qi@linaro.org>
1672
1673 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1674
8ee52567
YQ
16752015-08-25 Yao Qi <yao.qi@linaro.org>
1676
1677 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1678 the code.
1679
ff3f0f45
YQ
16802015-08-25 Yao Qi <yao.qi@linaro.org>
1681
1682 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1683 Remove.
1684 (debug_reg_change_callback): Remove argument entry and add argument
1685 lwp. Remove local variable thread. Don't print thread id in the
1686 debugging output. Don't check whether pid of thread equals to pid.
1687 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1688 iterate_over_lwps instead find_inferior.
1689
3d40fbb5
PA
16902015-08-24 Pedro Alves <palves@redhat.com>
1691
1692 * inferiors.c (get_first_process): New function.
1693 * inferiors.h (get_first_process): New declaration.
1694 * remote-utils.c (read_ptid): Default to the first process in the
1695 list, instead of to the current thread's process.
1696
438e1e42
PA
16972015-08-24 Pedro Alves <palves@redhat.com>
1698
1699 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1700 * event-loop.c: Likewise.
1701 * remote-utils.c: Likewise.
1702 * tracepoint.c: Likewise.
1703
a8c6d4fc
PA
17042015-08-24 Pedro Alves <palves@redhat.com>
1705
1706 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1707 ptid_get_lwp.
1708
99b0bb12
PA
17092015-08-21 Pedro Alves <palves@redhat.com>
1710
1711 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1712 instead of literal 1.
1713
f8904751
PA
17142015-08-21 Pedro Alves <palves@redhat.com>
1715
1716 * tdesc.c (default_description): Explicitly zero-initialize.
1717
465a859e
PA
17182015-08-21 Pedro Alves <palves@redhat.com>
1719
1720 PR gdb/18749
1721 * inferiors.c (remove_thread): Discard any pending stop reply for
1722 this thread.
1723 * server.c (remove_all_on_match_pid): Rename to ...
1724 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1725 instead of a pid.
1726 (discard_queued_stop_replies): Change parameter to a ptid. Now
1727 extern.
1728 (handle_v_kill, kill_inferior_callback, captured_main)
1729 (process_serial_event): Adjust.
1730 * server.h (discard_queued_stop_replies): Declare.
1731
f0db101d
PA
17322015-08-21 Pedro Alves <palves@redhat.com>
1733
1734 * linux-low.c (wait_for_sigstop): Always switch to no thread
1735 selected if the previously current thread dies.
1736 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1737 process instead of the current thread's.
1738 * remote-utils.c (input_interrupt): Don't check if there's no
1739 current thread.
1740 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1741 current thread to the general thread fails, error out.
1742 (handle_qxfer_auxv, handle_qxfer_libraries)
1743 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1744 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1745 (handle_query): Check if there's a thread selected instead of
1746 checking whether there's any thread in the thread list.
1747 (handle_qxfer_threads, handle_qxfer_btrace)
1748 (handle_qxfer_btrace_conf): Don't error out early if there's no
1749 thread in the thread list.
1750 (handle_v_cont, myresume): Don't set the current thread to the
1751 continue thread.
1752 (process_serial_event) <Hg handling>: Also set thread_id if the
1753 previous general thread is still alive.
1754 (process_serial_event) <g/G handling>: If setting the current
1755 thread to the general thread fails, error out.
1756 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1757 thread's lwp instead of the current thread's.
1758 * target.c (set_desired_thread): If the desired thread was not
1759 found, leave the current thread pointing to NULL. Return an int
1760 (boolean) indicating success.
1761 * target.h (set_desired_thread): Change return type to int.
1762
40045d91
MF
17632015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1764
1765 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1766 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1767 #includes.
1768 (ps_get_thread_area): New function.
1769
45face3b
GB
17702015-08-19 Gary Benson <gbenson@redhat.com>
1771
1772 * hostio.c (handle_pread): Do not attempt to read more data
1773 than hostio_reply_with_data can fit in a packet.
1774
16d5f642
JB
17752015-08-18 Joel Brobecker <brobecker@adacore.com>
1776
1777 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1778
a738da3a
MF
17792015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1780
1781 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1782
33ebda9d
PA
17832015-08-06 Pedro Alves <palves@redhat.com>
1784
1785 * tracepoint.c (expr_eval_result): Now an int.
1786
a44892be
PA
17872015-08-06 Pedro Alves <palves@redhat.com>
1788
1789 * gdbthread.h (struct regcache): Forward declare.
1790 (struct thread_info) <regcache_data>: Now a struct regcache
1791 pointer.
1792 * inferiors.c (inferior_regcache_data)
1793 (set_inferior_regcache_data): Now work with struct regcache
1794 pointers.
1795 * inferiors.h (struct regcache): Forward declare.
1796 (inferior_regcache_data, set_inferior_regcache_data): Now work
1797 with struct regcache pointers.
1798 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1799 (free_register_cache_thread): Remove struct regcache pointer
1800 casts.
1801
608a1e46
PA
18022015-08-06 Pedro Alves <palves@redhat.com>
1803
1804 * server.c (captured_main): On error, print the exception message
1805 to stderr, and if run_once is set, throw a quit.
1806
f0ce0d3a
PA
18072015-08-06 Pedro Alves <palves@redhat.com>
1808
1809 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1810 the current thread.
1811
bf47e248
PA
18122015-08-06 Pedro Alves <palves@redhat.com>
1813
1814 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1815 reading beyond the passed in buffer length.
1816
b6b9ffcc
PL
18172015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1818
1819 * tracepoint.c (symbol_list) <required>: Remove.
1820
863d01bd
PA
18212015-08-06 Pedro Alves <palves@redhat.com>
1822
1823 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1824 count if stopping and suspending threads.
1825 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1826 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1827 (linux_detach): Complete an ongoing step-over.
1828 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1829 throughout.
1830 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1831 (linux_wait_1): If passing a signal to the inferior after
1832 finishing a step-over, unsuspend and re-resume all lwps. If we
1833 see a single-step event but the thread should be continuing, don't
1834 pass the trap to gdb.
1835 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1836 internal_error instead of gdb_assert.
1837 (enqueue_pending_signal): New function.
1838 (check_ptrace_stopped_lwp_gone): Add debug output.
1839 (start_step_over): Use internal_error instead of gdb_assert.
1840 (complete_ongoing_step_over): New function.
1841 (linux_resume_one_thread): Don't resume a suspended thread.
1842 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1843 it stepping.
1844
00db26fa
PA
18452015-08-06 Pedro Alves <palves@redhat.com>
1846
1847 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1848 (linux_thread_alive): Use lwp_is_marked_dead.
1849 (extended_event_reported): Delete.
1850 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1851 instead of extended_event_reported.
1852 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1853 as well.
1854 (lwp_is_marked_dead): New function.
1855 (lwp_running): Use lwp_is_marked_dead.
1856 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1857 comment.
1858
ad071a30
PA
18592015-08-06 Pedro Alves <palves@redhat.com>
1860
1861 * linux-low.c (linux_wait_1): Move fork event output out of the
1862 !report_to_gdb check. Pass event_child->waitstatus to
1863 target_waitstatus_to_string instead of ourstatus.
1864
524b57e6
YQ
18652015-08-04 Yao Qi <yao.qi@linaro.org>
1866
1867 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1868 if current_thread is 32 bit.
1869
6085d6f6
YQ
18702015-08-04 Yao Qi <yao.qi@linaro.org>
1871
1872 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1873 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1874 * server.c (extended_protocol): Remove "static".
1875 * server.h (extended_protocol): Declare it.
1876
8a7e4587
YQ
18772015-08-04 Yao Qi <yao.qi@linaro.org>
1878
1879 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1880 both aarch64 and aarch32.
1881 (aarch64_set_pc): Likewise.
1882
3b53ae99
YQ
18832015-08-04 Yao Qi <yao.qi@linaro.org>
1884
1885 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1886 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1887 arm-with-neon.xml to srv_xmlfiles.
1888 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1889 (is_64bit_tdesc): New function.
1890 (aarch64_linux_read_description): New function.
1891 (aarch64_arch_setup): Call aarch64_linux_read_description.
1892 (regs_info): Rename to regs_info_aarch64.
1893 (aarch64_regs_info): Return right regs_info.
1894 (initialize_low_arch): Call initialize_low_arch_aarch32.
1895
bd9e6534
YQ
18962015-08-04 Yao Qi <yao.qi@linaro.org>
1897
1898 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1899 * linux-aarch32-low.c: New file.
1900 * linux-aarch32-low.h: New file.
1901 * linux-arm-low.c (arm_fill_gregset): Move it to
1902 linux-aarch32-low.c.
1903 (arm_store_gregset): Likewise.
1904 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1905 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1906 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1907 (regs_info): Rename to regs_info_arm.
1908 (arm_regs_info): Return regs_info_aarch32 if
1909 have_ptrace_getregset is 1 and target description is
1910 arm_with_neon or arm_with_vfpv3.
1911 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1912 Call initialize_low_arch_aarch32 instead.
1913
ded48a5e
YQ
19142015-08-04 Yao Qi <yao.qi@linaro.org>
1915
1916 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1917 * linux-low.c: ... here.
1918 * linux-low.h (have_ptrace_getregset): Declare it.
1919
96e9210f
PA
19202015-08-04 Pedro Alves <palves@redhat.com>
1921
1922 * thread-db.c (struct thread_db): Use new typedefs.
1923 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1924 CHK calls.
1925 (disable_thread_event_reporting): Cast result of dlsym to
1926 destination function pointer type.
1927 (thread_db_mourn): Use td_ta_delete_ftype.
1928
af60a1ef
SL
19292015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1930
1931 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1932 arch variant.
1933 (CDX_BREAKPOINT): Define for R2.
1934 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1935 (the_low_target): Add comments.
1936
e8b41681
YQ
19372015-07-30 Yao Qi <yao.qi@linaro.org>
1938
1939 * linux-arm-low.c (arm_hwcap): Remove it.
1940 (arm_read_description): New local variable arm_hwcap. Don't
1941 set arm_hwcap to zero.
1942
89abb039
YQ
19432015-07-30 Yao Qi <yao.qi@linaro.org>
1944
1945 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1946 Use regcache->tdesc instead.
1947 (arm_store_wmmxregset): Likewise.
1948 (arm_fill_vfpregset): Likewise.
1949 (arm_store_vfpregset): Likewise.
1950
deca266c
YQ
19512015-07-30 Yao Qi <yao.qi@linaro.org>
1952
1953 * linux-arm-low.c: Include arch/arm.h.
1954 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1955 (arm_store_gregset): Likewise.
1956
aa58a496
SM
19572015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1958
1959 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1960 ptrace's 4th parameter.
1961
50904b25
YQ
19622015-07-27 Yao Qi <yao.qi@linaro.org>
1963
1964 * configure.srv (case aarch64*-*-linux*): Don't set
1965 srv_linux_usrregs.
1966
5826e159
PA
19672015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1968
1969 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1970 sys/ptrace.h.
1971 * linux-arm-low.c: Likewise.
1972 * linux-cris-low.c: Likewise.
1973 * linux-crisv32-low.c: Likewise.
1974 * linux-low.c: Likewise.
1975 * linux-m68k-low.c: Likewise.
1976 * linux-mips-low.c: Likewise.
1977 * linux-nios2-low.c: Likewise.
1978 * linux-s390-low.c: Likewise.
1979 * linux-sparc-low.c: Likewise.
1980 * linux-tic6x-low.c: Likewise.
1981 * linux-tile-low.c: Likewise.
1982 * linux-x86-low.c: Likewise.
1983
54019719
PA
19842015-07-24 Pedro Alves <palves@redhat.com>
1985
1986 * config.in: Regenerate.
1987 * configure: Regenerate.
1988
eb7aa561
PA
19892015-07-24 Pedro Alves <palves@redhat.com>
1990
1991 * acinclude.m4: Include ../ptrace.m4.
1992 * configure.ac: Call GDB_AC_PTRACE.
1993 * config.in, configure: Regenerate.
1994
55d7b841
YQ
19952015-07-24 Yao Qi <yao.qi@linaro.org>
1996
1997 * linux-low.c (linux_create_inferior): Remove setting to
1998 proc->priv->new_inferior.
1999 (linux_attach): Likewise.
2000 (linux_low_filter_event): Likewise.
2001 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2002
c06cbd92
YQ
20032015-07-24 Yao Qi <yao.qi@linaro.org>
2004
2005 * linux-low.c (linux_arch_setup): New function.
2006 (linux_low_filter_event): If proc->tdesc is NULL and
2007 proc->attached is true, call the_low_target.arch_setup.
2008 Otherwise, keep status pending, and return.
2009 (linux_resume_one_lwp_throw): Don't call get_pc if
2010 thread->while_stepping isn't NULL. Don't call
2011 get_thread_regcache if proc->tdesc is NULL.
2012 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2013 (linux_target_ops): Install arch_setup.
2014 * server.c (start_inferior): Call the_target->arch_setup.
2015 * target.h (struct target_ops) <arch_setup>: New field.
2016 (target_arch_setup): New marco.
2017 * lynx-low.c (lynx_target_ops): Update.
2018 * nto-low.c (nto_target_ops): Update.
2019 * spu-low.c (spu_target_ops): Update.
2020 * win32-low.c (win32_target_ops): Update.
2021
5ae3ebba
YQ
20222015-07-24 Yao Qi <yao.qi@linaro.org>
2023
2024 * linux-low.c (linux_add_process): Don't set
2025 proc->priv->new_inferior.
2026 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2027 (linux_attach): Likewise.
2028
eb97750b
YQ
20292015-07-24 Yao Qi <yao.qi@linaro.org>
2030
2031 * server.c (start_inferior): Code refactor.
2032
51aee833
YQ
20332015-07-24 Yao Qi <yao.qi@linaro.org>
2034
2035 * server.c (process_serial_event): Set general_thread.
2036
af1b22f3
YQ
20372015-07-21 Yao Qi <yao.qi@linaro.org>
2038
2039 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2040 aarch64_linux_get_debug_reg_capacity.
2041
554717a3
YQ
20422015-07-17 Yao Qi <yao.qi@linaro.org>
2043
2044 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2045 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2046 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2047 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2048 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2049 (AARCH64_HWP_ALIGNMENT): Likewise.
2050 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2051 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2052 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2053 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2054 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2055 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2056 (struct aarch64_debug_reg_state): Likewise.
2057 (struct arch_lwp_info): Likewise.
2058 (aarch64_align_watchpoint): Likewise.
2059 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2060 (aarch64_watchpoint_length): Likewise.
2061 (aarch64_point_encode_ctrl_reg): Likewise
2062 (aarch64_point_is_aligned): Likewise.
2063 (aarch64_align_watchpoint): Likewise.
2064 (aarch64_linux_set_debug_regs):
2065 (aarch64_dr_state_insert_one_point): Likewise.
2066 (aarch64_dr_state_remove_one_point): Likewise.
2067 (aarch64_handle_breakpoint): Likewise.
2068 (aarch64_handle_aligned_watchpoint): Likewise.
2069 (aarch64_handle_unaligned_watchpoint): Likewise.
2070 (aarch64_handle_watchpoint): Likewise.
2071
c67ca4de
YQ
20722015-07-17 Yao Qi <yao.qi@linaro.org>
2073
2074 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2075 and don't aarch64_get_debug_reg_state. All callers update.
2076 (aarch64_handle_aligned_watchpoint): Likewise.
2077 (aarch64_handle_unaligned_watchpoint): Likewise.
2078 (aarch64_handle_watchpoint): Likewise.
2079 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2080 (aarch64_remove_point): Likewise.
2081
25abf979
YQ
20822015-07-17 Yao Qi <yao.qi@linaro.org>
2083
2084 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2085 debug_printf.
2086 (aarch64_handle_unaligned_watchpoint): Likewise.
2087
db1ff28b
JK
20882015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2089
2090 Revert the previous 3 commits:
2091 Move gdb_regex* to common/
2092 Move linux_find_memory_regions_full & co.
2093 gdbserver build-id attribute generator
2094
700ca40f
JK
20952015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2096 Jan Kratochvil <jan.kratochvil@redhat.com>
2097
2098 gdbserver build-id attribute generator.
2099 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2100 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2101 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2102 (find_phdr): New.
2103 (get_dynamic): Use find_pdhr to traverse program headers.
2104 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2105 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2106 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2107 (get_hex_build_id): New.
2108 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2109 to reply XML document.
2110
9904185c
JK
21112015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2112 Jan Kratochvil <jan.kratochvil@redhat.com>
2113
2114 * target.c: Include target/target-utils.h and fcntl.h.
2115 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2116 (target_fileio_read_stralloc): New functions.
2117
6e5b4429
JK
21182015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2119
2120 * Makefile.in (OBS): Add gdb_regex.o.
2121 (gdb_regex.o): New.
2122 * config.in: Rebuilt.
2123 * configure: Rebuilt.
2124
ddc98fbf
JK
21252015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2126 Jan Kratochvil <jan.kratochvil@redhat.com>
2127
2128 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2129 * Makefile.in (OBS): Add target-utils.o.
2130 (linux-maps.o, target-utils.o): New.
2131 * configure.srv (srv_linux_obj): Add linux-maps.o.
2132
e57bb7a0
PL
21332015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2134
2135 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2136 function, return 1.
2137 (the_low_target): Install it.
2138
586b02a9
PA
21392015-07-14 Pedro Alves <palves@redhat.com>
2140
2141 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2142 Instead, ignore ECHILD, and throw an error for other errnos.
2143
58c1b36c
PA
21442015-07-10 Pedro Alves <palves@redhat.com>
2145
2146 * event-loop.c (struct callback_event) <data>: Change type to
2147 gdb_client_data instance instead of gdb_client_data pointer.
2148 (append_callback_event): Adjust.
2149
421530db
PL
21502015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2151
2152 * linux-aarch64-low.c: Add comments for each linux_target_ops
2153 method. Remove comments already covered in target_ops and
2154 linux_target_ops definitions.
2155 (the_low_target): Add comments for each unimplemented method.
2156
c2d65f38
YQ
21572015-07-09 Yao Qi <yao.qi@linaro.org>
2158
2159 * linux-aarch64-low.c (aarch64_regmap): Remove.
2160 (aarch64_usrregs_info): Remove.
2161 (regs_info): Set field usrregs to NULL.
2162
b20a6524
MM
21632015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2164
2165 * linux-low.c: Include "rsp-low.h"
2166 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2167 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2168 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2169 (handle_btrace_enable_pt): New.
2170 (handle_btrace_general_set): Support "pt".
2171 (handle_btrace_conf_general_set): Support "pt:size".
2172
96c97461
PL
21732015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2174
2175 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2176 Z_PACKET_SW_BP.
2177
37d66942
PL
21782015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2179
2180 * linux-aarch64-low.c: Remove comment about endianness.
2181 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2182 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2183 memcmp.
2184
dc06243f
GB
21852015-06-24 Gary Benson <gbenson@redhat.com>
2186
2187 * linux-i386-ipa.c (stdint.h): Do not include.
2188 * lynx-i386-low.c (stdint.h): Likewise.
2189 * lynx-ppc-low.c (stdint.h): Likewise.
2190 * mem-break.c (stdint.h): Likewise.
2191 * thread-db.c (stdint.h): Likewise.
2192 * tracepoint.c (stdint.h): Likewise.
2193 * win32-low.c (stdint.h): Likewise.
2194
124e13d9
SM
21952015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2196
2197 * server.c (write_qxfer_response): Update call to
2198 remote_escape_output.
2199
909c2cda
JK
22002015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2201 Jan Kratochvil <jan.kratochvil@redhat.com>
2202
2203 Merge multiple hex conversions.
2204 * gdbreplay.c (tohex): Rename to 'fromhex'.
2205 (logchar): Use fromhex.
2206
24c05f46
JK
22072015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2208
2209 * server.c (handle_qxfer_libraries): Set `version' attribute for
2210 <library-list>.
2211
14d2069a
GB
22122015-06-10 Gary Benson <gbenson@redhat.com>
2213
2214 * target.h (struct target_ops) <multifs_open>: New field.
2215 <multifs_unlink>: Likewise.
2216 <multifs_readlink>: Likewise.
2217 * linux-low.c (nat/linux-namespaces.h): New include.
2218 (linux_target_ops): Initialize the_target->multifs_open,
2219 the_target->multifs_unlink and the_target->multifs_readlink.
2220 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2221 * hostio.c (hostio_fs_pid): New static variable.
2222 (hostio_handle_new_gdb_connection): New function.
2223 (handle_setfs): Likewise.
2224 (handle_open): Use the_target->multifs_open as appropriate.
2225 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2226 (handle_readlink): Use the_target->multifs_readlink as
2227 appropriate.
2228 (handle_vFile): Handle vFile:setfs packets.
2229 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2230 after target_handle_new_gdb_connection.
2231
4b8b5e72
GB
22322015-06-10 Gary Benson <gbenson@redhat.com>
2233
2234 * configure.ac (AC_CHECK_FUNCS): Add setns.
2235 * config.in: Regenerate.
2236 * configure: Likewise.
2237 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2238 (linux-namespaces.o): New rule.
2239 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2240
3ac2e371
GB
22412015-06-09 Gary Benson <gbenson@redhat.com>
2242
2243 * hostio.c (handle_open): Process mode argument with
2244 fileio_to_host_mode.
2245
ca9b78ce
YQ
22462015-06-01 Yao Qi <yao.qi@linaro.org>
2247
2248 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2249 * linux-x86-low.c: Likewise.
2250
bfacd19d
DB
22512015-05-28 Don Breazeal <donb@codesourcery.com>
2252
2253 * linux-low.c (handle_extended_wait): Initialize
2254 thread_info.last_resume_kind for new fork children.
2255
452003ef
PA
22562015-05-15 Pedro Alves <palves@redhat.com>
2257
2258 * target.h (target_handle_new_gdb_connection): Rewrite using if
2259 wrapped in do/while.
2260
1041a03c
JB
22612015-05-14 Joel Brobecker <brobecker@adacore.com>
2262
2263 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2264 * configure, config.in: Regenerate.
2265 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2266 Declare typedef.
2267
c269dbdb
DB
22682015-05-12 Don Breazeal <donb@codesourcery.com>
2269
2270 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2271 PTRACE_EVENT_VFORK_DONE.
2272 (linux_low_ptrace_options, extended_event_reported): Add vfork
2273 events.
2274 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2275 and "vforkdone" for RSP 'T' Stop Reply Packet.
2276 * server.h (report_vfork_events): Declare
2277 global variable.
2278
3a8a0396
DB
22792015-05-12 Don Breazeal <donb@codesourcery.com>
2280
2281 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2282 (the_low_target) <new_fork>: Initialize new member.
2283 * linux-arm-low.c (arm_new_fork): New function.
2284 (the_low_target) <new_fork>: Initialize new member.
2285 * linux-low.c (handle_extended_wait): Call new target function
2286 new_fork.
2287 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2288 * linux-mips-low.c (mips_add_watchpoint): New function
2289 extracted from mips_insert_point.
2290 (the_low_target) <new_fork>: Initialize new member.
2291 (mips_linux_new_fork): New function.
2292 (mips_insert_point): Call mips_add_watchpoint.
2293 * linux-x86-low.c (x86_linux_new_fork): New function.
2294 (the_low_target) <new_fork>: Initialize new member.
2295
de0d863e
DB
22962015-05-12 Don Breazeal <donb@codesourcery.com>
2297
2298 * linux-low.c (handle_extended_wait): Implement return value,
2299 rename argument 'event_child' to 'event_lwp', handle
2300 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2301 (linux_low_ptrace_options): New function.
2302 (linux_low_filter_event): Call linux_low_ptrace_options,
2303 use different argument fo linux_enable_event_reporting,
2304 use return value from handle_extended_wait.
2305 (extended_event_reported): New function.
2306 (linux_wait_1): Call extended_event_reported and set
2307 status to report fork events.
2308 (linux_write_memory): Add pid to debug message.
2309 (reset_lwp_ptrace_options_callback): New function.
2310 (linux_handle_new_gdb_connection): New function.
2311 (linux_target_ops): Initialize new structure member.
2312 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2313 * lynx-low.c: Initialize new structure member.
2314 * remote-utils.c (prepare_resume_reply): Implement stop reason
2315 "fork" for "T" stop message.
2316 * server.c (handle_query): Call handle_new_gdb_connection.
2317 * server.h (report_fork_events): Declare global flag.
2318 * target.h (struct target_ops) <handle_new_gdb_connection>:
2319 New member.
2320 (target_handle_new_gdb_connection): New macro.
2321 * win32-low.c: Initialize new structure member.
2322
ddcbc397
DB
23232015-05-12 Don Breazeal <donb@codesourcery.com>
2324
2325 * mem-break.c (APPEND_TO_LIST): Define macro.
2326 (clone_agent_expr): New function.
2327 (clone_one_breakpoint): New function.
2328 (clone_all_breakpoints): New function.
2329 * mem-break.h: Declare new functions.
2330
89245bc0
DB
23312015-05-12 Don Breazeal <donb@codesourcery.com>
2332
2333 * linux-low.c (linux_supports_fork_events): New function.
2334 (linux_supports_vfork_events): New function.
2335 (linux_target_ops): Initialize new structure members.
2336 (initialize_low): Call linux_check_ptrace_features.
2337 * lynx-low.c (lynx_target_ops): Initialize new structure
2338 members.
2339 * server.c (report_fork_events, report_vfork_events):
2340 New global flags.
2341 (handle_query): Add new features to qSupported packet and
2342 response.
2343 (captured_main): Initialize new global variables.
2344 * target.h (struct target_ops) <supports_fork_events>:
2345 New member.
2346 <supports_vfork_events>: New member.
2347 (target_supports_fork_events): New macro.
2348 (target_supports_vfork_events): New macro.
2349 * win32-low.c (win32_target_ops): Initialize new structure
2350 members.
2351
835205d0
GB
23522015-05-12 Gary Benson <gbenson@redhat.com>
2353
2354 * server.c (handle_qxfer_exec_file): Use current process
2355 if annex is empty.
2356
21e94bd9
SL
23572015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2358
2359 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2360 Remove HAVE_PTRACE_GETREGS conditionals.
2361 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2362 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2363
45614f15
YQ
23642015-05-08 Yao Qi <yao.qi@linaro.org>
2365
2366 * linux-low.c (linux_supports_conditional_breakpoints): New
2367 function.
2368 (linux_target_ops): Install new target method.
2369 * lynx-low.c (lynx_target_ops): Install NULL hook for
2370 supports_conditional_breakpoints.
2371 * nto-low.c (nto_target_ops): Likewise.
2372 * spu-low.c (spu_target_ops): Likewise.
2373 * win32-low.c (win32_target_ops): Likewise.
2374 * server.c (handle_query): Check
2375 target_supports_conditional_breakpoints.
2376 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2377 New field.
2378 (target_supports_conditional_breakpoints): New macro.
2379
80ad801e
PA
23802015-05-06 Pedro Alves <palves@redhat.com>
2381
2382 PR server/18081
2383 * server.c (start_inferior): If the process exits, mourn it.
2384
819843c7
GB
23852015-04-21 Gary Benson <gbenson@redhat.com>
2386
2387 * hostio.c (fileio_open_flags_to_host): Factored out to
2388 fileio_to_host_openflags in common/fileio.c. Single use
2389 updated.
2390
a2d5a9d7
MF
23912015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2392
2393 * linux-xtensa-low.c (xtensa_fill_gregset)
2394 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2395 XCHAL_HAVE_LOOP.
2396
deb44829
MF
23972015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2398
2399 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2400 (regs_info): Replace usrregs pointer with NULL.
2401
e57f1de3
GB
24022015-04-17 Gary Benson <gbenson@redhat.com>
2403
2404 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2405 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2406 * server.c (handle_qxfer_exec_file): New function.
2407 (qxfer_packets): Add exec-file entry.
2408 (handle_query): Report qXfer:exec-file:read as supported packet.
2409
62828379
RN
24102015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2411
2412 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2413
b88bb450
GB
24142015-04-09 Gary Benson <gbenson@redhat.com>
2415
2416 * hostio-errno.c (errno_to_fileio_error): Remove function.
2417 Update caller to use remote_fileio_to_fio_error.
2418
c8f4bfdd
YQ
24192015-04-09 Yao Qi <yao.qi@linaro.org>
2420
2421 * linux-low.c (linux_insert_point): Call
2422 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2423 (linux_remove_point): Call remove_memory_breakpoint if type is
2424 raw_bkpt_type_sw.
2425 * linux-x86-low.c (x86_insert_point): Don't call
2426 insert_memory_breakpoint.
2427 (x86_remove_point): Don't call remove_memory_breakpoint.
2428
41f98f02
PA
24292015-04-01 Pedro Alves <palves@redhat.com>
2430 Cleber Rosa <crosa@redhat.com>
2431
2432 * server.c (gdbserver_usage): Reorganize and extend the usage
2433 message.
2434
2bf6fb9d
PA
24352015-03-24 Pedro Alves <palves@redhat.com>
2436
2437 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2438 output. Also dump TRAP_TRACE.
2439 (linux_low_filter_event): In debug output, distinguish a
2440 resume_stop SIGSTOP from a delayed SIGSTOP.
2441
369f6daa
GB
24422015-03-24 Gary Benson <gbenson@redhat.com>
2443
2444 * linux-x86-low.c (x86_linux_new_thread): Moved to
2445 nat/x86-linux.c.
2446 (x86_linux_prepare_to_resume): Likewise.
2447
8e5d4070
GB
24482015-03-24 Gary Benson <gbenson@redhat.com>
2449
2450 * Makefile.in (x86-linux-dregs.o): New rule.
2451 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2452 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2453 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2454 (x86_linux_dr_get): Likewise.
2455 (x86_linux_dr_set): Likewise.
2456 (update_debug_registers_callback): Likewise.
2457 (x86_linux_dr_set_addr): Likewise.
2458 (x86_linux_dr_get_addr): Likewise.
2459 (x86_linux_dr_set_control): Likewise.
2460 (x86_linux_dr_get_control): Likewise.
2461 (x86_linux_dr_get_status): Likewise.
2462 (x86_linux_update_debug_registers): Likewise.
2463
2b95d440
GB
24642015-03-24 Gary Benson <gbenson@redhat.com>
2465
2466 * linux-x86-low.c (x86_linux_update_debug_registers):
2467 New function, factored out from...
2468 (x86_linux_prepare_to_resume): ...this.
2469
14b0bc68
GB
24702015-03-24 Gary Benson <gbenson@redhat.com>
2471
2472 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2473 (x86_linux_dr_set): Likewise.
2474 (update_debug_registers_callback): Likewise.
2475 (x86_linux_dr_set_addr): Likewise.
2476 (x86_linux_dr_get_addr): Likewise.
2477 (x86_linux_dr_set_control): Likewise.
2478 (x86_linux_dr_get_control): Likewise.
2479 (x86_linux_dr_get_status): Likewise.
2480 (x86_linux_prepare_to_resume): Likewise.
2481
5dfe6ca8
GB
24822015-03-24 Gary Benson <gbenson@redhat.com>
2483
2484 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2485 Use perror_with_name. Pass string through gettext.
2486 (x86_linux_dr_set): Likewise.
2487
d33472ad
GB
24882015-03-24 Gary Benson <gbenson@redhat.com>
2489
2490 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2491 (x86_linux_dr_set_addr): ...this.
2492 (x86_dr_low_get_addr): Rename to...
2493 (x86_linux_dr_get_addr): ...this.
2494 (x86_dr_low_set_control): Rename to...
2495 (x86_linux_dr_set_control): ...this.
2496 (x86_dr_low_get_control): Rename to...
2497 (x86_linux_dr_get_control): ...this.
2498 (x86_dr_low_get_status): Rename to...
2499 (x86_linux_dr_get_status): ...this.
2500 (x86_dr_low): Update with new function names.
2501
4b134ca1
GB
25022015-03-24 Gary Benson <gbenson@redhat.com>
2503
2504 * Makefile.in (x86-linux.o): New rule.
2505 * configure.srv: Add x86-linux.o to relevant targets.
2506 * linux-low.c (lwp_set_arch_private_info): New function.
2507 (lwp_arch_private_info): Likewise.
2508 * linux-x86-low.c: Include nat/x86-linux.h.
2509 (arch_lwp_info): Removed structure.
2510 (update_debug_registers_callback):
2511 Use lwp_set_debug_registers_changed.
2512 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2513 and lwp_set_debug_registers_changed.
2514 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2515
34c703da
GB
25162015-03-24 Gary Benson <gbenson@redhat.com>
2517
2518 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2519 * linux-arm-low.c (arm_new_thread): Likewise.
2520 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2521 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2522 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2523 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2524
cff068da
GB
25252015-03-24 Gary Benson <gbenson@redhat.com>
2526
2527 * linux-low.c (ptid_of_lwp): New function.
2528 (lwp_is_stopped): Likewise.
2529 (lwp_stop_reason): Likewise.
2530 * linux-x86-low.c (update_debug_registers_callback):
2531 Use lwp_is_stopped.
2532 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2533 lwp_stop_reason.
2534
b2f7c7e8
GB
25352015-03-24 Gary Benson <gbenson@redhat.com>
2536
2537 * linux-low.h (linux_stop_lwp): Remove declaration.
2538
6d4ee8c6
GB
25392015-03-24 Gary Benson <gbenson@redhat.com>
2540
2541 * linux-low.h: Include nat/linux-nat.h.
2542 * linux-low.c (iterate_over_lwps_args): New structure.
2543 (iterate_over_lwps_filter): New function.
2544 (iterate_over_lwps): Likewise.
2545 * linux-x86-low.c (update_debug_registers_callback):
2546 Update signature to what iterate_over_lwps expects.
2547 Remove PID check that iterate_over_lwps now performs.
2548 (x86_dr_low_set_addr): Use iterate_over_lwps.
2549 (x86_dr_low_set_control): Likewise.
2550
70a0bb6b
GB
25512015-03-24 Gary Benson <gbenson@redhat.com>
2552
2553 * linux-x86-low.c (x86_debug_reg_state): New function.
2554 (x86_linux_prepare_to_resume): Use the above.
2555
7b669087
GB
25562015-03-24 Gary Benson <gbenson@redhat.com>
2557
2558 * linux-low.c (current_lwp_ptid): New function.
2559 * linux-x86-low.c: Include nat/linux-nat.h.
2560 (x86_dr_low_get_addr): Use current_lwp_ptid.
2561 (x86_dr_low_get_control): Likewise.
2562 (x86_dr_low_get_status): Likewise.
2563
eef49a3d
PA
25642015-03-20 Pedro Alves <palves@redhat.com>
2565
2566 * tracepoint.c (cmd_qtstatus): Make "str" const.
2567
b2333d22
PA
25682015-03-20 Pedro Alves <palves@redhat.com>
2569
2570 * server.c (handle_general_set): Make "req_str" const.
2571
23f238d3
PA
25722015-03-19 Pedro Alves <palves@redhat.com>
2573
2574 * linux-low.c (linux_resume_one_lwp): Rename to ...
2575 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2576 instead call perror_with_name.
2577 (check_ptrace_stopped_lwp_gone): New function.
2578 (linux_resume_one_lwp): Reimplement as wrapper around
2579 linux_resume_one_lwp_throw that swallows errors if the LWP is
2580 gone.
2581
91baf43f
PA
25822015-03-19 Pedro Alves <palves@redhat.com>
2583
2584 * linux-low.c (count_events_callback, select_event_lwp_callback):
2585 No longer check whether the thread has resume_stop as last resume
2586 kind.
2587
8bf3b159
PA
25882015-03-19 Pedro Alves <palves@redhat.com>
2589
2590 * linux-low.c (count_events_callback, select_event_lwp_callback):
2591 Use the lwp's status_pending_p field, not the thread's.
2592
b90fc188
PA
25932015-03-19 Pedro Alves <palves@redhat.com>
2594
2595 * linux-low.c (select_event_lwp_callback): Update comments to
2596 no longer mention SIGTRAP.
2597
464b0089
GB
25982015-03-18 Gary Benson <gbenson@redhat.com>
2599
2600 * server.c (handle_query): Do not report vFile:fstat as supported.
2601
aa9e327f
GB
26022015-03-11 Gary Benson <gbenson@redhat.com>
2603
2604 * hostio.c (sys/types.h): New include.
2605 (sys/stat.h): Likewise.
2606 (common-remote-fileio.h): Likewise.
2607 (handle_fstat): New function.
2608 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2609
791c0056
GB
26102015-03-11 Gary Benson <gbenson@redhat.com>
2611
2612 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2613 struct stat.st_blocks and struct stat.st_blksize.
2614 * configure: Regenerate.
2615 * config.in: Likewise.
2616 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2617 (OBS): Add common-remote-fileio.o.
2618 (common-remote-fileio.o): New rule.
2619
9a9df970
PA
26202015-03-09 Pedro Alves <palves@redhat.com>
2621
2622 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2623 'struct sockaddr' pointer in 'accept' call.
2624
9eb1356e
PA
26252015-03-09 Pedro Alves <palves@redhat.com>
2626
2627 Revert:
2628 2015-03-07 Pedro Alves <palves@redhat.com>
2629 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2630 or <winsock2.h> here. Instead include "gdb_socket.h".
2631 (remote_open): Use union gdb_sockaddr_u.
2632 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2633 or <winsock2.h> here. Instead include "gdb_socket.h".
2634 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2635 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2636 or <sys/un.h>.
2637 (init_named_socket, gdb_agent_helper_thread): Use union
2638 gdb_sockaddr_u.
2639
aac331e4
PA
26402015-03-07 Pedro Alves <palves@redhat.com>
2641
2642 * configure.ac (build_warnings): Move
2643 -Wdeclaration-after-statement to the C-specific set.
2644 * configure: Regenerate.
2645
366c75fc
PA
26462015-03-07 Pedro Alves <palves@redhat.com>
2647
2648 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2649 or <winsock2.h> here. Instead include "gdb_socket.h".
2650 (remote_open): Use union gdb_sockaddr_u.
2651 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2652 or <winsock2.h> here. Instead include "gdb_socket.h".
2653 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2654 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2655 or <sys/un.h>.
2656 (init_named_socket, gdb_agent_helper_thread): Use union
2657 gdb_sockaddr_u.
2658
492d29ea
PA
26592015-03-07 Pedro Alves <palves@redhat.com>
2660
2661 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2662 instead.
2663
60a191ed
YQ
26642015-03-06 Yao Qi <yao.qi@linaro.org>
2665
2666 * linux-aarch64-low.c (aarch64_insert_point): Use
2667 show_debug_regs as a boolean.
2668 (aarch64_remove_point): Likewise.
2669
f5771b1d
PA
26702015-03-05 Pedro Alves <palves@redhat.com>
2671
2672 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2673 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2674 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2675 * nto-low.c (nto_target_ops): Likewise.
2676 * spu-low.c (spu_target_ops): Likewise.
2677 * win32-low.c (win32_target_ops): Likewise.
2678
3e572f71
PA
26792015-03-04 Pedro Alves <palves@redhat.com>
2680
72f4393d 2681 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2682 Decide whether a breakpoint triggered based on the SIGTRAP's
2683 siginfo.si_code.
72f4393d
L
2684 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2685 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2686 (linux_low_filter_event): Check for breakpoints before checking
2687 watchpoints.
2688 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2689 siginfo.si_code.
72f4393d
L
2690 (linux_stopped_by_sw_breakpoint)
2691 (linux_supports_stopped_by_sw_breakpoint)
2692 (linux_stopped_by_hw_breakpoint)
2693 (linux_supports_stopped_by_hw_breakpoint): New functions.
2694 (linux_target_ops): Install new target methods.
3e572f71 2695
1ec68e26
PA
26962015-03-04 Pedro Alves <palves@redhat.com>
2697
2698 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2699 * server.c (swbreak_feature, hwbreak_feature): New globals.
2700 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2701 (captured_main): Clear swbreak_feature and hwbreak_feature.
2702 * server.h (swbreak_feature, hwbreak_feature): Declare.
2703 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2704 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2705 supports_stopped_by_hw_breakpoint>: New fields.
2706 (target_supports_stopped_by_sw_breakpoint)
2707 (target_stopped_by_sw_breakpoint)
2708 (target_supports_stopped_by_hw_breakpoint)
2709 (target_stopped_by_hw_breakpoint): Declare.
2710
15c66dd6
PA
27112015-03-04 Pedro Alves <palves@redhat.com>
2712
2713 enum lwp_stop_reason -> enum target_stop_reason
2714 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2715 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2716 (linux_wait_1, stuck_in_jump_pad_callback)
2717 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2718 (linux_stopped_by_watchpoint):
2719 * linux-low.h (enum lwp_stop_reason): Delete.
2720 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2721 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2722
98fc70d6
YQ
27232015-03-04 Yao Qi <yao.qi@linaro.org>
2724
2725 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2726
dd2ac174
GB
27272015-03-03 Gary Benson <gbenson@redhat.com>
2728
2729 * hostio.c (handle_vFile): Fix prefix lengths.
2730
d68e53f4
MM
27312015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2732
2733 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2734 ptr_bits.
2735
bf2d68ab
AA
27362015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2737
2738 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2739 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2740 (clean): Add "rm -f" for above C files.
2741 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2742 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2743 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2744 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2745 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2746 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2747 (init_registers_s390x_vx_linux64)
2748 (init_registers_s390x_tevx_linux64)
2749 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2750 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2751 declarations.
2752 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2753 (s390_store_vxrs_high): New functions.
2754 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2755 NT_S390_VXRS_HIGH.
2756 (s390_arch_setup): Add logic for selecting one of the new target
2757 descriptions. Activate the new vector regsets if applicable.
2758 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2759 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2760 and init_registers_s390x_tevx_linux64.
2761
c966a859
PA
27622015-03-01 Pedro Alves <palves@redhat.com>
2763
2764 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2765 parameter.
2766
4180215b
PA
27672015-02-27 Pedro Alves <palves@redhat.com>
2768
2769 * linux-x86-low.c (u_debugreg_offset): New function.
2770 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2771
749bab01
PA
27722015-02-27 Pedro Alves <palves@redhat.com>
2773
2774 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2775 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2776 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2777 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2778 (ps_lsetfpregs, ps_getpid)
2779 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2780 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2781 (ps_lsetxregs, ps_plog): Declare.
2782
3c14e5a3
PA
27832015-02-27 Pedro Alves <palves@redhat.com>
2784
2785 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2786 IP_AGENT_EXPORT_FUNC.
2787 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2788 IP_AGENT_EXPORT_FUNC.
2789 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2790 (IP_AGENT_EXPORT): Delete.
2791 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2792 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2793 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2794 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2795 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2796 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2797 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2798 (traceframe_read_count, traceframe_write_count)
2799 (traceframes_created, trace_state_variables, get_raw_reg)
2800 (get_trace_state_variable_value, set_trace_state_variable_value)
2801 (ust_loaded, helper_thread_id, cmd_buf): Use
2802 IPA_SYM_EXPORTED_NAME.
2803 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2804 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2805 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2806 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2807 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2808 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2809 EXTERN_C_PUSH/EXTERN_C_POP.
2810 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2811 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2812 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2813 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2814 (traceframe_write_count, traceframe_read_count)
2815 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2816 (about_to_request_buffer_space, get_trace_state_variable_value)
2817 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2818 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2819 EXTERN_C_PUSH/EXTERN_C_POP.
2820 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2821 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2822 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2823 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2824 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2825 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2826 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2827 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2828 Define.
2829 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2830 (IP_AGENT_EXPORT_VAR_DECL): Define.
2831 (tracing): Declare.
2832 (gdb_agent_get_raw_reg): Declare.
2833
fe978cb0
PA
28342015-02-27 Tom Tromey <tromey@redhat.com>
2835 Pedro Alves <palves@redhat.com>
2836
2837 Rename symbols whose names are reserved C++ keywords throughout.
2838
3bc3d82a
PA
28392015-02-27 Pedro Alves <palves@redhat.com>
2840
2841 * Makefile.in (COMPILER): New, get it from autoconf.
2842 (CXX): Get from autoconf instead.
2843 (COMPILE.pre): Use COMPILER.
2844 (CC-LD): Rename to ...
2845 (CC_LD): ... this. Use COMPILER.
2846 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2847 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2848 * acinclude.m4: Include build-with-cxx.m4.
2849 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2850 Disable -Werror by default if building in C++ mode.
2851 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2852 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2853 the C++ compiler. Save/restore CXXFLAGS too.
2854 * configure: Regenerate.
2855
07697489
PA
28562015-02-27 Pedro Alves <palves@redhat.com>
2857
2858 * acinclude.m4: Include libiberty.m4.
2859 * configure.ac: Call libiberty_INIT.
2860 * config.in, configure: Regenerate.
2861
9beb7c4e
PA
28622015-02-26 Pedro Alves <palves@redhat.com>
2863
2864 * linux-low.c (linux_wait_1): When incrementing the PC past a
2865 program breakpoint always use the_low_target.breakpoint_len as
2866 increment, rather than the maximum between that and
2867 the_low_target.decr_pc_after_break.
2868
8090aef2
PA
28692015-02-23 Pedro Alves <palves@redhat.com>
2870
2871 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2872 thread was doing a step-over; always adjust the PC if
2873 we stepped over a permanent breakpoint.
2874 (linux_wait_1): If we stepped over breakpoint that was on top of a
2875 permanent breakpoint, manually advance the PC past it.
2876
bc9540e8
PA
28772015-02-23 Pedro Alves <palves@redhat.com>
2878
2879 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2880 modes.
2881 (x86_fill_gregset, x86_store_gregset): Use it when handling
2882 $orig_eax.
2883
2db9a427
PA
28842015-02-20 Pedro Alves <palves@redhat.com>
2885
2886 * thread-db.c: Include "nat/linux-procfs.h".
2887 (thread_db_init): Skip listing new threads if the kernel supports
2888 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2889
afa8d396
PA
28902015-02-20 Pedro Alves <palves@redhat.com>
2891
2892 * linux-low.c (status_pending_p_callback): Use ptid_match.
2893
c9587f88
AT
28942015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2895
2896 PR breakpoints/16812
2897 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2898 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2899 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2900
b05ec7a5
AT
29012015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2902
2903 PR breakpoints/15956
2904 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2905
d33501a5
MM
29062015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2907
2908 * linux-low.c (linux_low_btrace_conf): Print size.
2909 * server.c (handle_btrace_conf_general_set): New.
2910 (hanle_general_set): Call handle_btrace_conf_general_set.
2911 (handle_query): Report Qbtrace-conf:bts:size as supported.
2912
f4abbc16
MM
29132015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2914
2915 * linux-low.c (linux_low_enable_btrace): Update parameters.
2916 (linux_low_btrace_conf): New.
2917 (linux_target_ops)<to_btrace_conf>: Initialize.
2918 * server.c (current_btrace_conf): New.
2919 (handle_btrace_enable): Rename to ...
2920 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2921 to target_enable_btrace. Update comment. Update users.
2922 (handle_qxfer_btrace_conf): New.
2923 (qxfer_packets): Add btrace-conf entry.
2924 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2925 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2926 (target_ops)<read_btrace_conf>: New.
2927 (target_enable_btrace): Update parameters.
2928 (target_read_btrace_conf): New.
2929
043c3577
MM
29302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2931
2932 * server.c (handle_btrace_general_set): Remove call to
2933 target_supports_btrace.
2934 (supported_btrace_packets): New.
2935 (handle_query): Call supported_btrace_packets.
2936 * target.h: include btrace-common.h.
2937 (btrace_target_info): Removed.
2938 (supports_btrace, target_supports_btrace): Update parameters.
2939
734b0e4b
MM
29402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2941
2942 * Makefile.in (SFILES): Add common/btrace-common.c.
2943 (OBS): Add common/btrace-common.o.
2944 (btrace-common.o): Add build rules.
2945 * linux-low: Include btrace-common.h.
2946 (linux_low_read_btrace): Use struct btrace_data. Call
2947 btrace_data_init and btrace_data_fini.
2948
d6c146e9
PA
29492015-02-06 Pedro Alves <palves@redhat.com>
2950
2951 * thread-db.c (find_new_threads_callback): Add debug output.
2952
20ba1ce6
PA
29532015-02-04 Pedro Alves <palves@redhat.com>
2954
2955 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2956 (resume_stopped_resumed_lwps): New function.
2957 (linux_wait_for_event_filtered): Use it.
2958
8cc73a39
SDJ
29592015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2960
2961 * Makefile.in (SFILES): Add linux-personality.c.
2962 (linux-personality.o): New rule.
2963 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2964 list of objects to be built.
2965 * linux-low.c: Include nat/linux-personality.h.
2966 (linux_create_inferior): Remove code to disable address space
2967 randomization (moved to ../nat/linux-personality.c). Create
2968 cleanup to disable address space randomization.
2969
fb23d554
SDJ
29702015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2971
2972 * Makefile.in (posix-strerror.o): New rule.
2973 (mingw-strerror.o): Likewise.
2974 * configure: Regenerated.
2975 * configure.ac: Source file ../common/common.host. Initialize new
2976 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2977
cdf43629
YQ
29782015-01-14 Yao Qi <yao@codesourcery.com>
2979
2980 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2981 (ppc-linux.o): New rule.
2982 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2983 * configure.ac: AC_CHECK_FUNCS(getauxval).
2984 * config.in: Re-generated.
2985 * configure: Re-generated.
2986 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2987 ppc64_64bit_inferior_p
2988
514c5338
YQ
29892015-01-14 Yao Qi <yao@codesourcery.com>
2990
2991 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2992 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2993 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2994 (PT_ORIG_R3, PT_TRAP): Likewise.
2995 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2996 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2997 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2998
3368c1e5
JB
29992015-01-10 Joel Brobecker <brobecker@adacore.com>
3000
3001 * i387-fp.c (i387_cache_to_xsave): In look over
3002 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3003 zmmh_low_space field by use of zmmh_high_space.
3004
582511be
PA
30052015-01-09 Pedro Alves <palves@redhat.com>
3006
3007 * linux-low.c (step_over_bkpt): Move higher up in the file.
3008 (handle_extended_wait): Don't store the stop_pc here.
3009 (get_stop_pc): Adjust comments and rename to ...
3010 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3011 stopped for a software breakpoint or hardware breakpoint.
3012 (thread_still_has_status_pending_p): New function.
3013 (status_pending_p_callback): Use
3014 thread_still_has_status_pending_p. If the event is no longer
3015 interesting, resume the LWP.
3016 (handle_tracepoints): Add assert.
3017 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3018 (wstatus_maybe_breakpoint): New function.
3019 (cancel_breakpoint): Delete function.
3020 (check_stopped_by_watchpoint): New function, factored out from
3021 linux_low_filter_event.
3022 (lp_status_maybe_breakpoint): Delete function.
3023 (linux_low_filter_event): Remove filter_ptid argument.
3024 Leave thread group exits pending here. Store the LWP's stop PC.
3025 Always leave events pending.
3026 (linux_wait_for_event_filtered): Pull all events out of the
3027 kernel, and leave them all pending.
3028 (count_events_callback, select_event_lwp_callback): Consider all
3029 events.
3030 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3031 (select_event_lwp): Only give preference to the stepping LWP in
3032 all-stop mode. Adjust comments.
3033 (ignore_event): New function.
3034 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3035 references to cancel_breakpoints. Adjust to renames. Also give
3036 equal priority to all LWPs that have had events in non-stop mode.
3037 If reporting a software breakpoint event, unadjust the LWP's PC.
3038 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3039 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3040 Adjust.
3041 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3042 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3043 (linux_stopped_by_watchpoint): Adjust.
3044 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3045 * linux-low.h (enum lwp_stop_reason): New.
3046 (struct lwp_info) <stop_pc>: Adjust comment.
3047 <stopped_by_watchpoint>: Delete field.
3048 <stop_reason>: New field.
3049 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3050 * mem-break.c (software_breakpoint_inserted_here)
3051 (hardware_breakpoint_inserted_here): New function.
3052 * mem-break.h (software_breakpoint_inserted_here)
3053 (hardware_breakpoint_inserted_here): Declare.
3054 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3055 (cancel_breakpoints): Delete.
3056 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3057 (upload_fast_traceframes): Remove references to
3058 cancel_breakpoints.
3059
a33e3959
PA
30602015-01-09 Pedro Alves <palves@redhat.com>
3061
3062 * thread-db.c (find_new_threads_callback): Ignore thread if the
3063 kernel thread ID is -1.
3064
8784d563
PA
30652015-01-09 Pedro Alves <palves@redhat.com>
3066
3067 * linux-low.c (linux_attach_fail_reason_string): Move to
3068 nat/linux-ptrace.c, and rename.
3069 (linux_attach_lwp): Update comment.
3070 (attach_proc_task_lwp_callback): New function.
3071 (linux_attach): Adjust to rename and use
3072 linux_proc_attach_tgid_threads.
3073 (linux_attach_fail_reason_string): Delete declaration.
3074
76f2b779
JB
30752015-01-01 Joel Brobecker <brobecker@adacore.com>
3076
3077 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3078 * server.c (gdbserver_version): Likewise.
3079
fafcc06a
SDJ
30802014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3081
3082 * remote-utils.c: Include ctype.h.
3083 (input_interrupt): Explicitly handle the case when the char
3084 received is the NUL byte. Improve the printing of non-ASCII
3085 characters.
3086
beed38b8
JB
30872014-12-16 Joel Brobecker <brobecker@adacore.com>
3088
3089 * linux-low.c (linux_low_filter_event): Update call to
3090 linux_enable_event_reporting following the addition of
3091 a new parameter to that function.
3092
bf330350
CU
30932014-12-16 Catalin Udma <catalin.udma@freescale.com>
3094
3095 PR server/17457
3096 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3097 (AARCH64_FPCR_REGNO): Likewise.
3098 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3099 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3100 (aarch64_store_fpregset): Likewise.
3101
5227d625
JB
31022014-12-15 Joel Brobecker <brobecker@adacore.com>
3103
3104 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3105 Remove FIXME comment about assumption about N.
3106
f93b65a0
JB
31072014-12-13 Joel Brobecker <brobecker@adacore.com>
3108
3109 * configure.ac: If large-file support is disabled in GDBserver,
3110 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3111 * configure: Regenerate.
3112
e5a9158d
AA
31132014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3114
3115 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3116 warning upon ENODATA from ptrace.
3117 * linux-s390-low.c (s390_store_tdb): New.
3118 (s390_regsets): Add regset for NT_S390_TDB.
3119
feea5f36
AA
31202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3121
3122 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3123 without a fill_function.
3124 * linux-s390-low.c (s390_fill_last_break): Remove.
3125 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3126 (s390_arch_setup): Use regset's size instead of fill_function for
3127 loop end condition.
3128
098dbe61
AA
31292014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3130
3131 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3132 the regset's store function when ptrace returned an error.
3133 * regcache.c (get_thread_regcache): Invalidate register cache
3134 before fetching inferior's registers.
3135
28eef672
AA
31362014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3137
3138 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3139 while-loop as for-loop.
3140 (regsets_store_inferior_registers): Likewise.
3141
bdca27a2
YQ
31422014-11-28 Yao Qi <yao@codesourcery.com>
3143
3144 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3145 * config.in, configure: Re-generate.
3146 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3147 is defined.
3148
9c232dda
YQ
31492014-11-21 Yao Qi <yao@codesourcery.com>
3150
3151 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3152 (AC_CHECK_HEADERS): Remove malloc.h.
3153 * configure: Re-generated.
3154 * config.in: Re-generated.
3155 * server.h: Don't include alloca.h and malloc.h.
3156 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3157 Don't include malloc.h.
3158
43968415
JB
31592014-11-17 Joel Brobecker <brobecker@adacore.com>
3160
3161 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3162 corresponding ERRNO check in same block.
3163
40e91bc7
PA
31642014-11-12 Pedro Alves <palves@redhat.com>
3165
3166 * server.c (cont_thread): Update comment.
3167 (start_inferior, attach_inferior): No longer clear cont_thread.
3168 (handle_v_cont): No longer set cont_thread.
3169 (captured_main): Clear cont_thread each time a GDB connects.
3170
c2c118cf
PA
31712014-11-12 Pedro Alves <palves@redhat.com>
3172
3173 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3174 thread, and don't resume all threads if the Hc thread has exited.
3175
78708b7c
PA
31762014-11-12 Pedro Alves <palves@redhat.com>
3177
3178 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3179 the process group instead of to a specific LWP.
3180
a2abc7de
PA
31812014-10-15 Pedro Alves <palves@redhat.com>
3182
3183 PR server/17487
3184 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3185 parameter.
3186 (arm_set_thread_context): Delete.
3187 (the_low_target): Adjust.
3188 * win32-i386-low.c (debug_registers_changed)
3189 (debug_registers_used): Delete.
3190 (update_debug_registers_callback): New function.
3191 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3192 needing to update their debug registers.
3193 (win32_get_current_dr): New function.
3194 (x86_dr_low_get_addr, x86_dr_low_get_control)
3195 (x86_dr_low_get_status): Fetch the debug register from the thread
3196 record's context.
3197 (i386_initial_stuff): Adjust.
3198 (i386_get_thread_context): Remove current_event parameter. Don't
3199 clear debug_registers_changed nor copy DR values to
3200 debug_reg_state.
3201 (i386_set_thread_context): Delete.
3202 (i386_prepare_to_resume): New function.
3203 (i386_thread_added): Mark the thread as needing to update irs
3204 debug registers.
3205 (the_low_target): Remove i386_set_thread_context and install
3206 i386_prepare_to_resume.
3207 * win32-low.c (win32_get_thread_context): Adjust.
3208 (win32_set_thread_context): Use SetThreadContext
3209 directly.
3210 (win32_prepare_to_resume): New function.
3211 (win32_require_context): New function, factored out from ...
3212 (thread_rec): ... this.
3213 (continue_one_thread): Call win32_prepare_to_resume on each thread
3214 we're about to continue.
3215 (win32_resume): Call win32_prepare_to_resume on the event thread.
3216 * win32-low.h (struct win32_thread_info)
3217 <debug_registers_changed>: New field.
3218 (struct win32_target_ops): Change prototype of set_thread_context,
3219 delete set_thread_context and add prepare_to_resume.
3220 (win32_require_context): New declaration.
3221
a442d071
GB
32222014-10-08 Gary Benson <gbenson@redhat.com>
3223
3224 * server.h: Do not include common-exceptions.h.
3225
6f1947e8
GB
32262014-10-08 Gary Benson <gbenson@redhat.com>
3227
3228 * server.h: Do not include cleanups.h.
3229
63b434a4
JH
32302014-09-30 James Hogan <james.hogan@imgtec.com>
3231
3232 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3233 mips64-dsp-linux.c.
3234
c4d9ceb6
YQ
32352014-09-23 Yao Qi <yao@codesourcery.com>
3236
3237 * linux-low.c (lp_status_maybe_breakpoint): New function.
3238 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3239 (count_events_callback): Likewise.
3240 (select_event_lwp_callback): Likewise.
3241 (cancel_breakpoints_callback): Likewise.
3242
89a5711c
DB
32432014-09-19 Don Breazeal <donb@codesourcery.com>
3244
3245 * linux-low.c (handle_extended_wait): Call
3246 linux_ptrace_get_extended_event.
3247 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3248 linux_is_extended_waitstatus.
3249
bffc0964
JB
32502014-09-16 Joel Brobecker <brobecker@adacore.com>
3251
3252 * Makefile.in (CPPFLAGS): Define.
3253 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3254 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3255
0bfdf32f
GB
32562014-09-16 Gary Benson <gbenson@redhat.com>
3257
3258 * inferiors.h (current_inferior): Renamed as...
3259 (current_thread): New variable. All uses updated.
3260 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3261 (maybe_move_out_of_jump_pad): Likewise.
3262 (cancel_breakpoint): Likewise.
3263 (linux_low_filter_event): Likewise.
3264 (wait_for_sigstop): Likewise.
3265 (linux_resume_one_lwp): Likewise.
3266 (need_step_over_p): Likewise.
3267 (start_step_over): Likewise.
3268 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3269 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3270 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3271 and save_inferior as saved_thread.
3272 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3273 saved_thread.
3274 (regcache_invalidate_thread): Likewise.
3275 * remote-utils.c (prepare_resume_reply): Likewise.
3276 * thread-db.c (thread_db_get_tls_address): Likewise.
3277 (disable_thread_event_reporting): Likewise.
3278 (remove_thread_event_breakpoints): Likewise.
3279 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3280 as saved_thread.
3281 * target.h (set_desired_inferior): Renamed as...
3282 (set_desired_thread): New declaration. All uses updated.
3283 * server.c (myresume): Updated comment to reference thread instead
3284 of inferior.
3285 (handle_serial_event): Likewise.
3286 (handle_target_event): Likewise.
3287
361c8ade
GB
32882014-09-12 Tom Tromey <tromey@redhat.com>
3289 Gary Benson <gbenson@redhat.com>
3290
3291 * regcache.h: Include common-regcache.h.
3292 (regcache_read_pc): Don't declare.
3293 * regcache.c (get_thread_regcache_for_ptid): New function.
3294
bd9269f7
GB
32952014-09-11 Tom Tromey <tromey@redhat.com>
3296 Gary Benson <gbenson@redhat.com>
3297
3298 * symbol.c: New file.
3299 * Makefile.in (SFILES): Add symbol.c.
3300 (OBS): Add symbol.o.
3301
f8c1d06b
GB
33022014-09-11 Gary Benson <gbenson@redhat.com>
3303
3304 * target.c (target_stop_ptid, target_continue_ptid): New
3305 functions.
3306
721ec300
GB
33072014-09-11 Tom Tromey <tromey@redhat.com>
3308 Gary Benson <gbenson@redhat.com>
3309
3310 * target.h: Include target/target.h.
3311 * target.c (target_read_memory, target_read_uint32)
3312 (target_write_memory): New functions.
3313
c5e92cca
GB
33142014-09-11 Gary Benson <gbenson@redhat.com>
3315
3316 * server.h (debug_hw_points): Don't declare.
3317 * server.c (debug_hw_points): Don't define. Replace all uses
3318 with show_debug_regs.
3319 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3320 all uses with show_debug_regs.
3321
2e4bb98a
EBM
33222014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3323
3324 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3325 endianness into account.
3326 (ppc_supply_ptrace_register): Likewise.
3327
ac740bc7
JH
33282014-09-03 James Hogan <james.hogan@imgtec.com>
3329
3330 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3331 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3332
97ea6506
GB
33332014-09-03 Gary Benson <gbenson@redhat.com>
3334
3335 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3336 ALL_DEBUG_ADDRESS_REGISTERS.
3337
df7e5265
GB
33382014-09-02 Gary Benson <gbenson@redhat.com>
3339
3340 * i386-low.h: Renamed as...
3341 * x86-low.h: New file. All type, function and variable name
3342 prefixes changed from "i386_" to "x86_". All references updated.
3343 * i386-low.c: Renamed as...
3344 * x86-low.c: New file. All type, function and variable name
3345 prefixes changed from "i386_" to "x86_". All references updated.
3346
ed859da7
GB
33472014-09-02 Gary Benson <gbenson@redhat.com>
3348
3349 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3350 (x86_linux_new_thread): Likewise.
3351
860789c7
GB
33522014-08-29 Gary Benson <gbenson@redhat.com>
3353
3354 * server.h (setjmp.h): Do not include.
3355 (toplevel): Do not declare.
3356 (common-exceptions.h): Include.
3357 (cleanups.h): Likewise.
3358 * server.c (toplevel): Do not define.
3359 (exit_code): New static global.
3360 (detach_or_kill_for_exit_cleanup): New function.
3361 (main): New function. Original main renamed to...
3362 (captured_main): New function.
3363 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3364
ff55e1b5
GB
33652014-08-29 Gary Benson <gbenson@redhat.com>
3366
3367 * Makefile.in (SFILES): Add common/common-exceptions.c.
3368 (OBS): Add common-exceptions.o.
3369 (common-exceptions.o): New rule.
3370 * utils.c (prepare_to_throw_exception): New function.
3371
e9bcb658
GB
33722014-08-29 Gary Benson <gbenson@redhat.com>
3373
3374 * config.in: Regenerate.
3375 * configure: Likewise.
3376
e3180625
GB
33772014-08-29 Gary Benson <gbenson@redhat.com>
3378
3379 * Makefile.in (SFILES): Add common/cleanups.c.
3380 (OBS): cleanups.o.
3381 (cleanups.o): New rule.
3382
e3d6ba5d
GB
33832014-08-29 Gary Benson <gbenson@redhat.com>
3384
3385 * utils.c (internal_vwarning): New function.
3386
7096e886
GB
33872014-08-28 Gary Benson <gbenson@redhat.com>
3388
3389 * utils.h (fatal): Remove declaration.
3390 * utils.c (fatal): Remove function.
3391
14ce3192
GB
33922014-08-28 Gary Benson <gbenson@redhat.com>
3393
3394 * tracepoint.c (gdb_agent_init): Replace fatal with
3395 perror_with_name.
3396 (initialize_tracepoint): Likewise.
3397
50278d59
GB
33982014-08-28 Gary Benson <gbenson@redhat.com>
3399
3400 * remote-utils.c (remote_prepare): Replace fatal with error.
3401
aa96c426
GB
34022014-08-28 Gary Benson <gbenson@redhat.com>
3403
3404 * linux-low.c (linux_async): Replace fatal with warning.
3405 Tidy up and return.
3406 (linux_start_non_stop): Return -1 if linux_async failed.
3407
f7160e97
GB
34082014-08-28 Gary Benson <gbenson@redhat.com>
3409
3410 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3411 gdb_assert.
3412 (i386_dr_low_get_addr): Remove vague comment.
3413 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3414 gdb_assert.
3415
38e08fca
GB
34162014-08-28 Gary Benson <gbenson@redhat.com>
3417
3418 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3419 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3420 internal_error.
3421 (linux_resume_one_lwp): Likewise.
3422 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3423 gdb_assert.
3424 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3425 with internal_error.
3426 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3427 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3428 (find_register_by_name): Replace fatal with internal_error.
3429 (find_regno): Likewise.
3430 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3431 * thread-db.c (thread_db_create_event): Likewise.
3432 (thread_db_load_search): Likewise.
3433 (try_thread_db_load_1): Likewise.
3434 * tracepoint.c (get_jump_space_head): Replace fatal with
3435 internal_error.
3436 (claim_trampoline_space): Likewise.
3437 (have_fast_tracepoint_trampoline_buffer): Likewise.
3438 (cmd_qtstart): Likewise.
3439 (stop_tracing): Likewise.
3440 (fast_tracepoint_collecting): Likewise.
3441 (target_malloc): Likewise.
3442 (download_tracepoint): Likewise.
3443 (download_trace_state_variables): Replace check with gdb_assert.
3444 (upload_fast_traceframes): Replace fatal with internal_error.
3445
34abf635
GB
34462014-08-19 Tom Tromey <tromey@redhat.com>
3447 Gary Benson <gbenson@redhat.com>
3448
3449 * Makefile.in (SFILES): Add common/common-debug.c.
3450 (OBS): Add common-debug.o.
3451 (common-debug.o): New rule.
3452 * debug.h (debug_printf): Don't declare.
3453 * debug.c (debug_printf): Renamed and rewritten as...
3454 (debug_vprintf): New function.
3455
f6e94d78
GB
34562014-08-19 Gary Benson <gbenson@redhat.com>
3457
3458 * utils.h: Do not include print-utils.h.
3459
9239eeab
GB
34602014-08-19 Tom Tromey <tromey@redhat.com>
3461 Gary Benson <gbenson@redhat.com>
3462
3463 * server.h: Add static assertion.
3464 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3465
ef87c8bb
GB
34662014-08-19 Tom Tromey <tromey@redhat.com>
3467 Gary Benson <gbenson@redhat.com>
3468
3469 * Makefile.in (SFILES): Add common/errors.c.
3470 (OBS): Add errors.o.
3471 (IPA_OBS): Add errors-ipa.o.
3472 (errors.o): New rule.
3473 (errors-ipa.o): Likewise.
3474 * utils.h (perror_with_name, error, warning): Don't declare.
3475 * utils.c (warning): Renamed and rewritten as...
3476 (vwarning): New function.
3477 (error): Renamed and rewritten as...
3478 (verror): New function.
3479 (internal_error): Renamed and rewritten as...
3480 (internal_verror): New function.
3481
bb974a24
GB
34822014-08-07 Gary Benson <gbenson@redhat.com>
3483
3484 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3485 * configure: Regenerate.
3486 * config.in: Likewise.
3487 * server.h: Do not include errno.h.
3488 * event-loop.c: Likewise.
3489 * hostio-errno.c: Likewise.
3490 * linux-low.c: Likewise.
3491 * remote-utils.c: Likewise.
3492 * spu-low.c: Likewise.
3493 * utils.c: Likewise.
3494 * gdbreplay.c: Unconditionally include errno.h.
3495
6d3d12eb
GB
34962014-08-07 Gary Benson <gbenson@redhat.com>
3497
3498 * server.h: Do not include string.h.
3499 * event-loop.c: Likewise.
3500 * linux-low.c: Likewise.
3501 * regcache.c: Likewise.
3502 * remote-utils.c: Likewise.
3503 * spu-low.c: Likewise.
3504 * utils.c: Likewise.
3505
dccbb609
GB
35062014-08-07 Gary Benson <gbenson@redhat.com>
3507
3508 * server.h: Do not include gdb_assert.h.
3509
e76df0d0
GB
35102014-08-07 Gary Benson <gbenson@redhat.com>
3511
3512 * server.h: Do not include common-utils.h.
3513
4cb9c816
GB
35142014-08-07 Gary Benson <gbenson@redhat.com>
3515
3516 * server.h: Do not include ptid.h.
3517 * notif.h: Likewise.
3518
3995eeee
GB
35192014-08-07 Gary Benson <gbenson@redhat.com>
3520
3521 * server.h: Do not include gdb_locale.h.
3522
cb9f1a9b
GB
35232014-08-07 Gary Benson <gbenson@redhat.com>
3524
3525 * server.h: Do not include gdb/signals.h.
3526 * win32-low.c: Likewise.
3527
a5fceff8
GB
35282014-08-07 Gary Benson <gbenson@redhat.com>
3529
3530 * server.h: Do not include pathmax.h.
3531
b9391142
GB
35322014-08-07 Gary Benson <gbenson@redhat.com>
3533
3534 * server.h: Do not include libiberty.h.
3535 * linux-bfin-low.c: Likewise.
3536
0e443c87
GB
35372014-08-07 Gary Benson <gbenson@redhat.com>
3538
3539 * server.h: Do not include ansidecl.h.
3540
8ebb3f56
GB
35412014-08-07 Gary Benson <gbenson@redhat.com>
3542
3543 * linux-x86-low.c: Do not include stddef.h.
3544 * lynx-ppc-low.c: Likewise.
3545 * tracepoint.c: Likewise.
3546
8980bdf6
GB
35472014-08-07 Gary Benson <gbenson@redhat.com>
3548
3549 * server.h: Do not include stdarg.h.
3550 * nto-low.c: Likewise.
3551
d7096f71
GB
35522014-08-07 Gary Benson <gbenson@redhat.com>
3553
3554 * server.h: Do not include stdlib.h.
3555 * inferiors.c: Likewise.
3556 * linux-low.c: Likewise.
3557 * regcache.c: Likewise.
3558 * spu-low.c: Likewise.
3559 * tracepoint.c: Likewise.
3560 * utils.c: Likewise.
3561
d02f550d
GB
35622014-08-07 Gary Benson <gbenson@redhat.com>
3563
3564 * server.h: Do not include stdio.h.
3565 * linux-low.c: Likewise.
3566 * remote-utils.c: Likewise.
3567 * spu-low.c: Likewise.
3568 * utils.c: Likewise.
3569 * wincecompat.c: Likewise.
3570
87f6c4e3
GB
35712014-08-06 Gary Benson <gbenson@redhat.com>
3572
3573 * regcache.c (init_register_cache): Move conditionals inside if.
3574
7089dca4
GB
35752014-08-06 Gary Benson <gbenson@redhat.com>
3576
3577 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3578
462f517e
GB
35792014-07-31 Gary Benson <gbenson@redhat.com>
3580
3581 * ax.h: Do not include server.h.
3582 * gdbthread.h: Likewise.
3583 * lynx-low.h: Likewise.
3584 * notif.h: Likewise.
3585
976411d6
GB
35862014-07-30 Gary Benson <gbenson@redhat.com>
3587
3588 * server.h: Include common-defs.h.
3589 Do not include config.h or build-gnulib-gdbserver/config.h.
3590
d41f6d8e
GB
35912014-07-30 Gary Benson <gbenson@redhat.com>
3592
3593 * hostio-errno.c: Move server.h to top of includes list.
3594 * inferiors.c: Likewise.
3595 * linux-x86-low.c: Likewise.
3596 * notif.c: Include server.h.
3597
314c6a35
TT
35982014-07-24 Tom Tromey <tromey@redhat.com>
3599 Gary Benson <gbenson@redhat.com>
3600
3601 * server.h (CORE_ADDR): Now unsigned.
3602
69ff6be5
PA
36032014-07-16 Pedro Alves <palves@redhat.com>
3604
3605 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3606
ce9e3fe7
PA
36072014-07-15 Pedro Alves <palves@redhat.com>
3608
3609 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3610 copy.
3611
e76126e8
PA
36122014-07-11 Pedro Alves <palves@redhat.com>
3613
3614 * linux-low.c (kill_wait_lwp): New function, based on
3615 kill_one_lwp_callback, but use my_waitpid directly.
3616 (kill_one_lwp_callback, linux_kill): Use it.
3617
8e9db26e
PA
36182014-06-23 Pedro Alves <palves@redhat.com>
3619
3620 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3621 before setting DR0..DR3.
3622
698b3e08
GB
36232014-06-20 Gary Benson <gbenson@redhat.com>
3624
3625 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3626 * configure: Regenerated.
3627 * config.in: Likewise.
3628
125f8a3d
GB
36292014-06-20 Gary Benson <gbenson@redhat.com>
3630
3631 * Makefile.in (SFILES): Update locations for files moved
3632 from common to nat.
3633 (object file files): Reordered.
3634
42995dbd
GB
36352014-06-20 Gary Benson <gbenson@redhat.com>
3636
3637 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3638 (i386_dr_low_set_addr): Likewise.
3639 (i386_dr_low_get_addr): Likewise.
3640 (i386_dr_low_can_set_control): Likewise.
3641 (i386_dr_low_set_control): Likewise.
3642 (i386_dr_low_get_control): Likewise.
3643 (i386_dr_low_get_status): Likewise.
3644 (i386_get_debug_register_length): Likewise.
3645 * linux-x86-low.c (i386_dr_low_set_addr):
3646 Changed signature. Made static.
3647 (i386_dr_low_get_addr): Likewise.
3648 (i386_dr_low_set_control): Likewise.
3649 (i386_dr_low_get_control): Likewise.
3650 (i386_dr_low_get_status): Likewise.
3651 (i386_dr_low): New global variable.
3652 * win32-i386-low.c (i386_dr_low_set_addr):
3653 Changed signature. Made static.
3654 (i386_dr_low_get_addr): Likewise.
3655 (i386_dr_low_set_control): Likewise.
3656 (i386_dr_low_get_control): Likewise.
3657 (i386_dr_low_get_status): Likewise.
3658 (i386_dr_low): New global variable.
3659
e1d2394b
MS
36602014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3661
3662 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3663 * Makefile.in (AR, AR_FLAGS): Define.
3664 * configure: Regenerate.
3665
3a8ee006
GB
36662014-06-19 Gary Benson <gbenson@redhat.com>
3667
3668 * Makefile.in (i386-dregs.o): New rule.
3669 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3670 * i386-low.c (target.h): Remove include.
3671 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3672 (DR_CONTROL_SHIFT): Likewise.
3673 (DR_CONTROL_SIZE): Likewise.
3674 (DR_RW_EXECUTE): Likewise.
3675 (DR_RW_WRITE): Likewise.
3676 (DR_RW_READ): Likewise.
3677 (DR_RW_IORW): Likewise.
3678 (DR_LEN_1): Likewise.
3679 (DR_LEN_2): Likewise.
3680 (DR_LEN_4): Likewise.
3681 (DR_LEN_8): Likewise.
3682 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3683 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3684 (DR_ENABLE_SIZE): Likewise.
3685 (DR_LOCAL_SLOWDOWN): Likewise.
3686 (DR_GLOBAL_SLOWDOWN): Likewise.
3687 (DR_CONTROL_RESERVED): Likewise.
3688 (I386_DR_CONTROL_MASK): Likewise.
3689 (I386_DR_VACANT): Likewise.
3690 (I386_DR_LOCAL_ENABLE): Likewise.
3691 (I386_DR_GLOBAL_ENABLE): Likewise.
3692 (I386_DR_DISABLE): Likewise.
3693 (I386_DR_SET_RW_LEN): Likewise.
3694 (I386_DR_GET_RW_LEN): Likewise.
3695 (I386_DR_WATCH_HIT): Likewise.
3696 (i386_wp_op_t): Likewise.
3697 (i386_show_dr): Likewise.
3698 (i386_length_and_rw_bits): Likewise.
3699 (i386_insert_aligned_watchpoint): Likewise.
3700 (i386_remove_aligned_watchpoint): Likewise.
3701 (i386_handle_nonaligned_watchpoint): Likewise.
3702 i386_update_inferior_debug_regs(): Likewise.
3703 (i386_dr_insert_watchpoint): Likewise.
3704 (i386_dr_remove_watchpoint): Likewise.
3705 (i386_dr_region_ok_for_watchpoint): Likewise.
3706 (i386_dr_stopped_data_address): Likewise.
3707 (i386_dr_stopped_by_watchpoint): Likewise.
3708
8f26655c
GB
37092014-06-19 Gary Benson <gbenson@redhat.com>
3710
3711 * i386-low.c (i386_dr_show): Renamed to
3712 i386_show_dr and made static. All uses updated.
3713 (i386_dr_length_and_rw_bits): Renamed to
3714 i386_length_and_rw_bits and made static.
3715 All uses updated.
3716 (i386_dr_insert_aligned_watchpoint): Renamed to
3717 i386_insert_aligned_watchpoint and made static.
3718 All uses updated.
3719 (i386_dr_remove_aligned_watchpoint): Renamed to
3720 i386_remove_aligned_watchpoint and made static.
3721 All uses updated.
3722 (i386_dr_update_inferior_debug_regs): Renamed to
3723 i386_update_inferior_debug_regs and made static.
3724 All uses updated.
3725
b9228891
GB
37262014-06-18 Gary Benson <gbenson@redhat.com>
3727
5171def3
GB
3728 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3729 (i386_dr_low_can_set_control): Likewise.
3730 (i386_get_debug_register_length): Likewise.
3731 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3732 (i386_dr_low_can_set_control): Likewise.
3733 (i386_get_debug_register_length): Likewise.
3734
37352014-06-17 Gary Benson <gbenson@redhat.com>
3736
b9228891
GB
3737 * i386-low.h (i386-dregs.h): New include.
3738 (DR_FIRSTADDR): Now in i386-dregs.h.
3739 (DR_LASTADDR): Likewise.
3740 (DR_NADDR): Likewise.
3741 (DR_STATUS): Likewise.
3742 (DR_CONTROL): Likewise.
3743 (i386_debug_reg_state): Likewise.
3744 (i386_dr_insert_watchpoint): Likewise.
3745 (i386_dr_remove_watchpoint): Likewise.
3746 (i386_dr_region_ok_for_watchpoint): Likewise.
3747 (i386_dr_stopped_data_address): Likewise.
3748 (i386_dr_stopped_by_watchpoint): Likewise.
3749 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3750
4be83cc2
GB
37512014-06-18 Gary Benson <gbenson@redhat.com>
3752
3753 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3754 i386_dr_insert_watchpoint.
3755 (i386_low_remove_watchpoint): Renamed to
3756 i386_dr_remove_watchpoint.
3757 (i386_low_region_ok_for_watchpoint): Renamed to
3758 i386_dr_region_ok_for_watchpoint.
3759 (i386_low_stopped_data_address): Renamed to
3760 i386_dr_stopped_data_address.
3761 (i386_low_stopped_by_watchpoint): Renamed to
3762 i386_dr_stopped_by_watchpoint.
3763 * i386-low.c (i386_show_dr): Renamed to
3764 i386_dr_show and made nonstatic. All uses updated.
3765 (i386_length_and_rw_bits): Renamed to
3766 i386_dr_length_and_rw_bits and made nonstatic.
3767 All uses updated.
3768 (i386_insert_aligned_watchpoint): Renamed to
3769 i386_dr_insert_aligned_watchpoint and made nonstatic.
3770 All uses updated.
3771 (i386_remove_aligned_watchpoint): Renamed to
3772 i386_dr_remove_aligned_watchpoint and made nonstatic.
3773 All uses updated.
3774 (i386_update_inferior_debug_regs): Renamed to
3775 i386_dr_update_inferior_debug_regs and made nonstatic.
3776 All uses updated.
3777 (i386_low_insert_watchpoint): Renamed to
3778 i386_dr_insert_watchpoint. All uses updated.
3779 (i386_low_remove_watchpoint): Renamed to
3780 i386_dr_remove_watchpoint. All uses updated.
3781 (i386_low_region_ok_for_watchpoint): Renamed to
3782 i386_dr_region_ok_for_watchpoint. All uses updated.
3783 (i386_low_stopped_data_address): Renamed to
3784 i386_dr_stopped_data_address. All uses updated.
3785 (i386_low_stopped_by_watchpoint): Renamed to
3786 i386_dr_stopped_by_watchpoint. All uses updated.
3787
131aa0d4
GB
37882014-06-18 Gary Benson <gbenson@redhat.com>
3789
3790 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3791 (i386_dr_low_can_set_control): Likewise.
3792 (i386_insert_aligned_watchpoint): New check.
3793
d9305f7f
GB
37942014-06-18 Gary Benson <gbenson@redhat.com>
3795
3796 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3797 Renamed to state.
3798
e927c9fc
GB
37992014-06-18 Gary Benson <gbenson@redhat.com>
3800
3801 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3802 instead of fatal and error.
3803 (i386_handle_nonaligned_watchpoint): Likewise.
3804
1b6d4134
GB
38052014-06-18 Gary Benson <gbenson@redhat.com>
3806
3807 * i386-low.c (i386_get_debug_register_length): New macro.
3808 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3809 (i386_show_dr): Use debug_printf instead of fprintf. Use
3810 phex to format values.
3811
6e62758f
GB
38122014-06-18 Gary Benson <gbenson@redhat.com>
3813
3814 * i386-low.h: Comment changes.
3815 * i386-low.c: Likewise.
3816
fc6e2f03
GB
38172014-06-18 Gary Benson <gbenson@redhat.com>
3818
3819 * i386-low.c: Whitespace changes.
3820
f9d1eeed
TT
38212014-06-12 Tom Tromey <tromey@redhat.com>
3822
3823 * utils.c (freeargv): Remove.
3824
0b04e523
TT
38252014-06-12 Tom Tromey <tromey@redhat.com>
3826
3827 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3828 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3829 (parse_debug_format_options): Likewise.
3830 (gdbserver_usage): Likewise.
3831 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3832 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3833 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3834 against libiberty.
3835 ($(LIBGNU)): Depend on libiberty.
3836 (all-lib): Recurse into all subdirs.
3837 (install-only): Invoke "install" target in subdirs.
3838 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3839 targets.
3840 * configure: Rebuild.
3841 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3842 for vasprintf, vsnprintf, or gettimeofday.
3843 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3844 srv_tgtobj.
3845
270c9937
JB
38462014-06-05 Joel Brobecker <brobecker@adacore.com>
3847
3848 * development.sh: Delete.
3849 * Makefile.in (config.status): Adjust dependency on development.sh.
3850 * configure.ac: Adjust development.sh source call.
3851 * configure: Regenerate.
3852
0a261ed8
PA
38532014-06-02 Pedro Alves <palves@redhat.com>
3854
3855 * ax.c (gdb_free_agent_expr): New function.
3856 * ax.h (gdb_free_agent_expr): New declaration.
3857 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3858 list.
3859 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3860 static.
3861 (clear_breakpoint_conditions_and_commands): New function.
3862 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3863 (clear_breakpoint_conditions_and_commands): New declaration.
3864
e9dae05e
RR
38652014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3866
3867 * linux-aarch64-low.c (asm/ptrace.h): Include.
3868
5876f503
JK
38692014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3870
3871 Fix TLS access for -static -pthread.
3872 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3873 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3874 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3875
802e8e6d
PA
38762014-05-20 Pedro Alves <palves@redhat.com>
3877
3878 * linux-aarch64-low.c (aarch64_insert_point)
3879 (aarch64_remove_point): No longer check whether the type is
3880 supported here. Adjust to new interface.
3881 (the_low_target): Install aarch64_supports_z_point_type as
3882 supports_z_point_type method.
3883 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3884 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3885 instead of a Z packet char. Adjust.
3886 (arm_supports_z_point_type): New function.
3887 (arm_insert_point, arm_remove_point): Adjust to new interface.
3888 (the_low_target): Install arm_supports_z_point_type.
3889 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3890 (cris_insert_point, cris_remove_point): Adjust to new interface.
3891 Don't check whether the type is supported here.
3892 (the_low_target): Install cris_supports_z_point_type.
3893 * linux-low.c (linux_supports_z_point_type): New function.
3894 (linux_insert_point, linux_remove_point): Adjust to new interface.
3895 * linux-low.h (struct linux_target_ops) <insert_point,
3896 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3897 raw_breakpoint pointer parameter.
3898 <supports_z_point_type>: New method.
3899 * linux-mips-low.c (mips_supports_z_point_type): New function.
3900 (mips_insert_point, mips_remove_point): Adjust to new interface.
3901 Use mips_supports_z_point_type.
3902 (the_low_target): Install mips_supports_z_point_type.
3903 * linux-ppc-low.c (the_low_target): Install NULL as
3904 supports_z_point_type method.
3905 * linux-s390-low.c (the_low_target): Install NULL as
3906 supports_z_point_type method.
3907 * linux-sparc-low.c (the_low_target): Install NULL as
3908 supports_z_point_type method.
3909 * linux-x86-low.c (x86_supports_z_point_type): New function.
3910 (x86_insert_point): Adjust to new insert_point interface. Use
3911 insert_memory_breakpoint. Adjust to new
3912 i386_low_insert_watchpoint interface.
3913 (x86_remove_point): Adjust to remove_point interface. Use
3914 remove_memory_breakpoint. Adjust to new
3915 i386_low_remove_watchpoint interface.
3916 (the_low_target): Install x86_supports_z_point_type.
3917 * lynx-low.c (lynx_target_ops): Install NULL as
3918 supports_z_point_type callback.
3919 * nto-low.c (nto_supports_z_point_type): New.
3920 (nto_insert_point, nto_remove_point): Adjust to new interface.
3921 (nto_target_ops): Install nto_supports_z_point_type.
3922 * mem-break.c: Adjust intro comment.
3923 (struct raw_breakpoint) <raw_type, size>: New fields.
3924 <inserted>: Update comment.
3925 <shlib_disabled>: Delete field.
3926 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3927 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3928 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3929 (raw_bkpt_type_to_target_hw_bp_type): New function.
3930 (find_enabled_raw_code_breakpoint_at): New function.
3931 (find_raw_breakpoint_at): New type and size parameters. Use them.
3932 (insert_memory_breakpoint): New function, based off
3933 set_raw_breakpoint_at.
3934 (remove_memory_breakpoint): New function.
3935 (set_raw_breakpoint_at): Reimplement.
3936 (set_breakpoint): New, based on set_breakpoint_at.
3937 (set_breakpoint_at): Reimplement.
3938 (delete_raw_breakpoint): Go through the_target->remove_point
3939 instead of assuming memory breakpoints.
3940 (find_gdb_breakpoint_at): Delete.
3941 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3942 (find_gdb_breakpoint): New function.
3943 (set_gdb_breakpoint_at): Delete.
3944 (z_type_supported): New function.
3945 (set_gdb_breakpoint_1): New function, loosely based off
3946 set_gdb_breakpoint_at.
3947 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3948 (delete_gdb_breakpoint_at): Delete.
3949 (delete_gdb_breakpoint_1): New function, loosely based off
3950 delete_gdb_breakpoint_at.
3951 (delete_gdb_breakpoint): New function.
3952 (clear_gdb_breakpoint_conditions): Rename to ...
3953 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3954 breakpoint.
3955 (add_condition_to_breakpoint): Make static.
3956 (add_breakpoint_condition): Take a struct breakpoint pointer
3957 instead of an address. Adjust.
3958 (gdb_condition_true_at_breakpoint): Rename to ...
3959 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3960 z_type parameter.
3961 (gdb_condition_true_at_breakpoint): Reimplement.
3962 (add_breakpoint_commands): Take a struct breakpoint pointer
3963 instead of an address. Adjust.
3964 (gdb_no_commands_at_breakpoint): Rename to ...
3965 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3966 parameter. Return true if no breakpoint was found. Change debug
3967 output.
3968 (gdb_no_commands_at_breakpoint): Reimplement.
3969 (run_breakpoint_commands): Rename to ...
3970 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3971 and change return type to boolean.
3972 (run_breakpoint_commands): New function.
3973 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3974 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3975 breakpoint. Go through the_target->remove_point instead of
3976 assuming memory breakpoint.
3977 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3978 software and hardware breakpoints.
3979 (reinsert_raw_breakpoint): Go through the_target->insert_point
3980 instead of assuming memory breakpoint.
3981 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3982 software and hardware breakpoints.
3983 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3984 Check both software and hardware breakpoints.
3985 (validate_inserted_breakpoint): Assert the breakpoint is a
3986 software breakpoint. Set the inserted flag to -1 instead of
3987 setting shlib_disabled.
3988 (delete_disabled_breakpoints): Adjust.
3989 (validate_breakpoints): Only validate software breakpoints.
3990 Adjust to inserted flag change.
3991 (check_mem_read, check_mem_write): Skip breakpoint types other
3992 than software breakpoints. Adjust to inserted flag change.
3993 * mem-break.h (enum raw_bkpt_type): New enum.
3994 (raw_breakpoint, struct process_info): Forward declare.
3995 (Z_packet_to_target_hw_bp_type): Delete declaration.
3996 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3997 (set_gdb_breakpoint, delete_gdb_breakpoint)
3998 (clear_breakpoint_conditions): New declarations.
3999 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4000 (breakpoint_inserted_here): Update comment.
4001 (add_breakpoint_condition, add_breakpoint_commands): Replace
4002 address parameter with a breakpoint pointer parameter.
4003 (gdb_breakpoint_here): Update comment.
4004 (delete_gdb_breakpoint_at): Delete.
4005 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4006 * server.c (process_point_options): Take a struct breakpoint
4007 pointer instead of an address. Adjust.
4008 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4009 delete_gdb_breakpoint.
4010 * spu-low.c (spu_target_ops): Install NULL as
4011 supports_z_point_type method.
4012 * target.h: Include mem-break.h.
4013 (struct target_ops) <prepare_to_access_memory>: Update comment.
4014 <supports_z_point_type>: New field.
4015 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4016 instead of a char. Also take a raw breakpoint pointer.
4017 * win32-arm-low.c (the_low_target): Install NULL as
4018 supports_z_point_type.
4019 * win32-i386-low.c (i386_supports_z_point_type): New function.
4020 (i386_insert_point, i386_remove_point): Adjust to new interface.
4021 (the_low_target): Install i386_supports_z_point_type.
4022 * win32-low.c (win32_supports_z_point_type): New function.
4023 (win32_insert_point, win32_remove_point): Adjust to new interface.
4024 (win32_target_ops): Install win32_supports_z_point_type.
4025 * win32-low.h (struct win32_target_ops):
4026 <supports_z_point_type>: New method.
4027 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4028 instead of a char. Also take a raw breakpoint pointer.
4029
932539e3
PA
40302014-05-20 Pedro Alves <palves@redhat.com>
4031
4032 * mem-break.h: Include break-common.h.
4033 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4034 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4035 (Z_packet_to_target_hw_bp_type): New declaration.
4036 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4037 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4038 (Z_PACKET_ACCESS_WP): Delete macros.
4039 (Z_packet_to_hw_type): Delete function.
4040 * i386-low.h: Don't include break-common.h here.
4041 (Z_packet_to_hw_type): Delete declaration.
4042 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4043 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4044 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4045 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4046 * linux-aarch64-low.c: Don't include break-common.h here.
4047 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4048 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4049 (Z_packet_to_target_hw_bp_type): Delete function.
4050 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4051 function.
4052 (mips_insert_point, mips_remove_point): Use
4053 Z_packet_to_target_hw_bp_type.
4054
4ff0d3d8
PA
40552014-05-20 Pedro Alves <palves@redhat.com>
4056
4057 * linux-aarch64-low.c: Include break-common.h.
4058 (enum target_point_type): Delete.
4059 (Z_packet_to_point_type): Rename to ...
4060 (Z_packet_to_target_hw_bp_type): ... this, and return a
4061 target_hw_bp_type instead.
4062 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4063 instead of an enum target_point_type.
4064 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4065 breakpoint type.
4066 (aarch64_dr_state_insert_one_point)
4067 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4068 (aarch64_handle_aligned_watchpoint)
4069 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4070 Take an enum target_hw_bp_type instead of an enum
4071 target_point_type.
4072 (aarch64_supports_z_point_type): New function.
4073 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4074 use Z_packet_to_target_hw_bp_type.
4075
786dc519
JB
40762014-05-20 Joel Brobecker <brobecker@adacore.com>
4077
4078 * configure.ac: Only use -Werror by default when DEVELOPMENT
4079 is true.
4080 * configure: Regenerate.
4081
9e0aa64f
JK
40822014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4083
4084 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4085 * linux-x86-low.c (X86_64_USER_REGS): New.
4086 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4087
2b577b92
YQ
40882014-04-28 Yao Qi <yao@codesourcery.com>
4089
4090 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4091 name.
4092
94611da2
PA
40932014-04-25 Pedro Alves <palves@redhat.com>
4094
4095 PR server/16255
4096 * linux-low.c (linux_attach_fail_reason_string): New function.
4097 (linux_attach_lwp): Delete.
4098 (linux_attach_lwp_1): Rename to ...
4099 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4100 argument. Remove "initial" parameter. Return int instead of
4101 void. Don't error or warn here.
4102 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4103 failure to attach to the tgid. Call warning when failing to
4104 attach to an lwp.
4105 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4106 argument. Remove "initial" parameter. Return int instead of
4107 void. Don't error or warn here.
4108 (linux_attach_fail_reason_string): New declaration.
4109 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4110 interface change. Use linux_attach_fail_reason_string.
4111
01f9f808
MS
41122014-04-24 Michael Sturm <michael.sturm@mintel.com>
4113 Walfred Tedeschi <walfred.tedeschi@intel.com>
4114
4115 * Makefile.in: Added rules to handle new files
4116 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4117 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4118 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4119 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4120 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4121 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4122 x32-avx512-linux.o.
4123 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4124 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4125 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4126 i386/x32-avx512.xml.
4127 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4128 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4129 i386/x32-avx512-linux.xml.
4130 * i387-fp.c (num_avx512_k_registers): New constant for number
4131 of K registers.
4132 (num_avx512_zmmh_low_registers): New constant for number of
4133 lower ZMM registers (0-15).
4134 (num_avx512_zmmh_high_registers): New constant for number of
4135 higher ZMM registers (16-31).
4136 (num_avx512_ymmh_registers): New contant for number of higher
4137 YMM registers (ymm16-31 added by avx521 on x86_64).
4138 (num_avx512_xmm_registers): New constant for number of higher
4139 XMM registers (xmm16-31 added by AVX512 on x86_64).
4140 (struct i387_xsave): Add space for AVX512 registers.
4141 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4142 Add code to handle AVX512 registers.
4143 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4144 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4145 prototypei from generated file.
4146 (tdesc_amd64_avx512_linux): Likewise.
4147 (init_registers_x32_avx512_linux): Likewise.
4148 (tdesc_x32_avx512_linux): Likewise.
4149 (init_registers_i386_avx512_linux): Likewise.
4150 (tdesc_i386_avx512_linux): Likewise.
4151 (x86_64_regmap): Add AVX512 registers.
4152 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4153 mask.
4154 (initialize_low_arch): Add code to initialize AVX512 registers.
4155
51aa91f9
PA
41562014-04-23 Pedro Alves <palves@redhat.com>
4157
4158 * mem-break.c (find_gdb_breakpoint_at): Make static.
4159 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4160
a4165e94
PA
41612014-04-23 Pedro Alves <palves@redhat.com>
4162
4163 * i386-low.c: Don't include break-common.h here.
4164 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4165 prototype to take target_hw_bp_type as argument instead of a Z
4166 packet char.
4167 * i386-low.h: Include break-common.h here.
4168 (Z_packet_to_hw_type): Declare.
4169 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4170 prototypes.
4171 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4172 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4173 (x86_remove_point): Convert the packet number to a
4174 target_hw_bp_type before calling i386_low_remove_watchpoint.
4175 * win32-i386-low.c (i386_insert_point): Convert the packet number
4176 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4177 (i386_remove_point): Convert the packet number to a
4178 target_hw_bp_type before calling i386_low_remove_watchpoint.
4179
b8acf843
PA
41802014-04-23 Pedro Alves <palves@redhat.com>
4181
4182 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4183
d708bcd1
PA
41842014-04-10 Pedro Alves <palves@redhat.com>
4185
4186 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4187 Check if the condition or command is NULL before checking if the
4188 breakpoint is known. On success, return true.
4189 * mem-break.h (add_breakpoint_condition): Document return.
4190 (add_breakpoint_commands): Add describing comment.
4191 * server.c (skip_to_semicolon): New function.
4192 (process_point_options): Use it.
4193
2eec7d5b
PA
41942014-04-09 Pedro Alves <palves@redhat.com>
4195
4196 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4197 to lwpid_of.
4198
fa96cb38
PA
41992014-02-27 Pedro Alves <palves@redhat.com>
4200
4201 PR 12702
4202 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4203 macros.
4204 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4205 output.
4206 (last_thread_of_process_p): Take a PID argument instead of a
4207 thread pointer.
4208 (linux_wait_for_lwp): Delete.
4209 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4210 functions.
4211 (linux_low_filter_event): New function, party factored out from
4212 linux_wait_for_event.
4213 (linux_wait_for_event): Rename to ...
4214 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4215 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4216 sigsuspend. Check for zombie leaders.
4217 (linux_wait_for_event): Reimplement as wrapper around
4218 linux_wait_for_event_filtered.
4219 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4220 a normal or signal exit is seen, it's the whole process exiting.
4221 (wait_for_sigstop): No longer a for_each_inferior callback.
4222 Rewrite on top of linux_wait_for_event_filtered.
4223 (stop_all_lwps): Call wait_for_sigstop directly.
4224 * server.c (resume, handle_target_event): Handle
4225 TARGET_WAITKIND_NO_RESUMED.
4226
d763de10
JB
42272014-02-26 Joel Brobecker <brobecker@adacore.com>
4228
4229 * win32-low.c (psapi_get_dll_name,
4230 * win32_CreateToolhelp32Snapshot): Delete.
4231 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4232 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4233 Delete.
4234 (handle_load_dll): Add function description.
4235 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4236
850a0f76
JB
42372014-02-26 Joel Brobecker <brobecker@adacore.com>
4238
4239 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4240 Add comment.
4241 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4242 base address when calling win32_add_one_solib.
4243 (handle_load_dll): Delete local variable load_addr.
4244 Remove 0x1000 offset applied to DLL base address when calling
4245 win32_add_one_solib.
4246 (handle_unload_dll): Add comment.
4247
f25b3fc3
JB
42482014-02-26 Joel Brobecker <brobecker@adacore.com>
4249
4250 * win32-low.c (win32_add_all_dlls): Renames
4251 win32_ensure_ntdll_loaded. Rewrite function documentation.
4252 Adjust implementation to always load all DLLs.
4253 Add 0x1000 offset to DLL base address when calling
4254 win32_add_one_solib.
4255 (child_initialization_done): New static global.
4256 (do_initial_child_stuff): Set child_initialization_done to
4257 zero during child initialization, and 1 after. Replace call
4258 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4259 Add comment.
4260 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4261 (handle_unload_dll): Add function documentation.
4262 (get_child_debug_event): Ignore load and unload DLL events
4263 during child initialization.
4264
d86d4aaf
DE
42652014-02-20 Doug Evans <dje@google.com>
4266
3bc32da3 4267 Remove global all_lwps.
d86d4aaf
DE
4268 * inferiors.h (ptid_of): Move here from linux-low.h.
4269 (pid_of, lwpid_of): Ditto.
4270 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4271 parameter is a struct thread_info * now.
4272 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4273 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4274 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4275 directly.
4276 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4277 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4278 * linux-arm-low.c (update_registers_callback): Update, "entry"
4279 parameter is a struct thread_info * now.
4280 Fetch lwpid from current_inferior directly.
4281 (arm_insert_point): Pass &all_threads to find_inferior instead of
4282 &all_lwps.
4283 (arm_remove_point): Ditto.
4284 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4285 (arm_prepare_to_resume): Fetch pid from thread.
4286 (arm_read_description): Fetch lwpid from current_inferior directly.
4287 * linux-low.c (all_lwps): Delete.
4288 (delete_lwp): Delete call to remove_inferior.
4289 (handle_extended_wait): Fetch lwpid from thread.
4290 (add_lwp): Don't set lwp->entry.id. Remove call to
4291 add_inferior_to_list.
4292 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4293 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4294 (kill_one_lwp_callback): Ditto.
4295 (linux_kill): Don't dereference NULL pointer.
4296 Fetch ptid,lwpid from thread.
4297 (get_detach_signal): Fetch ptid from thread.
4298 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4299 Simplify call to regcache_invalidate_thread.
4300 (delete_lwp_callback): Update, "entry" parameter is a
4301 struct thread_info * now. Fetch pid from thread.
4302 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4303 (status_pending_p_callback): Update, "entry" parameter is a
4304 struct thread_info * now. Fetch ptid from thread.
4305 (find_lwp_pid): Update, "entry" parameter is a
4306 struct thread_info * now.
4307 (linux_wait_for_lwp): Fetch pid from thread.
4308 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4309 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4310 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4311 (dequeue_one_deferred_signal): Ditto.
4312 (cancel_breakpoint): Fetch ptid from current_inferior.
4313 (linux_wait_for_event): Pass &all_threads to find_inferior,
4314 not &all_lwps. Fetch ptid, lwpid from thread.
4315 (count_events_callback): Update, "entry" parameter is a
4316 struct thread_info * now.
4317 (select_singlestep_lwp_callback): Ditto.
4318 (select_event_lwp_callback): Ditto.
4319 (cancel_breakpoints_callback): Ditto.
4320 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4321 not &all_lwps.
4322 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4323 (unsuspend_one_lwp): Update, "entry" parameter is a
4324 struct thread_info * now.
4325 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4326 not &all_lwps.
4327 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4328 Fetch lwpid from thread, not lwp.
4329 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4330 Pass &all_threads to find_inferior, not &all_lwps.
4331 (send_sigstop): Fetch lwpid from thread, not lwp.
4332 (send_sigstop_callback): Update, "entry" parameter is a
4333 struct thread_info * now.
4334 (suspend_and_send_sigstop_callback): Ditto.
4335 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4336 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4337 struct thread_info * now.
4338 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4339 from thread, lwp.
4340 (lwp_running): Update, "entry" parameter is a
4341 struct thread_info * now.
4342 (stop_all_lwps): Fetch ptid from thread.
4343 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4344 (linux_resume_one_lwp): Fetch lwpid from thread.
4345 (linux_set_resume_request): Update, "entry" parameter is a
4346 struct thread_info * now. Fetch pid, lwpid from thread.
4347 (resume_status_pending_p): Update, "entry" parameter is a
4348 struct thread_info * now.
4349 (need_step_over_p): Ditto. Fetch lwpid from thread.
4350 (start_step_over): Fetch lwpid from thread.
4351 (linux_resume_one_thread): Update, "entry" parameter is a
4352 struct thread_info * now. Fetch lwpid from thread.
4353 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4354 (proceed_one_lwp): Update, "entry" parameter is a
4355 struct thread_info * now. Fetch lwpid from thread.
4356 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4357 struct thread_info * now.
4358 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4359 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4360 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4361 directly.
4362 (regsets_store_inferior_registers): Ditto.
4363 (fetch_register, store_register): Ditto.
4364 (linux_read_memory, linux_write_memory): Ditto.
4365 (linux_request_interrupt): Ditto.
4366 (linux_read_auxv): Ditto.
4367 (linux_xfer_siginfo): Ditto.
4368 (linux_qxfer_spu): Ditto.
4369 (linux_qxfer_libraries_svr4): Ditto.
4370 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4371 moved to inferiors.h.
4372 (get_lwp): Delete.
4373 (get_thread_lwp): Update.
4374 (struct lwp_info): Delete member "entry". Simplify comment for
4375 member "thread".
4376 (all_lwps): Delete.
4377 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4378 current_inferior directly.
4379 (update_watch_registers_callback): Update, "entry" parameter is a
4380 struct thread_info * now. Fetch pid from thread.
4381 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4382 (mips_insert_point): Fetch lwpid from current_inferior.
4383 Pass &all_threads to find_inferior, not &all_lwps.
4384 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4385 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4386 directly.
4387 (mips_stopped_data_address): Ditto.
4388 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4389 directly.
4390 * linux-tile-low.c (tile_arch_setup): Ditto.
4391 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4392 (update_debug_registers_callback): Update, "entry" parameter is a
4393 struct thread_info * now. Fetch pid from thread.
4394 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4395 Pass &all_threads to find_inferior, not &all_lwps.
4396 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4397 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4398 Pass &all_threads to find_inferior, not &all_lwps.
4399 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4400 (i386_dr_low_get_status): Ditto.
4401 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4402 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4403 (x86_linux_read_description): Ditto.
4404 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4405
3b8361aa
DE
44062014-02-20 Doug Evans <dje@google.com>
4407
4408 * inferiors.c (get_first_inferior): Fix buglet.
4409
f7667f0d
DE
44102014-02-19 Doug Evans <dje@google.com>
4411
4412 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4413 * inferiors.c (add_thread): Change result type to struct thread_info *.
4414 All callers updated.
4415 (add_lwp): Call add_thread here instead of in callers.
4416 All callers updated.
4417 * linux-low.h (get_lwp_thread): Rewrite.
4418 (struct lwp_info): New member "thread".
4419
b3312d80
DE
44202014-02-19 Doug Evans <dje@google.com>
4421
4422 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4423 All callers updated.
4424
ecc6f45c
DE
44252014-02-19 Doug Evans <dje@google.com>
4426
4427 * inferiors.c (add_thread): Fix whitespace.
4428
649ebbca
DE
44292014-02-19 Doug Evans <dje@google.com>
4430
4431 * dll.c (clear_dlls): Replace accessing list implemention details
4432 with API function.
4433 * gdbthread.h (get_first_thread): Declare.
4434 * inferiors.c (for_each_inferior_with_data): New function.
4435 (get_first_thread): New function.
4436 (find_thread_ptid): Simplify.
4437 (get_first_inferior): New function.
4438 (clear_list): Delete.
4439 (one_inferior_p): New function.
4440 (clear_inferior_list): New function.
4441 (clear_inferiors): Update.
4442 * inferiors.h (for_each_inferior_with_data): Declare.
4443 (clear_inferior_list): Declare.
4444 (one_inferior_p): Declare.
4445 (get_first_inferior): Declare.
4446 * linux-low.c (linux_wait_for_event): Replace accessing list
4447 implemention details with API function.
4448 * server.c (target_running): Ditto.
4449 (accumulate_file_name_length): New function.
4450 (emit_dll_description): New function.
4451 (handle_qxfer_libraries): Replace accessing list implemention
4452 details with API function.
4453 (handle_qxfer_threads_worker): New function.
4454 (handle_qxfer_threads_proper): Replace accessing list implemention
4455 details with API function.
4456 (handle_query): Ditto.
4457 (visit_actioned_threads_callback_ftype): New typedef.
4458 (visit_actioned_threads_data): New struct.
4459 (visit_actioned_threads): Rewrite to be find_inferior callback.
4460 (resume): Call find_inferior.
4461 (handle_status): Replace accessing list implemention
4462 details with API function.
4463 (process_serial_event): Replace accessing list implemention details
4464 with API function.
4465 * target.c (set_desired_inferior): Replace accessing list implemention
4466 details with API function.
4467 * tracepoint.c (same_process_p): New function.
4468 (gdb_agent_about_to_close): Replace accessing list implemention
4469 details with API function.
4470 * win32-low.c (child_delete_thread): Replace accessing list
4471 implemention details with API function.
4472 (match_dll_by_basename): New function.
4473 (dll_is_loaded_by_basename): New function.
4474 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4475 details call to dll_is_loaded_by_basename.
4476
80894984
DE
44772014-02-19 Doug Evans <dje@google.com>
4478
4479 * dll.h (struct dll_info): Add comment.
4480 * gdbthread.h (struct thread_info): Add comment.
4481 (current_ptid): Simplify.
4482 * inferiors.c (add_process): Update.
4483 (remove_process): Update.
4484 * inferiors.h (struct process_info): Rename member "head" to "entry".
4485 * linux-low.c (delete_lwp): Update.
4486 (add_lwp): Update.
4487 (last_thread_of_process_p): Update.
4488 (kill_one_lwp_callback, linux_kill): Update.
4489 (status_pending_p_callback): Update.
4490 (wait_for_sigstop): Update. Simplify read of ptid.
4491 (start_step_over): Update.
4492 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4493 (get_lwp_thread): Update.
4494 (struct lwp_info): Rename member "head" to "entry".
4495 * regcache.h (inferior_list_entry): Delete.
4496 * server.c (kill_inferior_callback): Update.
4497 (detach_or_kill_inferior_callback): Update.
4498 (print_started_pid): Update.
4499 (print_attached_pid): Update.
4500 (process_serial_event): Simplify read of ptid.
4501 * thread-db.c (thread_db_create_event): Update.
4502 (thread_db_get_tls_address): Update.
4503 * win32-low.c (current_inferior_ptid): Simplify.
4504
46917d26
TT
45052014-02-19 Tom Tromey <tromey@redhat.com>
4506
4507 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4508 argument.
4509 (target_supports_btrace): Update.
4510
0759a81e
YQ
45112014-02-14 Yao Qi <yao@codesourcery.com>
4512
4513 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4514 (rsp-low-ipa.o): New target.
4515
a7191e8b
TT
45162014-02-12 Tom Tromey <tromey@redhat.com>
4517
4518 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4519 convert_ascii_to_int.
4520 * regcache.c (registers_to_string): Likewise.
4521 * remote-utils.c (decode_M_packet): Likewise.
4522 * server.c (process_serial_event): Likewise.
4523
ff0e980e
TT
45242014-02-12 Tom Tromey <tromey@redhat.com>
4525
4526 * server.c (handle_query, handle_v_run): Use hex2bin, not
4527 unhexify.
4528 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4529
e9371aff
TT
45302014-02-12 Tom Tromey <tromey@redhat.com>
4531
4532 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4533 convert_int_to_ascii.
4534 * regcache.c (registers_to_string, collect_register_as_string):
4535 Likewise.
4536 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4537 Likewise.
4538 * server.c (process_serial_event): Likewise.
4539 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4540 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4541
971dc0b8
TT
45422014-02-12 Tom Tromey <tromey@redhat.com>
4543
4544 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4545 bin2hex, not hexify.
4546 * tracepoint.c (cmd_qtstatus): Likewise.
4547
0a822afb
TT
45482014-02-12 Tom Tromey <tromey@redhat.com>
4549
4550 * remote-utils.c (monitor_output): Pass explicit length to
4551 hexify.
4552
9c3d6531
TT
45532014-02-12 Tom Tromey <tromey@redhat.com>
4554
4555 * tracepoint.c: Include rsp-low.h.
4556 * server.c: Include rsp-low.h.
4557 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4558 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4559 declare.
4560 * remote-utils.c: Include rsp-low.h.
4561 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4562 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4563 (convert_int_to_ascii, convert_ascii_to_int): Move to
4564 common/rsp-low.c.
4565 * regcache.c: Include rsp-low.h.
4566 * ax.c: Include rsp-low.h.
4567 * Makefile.in (SFILES): Add common/rsp-low.c.
4568 (OBS): Add rsp-low.o.
4569 (rsp-low.o): New target.
4570
01fd3ea5
TT
45712014-02-12 Tom Tromey <tromey@redhat.com>
4572
4573 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4574 Include print-utils.h.
4575 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4576 (plongest, thirty_two, phex_nz): Remove.
4577 * Makefile.in (SFILES): Add common/print-utils.c.
4578 (OBS): Add print-utils.o.
4579 (print-utils-ipa.o): New target.
4580 (print-utils.o): New target.
4581 (IPA_OBJS): Add print-utils-ipa.o.
4582
e99dc820
TT
45832014-02-06 Tom Tromey <tromey@redhat.com>
4584
4585 * Makefile.in (SFILES): Fix indentation.
4586
ee1e2d4f
DE
45872014-02-05 Doug Evans <dje@google.com>
4588
4589 * linux-low.c (linux_wait_for_event): Improve comment.
4590 (linux_wait_1): Keep current_inferior in sync with event_child.
4591
f5a02773
DE
45922014-01-22 Doug Evans <dje@google.com>
4593
4594 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4595
87ce2a04
DE
45962014-01-22 Doug Evans <dje@google.com>
4597
4598 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4599 * configure: Regenerate.
4600 * config.in: Regenerate.
4601 * Makefile.in (SFILES): Add debug.c.
4602 (OBS): Add debug.o.
4603 * debug.c: New file.
4604 * debug.h: New file.
4605 * linux-aarch64-low.c (*): Update all debugging printfs to use
4606 debug_printf instead of fprintf.
4607 * linux-arm-low.c (*): Ditto.
4608 * linux-cris-low.c (*): Ditto.
4609 * linux-crisv32-low.c (*): Ditto.
4610 * linux-m32r-low.c (*): Ditto.
4611 * linux-sparc-low.c (*): Ditto.
4612 * linux-x86.c (*): Ditto.
4613 * linux-low.c (*): Ditto.
4614 (linux_wait_1): Add calls to debug_enter, debug_exit.
4615 (linux_wait): Remove redundant debugging printf.
4616 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4617 (linux_resume, unstop_all_lwps): Ditto.
4618 * mem-break.c (*): Update all debugging printfs to use
4619 debug_printf instead of fprintf.
4620 * remote-utils.c (*): Ditto.
4621 * thread-db.c (*): Ditto.
4622 * server.c #include <ctype.h>, "gdb_vecs.h".
4623 (debug_threads): Moved to debug.c.
4624 (*): Update all debugging printfs to use debug_printf instead of
4625 fprintf.
4626 (start_inferior): Replace call to fflush with call to debug_flush.
4627 (monitor_show_help): Mention set debug-format.
4628 (parse_debug_format_options): New function.
4629 (handle_monitor_command): Handle "monitor set debug-format".
4630 (gdbserver_usage): Mention --debug-format.
4631 (main): Parse --debug-format.
4632 * server.h (debug_threads): Declaration moved to debug.h.
4633 #include "debug.h".
4634 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4635 trace_debug_1 that uses debug_printf.
4636 (tracepoint_look_up_symbols): Update all debugging printfs to use
4637 debug_printf instead of fprintf.
4638
e671835b
BS
46392014-01-20 Baruch Siach <baruch@tkos.co.il>
4640
4641 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4642 sys/ptrace.h.
4643
b5737fa9
PA
46442014-01-17 Pedro Alves <palves@redhat.com>
4645
ea38d2a9 4646 PR build/16445
c7faa97a
PA
4647 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4648 defined after including gdb_proc_service.h.
b5737fa9 4649
40ed484e
DE
46502014-01-16 Doug Evans <dje@google.com>
4651
4652 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4653 (match_dll): Use it.
4654
969c39fb
MM
46552014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4656
4657 * target.h (target_ops) <read_btrace>: Change parameters and
4658 return type to allow error reporting.
4659 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4660 trace reading errors on.
4661 * linux-low.c (linux_low_read_btrace): Pass trace reading
4662 errors on.
4663 (linux_low_disable_btrace): New.
4664
ab7f45ba
DE
46652014-01-15 Doug Evans <dje@google.com>
4666
4667 * inferiors.c (thread_id_to_gdb_id): Delete.
4668 * inferiors.h (thread_id_to_gdb_id): Delete.
4669
66af0f44
EZ
46702014-01-13 Eli Zaretskii <eliz@gnu.org>
4671
4672 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4673 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4674 versions.
4675
9939e131
PA
46762014-01-08 Pedro Alves <palves@redhat.com>
4677
4678 * server.c (handle_status): Don't discard previous queued stop
4679 replies or thread's pending status here.
4680 (main) <disconnection>: Do it here instead.
4681
b7ea362b
PA
46822014-01-08 Pedro Alves <palves@redhat.com>
4683
4684 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4685 * server.c (visit_actioned_threads, handle_pending_status): New
4686 function.
4687 (handle_v_cont): Factor out parts to ...
4688 (resume): ... this new function. If in all-stop, and a thread
4689 being resumed has a pending status, report it without actually
4690 resuming.
4691 (myresume): Adjust to use the new 'resume' function.
4692 (clear_pending_status_callback, set_pending_status_callback)
4693 (find_status_pending_thread_callback): New functions.
4694 (handle_status): Handle the case of multiple threads having
4695 interesting statuses to report. Report threads' real last signal
4696 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4697 with an interesting thread to report the status for, instead of
4698 always reporting the status of the first thread.
4699
28498c42
JB
47002014-01-01 Joel Brobecker <brobecker@adacore.com>
4701
4702 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4703 * gdbreplay.c (gdbreplay_version): Likewise.
4704
f45c82da
YZ
47052013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4706
4707 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4708 iov.iov_len with the real length in use.
4709
379a5e2d
JB
47102013-12-13 Joel Brobecker <brobecker@adacore.com>
4711
4712 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4713 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4714 for all targets that use win32-low.c.
4715 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4716 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4717
4210d83e
PA
47182013-12-13 Pedro Alves <palves@redhat.com>
4719
4720 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4721 if equal to TARGET_WAITKIND_LOADED.
4722 * win32-low.c (cached_status): New static global.
4723 (win32_wait): Add declaration.
4724 (do_initial_child_stuff): Flush all initial pending debug events
4725 up to the initial breakpoint.
4726 (win32_wait): If CACHED_STATUS was set, return that instead
4727 of doing a real wait. Remove the code resuming the execution
4728 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4729 during the initial phase. Also remove the code changing
4730 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4731 TARGET_WAITKIND_STOPPED.
4732
e7f0d979
YQ
47332013-12-11 Yao Qi <yao@codesourcery.com>
4734
4735 * notif.c (handle_notif_ack): Return 0 if no notification
4736 matches.
4737
ebcf782c
DE
47382013-11-20 Doug Evans <dje@google.com>
4739
4740 * linux-low.c (linux_set_resume_request): Fix comment.
4741
20ad9378
DE
47422013-11-20 Doug Evans <dje@google.com>
4743
4744 * linux-low.c (resume_status_pending_p): Tweak comment.
4745
a196ebeb
WT
47462013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4747
4748 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4749 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4750 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4751 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4752 (srv_amd64_regobj): Add amd64-mpx.o.
4753 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4754 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4755 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4756 * i387-fp.c (num_pl_bnd_register) Added constant.
4757 (num_pl_bnd_cfg_registers) Added constant.
4758 (struct i387_xsave) Added reserved area and MPX fields.
4759 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4760 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4761 function.
4762 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4763 (init_registers_amd64_mpx_linux): Declare new function.
4764 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4765 (x86_64_regmap): Add MPX registers.
4766 (x86_linux_read_description): Add MPX case.
4767 (initialize_low_arch): Initialize MPX targets.
4768
0080a2f6
TT
47692013-11-18 Tom Tromey <tromey@redhat.com>
4770
4771 * configure: Rebuild.
4772 * configure.ac: Don't check for stdlib.h.
4773 * gdbreplay.c: Unconditionally include stdlib.h.
4774
2978b111
TT
47752013-11-18 Tom Tromey <tromey@redhat.com>
4776
4777 * config.in: Rebuild.
4778 * configure: Rebuild.
4779 * configure.ac: Don't use AC_HEADER_DIRENT.
4780
a3d08894
TT
47812013-11-18 Tom Tromey <tromey@redhat.com>
4782
4783 * server.h: Don't check HAVE_STRING_H.
4784 * gdbreplay.c: Don't check HAVE_STRING_H.
4785 * configure: Rebuild.
4786
0a5dd17d
TT
47872013-11-18 Tom Tromey <tromey@redhat.com>
4788
4789 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4790 LIBGNU.
4791
1bd2f0ba
TT
47922013-11-08 Tom Tromey <tromey@redhat.com>
4793
4794 * configure, config.in: Rebuild.
4795 * configure.ac: Remove unused configury.
4796
3266f10b
TT
47972013-11-08 Tom Tromey <tromey@redhat.com>
4798
4799 * acinclude.m4: Include common.m4, codeset.m4.
4800 * configure, config.in: Rebuild.
4801 * configure.ac: Use GDB_AC_COMMON.
4802
6682d959
AA
48032013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4804
4805 * linux-s390-low.c (HWCAP_S390_TE): New define.
4806 (s390_arch_setup): Consider the TE field in the HWCAP for
4807 determining 'have_regset_tdb'.
4808
fd0a4d76
SDJ
48092013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4810
4811 PR gdb/16014
4812 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4813 call to sizeof.
4814
1a3d890b
PA
48152013-10-02 Pedro Alves <palves@redhat.com>
4816
4817 * server.c (process_serial_event): Don't output "GDBserver
4818 exiting" if GDB is connected through stdio.
4819 * target.c (mywait): Likewise, be silent if GDB is connected
4820 through stdio.
4821
97ad4581
JB
48222013-10-01 Joel Brobecker <brobecker@adacore.com>
4823
4824 * lynx-low.c (lynx_add_threads_after_attach): New function.
4825 (lynx_attach): Remove call to add_thread. Add call to
4826 lynx_add_threads_after_attach instead.
4827
5b4e221c
MF
48282013-09-28 Mike Frysinger <vapier@gentoo.org>
4829
4830 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4831 * config.in, configure: Regenerated.
4832
ee47b2f8
YQ
48332013-09-18 Yao Qi <yao@codesourcery.com>
4834
4835 PR server/15959
4836 * server.c (start_inferior): Clear 'resume_info'.
4837
d6707650 48382013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4839
d6707650
JW
4840 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4841 for each register.
4842
9243dd0e 48432013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4844
9243dd0e
JW
4845 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4846 linux-tile-low.o to srv_tgtobj.
4847
c623a6ef
WN
48482013-09-16 Will Newton <will.newton@linaro.org>
4849
4850 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4851 out regs.
4852
fb71d39e
PA
48532013-09-06 Pedro Alves <palves@redhat.com>
4854
4855 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4856 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4857 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4858 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4859 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4860 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4861
8e7e9910
PA
48622013-09-06 Pedro Alves <palves@redhat.com>
4863
4864 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4865 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4866
7c3a12ca
PA
48672013-09-06 Pedro Alves <palves@redhat.com>
4868
4869 * linux-amd64-ipa.c: Include tracepoint.h.
4870 * linux-i386-ipa.c: Include tracepoint.h.
4871
8eb3d7b6
RW
48722013-09-06 Ricard Wanderlof <ricardw@axis.com>
4873
4874 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4875 (ps_get_thread_area): New function.
4876
eddddb9d
RW
48772013-09-06 Ricard Wanderlof <ricardw@axis.com>
4878
4879 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4880 (initialize_low_arch): Call init_registers_crisv32 rather than
4881 init_register_crisv32.
4882
533b0600
PA
48832013-09-05 Pedro Alves <palves@redhat.com>
4884
4885 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4886 to ...
4887 * hostio.h: ... this new file.
4888 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4889 win32-low.c: Include hostio.h.
4890
0ce3d3b5
PA
48912013-09-05 Pedro Alves <palves@redhat.com>
4892
4893 * server.h (gdb_client_data, handler_func, callback_handler_func)
4894 (delete_file_handler, add_file_handler, append_callback_event)
4895 (delete_callback_event, start_event_loop, initialize_event_loop):
4896 Move to event-loop.h and include it.
4897 * event-loop.h: New file.
4898
799cdc37
PA
48992013-09-05 Pedro Alves <palves@redhat.com>
4900
4901 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4902 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4903 (loaded_dll, unloaded_dll): Move to ...
4904 * dll.h: ... this new file.
4905 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4906
6a6bbd9d
PA
49072013-09-05 Pedro Alves <palves@redhat.com>
4908
4909 * server.h (current_process, get_thread_process, all_processes)
4910 (add_inferior_to_list, for_each_inferior, current_inferior)
4911 (remove_inferior, add_process, remove_process, find_process_pid)
4912 (have_started_inferiors_p, have_attached_inferiors_p)
4913 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4914 (clear_inferiors, find_inferior, find_inferior_id)
4915 (inferior_target_data, set_inferior_target_data)
4916 (inferior_regcache_data, set_inferior_regcache_data): Move to
4917 inferiors.h, and include it.
4918 * inferiors.h: New file.
4919
f699aaba
PA
49202013-09-05 Pedro Alves <palves@redhat.com>
4921
4922 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4923 Move ...
72f4393d 4924 * ax.h: ... here.
f699aaba 4925
c144c7a0
PA
49262013-09-05 Pedro Alves <palves@redhat.com>
4927
4928 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4929 tracepoint.h.
4930 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4931 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4932 (handle_tracepoint_general_set, handle_tracepoint_query)
4933 (tracepoint_finished_step, tracepoint_was_hit)
4934 (release_while_stepping_state_list, current_traceframe)
4935 (in_readonly_region, traceframe_read_mem)
4936 (fetch_traceframe_registers, traceframe_read_sdata)
4937 (traceframe_read_info, struct fast_tpoint_collect_status)
4938 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4939 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4940 (supply_fast_tracepoint_registers)
4941 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4942 (ipa_tdesc, claim_trampoline_space)
4943 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4944 (agent_mem_read, agent_get_trace_state_variable_value)
4945 (agent_set_trace_state_variable_value, agent_tsv_read)
4946 (agent_mem_read_string, get_raw_reg_func_addr)
4947 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4948 * tracepoint.h: ... this new file.
4949
ff42e6ab
PA
49502013-09-05 Pedro Alves <palves@redhat.com>
4951
4952 * server.h (perror_with_name, error, fatal, warning, paddress)
4953 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4954 include it.
4955 * utils.h: New file.
4956
541af0f4
PA
49572013-09-05 Pedro Alves <palves@redhat.com>
4958
4959 * server.h (remote_debug, noack_mode, transport_is_reliable)
4960 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4961 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4962 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4963 (write_enn, initialize_async_io, enable_async_io)
4964 (disable_async_io, check_remote_input_interrupt_request)
4965 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4966 (dead_thread_notify, prepare_resume_reply)
4967 (decode_address_to_semicolon, decode_address, decode_m_packet)
4968 (decode_M_packet, decode_X_packet, decode_xfer_write)
4969 (decode_search_memory_packet, unhexify, hexify)
4970 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4971 (look_up_one_symbol, relocate_instruction)
4972 (monitor_output): Move to remote-utils.h, and include it.
4973 * remote-utils.h: New file.
4974
eebdf26b
PA
49752013-09-05 Pedro Alves <palves@redhat.com>
4976
4977 * server.h (_): Delete.
4978
3aafd2ff
PA
49792013-09-02 Pedro Alves <palves@redhat.com>
4980
4981 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4982 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4983 allocated.
4984 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4985
cee83bcb
PM
49862013-09-02 Pierre Muller <muller@sourceware.org>
4987
4988 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4989 or WriteProcessMemory complete successfully and handle
4990 ERROR_PARTIAL_COPY error.
4991
9a13b2fa
PA
49922013-09-02 Pedro Alves <palves@redhat.com>
4993
4994 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4995 error instead of EIO.
4996
602e3198
JK
49972013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4998
4999 PR server/15604
5000 * linux-low.c: Include filestuff.h.
5001 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5002 * lynx-low.c: Include filestuff.h.
5003 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5004 * server.c: Include filestuff.h.
5005 (main): Call notice_open_fds.
5006 * spu-low.c: Include filestuff.h.
5007 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5008
96d7229d
LM
50092013-08-22 Luis Machado <lgustavo@codesourcery.com>
5010
5011 * Makefile.in: Explain why ../target and ../nat are not
5012 listed as include file search paths.
5013 (linux-waitpid.o): New object file rule.
5014 * configure.srv (srv_native_linux_obj): New variable.
5015 Replace all occurrences of linux native object files with
5016 $srv_native_linux_obj.
5017 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5018 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5019 (linux_enable_event_reporting): Remove declaration.
5020 (my_waitpid): Moved to common/linux-waitpid.c.
5021 (linux_wait_for_event): Pass ptid when calling
5022 linux_enable_event_reporting.
5023 (linux_supports_tracefork_flag): Remove.
5024 (linux_enable_event_reporting): Likewise.
5025 (linux_tracefork_grandchild): Remove.
5026 (STACK_SIZE): Moved to common/linux-ptrace.c.
5027 (linux_tracefork_child): Remove.
5028 (linux_test_for_tracefork): Remove.
5029 (linux_look_up_symbols): Call linux_supports_traceclone.
5030 (initialize_low): Remove call to linux_test_for_tracefork.
5031 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5032 common/linux-ptrace.h.
5033 (PTRACE_TYPE_ARG4): Likewise.
5034 Include linux-ptrace.h.
5035
32940073
PA
50362013-08-21 Pedro Alves <palves@redhat.com>
5037
5038 * config.in: Renegerate.
5039
33b60d58 50402013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5041
33b60d58
LM
5042 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5043 (SFILES): Remove $(srcdir)/common/target-common.c and
5044 add $(srcdir)/target/waitstatus.c.
5045 (OBS): Remove target-common.o and add waitstatus.o.
5046 (server_h): Remove $(srcdir)/../common/target-common.h and
5047 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5048 and $(srcdir)/../target/waitstatus.h.
5049 (target-common.o): Remove.
5050 (waitstatus.o): New target object file.
5051 * target.h: Do not include target-common.h and
5052 include target/resume.h, target/wait.h and
5053 target/waitstatus.h.
5054
b8e1b30e
LM
50552013-08-13 Luis Machado <lgustavo@codesourcery.com>
5056
5057 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5058 to PTRACE_TYPE_ARG3.
5059 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5060 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5061 PTRACE_TYPE_ARG4.
5062 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5063 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5064
7a60ad40
YQ
50652013-07-27 Jie Zhang <jie@codesourcery.com>
5066 Daniel Jacobowitz <dan@codesourcery.com>
5067 Yao Qi <yao@codesourcery.com>
5068
5069 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5070 (mips-linux-watch.o): New rule.
5071 (mips_linux_watch_h): New variable.
5072 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5073 srv_tgtobj.
5074 * linux-mips-low.c: Include mips-linux-watch.h.
5075 (struct arch_process_info, struct arch_lwp_info): New.
5076 (update_watch_registers_callback): New function.
5077 (mips_linux_new_process, mips_linux_new_thread) New functions.
5078 (mips_linux_prepare_to_resume, mips_insert_point): New
5079 functions.
5080 (mips_remove_point, mips_stopped_by_watchpoint): New
5081 functions.
5082 (rsp_bp_type_to_target_hw_bp_type): New function.
5083 (mips_stopped_data_address): New function.
5084 (the_low_target): Add watchpoint support functions.
5085
de6f69ad
YQ
50862013-07-27 Yao Qi <yao@codesourcery.com>
5087
5088 * i386-low.c: Include break-common.h.
5089 (enum target_hw_bp_type): Remove.
5090
3360c0bf
LM
50912013-07-24 Luis Machado <lgustavo@codesourcery.com>
5092
5093 * Makefile.in (SFILES): /common/target-common.c.
5094 (OBS): Add target-common.o.
5095 (server_h): Add $(srcdir)/../common/target-common.h.
5096 (target-common.o): New target.
5097 * server.c (queue_stop_reply_callback): Free
5098 status string after use.
5099 * target.c (target_waitstatus_to_string): Remove.
5100 * target.h: Include target-common.h.
5101 (resume_kind): Likewise.
5102 (target_waitkind): Likewise.
5103 (target_waitstatus): Likewise.
5104 (TARGET_WNOHANG): Likewise.
5105
bd885420
YQ
51062013-07-04 Yao Qi <yao@codesourcery.com>
5107
5108 * Makefile.in (host_alias): Use @host_noncanonical@.
5109 (target_alias): Use @target_noncanonical@.
5110 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5111 ACX_NONCANONICAL_HOST.
5112 * configure: Regenerated.
5113
5114 Revert:
5115 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5116
5117 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5118 * configure: Rebuild.
5119 * Makefile.in (version_host, version_target): Get from configure.
5120 (version.c): Use $(version_host) and $(version_target).
5121
17ef446e
PA
51222013-07-03 Pedro Alves <palves@redhat.com>
5123
5124 * Makefile.in (config.status): Depend on development.sh.
5125 * acinclude.m4: Include libmcheck.m4.
5126 * configure: Regenerate.
5127
7a9a7487
MG
51282013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5129
5130 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5131 attribute inside the parentheses.
5132 (winapi_DebugSetProcessKillOnExit): Ditto.
5133 (winapi_DebugBreakProcess): Ditto.
5134 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5135
49b64de6
MG
51362013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5137
5138 * notif.h (notif_event): Add a dummy member to avoid compiler
5139 errors.
5140
d5749ee7
PA
51412013-07-01 Pedro Alves <palves@redhat.com>
5142
5143 * hostio.c (HOSTIO_PATH_MAX): Define.
5144 (require_filename, handle_open, handle_unlink, handle_readlink):
5145 Use it.
5146
d8d2a3ee
PA
51472013-07-01 Pedro Alves <palves@redhat.com>
5148
5149 * server.h: Include "pathmax.h".
5150 * linux-low.c: Don't include sys/param.h.
5151 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5152 MAXPATHLEN.
5153 * win32-low.c: Don't include sys/param.h.
5154 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5155
bc7dea8d
PA
51562013-07-01 Pedro Alves <palves@redhat.com>
5157
5158 * event-loop.c: Don't check HAVE_UNISTD_H before including
5159 <unistd.h>.
5160 * gdbreplay.c: Likewise.
5161 * remote-utils.c: Likewise.
5162 * server.c: Likewise.
5163 * configure.ac: Don't check for unistd.h.
5164 * configure: Regenerate.
5165
d6c2da54
TT
51662013-06-28 Tom Tromey <tromey@redhat.com>
5167
5168 * Makefile.in (version.c): Use version.in, not
5169 common/version.in.
5170
257b6bec
MG
51712013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5172
5173 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5174 * configure: Rebuild.
5175 * Makefile.in (version_host, version_target): Get from configure.
5176 (version.c): Use $(version_host) and $(version_target).
5177
86ebe149
DK
51782013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5179
5180 Fix trace-status to output user name without trailing colon.
5181 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5182
f30aa5af
DK
51832013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5184
5185 Fix trace-status to output proper start-time and stop-time.
5186 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5187 output start time and stop time in hex as gdb expects.
5188
28a93511
YQ
51892013-06-26 Pedro Alves <pedro@codesourcery.com>
5190
5191 * tracepoint.c (build_traceframe_info_xml): Output trace state
5192 variables present in the trace buffer.
5193
01208463
TT
51942013-06-24 Tom Tromey <tromey@redhat.com>
5195
5196 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5197 create-version.sh.
5198 (version.o): Remove.
5199 * gdbreplay.c: Include version.h.
5200 (version, host_name): Don't declare.
5201 * server.h: Include version.h.
5202 (version, host_name): Don't declare.
5203
760256f9
PA
52042013-06-12 Pedro Alves <palves@redhat.com>
5205
5206 * linux-x86-low.c (linux_is_elf64): Delete global.
5207 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5208 with local linux_pid_exe_is_elf_64_file use.
5209
030031ee
PA
52102013-06-11 Pedro Alves <palves@redhat.com>
5211
5212 * linux-low.c (regset_disabled, disable_regset): New functions.
5213 (regsets_fetch_inferior_registers)
5214 (regsets_store_inferior_registers): Use them.
5215 (initialize_regsets_info); Don't allocate the disabled_regsets
5216 array here.
5217 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5218 comment.
5219
5da6eb0a
PA
52202013-06-11 Pedro Alves <palves@redhat.com>
5221
5222 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5223 xmalloc.
5224
7e5aaa09
PA
52252013-06-11 Pedro Alves <palves@redhat.com>
5226
5227 * linux-x86-low.c (initialize_low_arch): Call
5228 init_registers_x32_avx_linux.
5229
d878444c
JK
52302013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5231
5232 Fix compatibility with Android Bionic.
5233 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5234 it is not empty.
5235
3aee8918
PA
52362013-06-07 Pedro Alves <palves@redhat.com>
5237
5f2b57b5 5238 PR server/14823
3aee8918
PA
5239 * Makefile.in (OBS): Add tdesc.o.
5240 (IPA_OBJS): Add tdesc-ipa.o.
5241 (tdesc-ipa.o): New rule.
5242 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5243 interface.
5244 * linux-low.c (new_inferior): Delete.
5245 (disabled_regsets, num_regsets): Delete.
5246 (linux_add_process): Adjust to set the new per-process
5247 new_inferior flag.
5248 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5249 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5250 was a stop. When calling arch_setup, switch the current inferior
5251 to the thread that got an event.
5252 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5253 (regsets_fetch_inferior_registers)
5254 (regsets_store_inferior_registers): New regsets_info parameter.
5255 Adjust to use it.
5256 (linux_register_in_regsets): New regs_info parameter. Adjust to
5257 use it.
5258 (register_addr, fetch_register, store_register): New usrregs_info
5259 parameter. Adjust to use it.
5260 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5261 parameter regs_info. Adjust to use it.
5262 (linux_fetch_registers): Get the current inferior's regs_info, and
5263 adjust to use it.
5264 (linux_store_registers): Ditto.
5265 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5266 (initialize_low): Don't initialize the target_regsets here. Call
5267 initialize_low_arch.
5268 * linux-low.h (target_regsets): Delete declaration.
5269 (struct regsets_info): New.
5270 (struct usrregs_info): New.
5271 (struct regs_info): New.
5272 (struct process_info_private) <new_inferior>: New field.
5273 (struct linux_target_ops): Delete the num_regs, regmap, and
5274 regset_bitmap fields. New field regs_info.
5275 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5276 * i387-fp.c (num_xmm_registers): Delete.
5277 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5278 calls to new interface.
5279 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5280 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5281 Infer the number of xmm registers from the regcache's target
5282 description.
5283 * i387-fp.h (num_xmm_registers): Delete.
5284 * inferiors.c (add_thread): Don't install the thread's regcache
5285 here.
5286 * proc-service.c (gregset_info): Fetch the current inferior's
5287 regs_info. Adjust to use it.
5288 * regcache.c: Include tdesc.h.
5289 (register_bytes, reg_defs, num_registers)
5290 (gdbserver_expedite_regs): Delete.
5291 (get_thread_regcache): If the thread doesn't have a regcache yet,
5292 create one, instead of aborting gdbserver.
5293 (regcache_invalidate_one): Rename to ...
5294 (regcache_invalidate_thread): ... this.
5295 (regcache_invalidate_one): New.
5296 (regcache_invalidate): Only invalidate registers of the current
5297 process.
5298 (init_register_cache): Add target_desc parameter, and use it.
5299 (new_register_cache): Ditto. Assert the target description has a
5300 non zero registers_size.
5301 (regcache_cpy): Add assertions. Adjust.
5302 (realloc_register_cache, set_register_cache): Delete.
5303 (registers_to_string, registers_from_string): Adjust.
5304 (find_register_by_name, find_regno, find_register_by_number)
5305 (register_cache_size): Add target_desc parameter, and use it.
5306 (free_register_cache_thread, free_register_cache_thread_one)
5307 (regcache_release, register_cache_size): New.
5308 (register_size): Add target_desc parameter, and use it.
5309 (register_data, supply_register, supply_register_zeroed)
5310 (supply_regblock, supply_register_by_name, collect_register)
5311 (collect_register_as_string, collect_register_by_name): Adjust.
5312 * regcache.h (struct target_desc): Forward declare.
5313 (struct regcache) <tdesc>: New field.
5314 (init_register_cache, new_register_cache): Add target_desc
5315 parameter.
5316 (regcache_invalidate_thread): Declare.
5317 (regcache_invalidate_one): Delete declaration.
5318 (regcache_release): Declare.
5319 (find_register_by_number, register_cache_size, register_size)
5320 (find_regno): Add target_desc parameter.
5321 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5322 declarations.
5323 * remote-utils.c: Include tdesc.h.
5324 (outreg, prepare_resume_reply): Adjust.
5325 * server.c: Include tdesc.h.
5326 (gdbserver_xmltarget): Delete declaration.
5327 (get_features_xml, process_serial_event): Adjust.
5328 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5329 declare.
5330 (struct process_info) <tdesc>: New field.
5331 (ipa_tdesc): Declare.
5332 * tdesc.c: New file.
5333 * tdesc.h: New file.
5334 * tracepoint.c: Include tdesc.h.
5335 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5336 (get_context_regcache): Adjust to pass ipa_tdesc down.
5337 (do_action_at_tracepoint): Adjust to get the register cache size
5338 from the context regcache's description.
5339 (traceframe_walk_blocks): Adjust to get the register cache size
5340 from the current trace frame's description.
5341 (traceframe_get_pc): Adjust to get current trace frame's
5342 description and pass it down.
5343 (gdb_collect): Adjust to get the register cache size from the
5344 IPA's description.
5345 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5346 (gdbserver_xmltarget): Delete.
5347 (initialize_low_tracepoint): Set the ipa's target description.
5348 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5349 (initialize_low_tracepoint): Set the ipa's target description.
5350 * linux-x86-low.c: Include tdesc.h.
5351 [__x86_64__] (is_64bit_tdesc): New.
5352 (ps_get_thread_area, x86_get_thread_area): Use it.
5353 (i386_cannot_store_register): Rename to ...
5354 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5355 (i386_cannot_fetch_register): Rename to ...
5356 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5357 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5358 to new interface.
5359 (target_regsets): Rename to ...
5360 (x86_regsets): ... this.
5361 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5362 interface.
5363 (x86_siginfo_fixup): Use is_64bit_tdesc.
5364 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5365 (tdesc_x32_avx_linux, tdesc_x32_linux)
5366 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5367 Declare.
5368 (x86_linux_update_xmltarget): Delete.
5369 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5370 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5371 (AMD64_LINUX_USER64_CS): New.
5372 (x86_linux_read_description): New, based on
5373 x86_linux_update_xmltarget.
5374 (same_process_callback): New.
5375 (x86_arch_setup_process_callback): New.
5376 (x86_linux_update_xmltarget): New.
5377 (x86_regsets_info): New.
5378 (amd64_linux_regs_info): New.
5379 (i386_linux_usrregs_info): New.
5380 (i386_linux_regs_info): New.
5381 (x86_linux_regs_info): New.
5382 (x86_arch_setup): Reimplement.
5383 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5384 (x86_emit_ops): Ditto.
5385 (the_low_target): Adjust. Install x86_linux_regs_info,
5386 x86_cannot_fetch_register, and x86_cannot_store_register.
5387 (initialize_low_arch): New.
5388 * linux-ia64-low.c (tdesc_ia64): Declare.
5389 (ia64_fetch_register): Adjust.
5390 (ia64_usrregs_info, regs_info): New globals.
5391 (ia64_regs_info): New function.
5392 (the_low_target): Adjust.
5393 (initialize_low_arch): New function.
5394 * linux-sparc-low.c (tdesc_sparc64): Declare.
5395 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5396 Adjust.
5397 (sparc_arch_setup): New function.
5398 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5399 (the_low_target): Adjust.
5400 (initialize_low_arch): New function.
5401 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5402 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5403 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5404 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5405 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5406 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5407 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5408 (tdesc_powerpc_isa205_vsx64l): Declare.
5409 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5410 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5411 (ppc_set_pc, ppc_get_hwcap): Adjust.
5412 (ppc_usrregs_info): Forward declare.
5413 (!__powerpc64__) ppc_regmap_adjusted: New global.
5414 (ppc_arch_setup): Adjust to the current process'es target
5415 description.
5416 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5417 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5418 (ppc_store_evrregset): Adjust.
5419 (target_regsets): Rename to ...
5420 (ppc_regsets): ... this, and make static.
5421 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5422 (ppc_regs_info): New function.
5423 (the_low_target): Adjust.
5424 (initialize_low_arch): New function.
5425 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5426 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5427 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5428 (tdesc_s390x_linux64v2): Declare.
5429 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5430 (s390_fill_gregset, s390_store_last_break): Adjust.
5431 (target_regsets): Rename to ...
5432 (s390_regsets): ... this, and make static.
5433 (s390_get_pc, s390_set_pc): Adjust.
5434 (s390_get_hwcap): New target_desc parameter, and use it.
5435 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5436 (s390_arch_setup): Adjust to set the current process'es target
5437 description. Don't adjust the regmap.
5438 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5439 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5440 (regs_info_3264): New globals.
5441 (s390_regs_info): New function.
5442 (the_low_target): Adjust.
5443 (initialize_low_arch): New function.
5444 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5445 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5446 [__mips64] (init_registers_mips_linux)
5447 (init_registers_mips_dsp_linux): Delete defines.
5448 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5449 (have_dsp): New global.
5450 (mips_read_description): New, based on mips_arch_setup.
5451 (mips_arch_setup): Reimplement.
5452 (get_usrregs_info): New function.
5453 (mips_cannot_fetch_register, mips_cannot_store_register)
5454 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5455 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5456 (target_regsets): Rename to ...
5457 (mips_regsets): ... this, and make static.
5458 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5459 (dsp_regs_info, regs_info): New globals.
5460 (mips_regs_info): New function.
5461 (the_low_target): Adjust.
5462 (initialize_low_arch): New function.
5463 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5464 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5465 Declare.
5466 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5467 (arm_read_description): New, with bits factored from
5468 arm_arch_setup.
5469 (arm_arch_setup): Reimplement.
5470 (target_regsets): Rename to ...
5471 (arm_regsets): ... this, and make static.
5472 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5473 (arm_regs_info): New function.
5474 (the_low_target): Adjust.
5475 (initialize_low_arch): New function.
5476 * linux-m68k-low.c (tdesc_m68k): Declare.
5477 (target_regsets): Rename to ...
5478 (m68k_regsets): ... this, and make static.
5479 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5480 (m68k_regs_info): New function.
5481 (m68k_arch_setup): New function.
5482 (the_low_target): Adjust.
5483 (initialize_low_arch): New function.
5484 * linux-sh-low.c (tdesc_sharch): Declare.
5485 (target_regsets): Rename to ...
5486 (sh_regsets): ... this, and make static.
5487 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5488 (sh_regs_info, sh_arch_setup): New functions.
5489 (the_low_target): Adjust.
5490 (initialize_low_arch): New function.
5491 * linux-bfin-low.c (tdesc_bfin): Declare.
5492 (bfin_arch_setup): New function.
5493 (bfin_usrregs_info, regs_info): New globals.
5494 (bfin_regs_info): New function.
5495 (the_low_target): Adjust.
5496 (initialize_low_arch): New function.
5497 * linux-cris-low.c (tdesc_cris): Declare.
5498 (cris_arch_setup): New function.
5499 (cris_usrregs_info, regs_info): New globals.
5500 (cris_regs_info): New function.
5501 (the_low_target): Adjust.
5502 (initialize_low_arch): New function.
5503 * linux-cris-low.c (tdesc_crisv32): Declare.
5504 (cris_arch_setup): New function.
5505 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5506 (cris_regs_info): New function.
5507 (the_low_target): Adjust.
5508 (initialize_low_arch): New function.
5509 * linux-m32r-low.c (tdesc_m32r): Declare.
5510 (m32r_arch_setup): New function.
5511 (m32r_usrregs_info, regs_info): New globals.
5512 (m32r_regs_info): Adjust.
5513 (initialize_low_arch): New function.
5514 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5515 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5516 (tic6x_usrregs_info): Forward declare.
5517 (tic6x_read_description): New function, based on ...
5518 (tic6x_arch_setup): ... this. Reimplement.
5519 (target_regsets): Rename to ...
5520 (tic6x_regsets): ... this, and make static.
5521 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5522 (tic6x_regs_info): New function.
5523 (the_low_target): Adjust.
5524 (initialize_low_arch): New function.
5525 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5526 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5527 (target_regsets): Rename to ...
5528 (xtensa_regsets): ... this, and make static.
5529 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5530 globals.
5531 (xtensa_arch_setup, xtensa_regs_info): New functions.
5532 (the_low_target): Adjust.
5533 (initialize_low_arch): New function.
5534 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5535 (nios2_arch_setup): Set the current process'es tdesc.
5536 (target_regsets): Rename to ...
5537 (nios2_regsets): ... this.
5538 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5539 (nios2_regs_info): New function.
5540 (the_low_target): Adjust.
5541 (initialize_low_arch): New function.
a261b8f5
PA
5542 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5543 (aarch64_arch_setup): Set the current process'es tdesc.
5544 (target_regsets): Rename to ...
5545 (aarch64_regsets): ... this.
5546 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5547 (aarch64_regs_info): New function.
5548 (the_low_target): Adjust.
5549 (initialize_low_arch): New function.
3aee8918
PA
5550 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5551 globals.
5552 (target_regsets): Rename to ...
5553 (tile_regsets): ... this.
5554 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5555 (tile_regs_info): New function.
5556 (tile_arch_setup): Set the current process'es tdesc.
5557 (the_low_target): Adjust.
5558 (initialize_low_arch): New function.
5559 * spu-low.c (tdesc_spu): Declare.
5560 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5561 * win32-arm-low.c (tdesc_arm): Declare.
5562 (arm_arch_setup): New function.
5563 (the_low_target): Install arm_arch_setup instead of
5564 init_registers_arm.
5565 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5566 (init_windows_x86): Rename to ...
5567 (i386_arch_setup): ... this. Set `win32_tdesc'.
5568 (the_low_target): Adjust.
5569 * win32-low.c (win32_tdesc): New global.
5570 (child_add_thread): Don't create the thread cache here.
5571 (do_initial_child_stuff): Set the new process'es tdesc.
5572 * win32-low.h (struct target_desc): Forward declare.
5573 (win32_tdesc): Declare.
5574 * lynx-i386-low.c (tdesc_i386): Declare global.
5575 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5576 * lynx-low.c (lynx_tdesc): New global.
5577 (lynx_add_process): Set the new process'es tdesc.
5578 * lynx-low.h (struct target_desc): Forward declare.
5579 (lynx_tdesc): Declare global.
5580 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5581 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5582 * nto-low.c (nto_tdesc): New global.
5583 (do_attach): Set the new process'es tdesc.
5584 * nto-low.h (struct target_desc): Forward declare.
5585 (nto_tdesc): Declare.
5586 * nto-x86-low.c (tdesc_i386): Declare.
5587 (nto_x86_arch_setup): Set `nto_tdesc'.
5588
b1fbec62
GB
55892013-06-04 Gary Benson <gbenson@redhat.com>
5590
5591 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5592 to qSupported response when appropriate.
5593 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5594 with nonzero-length annex.
5595 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5596 arguments supplied in annex.
5597
d1ec4ce7
DE
55982013-05-31 Doug Evans <dje@google.com>
5599
ac44adcb 5600 PR server/15594
d1ec4ce7
DE
5601 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5602 64 bits in 64-cross-32 environment.
5603
9b25f2d3
PA
56042013-05-28 Pedro Alves <palves@redhat.com>
5605
5606 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5607 (aarch64-without-fpu.c): Delete rule.
5608 * configure.srv (aarch64*-*-linux*): Remove references to
5609 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5610 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5611 declaration.
5612
6740dc9c
PA
56132013-05-24 Pedro Alves <palves@redhat.com>
5614
5615 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5616 instead of strchr/decode_address. Error if the range isn't split
5617 with a ','. Don't assume there's be a ':' in the action.
5618
c2d6af84
PA
56192013-05-23 Yao Qi <yao@codesourcery.com>
5620 Pedro Alves <palves@redhat.com>
5621
5622 * linux-low.c (lwp_in_step_range): New function.
5623 (linux_wait_1): If the thread was range stepping and stopped
5624 outside the stepping range, report the stop to GDB. Otherwise,
5625 continue stepping. Add range stepping debug output.
5626 (linux_set_resume_request): Copy the step range from the resume
5627 request to the lwp.
5628 (linux_supports_range_stepping): New.
5629 (linux_target_ops) <supports_range_stepping>: Set to
5630 linux_supports_range_stepping.
5631 * linux-low.h (struct linux_target_ops)
5632 <supports_range_stepping>: New field.
5633 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5634 * linux-x86-low.c (x86_supports_range_stepping): New.
5635 (the_low_target) <supports_range_stepping>: Set to
5636 x86_supports_range_stepping.
5637 * server.c (handle_v_cont): Handle 'r' action.
5638 (handle_v_requests): Append ";r" if the target supports range
5639 stepping.
5640 * target.h (struct thread_resume) <step_range_start,
5641 step_range_end>: New fields.
5642 (struct target_ops) <supports_range_stepping>:
5643 New field.
5644 (target_supports_range_stepping): New macro.
5645
58794e1a
JB
56462013-05-17 Joel Brobecker <brobecker@adacore.com>
5647
5648 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5649 confusion in comment.
5650
d631c5a7
JB
56512013-05-17 Joel Brobecker <brobecker@adacore.com>
5652
5653 * lynx-low.c (struct process_info_private): New type.
5654 (lynx_add_process): New function.
5655 (lynx_create_inferior, lynx_attach): Replace calls to
5656 add_process by calls to lynx_add_process.
5657 (lynx_resume): If PTID is null, then try using
5658 current_process()->private->last_wait_event_ptid.
5659 Add comments.
5660 (lynx_clear_inferiors): Delete. The contents of that function
5661 has been inlined in lynx_mourn;
5662 (lynx_wait_1): Save the ptid in the process's private data.
5663 (lynx_mourn): Free the process' private data. Replace call
5664 to lynx_clear_inferiors by call to clear_inferiors.
5665
96f7a20f
YQ
56662013-05-17 Yao Qi <yao@codesourcery.com>
5667
5668 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5669 the right place.
5670
db0dfaa0
LM
56712013-05-16 Luis Machado <lgustavo@codesourcery.com>
5672
5673 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5674 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5675 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5676 PT_TEXT_END_ADDR guards. Update comments.
5677 (linux_target_op) <read_offsets>: Conditionally define to
5678 linux_read_offsets if the target is UCLIBC and if it defines
5679 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5680
68f5f838
SL
56812013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5682 Andrew Jenner <andrew@codesourcery.com>
5683
5684 * Makefile.in (SFILES): Add linux-nios2-low.c.
5685 (clean): Add action to delete nios2-linux.c.
5686 (nios2-linux.c): New rule.
5687 * configure.srv: Add nios2*-*-linux*.
5688 * linux-nios2-low.c: New.
5689
1ebff1fd
HAQ
56902013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5691
5692 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5693
f6150862
HZ
56942013-04-25 Hui Zhu <hui@codesourcery.com>
5695
5696 PR gdb/15186
f6150862
HZ
5697 * ax.c (ax_printf): Add fflush.
5698
614c279d
TT
56992013-04-22 Tom Tromey <tromey@redhat.com>
5700
5701 * Makefile.in (SFILES): Add filestuff.c.
5702 (OBS): Add filestuff.o.
5703 (filestuff.o): New target.
5704 * config.in, configure: Rebuild.
5705 * configure.ac: Check for fdwalk, pipe2.
5706
7d4e5717
PA
57072013-04-17 Pedro Alves <palves@redhat.com>
5708
5709 * configure.ac (USE_THREAD_DB): Delete variable.
5710 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5711 Don't AC_SUBST USE_THREAD_DB.
5712 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5713 * config.in, configure: Regenerate.
5714
d5c93e41
PA
57152013-04-16 Pedro Alves <palves@redhat.com>
5716
5717 * linux-low.h (struct lwp_info) <thread_known>: Move under
5718 the USE_THREAD_DB #ifdef.
5719
04f5fe89
PA
57202013-04-16 Pedro Alves <palves@redhat.com>
5721
5722 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5723 (linux-low.o): Delete rule.
5724 * linux-low.h: Always include "gdb_thread_db.h" instead of
5725 conditionally including thread_db.h.
5726 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5727 HAVE_THREAD_DB_H.
5728
480b27bf
JK
57292013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5730
5731 * Makefile.in (install-only): Fix make install regression.
5732
43662968
JK
57332013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5734
5735 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5736 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5737 installation.
5738 * gdbserver.1: Remove.
5739
3e74e146
PA
57402013-03-22 Pedro Alves <palves@redhat.com>
5741
5742 * linux-low.c (handle_extended_wait): Don't call
5743 linux_enable_event_reporting.
5744
a8347a2a
TT
57452013-03-15 Tony Theodore <tonyt@logyst.com>
5746
5747 PR build/9098:
5748 * Makefile.in (SHELL): Use @SHELL@.
5749
eeb56fa7
SDJ
57502013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5751
5752 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5753 compiler warning.
5754
4fa7e2ff
JB
57552013-03-13 Joel Brobecker <brobecker@adacore.com>
5756
5757 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5758 Remove extraneous NULL element.
5759
8ddb1965
YQ
57602013-03-13 Yao Qi <yao@codesourcery.com>
5761
5762 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5763 'V' block in trace frame.
5764
9accd112
MM
57652013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5766
5767 * target.h (struct target_ops): Add btrace ops.
5768 (target_supports_btrace): New macro.
5769 (target_enable_btrace): New macro.
5770 (target_disable_btrace): New macro.
5771 (target_read_btrace): New macro.
5772 * gdbthread.h (struct thread_info): Add btrace field.
5773 * server.c: Include btrace-common.h.
5774 (handle_btrace_general_set): New function.
5775 (handle_btrace_enable): New function.
5776 (handle_btrace_disable): New function.
5777 (handle_general_set): Call handle_btrace_general_set.
5778 (handle_qxfer_btrace): New function.
5779 (struct qxfer qxfer_packets[]): Add btrace entry.
5780 * inferiors.c (remove_thread): Disable btrace.
5781 * linux-low: Include linux-btrace.h.
5782 (linux_low_enable_btrace): New function.
5783 (linux_low_read_btrace): New function.
5784 (linux_target_ops): Add btrace ops.
5785 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5786 Add srv_linux_btrace=yes.
5787 (x86_64-*-linux*): Add linux-btrace.o.
5788 Add srv_linux_btrace=yes.
5789 * configure.ac: Define HAVE_LINUX_BTRACE.
5790 * config.in: Regenerated.
5791 * configure: Regenerated.
5792
5cc22e4c
MM
57932013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5794
5795 * server.c (handle_qxfer): Preserve error message if -3 is
5796 returned.
5797 (qxfer): Document the -3 return value.
5798
7c97f91e
MM
57992013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5800
5801 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5802 (linux_btrace_h): New variable.
5803 (linux-btrace.o): New rule.
5804
be9a119c 58052013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5806 Hafiz Abid Qadeer <abidh@codesourcery.com>
5807
5808 * tracepoint.c (trace_buffer_size): New global.
5809 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5810 (init_trace_buffer): Change to one-argument function. Allocate
5811 trace buffer memory.
5812 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5813 handle QTBuffer:size packet.
5814 (cmd_bigqtbuffer_size): New function.
5815 (initialize_tracepoint): Call init_trace_buffer with
5816 DEFAULT_TRACE_BUFFER_SIZE.
5817 * server.c (handle_query): Add QTBuffer:size in the
5818 supported packets.
5819
e64f7499
YQ
58202013-03-07 Yao Qi <yao@codesourcery.com>
5821
5822 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5823 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5824 of -1.
5825 (cmd_qtsp): Adjust condition. Do post increment.
5826 Set cur_action and cur_step_action back to 0.
5827
f0ae6fc3
PA
58282013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5829
5830 PR server/15236
5831 * linux-low.c (linux_write_memory): Return early success if LEN is
5832 zero.
5833
b5b0b0af
CV
58342013-03-05 Corinna Vinschen <vinschen@redhat.de>
5835
334ad4a8 5836 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5837
589bc927
TT
58382013-02-28 Tom Tromey <tromey@redhat.com>
5839
5840 * configure.ac: Invoke AC_SYS_LARGEFILE.
5841 * configure, config.in: Rebuild.
5842
dfe07582
CV
58432013-02-28 Corinna Vinschen <vinschen@redhat.com>
5844
5845 * win32-low.c: Throughout, fix format strings and casts of
5846 printf-like functions to avoid type related warnings on all
5847 platforms.
5848 (get_child_debug_event): Print dwDebugEventCode as hex since
5849 that's how it's usually documented.
5850
736cd585
YQ
58512013-02-28 Yao Qi <yao@codesourcery.com>
5852
5853 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5854 pulongest.
5855
e1f58301
JW
58562013-02-27 Jiong Wang <jiwang@tilera.com>
5857
5858 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5859 (reg-tilegx32.c): New rule.
5860 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5861 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5862 different register info initializer according to elf class.
5863 (init_registers_tilgx32): New function. The tilegx32 register info
5864 initializer.
5865 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5866 (tile_store_gregset): Likewise.
5867
d171ca78
YQ
58682013-02-27 Yao Qi <yao@codesourcery.com>
5869
5870 * server.c (process_point_options): Print debug message when
5871 debug_threads is true.
5872
282bbdf3
YQ
58732013-02-26 Yao Qi <yao@codesourcery.com>
5874
5875 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5876
aca22551
PA
58772013-02-19 Pedro Alves <palves@redhat.com>
5878 Kai Tietz <ktietz@redhat.com>
5879
5880 PR gdb/15161
5881
5882 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5883 instead of strtoul to extract address from packet.
5884 (process_serial_event) <'z'>: Likewise.
5885
4f3cee1c
YQ
58862013-02-18 Yao Qi <yao@codesourcery.com>
5887
5888 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5889
8e1d55a3
PA
58902013-02-14 Pedro Alves <palves@redhat.com>
5891
5892 Plug memory leak.
5893
5894 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5895 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5896
458820da
PA
58972013-02-14 Pedro Alves <palves@redhat.com>
5898
5899 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5900
baea0dae
PA
59012013-02-14 Pedro Alves <palves@redhat.com>
5902
5903 * tracepoint.c (save_string): Delete.
5904 (add_tracepoint_action): Use savestring instead of save_string.
5905
0b1afbb3
PA
59062013-02-12 Pedro Alves <palves@redhat.com>
5907
5908 * linux-xtensa-low.c: Ditto.
5909 * xtensa-xtregs.c: Ditto.
5910
8a4ac37e
PA
59112013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5912
5913 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5914 thread_db.
5915
148de6bb
MS
59162013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5917
5918 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5919 aarch64_num_wp_regs and aarch64_num_bp_regs to
5920 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5921
55fac6e0
MS
59222013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5923
5924 * linux-aarch64-low.c (ps_get_thread_area): Replace
5925 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5926
176eb98c
MS
59272013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5928 Marcus Shawcroft <marcus.shawcroft@arm.com>
5929 Nigel Stephens <nigel.stephens@arm.com>
5930 Yufeng Zhang <yufeng.zhang@arm.com>
5931
5932 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5933 (aarch64.c, aarch64-without-fpu.c): New targets.
5934 * configure.srv (aarch64*-*-linux*): New.
5935 * linux-aarch64-low.c: New file.
5936
56f7af9c
MS
59372013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5938
43aaf8b6 5939 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5940 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5941 (dequeue_one_deferred_signal, linux_resume_one_thread)
5942 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5943 (linux_tracefork_grandchild, linux_test_for_tracefork)
5944 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5945 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5946 where the argument is 0.
5947
60f662b0
YQ
59482013-01-25 Yao Qi <yao@codesourcery.com>
5949
5950 * event-loop.c: Include "queue.h".
5951 (gdb_event_p): New typedef.
5952 (struct gdb_event) <next_event>: Remove.
5953 (event_queue): Change to QUEUE(gdb_event_p).
5954 (async_queue_event): Remove.
5955 (gdb_event_xfree): New.
5956 (initialize_event_loop): New.
5957 (process_event): Use API from QUEUE.
5958 (wait_for_event): Likewise.
5959 * server.c (main): Call initialize_event_loop.
5960 * server.h (initialize_event_loop): Declare.
5961
5ae4861a
YQ
59622013-01-18 Yao Qi <yao@codesourcery.com>
5963
5964 * ax.h (struct eval_agent_expr_context): New.
5965 (gdb_eval_agent_expr): Update declaration.
5966 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5967 TFRAME. Add new argument CTX.
5968 * server.h (struct eval_agent_expr_context): Declare.
5969 (agent_mem_read, agent_tsv_read): Update declaration.
5970 (agent_mem_read_string): Likewise.
5971 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5972 (add_traceframe_block): Add new argument TPOINT.
5973 Increase TPOINT->traceframe_usage.
5974 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5975 eval_tracepoint_agent_expr.
5976 (condition_true_at_tracepoint): Likewise.
5977 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5978 (agent_mem_read_string, agent_tsv_read): Likewise.
5979
85e00e85
YQ
59802013-01-16 Yao Qi <yao@codesourcery.com>
5981
5982 * linux-low.c (linux_resume_one_lwp): Don't check
5983 'lwp->bp_reinsert != 0'.
5984
4039cf45
JB
59852013-01-07 Joel Brobecker <brobecker@adacore.com>
5986 Pedro Alves <palves@redhat.com>
5987
5988 * lynx-low.c (ptrace_request_to_str): Define a temporary
5989 macro and use it to simplify this function's implementation.
5990
9044dee2
JB
59912013-01-07 Joel Brobecker <brobecker@adacore.com>
5992
5993 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5994 sets errno.
5995
e6352c8f
JB
59962013-01-07 Joel Brobecker <brobecker@adacore.com>
5997
5998 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5999
50681a27
JB
60002013-01-07 Joel Brobecker <brobecker@adacore.com>
6001
6002 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6003
3f6e77ef
JB
60042013-01-07 Joel Brobecker <brobecker@adacore.com>
6005
6006 * lynx-low.c (lynx_resume): Use the resume_info parameter
6007 to determine the ptid for the lynx_ptrace call, unless
6008 it is equal to minus_one_ptid, in which case we use the
6009 ptid of the current_inferior.
6010 (lynx_wait_1): After having received a thread create/exit
6011 event, resume the inferior's execution using the signaling
6012 thread's ptid, rather than the old ptid.
6013
7fda33ae
JB
60142013-01-07 Joel Brobecker <brobecker@adacore.com>
6015
6016 * lynx-low.c (lynx_resume): Delete variable ret.
6017
b9786c74
JB
60182013-01-01 Joel Brobecker <brobecker@adacore.com>
6019
6020 * gdbreplay.c (gdbreplay_version): Update copyright year.
6021 * server.c (gdbserver_version): Likewise.
6022
8b93d60f
JB
60232012-12-17 Joel Brobecker <brobecker@adacore.com>
6024
6025 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6026 new thread.
6027
037335a7
JB
60282012-12-17 Joel Brobecker <brobecker@adacore.com>
6029
6030 * lynx-low.c (ptrace_request_to_str): Add handling for
6031 PTRACE_GETTRACESIG.
6032
52d4cbd8
JB
60332012-12-17 Joel Brobecker <brobecker@adacore.com>
6034
6035 * lynx-low.c (lynx_attach): Delete variable new_process.
6036
ab8f6ca9
JB
60372012-12-17 Joel Brobecker <brobecker@adacore.com>
6038
6039 * lynx-low.c (lynx_create_inferior): Delete variable
6040 new_process.
6041
78cbc024
JB
60422012-12-17 Joel Brobecker <brobecker@adacore.com>
6043
6044 * lynx-low.c (ptrace_request_to_str): Do not handle
6045 PTRACE_GETTHREADLIST if this macro does not exist.
6046
14a00470
YQ
60472012-12-15 Yao Qi <yao@codesourcery.com>
6048
6049 * Makefile.in (OBS): Add notif.o.
6050 * notif.c, notif.h: New.
6051 * server.c: Include "notif.h".
6052 (struct vstop_notif) <next>: Remove.
6053 <base>: New field.
6054 (queue_stop_reply): Update.
6055 (push_event, send_next_stop_reply): Remove.
6056 (discard_queued_stop_replies): Update.
6057 (notif_stop): New variable.
6058 (handle_v_stopped): Remove.
6059 (handle_v_requests): Don't call handle_v_stopped. Call
6060 handle_ack_notif instead.
6061 (queue_stop_reply_callback): Call notif_event_enque instead
6062 of queue_stop_reply.
6063 (handle_status): Don't call send_next_stop_reply, call
6064 notif_write_event instead.
6065 (kill_inferior_callback): Likewise.
6066 (detach_or_kill_inferior_callback): Likewise.
6067 (main): Call initialize_notif.
6068 (process_serial_event): Call QUEUE_is_empty.
6069 (handle_target_event): Call notif_push instead of push event.
6070 * server.h (push_event): Remove declaration.
6071
61c125b9
TT
60722012-12-10 Tom Tromey <tromey@redhat.com>
6073
6074 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6075 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6076 macros.
6077 (.c.o): Rewrite.
6078 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6079 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6080 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6081 (amd64-linux-ipa.o, ax.o): Rewrite.
6082 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6083 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6084 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6085 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6086 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6087 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6088 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6089 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6090 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6091 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6092 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6093 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6094 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6095 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6096 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6097 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6098 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6099 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6100 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6101 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6102 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6103 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6104 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6105 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6106 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6107 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6108 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6109 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6110 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6111 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6112 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6113 (reg-tilegx.o): Remove.
6114 (all_object_files): New macro.
6115 Include .deps files.
6116 * aclocal.m4, configure: Rebuild.
6117 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6118 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6119 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6120
e90e9ad9
TT
61212012-12-05 Tom Tromey <tromey@redhat.com>
6122
6123 PR gdb/14917:
6124 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6125
02d403bf 61262012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6127
6128 * configure.ac: Check for linux/perf_event.h.
6129 * config.in: Regenerated.
6130 * configure: Regenerated.
6131
0270a750
PA
61322012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6133
6134 * hostio.c (handle_readlink): Decrease buffer size
6135 parameter passed to readlink by one byte.
6136
8c29b58e
YQ
61372012-11-26 Yao Qi <yao@codesourcery.com>
6138
6139 * configure.ac (build_warnings): Append '-Wempty-body'.
6140 * configure: Regenerated.
6141 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6142 body.
6143
8bdce1ff
PM
61442012-11-15 Pierre Muller <muller@sourceware.org>
6145
6146 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6147 * config.in: Regenerate.
6148 * configure: Regenerate.
6149 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6150 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6151 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6152 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6153 header.
6154 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6155 instead of <sys/wait.h> header.
6156 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6157
02d403bf 61582012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6159
6160 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6161 (various make rules): Remove -DGDBSERVER
6162
fbd5db48
YQ
61632012-11-09 Yao Qi <yao@codesourcery.com>
6164
6165 * spu-low.c (current_ptid): Move it to ..
6166 * gdbthread.h: ... here. New.
6167 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6168 * server.c (myresume, process_serial_event): Likewise.
6169 * thread-db.c (thread_db_find_new_threads): Likewise.
6170 * tracepoint.c (run_inferior_command): Likewise.
6171
b3dc46ff
AB
61722012-10-01 Andrew Burgess <aburgess@broadcom.com>
6173
6174 * server.c (handle_search_memory_1): Include access length in
6175 warning message.
6176
07c04788
HPN
61772012-09-05 Michael Brandt <michael.brandt@axis.com>
6178
6179 * linux-crisv32-low.c: Fix compile errors.
6180
918d227b
YQ
61812012-09-04 Yao Qi <yao@codesourcery.com>
6182
6183 * tracepoint.c (cmd_qtsv): Adjust debug message.
6184 Don't check CUR_TPOINT.
6185
18c1b81a
YQ
61862012-08-28 Yao Qi <yao@codesourcery.com>
6187
6188 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6189 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6190 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6191 Remove declarations of xmalloc, xreallloc, xstrdup and
6192 freeargv.
6193 * Makefile.in (libiberty_h): New.
6194 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6195 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6196
dc82f37b
YQ
61972012-08-23 Yao Qi <yao@codesourcery.com>
6198
6199 * server.h: Remove declaration of 'xsnprintf'.
6200
406b1477
KS
62012012-08-22 Keith Seitz <keiths@redhat.com>
6202
6203 * server.h: Include build-gnulib-gbserver/config.h.
6204 * gdbreplay.c: Likewise.
6205
e6712ff1
DE
62062012-08-08 Doug Evans <dje@google.com>
6207
6208 * Makefile.in (SFILES): Add gdb_vecs.c.
6209 (OBS): Add gdb_vecs.o.
6210 (gdb_vecs_h, host_defs_h): New variables.
6211 (thread-db.o): Add $(gdb_vecs_h) dependency.
6212 (gdb_vecs.o): New rule.
6213 * thread-db.c: #include "gdb_vecs.h".
6214 (thread_db_load_search): Use a vector to iterate over path elements.
6215 Handle text appearing after "$pdir".
6216
6217 * configure.ac: Add check for strstr.
6218 * config.in: Regenerate.
6219 * configure: Regenerate.
6220
7c3270ae
UW
62212012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6222
6223 * hostio.c (handle_pread): If pread fails, fall back to attempting
6224 lseek/read.
6225 (handle_pwrite): Likewise for pwrite.
6226
b62e2b27
UW
62272012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6228
6229 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6230 between unsupported TYPE and unimplementable ADDR/LEN combination.
6231 (arm_insert_point): Act on new return value.
6232
78a99e91
PA
62332012-07-31 Pedro Alves <palves@redhat.com>
6234
6235 * server.c (process_point_options): Only skip tokens if we find
6236 one that is unrecognized. Don't treat 'X' specially while
6237 skipping unrecognized tokens.
6238
fcf303ab
UW
62392012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6240
6241 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6242 to 4-byte-align HW breakpoint addresses for Thumb.
6243
7255706c
YQ
62442012-07-27 Yao Qi <yao@codesourcery.com>
6245
6246 PR remote/14161.
6247
6248 * server.h: Declare gdb_agent_about_to_close.
6249 * target.c (kill_inferior): Include "agent.h".
6250 New. Send command 'kill'.
6251 * target.h (kill_inferior): Removed macro.
6252 * tracepoint.c (gdb_agent_about_to_close): New.
6253 (gdb_agent_helper_thread): Handle command 'close'.
6254 Wait endlessly until the inferior stops.
6255 Install gdb_agent_remove_socket to atexit hook.
6256 (agent_socket_name): New static variable.
6257 (gdb_agent_socket_init): Replace local variable 'name' with
6258 'agent_socket_name'.
6259 (gdb_agent_remove_socket): New.
6260
5a3f286f
YQ
62612012-07-27 Yao Qi <yao@codesourcery.com>
6262
6263 * server.c (process_point_options): Stop at 'X' when parsing.
6264
961bd387
ME
62652012-07-19 Michael Eager <eager@eagercon.com>
6266
a261b8f5 6267 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6268 to hw_execute.
6269 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6270 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6271 hardware breakpoint.
6272
aa7c7447
JK
62732012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6274
6275 * gdbserver/linux-low.c (initialize_low): Call
6276 linux_ptrace_init_warnings.
6277
7f216e7c
DE
62782012-07-02 Doug Evans <dje@google.com>
6279
6280 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6281 pointer to int.
6282
d3ce09f5
SS
62832012-07-02 Stan Shebs <stan@codesourcery.com>
6284
6285 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6286 (ax.o): Add it to build rule.
6287 (ax-ipa.o): Ditto.
6288 (OBS): Add format.o.
6289 (IPA_OBS): Add format.o.
6290 * server.c (handle_query): Claim support for breakpoint commands.
6291 (process_point_options): Add command case.
6292 (process_serial_event): Leave running if there are printfs in
6293 effect.
6294 * mem-break.h (any_persistent_commands): Declare.
6295 (add_breakpoint_commands): Declare.
6296 (gdb_no_commands_at_breakpoint): Declare.
6297 (run_breakpoint_commands): Declare.
6298 * mem-break.c (struct point_command_list): New struct.
6299 (struct breakpoint): New field command_list.
6300 (any_persistent_commands): New function.
6301 (add_commands_to_breakpoint): New function.
6302 (add_breakpoint_commands): New function.
6303 (gdb_no_commands_at_breakpoint): New function.
6304 (run_breakpoint_commands): New function.
6305 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6306 locally.
6307 * ax.c: Include format.h.
6308 (ax_printf): New function.
6309 (gdb_eval_agent_expr): Add printf opcode.
6310
2f8f6aed
YQ
63112012-06-13 Yao Qi <yao@codesourcery.com>
6312
6313 * server.c (start_inferior): Remove duplicated writes to fields
6314 'last_resume_kind' and 'last_status' of 'current_inferior'.
6315
0c9070b3
YQ
63162012-06-12 Yao Qi <yao@codesourcery.com>
6317 Pedro Alves <palves@redhat.com>
6318
6319 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6320 comment.
6321 * server.c (handle_v_cont): Extend comment.
6322
c52daf70
YQ
63232012-06-11 Yao Qi <yao@codesourcery.com>
6324
6325 * linux-low.c (linux_attach): Add 'static'.
6326
d38bbb0a
YQ
63272012-06-06 Yao Qi <yao@codesourcery.com>
6328
6329 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6330
89dc0afd
JK
63312012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6332
6333 Fix gcc -flto compilation warning.
6334 * server.c (main): Make variable multi_mode and attach volatile.
6335
75f62ce7
TJB
63362012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6337
6338 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6339 if the platform doesn't know about it.
6340
65f479b6
PA
63412012-05-30 Jeff Kenton <jkenton@tilera.com>
6342
6343 * Makefile.in (SFILES): Add linux-tile-low.c.
6344 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6345 * configure.srv: Handle tilegx-*-linux*.
6346 * linux-tile-low.c: New file.
6347
0c5bf5a9
JK
63482012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6349
6350 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6351
a493e3e2
PA
63522012-05-24 Pedro Alves <palves@redhat.com>
6353
6354 PR gdb/7205
6355
43aaf8b6 6356 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6357
2ea28649
PA
63582012-05-24 Pedro Alves <palves@redhat.com>
6359
6360 PR gdb/7205
6361
6362 Replace target_signal with gdb_signal throughout.
6363
8d409d16
MR
63642012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6365
6366 * linux-low.c (linux_store_registers): Avoid the copying sequence
6367 when no data has been retrieved by ptrace.
6368
23512c01
MGD
63692012-05-22 Will Deacon <will.deacon@arm.com>
6370
6371 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6372 Include asm/ptrace.h.
6373 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6374 already defined.
6375
4934b29e
MR
63762012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6377
6378 * linux-low.c (linux_store_registers): Don't re-retrieve data
6379 with ptrace that has already been obtained from /proc. Always
6380 copy any data retrieved with ptrace to the buffer supplied.
6381
bde24c0a
PA
63822012-05-11 Yao Qi <yao@codesourcery.com>
6383 Pedro Alves <palves@redhat.com>
6384
6385 * linux-low.c (enum stopping_threads_kind): New.
6386 (stopping_threads): Change type to `enum stopping_threads_kind'.
6387 (handle_extended_wait): If stopping and suspending threads, leave
6388 the new_lwp suspended too.
6389 (linux_wait_for_event): Adjust.
6390 (stop_all_lwps): Set `stopping_threads' to
6391 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6392 whether we're suspending threads or just stopping them. Assert no
6393 recursion happens.
6394
623b6bdf
YQ
63952012-04-29 Yao Qi <yao@codesourcery.com>
6396
6397 * server.h: Move some code to ...
6398 * gdbthread.h: ... here. New.
6399 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6400 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6401 (nto-low.o, win32-low.o): Likewise.
6402 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6403 * regcache.c, remote-utils.c, server.c: Likewise.
6404 * target.c, tracepoint.c, win32-low.c: Likewise.
6405
f15f9948
TJB
64062012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6407
6408 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6409 (PTRACE_ARG4_TYPE): Likewise.
6410 (PTRACE_XFER_TYPE): Likewise.
6411 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6412 ptrace to PTRACE_ARG3_TYPE.
6413 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6414 (PTRACE_ARG4_TYPE): Likewise.
6415 (PTRACE_XFER_TYPE): Likewise.
6416 (linux_detach_one_lwp): Cast fourth argument of
6417 ptrace to long then PTRACE_ARG4_TYPE.
6418 (regsets_fetch_inferior_registers): Cast third argument of
6419 ptrace to long then PTRACE_ARG3_TYPE.
6420 (regsets_store_inferior_registers): Likewise.
6421
38ea300a
PA
64222012-04-20 Pedro Alves <palves@redhat.com>
6423
6424 * configure: Regenerate.
6425
c971b7fa
PA
64262012-04-19 Pedro Alves <palves@redhat.com>
6427
43aaf8b6 6428 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6429 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6430 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6431 (all, install-only, uninstall, clean-info, all-lib, clean): No
6432 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6433 (maintainer-clean realclean distclean): Use subdir_do.
6434 (subdir_do): New.
6435 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6436 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6437 * acinclude.m4: Include acx_configure_dir.m4.
6438 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6439 calls. Call AC_PROG_RANLIB. Configure gnulib using
6440 ACX_CONFIGURE_DIR.
6441 (GNULIB): New.
6442 (GNULIB_STDINT_H): Adjust.
6443 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6444 * gdbreplay.c: Include build-gnulib/config.h.
6445 * server.h: Likewise.
6446 * aclocal.m4: Regenerate.
6447 * config.in: Regenerate.
6448 * configure: Regenerate.
c971b7fa 6449
809277f8
PA
64502012-04-19 Pedro Alves <palves@redhat.com>
6451
6452 * Makefile.in (LIBGNU, INCGNU): Adjust.
6453 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6454 (all, install-only, uninstall, clean-info, all-lib, clean)
6455 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6456 * configure.ac: Adjust AC_OUTPUT output.
6457 * aclocal.m4: Regenerate.
6458 * configure: Regenerate.
6459
fd9bb8b8
PA
64602012-04-19 Pedro Alves <palves@redhat.com>
6461
6462 * Makefile.in (generated_files): New.
6463 (server_h): Remove the explicit dependency on config.h, and depend
6464 on $generated_files.
6465
1c298c66
PA
64662012-04-19 Pedro Alves <palves@redhat.com>
6467
6468 * Makefile.in (INCGNU): Add -Ignulib.
6469
57c4b50b
PA
64702012-04-19 Pedro Alves <palves@redhat.com>
6471
6472 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6473 (INCGNU): ... this, and spell out -I here.
6474 (GNULIB_LIB): Rename to ...
6475 (LIBGNU): ... this.
6476 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6477
1030e047
PA
64782012-04-19 Pedro Alves <palves@redhat.com>
6479
6480 * config.in: Regenerate.
6481
447d4319
PA
64822012-04-19 Pedro Alves <palves@redhat.com>
6483
6484 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6485 * server.h (memmem): Remove declaration.
6486 * config.in: Regenerate.
6487 * configure: Regenerate.
6488
aad9eab9
YQ
64892012-04-19 Yao Qi <yao@codesourcery.com>
6490
6491 * Makefile.in (SFILES): Add common/vec.c.
6492 (OBS): Add vec.o.
6493 (vec.o): New rule.
6494
3e10640f
YQ
64952012-04-19 Yao Qi <yao@codesourcery.com>
6496
6497 * remote-utils.c (prepare_resume_reply): Replace with macro
6498 target_core_of_thread.
6499 * server.c (handle_qxfer_threads_proper): Likewise.
6500 * target.h (traget_core_of_thread): New macro.
6501
71622373
PA
65022012-04-18 Pedro Alves <palves@redhat.com>
6503
6504 * aclocal.m4: Regenerate.
6505 * configure: Regenerate.
6506
80d26939
YQ
65072012-04-16 Yao Qi <yao@codesourcery.com>
6508
6509 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6510 duplicated on address.
6511
42476b70
YQ
65122012-04-16 Yao Qi <yao@codesourcery.com>
6513
6514 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6515 (struct tracepoint_action_ops) <send>: New field.
6516 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6517 (agent_expr_send, x_tracepoint_action_send): New.
6518 (l_tracepoint_action_send): New.
6519 (cmd_qtdp): Download and install tracepoint
6520 according to `use_agent'.
6521 (run_inferior_command): Add one more parameter `len'.
6522 Update callers.
6523 (tracepoint_send_agent): New.
6524 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6525
7bc83639
YQ
65262012-04-16 Yao Qi <yao@codesourcery.com>
6527
6528 * tracepoint.c (download_tracepoints): Moved to ...
6529 (cmd_qtstart): ... here.
6530
5f18041e
YQ
65312012-04-14 Yao Qi <yao@codesourcery.com>
6532
6533 * tracepoint.c: Include inttypes.h.
6534 (struct collect_memory_action): Use sized types.
6535 (struct tracepoint): Likewise.
6536 (cmd_qtdp, stop_tracing): Update print specifiers.
6537 (cmd_qtp, response_tracepoint): Likewise.
6538 (collect_data_at_tracepoint): Likewise.
6539 (collect_data_at_step): Likewise.
6540
55a8c076
YQ
65412012-04-14 Yao Qi <yao@codesourcery.com>
6542
6543 Import gnulib module inttypes.
6544 * aclocal.m4, config.in, configure: Regenerated.
6545
dc750257
YQ
65462012-04-14 Yao Qi <yao@codesourcery.com>
6547
6548 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6549 Makefile and config.status at last.
6550
0ab5faf9
YQ
65512012-04-13 Yao Qi <yao@codesourcery.com>
6552
6553 * tracepoint.c: Include stdint.h unconditionally.
6554
18f5fd81
TJB
65552012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6556
6557 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6558 on BFD_HAVE_SYS_PROCFS_TYPE.
6559 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6560 * configure: Regenerate.
6561 * config.in: Likewise.
6562
4d47af5c
L
65632012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6564
6565 * Makefile.in (clean): Also remove x32.c x32-linux.c
6566 x32-avx.c x32-avx-linux.c.
6567 (x32.o): New target.
6568 (x32.c): Likewise.
6569 (x32-linux.o): Likewise.
6570 (x32-linux.c): Likewise.
6571 (x32-avx.o): Likewise.
6572 (x32-avx.c): Likewise.
6573 (x32-avx-linux.o): Likewise.
6574 (x32-avx-linux.c): Likewise.
6575
6576 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6577 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6578 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6579 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6580 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6581 i386/x32-avx-linux.xml.
6582
6583 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6584 (init_registers_x32_avx_linux): Likwise.
6585 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6586 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6587
ecedbe58
PA
65882012-04-13 Pedro Alves <palves@redhat.com>
6589
6590 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6591 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6592 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6593 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6594 the sub-make.
6595
c92b5177
L
65962012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6597
6598 * linux-x86-low.c (compat_x32_clock_t): New.
6599 (compat_x32_siginfo_t): Likewise.
6600 (compat_x32_siginfo_from_siginfo): Likewise.
6601 (siginfo_from_compat_x32_siginfo): Likewise.
6602 (linux_is_elf64): Likewise.
6603 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6604 and siginfo_from_compat_x32_siginfo for x32.
6605 (x86_arch_setup): Set linux_is_elf64.
6606
214d508e
L
66072012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6608
6609 PR gdb/13969
6610 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6611 e_machine field.
6612 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6613 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6614 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6615 compatible with process.
6616
c9a1864a
YQ
66172012-04-12 Yao Qi <yao@codesourcery.com>
6618
6619 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6620 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6621 (install-only, install-info, clean): Handle sub dir gnulib.
6622 (all-lib, am--refresh): New targets.
6623 (memmem.o): Remove target.
6624 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6625 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6626 (AC_REPLACE_FUNCS): Remove memmem.
6627 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6628 (AC_OUTPUT): Generate Makefile in gnulib/.
6629 * aclocal.m4, config.in, configure: Regenerated.
6630
367ba2c2
MR
66312012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6632
6633 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6634
9d236627
PA
66352012-04-05 Pedro Alves <palves@redhat.com>
6636
6637 -Werror=strict-aliasing
6638
6639 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6640 pointer.
6641
111217b3
PA
66422012-04-04 Pedro Alves <palves@redhat.com>
6643
6644 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6645 (sparc_store_gregset_from_stack, sparc_store_gregset)
6646 (sparc_breakpoint_at): Fix formatting.
6647
8365dcf5
TJB
66482012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6649
6650 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6651 are available.
6652 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6653 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6654 * config.in: Regenerate.
6655 * configure: Likewise.
6656
689cc2ae
PA
66572012-03-29 Pedro Alves <palves@redhat.com>
6658
6659 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6660 Correct ptrace arguments.
6661
c14dfd32
PA
66622012-03-28 Pedro Alves <palves@redhat.com>
6663
6664 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6665 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6666 (IA64_FR1_REGNUM): New defines.
6667 (ia64_fetch_register): New.
6668 (the_low_target): Install it.
6669 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6670 field.
6671 * linux-low.c (linux_fetch_registers): Try the
6672 the_low_target.fetch_register hook first.
6673
6674 * linux-arm-low.c (the_low_target): Adjust.
6675 * linux-bfin-low.c (the_low_target): Adjust.
6676 * linux-cris-low.c (the_low_target): Adjust.
6677 * linux-crisv32-low.c (the_low_target): Adjust.
6678 * linux-m32r-low.c (the_low_target): Adjust.
6679 * linux-m68k-low.c (the_low_target): Adjust.
6680 * linux-mips-low.c (the_low_target): Adjust.
6681 * linux-ppc-low.c (the_low_target): Adjust.
6682 * linux-s390-low.c (the_low_target): Adjust.
6683 * linux-sh-low.c (the_low_target): Adjust.
6684 * linux-sparc-low.c (the_low_target): Adjust.
6685 * linux-tic6x-low.c (the_low_target): Adjust.
6686 * linux-x86-low.c (the_low_target): Adjust.
6687 * linux-xtensa-low.c (the_low_target): Adjust.
6688
63c88e13
PA
66892012-03-26 Pedro Alves <palves@redhat.com>
6690
6691 * server.c (handle_qxfer_libraries): Don't bail early if
6692 the_target->qxfer_libraries_svr4 is not NULL.
6693
fb723180
PA
66942012-03-26 Pedro Alves <palves@redhat.com>
6695
6696 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6697
0afae3cf
PA
66982012-03-23 Pedro Alves <palves@redhat.com>
6699
6700 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6701 "library-list-svr4" element's start tag when the the DSO list is
6702 empty.
6703
485f1ee4
PA
67042012-03-23 Pedro Alves <palves@redhat.com>
6705
6706 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6707 a variable whose type size is the same as the inferior's pointer
6708 size.
6709
a5362b9a
TS
67102012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6711
6712 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6713 struct siginfo.
6714 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6715 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6716 * linux-low.h: Include <signal.h>.
6717 (struct siginfo): Remove forward declaration.
6718 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6719 struct siginfo.
6720
d226c142
MF
67212012-03-21 Mike Frysinger <vapier@gentoo.org>
6722
6723 * .gitignore: Ignore more files.
6724
122f36ef
PA
67252012-03-19 Pedro Alves <palves@redhat.com>
6726 Jan Kratochvil <jan.kratochvil@redhat.com>
6727
6728 * server.c (cont_thread, general_thread): Add describing comments.
6729 (start_inferior): Clear `cont_thread'.
6730 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6731 of a process.
6732
fc3e5175
YQ
67332012-03-15 Yao Qi <yao@codesourcery.com>
6734
6735 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6736 handling to ...
6737 (cmd_qtdp): ... here.
6738
8d0d92cd
YQ
67392012-03-15 Yao Qi <yao@codesourcery.com>
6740
6741 * tracepoint.c (struct tracepoint_action_ops): New.
6742 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6743 (m_tracepoint_action_download): New.
6744 (r_tracepoint_action_download): New.
6745 (x_tracepoint_action_download): New.
6746 (l_tracepoint_action_download): New.
6747 (add_tracepoint_action): Install `action->ops' according type.
6748 (download_tracepoint_1): Move code `download' function pointer
6749 of various tracepoint_action_ops.
6750
87b0bb13
JK
67512012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6752
6753 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6754 linux_ptrace_attach_warnings.
6755
5f572dec
JK
67562012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6757
6758 * Makefile.in (linux-ptrace.o): New.
6759 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6760 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6761 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6762 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6763 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6764 of these targets.
6765 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6766
f4647387
YQ
67672012-03-08 Yao Qi <yao@codesourcery.com>
6768 Pedro Alves <palves@redhat.com>
6769
6770 Fix PR server/13392.
6771 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6772 offset of JMP insn.
6773 * tracepoint.c (remove_tracepoint): New.
6774 (cmd_qtdp): Call remove_tracepoint when failed to install.
6775
9b224c5e
PA
67762012-03-07 Pedro Alves <palves@redhat.com>
6777
6778 * linux-low.c (get_detach_signal): New.
6779 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6780 Pass on pending signals to PTRACE_DETACH. Check the result of the
6781 ptrace call.
6782 * server.c (program_signals, program_signals_p): New.
6783 (handle_general_set): Handle QProgramSignals.
6784 * server.h (program_signals, program_signals_p): Declare.
6785
e237a7e2
JK
67862012-03-05 Pedro Alves <palves@redhat.com>
6787 Jan Kratochvil <jan.kratochvil@redhat.com>
6788
6789 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6790 New comment why.
6791
5808517f
YQ
67922012-03-03 Yao Qi <yao@codesourcery.com>
6793
6794 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6795 agent_look_up_symbols.
6796
58b4daa5
YQ
67972012-03-03 Yao Qi <yao@codesourcery.com>
6798
6799 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6800 (linux-x86-low.o): Likewise.
6801 * server.h: Remove in_process_agent_loaded.
6802 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6803 common/agent.c.
6804 Update callers.
6805
8ffcbaaf
YQ
68062012-03-03 Yao Qi <yao@codesourcery.com>
6807
6808 * tracepoint.c (gdb_agent_capability): New global.
6809 (in_process_agent_loaded_ust): Renamed to
6810 `in_process_agent_supports_ust'.
6811 Update callers.
6812 (in_process_agent_supports_ust): Call agent_capability_check.
6813 (clear_installed_tracepoints): Assert that agent supports
6814 agent.
6815
d1feda86
YQ
68162012-03-03 Yao Qi <yao@codesourcery.com>
6817
6818 * linux-low.c (linux_supports_agent): New.
6819 (linux_target_ops): Initialize field `supports_agent' with
6820 linux_supports_agent.
6821 * target.h (struct target_ops) <supports_agent>: New.
6822 (target_supports_agent): New macro.
6823 * server.c (handle_general_set): Handle packet 'QAgent'.
6824 (handle_query): Send `QAgent+'.
6825 * Makefile.in (server.o): Depends on agent.h.
6826
2fa291ac
YQ
68272012-03-03 Yao Qi <yao@codesourcery.com>
6828
6829 * Makefile.in (OBS): Add agent.o.
6830 Add new rule for agent.o.
6831 Track dependence of tracepoint.c on agent.h.
6832 * tracepoint.c (run_inferior_command_1):
6833 (run_inferior_command): Call agent_run_command.
6834 (gdb_ust_connect_sync_socket): Deleted. Move it to
6835 common/agent.c.
6836 (resume_thread, stop_thread): Likewise.
6837 (gdb_ust_socket_init): Renamed to ...
6838 (gdb_agent_socket_init): ... New.
6839 (gdb_ust_thread): Renamed to ...
6840 (gdb_agent_helper_thread): ... New.
6841 (gdb_ust_init): Move some code to ...
6842 (gdb_agent_init): ... here. New.
6843 [HAVE_UST]: Call gdb_ust_init.
6844 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6845 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6846 * config.in, configure: Regenerated.
6847
05044653
PA
68482012-03-02 Pedro Alves <palves@redhat.com>
6849
6850 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6851 * linux-low.c (struct simple_pid_list): New.
6852 (stopped_pids): New a struct simple_pid_list pointer.
6853 (add_to_pid_list, pull_pid_from_list): New.
6854 (handle_extended_wait): Don't assume the first signal new children
6855 report is SIGSTOP. Adjust call to pull_pid_from_list.
6856 (linux_wait_for_lwp): Adjust.
6857
8d00225b
YQ
68582012-03-02 Yao Qi <yao@codesourcery.com>
6859
6860 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6861 debug log.
6862
19560ba5
YQ
68632012-03-02 Yao Qi <yao@codesourcery.com>
6864
6865 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6866 `stop_pc' and `tpoint'. Update caller.
6867
1faeff08
MR
68682012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6869
6870 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6871 * linux-low.c (use_linux_regsets): New macro.
6872 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6873 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6874 (linux_register_in_regsets): New function.
6875 (usr_fetch_inferior_registers): Skip registers covered by
6876 regsets.
6877 (usr_store_inferior_registers): Likewise.
6878 (usr_fetch_inferior_registers): New macro.
6879 (usr_store_inferior_registers): Likewise.
6880 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6881 (linux_store_registers): Likewise.
6882 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6883 prototype.
6884 (init_registers_mips64_dsp_linux): Likewise.
6885 (init_registers_mips_linux): New macro.
6886 (init_registers_mips_dsp_linux): Likewise.
6887 (mips_dsp_num_regs): Likewise.
6888 (DSP_BASE, DSP_CONTROL): New fallback macros.
6889 (mips_base_regs): New macro.
6890 (mips_regmap): Use it. Fix the size.
6891 (mips_dsp_regmap): New variable.
6892 (mips_dsp_regset_bitmap): Likewise.
6893 (mips_arch_setup): New function.
6894 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6895 than mips_regmap.
6896 (mips_cannot_store_register): Likewise.
6897 (the_low_target): Update .arch_setup, .num_regs and .regmap
6898 initializers. Add .regset_bitmap initializer.
6899 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6900 initializer.
6901 * linux-bfin-low.c (the_low_target): Likewise.
6902 * linux-cris-low.c (the_low_target): Likewise.
6903 * linux-crisv32-low.c (the_low_target): Likewise.
6904 * linux-ia64-low.c (the_low_target): Likewise.
6905 * linux-m32r-low.c (the_low_target): Likewise.
6906 * linux-m68k-low.c (the_low_target): Likewise.
6907 * linux-ppc-low.c (the_low_target): Likewise.
6908 * linux-s390-low.c (the_low_target): Likewise.
6909 * linux-sh-low.c (the_low_target): Likewise.
6910 * linux-sparc-low.c (the_low_target): Likewise.
6911 * linux-tic6x-low.c (the_low_target): Likewise.
6912 * linux-x86-low.c (the_low_target): Likewise.
6913 * linux-xtensa-low.c (the_low_target): Likewise.
6914 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6915 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6916 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6917 srv_xmlfiles.
6918 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6919 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6920
c03e6ccc
YQ
69212012-02-29 Yao Qi <yao@codesourcery.com>
6922 Pedro Alves <palves@redhat.com>
6923
6924 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6925 `step_over_finished' is true.
6926
644cebc9
PA
69272012-02-27 Pedro Alves <palves@redhat.com>
6928
6929 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6930 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6931
c14d7ab2
PA
69322012-02-27 Pedro Alves <palves@redhat.com>
6933
6934 PR server/9684
6935 * linux-low.c (pid_is_stopped): New.
6936 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6937
412c89dd
LM
69382012-02-25 Luis Machado <lgustavo@codesourcery.com>
6939
6940 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6941 of conditions.
6942
b745defe
MR
69432012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6944
6945 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6946
9f3a5c85
LM
69472012-02-24 Luis Machado <lgustavo@codesourcery>
6948
6949 * server.c (handle_query): Advertise support for target-side
6950 breakpoint condition evaluation.
6951 (process_point_options): New function.
6952 (process_serial_event): When inserting a breakpoint, check for
6953 a target-side condition that should be evaluated.
6954
6955 * mem-break.c: Include regcache.h and ax.h.
6956 (point_cond_list_t): New data structure.
6957 (breakpoint) <cond_list>: New field.
6958 (find_gdb_breakpoint_at): Make non-static.
6959 (delete_gdb_breakpoint_at): Clear any target-side
6960 conditions.
6961 (clear_gdb_breakpoint_conditions): New function.
6962 (add_condition_to_breakpoint): Likewise.
6963 (add_breakpoint_condition): Likewise.
6964 (gdb_condition_true_at_breakpoint): Likewise.
6965 (gdb_breakpoint_here): Return result directly instead
6966 of going through a local variable.
6967
6968 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6969 (clear_gdb_breakpoint_conditions): Likewise.
6970 (add_breakpoint_condition): Likewise.
6971 (gdb_condition_true_at_breakpoint): Likewise.
6972
6973 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6974 (need_step_over_p): Take target-side breakpoint condition into
6975 consideration.
6976
5e1dc496
LM
69772012-02-24 Luis Machado <lgustavo@codesourcery>
6978
6979 * server.h: Include tracepoint.h.
6980 (agent_mem_read, agent_get_trace_state_variable_value,
6981 agent_set_trace_state_variable_value,
6982 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6983 get_set_tsv_func_addr): New prototypes.
6984
6985 * ax.h: New include file.
6986 * ax.c: New source file.
6987
6988 * tracepoint.c: Include ax.h.
6989 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6990 agent_expr, eval_result_type): Move to ax.h.
6991 (parse_agent_expr): Rename to ...
6992 (gdb_parse_agent_expr): ... this, make it non-static and move
6993 to ax.h.
6994 (unparse_agent_expr) Rename to ...
6995 (gdb_unparse_agent_expr): ... this, make it non-static and move
6996 to ax.h.
6997 (eval_agent_expr): Rename to ...
6998 (eval_tracepoint_agent_expr): ... this.
6999 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7000 forward declarations.
7001 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7002 (agent_get_trace_state_variable_value): New function.
7003 (agent_set_trace_state_variable_value): New function.
7004 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7005 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7006 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7007 (condition_true_at_tracepoint): Likewise.
7008 (parse_agent_expr): Rename to ...
7009 (gdb_parse_agent_expr): ... this and move to ax.c.
7010 (unparse_agent_expr): Rename to ...
7011 (gdb_unparse_agent_expr): ... this and move to ax.c.
7012 (gdb_agent_op_name): Move to ax.c.
7013 (eval_agent_expr): Rename to ...
7014 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7015 and move to ax.c.
7016 (eval_tracepoint_agent_expr): New function.
7017 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7018 non-static.
5e1dc496
LM
7019 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7020 ax.c.
7021 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7022 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7023 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7024 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7025 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7026 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7027 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7028 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7029 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7030 (compile_bytecodes): Remove forward declaration.
7031 (is_goto_target): Move to ax.c.
7032 (compile_bytecodes): Move to ax.c and call
7033 agent_get_trace_state_variable_value (...) and
7034 agent_set_trace_state_variable_value (...).
7035
7036 * Makefile.in: Update ax.c and IPA dependencies.
7037
277e4e52
PA
70382012-02-24 Pedro Alves <palves@redhat.com>
7039
7040 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7041 (cmd_bigqtbuffer_circular): ... this. Only handle
7042 'QTBuffer:circular:'.
7043 (handle_tracepoint_general_set): Adjust.
7044
bf4c19f7
YQ
70452012-02-16 Yao Qi <yao@codesourcery.com>
7046
7047 * inferiors.c: Move code to ...
7048 * dll.c: .... here. New.
7049 * server.h: Declare clear_dlls.
7050 * Makefile.in (SFILES): Add dll.c.
7051 (OBS): Add dll.o
7052 (dll.o): New rule.
7053
d73f2619
YQ
70542012-02-11 Yao Qi <yao@codesourcery.com>
7055
7056 * server.c: (handle_monitor_command): Add a new parameter
7057 `own_buf'.
7058 (handle_query): Update caller.
7059
f8255c2a
JB
70602012-02-09 Joel Brobecker <brobecker@adacore.com>
7061
7062 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7063 * configure, config.in: Regenerate.
7064 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7065 is not defined.
7066
da84f473
PA
70672012-02-02 Pedro Alves <palves@redhat.com>
7068
7069 Try SIGKILL first, then PTRACE_KILL.
7070 * linux-low.c (linux_kill_one_lwp): New.
7071 (linux_kill_one_lwp): Rename to ...
7072 (kill_one_lwp_callback): ... this. Use the new
7073 linux_kill_one_lwp.
7074
e886a173
PA
70752012-02-02 Pedro Alves <palves@redhat.com>
7076
7077 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7078 inferior.
7079
be07f1a2
PA
70802012-01-27 Pedro Alves <palves@redhat.com>
7081
7082 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7083 (elf_64_file_p): Make static.
7084 (linux_pid_exe_is_elf_64_file): New.
7085 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7086 Delete declarations.
7087 (linux_pid_exe_is_elf_64_file): Declare.
7088 * linux-x86-low.c (x86_arch_setup): Use
7089 linux_pid_exe_is_elf_64_file.
7090
d8301ad1
JK
70912012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7092
7093 * linux-low.c (linux_wait_for_event_1): Rename to ...
7094 (linux_wait_for_event): ... here and merge it with former
7095 linux_wait_for_event - new variable wait_ptid, use it.
7096 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7097
01b17894
PA
70982012-01-23 Pedro Alves <palves@redhat.com>
7099
7100 * server.c (main): Avoid yet another case of infinite loop while
7101 detaching/killing after a longjmp.
7102
e825046f
JK
71032012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7104
7105 Code cleanup.
7106 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7107
b9e7b9c3
UW
71082012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7109
7110 * hostio.c (handle_readlink): New function.
7111 (handle_vFile): Call it to handle "vFile:readlink" packets.
7112
901f9912
UW
71132012-01-20 Pedro Alves <palves@redhat.com>
7114 Ulrich Weigand <ulrich.weigand@linaro.org>
7115
7116 * server.c (handle_v_requests): Only support vAttach and vRun to
7117 start multiple processes when in extended protocol mode.
7118
fc1ab1a0
PA
71192012-01-17 Pedro Alves <palves@redhat.com>
7120
7121 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7122 memalign plus mprotect to allocate the scratch buffer.
7123
7d5d4e98
PA
71242012-01-13 Pedro Alves <palves@redhat.com>
7125
7126 * server.c (attach_inferior): Clear `cont_thread'.
7127
f128d5e9
PA
71282012-01-13 Pedro Alves <palves@redhat.com>
7129
7130 * server.c (main): Avoid infinite loop while detaching/killing
7131 after a longjmp.
7132
06db92f0
DE
71332012-01-09 Doug Evans <dje@google.com>
7134
7135 * server.c (start_inferior): Set last_ptid in --wrapper case.
7136
32d92999
YQ
71372012-01-06 Yao Qi <yao@codesourcery.com>
7138
7139 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7140 defined.
7141 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7142
5e0a92a9
YQ
71432012-01-04 Yao Qi <yao@codesourcery.com>
7144
7145 * tracepoint.c (cmd_qtdp): Print debug message
7146 for static tracepoint.
7147
ae639e8c
YQ
71482012-01-04 Yao Qi <yao@codesourcery.com>
7149
7150 * tracepoint.c (trace_vdebug): Differentiate debug message
7151 between gdbserver and IPA.
7152
f72429c5
YQ
71532012-01-03 Yao Qi <yao@codesourcery.com>
7154
7155 * tracepoint.c (tracepoint_was_hit): Don't collect for
7156 static tracepoint.
7157
12c3e59c
JB
71582012-01-02 Joel Brobecker <brobecker@adacore.com>
7159
7160 * terminal.h: Reformat copyright header.
7161
67827812
JB
71622012-01-02 Joel Brobecker <brobecker@adacore.com>
7163
7164 * server.c (gdbserver_version): Update copyright year.
7165 * gdbreplay.c (gdbreplay_version): Likewise.
7166
3e52c33d
JK
71672011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7168
7169 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7170
7171 Revert:
7172 2011-12-18 Hui Zhu <teawater@gmail.com>
7173 * linux-low.c (linux_create_inferior): Save return value to ret.
7174
66f1260e
HZ
71752011-12-18 Hui Zhu <teawater@gmail.com>
7176
7177 * linux-low.c (linux_create_inferior): Save return value to ret.
7178
e77616d7
DE
71792011-12-16 Doug Evans <dje@google.com>
7180
e7b06c57
DE
7181 * linux-low.c (linux_create_inferior): If stdio connection,
7182 redirect stdin from /dev/null, stdout to stderr.
7183 * remote-utils.c (remote_is_stdio): New static global.
7184 (remote_connection_is_stdio): New function.
7185 (remote_prepare): Handle stdio connection.
7186 (remote_open): Ditto.
7187 (remote_close): Don't close stdin for stdio connections.
7188 (read_prim,write_prim): New functions. Replace all calls to
7189 read/write to these.
7190 * server.c (main): Watch for "-" argument. Move call to
7191 remote_prepare before start_inferior.
7192 * server.h (STDIO_CONNECTION_NAME): New macro.
7193 (remote_connection_is_stdio): Declare.
7194
e77616d7
DE
7195 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7196 in debugging output.
7197
82067193
YQ
71982011-12-15 Yao Qi <yao@codesourcery.com>
7199
7200 * tracepoint.c: Include sys/syscall.h.
7201 (gdb_ust_thread): Remove preprocessor conditional.
7202
82bfbe7e
PA
72032011-12-14 Pedro Alves <pedro@codesourcery.com>
7204
7205 * linux-low.c (linux_detach_one_lwp): Call
7206 the_low_target.prepare_to_resume before detaching.
7207
712c6575
YQ
72082011-12-14 Yao Qi <yao@codesourcery.com>
7209
7210 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7211 of write.
7212
d54d1edf
YQ
72132011-12-14 Yao Qi <yao@codesourcery.com>
7214
7215 * i386-low.c (i386_low_stopped_data_address): Initialize local
7216 variable `control'.
7217
6210a125
PA
72182011-12-13 Pedro Alves <pedro@codesourcery.com>
7219
7220 PR remote/13492
7221
7222 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7223 DR_CONTROL unless necessary. Extend comments.
7224 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7225 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7226
2ece8244
YQ
72272011-12-13 Yao Qi <yao@codesourcery.com>
7228
7229 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7230 macros.
7231 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7232
784867a5
JK
72332011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7234
7235 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7236 Print new debug message for such case.
7237
6bf36717
JK
72382011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7239
7240 Fix overlapping memcpy.
7241 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7242 the read_inferior_memory transfer.
7243 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7244 write_inferior_memory transfer.
7245 (set_fast_tracepoint_jump): New variable buf. Use it for the
7246 read_inferior_memory and write_inferior_memory transfers.
7247 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7248 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7249 Use it for the write_inferior_memory transfer.
7250 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7251 buffers.
7252
50275556
MR
72532011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7254
7255 * linux-low.c (fetch_register, store_register): Make code
7256 consistent, fix formatting.
7257
7325beb4
MR
72582011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7259
7260 * linux-low.c (usr_store_inferior_registers): Factor out code
7261 to handle individual registers into...
7262 (store_register): ... this new function.
7263
c642a434
UW
72642011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7265
7266 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7267 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7268 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7269 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7270 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7271 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7272 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7273 (srv_xmlfiles): Add new XML files.
7274
7275 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7276 and <sys/uio.h>.
7277 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7278 (init_registers_s390_linux32v1): Add prototype.
7279 (init_registers_s390_linux32v2): Likewise.
7280 (init_registers_s390_linux64v1): Likewise.
7281 (init_registers_s390_linux64v2): Likewise.
7282 (init_registers_s390x_linux64v1): Likewise.
7283 (init_registers_s390x_linux64v2): Likewise.
7284 (s390_num_regs): Increment to 52.
7285 (s390_regmap): Add orig_r2 register.
7286 (s390_num_regs_3264): Increment to 68.
7287 (s390_regmap_3264): Add orig_r2 register.
7288 (s390_collect_ptrace_register): Handle orig_r2 register.
7289 (s390_supply_ptrace_register): Likewise.
7290 (s390_fill_last_break): New function.
7291 (s390_store_last_break): Likewise.
7292 (s390_fill_system_call): New function.
7293 (s390_store_system_call): Likewise.
7294 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7295 register sets.
7296 (s390_check_regset): New function.
7297 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7298 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7299 Update target_regsets for available register sets.
7300
2268b414
JK
73012011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7302 Jan Kratochvil <jan.kratochvil@redhat.com>
7303
7304 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7305 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7306 New.
7307 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7308 * linux-low.h (struct process_info_private): New member r_debug.
7309 * server.c (handle_qxfer_libraries): Call
7310 the_target->qxfer_libraries_svr4.
7311 (handle_qxfer_libraries_svr4): New function.
7312 (qxfer_packets): New entry "libraries-svr4".
7313 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7314 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7315 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7316 PACKET_qXfer_libraries_svr4.
7317
d6db1fab
UW
73182011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7319
7320 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7321 PSW address/mask between 8-byte and 16-byte formats.
7322 (s390_supply_ptrace_register): Likewise.
7323 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7324 basic addressing mode bit.
7325
242f5f1c
SS
73262011-11-24 Stan Shebs <stan@codesourcery.com>
7327
7328 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7329
f196051f
SS
73302011-11-17 Stan Shebs <stan@codesourcery.com>
7331
7332 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7333 (tracing_start_time): New global.
7334 (tracing_stop_time): New global.
7335 (tracing_user_name): New global.
7336 (tracing_notes): New global.
7337 (tracing_stop_note): New global.
7338 (cmd_qtstart): Set traceframe_usage, start_time.
7339 (stop_tracing): Set stop_time.
7340 (cmd_qtstatus): Report additional status.
7341 (cmd_qtp): New function.
7342 (handle_tracepoint_query): Call it.
7343 (cmd_qtnotes): New function.
7344 (handle_tracepoint_general_set): Call it.
7345 (get_timestamp): Rename from tsv_get_timestamp.
7346
405f8e94
SS
73472011-11-14 Stan Shebs <stan@codesourcery.com>
7348 Kwok Cheung Yeung <kcy@codesourcery.com>
7349
7350 * linux-x86-low.c (small_jump_insn): New.
7351 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7352 trampoline and error message, build a trampoline and issue a small
7353 jump instruction to it.
7354 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7355 trampoline and error message.
7356 (x86_get_min_fast_tracepoint_insn_len): New.
7357 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7358 * linux-low.h (struct linux_target_ops): Add arguments to
7359 install_fast_tracepoint_jump_pad operation, add new operation.
7360 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7361 arguments.
7362 (linux_get_min_fast_tracepoint_insn_len): New function.
7363 (linux_target_op): Add new operation.
7364 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7365 (gdb_trampoline_buffer_end): Ditto.
7366 (gdb_trampoline_buffer_error): Ditto.
7367 (struct ipa_sym_addresses): Add fields for new IPA variables.
7368 (symbol_list): Add entries for new IPA variables.
7369 (struct tracepoint): Add fields to hold the address range of the
7370 trampoline used by the tracepoint.
7371 (trampoline_buffer_head): New static variable.
7372 (trampoline_buffer_tail): Ditto.
7373 (claim_trampoline_space): New function.
7374 (have_fast_tracepoint_trampoline_buffer): New function.
7375 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7376 structure.
7377 (install_fast_tracepoint): Ditto, also add error buffer argument.
7378 (cmd_qtminftpilen): New function.
7379 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7380 (fast_tracepoint_from_trampoline_address): New function.
7381 (fast_tracepoint_collecting): Handle trampoline as part of jump
7382 pad space.
7383 (set_trampoline_buffer_space): New function.
7384 (initialize_tracepoint): Initialize new IPA variables.
7385 * target.h (struct target_ops): Add arguments to
7386 install_fast_tracepoint_jump_pad operation, add new
7387 get_min_fast_tracepoint_insn_len operation.
7388 (target_get_min_fast_tracepoint_insn_len): New.
7389 (install_fast_tracepoint_jump_pad): Add arguments.
7390 * server.h (IPA_BUFSIZ): Define.
7391 * linux-i386-ipa.c: Include extra header files.
7392 (initialize_fast_tracepoint_trampoline_buffer): New function.
7393 (initialize_low_tracepoint): Call it.
7394 * server.h (set_trampoline_buffer_space): Declare.
7395 (claim_trampoline_space): Ditto.
7396 (have_fast_tracepoint_trampoline_buffer): Ditto.
7397
1e4d1764
YQ
73982011-11-14 Yao Qi <yao@codesourcery.com>
7399
7400 * server.c (handle_query): Handle InstallInTrace for qSupported.
7401 * tracepoint.c (add_tracepoint): Sort list.
7402 (install_tracepoint, download_tracepoint): New.
7403 (cmd_qtdp): Call them to install and download tracepoints.
7404 (sort_tracepoints): Removed.
7405 (cmd_qtstart): Update.
7406
5c73ff4e
YQ
74072011-11-14 Yao Qi <yao@codesourcery.com>
7408
7409 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7410 * mem-break.h: Declare.
7411 * tracepoint.c (cmd_qtstart): Move some code to ...
7412 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7413 New.
7414 (download_tracepoints): Move some code to ...
7415 (download_tracepoint_1): ... here. New.
7416
86a30030
YQ
74172011-11-08 Yao Qi <yao@codesourcery.com>
7418
7419 * remote-utils.c (relocate_instruction): A comment fix.
7420
8d26e50c
JB
74212011-11-07 Joel Brobecker <brobecker@adacore.com>
7422
7423 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7424 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7425 dr_status_mirror and dr_control_mirror from debug_reg_state.
7426 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7427 (i386_initial_stuff): Remove use of deleted globals.
7428 (i386_get_thread_context, i386_set_thread_context,
7429 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7430 from debug_reg_state.
7431
a59306a3
YQ
74322011-11-05 Yao Qi <yao@codesourcery.com>
7433
7434 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7435 address as TPOINT's.
7436
3065dfb6
SS
74372011-11-02 Stan Shebs <stan@codesourcery.com>
7438
7439 * tracepoint.c (agent_mem_read_string): New function.
7440 (eval_agent_expr): Call it for tracenz.
7441 * server.c (handle_query): Report support for tracenz.
7442
fd0d8c7c
YQ
74432011-11-02 Yao Qi <yao@codesourcery.com>
7444
7445 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7446
609086b1
YQ
74472011-11-02 Yao Qi <yao@codesourcery.com>
7448
7449 * target.h: Fix a typo in comment.
7450
b9fd1791
PA
74512011-10-31 Pedro Alves <pedro@codesourcery.com>
7452
7453 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7454 clobber the breakpoints' shadows with fast tracepoint jumps.
7455 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7456 * target.c (write_inferior_memory): Also pass MYADDR down to
7457 check_mem_write.
7458
03583c20
UW
74592011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7460
7461 * configure.ac: Check support for personality routine.
7462 * configure: Regenerate.
7463 * config.in: Likewise.
7464 * linux-low.c: Include <sys/personality.h>.
7465 Define ADDR_NO_RANDOMIZE if necessary.
7466 (linux_create_inferior): Disable address space randomization when
7467 forking inferior, if requested.
7468 (linux_supports_disable_randomization): New function.
7469 (linux_target_ops): Install it.
7470 * server.h (disable_randomization): Declare.
7471 * server.c (disable_randomization): New global variable.
7472 (handle_general_set): Handle QDisableRandomization.
7473 (handle_query): Likewise for qSupported.
7474 (main): Support --disable-randomization and --no-disable-randomization
7475 command line arguments.
7476 * target.h (struct target_ops): Add supports_disable_randomization.
7477 (target_supports_disable_randomization): New macro.
7478
723b724b
MF
74792011-09-29 Mike Frysinger <vapier@gentoo.org>
7480
7481 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7482 ifdef check.
7483 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7484 [!PT_GETDSBT] (target_loadmap): New definition.
7485 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7486 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7487 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7488 and PT_GETDSBT to LINUX_LOADMAP.
7489 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7490 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7491
55329a5c 74922011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7493
7494 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7495 (arm_linux_hwbp_cap): New static variable.
7496 (arm_linux_get_hwbp_cap): Replace by ...
7497 (arm_linux_init_hwbp_cap): ... this new function.
7498 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7499 (arm_linux_get_hw_watchpoint_count): Likewise.
7500 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7501 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7502 (arm_prepare_to_resume): Use perror_with_name instead of error.
7503
55329a5c 75042011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7505
7506 * linux-arm-low.c: Include <signal.h>.
7507 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7508 (struct arm_linux_hwbp_cap): New data type.
7509 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7510 (struct arm_linux_hw_breakpoint): New data type.
7511 (MAX_BPTS, MAX_WPTS): Define.
7512 (struct arch_process_info, struct arch_lwp_info): New data types.
7513 (arm_linux_get_hwbp_cap): New function.
7514 (arm_linux_get_hw_breakpoint_count): Likewise.
7515 (arm_linux_get_hw_watchpoint_count): Likewise.
7516 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7517 (arm_hwbp_control_initialize): Likewise.
7518 (arm_hwbp_control_is_enabled): Likewise.
7519 (arm_hwbp_control_is_initialized): Likewise.
7520 (arm_hwbp_control_disable): Likewise.
7521 (arm_linux_hw_breakpoint_equal): Likewise.
7522 (arm_linux_hw_point_initialize): Likewise.
7523 (struct update_registers_data): New data structure.
7524 (update_registers_callback: New function.
7525 (arm_insert_point): Likewise.
7526 (arm_remove_point): Likewise.
7527 (arm_stopped_by_watchpoint): Likewise.
7528 (arm_stopped_data_address): Likewise.
7529 (arm_new_process): Likewise.
7530 (arm_new_thread): Likewise.
7531 (arm_prepare_to_resume): Likewise.
7532 (the_low_target): Register arm_insert_point, arm_remove_point,
7533 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7534 arm_new_thread, and arm_prepare_to_resume.
7535
6b9801d4
SS
75362011-09-15 Stan Shebs <stan@codesourcery.com>
7537
7538 * server.h (struct emit_ops): Add compare-goto fields.
7539 * tracepoint.c (gdb_agent_op_sizes): New table.
7540 (emit_eq_goto): New function.
7541 (emit_ne_goto): New function.
7542 (emit_lt_goto): New function.
7543 (emit_le_goto): New function.
7544 (emit_gt_goto): New function.
7545 (emit_ge_goto): New function.
7546 (is_goto_target): New function.
7547 (compile_bytecodes): Recognize special cases of compare-goto
7548 combinations and call specialized emitters for them.
7549 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7550 (amd64_emit_ne_goto): New function.
7551 (amd64_emit_lt_goto): New function.
7552 (amd64_emit_le_goto): New function.
7553 (amd64_emit_gt_goto): New function.
7554 (amd64_emit_ge_goto): New function.
7555 (amd64_emit_ops): Add the new functions.
7556 (i386_emit_eq_goto): New function.
7557 (i386_emit_ne_goto): New function.
7558 (i386_emit_lt_goto): New function.
7559 (i386_emit_le_goto): New function.
7560 (i386_emit_gt_goto): New function.
7561 (i386_emit_ge_goto): New function.
7562 (i386_emit_ops): Add the new functions.
7563
bf15cbda
SS
75642011-09-08 Stan Shebs <stan@codesourcery.com>
7565
7566 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7567 (i386_emit_epilogue): Restore %ebx.
7568
943ca1dd
JZ
75692011-08-31 Jie Zhang <jzhang918@gmail.com>
7570
7571 * server.c (step_thread): Remove definition.
7572 (process_serial_event): Don't handle Hs.
7573 * server.h (step_thread): Remove declaration.
7574 * target.c (set_desired_inferior): Remove use of step_thread.
7575
e3deef73
LM
75762011-08-24 Luis Machado <lgustavo@codesourcery.com>
7577
7578 * linux-low.c: Include linux-procfs.h.
7579 (linux_attach_lwp_1): Update comments.
7580 (linux_attach): Scan for existing threads when attaching to a
7581 process that is the tgid.
7582 * Makefile.in: Update dependencies.
7583
13da1c97
LM
75842011-08-24 Luis Machado <lgustavo@codesourcery.com>
7585
7586 * configure.srv: Add linux-procfs.o dependencies.
7587
881127c9
YQ
75882011-08-14 Yao Qi <yao@codesourcery.com>
7589
7590 * target.h (struct target_ops): Fix indent.
7591 * win32-low.c (win32_target_ops): Fix comment.
7592
58dbd541
YQ
75932011-08-14 Andrew Jenner <andrew@codesourcery.com>
7594 Yao Qi <yao@codesourcery.com>
7595
7596 * Makefile.in (clean): Remove tic6x-*.c files.
7597 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7598 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7599 (tic6x-c64xp-linux.c): Likewise.
7600 * configure.srv: Add support for tic6x-*-uclinux.
7601 * linux-tic6x-low.c: New.
7602 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7603
78d85199
YQ
76042011-08-14 Andrew Stubbs <ams@codesourcery.com>
7605 Yao Qi <yao@codesourcery.com>
7606
7607 * target.h (struct target_ops): Add read_loadmap.
7608 * linux-low.c (struct target_loadseg): New type.
7609 (struct target_loadmap): New type.
7610 (linux_read_loadmap): New function.
7611 (linux_target_ops): Add linux_read_loadmap.
7612 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7613 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7614 to NULL.
78d85199 7615
a959a88d
EZ
76162011-08-05 Eli Zaretskii <eliz@gnu.org>
7617
7618 * win32-low.c: Include <stdint.h>.
7619
1ced966e
PA
76202011-07-22 Pedro Alves <pedro@codesourcery.com>
7621
7622 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7623 to the inferior here.
7624 (i386_remove_aligned_watchpoint): Ditto.
7625 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7626 fit part of the watchpoint in the debug registers.
7627 (i386_update_inferior_debug_regs): New.
7628 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7629 registers, and only update the inferior on success.
7630 (i386_low_remove_watchpoint): Ditto.
7631
d26e3629
KY
76322011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7633
7634 * linux-low.c (compare_ints, unique, list_threads, show_process,
7635 linux_core_of_thread): Delete.
7636 (linux_target_ops): Change linux_core_of_thread to
7637 linux_common_core_of_thread.
7638 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7639 * utils.c (malloc_failure): Change type of argument.
7640 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7641 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7642 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7643 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7644 (IPA_OBJS): Add common-utils-ipa.o.
7645 (ptid_h, linux_osdata_h): New macros.
7646 (server_h): Add common/common-utils.h, common/xml-utils.h,
7647 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7648 common/ptid.h.
7649 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7650 ptid.o, buffer.o): New rules.
7651 (linux-low.o): Add common/linux-osdata.h as a dependency.
7652 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7653 * configure.ac: Add AC_HEADER_DIRENT check.
7654 * config.in: Regenerate.
7655 * configure: Regenerate.
7656 * remote-utils.c (xml_escape_text): Delete.
7657 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7658 buffer_xml_printf): Move to common/buffer.c.
7659 * server.c (main): Remove call to initialize_inferiors.
7660 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7661 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7662 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7663 internal_error, gdb_assert, gdb_assert_fail): Delete.
7664 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7665 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7666 common/buffer.h.
7667 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7668 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7669 initialize_inferiors): Delete.
7670
2275a1a7
PA
76712011-07-20 Pedro Alves <pedro@codesourcery.com>
7672
7673 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7674 symbol error.
7675
0a5b1e09
PA
76762011-05-31 Pedro Alves <pedro@codesourcery.com>
7677
7678 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7679 assertion.
7680 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7681
6938fd34
YQ
76822011-05-26 Yao Qi <yao@codesourcery.com>
7683
7684 * Makefile.in (thread-db.o): Track dependence to
7685 common/gdb_thread_db.h.
7686 * thread-db.c: include gdb_thread_db.h from right place.
7687
b481f9e0
TT
76882011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7689
7690 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7691 __FILE__ and __LINE__ to internal_error.
7692
98a5dd13
DE
76932011-05-13 Doug Evans <dje@google.com>
7694
7695 * thread-db.c (try_thread_db_load_from_sdir): New function.
7696 (try_thread_db_load_from_dir): New function.
7697 (thread_db_load_search): Handle $sdir, ignore $pdir.
7698 Remove trying of system directories if search of
7699 libthread-db-search-path fails, that is now done via $sdir.
7700
d248b706
KY
77012011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7702
7703 * server.c (handle_query): Add EnableDisableTracepoints to the list
7704 of supported features.
43aaf8b6 7705 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7706 tracepoints.
43aaf8b6
PA
7707 (cmd_qtenable_disable): New.
7708 (cmd_qtstart): Install tracepoints even if disabled.
7709 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7710 receiving a QTEnable or QTDisable packet.
7711 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7712 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7713 tracepoints.
7714 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7715
84e578fb
DE
77162011-05-10 Doug Evans <dje@google.com>
7717
7718 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7719
71f55dd8
DE
77202011-05-04 Doug Evans <dje@google.com>
7721
7722 * linux-low.c (linux_join): Skip process lookup.
7723 * spu-low.c (spu_join): Ditto.
7724 * server.c (join_inferiors_callback): Delete.
7725 (process_serial_event): For 'D' packet (detach) call join_inferior
7726 directly.
7727
4d393d60
JM
77282011-05-04 Joseph Myers <joseph@codesourcery.com>
7729
7730 * README: Don't mention xscale*-*-linux*.
7731 * configure.srv (xscale*-*-linux*): Don't handle target.
7732
b00ad6ff
NF
77332011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7734
7735 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7736 casting pointers.
7737 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7738 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7739 (i386_emit_void_call_2): Likewise.
7740
af96c192
YQ
77412011-04-26 Yao Qi <yao@codesourcery.com>
7742
43aaf8b6
PA
7743 * linux-low.c: Move common macros to linux-ptrace.h.
7744 Include linux-ptrace.h.
af96c192
YQ
7745 * Makefile.in (linux_ptrace_h): New.
7746 (linux-low.o): Depends on linux-ptrace.h.
7747
03f2bd59
JK
77482011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7749
7750 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7751 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7752 (remote_prepare): New function with most of the TCP code from ...
7753 (remote_open): ... here. Detect PORT here unconditionally. Move also
7754 setting transport_is_reliable.
7755 * server.c (run_once): New variable.
7756 (gdbserver_usage): Document it.
7757 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7758 the first run if RUN_ONCE.
7759 * server.h (run_once, remote_prepare): New declarations.
7760
7a9dd1b2
TT
77612011-04-19 Tom Tromey <tromey@redhat.com>
7762
7763 * win32-low.c (handle_load_dll): Remove duplicate "the".
7764
81239425
PM
77652011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7766
7767 Remove support for old Cygwin 1.5 versions.
7768 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7769 function to avoid warning.
7770 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7771 warning.
7772
9e0627f1
PM
77732011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7774
7775 * gdbserver/server.h (Macro _): Define it if not available.
7776
588eebee
MS
77772011-03-14 Michael Snyder <msnyder@vmware.com>
7778
348af9f7 7779 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7780
43f70d4c
JB
77812011-03-10 Joel Brobecker <brobecker@adacore.com>
7782
7783 * Makefile.in (maintainer-clean realclean distclean): Remove
7784 "make ... subdir_do" command.
7785
348af9f7
MS
77862011-03-10 Michael Snyder <msnyder@vmware.com>
7787
7788 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7789
7790 * server.c (handle_v_run): Free alloced buffer on early return.
7791
e637a4f5
YQ
77922011-03-09 Yao Qi <yao@codesourcery.com>
7793
7794 Revert:
7795 2011-03-04 Yao Qi <yao@codesourcery.com>
7796
7797 * Makefile.in: Remove GNU make feature --directory.
7798
7799 2011-03-05 Yao Qi <yao@codesourcery.com>
7800
7801 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7802 (subdir_do): New make target. Copied from gdb/Makefile.
7803 (maintainer-clean, realclean, distclean, clean): Call corresponding
7804 make targets in common/Makefile.
7805
7806 2011-02-11 Yao Qi <yao@codesourcery.com>
7807
7808 * configure.ac: Call AC_PROG_RANLIB.
7809 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7810 * configure: Regenerate.
7811
e6edda56
JK
78122011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7813
7814 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7815
e5141119
JB
78162011-03-06 Yao Qi <yao@codesourcery.com>
7817
7818 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7819
64794aa4
JB
78202011-03-05 Yao Qi <yao@codesourcery.com>
7821
7822 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7823 (subdir_do): New make target. Copied from gdb/Makefile.
7824 (maintainer-clean, realclean, distclean, clean): Call corresponding
7825 make targets in common/Makefile.
7826
7a762829
YQ
78272011-03-04 Yao Qi <yao@codesourcery.com>
7828
7829 * Makefile.in: Remove GNU make feature --directory.
7830
348af9f7
MS
78312011-03-04 Michael Snyder <msnyder@vmware.com>
7832
7833 * server.c (queue_stop_reply): Call xmalloc not malloc.
7834
78352011-03-02 Michael Snyder <msnyder@vmware.com>
7836
7837 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7838
9f72fee2
MS
78392011-02-28 Michael Snyder <msnyder@vmware.com>
7840
588eebee
MS
7841 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7842 (cmd_qtframe): Ditto.
7843 (cmd_qtbuffer): Ditto.
7844 (cmd_bigqtbuffer): Ditto.
7845
9f72fee2
MS
7846 * utils.c (decimal2str): Initialize 'width' to nine, then
7847 don't mess with it.
7848
8040bd49
UW
78492011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7850
7851 * hostio.c (require_data): Free *data, not data.
7852
7e52cbd0
JK
78532011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7854
7855 * hostio.c (require_data): Use free, not xfree.
7856
9130f83e
MS
78572011-02-27 Michael Snyder <msnyder@vmware.com>
7858
4b812f4e
MS
7859 * server.c (handle_query): Discard unused value.
7860
9130f83e
MS
7861 * hostio.c (require_data): Free malloc memory before returning
7862 error.
7863
69d37113
MS
78642011-02-26 Michael Snyder <msnyder@vmware.com>
7865
7866 * linux-low.c (list_threads): Call closedir for dirent.
7867
35f5825a
MS
78682011-02-27 Michael Snyder <msnyder@vmware.com>
7869
2a589cef
MS
7870 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7871 a case statement falls through.
7872
0adea5f7
MS
7873 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7874
35f5825a
MS
7875 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7876 in comparison.
7877
238f1c74
MS
78782011-02-26 Michael Snyder <msnyder@vmware.com>
7879
7880 * utils.c (decimal2str): Eliminate dead code and dead param.
7881 (pulongest): Drop dead param from call to decimal2str.
7882 (plongest): Ditto.
7883
633ff500
JB
78842011-02-24 Joel Brobecker <brobecker@adacore.com>
7885
7886 Revert the following patch (not approved yet):
7887 2011-02-21 Hui Zhu <teawater@gmail.com>
7888 * tracepoint.c (tp_printf): New function.
7889 (eval_agent_expr): Handle gdb_agent_op_printf.
7890
f9c6ff72
HZ
78912011-02-21 Hui Zhu <teawater@gmail.com>
7892
7893 * tracepoint.c (tp_printf): New function.
7894 (eval_agent_expr): Handle gdb_agent_op_printf.
7895
94d5e490
TT
78962011-02-18 Tom Tromey <tromey@redhat.com>
7897
7898 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7899 (tracepoint.o): Likewise.
7900 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7901 (gdb_agent_op_names): Likewise.
7902
c7f96d2b
TT
79032011-02-18 Tom Tromey <tromey@redhat.com>
7904
7905 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7906 gdb_agent_op_rot>: New constants.
7907 (gdb_agent_op_names): Add pick and roll.
7908 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7909 cases.
7910
0feedb2c
JK
79112011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7912
7913 * aclocal.m4: Regenerated with aclocal-1.11.1.
7914
b3b9301e
PA
79152011-02-14 Pedro Alves <pedro@codesourcery.com>
7916
7917 * server.c (handle_qxfer_traceframe_info): New.
7918 (qxfer_packets): Register "traceframe-info".
7919 (handle_query): Report support for qXfer:traceframe-info:read+.
7920 * tracepoint.c (match_blocktype): New.
7921 (traceframe_find_block_type): Rename to ...
7922 (traceframe_walk_blocks): ... this. Add callback filter argument,
7923 and use it.
7924 (traceframe_find_block_type): New, reimplemented on top of
7925 traceframe_walk_blocks.
7926 (build_traceframe_info_xml): New.
7927 (traceframe_read_info): New.
7928 * server.h (traceframe_read_info): Declare.
7929
4f3e6fb7
YQ
79302011-02-11 Yao Qi <yao@codesourcery.com>
7931
7932 * configure.ac: Call AC_PROG_RANLIB.
7933 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7934 * configure: Regenerate.
7935
764880b7
PA
79362011-02-07 Pedro Alves <pedro@codesourcery.com>
7937
7938 * server.c (gdb_read_memory): Change return semantics to allow
7939 partial transfers.
7940 (handle_search_memory_1): Adjust.
7941 (process_serial_event) <'m' packet>: Handle partial transfers.
7942 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7943
1c79eb8a
PA
79442011-01-28 Pedro Alves <pedro@codesourcery.com>
7945
7946 * regcache.c (init_register_cache): Initialize
7947 regcache->register_status.
7948 (free_register_cache): Release regcache->register_status.
7949 (regcache_cpy): Copy register_status.
7950 (registers_to_string): Print 'x's for unavailable registers.
7951 (supply_register): Mark the register's status valid or
7952 unavailable, depending on whether a buffer was passed in or not.
7953 (supply_register_zeroed): New.
7954 (supply_regblock): Mark the registers' status valid or
7955 unavailable, depending on whether a buffer was passed in or not.
7956 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7957 (struct regcache): New `register_status' field.
7958 (supply_register_zeroed): Declare.
7959 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7960 supply_register_zeroed, rather than passing a NULL buffer to
7961 supply_register.
7962 * tracepoint.c (fetch_traceframe_registers): Update comment.
7963
85724a0e
PA
79642011-01-28 Pedro Alves <pedro@codesourcery.com>
7965
7966 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7967 buffer explicit.
7968
d08aafef
PA
79692011-01-25 Pedro Alves <pedro@codesourcery.com>
7970
7971 * server.h (decode_xfer_write): Change prototype.
7972 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7973 and don't extract the annex here.
7974 * server.c (decode_xfer_read): Remove `annex' parameter,
7975 and don't extract the annex here.
7976 (decode_xfer): New.
7977 (struct qxfer): New.
7978 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7979 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7980 (handle_qxfer_statictrace): New functions, abstracted out from
7981 handle_query, and made to use the struct qxfer interface.
7982 (handle_threads_qxfer_proper): Rename to ...
7983 (handle_qxfer_threads_proper): ... this.
7984 (handle_threads_qxfer): Rename to ...
7985 (handle_qxfer_threads): ... this. Adjust.
7986 (qxfer_packets): New array.
7987 (handle_qxfer): New function.
7988 (handle_query): Use handle_qxfer.
7989
493e2a69
MS
79902011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7991
7992 * gdbreplay.c: Shorten lines of >= 80 columns.
7993 * linux-low.c: Ditto.
7994 * linux-ppc-low.c: Ditto.
7995 * linux-s390-low.c: Ditto.
7996 * linux-sparc-low.c: Ditto.
7997 * linux-x86-low.c: Ditto.
7998 * linux-xtensa-low.c: Ditto.
7999 * mem-break.c: Ditto.
8000 * nto-low.c: Ditto.
8001 * regcache.h: Ditto.
8002 * remote-utils.c: Ditto.
8003 * server.c: Ditto.
8004 * server.h: Ditto.
8005 * thread-db.c: Ditto.
8006 * tracepoint.c: Ditto.
8007 * utils.c: Ditto.
8008 * win32-low.h: Ditto.
8009
44944448
JB
80102011-01-05 Joel Brobecker <brobecker@adacore.com>
8011
8012 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8013 update.
8014
71ce852c
JB
80152011-01-01 Joel Brobecker <brobecker@adacore.com>
8016
8017 * server.c (gdbserver_version): Update copyright year in version
8018 output.
8019 * gdbreplay.c (gdbreplay_version): Ditto.
8020
eb826dc6
MF
80212010-12-29 Jie Zhang <jie.zhang@analog.com>
8022
8023 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8024 * linux-bfin-low.c: New file.
8025 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8026 PT_DATA_ADDR for BFIN targets.
8027 * Makefile.in (SFILES): Add linux-bfin-low.c.
8028 (clean): Remove reg-bfin.c.
8029 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8030 * README: Mention supported Blackfin targets.
8031
39ab222a
MF
80322010-12-23 Mike Frysinger <vapier@gentoo.org>
8033
8034 * .gitignore: New file.
8035
a1f2ce7d
MF
80362010-11-16 Mike Frysinger <vapier@gentoo.org>
8037
8038 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8039
f474844c
JZ
80402010-10-22 Jie Zhang <jie@codesourcery.com>
8041
8042 * Makefile.in: Add FLAGS_TO_PASS variable.
8043 (install): Remove dependency of install-only and recursively
8044 invoke make for install-only.
8045
f1048712
DE
80462010-10-04 Doug Evans <dje@google.com>
8047
8048 * Makefile.in (uninstall): Use $(DESTDIR).
8049
b53a1623
PA
80502010-09-24 Pedro Alves <pedro@codesourcery.com>
8051
e6ee044d
PA
8052 PR gdb/11842
8053
b53a1623
PA
8054 * linux-x86-low.c (compat_siginfo_from_siginfo)
8055 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8056 si_code is < 0. Check for si_code == SI_TIMER before checking for
8057 si_code < 0.
8058
fa1bd1e4
JB
80592010-09-13 Joel Brobecker <brobecker@adacore.com>
8060
8061 * lynx-i386-low.c: New file.
8062 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8063
47fac8f8
JB
80642010-09-13 Joel Brobecker <brobecker@adacore.com>
8065
8066 * lynx-low.c (ptrace_request_to_str): Remove handling for
8067 request values that have been removed in LynxOS 5.x.
8068
1adfc54d
JB
80692010-09-13 Joel Brobecker <brobecker@adacore.com>
8070
8071 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8072 <ptrace.h>
8073
c2a66c29
NS
80742010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8075
8076 * configure.ac: Add --enable-inprocess-agent option.
8077 * configure: Rebuilt.
8078
32fcada3
YQ
80792010-09-06 Yao Qi <yao@codesourcery.com>
8080
8081 * linux-low.c (linux_kill): Remove unused variable.
8082 (linux_stabilize_threads): Likewise.
8083 * server.c (start_inferior): Likewise.
8084 (queue_stop_reply_callback): Likewise.
8085 * tracepoint.c (do_action_at_tracepoint): Likewise.
8086
0cccb683
YQ
80872010-09-06 Yao Qi <yao@codesourcery.com>
8088
8089 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8090 on return.
8091
423ec54c
JK
80922010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8093
8094 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8095
12ac6819
PA
80962010-09-06 Pedro Alves <pedro@codesourcery.com>
8097
8098 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8099 "$(IPA_DEPFILES)".
8100
8ed54b31
JB
81012010-09-01 Joel Brobecker <brobecker@adacore.com>
8102
8103 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8104 gdbserver/lynx-ppc-low.c: New files.
8105 * Makefile.in (lynx_low_h): New variable.
8106 (lynx-low.o, lynx-ppc-low.o): New rules.
8107 * configure.ac: On LynxOS, link with -lnetinet.
8108 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8109 * configure: regenerate.
8110
bb0116a4
JB
81112010-09-01 Joel Brobecker <brobecker@adacore.com>
8112
8113 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8114 * configure.ac: Add check for vasprintf and vsnprintf.
8115 * configure, config.in: Regenerate.
8116 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8117
a778ab81 81182010-09-01 Joel Brobecker <brobecker@adacore.com>
8119
8120 * gdbreplay.c: Move include of alloca.h up, next to include of
8121 malloc.h.
8122 * server.h: Add include of malloc.h.
8123 * mem-break.c: Remove include of malloc.h.
8124 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8125
8b034a19 81262010-09-01 Joel Brobecker <brobecker@adacore.com>
8127
8128 * Makefile.in (memmem.o): Build with -Wno-error.
8129
81302010-09-01 Joel Brobecker <brobecker@adacore.com>
8131
8132 * utils.c (xsnprintf): Make non-static.
8133 * server.h: Add xsnprintf declaration.
8134 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8135 replace calls to snprintf by calls to xsnprintf throughout.
8136
81372010-09-01 Joel Brobecker <brobecker@adacore.com>
8138
8139 * configure.ac: Add configure check for alloca.
8140 * configure, config.in: Regenerate.
8141 * server.h: Include alloca.h if it exists.
8142 * gdbreplay.c: Include alloca.h if it exists.
8143
1a981360
PA
81442010-08-28 Pedro Alves <pedro@codesourcery.com>
8145
8146 * linux-low.c (__SIGRTMIN): Define if not already defined.
8147 (linux_create_inferior): Check for __ANDROID__ rather than
8148 __SIGRTMIN.
8149 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8150 are already deferred.
8151 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8152 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8153 stopped and already has a pending signal to report.
8154 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8155 a pending signal to report or is moving out of a jump pad.
8156 (linux_init_signals): Check for __ANDROID__ rather than
8157 __SIGRTMIN.
8158
b4d51a55
PA
81592010-08-28 Pedro Alves <pedro@codesourcery.com>
8160
8161 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8162 debug_threads check. Avoid a linear search when not doing debug
8163 output.
8164
ec48365d
PA
81652010-08-27 Pedro Alves <pedro@codesourcery.com>
8166
8167 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8168 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8169 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8170 (process_event): Change local fd's type to gdb_fildes_t.
8171 (create_file_handler): Adjust prototype.
8172 (delete_file_handler): Adjust prototype.
8173 (handle_file_event): Adjust prototype. Use pfildes.
8174 (create_file_event): Adjsut prototype.
8175 * remote-utils.c (remote_desc, listen_desc): Change type to
8176 gdb_fildes_t.
8177 * server.h: New gdb_fildes_t typedef.
8178 [USE_WIN32API]: Include winsock2.h.
8179 (delete_file_handler, add_file_handler): Adjust prototypes.
8180 (pfildes): Declare.
8181 * utils.c (pfildes): New.
8182
854d88f0
PA
81832010-08-27 Pedro Alves <pedro@codesourcery.com>
8184
8185 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8186 * configure: Regenerate.
8187
0146f85b
PA
81882010-08-27 Pedro Alves <pedro@codesourcery.com>
8189
8190 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8191 (linux_done_accessing_memory): ... this.
8192 (linux_target_ops): Adjust.
8193 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8194 * nto-low.c (nto_target_ops): Adjust comment.
8195 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8196 * spu-low.c (spu_target_ops): Adjust comment.
8197 * target.h (target_ops): Rename unprepare_to_access_memory field
8198 to done_accessing_memory.
8199 (unprepare_to_access_memory): Rename to ...
8200 (done_accessing_memory): ... this.
8201
90d74c30
PA
82022010-08-26 Pedro Alves <pedro@codesourcery.com>
8203
8204 * linux-low.c (linux_prepare_to_access_memory): New.
8205 (linux_unprepare_to_access_memory): New.
8206 (linux_target_ops): Install them.
8207 * server.c (read_memory): Rename to ...
8208 (gdb_read_memory): ... this. Use
8209 prepare_to_access_memory/prepare_to_access_memory.
8210 (write_memory): Rename to ...
8211 (gdb_write_memory): ... this. Use
8212 prepare_to_access_memory/prepare_to_access_memory.
8213 (handle_search_memory_1): Adjust.
8214 (process_serial_event): Adjust.
8215 * target.h (struct target_ops): New fields
8216 prepare_to_access_memory and unprepare_to_access_memory.
8217 (prepare_to_access_memory, unprepare_to_access_memory): New.
8218 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8219 prepare_to_access_memory/prepare_to_access_memory.
8220 * nto-low.c (nto_target_ops): Adjust.
8221 * spu-low.c (spu_target_ops): Adjust.
8222 * win32-low.c (win32_target_ops): Adjust.
8223
fd467969
PA
82242010-08-26 Pedro Alves <pedro@codesourcery.com>
8225
8226 * Makefile.in (WARN_CFLAGS): Get it from configure.
8227 (WERROR_CFLAGS): New.
8228 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8229 * configure.ac: Introduce --enable-werror, which adds -Werror to
8230 the compiler command line. Enabled by default. Disable with
8231 --disable-werror. Add -Wdeclaration-after-statement
8232 Wpointer-arith and -Wformat-nonliteral to warning flags.
8233 * configure: Regenerate.
8234
331e2f5f
PA
82352010-08-26 Pedro Alves <pedro@codesourcery.com>
8236
8237 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8238
e581f2b4
PA
82392010-08-26 Pedro Alves <pedro@codesourcery.com>
8240
8241 * gdbreplay.c (remote_error): New.
8242 (gdbchar): New.
8243 (expect): Use gdbchar. Check for error reading from GDB.
8244 Clarify sync error output.
8245 (play): Check for errors writing to GDB.
8246 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8247 * remote-utils.c (getpkt): Check for errors writing to the remote
8248 descriptor.
8249
3c11dd79
PA
82502010-08-25 Pedro Alves <pedro@codesourcery.com>
8251
8252 * linux-low.c (linux_wait_1): Move non-debugging code out of
8253 `debug_threads' control.
8254
d20a8ad9
PA
82552010-08-25 Pedro Alves <pedro@codesourcery.com>
8256
8257 * linux-low.c (linux_wait_1): Don't set last_status here.
8258 * server.c (push_event, queue_stop_reply_callback): Assert we're
8259 not pushing a TARGET_WAITKIND_IGNORE event.
8260 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8261 (myresume, handle_target_event): Set the thread's last_resume_kind
8262 and last_status from the target returned status.
8263
964e4306
PA
82642010-08-25 Pedro Alves <pedro@codesourcery.com>
8265
8266 PR threads/10729
8267
8268 * linux-x86-low.c (update_debug_registers_callback): New.
8269 (i386_dr_low_set_addr): Use it.
8270 (i386_dr_low_get_addr): New.
8271 (i386_dr_low_set_control): Use update_debug_registers_callback.
8272 (i386_dr_low_get_control): New.
8273 (i386_dr_low_get_status): Adjust.
8274 * linux-low.c (linux_stop_lwp): New.
8275 * linux-low.h (linux_stop_lwp): Declare.
8276
8277 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8278 argument instead of a i386_debug_reg_state.
8279 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8280 a i386_debug_reg_state.
8281 (i386_insert_aligned_watchpoint): Adjust.
8282 (i386_remove_aligned_watchpoint): Adjust.
8283 (i386_low_stopped_data_address): Read the debug registers from the
8284 inferior instead of from the mirrors.
8285 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8286 (i386_dr_low_get_addr): Declare.
8287 (i386_dr_low_get_control): Declare.
8288 (i386_dr_low_get_status): Change prototype.
8289
8290 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8291 (i386_dr_low_get_addr): New.
8292 (i386_dr_low_get_control): New.
8293 (i386_dr_low_get_status): Adjust prototype. Return
8294 dr_status_mirror.
8295 (i386_initial_stuff): Clear dr_status_mirror and
8296 dr_control_mirror.
8297 (i386_get_thread_context): Adjust.
8298 (i386_set_thread_context): Adjust.
8299 (i386_thread_added): Adjust.
8300
5f21a75b
PA
83012010-08-24 Pedro Alves <pedro@codesourcery.com>
8302
8303 * linux-low.h (linux_thread_area): Delete declaration.
8304
3e4c1235
TS
83052010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8306
8307 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8308 after its termination.
8309
1971b033
PA
83102010-08-09 Pedro Alves <pedro@codesourcery.com>
8311
8312 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8313 (gdb_wants_all_stopped): Delete.
8314 (linux_wait_1): Don't call them.
8315 * server.c (handle_v_cont): Tag all threads as want-stopped.
8316 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8317 stopped as "client-wants-stopped".
8318
310444ac
PA
83192010-07-31 Pedro Alves <pedro@codesourcery.com>
8320
8321 * Makefile.in (signals_h): New.
8322 (server_h): Depend on it.
8323 (server.o): Don't depend on $(signals_def).
8324 (signals.o): Depend on $(signals_def).
8325
a19cae16
JK
83262010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8327
8328 * Makefile.in (signals_def): New.
8329 (server_h): Append include/gdb/signals.h and signals_def.
8330 (server.o): Append signals_def.
8331
30d50328
JK
83322010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8333
8334 * server.c (handle_target_event): Use target_signal_to_host for
8335 resume_info.sig initialization.
8336 * target.h (struct thread_resume) <sig>: New comment.
8337
5c3216e2
OS
83382010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8339
c6f46ca0
OS
8340 * server.c (handle_query): strcpy() the returned string from paddress()
8341 instead of sprintf().
5c3216e2
OS
8342 * utils.c (paddress): Return phex_nz().
8343
6bd31874
JB
83442010-07-07 Joel Brobecker <brobecker@adacore.com>
8345
8346 * server.c (handle_v_cont): Call mourn_inferior if process
8347 just exited.
8348 (myresume): Likewise.
8349
0fb4aa4b
PA
83502010-07-01 Pedro Alves <pedro@codesourcery.com>
8351
8352 Static tracepoints, and integration with UST.
8353
8354 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8355 * mem-break.c (uninsert_all_breakpoints)
8356 (reinsert_all_breakpoints): New.
8357 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8358 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8359 (gdb_agent_ust_loaded, helper_thread_id)
8360 (gdb_agent_helper_thread_id): New macros.
8361 (struct ipa_sym_addresses): Add addr_ust_loaded,
8362 addr_helper_thread_id, addr_cmd_buf.
8363 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8364 (in_process_agent_loaded_ust): New.
8365 (write_e_ust_not_loaded): New.
8366 (maybe_write_ipa_ust_not_loaded): New.
8367 (struct collect_static_trace_data_action): New.
8368 (enum tracepoint_type) <static_tracepoint>: New.
8369 (struct tracepoint) <handle>: Mention static tracepoints.
8370 (struct static_tracepoint_ctx): New.
8371 (CMD_BUF_SIZE): New.
8372 (add_tracepoint_action): Handle static tracepoint actions.
8373 (unprobe_marker_at): New.
8374 (clear_installed_tracepoints): Handle static tracepoints.
8375 (cmd_qtdp): Handle static tracepoints.
8376 (probe_marker_at): New.
8377 (cmd_qtstart): Handle static tracepoints.
8378 (response_tracepoint): Handle static tracepoints.
8379 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8380 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8381 (get_context_regcache): Handle static tracepoints.
8382 (do_action_at_tracepoint): Handle static tracepoint actions.
8383 (traceframe_find_block_type): Handle static trace data blocks.
8384 (traceframe_read_sdata): New.
8385 (download_tracepoints): Download static tracepoint actions.
8386 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8387 (GDB_PROBE_NAME): New.
8388 (ust_ops): New.
8389 (GET_UST_SYM): New.
8390 (USTF): New.
8391 (dlsym_ust): New.
8392 (ust_marker_to_static_tracepoint): New.
8393 (gdb_probe): New.
8394 (collect_ust_data_at_tracepoint): New.
8395 (gdb_ust_probe): New.
8396 (UNIX_PATH_MAX, SOCK_DIR): New.
8397 (gdb_ust_connect_sync_socket): New.
8398 (resume_thread, stop_thread): New.
8399 (run_inferior_command): New.
8400 (init_named_socket): New.
8401 (gdb_ust_socket_init): New.
8402 (cstr_to_hexstr): New.
8403 (next_st): New.
8404 (first_marker, next_marker): New.
8405 (response_ust_marker): New.
8406 (cmd_qtfstm, cmd_qtsstm): New.
8407 (unprobe_marker_at, probe_marker_at): New.
8408 (cmd_qtstmat, gdb_ust_thread): New.
8409 (gdb_ust_init): New.
8410 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8411 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8412 (ST_REGENTRY): New.
8413 (x86_64_st_collect_regmap): New.
8414 (X86_64_NUM_ST_COLLECT_GREGS): New.
8415 (AMD64_RIP_REGNUM): New.
8416 (supply_static_tracepoint_registers): New.
8417 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8418 (ST_REGENTRY): New.
8419 (i386_st_collect_regmap): New.
8420 (i386_NUM_ST_COLLECT_GREGS): New.
8421 (supply_static_tracepoint_registers): New.
8422 * server.c (handle_query): Handle qXfer:statictrace:read.
8423 <qSupported>: Report support for StaticTracepoints, and
8424 qXfer:statictrace:read features.
8425 * server.h (traceframe_read_sdata)
8426 (supply_static_tracepoint_registers): Declare.
8427 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8428 (unpack_varlen_hex): Include in IPA build.
8429 * Makefile.in (ustlibs, ustinc): New.
8430 (IPA_OBJS): Add remote-utils-ipa.o.
8431 ($(IPA_LIB)): Link -ldl and -lpthread.
8432 (UST_CFLAGS): New.
8433 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8434 * config.in, configure: Regenerate.
8435
9e4344e5
PA
84362010-06-20 Ian Lance Taylor <iant@google.com>
8437 Pedro Alves <pedro@codesourcery.com>
8438
8439 * linux-x86-low.c (always_true): Delete.
8440 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8441 trying to fool the compiler with always_true.
8442
c6beb2cb
PA
84432010-06-20 Pedro Alves <pedro@codesourcery.com>
8444
8445 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8446 conditions in gdbserver.
8447
d2ed6730
UW
84482010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8449
8450 * spu-low.c (spu_read_memory): Wrap around local store limit.
8451 (spu_write_memory): Likewise.
8452
4e29fb54
PA
84532010-06-15 Pedro Alves <pedro@codesourcery.com>
8454
8455 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8456 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8457 LONGEST uses.
8458 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8459 uses.
8460 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8461 uses with LONGEST uses.
8462
6a271cae
PA
84632010-06-14 Stan Shebs <stan@codesourcery.com>
8464 Pedro Alves <pedro@codesourcery.com>
8465
8466 Bytecode compiler.
8467
8468 * linux-x86-low.c: Include limits.h.
8469 (add_insns): New.
8470 (always_true): New.
8471 (EMIT_ASM): New.
8472 (EMIT_ASM32): New.
8473 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8474 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8475 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8476 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8477 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8478 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8479 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8480 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8481 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8482 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8483 (amd64_emit_void_call_2): New.
8484 (amd64_emit_ops): New.
8485 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8486 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8487 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8488 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8489 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8490 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8491 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8492 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8493 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8494 (i386_emit_stack_adjust, i386_emit_int_call_1)
8495 (i386_emit_void_call_2): New.
8496 (i386_emit_ops): New.
8497 (x86_emit_ops): New.
8498 (the_low_target): Install x86_emit_ops.
8499 * server.h (struct emit_ops): New.
8500 (get_raw_reg_func_addr): Declare.
8501 (current_insn_ptr, emit_error): Declare.
8502 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8503 (set_trace_state_variable_value): New defines.
8504 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8505 addr_get_trace_state_variable_value and
8506 addr_set_trace_state_variable_value.
8507 (symbol_list): New fields for get_raw_reg,
8508 get_trace_state_variable_value and set_trace_state_variable_value.
8509 (condfn): New typedef.
8510 (struct tracepoint): New field `compiled_cond'.
8511 (do_action_at_tracepoint): Clear compiled_cond.
8512 (get_trace_state_variable_value, set_trace_state_variable_value):
8513 Export in the IPA.
8514 (condition_true_at_tracepoint): If there's a compiled condition,
8515 run that.
8516 (current_insn_ptr, emit_error): New globals.
8517 (struct bytecode_address): New.
8518 (get_raw_reg_func_addr): New.
8519 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8520 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8521 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8522 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8523 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8524 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8525 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8526 (compile_tracepoint_condition, compile_bytecodes): New.
8527 * target.h (emit_ops): Forward declare.
8528 (struct target_ops): New field emit_ops.
8529 (target_emit_ops): New.
8530 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8531 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8532 * linux-low.c (linux_emit_ops): New.
8533 (linux_target_ops): Install it.
8534 * linux-low.h (struct linux_target_ops): New field emit_ops.
8535
92b72907
UW
85362010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8537
8538 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8539 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8540
fa593d66
PA
85412010-06-01 Pedro Alves <pedro@codesourcery.com>
8542 Stan Shebs <stan@codesourcery.com>
8543
8544 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8545 (all): Depend on $(extra_libraries).
8546 (install-only): Install the IPA.
8547 (IPA_OBJS, IPA_LIB): New.
8548 (clean): Remove the IPA lib.
8549 (IPAGENT_CFLAGS): New.
8550 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8551 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8552 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8553 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8554 * configure.ac: Check for atomic builtins support in the compiler.
8555 (IPA_DEPFILES, extra_libraries): Define.
8556 * configure.srv (ipa_obj): Add description.
8557 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8558 (i[34567]86-*-linux*): Set ipa_obj.
8559 (x86_64-*-linux*): Set ipa_obj.
8560 * linux-low.c (stabilizing_threads): New.
8561 (supports_fast_tracepoints): New.
8562 (linux_detach): Stabilize threads before detaching.
8563 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8564 the lwp is either not stabilizing, or is moving out of a jump pad.
8565 (linux_fast_tracepoint_collecting): New.
8566 (maybe_move_out_of_jump_pad): New.
8567 (enqueue_one_deferred_signal): New.
8568 (dequeue_one_deferred_signal): New.
8569 (linux_wait_for_event_1): If moving out of a jump pad, defer
8570 pending signals to later.
8571 (linux_stabilize_threads): New.
8572 (linux_wait_1): Check if threads need moving out of jump pads, and
8573 do it if so.
8574 (stuck_in_jump_pad_callback): New.
8575 (move_out_of_jump_pad_callback): New.
8576 (lwp_running): New.
8577 (linux_resume_one_lwp): Handle moving out of jump pads.
8578 (linux_set_resume_request): Dequeue deferred signals.
8579 (need_step_over_p): Also step over fast tracepoint jumps.
8580 (start_step_over): Also uninsert fast tracepoint jumps.
8581 (finish_step_over): Also reinsert fast tracepoint jumps.
8582 (linux_install_fast_tracepoint_jump): New.
8583 (linux_target_ops): Install linux_stabilize_threads and
8584 linux_install_fast_tracepoint_jump_pad.
8585 * linux-low.h (linux_target_ops) <get_thread_area,
8586 install_fast_tracepoint_jump_pad>: New fields.
8587 (struct lwp_info) <collecting_fast_tracepoint,
8588 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8589 (linux_get_thread_area): Declare.
8590 * linux-x86-low.c (jump_insn): New.
8591 (x86_get_thread_area): New.
8592 (append_insns): New.
8593 (push_opcode): New.
8594 (amd64_install_fast_tracepoint_jump_pad): New.
8595 (i386_install_fast_tracepoint_jump_pad): New.
8596 (x86_install_fast_tracepoint_jump_pad): New.
8597 (the_low_target): Install x86_get_thread_area and
8598 x86_install_fast_tracepoint_jump_pad.
8599 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8600 (struct fast_tracepoint_jump): New.
8601 (fast_tracepoint_jump_insn): New.
8602 (fast_tracepoint_jump_shadow): New.
8603 (find_fast_tracepoint_jump_at): New.
8604 (fast_tracepoint_jump_here): New.
8605 (delete_fast_tracepoint_jump): New.
8606 (set_fast_tracepoint_jump): New.
8607 (uninsert_fast_tracepoint_jumps_at): New.
8608 (reinsert_fast_tracepoint_jumps_at): New.
8609 (set_breakpoint_at): Use write_inferior_memory.
8610 (uninsert_raw_breakpoint): Use write_inferior_memory.
8611 (check_mem_read): Mask out fast tracepoint jumps.
8612 (check_mem_write): Mask out fast tracepoint jumps.
8613 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8614 (set_fast_tracepoint_jump): Declare.
8615 (delete_fast_tracepoint_jump)
8616 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8617 (reinsert_fast_tracepoint_jumps_at): Declare.
8618 * regcache.c: Don't compile many functions when building the
8619 in-process agent library.
8620 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8621 the register buffer in the heap.
8622 (free_register_cache): If the register buffer isn't owned by the
8623 regcache, don't free it.
8624 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8625 pre-existing register caches.
8626 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8627 type.
8628 (convert_ascii_to_int): : Constify `from' parameter type.
8629 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8630 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8631 the needed buffer in-place.
8632 (relocate_instruction): New.
8633 * server.c (handle_query) <qSymbols>: If the target supports
8634 tracepoints, give it a chance of looking up symbols. Report
8635 support for fast tracepoints.
8636 (handle_status): Stabilize threads.
8637 (process_serial_event): Adjust.
8638 * server.h (struct fast_tracepoint_jump): Forward declare.
8639 (struct process_info) <fast_tracepoint_jumps>: New field.
8640 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8641 (decode_X_packet, decode_M_packet): Adjust.
8642 (relocate_instruction): Declare.
8643 (in_process_agent_loaded): Declare.
8644 (tracepoint_look_up_symbols): Declare.
8645 (struct fast_tpoint_collect_status): Declare.
8646 (fast_tracepoint_collecting): Declare.
8647 (force_unlock_trace_buffer): Declare.
8648 (handle_tracepoint_bkpts): Declare.
8649 (initialize_low_tracepoint)
8650 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8651 * target.h (struct target_ops) <stabilize_threads,
8652 install_fast_tracepoint_jump_pad>: New fields.
8653 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8654 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8655 [HAVE_STDINT_H]: Include stdint.h.
8656 (trace_debug_1): Rename to ...
8657 (trace_vdebug): ... this.
8658 (trace_debug): Rename to ...
8659 (trace_debug_1): ... this. Add `level' parameter.
8660 (trace_debug): New.
8661 (ATTR_USED, ATTR_NOINLINE): New.
8662 (IP_AGENT_EXPORT): New.
8663 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8664 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8665 (about_to_request_buffer_space, trace_buffer_is_full)
8666 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8667 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8668 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8669 (traceframe_write_count, traceframes_created)
8670 (trace_state_variables)
8671 New renaming defines.
8672 (struct ipa_sym_addresses): New.
8673 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8674 (symbol_list): New.
8675 (ipa_sym_addrs): New.
8676 (all_tracepoint_symbols_looked_up): New.
8677 (in_process_agent_loaded): New.
8678 (write_e_ipa_not_loaded): New.
8679 (maybe_write_ipa_not_loaded): New.
8680 (tracepoint_look_up_symbols): New.
8681 (debug_threads) [IN_PROCESS_AGENT]: New.
8682 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8683 (UNKNOWN_SIDE_EFFECTS): New.
8684 (stop_tracing): New.
8685 (flush_trace_buffer): New.
8686 (stop_tracing_bkpt): New.
8687 (flush_trace_buffer_bkpt): New.
8688 (read_inferior_integer): New.
8689 (read_inferior_uinteger): New.
8690 (read_inferior_data_pointer): New.
8691 (write_inferior_data_pointer): New.
8692 (write_inferior_integer): New.
8693 (write_inferior_uinteger): New.
8694 (struct collect_static_trace_data_action): Delete.
8695 (enum tracepoint_type): New.
8696 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8697 <actions_str, step_actions, step_actions_str>: Only include in
8698 GDBserver.
fa593d66
PA
8699 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8700 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8701 (tracepoints): Use IP_AGENT_EXPORT.
8702 (last_tracepoint): Don't include in the IPA.
8703 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8704 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8705 (alloced_trace_state_variables): New.
8706 (trace_state_variables): Use IP_AGENT_EXPORT.
8707 (traceframe_t): Delete unused variable.
8708 (circular_trace_buffer): Don't include in the IPA.
8709 (trace_buffer_start): Delete.
8710 (struct trace_buffer_control): New.
8711 (trace_buffer_free): Delete.
8712 (struct ipa_trace_buffer_control): New.
8713 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8714 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8715 New.
8716 (trace_buffer_ctrl): New.
8717 (TRACE_BUFFER_CTRL_CURR): New.
8718 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8719 Reimplement as macros.
8720 (trace_buffer_wrap): Delete.
8721 (traceframe_write_count, traceframe_read_count)
8722 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8723 (struct tracepoint_hit_ctx) <type>: New field.
8724 (struct fast_tracepoint_ctx): New.
8725 (memory_barrier): New.
8726 (cmpxchg): New.
8727 (record_tracepoint_error): Update atomically in the IPA.
8728 (clear_inferior_trace_buffer): New.
8729 (about_to_request_buffer_space): New.
8730 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8731 updating the same buffer.
8732 (add_tracepoint): Default the tracepoint's type to trap
8733 tracepoint, and orig_size to -1.
8734 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8735 internal variables.
8736 (create_trace_state_variable): New parameter `gdb'. Handle it.
8737 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8738 (cmd_qtdp): Handle fast tracepoints.
8739 (cmd_qtdv): Adjust.
8740 (max_jump_pad_size): New.
8741 (gdb_jump_pad_head): New.
8742 (get_jump_space_head): New.
8743 (claim_jump_space): New.
8744 (sort_tracepoints): New.
8745 (MAX_JUMP_SIZE): New.
8746 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8747 IPA.
8748 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8749 support. Upload fast traceframes, and delete internal IPA
8750 breakpoints.
8751 (stop_tracing_handler): New.
8752 (flush_trace_buffer_handler): New.
8753 (cmd_qtstop): Upload fast tracepoints.
8754 (response_tracepoint): Handle fast tracepoints.
8755 (tracepoint_finished_step): Upload fast traceframes. Set the
8756 tracepoint hit context's tracepoint type.
8757 (handle_tracepoint_bkpts): New.
8758 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8759 type. Add comment about fast tracepoints.
8760 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8761 non-existing action_str field.
8762 (get_context_regcache): Handle fast tracepoints.
8763 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8764 to the regcache.
8765 (fast_tracepoint_from_jump_pad_address): New.
8766 (fast_tracepoint_from_ipa_tpoint_address): New.
8767 (collecting_t): New.
8768 (force_unlock_trace_buffer): New.
8769 (fast_tracepoint_collecting): New.
8770 (collecting): New.
8771 (gdb_collect): New.
8772 (write_inferior_data_ptr): New.
8773 (target_tp_heap): New.
8774 (target_malloc): New.
8775 (download_agent_expr): New.
8776 (UALIGN): New.
8777 (download_tracepoints): New.
8778 (download_trace_state_variables): New.
8779 (upload_fast_traceframes): New.
8780 (IPA_FIRST_TRACEFRAME): New.
8781 (IPA_NEXT_TRACEFRAME_1): New.
8782 (IPA_NEXT_TRACEFRAME): New.
8783 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8784 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8785 (gdb_jump_pad_buffer_end): New.
8786 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8787 (initialize_tracepoint): Adjust.
8788 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8789 buffer. Initialize the low module.
8790 * utils.c (PREFIX, TOOLNAME): New.
8791 (malloc_failure): Use PREFIX.
8792 (error): In the IPA, an error causes an exit.
8793 (fatal, warning): Use PREFIX.
8794 (internal_error): Use TOOLNAME.
8795 (NUMCELLS): Increase to 10.
8796 * configure, config.in: Regenerate.
8797
d149dd1d
PA
87982010-06-01 Pedro Alves <pedro@codesourcery.com>
8799
8800 * server.c (handle_query) <qSupported>: Do two passes over the
8801 qSupported string to avoid nesting strtok.
8802
f6528abd
JK
88032010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8804
8805 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8806 (CDEPS): New.
8807 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8808 -Wl,--dynamic-list.
8809 * configure: Regenerate.
8810 * proc-service.list: New.
8811
ca2a87a0
JK
88122010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8813
8814 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8815 New comment.
8816
363a6e9f
OS
88172010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8818
8819 * gdbreplay.c (remote_open): Check error return from socket() call by
8820 its equality to -1 not by it being negative.
8821 * remote-utils.c (remote_open): Likewise.
8822
d23b6cb1
PA
88232010-05-23 Pedro Alves <pedro@codesourcery.com>
8824
8825 * config.h: Regenerate.
8826
28d3cf85
MK
88272010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8828
8829 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8830 doesn't provide PTRACE_GET_THREAD_AREA.
8831
fea36a59
MK
88322010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8833
8834 * linux-m68k-low.c: Include <asm/ptrace.h>
8835 (ps_get_thread_area): Implement.
8836
24b066ba
DE
88372010-05-03 Doug Evans <dje@google.com>
8838
8839 * event-loop.c (struct callback_event): New struct.
8840 (callback_list): New global.
8841 (append_callback_event, delete_callback_event): New functions.
8842 (process_callback): New function.
8843 (start_event_loop): Call it.
8844 * remote-utils.c (NOT_SCHEDULED): Define.
8845 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8846 moved out of readchar.
8847 (readchar): Rewrite. Call reschedule before returning.
8848 (reset_readchar): New function.
8849 (remote_close): Call it.
8850 (process_remaining, reschedule): New functions.
8851 * server.h (callback_handler_func): New typedef.
8852 (append_callback_event, delete_callback_event): Declare.
8853
9836d6ea
PA
88542010-05-03 Pedro Alves <pedro@codesourcery.com>
8855
8856 * proc-service.c (ps_pglobal_lookup): Use
8857 thread_db_look_up_one_symbol.
8858 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8859 parameter. Use it instead of all_symbols_looked_up.
8860 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8861 field.
8862 (all_symbols_looked_up): Don't declare.
8863 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8864 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8865 field.
8866 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8867 Set all_symbols_looked_up here.
8868 (thread_db_look_up_one_symbol): New.
8869 (thread_db_get_tls_address): Adjust.
8870 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8871 thread_db object on the heap, and tentatively set it in the
8872 process structure.
8873 (thread_db_init): Don't set all_symbols_looked_up here.
8874 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8875
7984d532
PA
88762010-05-03 Pedro Alves <pedro@codesourcery.com>
8877
8878 * linux-low.c (linux_kill, linux_detach): Adjust.
8879 (status_pending_p_callback): Remove redundant statement. Check
8880 for !TARGET_WAITIKIND_IGNORE, instead of
8881 TARGET_WAITKIND_STOPPED.
8882 (handle_tracepoints): Make sure LWP is locked. Adjust.
8883 (linux_wait_for_event_1): Adjust.
8884 (linux_cancel_breakpoints): New.
8885 (unsuspend_one_lwp): New.
8886 (unsuspend_all_lwps): New.
8887 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8888 (send_sigstop_callback): Change return type to int, add new
8889 `except' parameter and handle it.
8890 (suspend_and_send_sigstop_callback): New.
8891 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8892 pass them down. If SUSPEND, also increment the lwp's suspend
8893 count.
8894 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8895 (need_step_over_p): Don't consider suspended LWPs.
8896 (start_step_over): Adjust.
8897 (proceed_one_lwp): Change return type to int, add new `except'
8898 parameter and handle it.
8899 (unsuspend_and_proceed_one_lwp): New.
8900 (proceed_all_lwps): Use find_inferior instead of
8901 for_each_inferior.
8902 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8903 also decrement the suspend count of LWPs. Pass `except' down,
8904 instead of hacking its suspend count.
8905 (linux_pause_all): Add `freeze' parameter. Adjust.
8906 (linux_unpause_all): New.
8907 (linux_target_ops): Install linux_unpause_all.
8908 * server.c (handle_status): Adjust.
8909 * target.h (struct target_ops): New fields `unpause_all' and
8910 `cancel_breakpoints'. Add new parameter to `pause_all'.
8911 (pause_all): Add new `freeze' parameter.
8912 (unpause_all): New.
8913 (cancel_breakpoints): New.
8914 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8915 cancel breakpoints.
8916 (cmd_qtstart): Pause threads.
8917 (stop_tracing): Pause threads, and cancel breakpoints.
8918 * win32-low.c (win32_target_ops): Adjust.
8919
e471f25b
PA
89202010-05-03 Pedro Alves <pedro@codesourcery.com>
8921
8922 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8923 the inferior right away from here...
8924 (linux_wait_1): ... to here, and adjust to check the thread's
8925 last_resume_kind instead of the lwp's step or stop_expected flags.
8926
1915ef4f
PA
89272010-05-02 Pedro Alves <pedro@codesourcery.com>
8928
8929 * README: Use consistent `GDB' and `GDBserver' spellings.
8930
f9e39928
PA
89312010-05-02 Pedro Alves <pedro@codesourcery.com>
8932
8933 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8934 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8935 (linux_detach_one_lwp): Assume the lwp is stopped.
8936 (any_thread_of): Delete.
8937 (linux_detach): Stop all lwps here. Don't blindly delete all
8938 breakpoints.
8939 (delete_lwp_callback): New.
8940 (linux_mourn): Delete all lwps of the process that is gone.
8941 (linux_wait_1): Don't delete the last lwp of the process here.
8942 * mem-break.h (mark_breakpoints_out): Declare.
8943 * mem-break.c (mark_breakpoints_out): New.
8944 (free_all_breakpoints): Use it.
8945 * server.c (handle_target_event): If the process is gone, mark
8946 breakpoints out.
8947 * thread-db.c (struct thread_db) <create_bp>: New field.
8948 (thread_db_enable_reporting): Fix prototype. Store a thread event
8949 breakpoint reference in the thread_db struct.
8950 (thread_db_load_search): Clear the thread_db object.
8951 (try_thread_db_load_1): Ditto.
8952 (switch_to_process): New.
8953 (disable_thread_event_reporting): Use it.
8954 (remove_thread_event_breakpoints): New.
8955 (thread_db_detach, thread_db_mourn): Use it.
8956
1e7fc18c
PA
89572010-05-01 Pedro Alves <pedro@codesourcery.com>
8958
8959 * linux-low.c (linux_enable_event_reporting): New.
8960 (linux_wait_for_event_1, handle_extended_wait): Use it.
8961
02fc4de7
PA
89622010-04-30 Pedro Alves <pedro@codesourcery.com>
8963
8964 * linux-low.c (linux_kill_one_lwp, linux_kill)
8965 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8966 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8967 SIGSTOP even if the LWP is stopped.
8968 (send_sigstop_callback): New.
8969 (stop_all_lwps): Use send_sigstop_callback instead.
8970 (linux_resume_one_thread): Adjust.
8971 (proceed_one_lwp): Still proceed an LWP that the client has
8972 requested to stop, if we haven't reported it as stopped yet. Make
8973 sure that LWPs the client want stopped, have a pending SIGSTOP.
8974
bc3b5632
DE
89752010-04-26 Doug Evans <dje@google.com>
8976
ae1ada35
DE
8977 * server.c (handle_general_set): Make static.
8978
bc3b5632
DE
8979 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8980 Print received char after testing for error/eof instead of before.
8981 (input_interrupt): Tweak comment.
8982
65730243
DE
89832010-04-23 Doug Evans <dje@google.com>
8984
8985 * server.c (start_inferior): Print inferior argv if --debug.
8986
a8ae7dc0
AR
89872010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8988
8989 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8990 * nto-x86-low.c: Include server.h
8991
1c07cc19
PM
89922010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8993
8994 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8995 be consistent with other sources of this directory.
8996 (init_registers_amd64): Correct name of source file of this function
8997 in the comment.
8998
e0a61e09
PM
89992010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9000
9001 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9002 64-bit executables.
9003
54709339
PM
90042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9005
9006 * win32-i386-low.c: Add 64-bit support.
9007 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9008 (init_registers_amd64): Declare.
9009 (mappings): Add 64-bit version of array.
9010 (init_windows_x86): New function.
9011 (the_low_target): Change init_arch field to init_windows_x86.
9012
e8f0053d
PM
90132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9014
9015 * win32-low.c: Adapt to support also 64-bit architecture.
9016 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9017 (get_image_name): Use SIZE_T type for local variable `done'.
9018 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9019 (toolhelp_get_dll_name): Idem.
9020 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9021 Use uintptr_t typecast to avoid warning.
9022 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9023 (handle_exception): Use phex_nz to avoid warning.
9024 (win32_wait): Remove unused local variable `process'.
9025
c481e77e
PM
90262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9027
9028 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9029 `amd64-avx.o'.
9030
12ea4b69
PM
90312010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9032
9033 * configure.ac: Use `ws2_32' library for srv_mingw.
9034 * configure: Regenerate.
9035 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9036 * remote-utils.c: Likewise.
9037
f6d1620c
L
90382010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9039
9040 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9041 if __x86_64__ is defined.
9042
8e642873
PM
90432010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9044
9045 * configure: Regenerate.
9046
711e434b
PM
90472010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9048
9049 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9050 * target.h (target_ops): New get_tib_address field.
9051 * win32-low.h (win32_thread_info): Add thread_local_base field.
9052 * win32-low.c (child_add_thread): Add tlb argument.
9053 Set thread_local_base field to TLB.
9054 (get_child_debug_event): Adapt to child_add_thread change.
9055 (win32_get_tib_address): New function.
9056 (win32_target_ops): Set get_tib_address field to
9057 win32_get_tib_address.
9058 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9059
505106cd
PA
90602010-04-12 Pedro Alves <pedro@codesourcery.com>
9061
505106cd
PA
9062 * linux-low.c (linux_mourn): Also remove the process.
9063 * server.c (handle_target_event): Don't remove the process here.
9064 * nto-low.c (nto_mourn): New.
9065 (nto_target_ops): Install it.
9066 * spu-low.c (spu_mourn): New.
9067 (spu_target_ops): Install it.
9068 * win32-low.c (win32_mourn): New.
9069 (win32_target_ops): Install it.
9070
e8470a06
PA
90712010-04-12 Pedro Alves <pedro@codesourcery.com>
9072
9073 * server.h (buffer_xml_printf): Remove redundant `;'.
9074
45ba0d02
PA
90752010-04-12 Pedro Alves <pedro@codesourcery.com>
9076
9077 * regcache.c (set_register_cache): Invalidate regcaches before
9078 changing the register cache layout.
9079 (regcache_invalidate_one): Allow a NULL regcache.
9080 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9081 regcaches before changing the register cache layout or the target
9082 regsets.
9083
59e04013
L
90842010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9085
9086 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9087 variable warning on Linux/x86-64.
9088
8336d594
PA
90892010-04-11 Pedro Alves <pedro@codesourcery.com>
9090
9091 GDBserver disconnected tracing support.
9092
9093 * linux-low.c (linux_remove_process): Delete.
9094 (add_lwp): Don't set last_resume_kind here.
9095 (linux_kill): Use `mourn'.
9096 (linux_detach): Use `thread_db_detach', and `mourn'.
9097 (linux_mourn): New.
9098 (linux_attach_lwp_1): Adjust comment.
9099 (linux_attach): last_resume_kind moved the thread_info; adjust.
9100 (status_pending_p_callback): Adjust.
9101 (linux_wait_for_event_1): Adjust.
9102 (count_events_callback, select_singlestep_lwp_callback)
9103 (select_event_lwp_callback, cancel_breakpoints_callback)
9104 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9105 (proceed_one_lwp): Adjust.
9106 (linux_async): Add debug output.
9107 (linux_thread_stopped): New.
9108 (linux_pause_all): New.
9109 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9110 linux_pause_all.
9111 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9112 (thread_db_free): Delete declaration.
9113 (thread_db_detach, thread_db_mourn): Declare.
9114 * thread-db.c (thread_db_init): Use thread_db_mourn.
9115 (thread_db_free): Delete, split in two.
9116 (disable_thread_event_reporting): New.
9117 (thread_db_detach): New.
9118 (thread_db_mourn): New.
9119
9120 * server.h (struct thread_info) <last_resume_kind>: New field.
9121 <attached>: Add comment.
9122 <gdb_detached>: New field.
9123 (handler_func): Change return type to int.
9124 (handle_serial_event, handle_target_event): Ditto.
9125 (gdb_connected): Declare.
9126 (tracing): Delete.
9127 (disconnected_tracing): Declare.
9128 (stop_tracing): Declare.
9129
9130 * server.c (handle_query) <qSupported>: Report support for
9131 disconnected tracing.
9132 (queue_stop_reply_callback): Account for running threads.
9133 (gdb_wants_thread_stopped): New.
9134 (gdb_wants_all_threads_stopped): New.
9135 (gdb_reattached_process): New.
9136 (handle_status): Clear the `gdb_detached' flag of all processes.
9137 In all-stop, stop all threads.
9138 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9139 (process_serial_event): If the remote connection breaks, or if an
9140 exit was forced with "monitor exit", force an event loop exit.
9141 Handle disconnected tracing on detach.
9142 (handle_serial_event): Adjust.
9143 (handle_target_event): If GDB isn't connected, forward events back
9144 to the inferior, unless the last process exited, in which case,
9145 exit gdbserver. Adjust interface.
9146
9147 * remote-utils.c (remote_open): Don't block in accept. Instead
9148 register an event loop source on the listen socket file
9149 descriptor. Refactor bits into ...
9150 (listen_desc): ... this new global.
9151 (gdb_connected): ... this new function.
9152 (enable_async_notification): ... this new function.
9153 (handle_accept_event): ... this new function.
9154 (remote_close): Clear remote_desc.
9155
9156 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9157
9158 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9159 New fields.
9160 (mourn_inferior): Define.
9161 (target_process_qsupported): Avoid the dangling else problem.
9162 (thread_stopped): Define.
9163 (pause_all): Define.
9164 (target_waitstatus_to_string): Declare.
9165 * target.c (target_waitstatus_to_string): New.
9166
9167 * tracepoint.c (tracing): Make extern.
9168 (disconnected_tracing): New.
9169 (stop_tracing): Make extern. Handle tracing stops due to GDB
9170 disconnecting.
9171 (cmd_qtdisconnected): New.
9172 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9173 (handle_tracepoint_general_set): Handle QTDisconnected.
9174
9175 * event-loop.c (event_handler_func): Change return type to int.
9176 (process_event): Bail out if the event handler wants the event
9177 loop to stop.
9178 (handle_file_event): Ditto.
9179 (start_event_loop): Bail out if the event handler wants the event
9180 loop to stop.
9181
9182 * nto-low.c (nto_target_ops): Adjust.
9183 * spu-low.c (spu_wait): Don't remove the process here.
9184 (spu_target_ops): Adjust.
9185 * win32-low.c (win32_wait): Don't remove the process here.
9186 (win32_target_ops): Adjust.
9187
5d267c4c
PA
91882010-04-11 Pedro Alves <pedro@codesourcery.com>
9189
9190 * regcache.c (realloc_register_cache): Invalidate inferior's
9191 regcache before recreating it.
9192
623ccd72
PA
91932010-04-09 Pedro Alves <pedro@codesourcery.com>
9194
9195 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9196
219f2f23
PA
91972010-04-09 Stan Shebs <stan@codesourcery.com>
9198 Pedro Alves <pedro@codesourcery.com>
9199
9200 * server.h (LONGEST): New.
9201 (struct thread_info) <while_stepping>: New field.
9202 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9203 Declare.
9204 (initialize_tracepoint, handle_tracepoint_general_set)
9205 (handle_tracepoint_query, tracepoint_finished_step)
9206 (tracepoint_was_hit, release_while_stepping_state_list):
9207 (current_traceframe): Declare.
9208 * server.c (handle_general_set): Handle tracepoint packets.
9209 (read_memory): New.
9210 (write_memory): New.
9211 (handle_search_memory_1): Use read_memory.
9212 (handle_query): Report support for conditional tracepoints, trace
9213 state variables, and tracepoint sources. Handle tracepoint
9214 queries.
9215 (main): Initialize the tracepoints module.
9216 (process_serial_event): Handle traceframe reads/writes.
9217
9218 * linux-low.c (handle_tracepoints): New.
9219 (linux_wait_1): Call it.
9220 (linux_resume_one_lwp): Handle while-stepping.
9221 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9222 (linux_target_ops): Install them.
9223 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9224 New field.
9225 * linux-x86-low.c (x86_supports_tracepoints): New.
9226 (the_low_target). Install it.
9227
9228 * mem-break.h (delete_breakpoint): Declare.
9229 * mem-break.c (delete_breakpoint): Make external.
9230
9231 * target.h (struct target_ops): Add `supports_tracepoints',
9232 `read_pc', and `write_pc' fields.
9233 (target_supports_tracepoints): Define.
9234 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9235 (phex_nz): New.
9236
9237 * regcache.h (struct regcache) <registers_owned>: New field.
9238 (init_register_cache, regcache_cpy): Declare.
9239 (regcache_read_pc, regcache_write_pc): Declare.
9240 (register_cache_size): Declare.
9241 (supply_regblock): Declare.
9242 * regcache.c (init_register_cache): New.
9243 (new_register_cache): Use it.
9244 (regcache_cpy): New.
9245 (register_cache_size): New.
9246 (supply_regblock): New.
9247 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9248
219f2f23
PA
9249 * tracepoint.c: New.
9250
9251 * Makefile.in (OBS): Add tracepoint.o.
9252 (tracepoint.o): New rule.
9253
3a13a53b
L
92542010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9255
9256 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9257 (i386-mmx.o): New.
9258 (i386-mmx.c): Likewise.
9259 (i386-mmx-linux.o): Likewise.
9260 (i386-mmx-linux.c): Likewise.
9261
9262 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9263 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9264 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9265 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9266
9267 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9268 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9269 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9270
1570b33e
L
92712010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9272
9273 * Makefile.in (clean): Updated.
9274 (i386-avx.o): New.
9275 (i386-avx.c): Likewise.
9276 (i386-avx-linux.o): Likewise.
9277 (i386-avx-linux.c): Likewise.
9278 (amd64-avx.o): Likewise.
9279 (amd64-avx.c): Likewise.
9280 (amd64-avx-linux.o): Likewise.
9281 (amd64-avx-linux.c): Likewise.
9282
9283 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9284 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9285 (srv_amd64_regobj): Add amd64-avx.o.
9286 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9287 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9288 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9289 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9290 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9291 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9292 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9293
9294 * i387-fp.c: Include "i386-xstate.h".
9295 (i387_xsave): New.
9296 (i387_cache_to_xsave): Likewise.
9297 (i387_xsave_to_cache): Likewise.
9298 (x86_xcr0): Likewise.
9299
9300 * i387-fp.h (i387_cache_to_xsave): Likewise.
9301 (i387_xsave_to_cache): Likewise.
9302 (x86_xcr0): Likewise.
9303
9304 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9305 * linux-crisv32-low.c (target_regsets): Likewise.
9306 * linux-m68k-low.c (target_regsets): Likewise.
9307 * linux-mips-low.c (target_regsets): Likewise.
9308 * linux-ppc-low.c (target_regsets): Likewise.
9309 * linux-s390-low.c (target_regsets): Likewise.
9310 * linux-sh-low.c (target_regsets): Likewise.
9311 * linux-sparc-low.c (target_regsets): Likewise.
9312 * linux-xtensa-low.c (target_regsets): Likewise.
9313
9314 * linux-low.c: Include <sys/uio.h>.
9315 (regsets_fetch_inferior_registers): Support nt_type.
9316 (regsets_store_inferior_registers): Likewise.
9317 (linux_process_qsupported): New.
9318 (linux_target_ops): Add linux_process_qsupported.
9319
9320 * linux-low.h (regset_info): Add nt_type.
9321 (linux_target_ops): Add process_qsupported.
9322
9323 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9324 and <sys/uio.h>.
9325 (init_registers_i386_avx_linux): New.
9326 (init_registers_amd64_avx_linux): Likewise.
9327 (xmltarget_i386_linux_no_xml): Likewise.
9328 (xmltarget_amd64_linux_no_xml): Likewise.
9329 (PTRACE_GETREGSET): Likewise.
9330 (PTRACE_SETREGSET): Likewise.
9331 (x86_fill_xstateregset): Likewise.
9332 (x86_store_xstateregset): Likewise.
9333 (use_xml): Likewise.
9334 (x86_linux_update_xmltarget): Likewise.
9335 (x86_linux_process_qsupported): Likewise.
9336 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9337 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9338 init_registers_i386_linux here. Call
9339 x86_linux_update_xmltarget.
9340 (the_low_target): Add x86_linux_process_qsupported.
9341
9342 * server.c (handle_query): Call target_process_qsupported.
9343
9344 * target.h (target_ops): Add process_qsupported.
9345 (target_process_qsupported): New.
9346
fc7238bb
PA
93472010-04-03 Pedro Alves <pedro@codesourcery.com>
9348
9349 * inferiors.c (add_thread): Set last_status kind to
9350 TARGET_WAITKIND_IGNORE.
9351 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9352 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9353 (linux_wait_1): Move `thread' local definition to block that uses
9354 it. Don't NULL initialize `event_child'.
9355 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9356 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9357 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9358
bdabb078
PA
93592010-04-01 Pedro Alves <pedro@codesourcery.com>
9360
9361 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9362 an extended waitstatus, or by a watchpoint.
9363 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9364 thread was stepping or has been stopped by a watchpoint.
9365
d3bbe7a0
PA
93662010-04-01 Pedro Alves <pedro@codesourcery.com>
9367
9368 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9369 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9370 of another, then delete the previous, and validate all
9371 breakpoints.
9372 (validate_inserted_breakpoint): New.
9373 (delete_disabled_breakpoints): New.
9374 (validate_breakpoints): New.
9375 (check_mem_read): Validate breakpoints before trusting their
9376 shadow. Delete disabled breakpoints.
9377 (check_mem_write): Validate breakpoints before trusting they
9378 should be inserted. Delete disabled breakpoints.
9379 * mem-break.h (validate_breakpoints):
9380 * server.c (handle_query): Validate breakpoints when we see a
9381 qSymbol query.
9382
8b07ae33
PA
93832010-04-01 Pedro Alves <pedro@codesourcery.com>
9384
9385 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9386 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9387 if we could tell there's a GDB breakpoint at stop_pc.
9388 (need_step_over_p): Don't do a step over if we find a GDB
9389 breakpoint at the resume PC.
9390
9391 * mem-break.c (struct raw_breakpoint): New.
9392 (enum bkpt_type): New type `gdb_breakpoint'.
9393 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9394 fields. New field `raw'.
9395 (find_raw_breakpoint_at): New.
9396 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9397 breakpoint instead.
9398 (set_breakpoint_at): Adjust.
9399 (delete_raw_breakpoint): New.
9400 (release_breakpoint): New.
9401 (delete_breakpoint): Rename to...
9402 (delete_breakpoint_1): ... this. Add proc parameter. Use
9403 release_breakpoint. Return ENOENT.
9404 (delete_breakpoint): Reimplement.
9405 (find_breakpoint_at): Delete.
9406 (find_gdb_breakpoint_at): New.
9407 (delete_breakpoint_at): Delete.
9408 (set_gdb_breakpoint_at): New.
9409 (delete_gdb_breakpoint_at): New.
9410 (gdb_breakpoint_here): New.
9411 (set_reinsert_breakpoint): Use release_breakpoint.
9412 (uninsert_breakpoint): Rename to ...
9413 (uninsert_raw_breakpoint): ... this.
9414 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9415 (reinsert_raw_breakpoint): Change parameter type to
9416 raw_breakpoint.
9417 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9418 instead.
9419 (check_breakpoints): Adjust. Use release_breakpoint.
9420 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9421 (breakpoint_inserted_here): Ditto.
9422 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9423 Don't trust the breakpoint's shadow if it is not inserted.
9424 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9425 (delete_all_breakpoints): Adjust.
9426 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9427 use delete_breakpoint_1.
9428
9429 * mem-break.h (breakpoints_supported): Delete declaration.
9430 (set_gdb_breakpoint_at): Declare.
9431 (gdb_breakpoint_here): Declare.
9432 (delete_breakpoint_at): Delete.
9433 (delete_gdb_breakpoint_at): Declare.
9434
9435 * server.h (struct raw_breakpoint): Forward declare.
9436 (struct process_info): New field `raw_breakpoints'.
9437
9438 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9439 breakpoints.
9440
6bf5e0ba
PA
94412010-03-24 Pedro Alves <pedro@codesourcery.com>
9442
9443 * linux-low.c (status_pending_p_callback): Fix comment.
9444 (linux_wait_for_event_1): Move most of the internal breakpoint
9445 handling from here...
9446 (linux_wait_1): ... to here.
9447 (count_events_callback): New.
9448 (select_singlestep_lwp_callback): New.
9449 (select_event_lwp_callback): New.
9450 (cancel_breakpoints_callback): New.
9451 (select_event_lwp): New.
9452 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9453 priority to all LWPs that have had events that should be reported
9454 to the client. Cancel breakpoints when about to reporting the
9455 event to the client, not while stopping lwps. No longer cancel
9456 finished single-steps here.
9457 (cancel_finished_single_step): Delete.
9458 (cancel_finished_single_steps): Delete.
9459
414a389f
PA
94602010-03-24 Pedro Alves <pedro@codesourcery.com>
9461
9462 * mem-break.c (enum bkpt_type): New.
9463 (struct breakpoint): New field `type'.
9464 (set_breakpoint_at): Change return type to struct breakpoint
9465 pointer. Set type to `other_breakpoint' by default.
9466 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9467 in the breakpoint list.
9468 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9469 (reinsert_breakpoint): Rename to ...
9470 (reinsert_raw_breakpoint): ... this.
9471 (reinsert_breakpoints_at): Adjust.
9472 * mem-break.h (struct breakpoint): Declare.
9473 (set_breakpoint_at): Change return type to struct breakpoint
9474 pointer.
9475
2280c721
PA
94762010-03-24 Pedro Alves <pedro@codesourcery.com>
9477
9478 * server.c (handle_query): Assign, not compare.
9479
d50171e4
PA
94802010-03-24 Pedro Alves <pedro@codesourcery.com>
9481
9482 Teach linux gdbserver to step-over-breakpoints.
9483
9484 * linux-low.c (can_hardware_single_step): New.
9485 (supports_breakpoints): New.
9486 (handle_extended_wait): If stopping threads, read the stop pc of
9487 the new cloned LWP.
9488 (get_pc): New.
9489 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9490 low target doesn't support retrieving the PC.
9491 (add_lwp): Set last_resume_kind to resume_continue.
9492 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9493 (linux_attach): Don't clear stop_expected. Set the lwp's
9494 last_resume_kind to resume_stop.
9495 (linux_detach_one_lwp): Don't check for removed breakpoints.
9496 (check_removed_breakpoint): Delete.
9497 (status_pending_p): Rename to ...
9498 (status_pending_p_callback): ... this. Don't check for removed
9499 breakpoints. Don't consider threads that are stopped from GDB's
9500 perspective.
9501 (linux_wait_for_lwp): Always read the stop_pc here.
9502 (cancel_breakpoint): New.
9503 (step_over_bkpt): New global.
9504 (linux_wait_for_event_1): Implement stepping over breakpoints.
9505 (gdb_wants_lwp_stopped): New.
9506 (gdb_wants_all_stopped): New.
9507 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9508 single-step traps here. Store the thread's last reported target
9509 wait status.
9510 (send_sigstop): Don't clear stop_expected. Always set it,
9511 instead.
9512 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9513 (cancel_finished_single_step): New.
9514 (cancel_finished_single_steps): New.
9515 (wait_for_sigstop): Don't cancel finished single-step traps here.
9516 (linux_resume_one_lwp): Don't check for removed breakpoints.
9517 Don't set `step' on non-hardware step archs.
9518 (linux_set_resume_request): Ignore resume_stop requests if already
9519 stopping or stopped. Set the lwp's last_resume_kind.
9520 (resume_status_pending_p): Don't check for removed breakpoints.
9521 (need_step_over_p): New.
9522 (start_step_over): New.
9523 (finish_step_over): New.
9524 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9525 requests. Clear the thread's last reported target waitstatus.
9526 Don't use the `suspended' flag. Don't consider pending breakpoints.
9527 (linux_resume): Start a step-over if necessary.
9528 (proceed_one_lwp): New.
9529 (proceed_all_lwps): New.
9530 (unstop_all_lwps): New.
9531 * linux-low.h (struct lwp_info): Rewrite comment for the
9532 `suspended' flag. Add the `stop_pc' field. Delete the
9533 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9534 Add `'last_resume_kind' and `need_step_over' fields.
9535 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9536 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9537 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9538 (set_raw_breakpoint_at): New.
9539 (set_breakpoint_at): Rewrite to use it.
9540 (reinsert_breakpoint_handler): Delete.
9541 (set_reinsert_breakpoint): New.
9542 (reinsert_breakpoint_by_bp): Delete.
9543 (delete_reinsert_breakpoints): New.
9544 (uninsert_breakpoint): Rewrite.
9545 (uninsert_breakpoints_at): New.
9546 (reinsert_breakpoint): Rewrite.
9547 (reinsert_breakpoints_at): New.
9548 (check_breakpoints): Rewrite.
9549 (breakpoint_here): New.
9550 (breakpoint_inserted_here): New.
9551 (check_mem_read): Adjust.
9552 * mem-break.h (breakpoints_supported, breakpoint_here)
9553 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9554 (reinsert_breakpoint_by_bp): Delete declaration.
9555 (delete_reinsert_breakpoints): Declare.
9556 (reinsert_breakpoint): Delete declaration.
9557 (reinsert_breakpoints_at): Declare.
9558 (uninsert_breakpoint): Delete declaration.
9559 (uninsert_breakpoints_at): Declare.
9560 (check_breakpoints): Adjust prototype.
9561 * server.h: Adjust include order.
9562 (struct thread_info): Declare here. Add a `last_status' field.
9563
30ba68cb
MS
95642010-03-23 Michael Snyder <msnyder@vmware.com>
9565
9566 * server.c (crc32): New function.
9567 (handle_query): Add handling for 'qCRC:' request.
9568
b9a881c2
PA
95692010-03-23 Pedro Alves <pedro@codesourcery.com>
9570
9571 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9572 lwp had been stopped by a watchpoint.
9573
e92d13d5
PA
95742010-03-16 Pedro Alves <pedro@codesourcery.com>
9575
9576 * server.h (internal_error): Declare.
9577 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9578 * utils.c (internal_error): New function.
9579
64daa791
AS
95802010-03-15 Andreas Schwab <schwab@redhat.com>
9581
9582 * configure.srv: Fix typo setting srv_regobj.
9583
f52cd8cd
PA
95842010-03-15 Pedro Alves <pedro@codesourcery.com>
9585
9586 * linux-low.c (fetch_register): Avoid passing a non string literal
9587 format to `error'.
9588 (usr_store_inferior_registers): Ditto.
9589
93ae6fdc
PA
95902010-03-14 Pedro Alves <pedro@codesourcery.com>
9591
9592 * linux-low.c (linux_write_memory): Bail out early if peeking
9593 memory failed.
9594
c3adc08c
PA
95952010-03-14 Pedro Alves <pedro@codesourcery.com>
9596
9597 * linux-low.h (struct lwp_info): New fields
9598 `stopped_by_watchpoint' and `stopped_data_address'.
9599 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9600 here, and cache them in the lwp object.
9601 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9602 directly.
9603 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9604 field.
9605 (linux_stopped_by_watchpoint): Rewrite.
9606 (linux_stopped_data_address): Rewrite.
9607
bce522a2
PA
96082010-03-06 Simo Melenius <simo.melenius@iki.fi>
9609
9610 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9611 switching the current inferior, not before.
9612
90884b2b
L
96132010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9614
9615 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9616 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9617 i386-linux.c and amd64-linux.c.
9618 (reg-i386.o): Removed.
9619 (reg-i386.c): Likewise.
9620 (reg-i386-linux.o): Likewise.
9621 (reg-i386-linux.c): Likewise.
9622 (reg-x86-64.o): Likewise.
9623 (reg-x86-64.c): Likewise.
9624 (reg-x86-64-linux.o): Likewise.
9625 (reg-x86-64-linux.c): Likewise.
9626 (i386.o): New.
9627 (i386.c): Likewise.
9628 (i386-linux.o): Likewise.
9629 (i386-linux.c): Likewise.
9630 (amd64.o): Likewise.
9631 (amd64.c): Likewise.
9632 (amd64-linux.o): Likewise.
9633 (amd64-linux.c): Likewise.
9634
9635 * configure.srv (srv_i386_regobj): New.
9636 (srv_i386_linux_regobj): Likewise.
9637 (srv_amd64_regobj): Likewise.
9638 (srv_amd64_linux_regobj): Likewise.
9639 (srv_i386_32bit_xmlfiles): Likewise.
9640 (srv_i386_64bit_xmlfiles): Likewise.
9641 (srv_i386_xmlfiles): Likewise.
9642 (srv_amd64_xmlfiles): Likewise.
9643 (srv_i386_linux_xmlfiles): Likewise.
9644 (srv_amd64_linux_xmlfiles): Likewise.
9645 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9646 srv_xmlfiles to $srv_i386_xmlfiles.
9647 (i[34567]86-*-mingw32ce*): Likewise.
9648 (i[34567]86-*-mingw*): Likewise.
9649 (i[34567]86-*-nto*): Likewise.
9650 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9651 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9652 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9653 (x86_64-*-linux*): Likewise.
9654
9655 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9656 (init_registers_amd64_linux): New.
9657 (x86_arch_setup): Replace init_registers_x86_64_linux with
9658 init_registers_amd64_linux.
9659
193f13e6
MK
96602010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9661
9662 * configure.ac: Check for libdl. If it is not available link against
9663 static libthread_db.
9664 * configure: Regenerate.
9665
85d721b8
PA
96662010-02-22 Pedro Alves <pedro@codesourcery.com>
9667
9668 PR9605
9669
9670 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9671 handing a read watchpoint.
9672 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9673
6076632b
DE
96742010-02-12 Doug Evans <dje@google.com>
9675
9676 * linux-low.c (linux_supports_tracefork_flag): Document.
9677 (linux_look_up_symbols): Add comment.
9678
3327ccf7
L
96792010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9680
9681 * regcache.c (supply_register): Clear regcache if buf is NULL.
9682
0718675c 96832010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9684 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9685
9686 * inferiors.c (find_inferior): Add function documentation.
9687 (unloaded_dll): Handle the case where the unloaded dll has not
9688 been previously registered in the dll list.
9689
177321bd
DJ
96902010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9691
9692 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9693 (thumb2_breakpoint): New.
9694 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9695
2b009048
DJ
96962010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9697
9698 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9699 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9700 breakpoints.
9701
3be029c7
PA
97022010-01-21 Pedro Alves <pedro@codesourcery.com>
9703
9704 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9705
18f5de3b
JK
97062010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9707
9708 * linux-s390-low.c (s390_collect_ptrace_register)
9709 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9710
3743bb4f
DE
97112010-01-21 Doug Evans <dje@google.com>
9712
14ce3065
DE
9713 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9714 (PTRACE_ARG4_TYPE): New macro.
9715 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9716 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9717 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9718 (usr_store_inferior_registers): Ditto.
9719 (linux_read_memory, linux_write_memory): Ditto.
9720 (linux_test_for_tracefork): Ditto.
9721
3743bb4f
DE
9722 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9723 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9724
8b315be5
PA
97252010-01-21 Pedro Alves <pedro@codesourcery.com>
9726
9727 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9728 target.
9729
85492558
PA
97302010-01-21 Pedro Alves <pedro@codesourcery.com>
9731
9732 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9733 prototype to take a regcache. Adjust.
9734
442ea881
PA
97352010-01-20 Pedro Alves <pedro@codesourcery.com>
9736
9737 * regcache.h (struct thread_info): Forward declare.
9738 (struct regcache): New.
9739 (new_register_cache): Adjust prototype.
9740 (get_thread_regcache): Declare.
9741 (free_register_cache): Adjust prototype.
9742 (registers_to_string, registers_from_string): Ditto.
9743 (supply_register, supply_register_by_name, collect_register)
9744 (collect_register_as_string, collect_register_by_name): Ditto.
9745 * regcache.c (struct inferior_regcache_data): Delete.
9746 (get_regcache): Rename to ...
9747 (get_thread_regcache): ... this. Adjust. Switch inferior before
9748 fetching registers.
9749 (regcache_invalidate_one): Adjust.
9750 (regcache_invalidate): Fix prototype.
9751 (new_register_cache): Return the new register cache.
9752 (free_register_cache): Change prototype.
9753 (realloc_register_cache): Adjust.
9754 (registers_to_string): Change prototype to take a regcache. Adjust.
9755 (registers_from_string): Ditto.
9756 (register_data): Ditto.
9757 (supply_register): Ditto.
9758 (supply_register_by_name): Ditto.
9759 (collect_register): Ditto.
9760 (collect_register_as_string): Ditto.
9761 (collect_register_by_name): Ditto.
9762 * server.c (process_serial_event): Adjust.
9763 * linux-low.h (regset_fill_func, regset_store_func): Change
9764 prototype.
9765 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9766 Change prototype.
9767 * linux-low.c (get_stop_pc): Adjust.
9768 (check_removed_breakpoint): Adjust.
9769 (linux_wait_for_event): Adjust.
9770 (linux_resume_one_lwp): Adjust.
9771 (fetch_register): Add regcache parameter. Adjust.
9772 (usr_store_inferior_registers): Ditto.
9773 (regsets_fetch_inferior_registers): Ditto.
9774 (regsets_store_inferior_registers): Ditto.
9775 (linux_fetch_registers, linux_store_registers): Ditto.
9776 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9777 regcache. Adjust.
43aaf8b6
PA
9778 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9779 Ditto.
442ea881
PA
9780 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9781 prototype to take a regcache.
9782 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9783 * remote-utils.c (convert_ascii_to_int, outreg)
9784 (prepare_resume_reply): Change prototype to take a regcache.
9785 Adjust.
9786 * target.h (struct target_ops) <fetch_registers, store_registers>:
9787 Change prototype to take a regcache.
9788 (fetch_inferior_registers, store_inferior_registers): Change
9789 prototype to take a regcache. Adjust.
9790 * proc-service.c (ps_lgetregs): Adjust.
9791 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9792 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9793 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9794 take a regcache. Adjust.
9795 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9796 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9797 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9798 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9799 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9800 (cris_cannot_fetch_register):
9801 (cris_breakpoint_at): Change prototype to take a regcache.
9802 Adjust.
9803 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9804 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9805 to take a regcache. Adjust.
9806 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9807 Adjust.
9808 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9809 take a regcache. Adjust.
9810 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9811 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9812 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9813 * linux-mips-low.c (mips_get_pc):
9814 (mips_set_pc): Change prototype to take a regcache. Adjust.
9815 (mips_reinsert_addr): Adjust.
9816 (mips_collect_register): Change prototype to take a regcache.
9817 Adjust.
9818 (mips_supply_register):
9819 (mips_collect_register_32bit, mips_supply_register_32bit)
9820 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9821 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9822 * linux-ppc-low.c (ppc_supply_ptrace_register)
9823 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9824 (parse_spufs_run): Adjust.
9825 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9826 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9827 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9828 take a regcache. Adjust.
9829 * linux-s390-low.c (s390_collect_ptrace_register)
9830 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9831 (s390_set_pc): Change prototype to take a regcache. Adjust.
9832 (s390_arch_setup): Adjust.
9833 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9834 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9835 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9836 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9837 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9838 regcache. Adjust.
9839 (sparc_breakpoint_at): Adjust.
9840 * linux-xtensa-low.c (xtensa_fill_gregset):
9841 (xtensa_store_gregset):
9842 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9843 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9844 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9845 prototype to take a regcache. Adjust.
9846 * win32-arm-low.c (arm_fetch_inferior_register)
9847 (arm_store_inferior_register): Change prototype to take a
9848 regcache. Adjust.
9849 * win32-i386-low.c (i386_fetch_inferior_register)
9850 (i386_store_inferior_register): Change prototype to take a
9851 regcache. Adjust.
9852 * win32-low.c (child_fetch_inferior_registers)
9853 (child_store_inferior_registers): Change prototype to take a
9854 regcache. Adjust.
9855 (win32_wait): Adjust.
9856 (win32_fetch_inferior_registers): Change prototype to take a
9857 regcache. Adjust.
9858 (win32_store_inferior_registers): Adjust.
9859 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9860 store_inferior_register>: Change prototype to take a regcache.
9861
60c3d7b0
DE
98622010-01-20 Doug Evans <dje@google.com>
9863
9864 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9865 #ifdef.
9866 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9867 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9868
dc146f7c
VP
98692010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9870
9871 * linux-low.c (linux_core_of_thread): New.
9872 (compare_ints, show_process, list_threads): New.
9873 (linux_qxfer_osdata): Report threads and cores.
9874 (linux_target_op): Register linux_core_of_thread.
9875 * remote-utils.c (prepare_resume_reply): Report the core.
9876 (buffer_xml_printf): Support %d specifier.
9877 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9878 New.
9879 (handle_query): Handle qXfer:threads. Announce availability
9880 thereof.
9881 * target.h (struct target_ops): New field core_of_thread.
9882
7803799a
UW
98832010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9884
9885 * Makefile.in (clean): Remove new generated files.
9886 (reg-s390.o, reg-s390.c): Remove rules.
9887 (reg-s390x.o, reg-s390x.c): Likewise.
9888 (s390-linux32.o, s390-linux32.c): Add rules.
9889 (s390-linux64.o, s390-linux64.c): Likewise.
9890 (s390x-linux64.o, s390x-linux64.c): Likewise.
9891 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9892 * linux-s390-low.c: Include <elf.h>.
9893 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9894 (init_registers_s390): Remove prototype.
9895 (init_registers_s390x): Likewise.
9896 (init_registers_s390_linux32): Add prototype.
9897 (init_registers_s390_linux64): Likewise.
9898 (init_registers_s390x_linux64): Likewise.
9899 (s390_num_regs_3264): New define.
9900 (s390_regmap_3264): New global variable.
9901 (s390_cannot_fetch_register): Remove obsolete check.
9902 (s390_cannot_store_register): Likewise.
9903 (s390_collect_ptrace_register): Handle upper/lower register halves.
9904 (s390_supply_ptrace_register): Likewise.
9905 (s390_fill_gregset): Update to register number changes.
9906 (s390_get_hwcap): New routine.
9907 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9908 Install appropriate regmap and register set.
9909
6e7ffa39
JB
99102010-01-01 Joel Brobecker <brobecker@adacore.com>
9911
9912 * server.c (gdbserver_version): Update copyright year to 2010.
9913 * gdbreplay.c (gdbreplay_version): Likewise.
9914
957f3f49
DE
99152009-12-28 Doug Evans <dje@google.com>
9916
9917 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9918 elf/external.h. Include <elf.h> instead but only if necessary.
9919
ca5c370d
PA
99202009-12-28 Pedro Alves <pedro@codesourcery.com>
9921
9922 * linux-low.c (linux_remove_process): Remove `detaching'
9923 parameter. Don't release/detach from thread_db here.
9924 (linux_kill): Release/detach from thread_db here, ...
9925 (linux_detach): ... and here, before actually detaching.
9926 (linux_wait_1): ... and here, when a process exits.
9927 * thread-db.c (any_thread_of): New.
9928 (thread_db_free): Switch the current inferior to a thread of the
9929 passed in process.
9930
4ee62156
DE
99312009-12-21 Doug Evans <dje@google.com>
9932
d90e6a88
DE
9933 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9934
c5f62d5f
DE
9935 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9936 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9937 warning ifndef __NR_tkill. Move setting of errno there too.
9938 Delete unnecessary resetting of errno after syscall.
9939 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9940
10e86dd7
DE
9941 * configure.ac: Check for dladdr.
9942 * config.in: Regenerate.
9943 * configure: Regenerate.
9944 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9945 (try_thread_db_load): Update.
9946
4ee62156
DE
9947 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9948
00f515da
DE
99492009-12-18 Doug Evans <dje@google.com>
9950
e9464885
DE
9951 * event-loop.c: Include unistd.h if it exists.
9952
07d4f67e
DE
9953 * linux-low.c (my_waitpid): Move definition away from being in
9954 between linux_tracefork_child/linux_test_for_tracefork.
9955
00f515da
DE
9956 * gdb_proc_service.h (psaddr_t): Fix type.
9957 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9958 signature to match glibc.
9959
1de1badb
DE
99602009-12-16 Doug Evans <dje@google.com>
9961
9962 * linux-low.c (linux_read_memory): Fix argument to read.
9963
aeeb81d1
PA
99642009-11-26 Pedro Alves <pedro@codesourcery.com>
9965
9966 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9967 events, don't leave current_inferior pointing at null.
9968
10357975
PA
99692009-11-26 Pedro Alves <pedro@codesourcery.com>
9970
9971 * win32-low.c (LOG): Delete.
9972 (OUTMSG): Output to stderr.
9973 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9974 on compile time LOG macro.
9975 (win32_wait): Fix debug output.
9976
cf6e3471
PA
99772009-11-26 Pedro Alves <pedro@codesourcery.com>
9978
9979 * win32-low.c (win32_add_one_solib): If the dll name is
9980 "ntdll.dll", prepend the system directory to the dll path.
9981
0c85e18e
MK
99822009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9983
9984 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9985
9ac544ce 99862009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9987 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9988
9989 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9990 * configure.ac: Check for __mcoldfire__ and set
9991 gdb_cv_m68k_is_coldfire.
9992 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9993 reg-cf.o and reg-m68k.o.
9994 * configure: Regenerated.
9995
fd7dd3e6
PA
99962009-11-16 Pedro Alves <pedro@codesourcery.com>
9997
9998 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9999 Pass it to thread_db_free.
10000 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10001 proper `detaching' argument to linux_remove_process.
10002 * linux-low.h (thread_db_free): Add `detaching' parameter.
10003 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10004 to thread_db_free.
10005 (thread_db_free): Add `detaching' parameter. Only
10006 call td_ta_clear_event if detaching from process.
10007
75aa492e
MK
100082009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10009
10010 * thread-db.c (thread_db_free): Fix typo.
10011
21e1bee4
PP
100122009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10013
10014 PR gdb/10838
10015 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10016
8838b45e
NS
100172009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10018
10019 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10020 with an i686 compiler.
10021 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10022 needed.
10023 * configure: Rebuilt.
10024
8a35fb51
SL
100252009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10026
10027 PR gdb/10783
10028
10029 * server.c (handle_search_memory_1): Correct read_addr initialization
10030 in loop for searching subsequent chunks.
10031
96f15937
PP
100322009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10033
10034 * configure.ac: New --with-libthread-db option.
10035 * thread-db.c: Allow direct dependence on libthread_db.
10036 (thread_db_free): Adjust.
10037 * config.in: Regenerate.
10038 * configure: Likewise.
889bf7c5 10039
5f7d1694
PP
100402009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10041
10042 PR gdb/10757
10043 * thread-db.c (attach_thread): New function.
10044 (maybe_attach_thread): Return success/failure.
10045 (find_new_threads_callback): Adjust.
889bf7c5
PA
10046 (thread_db_find_new_threads): Loop until no new threads.
10047
88e3b899
PA
100482009-10-13 Pedro Alves <pedro@codesourcery.com>
10049
10050 * proc-service.c (ps_lgetregs): Formatting.
10051
cdbfd419
PP
100522009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10053
10054 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10055 * configure.ac: Adjust.
10056 * linux-low.h (struct process_info_private): Move members to struct
10057 thread_db.
10058 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10059 * linux-low.c (linux_remove_process): Adjust.
10060 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10061 * server.c (handle_query): Move code ...
10062 (handle_monitor_command): ... here. New function.
10063 * target.h (struct target_ops): New member.
10064 * thread-db.c (struct thread_db): New.
10065 (libthread_db_search_path): New variable.
10066 (thread_db_create_event, thread_db_enable_reporting)
10067 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10068 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10069 (try_thread_db_load_1, dladdr_to_soname): New functions.
10070 (try_thread_db_load, thread_db_load_search): New functions.
10071 (thread_db_init): Search for libthread_db.
10072 (thread_db_free): New function.
10073 (thread_db_handle_monitor_command): Likewise.
10074 * config.in: Regenerate.
10075 * configure: Regenerate.
889bf7c5 10076
4168d2d6
UW
100772009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10078
10079 * spu-low.c (spu_kill): Wait for inferior to terminate.
10080 Call clear_inferiors.
10081 (spu_detach): Call clear_inferiors.
10082
81ecdfbb
RW
100832009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10084
10085 * aclocal.m4: Regenerate.
10086 * config.in: Likewise.
10087 * configure: Likewise.
10088
0b9ff2c0
UW
100892009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10090
10091 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10092 (parse_spufs_run): New function.
10093 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10094 (ppc_breakpoint_at): Handle SPU breakpoints.
10095
efcbbd14
UW
100962009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10097
10098 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10099 (SPUFS_MAGIC): Define.
10100 (spu_enumerate_spu_ids): New function.
10101 (linux_qxfer_spu): New function.
10102 (linux_target_ops): Install linux_qxfer_spu.
10103
f4d9bade
UW
101042009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10105
10106 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10107 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10108 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10109 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10110 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10111 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10112 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10113 (init_registers_powerpc_cell32l): Add prototype.
10114 (init_registers_powerpc_cell64l): Likewise.
10115 (ppc_arch_setup): Detect Cell/B.E. architecture.
10116
96e946ca
RW
101172009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10118
10119 * Makefile.in (datarootdir): New variable.
10120
58d6951d
DJ
101212009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10122
10123 * linux-low.c (linux_write_memory): Update debugging output.
10124 * Makefile.in (clean): Add new descriptions.
10125 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10126 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10127 * configure.srv: Add new files for arm*-*-linux*.
10128 * linux-arm-low.c: Add new declarations.
10129 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10130 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10131 (HWCAP_VFPv3D16): New.
10132 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10133 instead of __IWMMXT__.
10134 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10135 (arm_arch_setup): New.
10136 (target_regsets): Remove #ifdef. Add VFP regset.
10137 (the_low_target): Use arm_arch_setup.
10138
12b42a12
DJ
101392009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10140
10141 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10142 the main thread again.
10143
ac8c974e
AR
101442009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10145
10146 Adding Neutrino gdbserver.
10147 * configure: Regenerated.
10148 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10149 * configure.srv (i[34567]86-*-nto*): New target.
10150 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10151 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10152 (nto_comctrl) [__QNX__]: New function.
10153 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10154
4424e0c3 101552009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10156
10157 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10158 srv_tgtobj.
10159
912cf4ba
PA
101602009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10161 Pedro Alves <pedro@codesourcery.com>
10162
10163 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10164 don't support CONTEXT_EXTENDED_REGISTERS.
10165 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10166 (the_low_target): Install them.
10167 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10168 failing with ERROR_PIPE_NOT_CONNECTED.
10169
aa5ca48f
DE
101702009-06-30 Doug Evans <dje@google.com>
10171 Pierre Muller <muller@ics.u-strasbg.fr>
10172
10173 Add h/w watchpoint support to x86-linux, win32-i386.
10174 * Makefile.in (SFILES): Add i386-low.c
10175 (i386_low_h): Define.
10176 (i386-low.o): Add dependencies.
10177 (linux-x86-low.o): Add i386-low.h dependency.
10178 (win32-i386-low.o): Ditto.
10179 * i386-low.c: New file.
10180 * i386-low.h: New file.
10181 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10182 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10183 * linux-low.c (linux_add_process): Initialize arch_private.
10184 (linux_remove_process): Free arch_private.
10185 (add_lwp): Initialize arch_private.
10186 (delete_lwp): Free arch_private.
10187 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10188 provided.
10189 * linux-low.h (process_info_private): New member arch_private.
10190 (lwp_info): New member arch_private.
10191 (linux_target_ops): New members new_process, new_thread,
10192 prepare_to_resume.
10193 (ptid_of): New macro.
10194 * linux-x86-low.c: Include stddef.h, i386-low.h.
10195 (arch_process_info): New struct.
10196 (arch_lwp_info): New struct.
10197 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10198 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10199 (i386_dr_low_get_status): New function.
10200 (x86_insert_point, x86_remove_point): New functions.
10201 (x86_stopped_by_watchpoint): New function.
10202 (x86_stopped_data_address): New function.
10203 (x86_linux_new_process, x86_linux_new_thread): New functions.
10204 (x86_linux_prepare_to_resume): New function.
10205 (the_low_target): Add entries for insert_point, remove_point,
10206 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10207 prepare_to_resume.
10208 * server.c (debug_hw_points): New global.
10209 (monitor_show_help): Document set debug-hw-points.
10210 (handle_query): Process "set debug-hw-points".
10211 * server.h (debug_hw_points): Declare.
10212 (paddress): Declare.
10213 * utils.c (NUMCELLS, CELLSIZE): New macros.
10214 (get_sell, xsnprintf, paddress): New functions.
10215 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10216 remove_point, stopped_by_watchpoint, stopped_data_address.
10217 * win32-i386-low.c: Include i386-low.h.
10218 (debug_reg_state): Replaces dr.
10219 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10220 (i386_dr_low_get_status): New function.
10221 (i386_insert_point, i386_remove_point): New functions.
10222 (i386_stopped_by_watchpoint): New function.
10223 (i386_stopped_data_address): New function.
10224 (i386_initial_stuff): Update.
10225 (get_thread_context,set_thread_context,i386_thread_added): Update.
10226 (the_low_target): Add entries for insert_point,
10227 remove_point, stopped_by_watchpoint, stopped_data_address.
10228 * win32-low.c (win32_insert_watchpoint): New function.
10229 (win32_remove_watchpoint): New function.
10230 (win32_stopped_by_watchpoint): New function.
10231 (win32_stopped_data_address): New function.
10232 (win32_target_ops): Add entries for insert_watchpoint,
10233 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10234 * win32-low.h (win32_target_ops): New members insert_point,
10235 remove_point, stopped_by_watchpoint, stopped_data_address.
10236
d993e290
PA
102372009-06-25 Pedro Alves <pedro@codesourcery.com>
10238
10239 * server.c (process_serial_event): Re-return unsupported, not
10240 error, if the type isn't recognized. Re-allow supporting only
10241 insert or remove packets. Also call require_running for
10242 breakpoints. Add missing break statement to default case. Tidy.
10243 * target.h (struct target_ops): Rename insert_watchpoint to
10244 insert_point, and remove_watchpoint to remove_point.
10245
10246 * linux-low.h (struct linux_target_ops): Likewise.
10247 * linux-low.c (linux_insert_watchpoint): Rename to ...
10248 (linux_insert_point): ... this. Adjust.
10249 (linux_remove_watchpoint): Rename to ...
10250 (linux_remove_point): ... this. Adjust.
10251 (linux_target_ops): Adjust.
10252 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10253 (cris_insert_point): ... this.
10254 (cris_remove_watchpoint): Rename to ...
10255 (cris_remove_point): ... this.
10256 (the_low_target): Adjust.
10257
0f54c268
PM
102582009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10259
10260 * server.c (handle_v_kill): Pass signal_pid to
10261 kill_inferior if multi_process is zero.
10262
c6314022
AR
102632009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10264
10265 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10266 * target.h (target_ops): Comment for *_watchpoint to make it clear
10267 the functions can get types '0' and '1'.
10268
4463ce24
AR
102692009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10270
10271 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10272 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10273 * regcache.c (get_regcache): Likewise.
10274 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10275 * win32-low.c (child_fetch_inferior_registers): Remove check for
10276 regno 0.
10277
cf8fd78b
PA
102782009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10279 Pedro Alves <pedro@codesourcery.com>
10280
10281 * target.h (struct target_ops) <supports_multi_process>: New
10282 callback.
10283 (target_supports_multi_process): New.
10284 * server.c (handle_query): Even if GDB reports support, only
10285 enable multi-process if the target also supports it. Report
10286 multi-process support only if the target backend supports it.
10287 * linux-low.c (linux_supports_multi_process): New function.
10288 (linux_target_ops): Install it as target_supports_multi_process
10289 callback.
10290
47c0c975
DE
102912009-05-24 Doug Evans <dje@google.com>
10292
e09875d4
DE
10293 Global renaming of find_thread_pid to find_thread_ptid.
10294 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10295 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10296 All callers updated.
10297
e27d73f6
DE
10298 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10299 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10300 directly.
10301
47c0c975
DE
10302 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10303 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10304 (linux_resume_one_lwp): Ditto.
10305
2acc282a
DE
103062009-05-23 Doug Evans <dje@google.com>
10307
10308 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10309 from struct inferior_list_entry * to struct lwp_info *.
10310 All callers updated.
10311
9f1036c1
DE
103122009-05-13 Doug Evans <dje@google.com>
10313
10314 * linux-x86-low.c: Don't include assert.h.
10315 (x86_siginfo_fixup): Use fatal, not assert.
10316 (x86_arch_setup): Fix comment.
10317
d0722149
DE
103182009-05-12 Doug Evans <dje@google.com>
10319
10320 Biarch support for i386/amd64 gdbserver.
10321 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10322 Add linux-x86-low.c.
10323 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10324 (linux-x86-low.o): Add.
10325 * linux-x86-64-low.c: Delete.
10326 * linux-i386-low.c: Delete.
10327 * linux-x86-low.c: New file.
10328 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10329 linux-x86-low.o.
10330 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10331 linux-x86-low.o.
10332 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10333 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10334 (linux_child_pid_to_exec_file): New function.
10335 (elf_64_header_p, elf_64_file_p): New functions.
10336 (siginfo_fixup): New function.
10337 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10338 give target a chance to convert layout.
10339 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10340 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10341
fdeb2a12
DE
103422009-05-07 Doug Evans <dje@google.com>
10343
10344 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10345 (regsets_store_inferior_registers): Ditto.
10346
a6dbe5df
PA
103472009-05-06 Pedro Alves <pedro@codesourcery.com>
10348
10349 PR server/10048
10350
10351 * linux-low.c (must_set_ptrace_flags): Delete.
10352 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10353 of the global.
10354 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10355 `lwp->must_set_ptrace_flags' instead.
ba42693b 10356 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10357 (linux_wait_1): ... not here.
10358
5091eb23
DE
103592009-04-30 Doug Evans <dje@google.com>
10360
9f767825
DE
10361 * inferiors.c (started_inferior_callback): New function.
10362 (attached_inferior_callback): New function.
10363 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10364 * server.c (print_started_pid, print_attached_pid): New functions.
10365 (detach_or_kill_for_exit): New function.
10366 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10367 * server.h (have_started_inferiors_p): Declare.
10368 (have_attached_inferiors_p): Declare.
10369
5091eb23
DE
10370 * inferiors.c (remove_process): Fix memory leak, free process.
10371 * linux-low.c (linux_remove_process): New function.
10372 (linux_kill): Call it instead of remove_process.
10373 (linux_detach, linux_wait_1): Ditto.
10374
155c8968
PA
103752009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10376
10377 * configure.srv: Add x86 Windows CE target.
10378
7fe519cb
UW
103792009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10380
10381 * inferiors.c (get_thread_process): Make global.
10382 * server.h (get_thread_process): Add prototype.
10383 * thread-db.c (find_one_thread): Use get_thread_process
10384 instead of current_process.
10385 (thread_db_get_tls_address): Do not crash if called when
10386 thread layer is not yet initialized.
10387
5472f405
UW
103882009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10389
10390 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10391 * spu-low.c (current_tid): Rename to ...
10392 (current_ptid): ... this.
10393 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10394 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10395 ptid_get_lwp (current_ptid) instead of current_tid.
10396 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10397 instead of current_tid. Use find_process_pid to verify pid
10398 argument is valid. Pass proper argument to remove_process.
10399 (spu_thread_alive): Compare current_ptid instead of current_tid.
10400 (spu_resume): Likewise.
10401
55ac2b99
PA
104022009-04-02 Pedro Alves <pedro@codesourcery.com>
10403
10404 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10405 variable.
10406
95954743
PA
104072009-04-01 Pedro Alves <pedro@codesourcery.com>
10408
10409 Implement the multiprocess extensions, and add linux multiprocess
10410 support.
10411
10412 * server.h (ULONGEST): Declare.
10413 (struct ptid, ptid_t): New.
10414 (minus_one_ptid, null_ptid): Declare.
10415 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10416 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10417 (struct inferior_list_entry): Change `id' type from unsigned from
10418 to ptid_t.
10419 (struct sym_cache, struct breakpoint, struct
10420 process_info_private): Forward declare.
10421 (struct process_info): Declare.
10422 (current_process): Declare.
10423 (all_processes): Declare.
10424 (initialize_inferiors): Declare.
10425 (add_thread): Adjust to use ptid_t.
10426 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10427 (add_process, remove_process, find_thread_pid): Declare.
10428 (find_inferior_id): Adjust to use ptid_t.
10429 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10430 (multi_process): Declare.
10431 (push_event): Adjust to use ptid_t.
10432 (read_ptid, write_ptid): Declare.
10433 (prepare_resume_reply): Adjust to use ptid_t.
10434 (clear_symbol_cache): Declare.
10435 * inferiors.c (all_processes): New.
10436 (null_ptid, minus_one_ptid): New.
10437 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10438 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10439 (add_thread): Change unsigned long to ptid. Remove gdb_id
10440 parameter. Adjust.
10441 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10442 (gdb_id_to_thread): Rename to ...
10443 (find_thread_pid): ... this. Change unsigned long to ptid.
10444 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10445 (loaded_dll, pull_pid_from_list): Adjust.
10446 (add_process, remove_process, find_process_pid)
10447 (get_thread_process, current_process, initialize_inferiors): New.
10448 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10449 (struct target_waitstatus) <related_pid>: Ditto.
10450 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10451 return type to int.
10452 (struct target_ops) <join>: Add `pid' argument.
10453 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10454 (struct target_ops) <wait>: Add `ptid' field. Change return type
10455 to ptid.
10456 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10457 (mywait): Add `ptid' argument. Change return type to ptid_t.
10458 (target_pid_to_str): Declare.
10459 * target.c (set_desired_inferior): Adjust to use ptids.
10460 (mywait): Add new `ptid' argument. Adjust.
10461 (target_pid_to_str): New.
10462 * mem-break.h (free_all_breakpoints): Declare.
10463 * mem-break.c (breakpoints): Delelete.
10464 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10465 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10466 to use per-process breakpoint list.
10467 (free_all_breakpoints): New.
10468 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10469 (symbol_cache, all_symbols_looked_up): Delete.
10470 (hexchars): New.
10471 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10472 read_ptid): New.
10473 (prepare_resume_reply): Change ptid argument's type from unsigned
10474 long to ptid_t. Adjust. Implement W;process and X;process.
10475 (free_sym_cache, clear_symbol_cache): New.
10476 (look_up_one_symbol): Adjust to per-process symbol cache. *
10477 * server.c (cont_thread, general_thread, step_thread): Change type
10478 to ptid_t.
10479 (attached): Delete.
10480 (multi_process): New.
10481 (last_ptid): Change type to ptid_t.
10482 (struct vstop_notif) <ptid>: Change type to ptid_t.
10483 (queue_stop_reply, push_event): Change `ptid' argument's type to
10484 ptid_t.
10485 (discard_queued_stop_replies): Add `pid' argument.
10486 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10487 changes. Don't reference the `attached' global.
10488 (attach_inferior): Adjust to mywait interface changes.
10489 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10490 features. Handle and report "multiprocess+". Handle
10491 "qAttached:PID".
10492 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10493 changes.
10494 (handle_v_kill): New.
10495 (handle_v_stopped): Adjust to use target_pid_to_str.
10496 (handle_v_requests): Allow multiple attaches and runs when
10497 multiprocess extensions are in effect. Handle "vKill".
10498 (myresume): Adjust to use ptids.
10499 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10500 (handle_status): Adjust to discard_queued_stop_replies interface
10501 change.
10502 (first_thread_of, kill_inferior_callback)
10503 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10504 (main): Call initialize_inferiors. Adjust to use ptids, killing
10505 and detaching from all inferiors. Handle multiprocess packet
10506 variants.
10507 * linux-low.h: Include gdb_proc_service.h.
10508 (struct process_info_private): New.
10509 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10510 <lwpid_of>: Use ptid_get_lwp.
10511 (get_lwp_thread): Adjust.
10512 (struct lwp_info): Add `dead' member.
10513 (find_lwp_pid): Declare.
10514 * linux-low.c (thread_db_active): Delete.
10515 (new_inferior): Adjust comment.
10516 (inferior_pid): Delete.
10517 (linux_add_process): New.
10518 (handle_extended_wait): Adjust.
10519 (add_lwp): Change unsigned long to ptid.
10520 (linux_create_inferior): Add process to processes table. Adjust
10521 to use ptids. Don't set new_inferior here.
10522 (linux_attach_lwp): Rename to ...
10523 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10524 it. Adjust to use ptids.
10525 (linux_attach_lwp): New.
10526 (linux_attach): Add process to processes table. Don't set
10527 new_inferior here.
10528 (struct counter): New.
10529 (second_thread_of_pid_p, last_thread_of_process_p): New.
10530 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10531 multiple processes.
10532 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10533 processes. Remove process from process table.
10534 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10535 to multiple processes.
10536 (any_thread_of): New.
10537 (linux_detach): Add `pid' argument, and handle it. Remove process
10538 from processes table.
10539 (linux_join): Add `pid' argument. Handle it.
10540 (linux_thread_alive): Change unsighed long argument to ptid_t.
10541 Consider dead lwps as not being alive.
10542 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10543 threads we're not interested in.
10544 (same_lwp, find_lwp_pid): New.
10545 (linux_wait_for_lwp): Change `pid' argument's type from int to
10546 ptid_t. Adjust.
10547 (linux_wait_for_event): Rename to ...
10548 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10549 from int to ptid_t. Adjust.
10550 (linux_wait_for_event): New.
10551 (linux_wait_1): Add `ptid' argument. Change return type to
10552 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10553 that exit from the process table.
10554 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10555 Adjust.
10556 (mark_lwp_dead): New.
10557 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10558 stopping all threads, mark its main lwp as dead.
10559 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10560 ptids.
10561 (fetch_register, usr_store_inferior_registers)
10562 (regsets_fetch_inferior_registers)
10563 (regsets_store_inferior_registers, linux_read_memory)
10564 (linux_write_memory): Inline `inferior_pid'.
10565 (linux_look_up_symbols): Adjust to use per-process
10566 `thread_db_active'.
10567 (linux_request_interrupt): Adjust to use ptids.
10568 (linux_read_auxv): Inline `inferior_pid'.
10569 (initialize_low): Don't reference thread_db_active.
10570 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10571 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10572 (ps_getpid): Return the pid of the current inferior.
10573 * thread-db.c (proc_handle, thread_agent): Delete.
10574 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10575 per-process data.
10576 (find_one_thread): Change argument type to ptid_t. Adjust to
10577 per-process data.
10578 (maybe_attach_thread): Adjust to per-process data and ptids.
10579 (thread_db_find_new_threads): Ditto.
10580 (thread_db_init): Ditto.
10581 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10582 processes table. Adjust to use ptids.
10583 (spu_kill, spu_detach): Adjust interface. Remove process from
10584 processes table.
10585 (spu_join, spu_thread_alive): Adjust interface.
10586 (spu_wait): Adjust interface. Remove process from processes
10587 table. Adjust to use ptids.
10588 * win32-low.c (current_inferior_tid): Delete.
10589 (current_inferior_ptid): New.
10590 (debug_event_ptid): New.
10591 (thread_rec): Take a ptid. Adjust.
10592 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10593 (child_delete_thread): Ditto.
10594 (do_initial_child_stuff): Add `attached' argument. Add process to
10595 processes table.
10596 (child_fetch_inferior_registers, child_store_inferior_registers):
10597 Adjust.
10598 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10599 (win32_attach): Pass 1 to do_initial_child_stuff.
10600 (win32_kill): Adjust interface. Remove process from processes
10601 table.
10602 (win32_detach): Ditto.
10603 (win32_join): Adjust interface.
10604 (win32_thread_alive): Take a ptid.
10605 (win32_resume): Adjust to use ptids.
10606 (get_child_debug_event): Ditto.
10607 (win32_wait): Adjust interface. Remove exiting process from
10608 processes table.
10609
bd99dc85
PA
106102009-04-01 Pedro Alves <pedro@codesourcery.com>
10611
10612 Non-stop mode support.
10613
10614 * server.h (non_stop): Declare.
10615 (gdb_client_data, handler_func): Declare.
10616 (delete_file_handler, add_file_handler, start_event_loop):
10617 Declare.
10618 (handle_serial_event, handle_target_event, push_event)
10619 (putpkt_notif): Declare.
10620 * target.h (enum resume_kind): New.
10621 (struct thread_resume): Replace `step' field by `kind' field.
10622 (TARGET_WNOHANG): Define.
10623 (struct target_ops) <wait>: Add `options' argument.
10624 <supports_non_stop, async, start_non_stop>: New fields.
10625 (target_supports_non_stop, target_async): New.
10626 (start_non_stop): Declare.
10627 (mywait): Add `options' argument.
10628 * target.c (mywait): Add `options' argument. Print child exit
10629 notifications here.
10630 (start_non_stop): New.
10631 * server.c (non_stop, own_buf, mem_buf): New globals.
10632 (struct vstop_notif): New.
10633 (notif_queue): New global.
10634 (queue_stop_reply, push_event, discard_queued_stop_replies)
10635 (send_next_stop_reply): New.
10636 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10637 interface changes.
10638 (attach_inferior): In non-stop mode, don't wait for the target
10639 here.
10640 (handle_general_set): Handle QNonStop.
10641 (handle_query): When handling qC, return the current general
10642 thread, instead of the first thread of the list.
10643 (handle_query): If the backend supports non-stop mode, include
10644 QNonStop+ in the qSupported query response.
10645 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10646 and non-stop mode.
10647 (handle_v_attach, handle_v_run): Handle non-stop mode.
10648 (handle_v_stopped): New.
10649 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10650 (myresume): Adjust to use resume_kind. Handle non-stop.
10651 (queue_stop_reply_callback): New.
10652 (handle_status): Handle non-stop mode.
10653 (main): Clear non_stop flag on reconnection. Use the event-loop.
10654 Refactor serial protocol handling from here ...
10655 (process_serial_event): ... to this new function. When GDB
10656 selects any thread, select one here. In non-stop mode, wait until
10657 GDB acks all pending events before exiting.
10658 (handle_serial_event, handle_target_event): New.
10659 * remote-utils.c (remote_open): Install remote_desc in the event
10660 loop.
10661 (remote_close): Remove remote_desc from the event loop.
10662 (putpkt_binary): Rename to...
10663 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10664 (putpkt_binary): New as wrapper around putpkt_binary_1.
10665 (putpkt_notif): New.
10666 (prepare_resume_reply): In non-stop mode, don't change the
10667 general_thread.
10668 * event-loop.c: New.
10669 * Makefile.in (OBJ): Add event-loop.o.
10670 (event-loop.o): New rule.
10671
10672 * linux-low.h (pid_of): Moved here.
10673 (lwpid_of): New.
10674 (get_lwp_thread): Use lwpid_of.
10675 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10676 * linux-low.c (pid_of): Delete.
10677 (inferior_pid): Use lwpid_of.
10678 (linux_event_pipe): New.
10679 (target_is_async_p): New.
10680 (delete_lwp): New.
10681 (handle_extended_wait): Use lwpid_of.
10682 (add_lwp): Don't set lwpid field.
10683 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10684 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10685 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10686 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10687 first. Adjust to linux_wait_for_event interface changes. Use
10688 lwpid_of.
10689 (linux_detach): Don't delete the main lwp here.
10690 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10691 (status_pending_p): Don't consider explicitly suspended lwps.
10692 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10693 pointer. Add OPTIONS argument. Change return type to int. Use
10694 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10695 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10696 pointer. Add status pointer argument. Return a pid instead of a
10697 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10698 changes. In non-stop mode, don't switch to a random thread.
10699 (linux_wait): Rename to...
10700 (linux_wait_1): ... this. Add target_options argument, and handle
10701 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10702 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10703 clean exit and signal exit code. Don't stop all threads in
10704 non-stop mode. In all-stop mode, only stop all threads when
10705 reporting a stop to GDB. Handle explicit thread stop requests.
10706 (async_file_flush, async_file_mark): New.
10707 (linux_wait): New.
10708 (send_sigstop): Use lwpid_of.
10709 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10710 interface changes. In non-stop mode, don't switch to a random
10711 thread.
10712 (linux_resume_one_lwp): Use lwpid_of.
10713 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10714 (linux_resume_one_thread): ... this. Handle resume_stop. In
10715 non-stop mode, don't look for pending flag in all threads.
10716 (resume_status_pending_p): Don't consider explicitly suspended
10717 threads.
10718 (my_waitpid): Reimplement. Emulate __WALL.
10719 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10720 Use lwpid_of.
10721 (sigchld_handler, linux_supports_non_stop, linux_async)
10722 (linux_start_non_stop): New.
10723 (linux_target_ops): Register linux_supports_non_stop, linux_async
10724 and linux_start_non_stop.
10725 (initialize_low): Install SIGCHLD handler.
10726 * thread-db.c (thread_db_create_event, find_one_thread)
10727 (thread_db_get_tls_address): Use lwpid_of.
10728 * win32-low.c (win32_detach): Adjust to use resume_kind.
10729 (win32_wait): Add `options' argument.
10730 * spu-low.c (spu_resume): Adjust to use resume_kind.
10731 (spu_wait): Add `options' argument.
10732
5b1c542e
PA
107332009-04-01 Pedro Alves <pedro@codesourcery.com>
10734
10735 Decouple target code from remote protocol.
10736
10737 * target.h (enum target_waitkind): New.
10738 (struct target_waitstatus): New.
10739 (struct target_ops) <wait>: Return an unsigned long. Take a
10740 target_waitstatus pointer instead of a char pointer.
10741 (mywait): Likewise.
10742 * target.c (mywait): Change prototype to return an unsigned long.
10743 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10744 * server.h (thread_from_wait, old_thread_from_wait): Delete
10745 declarations.
10746 (prepare_resume_reply): Change prototype to take a
10747 target_waitstatus.
10748 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10749 (last_status, last_ptid): New.
10750 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10751 pid instead of a signal.
10752 (attach_inferior): Remove "status" and "signal" parameters.
10753 Adjust.
10754 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10755 not as an address.
10756 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10757 (handle_v_requests, myresume): Remove "status" and "signal"
10758 parameters. Adjust.
10759 (handle_status): New.
10760 (main): Delete local `status'. Adjust.
10761 * remote-utils.c: Include target.h.
10762 (prepare_resume_reply): Change prototype to take a
10763 target_waitstatus. Adjust.
10764
10765 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10766 interface.
10767 * spu-low.c (spu_wait): Adjust.
10768 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10769 Delete.
10770 (win32_wait): Adjust.
10771
2bd7c093
PA
107722009-04-01 Pedro Alves <pedro@codesourcery.com>
10773
10774 * target.h (struct thread_resume): Delete leave_stopped member.
10775 (struct target_ops): Add a `n' argument to the `resume' callback.
10776 * server.c (start_inferior): Adjust.
10777 (handle_v_cont, myresume): Adjust.
10778 * linux-low.c (check_removed_breakpoint): Adjust to resume
10779 interface change, and to removed leave_stopped field.
10780 (resume_ptr): Delete.
10781 (struct thread_resume_array): New.
10782 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10783 resume interface change.
10784 (linux_continue_one_thread, linux_queue_one_thread)
10785 (resume_status_pending_p): Check if the resume field is NULL
10786 instead of checking the leave_stopped member.
10787 (linux_resume): Adjust to the target resume interface change.
10788 * spu-low.c (spu_resume): Adjust to the target resume interface
10789 change.
10790 * win32-low.c (win32_detach, win32_resume): Ditto.
10791
c35fafde
PA
107922009-04-01 Pedro Alves <pedro@codesourcery.com>
10793
10794 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10795 flag.
10796 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10797 pending.
10798 (linux_continue_one_thread): Only preserve the stepping flag if
10799 there's a pending breakpoint.
10800
0a59d50b
PA
108012009-03-31 Pedro Alves <pedro@codesourcery.com>
10802
10803 * server.c (main): After the inferior having exited, call
10804 remote_close before exiting gdbserver.
10805
f04c6d38
TJB
108062009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10807
10808 Fix size of FPSCR in Power 7 processors.
10809 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10810 (PPC_FEATURE_HAS_DFP): New #define.
10811 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10812 size of the FPSCR.
10813
78e5cee6
PA
108142009-03-23 Pedro Alves <pedro@codesourcery.com>
10815
10816 * server.c (handle_query) Whitespace and formatting.
10817
1b3f6016
PA
108182009-03-22 Pedro Alves <pedro@codesourcery.com>
10819
10820 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10821 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10822 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10823 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10824 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10825 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10826 Makefile.in, configure.ac: Fix whitespace throughout.
10827 * configure: Regenerate.
10828
a07b2135
PA
108292009-03-22 Pedro Alves <pedro@codesourcery.com>
10830
10831 * inferiors.c (find_inferior): Make it safe for the callback
10832 function to delete the currently iterated inferior.
10833
67cc2626
PA
108342009-03-22 Pedro Alves <pedro@codesourcery.com>
10835
10836 * Makefile.in (linuw_low_h): Move higher.
10837 (thread-db.o): Depend on $(linux_low_h).
10838
54a0b537
PA
108392009-03-17 Pedro Alves <pedro@codesourcery.com>
10840
10841 Rename "process" to "lwp" throughout.
10842
10843 * linux-low.c (all_processes): Rename to...
10844 (all_lwps): ... this.
10845 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10846 (add_process): Rename to ...
10847 (add_lwp): ... this. Adjust.
10848 (linux_create_inferior): Adjust.
10849 (linux_attach_lwp): Adjust.
10850 (linux_attach): Adjust.
10851 (linux_kill_one_process): Rename to ...
10852 (linux_kill_one_lwp): ... this. Adjust.
10853 (linux_kill): Adjust.
10854 (linux_detach_one_process): Rename to ...
10855 (linux_detach_one_lwp): ... this. Adjust.
10856 (linux_detach): Adjust.
10857 (check_removed_breakpoint): Adjust.
10858 (status_pending_p): Adjust.
10859 (linux_wait_for_process): Rename to ...
10860 (linux_wait_for_lwp): ... this. Adjust.
10861 (linux_wait_for_event): Adjust.
10862 (send_sigstop): Adjust.
10863 (wait_for_sigstop): Adjust.
10864 (stop_all_processes): Rename to ...
10865 (stop_all_lwps): ... this.
10866 (linux_resume_one_process): Rename to ...
10867 (linux_resume_one_lwp): ... this. Adjust.
10868 (linux_set_resume_request, linux_continue_one_thread)
10869 (linux_queue_one_thread, resume_status_pending_p)
10870 (usr_store_inferior_registers, regsets_store_inferior_registers)
10871 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10872 Adjust.
10873 * linux-low.h (get_process): Rename to ...
10874 (get_lwp): ... this. Adjust.
10875 (get_thread_process): Rename to ...
10876 (get_thread_lwp): ... this. Adjust.
10877 (get_process_thread): Rename to ...
10878 (get_lwp_thread): ... this. Adjust.
10879 (struct process_info): Rename to ...
10880 (struct lwp_info): ... this.
10881 (all_processes): Rename to ...
10882 (all_lwps): ... this.
10883 * proc-service.c (ps_lgetregs): Adjust.
10884 * thread-db.c (thread_db_create_event, find_one_thread)
10885 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10886
0b16c5cf
PA
108872009-03-14 Pedro Alves <pedro@codesourcery.com>
10888
10889 * server.c (handle_query): Handle "qAttached".
10890
32de4b9d
NS
108912009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10892
10893 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10894 GPLv3, update license URL.
10895
2aecd87f
DE
108962009-03-01 Doug Evans <dje@google.com>
10897
93efd302 10898 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10899 (server_h): Add gdb_signals.h.
10900 (signals.o): Update.
10901 * server.h (target_signal_from_host,target_signal_to_host_p)
10902 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10903
86b1f9c5
PM
109042009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10905
10906 * remote-utils.c (getpkt): Also generate remote-debug
10907 information if noack_mode is set.
10908
4aa995e1
PA
109092009-02-06 Pedro Alves <pedro@codesourcery.com>
10910
10911 * server.c (handle_query): Report qXfer:siginfo:read and
10912 qXfer:siginfo:write as supported and handle them.
10913 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10914 * linux-low.c (linux_xfer_siginfo): New.
10915 (linux_target_ops): Set it.
10916
62709adf
PA
109172009-01-26 Pedro Alves <pedro@codesourcery.com>
10918
10919 * server.c (gdbserver_usage): Mention --remote-debug.
10920 (main): Accept '--remote-debug' switch.
10921
aef93bd7
DE
109222009-01-18 Doug Evans <dje@google.com>
10923
10924 * regcache.c (new_register_cache): No need to check result of xcalloc.
10925 * server.c (handle_search_memory): Back out calls to xmalloc,
10926 result is checked and error is returned to user upon failure.
10927 (handle_query): Ditto. Add more checks for result of malloc.
10928 (handle_v_cont): Check result of malloc, report error back to
10929 user upon failure.
10930 (handle_v_run): Ditto. Call freeargv.
10931 * server.h (freeargv): Declare.
10932 * utils.c (freeargv): New fn.
10933
54363045
DE
109342009-01-15 Doug Evans <dje@google.com>
10935
f626972c
DE
10936 * gdbreplay.c (perror_with_name): Make arg const char *.
10937 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10938 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10939 * utils.c (perror_with_name): Make arg const char *.
54363045 10940
18aae699
PA
109412009-01-14 Pedro Alves <pedro@codesourcery.com>
10942
10943 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10944 when handling a EXIT_PROCESS_DEBUG_EVENT.
10945
ff703abe
JB
109462009-01-06 Joel Brobecker <brobecker@adacore.com>
10947
10948 * gdbreplay.c (gdbreplay_version): Update copyright year.
10949 * server.c (gdbserver_version): Likewise.
10950
f21cc1a2 109512009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10952
10953 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10954 (handle_extended_wait): Improve comment.
0e21c1ec 10955
bca929d3
DE
109562008-12-13 Doug Evans <dje@google.com>
10957
10958 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10959 * server.h (ATTR_MALLOC): New macro.
10960 (xmalloc,xcalloc,xstrdup): Declare.
10961 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10962 * inferiors.c: Ditto.
10963 * linux-low.c: Ditto.
10964 * mem-break.c: Ditto.
10965 * regcache.c: Ditto.
10966 * remote-utils.c: Ditto.
10967 * server.c: Ditto.
10968 * target.c: Ditto.
10969 * win32-low.c: Ditto.
10970
97438e3f
DE
109712008-12-12 Doug Evans <dje@google.com>
10972
896c7fbb
DE
10973 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10974 in debugging printf.
10975
97438e3f
DE
10976 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10977
e3b886f8
DE
109782008-12-09 Doug Evans <dje@google.com>
10979
10980 * linux-low.h (struct process_info): Delete member tid, unused.
10981 * thread-db.c (find_one_thread): Update.
10982 (maybe_attach_thread): Update.
10983
07e059b5
VP
109842008-12-02 Pedro Alves <pedro@codesourcery.com>
10985
889bf7c5
PA
10986 * target.h (struct target_ops): Add qxfer_osdata member.
10987 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10988 and dirent.h.
10989 (linux_qxfer_osdata): New functions.
10990 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10991 callback.
10992 * server.c (handle_query): Handle "qXfer:osdata:read:".
10993 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10994 (buffer_xml_printf): New functions.
10995 * server.h (struct buffer): New.
10996 (buffer_grow_str, buffer_grow_str0): New macros.
10997 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10998 (buffer_xml_printf): Declare.
07e059b5 10999
4cab47ab
DE
110002008-11-24 Doug Evans <dje@google.com>
11001
11002 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11003
f142445f
DJ
110042008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11005
11006 * server.c (handle_v_run): Always use the supplied argument list.
11007
d0107bb6 110082008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11009
d0107bb6
BW
11010 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11011 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11012
2c4ad781
TJB
110132008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11014
11015 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11016 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11017 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11018 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11019 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11020 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11021 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11022 XML target descriptions.
11023 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11024 when inferior is running on an ISA 2.05 or later processor. Add
11025 special case to return offset for full 64-bit slot of FPSCR when
11026 in 32-bits.
11027
dfb64f85
DJ
110282008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11029
11030 * Makefile.in (SFILES, clean): Added sparc64 files.
11031 (reg-sparc64.o, reg-sparc64.c): New.
11032 * configure.srv (sparc*-*-linux*): New configuration.
11033 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11034 syscall arguments for SPARC.
11035 (regsets_store_inferior_registers): Likewise.
11036 * linux-sparc-low.c: New file.
11037
66b6e1dd
DE
110382008-10-21 Doug Evans <dje@google.com>
11039
11040 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11041 (READLINE_DIR,READLINE_DEP): Delete.
11042 (INTERNAL_CFLAGS): Update.
11043 (LINTFLAGS): Update.
11044
9b710a42
PA
110452008-10-10 Pedro Alves <pedro@codesourcery.com>
11046
11047 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11048 whole argv from the last run, not just argv[0].
11049
5822d809
PA
110502008-09-08 Pedro Alves <pedro@codesourcery.com>
11051
11052 * regcache.c (new_register_cache): Return NULL if the register
11053 cache size isn't known yet.
11054 (free_register_cache): Avoid dereferencing a NULL regcache.
11055
74aac56f
DJ
110562008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11057
11058 * configure.srv: Merge MIPS and MIPS64.
11059
400b20f5
MR
110602008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11061
11062 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11063
677c5bb1
LM
110642008-08-18 Luis Machado <luisgpm@br.ibm.com>
11065
11066 * Makefile.in: Add required vsx dependencies.
11067
11068 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11069 Declare init_registers_powerpc_vsx32l.
11070 Declare init_registers_powerpc_vsx64l.
11071 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11072 (ppc_arch_setup): Check for VSX in hwcap.
11073 (ppc_fill_vsxregset): New function.
11074 (ppc_store_vsxregset): New function.
11075 Add new VSX entry in regset_info target_regsets.
11076
11077 * configure.srv: Add new VSX dependencies.
11078
a6f3e723
SL
110792008-08-12 Pedro Alves <pedro@codesourcery.com>
11080
11081 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11082 (remote_open): Set or clear transport_is_reliable.
11083 (putpkt_binary): Don't expect acks in noack mode.
11084 (getpkt): Don't send ack/nac in noack mode.
11085 * server.c (handle_general_set): Handle QStartNoAckMode.
11086 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11087 qSupported.
11088 (main): Reset noack_mode on every connection.
11089 * server.h (noack_mode): Declare.
11090
a417dc56
RW
110912008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11092
11093 * Makefile.in (GDBREPLAY_OBS): New variable.
11094 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11095
3221518c
UW
110962008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11097 Daniel Jacobowitz <dan@codesourcery.com>
11098
11099 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11100 (usr_store_inferior_registers): Likewise.
11101 (regsets_store_inferior_registers): Likewise.
11102
ec56be1b
PA
111032008-07-31 Rolf Jansen <rj@surtec.com>
11104 Pedro Alves <pedro@codesourcery.com>
11105
11106 * configure.ac: Check for memmem declaration.
11107 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11108 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11109 (disable_packet_qfThreadInfo): Unconditionally compile.
11110 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11111 * configure, config.in: Regenerate.
11112
2fe5e3ff
DE
111132008-07-28 Doug Kwan <dougkwan@google.com>
11114
11115 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11116 (linux_write_memory): Remove declaration of errno.
11117
836acd6d
UW
111182008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11119
11120 * linux-low.c (handle_extended_wait): Do not use "status"
11121 variable uninitialized.
11122
aeba519e
PA
111232008-07-07 Pedro Alves <pedro@codesourcery.com>
11124
11125 * server.c (handle_v_attach): Inhibit reporting dll changes.
11126
db42f210
PA
111272008-06-27 Pedro Alves <pedro@codesourcery.com>
11128
11129 * remote-utils.c (prepare_resume_reply): If requested, don't
11130 output "thread:TID" in the T stop reply.
11131
11132 * server.c (disable_packet_vCont, disable_packet_Tthread)
11133 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11134 (handle_query): If requested, disable support for qC, qfThreadInfo
11135 and qsThreadInfo.
11136 (handle_v_requests): If requested, disable support for vCont.
11137 (gdbserver_show_disableable): New.
11138 (main): Handle --disable-packet and --disable-packet=LIST.
11139
11140 * server.h (disable_packet_vCont, disable_packet_Tthread)
11141 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11142
8e4c5421
CD
111432008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11144
11145 * server.c (gdbserver_usage): Mention --version.
11146
6e23a804
DJ
111472008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11148
11149 * Makefile.in (gdbreplay.o): New rule.
11150
90aa6a40
JM
111512008-06-06 Joseph Myers <joseph@codesourcery.com>
11152
11153 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11154 message, not gdbserver.
11155
c16158bc 111562008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11157 Nathan Sidwell <nathan@codesourcery.com>
11158 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11159
11160 * acinclude.m4: Include ../../config/acx.m4.
11161 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11162 * configure, config.in: Regenerate.
11163 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11164 * server.c (gdbserver_version): Print PKGVERSION.
11165 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11166 (main): Adjust gdbserver_usage calls.
11167 * gdbreplay.c (version, host_name): Add declarations.
11168 (gdbreplay_version, gdbreplay_usage): New.
11169 (main): Accept --version and --help options.
11170
aeb75bf5
DJ
111712008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11172
11173 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11174 (arm_breakpoint_at): Handle Thumb.
11175 (the_low_target): Add comment.
11176
76b233dd
UW
111772008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11178
11179 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11180
08388c79
DE
111812008-05-09 Doug Evans <dje@google.com>
11182
a3c83fae
DE
11183 * server.h (decode_search_memory_packet): Declare.
11184 * remote-utils.c (decode_search_memory_packet): New fn.
11185 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11186 (handle_search_memory): New fn.
11187 (handle_query): Process qSearch:memory packets.
11188
bb9c3d36
UW
111892008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11190
11191 * regcache.c (registers_length): Remove.
11192 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11193 full register packet.
11194 * regcache.h (registers_length): Remove prototype.
11195 * server.h (PBUFSIZ): Define to 16384.
11196
7284e1be
UW
111972008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11198
11199 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11200 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11201 powerpc-64l.o, and powerpc-altivec64l.o.
11202 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11203 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11204 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11205 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11206 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11207 to srv_xmlfiles.
11208
11209 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11210 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11211 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11212 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11213 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11214 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11215 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11216 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11217 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11218 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11219 (clean): Update.
11220
11221 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11222 (init_registers_powerpc_32l): ... this new prototype.
11223 (init_registers_powerpc_32): Remove, replace by ...
11224 (init_registers_powerpc_altivec32l): ... this new prototype.
11225 (init_registers_powerpc_e500): Remove, replace by ...
11226 (init_registers_powerpc_e500l): ... this new prototype.
11227 (init_registers_ppc64): Remove, replace by ...
11228 (init_registers_powerpc_64l): ... this new prototype.
11229 (init_registers_powerpc_64): Remove, replace by ...
11230 (init_registers_powerpc_altivec64l): ... this new prototype.
11231 (ppc_num_regs): Set to 73.
11232 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11233 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11234 (ppc_cannot_store_register): Handle orig_r3 and trap.
11235 (ppc_arch_setup): Update init_registers_... calls.
11236 (ppc_fill_gregset): Handle orig_r3 and trap.
11237
11238 * inferiors.c (clear_inferiors): Reset current_inferior.
11239
fdc59709
PB
112402008-04-23 Paolo Bonzini <bonzini@gnu.org>
11241
889bf7c5
PA
11242 * acinclude.m4: Add override.m4.
11243 * configure: Regenerate.
fdc59709 11244
c9b2f845
UW
112452008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11246
11247 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11248 initial call to init_register_ppc64.
11249
550512b8
UW
112502008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11251
43aaf8b6
PA
11252 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11253 single powerpc*-*-linux* case.
550512b8
UW
11254 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11255
b6430ec3
UW
112562008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11257
11258 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11259 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11260 from reg_xmlfiles.
11261 * linux-ppc-low.c: Include <elf.h>.
11262 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11263 (ppc_hwcap): New global variable.
11264 (ppc_regmap): Remove __SPE__ #ifdef sections.
11265 (ppc_regmap_e500): New global variable.
11266 (ppc_cannot_store_register): Update __SPE__ special case.
11267 (ppc_get_hwcap): New function.
11268 (ppc_arch_setup): Use it to determine whether inferior supports
11269 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11270 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11271 Do not access registers if target does not support AltiVec.
11272 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11273 Do not access registers if target does not support SPE.
11274 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11275
52fa2412
UW
112762008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11277
11278 * linux-low.c (disabled_regsets, num_regsets): New.
11279 (use_regsets_p): Delete.
11280 (linux_wait_for_process): Clear disabled_regsets.
11281 (regsets_fetch_inferior_registers): Check and set it.
11282 (regsets_store_inferior_registers): Likewise.
11283 (linux_fetch_registers, linux_store_registers): Do not use
11284 use_regsets_p.
11285 (initialize_low): Allocate disabled_regsets.
11286
e28b3332
DJ
112872008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11288
11289 * Makefile.in (LIBOBJS): New.
11290 (OBS): Use LIBOBJS.
11291 (memmem.o): New rule.
11292 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11293 * configure: Regenerated.
11294
4536995d
UW
112952008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11296
11297 * server.c (handle_query): Never return "unsupported" for
11298 qXfer:features:read queries.
11299
221c031f
UW
113002008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11301
11302 * server.c (get_features_xml): Fix inverted condition.
11303 (handle_query): Always support qXfer:feature:read.
11304
ccd213ac
DJ
113052008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11306
11307 * server.c (wrapper_argv): New.
11308 (start_inferior): Handle wrapper_argv. If set, expect an extra
11309 trap.
11310 (gdbserver_usage): Document --wrapper.
11311 (main): Parse --wrapper.
11312
6fe305f7
UW
113132008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11314
11315 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11316 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11317 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11318 (ppc_set_pc): Likewise.
11319 (ppc_arch_setup): New function.
11320 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11321 of collect_register.
889bf7c5 11322 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11323
5b0a002e
UW
113242008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11325
11326 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11327 instead of linux-ppc64-low.o.
11328 * linux-ppc64-low.c: Remove file.
11329 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11330 (linux-ppc64-low.o): Remove rule.
11331
11332 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11333 (init_registers_powerpc_64): Likewise.
11334 (ppc_regmap): Conditionally define depending on __powerpc64__.
11335 (ppc_cannot_store_register): Do not special-case "fpscr" when
11336 compiled on __powerpc64__.
11337 (ppc_collect_ptrace_register): New function.
11338 (ppc_supply_ptrace_register): New function.
11339 (ppc_breakpoint): Change type to "unsigned int".
11340 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11341 (the_low_target): Conditionally provide initializers for the
889bf7c5 11342 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11343 collect_ptrace_register and supply_ptrace_register members.
11344
9b4b61c8
UW
113452008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11346
11347 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11348 * server.c (gdbserver_xmltarget): Define.
11349 (get_features_xml): Use it to replace "target.xml" and arch_string.
11350
11351 * configure.srv: Remove srv_xmltarget. Add XML files that were
11352 mentioned there to srv_xmlfiles instead. Remove conditional tests
11353 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11354 srv_xmlfiles and srv_regobj to include all possible choices.
11355 * configure.ac (srv_xmltarget): Remove.
11356 (srv_xmlfiles): Do not add "target.xml".
11357 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11358 checks for supplementary target information.
11359 * configure: Regenerate.
11360 * Makefile.in (XML_TARGET): Remove.
11361 (target.xml): Remove rule.
11362 (clean): Do not clean up target.xml.
11363 (.PRECIOUS): Do not mention target.xml.
11364
11365 * target.h (struct target_ops): Remove arch_string member.
11366 * linux-low.c (linux_arch_string): Remove.
11367 (linux_target_ops): Remove arch_string initializer.
11368 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11369 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11370 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11371 * spu-low.c (spu_arch_string): Remove.
11372 (spu_target_ops): Remove arch_string initializer.
11373 * win32-low.c (win32_arch_string): Remove.
11374 (win32_target_ops): Remove arch_string initializer.
11375 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11376 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11377 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11378
ee1a7ae4
UW
113792008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11380
11381 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11382 by collect_ptrace_register and supply_ptrace_register hooks.
11383 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11384 instead of checking for the_low_target.left_pad_xfer.
11385 (usr_store_inferior_registers): Use collect_ptrace_register callback
11386 instead of checking for the_low_target.left_pad_xfer.
11387
11388 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11389 (s390_supply_ptrace_register): Likewise.
11390 (s390_fill_gregset): Call s390_collect_ptrace_register.
11391 (the_low_target): Update.
11392
11393 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11394 (ppc_supply_ptrace_register): Likewise.
11395 (the_low_target): Update.
11396
11397 * linux-i386-low.c (the_low_target): Update.
11398 * linux-x86-64-low.c (the_low_target): Update.
11399
d61ddec4
UW
114002008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11401
11402 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11403 reg-s390.o and reg-s390x.o.
11404
11405 * linux-low.c (new_inferior): New global variable.
11406 (linux_create_inferior, linux_attach): Set it.
11407 (linux_wait_for_process): Call the_low_target.arch_setup after the
11408 target has stopped for the first time.
11409 (initialize_low): Do not call the_low_target.arch_setup.
11410
11411 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11412 (s390_set_pc): Likewise.
11413 (s390_arch_setup): New function.
11414 (the_low_target): Use s390_arch_setup as arch_setup routine.
11415
11416 * regcache.c (realloc_register_cache): New function.
11417 (set_register_cache): Call it for each existing regcache.
11418
d05b4ac3
UW
114192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11420
11421 * server.h (init_registers): Remove prototype.
11422
11423 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11424 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11425 instead of init_registers ().
11426 * linux-arm-low.c (init_registers_arm): Add prototype.
11427 (init_registers_arm_with_iwmmxt): Likewise.
11428 (the_low_target): Add initializer for arch_setup field.
11429 * linux-cris-low.c (init_registers_cris): Add prototype.
11430 (the_low_target): Add initializer for arch_setup field.
11431 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11432 (the_low_target): Add initializer for arch_setup field.
11433 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11434 (the_low_target): Add initializer for arch_setup field.
11435 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11436 (the_low_target): Add initializer for arch_setup field.
11437 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11438 (the_low_target): Add initializer for arch_setup field.
11439 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11440 (the_low_target): Add initializer for arch_setup field.
11441 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11442 (init_registers_mips64_linux): Likewise.
11443 (the_low_target): Add initializer for arch_setup field.
11444 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11445 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11446 (the_low_target): Add initializer for arch_setup field.
11447 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11448 (init_registers_powerpc_64): Likewise.
11449 (the_low_target): Add initializer for arch_setup field.
11450 * linux-s390-low.c (init_registers_s390): Add prototype.
11451 (init_registers_s390x): Likewise.
11452 (the_low_target): Add initializer for arch_setup field.
11453 * linux-sh-low.c (init_registers_sh): Add prototype.
11454 (the_low_target): Add initializer for arch_setup field.
11455 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11456 (the_low_target): Add initializer for arch_setup field.
11457 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11458 (the_low_target): Add initializer for arch_setup field.
11459
11460 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11461 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11462 instead of init_registers ().
11463 * win32-arm-low.c (init_registers_arm): Add prototype.
11464 (the_low_target): Add initializer for arch_setup field.
11465 * win32-i386-low.c (init_registers_i386): Add prototype.
11466 (the_low_target): Add initializer for arch_setup field.
11467
11468 * spu-low.c (init_registers_spu): Add prototype.
11469 (initialize_low): Call initialie_registers_spu () instead of
11470 initialize_registers ().
11471
fd96d250
PA
114722008-02-19 Pedro Alves <pedro@codesourcery.com>
11473
11474 * server.c (handle_v_requests): When handling the vRun and vAttach
11475 packets, if already debugging a process, don't kill it. Return an
11476 error instead.
11477
d41b6bb4
DJ
114782008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11479
11480 * server.c (handle_query): Correct length check.
11481
5ac588cf
PA
114822008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11483
11484 * win32-low.c (do_initial_child_stuff): Add process handle
11485 parameter. Set current_process_handle and current_process_id from the
11486 parameters. Clear globals.
11487 (win32_create_inferior): Don't set current_process_handle and
11488 current_process_id here. Instead pass them on the call to
11489 do_initial_child_stuff.
11490 (win32_attach): Likewise.
11491 (win32_clear_inferiors): New.
11492 (win32_kill): Don't close the current process handle or the
11493 current thread handle here. Instead call win32_clear_inferiors.
11494 (win32_detach): Don't open a new handle to the process. Call
11495 win32_clear_inferiors.
11496 (win32_join): Don't rely on current_process_handle; open a new
11497 handle using the process id.
11498 (win32_wait): Call win32_clear_inferiors when the inferior process
11499 has exited.
11500
ecd7ecbc
DJ
115012008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11502
11503 * server.c (monitor_show_help): Add "exit".
11504
1525d545
MG
115052008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11506
ecd7ecbc 11507 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11508 (clean): Add reg-xtensa.c.
11509 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11510 * configure.srv (xtensa*-*-linux*) New target.
11511 * linux-xtensa-low.c: New.
11512 * xtensa-xtregs.c: New.
1525d545 11513
59a016f0
PA
115142008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11515
11516 * hostio.c: Don't include errno.h.
11517 (errno_to_fileio_errno): Move to hostio-errno.
11518 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11519 error number outputting to the target->hostio_last_error callback.
11520 (hostio_packet_error): Use FILEIO_EINVAL directly.
11521 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11522 calls to hostio_error.
11523 * hostio-errno.c: New.
11524 * server.h (hostio_last_error_from_errno): Declare.
11525 * target.h (target_ops): Add hostio_last_error member.
11526 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11527 as hostio_last_error handler.
889bf7c5 11528 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11529 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11530 (wince_hostio_last_error): New functions.
11531 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11532 as hostio_last_error handler.
11533 (win32_target_ops) [!_WIN32_WCE]: Register
11534 hostio_last_error_from_errno as hostio_last_error handler.
11535 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11536 (hostio-errno.o): New rule.
11537 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11538 * configure.srv (srv_hostio_err_objs): New variable. Default to
11539 hostio-errno.o.
11540 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11541 * configure: Regenerate.
11542
2d717e4f
DJ
115432008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11544
11545 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11546 (linux_kill, linux_detach): Clean up the process list.
11547 * remote-utils.c (remote_open): Improve port number parsing.
11548 (putpkt_binary, input_interrupt): Only send interrupts if the target
11549 is running.
11550 * server.c (extended_protocol): Make static.
11551 (attached): Define earlier.
11552 (exit_requested, response_needed, program_argv): New variables.
11553 (target_running): New.
11554 (start_inferior): Clear attached here.
11555 (attach_inferior): Set attached here.
11556 (require_running): Define.
11557 (handle_query): Use require_running and target_running. Implement
11558 "monitor exit".
11559 (handle_v_attach, handle_v_run): New.
11560 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11561 (gdbserver_usage): Update.
11562 (main): Redo argument parsing. Handle --debug and --multi. Handle
11563 --attach along with other options or after the port. Save
11564 program_argv. Support no initial program. Resynchronize
11565 communication with GDB after an error. Handle "monitor exit".
11566 Use require_running and target_running. Always allow the extended
11567 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11568 restart in extended mode.
11569 * README: Refer to the GDB manual. Update --attach usage.
11570
7407e2de
AS
115712007-12-20 Andreas Schwab <schwab@suse.de>
11572
11573 * linux-low.c (STACK_SIZE): Define.
11574 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11575 (linux_test_for_tracefork): Likewise.
11576
b65d95c5
DJ
115772007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11578
11579 * linux-low.c (linux_wait_for_event): Update messages. Do not
11580 reinsert auto-delete breakpoints.
11581 * mem-break.c (struct breakpoint): Change return type of handler to
11582 int.
11583 (set_breakpoint_at): Update handler type.
11584 (reinsert_breakpoint_handler): Return 1 instead of calling
11585 delete_breakpoint.
11586 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11587 setting a new one.
11588 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11589 * mem-break.h (set_breakpoint_at): Update handler type.
11590 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11591 * win32-low.c (auto_delete_breakpoint): New.
11592 (get_child_debug_event): Use it.
11593
4e799345
DJ
115942007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11595
11596 * configure.ac: Check for pread and pwrite.
11597 * hostio.c (handle_pread): Fall back to lseek and read.
11598 (handle_pwrite): Fall back to lseek and write.
11599 * config.in, configure: Regenerated.
11600
27524b67
DJ
116012007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11602
11603 * server.c (myresume): Add own_buf argument.
11604 (main): Update calls.
11605
a20d5e98
DJ
116062007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11607
11608 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11609 * remote-utils.c (remote_open): Do not call disable_async_io.
11610 (block_async_io): Delete.
11611 (unblock_async_io): Make static.
11612 (initialize_async_io): New.
11613 * server.c (handle_v_cont): Handle async I/O here.
11614 (myresume): Likewise. Move other common resume tasks here...
11615 (main): ... from here. Call initialize_async_io. Disable async
11616 I/O before the main loop.
11617 * server.h (initialize_async_io): Declare.
11618 (block_async_io, unblock_async_io): Delete prototypes.
11619 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11620
b79d787e
DJ
116212007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11622
11623 * remote-utils.c (readchar): Allow binary data in received messages.
11624
d97903b2
PA
116252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11626
11627 * win32-low.c (attaching): New global.
11628 (win32_create_inferior): Clear the `attaching' global.
11629 (win32_attach): Set the `attaching' global.
11630 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11631 attaching. Only set a breakpoint at the entry point if not
11632 attaching.
11633
311de423
PA
116342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11635
11636 * server.c (main): Don't report dll events on the initial
11637 connection on attaches.
11638
6c2d16d2
PA
116392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11640
11641 * server.c (main): Relax numerical bases supported for the pid of
11642 the --attach command line argument.
11643
5ca906e6
PA
116442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11645
11646 * win32-low.c (win32_attach): Call OpenProcess before
11647 DebugActiveProcess, not after. Add last error output to error
11648 call.
11649
9c6c8194
PA
116502007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11651
11652 * win32-low.c (win32_get_thread_context)
11653 (win32_set_thread_context): New functions.
11654 (thread_rec): Use win32_get_thread_context.
11655 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11656 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11657 field.
11658
4d5d1aaa
PA
116592007-12-03 Leo Zayas
11660 Pedro Alves <pedro_alves@portugalmail.pt>
11661
11662 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11663 global variables.
11664 (child_add_thread): Minor cleanup.
11665 (child_continue): Resume artificially suspended threads before
11666 calling ContinueDebugEvent.
11667 (suspend_one_thread): New.
11668 (fake_breakpoint_event): New.
11669 (get_child_debug_event): Change return type to int. Check here if
11670 gdb sent an interrupt request. If a soft interrupt was requested,
11671 fake a breakpoint event. Return 0 if there is no event to handle,
11672 and 1 otherwise.
11673 (win32_wait): Don't check here if gdb sent an interrupt request.
11674 Ensure there is a valid event to handle.
11675 (win32_request_interrupt): Add soft interruption method as last
11676 resort.
11677
c436e841
PA
116782007-12-03 Leo Zayas
11679 Pedro Alves <pedro_alves@portugalmail.pt>
11680
11681 * win32-low.h (win32_thread_info): Add descriptions to the
11682 structure members. Replace `suspend_count' counter by a
11683 `suspended' flag.
11684 * win32-low.c (thread_rec): Update condition of when to get the
11685 context from the inferior. Rely on ContextFlags being set if it
11686 has already been retrieved. Only suspend the inferior thread if
11687 we haven't already. Warn if that fails.
11688 (continue_one_thread): s/suspend_count/suspended/. Only call
11689 ResumeThread once. Warn if that fails.
11690
e7b5fa67
PA
116912007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11692
11693 * win32-low.c (win32_wait): Don't read from the inferior when it
11694 has already exited.
11695
a385171d
PA
116962007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11697
11698 * Makefile.in (win32_low_h): New variable.
11699 (win32-low.o): Add dependency on $(win32_low_h).
11700 (win32-arm-low.o, win32-i386-low.o): New rules.
11701
f80c84b3
DJ
117022007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11703
11704 * hostio.c: Correct copyright year.
11705
a6b151f1
DJ
117062007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11707
11708 * Makefile.in (OBS): Add hostio.o.
11709 (hostio.o): New rule.
11710 * server.h (handle_vFile): Declare.
11711 * hostio.c: New file.
11712 * server.c (handle_v_requests): Take packet_len and new_packet_len
11713 for binary packets. Call handle_vFile.
11714 (main): Update call to handle_v_requests.
11715
f9387fc3
DJ
117162007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11717
11718 * linux-low.c: Include <sched.h>.
11719
51c2684e
DJ
117202007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11721
11722 * linux-low.c (linux_tracefork_grandchild): New.
11723 (linux_tracefork_child): Use clone.
11724 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11725
75f83163
JB
117262007-10-31 Joel Brobecker <brobecker@adacore.com>
11727
11728 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11729
da5898ce
DJ
117302007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11731
11732 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11733
24a09b5f
DJ
117342007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11735
11736 * inferiors.c (change_inferior_id): Delete.
11737 (add_pid_to_list, pull_pid_from_list): New.
11738 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11739 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11740 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11741 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11742 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11743 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11744 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11745 (using_threads): Always set to 1.
11746 (handle_extended_wait): New.
11747 (add_process): Do not set TID.
11748 (linux_create_inferior): Set must_set_ptrace_flags.
11749 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11750 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11751 (linux_thread_alive): Rename TID argument to LWPID.
11752 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11753 (linux_wait_for_event): Do not use TID or check using_threads. Update
11754 call to dead_thread_notify. Call handle_extended_wait.
11755 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11756 (send_sigstop): Delete sigstop_sent.
11757 (wait_for_sigstop): Avoid TID.
11758 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11759 (linux_test_for_tracefork): New.
11760 (linux_lookup_signals): Use thread_db_active and
11761 linux_supports_tracefork_flag.
11762 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11763 * linux-low.h (get_process_thread): Avoid TID.
11764 (struct process_ifo): Move thread_known and tid to the end. Remove
11765 sigstop_sent.
11766 (linux_attach_lwp, thread_db_init): Update prototypes.
11767 * server.h (change_inferior_id): Delete prototype.
11768 (add_pid_to_list, pull_pid_from_list): New prototypes.
11769 * thread-db.c (thread_db_use_events): New.
11770 (find_first_thread): Rename to...
11771 (find_one_thread): ...this. Update callers and messages. Do not
11772 call fatal. Check thread_db_use_events. Do not call
11773 change_inferior_id or new_thread_notify.
11774 (maybe_attach_thread): Update. Do not call new_thread_notify.
11775 (thread_db_init): Set thread_db_use_events. Check use_events.
11776 * utils.c (fatal, warning): Correct message prefix.
11777
30ed0a8f
DJ
117782007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11779
11780 * Makefile.in (clean): Remove new files.
11781 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11782 (powerpc-64.o, powerpc-64.c): New rules.
11783 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11784 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11785 with SPE.
11786 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11787 SPE targets.
11788 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11789 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11790 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11791 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11792 (target_regsets): Add AltiVec and SPE register sets.
11793 * configure.ac: Check for AltiVec and SPE.
11794 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11795 (ppc_fill_vrregset, ppc_store_vrregset): New.
11796 (target_regsets): Add AltiVec register set.
11797 * configure: Regenerated.
11798
fd462a61
DJ
117992007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11800
11801 * linux-low.c (O_LARGEFILE): Define.
11802 (linux_read_memory): Use /proc/PID/mem.
11803 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11804 * configure, config.in: Regenerated.
11805
69f223ed
DJ
118062007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11807
11808 * linux-low.c (linux_wait_for_event): Do not pass signals while
11809 single-stepping.
11810
aec18585
PA
118112007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11812
11813 * win32-low.c (create_process): New.
11814 (win32_create_inferior): Use create_process instead of
11815 CreateProcess. If create_process failed retry appending an ".exe"
11816 suffix. Store the GetLastError result immediatelly after
11817 create_process calls and use it on the call to error.
11818
34d86ddd
PA
118192007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11820
11821 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11822
5a0e3bd0
JB
118232007-08-23 Joel Brobecker <brobecker@adacore.com>
11824
11825 * configure.ac: Switch license to GPLv3.
11826
f88c79e6
MS
118272007-08-01 Michael Snyder <msnyder@access-company.com>
11828
11829 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11830
6b3d9b83
PA
118312007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11832
11833 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11834 typedef.
11835 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11836 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11837 CloseToolhelp32Snapshot.
11838 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11839 CloseToolhelp32Snapshot.
11840
c588c53c
MS
118412007-07-27 Michael Snyder <michael.snyder@access-company.com>
11842
11843 * server.c (main): Check for inferior exit before main loop.
11844
aa0403d9
PA
118452007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11846
11847 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11848 instead of on tmp_desc.
11849
255e7678
DJ
118502007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11851 Daniel Jacobowitz <dan@codesourcery.com>
11852
11853 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11854 (add_thread): Minor cleanups.
11855 (clear_inferiors): Move lower in the file. Clear the DLL
11856 list.
11857 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11858 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11859 (xml_escape_text): New.
11860 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11861 for qSupported.
11862 (handle_v_cont): Report errors.
11863 (gdbserver_version): Update.
11864 (main): Correct size of own_buf. Do not report initial DLL events.
11865 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11866 (unloaded_dll, xml_escape_text): New.
11867 * win32-low.c (enum target_waitkind): Update comments.
11868 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11869 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11870 (win32_EnumProcessModules, win32_GetModuleInformation)
11871 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11872 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11873 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11874 (win32_Module32First, win32_Module32Next, load_toolhelp)
11875 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11876 (get_child_debug_event): Handle DLL events.
11877 (win32_wait): Likewise.
11878
0d37add9
DJ
118792007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11880
11881 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11882 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11883
45e2715e
PA
118842007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11885
11886 * win32-low.c (handle_output_debug_string): Ignore event if not
11887 waiting.
11888
c5674cf1
PA
118892007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11890
11891 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11892
2bbe3cc1
DJ
118932007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11894
11895 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11896
ae13219e
DJ
118972007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11898
11899 * inferiors.c (change_inferior_id): Add comment.
11900 * linux-low.c (check_removed_breakpoint): Add an early
11901 prototype. Improve debug output.
11902 (linux_attach): Doc update.
11903 (linux_detach_one_process, linux_detach): Clean up before releasing
11904 each process.
11905 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11906 * linux-low.h (struct process_info): Doc improvement.
11907 * mem-break.c (delete_all_breakpoints): New.
11908 * mem-break.h (delete_all_breakpoints): New prototype.
11909 * thread-db.c (find_first_thread): New.
11910 (thread_db_create_event): Call it instead of
11911 thread_db_find_new_threads. Clean up unused variables.
11912 (maybe_attach_thread): Remove first thread handling.
11913 (thread_db_find_new_threads): Use find_first_thread.
11914 (thread_db_get_tls_address): Likewise.
11915
4105de34
DJ
119162007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11917
11918 * thread-db.c (thread_db_find_new_threads): Add prototype.
11919 (thread_db_create_event): Check for the main thread before adding
11920 a new thread.
11921 (maybe_attach_thread): Only enable event reporting if TID == 0.
11922 (thread_db_get_tls_address): Check for new threads.
11923
2b876972
DJ
119242007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11925
11926 * linux-low.c (linux_create_inferior): Try execv before execvp.
11927 * spu-low.c (spu_create_inferior): Likewise.
11928
7a245884
DJ
119292007-06-13 Mike Frysinger <vapier@gentoo.org>
11930
11931 * linux-low.c (linux_create_inferior): Change execv to execvp.
11932 * spu-low.c (spu_create_inferior): Likewies.
11933
117ce543
DJ
119342007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11935
11936 * Makefile.in (clean): Clean new files instead of deleted ones.
11937 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11938 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11939 rules.
11940 * configure.srv: Specify XML files and new regformats for MIPS and
11941 MIPS64 GNU/Linux.
11942 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11943 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11944 an entry for the restart register.
11945 (mips_cannot_fetch_register, mips_cannot_store_register)
11946 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11947 register names to match the XML descriptions.
11948 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11949 restart register instead of $0.
11950
0e7f50da
UW
119512007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11952 Markus Deuling <deuling@de.ibm.com>
11953
11954 * remote-utils.c (decode_xfer_write): New function.
11955 * server.h (decode_xfer_write): Add prototype.
11956 * server.c (handle_query): Add PACKET_LEN argument. Support
11957 qXfer:spu:read and qXfer:spu:write packets.
11958 (main): Pass packet_len to handle_query.
11959 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11960 * target.h (target_ops): Add qxfer_spu.
11961
374c1d38
UW
119622007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11963
11964 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11965 accessing non-seekable spufs files.
11966
bb63802a
UW
119672007-05-16 Markus Deuling <deuling@de.ibm.com>
11968
889bf7c5 11969 * server.c (handle_query): Add reply for qC packet.
bb63802a 11970
7390519e
PA
119712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11972 Leo Zayas <lerele@champenstudios@com>
11973
11974 * server.h (check_remote_input_interrupt_request): New function.
11975 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11976 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11977 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11978 (check_remote_input_interrupt_request): New function.
11979 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11980 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11981 winapi_GenerateConsoleCtrlEvent): New typedefs.
11982 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11983 to 250 ms.
11984 (win32_wait): Check for remote interrupt request
11985 with check_remote_input_interrupt_request.
11986 (win32_request_interrupt): New function.
11987 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11988
34b34921
PA
119892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11990
11991 * win32-low.c (debug_registers_changed,
11992 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11993 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11994 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11995 (thread_rec): Get context using the low target.
11996 (child_add_thread): Call thread_added on the low target,
11997 which does the same thing.
11998 (regptr): Delete.
11999 (do_initial_child_stuff): Remove debug registers references.
12000 Set context using the low target. Resume threads after
12001 setting the contexts.
12002 (child_continue): Remove dead variable. Remove debug
12003 registers references.
12004 (child_fetch_inferior_registers): Go through the low target.
12005 (do_child_store_inferior_registers): Remove.
12006 (child_store_inferior_registers): Go through the low target.
12007 (win32_resume): Remove debug registers references.
12008 Set context using the low target.
12009 (handle_exception): Change return type to void. Don't record
12010 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12011 first chance exception.
889bf7c5 12012 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12013 goto loop. Always return after waiting for debug event.
12014 (win32_wait): Convert to switch statement. Handle spurious
12015 events.
12016
12017 * win32-i386-low.c (debug_registers_changed,
12018 debug_registers_used): New.
12019 (initial_stuff): Rename to ...
12020 (i386_initial_stuff): ... this. Clear debug registers
12021 state variables.
12022 (store_debug_registers): Delete.
12023 (i386_get_thread_context): New.
12024 (load_debug_registers): Delete.
12025 (i386_set_thread_context): New.
12026 (i386_thread_added): New.
12027 (single_step): Rename to ...
12028 (i386_single_step): ... this.
12029 (do_fetch_inferior_registers): Rename to ...
12030 (i386_fetch_inferior_register): ... this.
12031 (i386_store_inferior_register): New.
12032 (the_low_target): Adapt to new interface.
12033
12034 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12035 (arm_get_thread_context): New.
12036 (arm_set_thread_context): New.
12037 (regptr): New.
12038 (do_fetch_inferior_registers): Rename to ...
12039 (arm_fetch_inferior_register): ... this.
12040 (arm_store_inferior_register): New.
12041 (arm_wince_breakpoint): Reimplement as unsigned long.
12042 (arm_wince_breakpoint_len): Define.
12043 (the_low_target): Adapt to new interface.
12044
12045 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12046 load_debug_registers. Add get_thread_context, set_thread_context,
12047 thread_added and store_inferior_register. Rename
12048 fetch_inferior_registers to fetch_inferior_register.
12049 (regptr): Remove declaration.
12050
dd6953e1
PA
120512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12052
12053 * linux-low.c (linux_detach): Change return type to int. Return 0.
12054 * spu-low.c (spu_detach): Likewise.
12055
444d6139
PA
120562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12057
12058 * target.h (target_ops): Change return type of detach to int.
12059 Add join.
12060 (join_inferior): New.
12061 * server.c (main): Don't skip detach support on mingw32.
12062 If the inferior doesn't support detaching return error.
12063 Call join_inferior instead of using waitpid.
12064 * linux-low.c (linux_join): New.
12065 (linux_target_op): Add linux_join.
12066 * spu-low.c (spu_join): New.
12067 (spu_target_ops): Add spu_join.
12068 * win32-low.c (win32_detach): Adapt to new interface.
12069 Reopen current_process_handle before detaching. Issue a child
12070 resume before detaching.
12071 (win32_join): New.
12072 (win32_target_op): Add win32_join.
12073
1d5315fe
PA
120742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12075
12076 * win32-low.c (win32-attach): Fix return value.
12077 * target.h (target_ops): Describe ATTACH return values.
12078
bf914831
PA
120792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12080
12081 * win32-low.c (GETPROCADDRESS): Define.
12082 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12083 (winapi_DebugSetProcessKillOnExit): Likewise.
12084 (win32_create_inferior): Force usage of ansi CreateProcessA.
12085 (win32_attach): Use GETPROCADDRESS.
12086 (win32_detach): Likewise.
12087
f72f3e60
PA
120882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12089
12090 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12091
ed50f18f
PA
120922007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12093
12094 * win32-low.c: Commit leftover changes from 2007-03-29.
12095
0c2ead7e
DJ
120962007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12097
12098 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12099 fields short instead of int. Add explicit padding.
12100 (i387_cache_to_fsave): Remove unnecessary casts.
12101 (i387_fsave_to_cache): Doc fix.
12102 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12103
73725ff3
DJ
121042007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12105
12106 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12107 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12108
d99f33d8
PA
121092007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12110
12111 * configure.srv (arm*-*-mingw32ce*): Move near the other
12112 arm targets.
12113
68070c10
PA
121142007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12115
2482afc6 12116 * configure.ac: Add errno checking.
68070c10
PA
12117 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12118 sys/file.h and malloc.h.
12119 (AC_CHECK_DECLS): Add perror.
12120 (srv_mingwce): Handle.
2482afc6 12121 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12122 win32-i386-low.o to srv_tgtobj.
12123 (i[34567]86-*-mingw*): Likewise.
12124 (arm*-*-mingw32ce*): Add case.
12125 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12126 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12127 [__MINGW32CE__] (strerror): New function.
12128 [__MINGW32CE__] (errno): Define to GetLastError.
12129 [__MINGW32CE__] (COUNTOF): New macro.
12130 (remote_open): Remove extra close call.
12131 * mem-break.c (delete_breakpoint_at): New function.
12132 * mem-break.h (delete_breakpoint_at): Declare.
12133 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12134 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12135 [USE_WIN32API] (read, write): Add char* casts.
12136 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12137 * server.h: Include wincecompat.h on Windows CE.
12138 [HAVE_ERRNO_H]: Check.
12139 (perror): Declare if not declared.
12140 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12141 (perror_with_name): Remove errno declaration.
12142 * wincecompat.h: New.
12143 * wincecompat.c: New.
12144 * win32-low.h: New.
12145 * win32-arm-low.c: New.
12146 * win32-i386-low.c: New.
12147 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12148 (OUTMSG2): Make it safe.
12149 (_T): New macro.
12150 (COUNTOF): New macro.
12151 (NUM_REGS): Get it from the low target.
12152 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12153 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12154 (thread_rec): Let low target handle debug registers.
12155 (child_add_thread): Likewise.
12156 (child_init_thread_list): Likewise.
12157 (continue_one_thread): Likewise.
12158 (regptr): New.
12159 (do_child_fetch_inferior_registers): Move to ...
12160 * win32-i386-low.c: ... here, and rename to ...
12161 (do_fetch_inferior_registers): ... this.
889bf7c5 12162 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12163 Go through the low target.
12164 (do_child_store_inferior_registers): Use regptr.
12165 (strwinerror): New function.
12166 (win32_create_inferior): Handle Windows CE.
12167 Use strwinerror instead of strerror on Windows error
12168 codes. Add program to the error output.
12169 Don't close the main thread handle on Windows CE.
12170 (win32_attach): Use coredll.dll on Windows CE.
12171 (win32_kill): Close current process and current
12172 thread handles.
12173 (win32_detach): Use coredll.dll on Windows CE.
12174 (win32_resume): Let low target handle debug registers, and
12175 step request.
12176 (handle_exception): Add/Remove initial breakpoint. Avoid
12177 non-existant WSTOPSIG on Windows CE.
12178 (win32_read_inferior_memory): Cast to remove warning.
12179 (win32_arch_string): Go through the low target.
12180 (initialize_low): Call set_breakpoint_data with the low
12181 target's breakpoint.
12182 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12183 FOP_REGNUM, mappings): Move to ...
12184 * win32-i386-low.c: ... here.
12185 * win32-low.c (win32_thread_info): Move to ...
12186 * win32-low.h: ... here.
12187 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12188 win32-arm-low.c and wincecompat.c.
12189 (all:): Add $EXEEXT.
12190 (install-only:): Likewise.
12191 (gdbserver:): Likewise.
12192 (gdbreplay:): Likewise.
12193 * config.in: Regenerate.
12194 * configure: Regenerate.
12195
41093d81
PA
121962007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12197
12198 * win32-low.c: Rename typedef thread_info to
12199 win32_thread_info throughout.
12200
544afa54
PA
122012007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12202
12203 * win32-i386-low.c: Rename to ...
12204 * win32-low.c: ... this.
12205 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12206 * Makefile.in: Likewise.
12207
bce7165d
PA
122082007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12209
12210 * remote-utils.c (monitor_output): Constify msg parameter.
12211 * server.h (monitor_output): Likewise.
12212 * win32-i386-low.c (handle_output_debug_string): New.
12213 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12214 handle_output_debug_string.
12215 (get_child_debug_event): Likewise.
12216
506c7aa0
DJ
122172007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12218
12219 * server.c (main): Correct strtoul check.
12220
42c81e2a
DJ
122212007-03-27 Jon Ringle <jon@ringle.org>
12222
12223 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12224
9453113a
DJ
122252007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12226
12227 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12228
64a69107
DJ
122292007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12230
12231 * terminal.h: Check HAVE_SGTTY_H.
12232
122332007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12234
12235 * remote-utils.c (remote_open): Print out the assigned port number.
12236
c74d0ad8
DJ
122372007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12238
12239 * remote-utils.c (monitor_output): New function.
12240 * server.c (debug_threads): Define here.
12241 (monitor_show_help): New function.
12242 (handle_query): Handle qRcmd.
12243 (main): Do not handle 'd' packet.
12244 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12245 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12246 of debug_threads.
12247
de7c3b4a
PA
122482007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12249
12250 * Makefile.in (EXEEXT): New.
12251 (clean): Use $(EXEEXT).
12252
ef57601b
PA
122532007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12254
12255 * target.h (target_ops): Rename send_signal to request_interrupt,
12256 and remove enum target_signal parameter.
12257 * linux-low.c (linux_request_interrupt): Rename from
12258 linux_send_signal, and always send SIGINT.
12259 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12260 and always send SIGINT.
12261 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12262 of send_signal.
12263 (input_interrupt): Likewise.
12264
820f2bda
PA
122652007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12266
12267 * server.c (get_features_xml): Check if target implemented
12268 arch_string.
12269 * win32-i386-low.c (win32_arch_string): New.
12270 (win32_target_ops): Add win32_arch_string as arch_string member.
12271
ab39bf24
UW
122722007-02-22 Markus Deuling <deuling@de.ibm.com>
12273
12274 * spu-low.c (spu_arch_string): New.
12275 (spu_target_ops): Add spu_arch_string.
12276
61ff6e04
DJ
122772007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12278
12279 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12280 * configure.ac: Do not check for terminal.h.
12281 * configure, config.in: Regenerated.
12282
fb1e4ffc
DJ
122832007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12284
12285 * Makefile.in (OBS): Add $(XML_BUILTIN).
12286 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12287 (clean): Update.
12288 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12289 (arm-with-iwmmxt.c): New.
12290 * config.in, configure: Regenerate.
12291 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12292 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12293 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12294 (arm*-*-linux*): Add iWMMXt and regset support.
12295 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12296 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12297 (arm_store_wmmxregset, target_regsets): New.
12298 * server.c (get_features_xml): Take annex argument. Check builtin
12299 XML documents.
12300 (handle_query): Handle multiple annexes.
12301
0f48aa01
DJ
123022007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12303
12304 * remote-utils.c [USE_WIN32API] (read, write): Define.
12305 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12306 write.
12307
23181151
DJ
123082007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12309
12310 * linux-i386-low.c (the_low_target): Set arch_string.
12311 * linux-x86-64-low.c (the_low_target): Likewise.
12312 * linux-low.c (linux_arch_string): New.
12313 (linux_target_ops): Add it.
12314 * linux-low.h (struct linux_target_ops): Add arch_string.
12315 * server.c (write_qxfer_response): Use const void * for DATA.
12316 (get_features_xml): New.
12317 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12318 * target.h (struct target_ops): Add arch_string method.
12319
9d606399
DJ
123202007-01-03 Denis Pilat <denis.pilat@st.com>
12321 Daniel Jacobowitz <dan@codesourcery.com>
12322
12323 * linux-low.c (linux_kill): Handle being called with no threads.
12324 * win32-i386-low.c (win32_kill): Likewise.
12325 (get_child_debug_event): Clear current_process_handle.
12326
123272006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12328 Daniel Jacobowitz <dan@codesourcery.com>
12329
12330 * remote-utils.c (remote_open): Check the type of specified
12331 serial port devices before opening them.
12332 * server.c (main): Kill the inferior if an error occurs during
12333 the first remote_open.
12334
a5e13d24
DJ
123352006-12-05 Markus Deuling <deuling@de.ibm.com>
12336
12337 * README: Update supported targets.
12338
186947f7
DJ
123392006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12340
12341 * Makefile.in (clean): Remove reg-mips64.c.
12342 (reg-mips64.c, reg-mips64.o): New rules.
12343 * configure.srv: Handle mips64. Include regset support for mips.
12344 * linux-mips-low.c (union mips_register): New.
12345 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12346 (mips_breakpoint, mips_breakpoint_at): Use int.
12347 (mips_collect_register, mips_supply_register)
12348 (mips_collect_register_32bit, mips_supply_register_32bit)
12349 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12350 (mips_store_fpregset, target_regsets): New.
12351 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12352
a13e2c95
UW
123532006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12354
12355 * configure.srv: Add target "spu*-*-*".
12356 * Makefile.in (clean): Remove reg-spu.c.
12357 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12358 * spu-low.c: New file.
12359
cb7283db
DJ
123602006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12361
12362 * configure.ac: Correct td_thr_tls_get_addr test.
12363 * configure: Regenerated.
12364
89be2091
DJ
123652006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12366
12367 * linux-low.c (linux_wait_for_event): Reformat. Use the
12368 pass_signals array.
12369 * remote-utils.c (decode_address_to_semicolon): New.
12370 * server.c (pass_signals, handle_general_set): New.
12371 (handle_query): Mention QPassSignals for qSupported.
12372 (main): Call handle_general_set.
12373 * server.h (pass_signals, decode_address_to_semicolon): New.
12374
000ef4f0
DJ
123752006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12376
12377 * server.c (handle_query): Correct error handling for read_auxv.
12378
b7149293
UW
123792005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12380
12381 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12382 and srv_linux_thread_db to yes.
12383 * linux-s390-low.c (s390_fill_gregset): New function.
12384 (target_regsets): Define data structure.
12385
dae5f5cf
DJ
123862006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12387
12388 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12389 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12390 * config.in, configure: Regenerated.
12391 * inferiors.c (gdb_id_to_thread): New function.
12392 (gdb_id_to_thread_id): Use it.
12393 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12394 * linux-low.h (struct process_info): Add th member.
12395 (thread_db_get_tls_address): New prototype.
12396 * remote-utils.c (decode_address): Make non-static.
12397 * server.c (handle_query): Handle qGetTLSAddr.
12398 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12399 * target.h (struct target_ops): Add get_tls_address.
12400 * thread-db.c (maybe_attach_thread): Save the thread handle.
12401 (thread_db_get_tls_address): New.
12402
32ca6d61
DJ
124032006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12404
12405 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12406 (linux_resume_one_process): Take a siginfo_t *. Update all
12407 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12408 (struct pending_signals): Add a siginfo_t.
12409 (linux_wait_for_process): Always set last_status.
12410 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12411 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12412 * linux-low.h (struct process_info): Add last_status.
12413
5ffff7c1
DJ
124142006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12415
12416 * remote-utils.c (try_rle): New function.
12417 (putpkt_binary): Use it.
12418
8695c747
DJ
124192006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12420
12421 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12422 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12423 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12424 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12425 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12426 point registers.
12427
290fadea
RS
124282006-08-08 Richard Sandiford <richard@codesourcery.com>
12429
12430 * server.c (terminal_fd): New variable.
12431 (old_foreground_pgrp): Likewise.
12432 (restore_old_foreground_pgrp): New function.
12433 (start_inferior): Record the terminal file descriptor in terminal_fd
12434 and its original foreground group in old_foreground_pgrp. Register
12435 restore_old_foreground_pgrp with atexit().
12436
9f2e1e63
DJ
124372006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12438
12439 * server.c (handle_query): Correct qPart to qXfer.
12440
b80864fb
DJ
124412006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12442
12443 * configure.ac: Check for more headers which are missing on
12444 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12445 * configure.srv: Add Cygwin and mingw32.
12446 * remote-utils.c: Don't include headers unconditionally which
12447 are missing on mingw32. Include <winsock.h> for mingw32.
12448 (remote_open): Adjust for mingw32 support. Flush
12449 standard error after writing to it.
12450 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12451 (unblock_async_io, enable_async_io, disable_async_io)
12452 (readchar, getpkt): Update for Winsock support.
12453 (prepare_resume_reply): Expect a protocol signal number.
12454 * server.c: Disable <sys/wait.h> on mingw32.
12455 (start_inferior): Adjust for mingw32 support. Flush
12456 standard error after writing to it.
12457 (attach_inferior): Likewise. Use protocol signal
12458 numbers.
12459 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12460 and names.
12461 * win32-i386-low.c: New file.
12462 * Makefile.in (XM_CLIBS): Set.
12463 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12464 (win32-i386-low.o): New dependency rule.
12465 * linux-low.c (linux_wait): Use target signal numbers.
12466 * target.h (struct target_ops): Doc fix.
12467 * server.h (target_signal_to_name): New prototype.
12468 * gdbreplay.c: Don't include headers unconditionally which
12469 are missing on mingw32. Include <winsock.h> for mingw32.
12470 (remote_close, remote_open): Adjust for Winsock support.
12471 * configure, config.in: Regenerated.
12472
0876f84a
DJ
124732006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12474
12475 * server.c (decode_xfer_read, write_qxfer_response): New.
12476 (handle_query): Take a packet length argument. Handle
12477 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12478 the qSupported response.
12479 (main): Update call to handle_query.
12480
01f9e8fa
DJ
124812006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12482
12483 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12484 (putpkt_binary): Renamed from putpkt and adjusted for binary
12485 data.
12486 (putpkt): New wrapper for putpkt_binary.
12487 (readchar): Don't mask off the high bit.
12488 (decode_X_packet): New function.
12489 * server.c (main): Call putpkt_binary if a handler sets the packet
12490 length. Save the length of the incoming packet. Handle 'X'.
12491 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12492
be2a5f71
DJ
124932006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12494
12495 * server.c (handle_query): Handle qSupported.
12496
ea025f5f
DJ
124972006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12498
12499 * remote-utils.c (all_symbols_looked_up): New variable.
12500 (look_up_one_symbol): Check it.
12501 * server.h (look_up_one_symbol): New declaration.
12502 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12503
9308fc88
DJ
125042006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12505
12506 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12507 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12508 (PTRACE_GET_THREAD_AREA): Define.
12509 (ps_get_thread_area): New function.
12510
52fb6437
NS
125112006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12512
12513 * configure.srv (m68k*-*-uclinux*): New target.
12514 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12515 (linux_resume_one_process): Remove extraneous cast.
12516 (linux_read_offsets): New.
12517 (linux_target_op): Add linux_read_offsets on mmuless systems.
12518 * server.c (handle_query): Add qOffsets logic.
12519 * target.h (struct target_ops): Add read_offsets.
12520
21b0f40c
DJ
125212006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12522
12523 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12524 (PTRACE_GET_THREAD_AREA): Define.
12525 (ps_get_thread_area): New function.
12526 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12527 (linux-x86-64-low.o): Update.
12528
0050a760
DJ
125292006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12530
12531 * configure.ac: Remove checks for prfpregset_t.
12532 * gdb_proc_service.h: New file.
12533 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12534 new "gdb_proc_service.h".
12535 * proc-service.c: Likewise.
12536 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12537 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12538 * Makefile.in (gdb_proc_service_h): Updated.
12539 * configure, config.in: Regenerated.
12540
b92a518e
DJ
125412006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12542
12543 * remote-utils.c (prepare_resume_reply): Move declaration
12544 of gdb_id_from_wait to the top of the block.
12545
545587ee
DJ
125462006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12547
12548 * linux-low.c (regsets_store_inferior_registers): Read the regset
12549 from the target before filling it.
12550
9db87ebd
DJ
125512006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12552
12553 * server.c (attach_inferior): Return SIGTRAP for a successful
12554 attach.
12555
dd24457d
DJ
125562006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12557
12558 * Makefile.in (OBS): Add version.o.
12559 (STAGESTUFF): Delete.
12560 (version.o): Add dependencies.
12561 (version.c): Replace rule.
12562 (clean): Remove version.c.
12563 * server.c (gdbserver_version): New.
12564 (gdbserver_usage): Use printf.
12565 (main): Handle --version and --help.
12566 * server.h (version, host_name): Add declarations.
12567
6f0f660e
EZ
125682005-12-23 Eli Zaretskii <eliz@gnu.org>
12569
889bf7c5
PA
12570 * linux-arm-low.c:
12571 * linux-arm-low.c:
12572 * inferiors.c:
12573 * i387-fp.h:
12574 * i387-fp.c:
12575 * gdbreplay.c:
12576 * regcache.c:
12577 * proc-service.c:
12578 * mem-break.h:
12579 * mem-break.c:
12580 * linux-x86-64-low.c:
12581 * linux-sh-low.c:
12582 * linux-s390-low.c:
12583 * linux-ppc64-low.c:
12584 * linux-ppc-low.c:
12585 * linux-mips-low.c:
12586 * linux-m68k-low.c:
12587 * linux-m32r-low.c:
12588 * linux-low.h:
12589 * linux-low.c:
12590 * linux-ia64-low.c:
12591 * linux-i386-low.c:
12592 * linux-crisv32-low.c:
12593 * thread-db.c:
12594 * terminal.h:
12595 * target.h:
12596 * target.c:
12597 * server.h:
12598 * server.c:
12599 * remote-utils.c:
12600 * regcache.h:
12601 * utils.c:
12602 * Makefile.in:
12603 * configure.ac:
6f0f660e
EZ
12604 * gdbserver.1: Add (C) after Copyright. Update the FSF
12605 address.
12606
9d1fb177
DJ
126072005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12608
12609 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12610 (arm_breakpoint_at): Recognize both breakpoints.
12611 (the_low_target): Use the correct breakpoint instruction.
12612
011a70c2
DJ
126132005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12614
12615 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12616 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12617 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12618 (the_low_target): Update.
12619
7fb85e41
AS
126202005-10-25 Andreas Schwab <schwab@suse.de>
12621
12622 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12623
12624 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12625 (ia64_num_regs): Reduce to 462.
12626
3db0444b
DJ
126272005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12628
12629 * acinclude.m4: Correct quoting.
12630 * aclocal.m4: Regenerated.
12631
12632 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12633 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12634 (thread_db_init): Call thread_db_err_str.
12635 * configure.ac: Check for TD_VERSION.
12636 * config.in, configure: Regenerated.
12637
bee0189a
DJ
126382005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12639
12640 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12641
e9d25b98
DJ
126422005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12643
12644 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12645 is not available. Define HAVE_PTRACE_GETREGS if it is.
12646 * config.in, configure: Regenerated.
12647 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12648 * linux-i386-low.c, linux-m68k-low.c: Update to use
12649 HAVE_PTRACE_GETREGS.
12650 * linux-low.c (regsets_fetch_inferior_registers)
12651 (regsets_store_inferior_registers): Only return 0 if we processed
12652 GENERAL_REGS.
12653 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12654 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12655
a06660f7
DJ
126562005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12657
12658 * inferiors.c (struct thread_info): Add gdb_id.
12659 (add_thread): Add gdb_id argument.
12660 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12661 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12662 calls to add_thread.
12663 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12664 * server.c (handle_query): Use thread_to_gdb_id.
12665 (handle_v_cont, main): Use gdb_id_to_thread_id.
12666 * server.h (add_thread): Update prototype.
12667 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12668 prototypes.
12669
5a1f5858
DJ
126702005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12671
12672 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12673 left-padded registers.
12674 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12675 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12676
e122f1f5
SE
126772005-07-01 Steve Ellcey <sje@cup.hp.com>
12678
12679 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12680 * configure: Regenerate.
12681 * config.in: Regenerate.
12682 * server.h (NEED_DECLARATION_STRERROR):
12683 Replace with !HAVE_DECL_STRERROR.
12684
d592fa2f
DJ
126852005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12686
12687 * linux-low.c (linux_wait, linux_send_signal): Don't test
12688 an unsigned long variable for > 0 if it could be MAX_ULONG.
12689 * server.c (myresume): Likewise.
12690 * target.c (set_desired_inferior): Likewise.
12691
ccbd4912
MK
126922005-06-13 Mark Kettenis <kettenis@gnu.org>
12693
12694 * configure.ac: Simplify and improve check for socklen_t.
12695 * configure, config.in: Regenerate.
12696
f450004a
DJ
126972005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12698
12699 * acconfig.h: Remove.
12700 * configure.ac: Add a test for socklen_t. Use three-argument
12701 AC_DEFINE throughout.
12702 * config.in: Regenerated using autoheader 2.59.
12703 * configure: Regenerated.
12704
12705 * gdbreplay.c (socklen_t): Provide a default.
12706 (remote_open): Use socklen_t.
12707 * remote-utils.c (socklen_t): Provide a default.
12708 (remote_open): Use socklen_t.
12709 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12710 unsigned char.
12711
12712 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12713 char for buffers.
12714 * linux-low.c (linux_read_memory, linux_write_memory)
12715 (linux_read_auxv): Likewise.
12716 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12717 (check_mem_write): Likewise.
12718 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12719 Likewise.
12720 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12721 (registers_from_string, register_data): Likewise.
12722 * server.c (handle_query, main): Likewise.
12723 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12724 (decode_M_packet): Likewise.
12725 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12726 * target.h (struct target_ops): Update read_memory, write_memory,
12727 and read_auxv.
12728 (read_inferior_memory, write_inferior_memory): Update.
12729 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12730 to unsigned char *.
12731 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12732 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12733 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12734 linux-s390-low.c, linux-sh-low.c: Update for changes in
12735 read_inferior_memory and the_low_target->breakpoint.
12736
eee84df1
DJ
127372005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12738
12739 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12740 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12741 * configure.srv: Add powerpc64-*-linux*.
12742 * linux-ppc64-low.c: New file.
12743
45b134e5
OF
127442005-05-23 Orjan Friberg <orjanf@axis.com>
12745
12746 * linux-cris-low.c: New file with support for CRIS.
12747 * linux-crisv32-low.c: Ditto for CRISv32.
12748 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12749 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12750 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12751 reg-crisv32.o, and reg-crisv32.c to make rules.
12752 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12753 recognized targets.
12754
48d93c75
UW
127552005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12756
12757 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12758 of sizeof (PTRACE_XFER_TYPE).
12759 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12760
e013ee27
OF
127612005-05-12 Orjan Friberg <orjanf@axis.com>
12762
889bf7c5 12763 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12764 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12765 pointers for hardware watchpoint support.
12766 * linux-low.h (struct linux_target_ops): Ditto.
12767 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12768 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12769 to linux_target_ops.
12770 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12771 reply packet.
12772 * server.c (main): Recognize 'Z' and 'z' packets.
12773
b0ded00b
UW
127742005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12775
12776 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12777 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12778 (the_low_target): Add new members.
12779
8643e2ad
DJ
127802005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12781
12782 * proc-service.c (ps_lgetregs): Search all_processes instead of
12783 all_threads.
12784
fc620387
DJ
127852005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12786
12787 * server.c (start_inferior): Change return type to int.
12788 (attach_inferior): Change sigptr to int *.
12789 (handle_v_cont, handle_v_requests): Change signal to int *.
12790 (main): Change signal to int.
12791
127922005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12793
12794 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12795 * configure.srv: Add m32r*-*-linux*.
12796 * linux-m32r-low.c: New file.
12797
e0e76420
DJ
127982005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12799
12800 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12801
a1928bad
DJ
128022005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12803
12804 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12805 Take unsigned long arguments for PIDs.
12806 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12807 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12808 (wait_for_sigstop, linux_resume_one_process)
12809 (regsets_fetch_inferior_registers, linux_send_signal)
12810 (linux_read_auxv): Likewise. Update the types of variables holding
12811 PIDs. Update format string specifiers.
12812 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12813 * remote-utils.c (prepare_resume_reply): Likewise.
12814 * server.c (cont_thread, general_thread, step_thread)
12815 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12816 unsigned long.
12817 (handle_query): Update format specifiers.
12818 (handle_v_cont, main): Use strtoul for thread IDs.
12819 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12820 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12821 (general_thread, step_thread, thread_from_wait)
12822 (old_thread_from_wait): Update.
12823 * target.h (struct thread_resume): Use unsigned long for THREAD.
12824 (struct target_ops): Use unsigned long for arguments to attach and
12825 thread_alive.
12826
dcdb98d2
DJ
128272005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12828
12829 * acinclude.m4: Include bfd/bfd.m4 directly.
12830 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12831 <agriffis@toolchain.org>.
12832 * aclocal.m4, configure: Regenerated.
12833
bec39cab
AC
128342005-01-07 Andrew Cagney <cagney@gnu.org>
12835
12836 * configure.ac: Rename configure.in, require autoconf 2.59.
12837 * configure: Re-generate.
12838
434c4c77
DJ
128392004-12-08 Daniel Jacobowitz <dan@debian.org>
12840
12841 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12842 LIBS when finished.
12843 * aclocal.m4: Regenerated.
12844 * configure: Regenerated.
12845
db1d3e1b
AS
128462004-11-21 Andreas Schwab <schwab@suse.de>
12847
12848 * linux-m68k-low.c (m68k_num_gregs): Define.
12849 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12850 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12851 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12852 (m68k_breakpoint_at): New. Add to the_low_target.
12853
12854 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12855 srv_linux_thread_db to yes.
12856
43360365
JB
128572004-10-20 Joel Brobecker <brobecker@gnat.com>
12858
12859 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12860 (ARCH_SET_FS): Likewise.
12861 (ARCH_GET_FS): Likewise.
12862 (ARCH_GET_GS): Likewise.
12863
fd500816
DJ
128642004-10-16 Daniel Jacobowitz <dan@debian.org>
12865
12866 * linux-i386-low.c (ps_get_thread_area): New.
12867 * linux-x86-64-low.c (ps_get_thread_area): New.
12868 * linux-low.c: Include <sys/syscall.h>.
12869 (linux_kill_one_process): Don't kill the first thread here.
12870 (linux_kill): Kill the first thread here.
12871 (kill_lwp): New function.
12872 (send_sigstop, linux_send_signal): Use it.
12873 * proc-service.c: Clean up #ifdefs.
12874 (fpregset_info): Delete.
12875 (ps_lgetregs): Update and enable implementation.
12876 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12877 implementations.
12878 * remote-utils.c (struct sym_cache, symbol_cache): New.
12879 (input_interrupt): Print a clearer message.
12880 (async_io_enabled): New variable.
12881 (enable_async_io, disable_async_io): Use it. Update comments.
12882 (look_up_one_symbol): Use the symbol cache.
12883 * thread-db.c (thread_db_look_up_symbols): New function.
12884 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12885
f6de3c42
DJ
128862004-10-16 Daniel Jacobowitz <dan@debian.org>
12887
12888 * configure.in: Test for -rdynamic.
12889 * configure: Regenerated.
12890 * Makefile (INTERNAL_LDFLAGS): New.
12891 (gdbserver, gdbreplay): Use it.
12892
2c0fc042
AC
128932004-09-02 Andrew Cagney <cagney@gnu.org>
12894
12895 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12896
075b3282
DJ
128972004-03-23 Daniel Jacobowitz <drow@mvista.com>
12898
12899 * linux-low.c (linux_wait): Clear all_processes list also.
12900
fa6a77dc
DJ
129012004-03-12 Daniel Jacobowitz <drow@mvista.com>
12902
12903 * linux-low.c: Include <errno.h>. Remove extern declaration of
12904 errno.
12905
6d782a97
DJ
129062004-03-12 Daniel Jacobowitz <drow@mvista.com>
12907
12908 * gdbreplay.c, server.h, utils.c: Update copyright years.
12909
3a7fb99b
DJ
129102004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12911
12912 * server.c (main): Print child status or termination signal from
12913 variable 'signal', not 'sig'.
12914
c3e735a6
DJ
129152004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12916
12917 * linux-low.c (linux_read_memory): Change return type to
12918 int. Check for and return error from ptrace().
12919 * target.c (read_inferior_memory): Change return type to int. Pass
12920 back return status from the_target->read_memory().
12921 * target.h (struct target_ops): Adapt *read_memory() prototype.
12922 Update comment.
12923 (read_inferior_memory): Adapt prototype.
12924 * server.c (main): Return an error packet if
12925 read_inferior_memory() returns an error.
12926
a59d1c82
DJ
129272004-03-04 Daniel Jacobowitz <drow@mvista.com>
12928
12929 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12930 Unify with other clean targets.
12931
dc3f8883
DJ
129322004-02-29 Daniel Jacobowitz <drow@mvista.com>
12933
12934 * server.c (handle_v_cont): Call set_desired_inferior.
12935
89a208da
DJ
129362004-02-29 Daniel Jacobowitz <drow@mvista.com>
12937
12938 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12939
62ea82f5
DJ
129402004-02-29 Daniel Jacobowitz <drow@mvista.com>
12941
12942 * linux-low.c (linux_wait): Unblock async I/O.
12943 (linux_resume): Block and enable async I/O.
12944 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12945 * server.h (block_async_io, unblock_async_io): Add prototypes.
12946
6910d122
DJ
129472004-02-29 Daniel Jacobowitz <drow@mvista.com>
12948
12949 * remote-utils.c (remote_open): Print a status notice after
12950 opening a TCP port.
12951 * server.c (attach_inferior): Print a status notice after
12952 attaching.
12953
129542004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12955
12956 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12957
c89dc5d4
DJ
129582004-02-26 Daniel Jacobowitz <drow@mvista.com>
12959
12960 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12961 error packet.
12962 * server.c, target.h: Update copyright years.
12963
4b8dad4a
RM
129642004-02-25 Roland McGrath <roland@redhat.com>
12965
12966 * target.h (struct target_ops): New member `read_auxv'.
12967 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12968 * linux-low.c (linux_read_auxv): New function.
12969 (linux_target_ops): Initialize `read_auxv' member to that.
12970
d7446758
JB
129712004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12972
12973 Committed by Jim Blandy <jimb@redhat.com>.
12974
12975 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12976 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12977 instead of GPR_SIZE to distiguish s390 and s390x targets.
12978
5544ad89
DJ
129792004-01-31 Daniel Jacobowitz <drow@mvista.com>
12980
12981 * linux-low.c: Update copyright year.
12982 (check_removed_breakpoint): Clear pending_is_breakpoint.
12983 (linux_set_resume_request, linux_queue_one_thread)
12984 (resume_status_pending_p): New functions.
12985 (linux_continue_one_thread): Use process->resume.
12986 (linux_resume): Only resume threads if there are no pending events.
12987 * linux-low.h (struct process_info): Add resume request
12988 pointer.
12989
2a68b70e
DJ
129902004-01-30 Daniel Jacobowitz <drow@mvista.com>
12991
12992 * regcache.c (new_register_cache): Clear the allocated register
12993 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12994
64386c31
DJ
129952003-10-13 Daniel Jacobowitz <drow@mvista.com>
12996
12997 * linux-low.c (linux_resume): Take a struct thread_resume *
12998 argument.
12999 (linux_wait): Update call.
13000 (resume_ptr): New static variable.
13001 (linux_continue_one_thread): Renamed from
13002 linux_continue_one_process. Use resume_ptr.
13003 (linux_resume): Use linux_continue_one_thread.
13004 * server.c (handle_v_cont, handle_v_requests): New functions.
13005 (myresume): New function.
13006 (main): Handle 'v' case.
13007 * target.h (struct thread_resume): New type.
13008 (struct target_ops): Change argument of "resume" to struct
13009 thread_resume *.
13010 (myresume): Delete macro.
13011
c938e9b0
L
130122003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13013
13014 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13015 (uninstall): Support DESTDIR.
13016
7f313d07
BC
13017Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13018
13019 * configure.srv: Add xscale*linux copy of arm*linux entry.
13020
3b2fc2ea
DJ
130212003-07-24 Daniel Jacobowitz <drow@mvista.com>
13022
13023 * linux-arm-low.c (arm_reinsert_addr): New function.
13024 (the_low_target): Add arm_reinsert_addr.
13025
1c0a559e
MK
130262003-07-08 Mark Kettenis <kettenis@gnu.org>
13027
13028 * mem-break.c: Remove whitespace at end of file.
13029
43d5792c
DJ
130302003-06-28 Daniel Jacobowitz <drow@mvista.com>
13031
13032 * configure.in: Check whether we need to prototype strerror.
13033 * server.h: Optionally prototype strerror.
13034 * gdbreplay.c (perror_with_name): Use strerror.
13035 * linux-low.c (linux_attach_lwp): Use strerror.
13036 * utils.c (perror_with_name): Use strerror.
13037 * config.in, configure: Regenerated.
13038
c8a86edf
DJ
130392003-06-28 Daniel Jacobowitz <drow@mvista.com>
13040
13041 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13042 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13043
73d37363
DJ
130442003-06-20 Daniel Jacobowitz <drow@mvista.com>
13045
13046 * Makefile.in (SFILES): Update.
13047 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13048 low-sun3.c: Remove files.
13049
6ad8ae5c
DJ
130502003-06-17 Daniel Jacobowitz <drow@mvista.com>
13051
13052 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13053 (linux_detach_one_process, linux_detach): New functions.
13054 (linux_target_ops): Add linux_detach.
13055 * server.c (main): Handle 'D' packet.
13056 * target.h (struct target_ops): Add "detach" member.
13057 (detach_inferior): Define.
13058
1581182a
MK
130592003-06-13 Mark Kettenis <kettenis@gnu.org>
13060
13061 From Kelley Cook <kelleycook@wideopenwest.com>:
13062 * configure.srv: Accept i[34567]86 variants.
13063
e5379b03
DJ
130642003-06-05 Daniel Jacobowitz <drow@mvista.com>
13065
13066 * linux-low.c (linux_wait_for_event): Correct comment typos.
13067 (linux_resume_one_process): Call check_removed_breakpoint.
13068 (linux_send_signal): New function.
13069 (linux_target_ops): Add linux_send_signal.
13070 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13071 of kill.
13072 * target.h (struct target_ops): Add send_signal.
13073
2ff29de4
JB
130742003-05-29 Jim Blandy <jimb@redhat.com>
13075
13076 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13077 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13078 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13079 away part of the register's value.
13080
254787d4
DJ
130812003-03-26 Daniel Jacobowitz <drow@mvista.com>
13082
13083 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13084 (linux_wait_for_event, linux_init_signals): Likewise.
13085
94e10508
DJ
130862003-03-17 Daniel Jacobowitz <drow@mvista.com>
13087
13088 * configure.in: Check for stdlib.h.
13089 * configure: Regenerated.
13090 * config.in: Regenerated.
13091
4c0711e0
DJ
130922003-01-04 Andreas Schwab <schwab@suse.de>
13093
13094 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13095
ef66e766
AC
130962003-01-02 Andrew Cagney <ac131313@redhat.com>
13097
13098 * Makefile.in: Remove obsolete code.
13099
a1358604
DJ
131002002-11-20 Daniel Jacobowitz <drow@mvista.com>
13101
13102 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13103 defined(PT_FPR0_HI).
13104
23ce3b1c
DJ
131052002-11-17 Stuart Hughes <seh@zee2.com>
13106
13107 * linux-arm-low.c (arm_num_regs): Increase.
13108 (arm_regmap): Include status register.
13109
131102002-11-17 Daniel Jacobowitz <drow@mvista.com>
13111
13112 * linux-low.c (register_addr): Remove incorrect -1 check.
13113
a9fa9f7d
DJ
131142002-08-29 Daniel Jacobowitz <drow@mvista.com>
13115
13116 * linux-low.c (linux_create_inferior): Call setpgid. Return
13117 the new PID.
13118 (unstopped_p, linux_signal_pid): Remove.
13119 (linux_target_ops): Remove linux_signal_pid.
13120 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13121 global instead of target method.
13122 * target.h (struct target_ops): Remove signal_pid. Update comment
13123 for create_inferior.
13124 * server.c (signal_pid): New variable.
13125 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13126 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13127 (attach_inferior): Set signal_pid.
13128
17574093
DJ
131292002-08-23 Daniel Jacobowitz <drow@mvista.com>
13130
13131 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13132
131332002-08-20 Jim Blandy <jimb@redhat.com>
13134
13135 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13136 default for this.
13137
131382002-08-01 Andrew Cagney <cagney@redhat.com>
13139
13140 * Makefile.in: Make chill references obsolete.
13141
131422002-07-24 Kevin Buettner <kevinb@redhat.com>
13143
13144 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13145 * configure: Regenerate.
13146 * config.in: Regenerate.
13147
131482002-07-09 David O'Brien <obrien@FreeBSD.org>
13149
13150 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13151 (perror_with_name, remote_close, remote_open, expect, play): Static.
13152
131532002-07-04 Michal Ludvig <mludvig@suse.cz>
13154
4b8dad4a 13155 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13156 byte offsets instead of an array of indexes.
13157 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13158
131592002-06-13 Daniel Jacobowitz <drow@mvista.com>
13160
13161 * regcache.c: Add comment.
13162
131632002-06-11 Daniel Jacobowitz <drow@mvista.com>
13164
13165 * thread-db.c: New file.
13166 * proc-service.c: New file.
13167 * acinclude.m4: New file.
13168 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13169 proc-service.o, and thread-db.o.
13170 (linux-low.o): Add USE_THREAD_DB.
13171 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13172 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13173 * aclocal.m4: Regenerated.
13174 * config.in: Regenerated.
13175 * configure: Regenerated.
13176 * configure.in: Check for proc_service.h, sys/procfs.h,
13177 thread_db.h, and linux/elf.h headrs.
13178 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13179 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13180 Check for -lthread_db and thread support.
13181 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13182 PowerPC, and SuperH.
13183 * i387-fp.c: Constify arguments.
13184 * i387-fp.h: Likewise.
13185 * inferiors.c: (struct thread_info): Renamed from
13186 `struct inferior_info'. Remove PID member. Use generic inferior
13187 list header. All uses updated.
13188 (inferiors, signal_pid): Removed.
13189 (all_threads): New variable.
13190 (get_thread): Define.
13191 (add_inferior_to_list): New function.
13192 (for_each_inferior): New function.
13193 (change_inferior_id): New function.
13194 (add_inferior): Removed.
13195 (remove_inferior): New function.
13196 (add_thread): New function.
13197 (free_one_thread): New function.
13198 (remove_thread): New function.
13199 (clear_inferiors): Use for_each_inferior and free_one_thread.
13200 (find_inferior): New function.
13201 (find_inferior_id): New function.
13202 (inferior_target_data): Update argument type.
13203 (set_inferior_target_data): Likewise.
13204 (inferior_regcache_data): Likewise.
13205 (set_inferior_regcache_data): Likewise.
13206 * linux-low.c (linux_bp_reinsert): Remove.
13207 (all_processes, stopping_threads, using_thrads)
13208 (struct pending_signals, debug_threads, pid_of): New.
13209 (inferior_pid): Replace with macro.
13210 (struct inferior_linux_data): Remove.
13211 (get_stop_pc, add_process): New functions.
13212 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13213 Use add_process and add_thread.
13214 (linux_attach_lwp): New function, based on old linux_attach. Use
13215 add_process and add_thread. Set stop_expected for new threads.
13216 (linux_attach): New function.
13217 (linux_kill_one_process): New function.
13218 (linux_kill): Kill all LWPs.
13219 (linux_thread_alive): Use find_inferior_id.
13220 (check_removed_breakpoints, status_pending_p): New functions.
13221 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13222 Update. Use WNOHANG. Wait for cloned processes also. Update process
13223 struct for the found process.
13224 (linux_wait_for_event): New function.
13225 (linux_wait): Use it. Support LWPs.
13226 (send_sigstop, wait_for_sigstop, stop_all_processes)
13227 (linux_resume_one_process, linux_continue_one_process): New functions.
13228 (linux_resume): Support LWPs.
13229 (REGISTER_RAW_SIZE): Remove.
13230 (fetch_register): Use register_size instead. Call supply_register.
13231 (usr_store_inferior_registers): Likewise. Call collect_register.
13232 Fix recursive case.
13233 (regsets_fetch_inferior_registers): Improve error message.
13234 (regsets_store_inferior_registers): Add debugging.
13235 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13236 (unstopped_p, linux_signal_pid): New functions.
13237 (linux_target_ops): Add linux_signal_pid.
13238 (linux_init_signals): New function.
13239 (initialize_low): Call it. Initialize using_threads.
13240 * regcache.c (inferior_regcache_data): Add valid
13241 flag.
13242 (get_regcache): Fetch registers lazily. Add fetch argument
13243 and update all callers.
13244 (regcache_invalidate_one, regcache_invalidate): New
13245 functions.
13246 (new_register_cache): Renamed from create_register_cache.
13247 Return the new regcache.
13248 (free_register_cache): Change argument to a void *.
13249 (registers_to_string, registers_from_string): Call get_regcache
13250 with fetch flag set.
13251 (register_data): Make static. Pass fetch flag to get_regcache.
13252 (supply_register): Call get_regcache with fetch flag clear.
13253 (collect_register): Call get_regcache with fetch flag set.
13254 (collect_register_as_string): New function.
13255 * regcache.h: Update.
13256 * remote-utils.c (putpkt): Flush after debug output and use
13257 stderr.
13258 Handle input interrupts while waiting for an ACK.
13259 (input_interrupt): Use signal_pid method.
13260 (getpkt): Flush after debug output and use stderr.
13261 (outreg): Use collect_register_as_string.
13262 (new_thread_notify, dead_thread_notify): New functions.
13263 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13264 and general_thread.
13265 (look_up_one_symbol): Flush after debug output.
13266 * server.c (step_thread, server_waiting): New variables.
13267 (start_inferior): Don't use signal_pid. Update call to mywait.
13268 (attach_inferior): Update call to mywait.
13269 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13270 (main): Don't fetch/store registers explicitly. Use
13271 set_desired_inferior. Support proposed ``Hs'' packet. Update
13272 calls to mywait.
13273 * server.h: Update.
13274 (struct inferior_list, struct_inferior_list_entry): New.
13275 * target.c (set_desired_inferior): New.
13276 (write_inferior_memory): Constify.
13277 (mywait): New function.
13278 * target.h: Update.
13279 (struct target_ops): New signal_pid method.
13280 (mywait): Removed macro, added prototype.
13281
13282 * linux-low.h (regset_func): Removed.
13283 (regset_fill_func, regset_store_func): New.
13284 (enum regset_type): New.
13285 (struct regset_info): Add type field. Use new operation types.
13286 (struct linux_target_ops): stop_pc renamed to get_pc.
13287 Add decr_pc_after_break and breakpoint_at.
13288 (get_process, get_thread_proess, get_process_thread)
13289 (strut process_info, all_processes, linux_attach_lwp)
13290 (thread_db_init): New.
13291
13292 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13293 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13294 (the_low_target): Add new members.
13295 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13296 (i386_store_fpxregset): Constify.
13297 (target_regsets): Add new kind identifier.
13298 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13299 (i386_set_pc): Add debugging.
13300 (i386_breakpoint_at): New function.
13301 (the_low_target): Add new members.
13302 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13303 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13304 (mips_breakpoint_at): New.
13305 (the_low_target): Add new members.
13306 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13307 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13308 (the_low_target): Add new members.
13309 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13310 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13311 (the_low_target): Add new members.
13312 * linux-x86-64-low.c (target_regsets): Add new kind
13313 identifier.
13314
133152002-05-15 Daniel Jacobowitz <drow@mvista.com>
13316
13317 From Martin Pool <mbp@samba.org>:
13318 * server.c (gdbserver_usage): New function.
13319 (main): Call it.
13320
133212002-05-14 Daniel Jacobowitz <drow@mvista.com>
13322
13323 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13324 stop_at -> stop_pc.
13325
133262002-05-04 Andrew Cagney <ac131313@redhat.com>
13327
13328 * Makefile.in: Remove obsolete code.
13329
133302002-04-24 Michal Ludvig <mludvig@suse.cz>
13331
13332 * linux-low.c (regsets_fetch_inferior_registers),
13333 (regsets_store_inferior_registers): Removed cast to int from
13334 ptrace() calls.
13335 * regcache.h: Added declaration of struct inferior_info.
13336
133372002-04-20 Daniel Jacobowitz <drow@mvista.com>
13338
13339 * inferiors.c (struct inferior_info): Add regcache_data.
13340 (add_inferior): Call create_register_cache.
13341 (clear_inferiors): Call free_register_cache.
13342 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13343 * regcache.c (struct inferior_regcache_data): New.
13344 (registers): Remove.
13345 (get_regcache): New function.
13346 (create_register_cache, free_register_cache): New functions.
13347 (set_register_cache): Don't initialize the register cache here.
13348 (registers_to_string, registers_from_string, register_data): Call
13349 get_regcache.
13350 * regcache.h: Add prototypes.
13351 * server.h: Likewise.
13352
133532002-04-20 Daniel Jacobowitz <drow@mvista.com>
13354
13355 * mem-break.c: New file.
13356 * mem-break.h: New file.
13357 * Makefile.in: Add mem-break.o rule; update server.h
13358 dependencies.
13359 * inferiors.c (struct inferior_info): Add target_data
13360 member.
13361 (clear_inferiors): Free target_data member if set.
13362 (inferior_target_data, set_inferior_target_data): New functions.
13363 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13364 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13365 * linux-low.c (linux_bp_reinsert): New variable.
13366 (struct inferior_linux_data): New.
13367 (linux_create_inferior): Use set_inferior_target_data.
13368 (linux_attach): Likewise. Call add_inferior.
13369 (linux_wait_for_one_inferior): New function.
13370 (linux_wait): Call it.
13371 (linux_write_memory): Add const.
13372 (initialize_low): Call set_breakpoint_data.
13373 * linux-low.h (struct linux_target_ops): Add breakpoint
13374 handling members.
13375 * server.c (attach_inferior): Remove extra add_inferior
13376 call.
13377 * server.h: Include mem-break.h. Update inferior.c
13378 prototypes.
13379 * target.c (read_inferior_memory)
13380 (write_inferior_memory): New functions.
13381 * target.h (read_inferior_memory)
13382 (write_inferior_memory): Change macros to prototypes.
13383 (struct target_ops): Update comments. Add const to write_memory
13384 definition.
13385
133862002-04-11 Daniel Jacobowitz <drow@mvista.com>
13387
13388 * linux-low.c (usr_store_inferior_registers): Support
13389 registers which are allowed to fail to store.
13390 * linux-low.h (linux_target_ops): Likewise.
13391 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13392 (ppc_cannot_store_register): FPSCR may not be storable.
13393
133942002-04-09 Daniel Jacobowitz <drow@mvista.com>
13395
13396 * server.h: Include <string.h> if HAVE_STRING_H.
13397 * ChangeLog: Correct paths in last ChangeLog entry.
13398
133992002-04-09 Daniel Jacobowitz <drow@mvista.com>
13400
13401 * linux-low.h: Remove obsolete prototypes.
13402 (struct linux_target_ops): New.
13403 (extern the_low_target): New.
13404 * linux-low.c (num_regs, regmap): Remove declarations.
13405 (register_addr): Use the_low_target explicitly.
13406 (fetch_register): Likewise.
13407 (usr_fetch_inferior_registers): Likewise.
13408 (usr_store_inferior_registers): Likewise.
13409 * linux-arm-low.c (num_regs): Remove.
13410 (arm_num_regs): Define.
13411 (arm_regmap): Renamed from regmap, made static.
13412 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13413 made static.
13414 (arm_cannot_store_register): Renamed from cannot_store_register,
13415 made static.
13416 (the_low_target): New.
13417 * linux-i386-low.c (num_regs): Remove.
13418 (i386_num_regs): Define.
13419 (i386_regmap): Renamed from regmap, made static.
13420 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13421 made static.
13422 (i386_cannot_store_register): Renamed from cannot_store_register,
13423 made static.
13424 (the_low_target): New.
13425 * linux-ia64-low.c (num_regs): Remove.
13426 (ia64_num_regs): Define.
13427 (ia64_regmap): Renamed from regmap, made static.
13428 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13429 made static.
13430 (ia64_cannot_store_register): Renamed from cannot_store_register,
13431 made static.
13432 (the_low_target): New.
13433 * linux-m68k-low.c (num_regs): Remove.
13434 (m68k_num_regs): Define.
13435 (m68k_regmap): Renamed from regmap, made static.
13436 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13437 made static.
13438 (m68k_cannot_store_register): Renamed from cannot_store_register,
13439 made static.
13440 (the_low_target): New.
13441 * linux-mips-low.c (num_regs): Remove.
13442 (mips_num_regs): Define.
13443 (mips_regmap): Renamed from regmap, made static.
13444 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13445 made static.
13446 (mips_cannot_store_register): Renamed from cannot_store_register,
13447 made static.
13448 (the_low_target): New.
13449 * linux-ppc-low.c (num_regs): Remove.
13450 (ppc_num_regs): Define.
13451 (ppc_regmap): Renamed from regmap, made static.
13452 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13453 made static.
13454 (ppc_cannot_store_register): Renamed from cannot_store_register,
13455 made static.
13456 (the_low_target): New.
13457 * linux-s390-low.c (num_regs): Remove.
13458 (s390_num_regs): Define.
13459 (s390_regmap): Renamed from regmap, made static.
13460 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13461 made static.
13462 (s390_cannot_store_register): Renamed from cannot_store_register,
13463 made static.
13464 (the_low_target): New.
13465 * linux-sh-low.c (num_regs): Remove.
13466 (sh_num_regs): Define.
13467 (sh_regmap): Renamed from regmap, made static.
13468 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13469 made static.
13470 (sh_cannot_store_register): Renamed from cannot_store_register,
13471 made static.
13472 (the_low_target): New.
13473 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13474 (the_low_target): New.
13475
134762002-04-09 Daniel Jacobowitz <drow@mvista.com>
13477
13478 * Makefile.in: Add stamp-h target.
13479 * configure.in: Create stamp-h.
13480 * configure: Regenerated.
13481
134822002-04-09 Daniel Jacobowitz <drow@mvista.com>
13483
13484 * inferiors.c: New file.
13485 * target.c: New file.
13486 * target.h: New file.
13487 * Makefile.in: Add target.o and inferiors.o. Update
13488 dependencies.
13489 * linux-low.c (inferior_pid): New static variable,
13490 moved from server.c.
13491 (linux_create_inferior): Renamed from create_inferior.
13492 Call add_inferior. Return 0 on success instead of a PID.
13493 (linux_attach): Renamed from myattach.
13494 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13495 (linux_thread_alive): Renamed from mythread_alive.
13496 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13497 child dies.
13498 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13499 (regsets_store_inferior_registers): Correct error message.
13500 Add missing ``return 0''.
13501 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13502 (linux_store_registers): Renamed from store_inferior_registers.
13503 (linux_read_memory): Renamed from read_inferior_memory.
13504 (linux_write_memory): Renamed from write_inferior_memory.
13505 (linux_target_ops): New structure.
13506 (initialize_low): Call set_target_ops ().
13507 * remote-utils.c (unhexify): New function.
13508 (hexify): New function.
13509 (input_interrupt): Send signals to ``signal_pid''.
13510 * server.c (inferior_pid): Remove.
13511 (start_inferior): Update create_inferior call.
13512 (attach_inferior): Call add_inferior.
13513 (handle_query): New function.
13514 (main): Call handle_query for `q' packets.
13515 * server.h: Include "target.h". Remove obsolete prototypes.
13516 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13517
135182002-04-09 Daniel Jacobowitz <drow@mvista.com>
13519
13520 * Makefile.in: Add WARN_CFLAGS. Update configury
13521 dependencies.
13522 * configure.in: Check for <string.h>
13523 * configure: Regenerate.
13524 * config.in: Regenerate.
13525 * gdbreplay.c: Include needed system headers.
13526 (remote_open): Remove strchr prototype.
13527 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13528 * regcache.c (supply_register): Change buf argument to const void *.
13529 (supply_register_by_name): Likewise.
13530 (collect_register): Change buf argument to void *.
13531 (collect_register_by_name): Likewise.
13532 * regcache.h: Add missing prototypes.
13533 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13534 * server.c (handle_query): New function.
13535 (attached): New static variable, moved out of main.
13536 (main): Quiet longjmp clobber warnings.
13537 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13538 * utils.c (error): Remove NORETURN.
13539 (fatal): Likewise.