gdbserver/s390: Enable high GPRs, VX, TDB with 31-bit gdbserver.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
ab503087
MK
12016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2
3 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4 (s390_regmap_3264) [!__s390x__]: New global.
5 (s390_collect_ptrace_register): Skip map entries containing -1.
6 (s390_supply_ptrace_register): Ditto.
7 (s390_fill_gprs_high): New function.
8 (s390_store_gprs_high): New function.
9 (s390_regsets): Add NT_S390_HIGH_GPRS.
10 (s390_get_hwcap): Enable on 31-bit.
11 (have_hwcap_s390_high_gprs): Enable on 31-bit.
12 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
13 Detect NT_S390_HIGH_GPRS.
14 (s390_usrregs_info_3264): Enable on 31-bit.
15 (s390_regs_info): Enable regs_info_3264 on 31-bit.
16 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
17
ae91f625
MK
182016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
19
20 PR gdb/13808
21 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
22 * configure.srv: Ditto.
23 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
24 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
25 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
26 (init_registers_amd64_linux): Remove prototype.
27 (tdesc_amd64_linux): Remove declaration.
28 (get_ipa_tdesc): New function.
29 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
30 initialize remaining tdescs.
31 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
32 (init_registers_i386_linux): Remove prototype.
33 (tdesc_i386_linux): Remove declaration.
34 (get_ipa_tdesc): New function.
35 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
36 initialize remaining tdescs.
37 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
38 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
39 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
40 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
41 (x86_get_ipa_tdesc_idx): New function.
42 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
43 * linux-x86-tdesc.h: New file.
44 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
45 (target_get_ipa_tdesc_idx): New macro.
46 * tracepoint.c (ipa_tdesc_idx): New macro.
47 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
48 (symbol_list): Add ipa_tdesc_idx.
49 (cmd_qtstart): Write ipa_tdesc_idx in the target.
50 (ipa_tdesc): Remove.
51 (ipa_tdesc_idx): New variable.
52 (get_context_regcache): Use get_ipa_tdesc.
53 (gdb_collect): Ditto.
54 (gdb_probe): Ditto.
55 * tracepoint.h (get_ipa_tdesc): New prototype.
56 (ipa_tdesc): Remove.
57
e7ad2f14
PA
582016-02-24 Pedro Alves <palves@redhat.com>
59
60 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
61 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
62 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
63 Factor out common code between the USE_SIGTRAP_SIGINFO and
64 !USE_SIGTRAP_SIGINFO blocks.
65 (linux_low_filter_event): Call save_stop_reason instead of
66 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
67 Update comments.
68 (linux_wait_1): Update comments.
69
657f9cde
WW
702016-02-24 Wei-cheng Wang <cole945@gmail.com>
71
72 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
73 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
74 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
75 ppc_insert_point, ppc_remove_point.
76
b00b61e1
MK
772016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
78
79 * linux-s390-low.c (s390_supports_z_point_type): New function.
80 (struct linux_target_ops): Wire s390_supports_z_point_type in.
81
553cb527
YQ
822016-02-16 Yao Qi <yao.qi@linaro.org>
83
84 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
85 PC. Get pc from regcache_read_pc.
86
a5652c21
YQ
872016-02-12 Yao Qi <yao.qi@linaro.org>
88
89 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
90 or linux_get_pc_32bit.
91 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
92
ed443b61
YQ
932016-02-12 Yao Qi <yao.qi@linaro.org>
94
95 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
96 arm_linux_get_next_pcs_fixup.
97
020ecd38
MK
982016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
99
100 * tracepoint.c (x_tracepoint_action_download): Change
101 write_inferior_data_ptr to write_inferior_data_pointer.
102 (cmd_qtstart): Likewise.
103 (write_inferior_data_ptr): Remove.
104 (download_agent_expr): Change write_inferior_data_ptr to
105 write_inferior_data_pointer.
106 (download_tracepoint_1): Likewise.
107 (download_tracepoint): Likewise.
108 (download_trace_state_variables): Likewise.
109
7cae9051
WW
1102016-02-11 Wei-cheng Wang <cole945@gmail.com>
111 Marcin Kościelnicki <koriakin@0x04.net>
112
113 * tracepoint.c (struct tracepoint_action_ops): Remove.
114 (struct tracepoint_action): Remove ops.
115 (m_tracepoint_action_download, r_tracepoint_action_download)
116 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
117 size and offset accordingly.
118 (m_tracepoint_action_ops, r_tracepoint_action_ops)
119 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
120 (tracepoint_action_send, tracepoint_action_download): New functions.
121 Helpers for trace action handlers.
122 (add_tracepoint_action): Remove setup actions ops.
123 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
124
9f6a71b4
YQ
1252016-02-10 Yao Qi <yao.qi@linaro.org>
126
127 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
128
1e94266c
SM
1292016-02-09 Simon Marchi <simon.marchi@ericsson.com>
130
131 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
132 to AC_OUTPUT.
133 * configure: Regenerate.
134
8adce034
SM
1352016-02-09 Simon Marchi <simon.marchi@ericsson.com>
136
137 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
138 void * to gdb_byte *.
139 * linux-low.c (siginfo_fixup): Likewise.
140 (linux_xfer_siginfo): Likewise.
141 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
142 Likewise.
143 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
144
93813b37
WT
1452016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
146
147 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
148 to srv_tgtobj.
149 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
150 to srv_tgtobj.
151 * linux-x86-low.c [__x86_64__]: Include
152 "nat/amd64-linux-siginfo.h".
153 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
154 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
155 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
156 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
157 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
158 (cpt_si_fd, si_timerid, si_overrun): Move from
159 nat/amd64-linux-siginfo.c.
160 * Makefile.in (amd64-linux-siginfo.o:): New rule.
161
8424cc97
SM
1622016-01-28 Simon Marchi <simon.marchi@ericsson.com>
163
164 * server.c (skip_to_semicolon): Remove.
165 (process_point_options): Use strchrnul instead of
166 skip_to_semicolon.
167
4d18591b
YQ
1682016-01-26 Yao Qi <yao.qi@linaro.org>
169
170 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
171 * linux-low.c (install_software_single_step_breakpoints): Don't
172 call regcache_read_pc.
173 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
174 argument pc.
175
d8020970
YQ
1762016-01-26 Yao Qi <yao.qi@linaro.org>
177
178 * linux-low.c (install_software_single_step_breakpoints): Call
179 regcache_read_pc instead of get_pc.
180
8b207339
YQ
1812016-01-26 Yao Qi <yao.qi@linaro.org>
182
183 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
184 (unblock_async_io): Rename to ...
185 (block_unblock_async_io): ... it. New function.
186 (enable_async_io): Don't install SIGIO handler. Unblock it
187 instead.
188 (disable_async_io): Don't ignore SIGIO. Block it instead.
189 (initialize_async_io): Install SIGIO handler. Don't call
190 unblock_async_io.
191
18879fef
YQ
1922016-01-26 Yao Qi <yao.qi@linaro.org>
193
194 * remote-utils.c (getpkt): If the buffer isn't empty, and the
195 first character is '\003', call *the_target->request_interrupt.
196
a0f8e08a
YQ
1972016-01-25 Yao Qi <yao.qi@linaro.org>
198
199 * remote-utils.c (new_thread_notify): Remove.
200 (dead_thread_notify): Likewise.
201 * remote-utils.h (new_thread_notify): Remove declaration.
202 (dead_thread_notify): Likewise.
203
cc5fd9ab
MK
2042016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
205
206 * gdb.trace/pending.exp: Fix expected message on continue.
207
99e8eb11
MK
2082016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
209
210 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
211 it works properly on big-endian machines where sizeof (CORE_ADDR)
212 != sizeof (void *).
213
a994041d
PA
2142016-01-21 Pedro Alves <palves@redhat.com>
215
216 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
217 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
218 * configure: Regenerate.
219
f7a6a40d
YQ
2202016-01-21 Yao Qi <yao.qi@linaro.org>
221
222 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
223 is_thumb and set it according to CPSR saved on the stack.
224 (get_next_pcs_syscall_next_pc): Pass is_thumb to
225 arm_sigreturn_next_pc.
226
6f69e520
YQ
2272016-01-18 Yao Qi <yao.qi@linaro.org>
228
229 * linux-low.c (linux_set_pc_64bit): New function.
230 (linux_get_pc_64bit): New function.
231 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
232 Declare.
233 * linux-sparc-low.c (debug_threads): Remove declaration.
234 (sparc_get_pc): Remove.
235 (the_low_target): Use linux_get_pc_64bit instead of
236 sparc_get_pc.
237 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
238 (the_low_target): Use linux_get_pc_64bit and
239 linux_set_pc_64bit.
240
276d4552
YQ
2412016-01-18 Yao Qi <yao.qi@linaro.org>
242
243 * linux-arm-low.c (debug_threads): Remove declaration.
244 (arm_get_pc, arm_set_pc): Remove.
245 (the_low_target): Use linux_get_pc_32bit and
246 linux_set_pc_32bit.
247 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
248 (the_low_target): Use linux_get_pc_32bit and
249 linux_set_pc_32bit.
250 * linux-cris-low.c (debug_threads): Remove declaration.
251 (cris_get_pc, cris_set_pc,): Remove.
252 (the_low_target): Use linux_get_pc_32bit and
253 linux_set_pc_32bit.
254 * linux-crisv32-low.c (debug_threads): Remove declaration.
255 (cris_get_pc, cris_set_pc): Remove.
256 (the_low_target): Use linux_get_pc_32bit and
257 linux_set_pc_32bit.
258 * linux-low.c: Include inttypes.h.
259 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
260 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
261 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
262 (the_low_target): Use linux_get_pc_32bit and
263 linux_set_pc_32bit.
264 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
265 (the_low_target): Use linux_get_pc_32bit and
266 linux_set_pc_32bit.
267 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
268 (the_low_target): Use linux_get_pc_32bit and
269 linux_set_pc_32bit.
270 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
271 (the_low_target): Use linux_get_pc_32bit and
272 linux_set_pc_32bit.
273 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
274 (the_low_target): Use linux_get_pc_32bit and
275 linux_set_pc_32bit.
276
eb0edac8
GB
2772016-01-18 Gary Benson <gbenson@redhat.com>
278
279 * configure.ac (AC_FUNC_FORK): New check.
280 * config.in: Regenerate.
281 * configure: Likewise.
282
1b451dda
YQ
2832016-01-14 Yao Qi <yao.qi@linaro.org>
284
285 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
286 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
287 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
288 arm_get_next_pcs_ctor.
289
82075af2
JS
2902016-01-12 Josh Stone <jistone@redhat.com>
291 Philippe Waroquiers <philippe.waroquiers@skynet.be>
292
293 * inferiors.h: Include "gdb_vecs.h".
294 (struct process_info): Add syscalls_to_catch.
295 * inferiors.c (remove_process): Free syscalls_to_catch.
296 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
297 syscall_return stops.
298 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
299 * server.c (handle_general_set): Handle QCatchSyscalls.
300 (handle_query): Report support for QCatchSyscalls.
301 * target.h (struct target_ops): Add supports_catch_syscall.
302 (target_supports_catch_syscall): New macro.
303 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
304 (struct lwp_info): Add syscall_state.
305 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
306 Maintain syscall_state and syscalls_to_catch across exec.
307 (get_syscall_trapinfo): New function, proxy to the_low_target.
308 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
309 (linux_low_filter_event): Toggle syscall_state entry/return for
310 syscall traps, and set it ignored for all others.
311 (gdb_catching_syscalls_p): New function.
312 (gdb_catch_this_syscall_p): New function.
313 (linux_wait_1): Handle SYSCALL_SIGTRAP.
314 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
315 (linux_supports_catch_syscall): New function.
316 (linux_target_ops): Install it.
317 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
318 (the_low_target): Install it.
319
8f13a3ce
MF
3202016-01-12 Mike Frysinger <vapier@gentoo.org>
321
322 * acinclude.m4: Include new ../warning.m4 file.
323 * configure: Regenerated.
324 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
325
5b3da067
MF
3262016-01-12 Mike Frysinger <vapier@gentoo.org>
327
328 * ax.c (is_goto_target): Mark static.
329 * linux-low.c (register_addr): Likewise.
330 (linux_fetch_registers, linux_store_registers): Likewise.
331 * mem-break.c (any_persistent_commands): Fix old prototype.
332 (add_commands_to_breakpoint): Mark static.
333 * regcache.c (find_register_by_name): Delete unused func.
334 * remote-utils.c (hex_or_minus_one): Mark static.
335 * server.c (monitor_show_help): Mark static.
336 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
337 handle_v_requests): Likewise.
338
bc504a31
PA
3392016-01-12 Pedro Alves <palves@redhat.com>
340
341 Remove use of the registered trademark symbol throughout.
342
5a0dd67a
YQ
3432016-01-08 Yao Qi <yao.qi@linaro.org>
344
345 * remote-utils.c (getpkt): If c is '\003', call target hook
346 request_interrupt.
347
b2ca446f
YQ
3482016-01-06 Yao Qi <yao.qi@linaro.org>
349
350 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
351 linux-aarch32-low.c.
352 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
353 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
354 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
355 (thumb2_breakpoint): Declare.
356 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
357 linux-aarch32-low.h.
358 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
359 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
360 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
361
edd88788
JB
3622016-01-01 Joel Brobecker <brobecker@adacore.com>
363
364 * gdbreplay.c (gdbreplay_version): Change copyright year in
365 version message.
366 * server.c (gdbserver_version): Likewise.
367
65da7f14
PP
3682015-12-28 Patrick Palka <patrick@parcs.ath.cx>
369
370 * server.c (crc32_table): Delete.
371 (crc32): Use libiberty's xcrc32 function.
372
4abd5ed2
JB
3732015-12-22 Joel Brobecker <brobecker@adacore.com>
374
375 * lynx-low.c (lynx_delete_thread_callback): New function.
376 (lynx_mourn): Properly delete our process and all of its
377 threads. Remove call to clear_inferiors.
378
0e50fe5c
JB
3792015-12-22 Joel Brobecker <brobecker@adacore.com>
380
381 * target.c (thread_search_callback): Add check that
382 the thread_stopped target callback is not NULL before
383 calling it.
384
35adc03f
YQ
3852015-12-21 Yao Qi <yao.qi@linaro.org>
386
387 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
388 arm breakpoint.
389
bd2b2909
AT
3902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
391
392 * server.c (handle_query): Call target_supports_software_single_step.
393
7fe5e27e
AT
3942015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
395
396 * linux-low.c (single_step): New function.
397 (linux_resume_one_lwp_throw): Call single_step.
398 (start_step_over): Likewise.
399
d9311bfa
AT
4002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
401
402 * Makefile.in (SFILES): Append arch/arm-linux.c,
403 arch/arm-get-next-pcs.c.
404 (arm-linux.o): New rule.
405 (arm-get-next-pcs.o): New rule.
406 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
407 arm-linux.o.
408 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
409 to linux-aarch32-low.c.
410 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
411 (arm_breakpoint_len, thumb_breakpoint): Likewise.
412 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
413 (thumb2_breakpoint_len): Likewise.
414 (arm_is_thumb_mode): Make non-static.
415 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
416 from linux-aarch32-low.c.
417 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
418 (arm_breakpoint_len, thumb_breakpoint): Likewise.
419 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
420 (thumb2_breakpoint_len): Likewise.
421 (arm_is_thumb_mode): New declaration.
422 * linux-arm-low.c: Include arch/arm-linux.h
423 aarch/arm-get-next-pcs.h, sys/syscall.h.
424 (get_next_pcs_ops): New struct.
425 (get_next_pcs_addr_bits_remove): New function.
426 (get_next_pcs_is_thumb): New function.
427 (get_next_pcs_read_memory_unsigned_integer): Likewise.
428 (arm_sigreturn_next_pc): Likewise.
429 (get_next_pcs_syscall_next_pc): Likewise.
430 (arm_gdbserver_get_next_pcs): Likewise.
431 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
432 Initialize.
433 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
434 * server.h: Include gdb_vecs.h.
435
68ce2059
AT
4362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
437
438 * Makefile.in (SFILES): Append common/common-regcache.c.
439 (OBS): Append common-regcache.o.
440 (common-regcache.o): New rule.
441 * regcache.c (init_register_cache): Initialize cache to
442 REG_UNAVAILABLE.
443 (regcache_raw_read_unsigned): New function.
444 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
445 register_status enum.
446
fa5308bd
AT
4472015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
448
449 * linux-aarch64-low.c (the_low_targets): Rename
450 breakpoint_reinsert_addr to get_next_pcs.
451 * linux-arm-low.c (the_low_targets): Likewise.
452 * linux-bfin-low.c (the_low_targets): Likewise.
453 * linux-cris-low.c (the_low_targets): Likewise.
454 * linux-crisv32-low.c (the_low_targets): Likewise.
455 * linux-low.c (can_software_single_step): Likewise.
456 (install_software_single_step_breakpoints): New function.
457 (start_step_over): Use install_software_single_step_breakpoints.
458 * linux-low.h: New CORE_ADDR vector.
459 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
460 get_next_pcs.
461 * linux-mips-low.c (the_low_targets): Likewise.
462 * linux-nios2-low.c (the_low_targets): Likewise.
463 * linux-sparc-low.c (the_low_targets): Likewise.
464
4a6ed09b
PA
4652015-12-17 Pedro Alves <palves@redhat.com>
466
467 * linux-low.c (linux_kill_one_lwp): Remove references to
468 LinuxThreads.
469 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
470 to 'kill'.
471 (linux_init_signals): Delete.
472 (initialize_low): Adjust.
473 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
474
7544db95
PA
4752015-12-16 Pedro Alves <palves@redhat.com>
476
477 * configure.ac (compiler warning flags): When testing a
478 -Wno-foo option, check whether -Wfoo works instead.
479 * configure: Regenerate.
480
8020350c
DB
4812015-12-11 Don Breazeal <donb@codesourcery.com>
482
483 * server.c (process_serial_event): Don't exit from gdbserver
484 in remote mode if there are still active inferiors.
485
db91f502
YQ
4862015-12-11 Yao Qi <yao.qi@linaro.org>
487
488 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
489 arm_breakpoint_at if the process is 32-bit.
490
b37a6290
YQ
4912015-12-11 Yao Qi <yao.qi@linaro.org>
492
493 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
494 arm breakpoint.
495
17b1509a
YQ
4962015-12-07 Yao Qi <yao.qi@linaro.org>
497
498 * configure.srv: Append arm.o to srv_tgtobj for
499 aarch64*-*-linux* target.
500 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
501 from linux-arm-low.c.
502 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
503 (arm_breakpoint_len, thumb_breakpoint): Likewise.
504 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
505 (thumb2_breakpoint_len): Likewise.
506 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
507 (arm_breakpoint_kinds): Likewise.
508 (arm_breakpoint_kind_from_pc): Likewise.
509 (arm_sw_breakpoint_from_kind): Likewise.
510 (arm_breakpoint_kind_from_current_state): Likewise.
511 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
512 (arm_sw_breakpoint_from_kind): Declare.
513 (arm_breakpoint_kind_from_current_state): Declare.
514 (arm_breakpoint_at): Declare.
515 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
516 arm_sw_breakpoint_from_kind if process is 32-bit.
517 (aarch64_breakpoint_kind_from_pc): New function.
518 (aarch64_breakpoint_kind_from_current_state): New function.
519 (the_low_target): Initialize fields breakpoint_kind_from_pc
520 and breakpoint_kind_from_current_state.
521 * linux-arm-low.c (arm_breakpoint_kinds): Move to
522 linux-aarch32-low.c.
523 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
524 (arm_breakpoint, arm_breakpoint_len): Likewise.
525 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
526 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
527 (arm_is_thumb_mode): Likewise.
528 (arm_breakpoint_at): Likewise.
529 (arm_breakpoint_kind_from_pc): Likewise.
530 (arm_sw_breakpoint_from_kind): Likewise.
531 (arm_breakpoint_kind_from_current_state): Likewise.
532
533 Revert:
534 2015-08-04 Yao Qi <yao.qi@linaro.org>
535
536 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
537 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
538 * server.c (extended_protocol): Remove "static".
539 * server.h (extended_protocol): Declare it.
540
ece66d65
JS
5412015-12-04 Josh Stone <jistone@redhat.com>
542
543 * target.h (struct target_ops) <arch_setup>: Rename to ...
544 (struct target_ops) <post_create_inferior>: ... this.
545 (target_arch_setup): Rename to ...
546 (target_post_create_inferior): ... this, calling post_create_inferior.
547 * server.c (start_inferior): Update target_arch_setup calls to
548 target_post_create_inferior.
549 * linux-low.c (linux_low_ptrace_options): Forward declare.
550 (linux_arch_setup): Update its comment for general use.
551 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
552 (struct linux_target_ops): Use linux_post_create_inferior.
553 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
554 to post_create_inferior.
555 * nto-low.c (struct nto_target_ops): Likewise.
556 * spu-low.c (struct spu_target_ops): Likewise.
557 * win32-low.c (struct win32_target_ops): Likewise.
558
e58c48b4
AT
5592015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
560
561 * linux-arm-low.c: Remove duplicate arch/arm.h include.
562
fbec8956
AT
5632015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
564
565 * linux-arm-low.c (arm_reinsert_addr): Remove function.
566 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
567 * linux-cris-low.c (cris_reinsert_addr> Remove function.
568 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
569 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
570 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
571 * linux-mips-low.c (mips_reinsert_addr): Remove function.
572 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
573 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
574 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
575 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
576 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
577
9b4c5f87
AT
5782015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
579
580 * linux-low.c (linux_look_up_symbols): Don't call
581 linux_supports_traceclone.
582 * linux-low.h (thread_db_init): Remove use_events argument.
583 * thread-db.c (thread_db_use_event): Remove global variable.
584 (struct thread_db) <td_thr_event_enable_p>: Remove field.
585 (struct thread_db) <td_create_bp>: Remove field.
586 (thread_db_create_event): Remove function.
587 (thread_db_enable_reporting): Likewise.
588 (find_one_thread): Don't check for thread_db_use_events.
589 (attach_thread): Likewise.
590 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
591 (try_thread_db_load_1): Don't check for thread_db_use_events.
592 (thread_db_init): Remove use_events argument and thread events
593 handling.
594 (remove_thread_event_breakpoints): Remove function.
595 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
596
7d00775e
AT
5972015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
598
599 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
600 New function.
601 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
602 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
603 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
604 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
605 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
606 Initialize.
607 * linux-crisv32-low.c (cris_supports_hardware_single_step):
608 New function.
609 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
610 * linux-low.c (can_hardware_single_step): Use
611 supports_hardware_single_step.
612 (can_software_single_step): New function.
613 (start_step_over): Call can_software_single_step.
614 (linux_supports_hardware_single_step): New function.
615 (struct target_ops) <supports_software_single_step>: Initialize.
616 * linux-low.h (struct linux_target_ops)
617 <supports_hardware_single_step>: Initialize.
618 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
619 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
620 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
621 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
622 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
623 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
624 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
625 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
626 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
627 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
628 Initialize.
629 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
630 (struct linux_target_ops) <tile_supports_hardware_single_step>:
631 Initialize.
632 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
633 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
634 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
635 New function.
636 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
637 * target.h (struct target_ops): <supports_software_single_step>:
638 New field.
639 (target_supports_software_single_step): New macro.
640
2d97cd35
AT
6412015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
642
643 * linux-low.c (linux_wait_1): Fix pc advance condition.
644 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
645 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
646
769ef81f
AT
6472015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
648
649 * linux-arm-low.c (arm_is_thumb_mode): New function.
650 (arm_breakpoint_at): Use arm_is_thumb_mode.
651 (arm_breakpoint_kind_from_current_state): New function.
652 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
653 Initialize.
654 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
655 (linux_breakpoint_kind_from_current_state): New function.
656 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
657 * linux-low.h (struct linux_target_ops)
658 <breakpoint_kind_from_current_state>: New field.
659 * target.h (struct target_ops): Likewise.
660 (target_breakpoint_kind_from_current_state): New macro.
661
1bebeeca
PA
6622015-11-30 Pedro Alves <palves@redhat.com>
663
664 * linux-low.c (linux_resume): Wake up the event loop before
665 returning.
666
a67a9fae
PA
6672015-11-30 Pedro Alves <palves@redhat.com>
668
669 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
670 check.
671 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
672 to -1.
673 * target.c (struct thread_search): New structure.
674 (thread_search_callback): New function.
675 (prev_general_thread): New global.
676 (prepare_to_access_memory, done_accessing_memory): New functions.
677 * target.h (prepare_to_access_memory, done_accessing_memory):
678 Replace macros with function declarations.
679
f2faf941
PA
6802015-11-30 Pedro Alves <palves@redhat.com>
681
682 PR 14618
683 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
684 report TARGET_WAITKIND_NO_RESUMED.
685 * remote-utils.c (prepare_resume_reply): Handle
686 TARGET_WAITKIND_NO_RESUMED.
687 * server.c (report_no_resumed): New global.
688 (handle_query) <qSupported>: Handle "no-resumed+". Report
689 "no-resumed+" support.
690 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
691 return error if the client doesn't support no-resumed events.
692 (push_stop_notification): New function.
693 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
694 events if the client supports them.
695
a681f9c9
PA
6962015-11-30 Pedro Alves <palves@redhat.com>
697
698 * linux-low.c (thread_still_has_status_pending_p): Don't check
699 vCont;t here.
700 (lwp_resumed): New function.
701 (status_pending_p_callback): Return early if the LWP is not
702 supposed to be resumed.
703
65706a29
PA
7042015-11-30 Pedro Alves <palves@redhat.com>
705
706 * linux-low.c (handle_extended_wait): Assert that the LWP's
707 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
708 thread create events, leave the new child's status pending.
709 (linux_low_filter_event): If GDB wants to hear about thread exit
710 events, leave the LWP marked dead and don't delete it.
711 (linux_wait_for_event_filtered): Don't check for thread exit.
712 (filter_exit_event): New function.
713 (linux_wait_1): Use it, when returning an exit event.
714 (linux_resume_one_lwp_throw): Assert that the LWP's
715 waitstatus is TARGET_WAITKIND_IGNORE.
716 * remote-utils.c (prepare_resume_reply): Handle
717 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
718 * server.c (report_thread_events): New global.
719 (handle_general_set): Handle QThreadEvents.
720 (handle_query) <qSupported>: Handle and report QThreadEvents+;
721 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
722 TARGET_WAITKIND_THREAD_EXITED.
723 * server.h (report_thread_events): Declare.
724
56cf4bed
PA
7252015-11-30 Pedro Alves <palves@redhat.com>
726
727 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
728 the thread's last_resume_kind was resume_stop.
729
500c1d85
PA
7302015-11-30 Pedro Alves <palves@redhat.com>
731
732 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
733 before returning.
734
de979965
PA
7352015-11-30 Pedro Alves <palves@redhat.com>
736
737 * server.c (handle_v_requests): Handle vCtrlC.
738
34c65914
PA
7392015-11-30 Pedro Alves <palves@redhat.com>
740
741 * gdbthread.h (find_any_thread_of_pid): Declare.
742 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
743 functions.
744 * server.c (handle_query): If current_thread is NULL, look for
745 another thread of the selected process.
746
79efa585 7472015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 748 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
749
750 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
751 * server.c (handle_qxfer_threads_worker): Refactor to include thread
752 name in reply.
753 * target.h (struct target_ops) <thread_name>: New field.
754 (target_thread_name): New macro.
755
80d82c19
JB
7562015-11-23 Joel Brobecker <brobecker@adacore.com>
757
758 * regcache.h (regcache_invalidate_pid): Add declaration.
759 * regcache.c (regcache_invalidate_pid): New function, extracted
760 from regcache_invalidate.
761 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
762 Add trivial documentation comment.
763 * lynx-low.c: Use regcache_invalidate_pid instead of
764 regcache_invalidate.
765
64da5dd5
JB
7662015-11-23 Joel Brobecker <brobecker@adacore.com>
767
768 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
769 and Elf64_auxv_t if the target is Android.
770
37ce4055
DE
7712015-11-22 Doug Evans <xdje42@gmail.com>
772
773 * target.h: #include <sys/types.h>.
774
06e03fff
PA
7752015-11-19 Pedro Alves <palves@redhat.com>
776
777 * linux-low.c (linux_process_qsupported): Change prototype.
778 Adjust.
779 * linux-low.h (struct linux_target_ops) <process_qsupported>:
780 Change prototype.
781 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
782 and adjust to loop over all features.
783 * server.c (handle_query) <qSupported>: Adjust to call
784 target_process_qsupported once, passing it a vector of unprocessed
785 features.
786 * target.h (struct target_ops) <process_qsupported>: Change
787 prototype.
788 (target_process_qsupported): Adjust.
789
9a084706
PA
7902015-11-19 Pedro Alves <palves@redhat.com>
791
792 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
793 mode.
794 * configure: Regenerate.
795
dad44a1f
PA
7962015-11-19 Pedro Alves <palves@redhat.com>
797
798 * configure: Regenerate.
799
231c0592
YQ
8002015-11-19 Yao Qi <yao.qi@linaro.org>
801
802 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
803 type to uint32_t.
804
6c1c9a8b
YQ
8052015-11-19 Yao Qi <yao.qi@linaro.org>
806
807 * linux-aarch64-low.c (enum aarch64_operand_type): New.
808 (struct aarch64_operand): Move enum out.
809
9caa3311
YQ
8102015-11-19 Yao Qi <yao.qi@linaro.org>
811
812 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
813 struct user_fpsimd_state *.
814 (aarch64_store_fpregset): Likewise.
815
6a69a054
YQ
8162015-11-19 Yao Qi <yao.qi@linaro.org>
817
818 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
819 struct user_pt_regs *.
820 (aarch64_store_gregset): Likewise.
821
1798301e
PA
8222015-11-18 Pedro Alves <palves@redhat.com>
823
824 * Makefile.in (all_object_files): Add $IPA_OBJS.
825
ce7715e2
PA
8262015-11-17 Pedro Alves <palves@redhat.com>
827
828 * win32-low.c (win32_resume): Use gdb_signal_from_host,
829 GDB_SIGNAL_0 and gdb_signal_to_string.
830
c0879059
PA
8312015-11-17 Pedro Alves <palves@redhat.com>
832
833 * win32-low.c (handle_output_debug_string): Remove parameter.
834 (win32_kill): Remove our_status local and adjust call to
835 handle_output_debug_string.
836 (get_child_debug_event): Adjust call to
837 handle_output_debug_string.
838
1996e237
SM
8392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
840
841 * linux-mips-low.c (mips_fill_gregset): Add cast.
842 (mips_store_gregset): Likewise.
843 (mips_fill_fpregset): Likewise.
844 (mips_store_fpregset): Likewise.
845
cbec665b
SM
8462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
847
848 * linux-mips-low.c (mips_add_watchpoint): Rename private to
849 priv.
850
eb3e3c67
SM
8512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
852
853 * linux-mips-low.c (mips_linux_new_thread): Change type of
854 watch_type to enum target_hw_bp_type.
855
171de4b8
SM
8562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
857
858 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
859 Change return type to arm_hwbp_type.
860
04248ead
SM
8612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
862
863 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
864 (arm_store_gregset): Likewise.
865 * linux-arm-low.c (arm_get_hwcap): Likewise.
866 (arm_read_description): Likewise.
867
04b3479c
SM
8682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
869
870 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
871
2bc84e8a
SM
8722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
873
874 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
875 (ppc_fill_vsxregset): Likewise.
876 (ppc_store_vsxregset): Likewise.
877 (ppc_fill_vrregset): Likewise.
878 (ppc_store_vrregset): Likewise.
879 (ppc_fill_evrregset): Likewise.
880 (ppc_store_evrregset): Likewise.
881
e6c5bb05
SM
8822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
883
884 * linux-ppc-low.c (ppc_usrregs_info): Remove
885 forward-declaration.
886 (ppc_arch_setup): Move lower in file.
887
7ea45d72
SM
8882015-10-30 Simon Marchi <simon.marchi@ericsson.com>
889
890 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
891 (ps_pdwrite): Likewise.
892
69291610
HW
8932015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
894
895 * linux-arm-low.c (arm_new_thread): Move pointer dereference
896 to after assert checks.
897
b42945fd
SM
8982015-10-29 Simon Marchi <simon.marchi@ericsson.com>
899
900 * proc-service.c (ps_pdread): Add/adjust casts.
901 (ps_pdwrite): Add/adjust casts.
902
d6f85c84
SM
9032015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
904
905 * server.c (handle_search_memory_1): Cast return value of
906 memmem.
907
f98cd059
SM
9082015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
909
910 * server.c (write_qxfer_response): Change type of data to
911 gdb_byte *.
912
d2412fa5
PA
9132015-10-29 Pedro Alves <palves@redhat.com>
914
915 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
916
c17414a2
PA
9172015-10-29 Pedro Alves <palves@redhat.com>
918
919 * tracepoint.c (clear_installed_tracepoints): Add casts.
920
e053fbc4
PA
9212015-10-29 Pedro Alves <palves@redhat.com>
922
923 * server.c (handle_v_cont, process_serial_event): Add enum
924 gdb_signal casts to signal parsing code.
925
add67df8
PA
9262015-10-29 Pedro Alves <palves@redhat.com>
927
928 * linux-low.h (NULL_REGSET): Define.
929 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
930 * linux-arm-low.c (arm_regsets): Likewise.
931 * linux-crisv32-low.c (cris_regsets): Likewise.
932 * linux-m68k-low.c (m68k_regsets): Likewise.
933 * linux-mips-low.c (mips_regsets): Likewise.
934 * linux-nios2-low.c (nios2_regsets): Likewise.
935 * linux-ppc-low.c (ppc_regsets): Likewise.
936 * linux-s390-low.c (s390_regsets): Likewise.
937 * linux-sh-low.c (sh_regsets): Likewise.
938 * linux-sparc-low.c (sparc_regsets): Likewise.
939 * linux-tic6x-low.c (tic6x_regsets): Likewise.
940 * linux-tile-low.c (tile_regsets): Likewise.
941 * linux-x86-low.c (x86_regsets): Likewise.
942 * linux-xtensa-low.c (xtensa_regsets): Likewise.
943
50bc912a
PA
9442015-10-29 Pedro Alves <palves@redhat.com>
945
946 * linux-low.h (NULL_REGSET): Define.
947 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
948 * linux-arm-low.c (arm_regsets): Likewise.
949 * linux-crisv32-low.c (cris_regsets): Likewise.
950 * linux-m68k-low.c (m68k_regsets): Likewise.
951 * linux-mips-low.c (mips_regsets): Likewise.
952 * linux-nios2-low.c (nios2_regsets): Likewise.
953 * linux-ppc-low.c (ppc_regsets): Likewise.
954 * linux-s390-low.c (s390_regsets): Likewise.
955 * linux-sh-low.c (sh_regsets): Likewise.
956 * linux-sparc-low.c (sparc_regsets): Likewise.
957 * linux-tic6x-low.c (tic6x_regsets): Likewise.
958 * linux-tile-low.c (tile_regsets): Likewise.
959 * linux-x86-low.c (x86_regsets): Likewise.
960 * linux-xtensa-low.c (xtensa_regsets): Likewise.
961
682b2546
DE
9622015-10-26 Doug Evans <dje@google.com>
963
964 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
965
963843d4
DE
9662015-10-26 Doug Evans <dje@google.com>
967
968 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
969
d41401ac
DE
9702015-10-26 Doug Evans <dje@google.com>
971
972 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
973 for debug_printf.
974 (attach_thread, find_new_threads_callback): Ditto.
975
3db28855
AT
9762015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
977
978 * mem-break.h (set_breakpoint_data): Remove.
979
fb78e89c
AT
9802015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
981
982 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
983 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
984 (initialize_low): Remove set_breakpoint_data call.
985 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
986 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
987 (initialize_low): Remove set_breakpoint_data call.
988 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
989 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
990 (initialize_low): Remove set_breakpoint_data call.
991
2e6ee069
AT
9922015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
993
994 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
995 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
996 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
997 * target.h (target_breakpoint_kind_from_pc): New macro.
998
1652a986
AT
9992015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1000
1001 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1002 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1003 the default breakpoint kind.
1004
abeead09
AT
10052015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1006
1007 * linux-arm-low.c (arm_supports_z_point_type): Add software
1008 breakpoint support.
1009
b0b4b501
AT
10102015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1011
1012 * linux-arm-low.c: Refactor breakpoint definitions.
1013 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1014 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1015
8689682c
AT
10162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1017
1018 * Makefile.in: Add arm.c/o.
1019 * configure.srv: Likewise.
1020 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1021 (arm_breakpoint_kind_from_pc): New function.
1022 (arm_sw_breakpoint_from_kind): Return proper kind.
1023 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1024
27165294
AT
10252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1026
1027 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1028 removal.
1029 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1030 (struct raw_breakpoint) <size>: Remove.
1031 (struct raw_breakpoint) <kind>: Add.
1032 (bp_size): New function.
1033 (bp_opcode): Likewise.
1034 (find_raw_breakpoint_at): Adjust for kind.
1035 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1036 (remove_memory_breakpoint): Adjust for kind call bp_size.
1037 (set_raw_breakpoint_at): Adjust for kind.
1038 (set_breakpoint): Likewise.
1039 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1040 (delete_raw_breakpoint): Adjust for kind.
1041 (delete_breakpoint): Likewise.
1042 (find_gdb_breakpoint): Likewise.
1043 (set_gdb_breakpoint_1): Likewise.
1044 (set_gdb_breakpoint): Likewise.
1045 (delete_gdb_breakpoint_1): Likewise.
1046 (delete_gdb_breakpoint): Likewise.
1047 (uninsert_raw_breakpoint): Likewise.
1048 (reinsert_raw_breakpoint): Likewise.
1049 (set_breakpoint_data): Remove.
1050 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1051 (check_mem_read): Adjust for kind call bp_size.
1052 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1053 (clone_one_breakpoint): Adjust for kind.
1054 * mem-break.h (set_gdb_breakpoint): Likewise.
1055 (delete_gdb_breakpoint): Likewise.
1056 * server.c (process_serial_event): Likewise.
1057
dd373349
AT
10582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1059
1060 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1066 (arm_sw_breakpoint_from_kind): New function.
1067 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1068 (struct linux_target_ops) <breakpoint>: Remove.
1069 (struct linux_target_ops) <breakpoint_len>: Remove.
1070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1072 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1073 (struct linux_target_ops) <breakpoint>: Remove.
1074 (struct linux_target_ops) <breakpoint_len>: Remove.
1075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1076 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1077 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1078 (struct linux_target_ops) <breakpoint>: Remove.
1079 (struct linux_target_ops) <breakpoint_len>: Remove.
1080 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1081 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1082 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1083 and sw_breakpoint_from_kind to increment the pc.
1084 (linux_breakpoint_kind_from_pc): New function.
1085 (linux_sw_breakpoint_from_kind): New function.
1086 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1087 (initialize_low): Call breakpoint_kind_from_pc and
1088 sw_breakpoint_from_kind to replace breakpoint_data/len.
1089 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1090 New field.
1091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1092 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1093 (struct linux_target_ops) <breakpoint>: Remove.
1094 (struct linux_target_ops) <breakpoint_len>: Remove.
1095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1097 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1098 (struct linux_target_ops) <breakpoint>: Remove.
1099 (struct linux_target_ops) <breakpoint_len>: Remove.
1100 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1102 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1103 (struct linux_target_ops) <breakpoint>: Remove.
1104 (struct linux_target_ops) <breakpoint_len>: Remove.
1105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1107 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1108 (struct linux_target_ops) <breakpoint>: Remove.
1109 (struct linux_target_ops) <breakpoint_len>: Remove.
1110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1112 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1113 (struct linux_target_ops) <breakpoint>: Remove.
1114 (struct linux_target_ops) <breakpoint_len>: Remove.
1115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1117 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1118 (struct linux_target_ops) <breakpoint>: Remove.
1119 (struct linux_target_ops) <breakpoint_len>: Remove.
1120 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1121 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1122 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1123 (struct linux_target_ops) <breakpoint>: Remove.
1124 (struct linux_target_ops) <breakpoint_len>: Remove.
1125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1126 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1127 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1128 (struct linux_target_ops) <breakpoint>: Remove.
1129 (struct linux_target_ops) <breakpoint_len>: Remove.
1130 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1131 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1132 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1133 (struct linux_target_ops) <breakpoint>: Remove.
1134 (struct linux_target_ops) <breakpoint_len>: Remove.
1135 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1136 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1137 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1138 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1139 (struct linux_target_ops) <breakpoint>: Remove.
1140 (struct linux_target_ops) <breakpoint_len>: Remove.
1141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1143 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1144 (struct linux_target_ops) <breakpoint>: Remove.
1145 (struct linux_target_ops) <breakpoint_len>: Remove.
1146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1148
4cd98a19
AT
11492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1150
1151 * linux-cris-low.c (cris_get_pc): Remove void arg.
1152
774ee6d2
AR
11532015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1154
1155 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1156 variable name.
1157
833dcd29
AR
11582015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1159
1160 * inferiors.c (thread_pid_matches_callback): New function.
1161 (find_thread_process): New function.
1162 (remove_thread): Reset current_thread.
1163 (remove_process): Assert threads have been removed first.
1164
8d689ee5
YQ
11652015-10-15 Yao Qi <yao.qi@linaro.org>
1166
1167 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1168 if it is 3.
1169 (aarch64_remove_point): Likewise.
1170 * regcache.c (regcache_register_size): New function.
1171
1c2e1515
YQ
11722015-10-12 Yao Qi <yao.qi@linaro.org>
1173
1174 * linux-aarch64-low.c: Update all callers as emit_load_store
1175 is renamed to aarch64_emit_load_store.
1176
e1c587c3
YQ
11772015-10-12 Yao Qi <yao.qi@linaro.org>
1178
1179 * linux-aarch64-low.c: Update all callers of function renaming
1180 from emit_insn to aarch64_emit_insn.
1181
b6542f81
YQ
11822015-10-12 Yao Qi <yao.qi@linaro.org>
1183
1184 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1185 arch/aarch64-insn.h.
1186 (struct aarch64_memory_operand): Likewise.
1187 (ENCODE): Likewise.
1188 (emit_insn): Move to arch/aarch64-insn.c.
1189 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1190 (emit_load_store): Move to arch/aarch64-insn.c.
1191 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1192 (can_encode_int32): Remove.
1193
246994ce
YQ
11942015-10-12 Yao Qi <yao.qi@linaro.org>
1195
1196 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1197 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1198 (aarch64_relocate_instruction): Likewise.
1199 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1200 (struct aarch64_insn_visitor): Likewise.
1201
0badd99f
YQ
12022015-10-12 Yao Qi <yao.qi@linaro.org>
1203
1204 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1205 (struct aarch64_insn_visitor): New.
1206 (struct aarch64_insn_relocation_data): New.
1207 (aarch64_ftrace_insn_reloc_b): New function.
1208 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1209 (aarch64_ftrace_insn_reloc_cb): Likewise.
1210 (aarch64_ftrace_insn_reloc_tb): Likewise.
1211 (aarch64_ftrace_insn_reloc_adr): Likewise.
1212 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1213 (aarch64_ftrace_insn_reloc_others): Likewise.
1214 (visitor): New.
1215 (aarch64_relocate_instruction): Use visitor.
1216
dfaffe9d
YQ
12172015-10-12 Yao Qi <yao.qi@linaro.org>
1218
1219 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1220 int. Add argument buf.
1221 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1222 aarch64_relocate_instruction.
1223
70b439f0
YQ
12242015-10-12 Yao Qi <yao.qi@linaro.org>
1225
1226 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1227 argument insn. Remove local variable insn. Don't call
1228 target_read_uint32.
1229 (aarch64_install_fast_tracepoint_jump_pad): Call
1230 target_read_uint32.
1231
7781c06f
YQ
12322015-09-30 Yao Qi <yao.qi@linaro.org>
1233
1234 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1235 (emit_load_store_pair): Likewise.
1236
9a3c8263
SM
12372015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1238
1239 * dll.c (match_dll): Add cast(s).
1240 (unloaded_dll): Likewise.
1241 * linux-low.c (second_thread_of_pid_p): Likewise.
1242 (delete_lwp_callback): Likewise.
1243 (count_events_callback): Likewise.
1244 (select_event_lwp_callback): Likewise.
1245 (linux_set_resume_request): Likewise.
1246 * server.c (accumulate_file_name_length): Likewise.
1247 (emit_dll_description): Likewise.
1248 (handle_qxfer_threads_worker): Likewise.
1249 (visit_actioned_threads): Likewise.
1250 * thread-db.c (any_thread_of): Likewise.
1251 * tracepoint.c (same_process_p): Likewise.
1252 (match_blocktype): Likewise.
1253 (build_traceframe_info_xml): Likewise.
1254
224c3ddb
SM
12552015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1256
1257 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1258 assignment.
1259 (gdb_unparse_agent_expr): Likewise.
1260 * hostio.c (require_data): Likewise.
1261 (handle_pread): Likewise.
1262 * linux-low.c (disable_regset): Likewise.
1263 (fetch_register): Likewise.
1264 (store_register): Likewise.
1265 (get_dynamic): Likewise.
1266 (linux_qxfer_libraries_svr4): Likewise.
1267 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1268 (set_fast_tracepoint_jump): Likewise.
1269 (uninsert_fast_tracepoint_jumps_at): Likewise.
1270 (reinsert_fast_tracepoint_jumps_at): Likewise.
1271 (validate_inserted_breakpoint): Likewise.
1272 (clone_agent_expr): Likewise.
1273 * regcache.c (init_register_cache): Likewise.
1274 * remote-utils.c (putpkt_binary_1): Likewise.
1275 (decode_M_packet): Likewise.
1276 (decode_X_packet): Likewise.
1277 (look_up_one_symbol): Likewise.
1278 (relocate_instruction): Likewise.
1279 (monitor_output): Likewise.
1280 * server.c (handle_search_memory): Likewise.
1281 (handle_qxfer_exec_file): Likewise.
1282 (handle_qxfer_libraries): Likewise.
1283 (handle_qxfer): Likewise.
1284 (handle_query): Likewise.
1285 (handle_v_cont): Likewise.
1286 (handle_v_run): Likewise.
1287 (captured_main): Likewise.
1288 * target.c (write_inferior_memory): Likewise.
1289 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1290 * tracepoint.c (init_trace_buffer): Likewise.
1291 (add_tracepoint_action): Likewise.
1292 (add_traceframe): Likewise.
1293 (add_traceframe_block): Likewise.
1294 (cmd_qtdpsrc): Likewise.
1295 (cmd_qtdv): Likewise.
1296 (cmd_qtstatus): Likewise.
1297 (response_source): Likewise.
1298 (response_tsv): Likewise.
1299 (cmd_qtnotes): Likewise.
1300 (gdb_collect): Likewise.
1301 (initialize_tracepoint): Likewise.
1302
afbe19f8
PL
13032015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1304
1305 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1306 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1307 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1308 <NOP>: New.
1309 (enum aarch64_condition_codes): New enum.
1310 (w0): New static global.
1311 (fp): Likewise.
1312 (lr): Likewise.
1313 (struct aarch64_memory_operand) <type>: New
1314 MEMORY_OPERAND_POSTINDEX type.
1315 (postindex_memory_operand): New helper function.
1316 (emit_ret): New function.
1317 (emit_load_store_pair): New function, factored out of emit_stp
1318 with support for MEMORY_OPERAND_POSTINDEX.
1319 (emit_stp): Rewrite using emit_load_store_pair.
1320 (emit_ldp): New function.
1321 (emit_load_store): Likewise.
1322 (emit_ldr): Mention post-index instruction in comment.
1323 (emit_ldrh): New function.
1324 (emit_ldrb): New function.
1325 (emit_ldrsw): Mention post-index instruction in comment.
1326 (emit_str): Likewise.
1327 (emit_subs): New function.
1328 (emit_cmp): Likewise.
1329 (emit_and): Likewise.
1330 (emit_orr): Likewise.
1331 (emit_orn): Likewise.
1332 (emit_eor): Likewise.
1333 (emit_mvn): Likewise.
1334 (emit_lslv): Likewise.
1335 (emit_lsrv): Likewise.
1336 (emit_asrv): Likewise.
1337 (emit_mul): Likewise.
1338 (emit_sbfm): Likewise.
1339 (emit_sbfx): Likewise.
1340 (emit_ubfm): Likewise.
1341 (emit_ubfx): Likewise.
1342 (emit_csinc): Likewise.
1343 (emit_cset): Likewise.
1344 (emit_nop): Likewise.
1345 (emit_ops_insns): New helper function.
1346 (emit_pop): Likewise.
1347 (emit_push): Likewise.
1348 (aarch64_emit_prologue): New function.
1349 (aarch64_emit_epilogue): Likewise.
1350 (aarch64_emit_add): Likewise.
1351 (aarch64_emit_sub): Likewise.
1352 (aarch64_emit_mul): Likewise.
1353 (aarch64_emit_lsh): Likewise.
1354 (aarch64_emit_rsh_signed): Likewise.
1355 (aarch64_emit_rsh_unsigned): Likewise.
1356 (aarch64_emit_ext): Likewise.
1357 (aarch64_emit_log_not): Likewise.
1358 (aarch64_emit_bit_and): Likewise.
1359 (aarch64_emit_bit_or): Likewise.
1360 (aarch64_emit_bit_xor): Likewise.
1361 (aarch64_emit_bit_not): Likewise.
1362 (aarch64_emit_equal): Likewise.
1363 (aarch64_emit_less_signed): Likewise.
1364 (aarch64_emit_less_unsigned): Likewise.
1365 (aarch64_emit_ref): Likewise.
1366 (aarch64_emit_if_goto): Likewise.
1367 (aarch64_emit_goto): Likewise.
1368 (aarch64_write_goto_address): Likewise.
1369 (aarch64_emit_const): Likewise.
1370 (aarch64_emit_call): Likewise.
1371 (aarch64_emit_reg): Likewise.
1372 (aarch64_emit_pop): Likewise.
1373 (aarch64_emit_stack_flush): Likewise.
1374 (aarch64_emit_zero_ext): Likewise.
1375 (aarch64_emit_swap): Likewise.
1376 (aarch64_emit_stack_adjust): Likewise.
1377 (aarch64_emit_int_call_1): Likewise.
1378 (aarch64_emit_void_call_2): Likewise.
1379 (aarch64_emit_eq_goto): Likewise.
1380 (aarch64_emit_ne_goto): Likewise.
1381 (aarch64_emit_lt_goto): Likewise.
1382 (aarch64_emit_le_goto): Likewise.
1383 (aarch64_emit_gt_goto): Likewise.
1384 (aarch64_emit_ge_got): Likewise.
1385 (aarch64_emit_ops_impl): New static global variable.
1386 (aarch64_emit_ops): New target function, return
1387 &aarch64_emit_ops_impl.
1388 (struct linux_target_ops): Install it.
1389
bb903df0
PL
13902015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1391
1392 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1393 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1394 aarch64-ipa.o.
1395 * linux-aarch64-ipa.c: New file.
1396 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1397 and endian.h.
1398 (aarch64_get_thread_area): New target method.
1399 (extract_signed_bitfield): New helper function.
1400 (aarch64_decode_ldr_literal): New function.
1401 (enum aarch64_opcodes): New enum.
1402 (struct aarch64_register): New struct.
1403 (struct aarch64_operand): New struct.
1404 (x0): New static global.
1405 (x1): Likewise.
1406 (x2): Likewise.
1407 (x3): Likewise.
1408 (x4): Likewise.
1409 (w2): Likewise.
1410 (ip0): Likewise.
1411 (sp): Likewise.
1412 (xzr): Likewise.
1413 (aarch64_register): New helper function.
1414 (register_operand): Likewise.
1415 (immediate_operand): Likewise.
1416 (struct aarch64_memory_operand): New struct.
1417 (offset_memory_operand): New helper function.
1418 (preindex_memory_operand): Likewise.
1419 (enum aarch64_system_control_registers): New enum.
1420 (ENCODE): New macro.
1421 (emit_insn): New helper function.
1422 (emit_b): New function.
1423 (emit_bcond): Likewise.
1424 (emit_cb): Likewise.
1425 (emit_tb): Likewise.
1426 (emit_blr): Likewise.
1427 (emit_stp): Likewise.
1428 (emit_ldp_q_offset): Likewise.
1429 (emit_stp_q_offset): Likewise.
1430 (emit_load_store): Likewise.
1431 (emit_ldr): Likewise.
1432 (emit_ldrsw): Likewise.
1433 (emit_str): Likewise.
1434 (emit_ldaxr): Likewise.
1435 (emit_stxr): Likewise.
1436 (emit_stlr): Likewise.
1437 (emit_data_processing_reg): Likewise.
1438 (emit_data_processing): Likewise.
1439 (emit_add): Likewise.
1440 (emit_sub): Likewise.
1441 (emit_mov): Likewise.
1442 (emit_movk): Likewise.
1443 (emit_mov_addr): Likewise.
1444 (emit_mrs): Likewise.
1445 (emit_msr): Likewise.
1446 (emit_sevl): Likewise.
1447 (emit_wfe): Likewise.
1448 (append_insns): Likewise.
1449 (can_encode_int32_in): New helper function.
1450 (aarch64_relocate_instruction): New function.
1451 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1452 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1453 (struct linux_target_ops): Install aarch64_get_thread_area,
1454 aarch64_install_fast_tracepoint_jump_pad and
1455 aarch64_get_min_fast_tracepoint_insn_len.
1456
787749ea
PL
14572015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1458
1459 * Makefile.in (aarch64-insn.o): New rule.
1460 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1461
9812b2e6
YQ
14622015-09-21 Yao Qi <yao.qi@linaro.org>
1463
1464 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1465
18fe412b
YQ
14662015-09-21 Yao Qi <yao.qi@linaro.org>
1467
1468 * tracepoint.c (max_jump_pad_size): Remove.
1469
a0cc84cd
YQ
14702015-09-18 Yao Qi <yao.qi@linaro.org>
1471
1472 * linux-aarch64-low.c: Don't include sys/uio.h.
1473 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1474
d78908cf
WW
14752015-09-16 Wei-cheng Wang <cole945@gmail.com>
1476
1477 * tracepoint.c (eval_result_type): Change prototype.
1478 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1479
d57e0d50
PA
14802015-09-15 Pedro Alves <palves@redhat.com>
1481
1482 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1483 Check whether to report exec events instead of checking whether
1484 multiprocess is enabled.
1485
5a676acc
PA
14862015-09-15 Pedro Alves <palves@redhat.com>
1487
1488 PR remote/18965
1489 * remote-utils.c (prepare_resume_reply): Merge
1490 TARGET_WAITKIND_VFORK_DONE switch case with the
1491 TARGET_WAITKIND_FORKED case.
1492
7c5d0fad
YQ
14932015-09-15 Yao Qi <yao.qi@linaro.org>
1494
1495 * server.c (handle_query): Check string comparison using
1496 "else if" instead of "if".
1497
750ce8d1
YQ
14982015-09-15 Yao Qi <yao.qi@linaro.org>
1499
1500 * server.c (vCont_supported): New global variable.
1501 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1502 matches. Append ";vContSupported+" to own_buf.
1503 (handle_v_requests): Append ";s;S" to own_buf if target supports
1504 hardware single step or vCont_supported is false.
1505 (capture_main): Set vCont_supported to zero.
1506
70b90b91
YQ
15072015-09-15 Yao Qi <yao.qi@linaro.org>
1508
1509 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1510 it to ...
1511 (linux_supports_hardware_single_step): ... New function.
1512 (linux_target_ops): Update.
1513 * lynx-low.c (lynx_target_ops): Set field
1514 supports_hardware_single_step to target_can_do_hardware_single_step.
1515 * nto-low.c (nto_target_ops): Likewise.
1516 * spu-low.c (spu_target_ops): Likewise.
1517 * win32-low.c (win32_target_ops): Likewise.
1518 * target.c (target_can_do_hardware_single_step): New function.
1519 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1520 Remove. <supports_hardware_single_step>: New field.
1521 (target_supports_conditional_breakpoints): Remove.
1522 (target_supports_hardware_single_step): New macro.
1523 (target_can_do_hardware_single_step): Declare.
1524 * server.c (handle_query): Use target_supports_hardware_single_step
1525 instead of target_supports_conditional_breakpoints.
1526
ade90bde
YQ
15272015-09-15 Yao Qi <yao.qi@linaro.org>
1528
1529 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1530 function.
1531 (struct linux_target_ops the_low_target): Install
1532 aarch64_linux_siginfo_fixup.
1533
94585166
DB
15342015-09-11 Don Breazeal <donb@codesourcery.com>
1535 Luis Machado <lgustavo@codesourcery.com>
1536
1537 * linux-low.c (linux_mourn): Static declaration.
1538 (linux_arch_setup): Move in front of
1539 handle_extended_wait.
1540 (linux_arch_setup_thread): New function.
1541 (handle_extended_wait): Handle exec events. Call
1542 linux_arch_setup_thread. Make event_lwp argument a
1543 pointer-to-a-pointer.
1544 (check_zombie_leaders): Do not check stopped threads.
1545 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1546 (linux_low_filter_event): Add lwp and thread for exec'ing
1547 non-leader thread if leader thread has been deleted.
1548 Refactor code into linux_arch_setup_thread and call it.
1549 Pass child lwp pointer by reference to handle_extended_wait.
1550 (linux_wait_for_event_filtered): Update comment.
1551 (linux_wait_1): Prevent clobbering exec event status.
1552 (linux_supports_exec_events): New function.
1553 (linux_target_ops) <supports_exec_events>: Initialize new member.
1554 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1555 new member.
1556 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1557 * server.c (report_exec_events): New global variable.
1558 (handle_query): Handle qSupported query for exec-events feature.
1559 (captured_main): Initialize report_exec_events.
1560 * server.h (report_exec_events): Declare new global variable.
1561 * target.h (struct target_ops) <supports_exec_events>: New
1562 member.
1563 (target_supports_exec_events): New macro.
1564 * win32-low.c (win32_target_ops) <supports_exec_events>:
1565 Initialize new member.
1566
0568462b
MM
15672015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1568
1569 * linux-low.c (linux_low_enable_btrace): Remove.
1570 (linux_target_ops): Replace linux_low_enable_btrace with
1571 linux_enable_btrace.
1572
39edd165
YQ
15732015-09-03 Yao Qi <yao.qi@linaro.org>
1574
1575 * linux-aarch64-low.c (aarch64_insert_point): Call
1576 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1577 returns true.
1578
1db33b5a
UW
15792015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1580
1581 * linux-low.c (check_stopped_by_breakpoint): Use
1582 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1583
ab290430
PA
15842015-08-27 Pedro Alves <palves@redhat.com>
1585
1586 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1587
8d749320
SM
15882015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1589
6711b7f8
SM
1590 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1591 the XNEW-family equivalent.
8d749320
SM
1592 (compile_bytecodes): Likewise.
1593 * dll.c (loaded_dll): Likewise.
1594 * event-loop.c (append_callback_event): Likewise.
1595 (create_file_handler): Likewise.
1596 (create_file_event): Likewise.
1597 * hostio.c (handle_open): Likewise.
1598 * inferiors.c (add_thread): Likewise.
1599 (add_process): Likewise.
1600 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1601 * linux-arm-low.c (arm_new_process): Likewise.
1602 (arm_new_thread): Likewise.
1603 * linux-low.c (add_to_pid_list): Likewise.
1604 (linux_add_process): Likewise.
1605 (handle_extended_wait): Likewise.
1606 (add_lwp): Likewise.
1607 (enqueue_one_deferred_signal): Likewise.
1608 (enqueue_pending_signal): Likewise.
1609 (linux_resume_one_lwp_throw): Likewise.
1610 (linux_resume_one_thread): Likewise.
1611 (linux_read_memory): Likewise.
1612 (linux_write_memory): Likewise.
1613 * linux-mips-low.c (mips_linux_new_process): Likewise.
1614 (mips_linux_new_thread): Likewise.
1615 (mips_add_watchpoint): Likewise.
1616 * linux-x86-low.c (initialize_low_arch): Likewise.
1617 * lynx-low.c (lynx_add_process): Likewise.
1618 * mem-break.c (set_raw_breakpoint_at): Likewise.
1619 (set_breakpoint): Likewise.
1620 (add_condition_to_breakpoint): Likewise.
1621 (add_commands_to_breakpoint): Likewise.
1622 (clone_agent_expr): Likewise.
1623 (clone_one_breakpoint): Likewise.
1624 * regcache.c (new_register_cache): Likewise.
1625 * remote-utils.c (look_up_one_symbol): Likewise.
1626 * server.c (queue_stop_reply): Likewise.
1627 (start_inferior): Likewise.
1628 (queue_stop_reply_callback): Likewise.
1629 (handle_target_event): Likewise.
1630 * spu-low.c (fetch_ppc_memory): Likewise.
1631 (store_ppc_memory): Likewise.
1632 * target.c (set_target_ops): Likewise.
1633 * thread-db.c (thread_db_load_search): Likewise.
1634 (try_thread_db_load_1): Likewise.
1635 * tracepoint.c (add_tracepoint): Likewise.
1636 (add_tracepoint_action): Likewise.
1637 (create_trace_state_variable): Likewise.
1638 (cmd_qtdpsrc): Likewise.
1639 (cmd_qtro): Likewise.
1640 (add_while_stepping_state): Likewise.
1641 * win32-low.c (child_add_thread): Likewise.
1642 (get_image_name): Likewise.
1643
ed8b7b42
YQ
16442015-08-25 Yao Qi <yao.qi@linaro.org>
1645
1646 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1647
db3cb7cb
YQ
16482015-08-25 Yao Qi <yao.qi@linaro.org>
1649
1650 * Makefile.in (aarch64-linux.o): New rule.
1651 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1652 srv_tgtobj.
1653 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1654 (aarch64_init_debug_reg_state): Make it extern.
1655 (aarch64_linux_prepare_to_resume): Remove.
1656
f6011a1c
YQ
16572015-08-25 Yao Qi <yao.qi@linaro.org>
1658
1659 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1660 lwp_arch_private_info and ptid_of_lwp.
1661
88e2cf7e
YQ
16622015-08-25 Yao Qi <yao.qi@linaro.org>
1663
1664 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1665 Find proc_info by find_process_pid. All callers updated.
1666
5e35436e
YQ
16672015-08-25 Yao Qi <yao.qi@linaro.org>
1668
1669 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1670 Remove.
1671 (debug_reg_change_callback): Remove.
1672 (aarch64_notify_debug_reg_change): Remove.
1673
4a8a7965
YQ
16742015-08-25 Yao Qi <yao.qi@linaro.org>
1675
1676 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1677 Call current_lwp_ptid.
1678
32a271ee
YQ
16792015-08-25 Yao Qi <yao.qi@linaro.org>
1680
1681 * linux-aarch64-low.c (debug_reg_change_callback): Use
1682 debug_printf.
1683
0d51c8d7
YQ
16842015-08-25 Yao Qi <yao.qi@linaro.org>
1685
1686 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1687
31a43dd5
YQ
16882015-08-25 Yao Qi <yao.qi@linaro.org>
1689
1690 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1691
8ee52567
YQ
16922015-08-25 Yao Qi <yao.qi@linaro.org>
1693
1694 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1695 the code.
1696
ff3f0f45
YQ
16972015-08-25 Yao Qi <yao.qi@linaro.org>
1698
1699 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1700 Remove.
1701 (debug_reg_change_callback): Remove argument entry and add argument
1702 lwp. Remove local variable thread. Don't print thread id in the
1703 debugging output. Don't check whether pid of thread equals to pid.
1704 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1705 iterate_over_lwps instead find_inferior.
1706
3d40fbb5
PA
17072015-08-24 Pedro Alves <palves@redhat.com>
1708
1709 * inferiors.c (get_first_process): New function.
1710 * inferiors.h (get_first_process): New declaration.
1711 * remote-utils.c (read_ptid): Default to the first process in the
1712 list, instead of to the current thread's process.
1713
438e1e42
PA
17142015-08-24 Pedro Alves <palves@redhat.com>
1715
1716 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1717 * event-loop.c: Likewise.
1718 * remote-utils.c: Likewise.
1719 * tracepoint.c: Likewise.
1720
a8c6d4fc
PA
17212015-08-24 Pedro Alves <palves@redhat.com>
1722
1723 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1724 ptid_get_lwp.
1725
99b0bb12
PA
17262015-08-21 Pedro Alves <palves@redhat.com>
1727
1728 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1729 instead of literal 1.
1730
f8904751
PA
17312015-08-21 Pedro Alves <palves@redhat.com>
1732
1733 * tdesc.c (default_description): Explicitly zero-initialize.
1734
465a859e
PA
17352015-08-21 Pedro Alves <palves@redhat.com>
1736
1737 PR gdb/18749
1738 * inferiors.c (remove_thread): Discard any pending stop reply for
1739 this thread.
1740 * server.c (remove_all_on_match_pid): Rename to ...
1741 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1742 instead of a pid.
1743 (discard_queued_stop_replies): Change parameter to a ptid. Now
1744 extern.
1745 (handle_v_kill, kill_inferior_callback, captured_main)
1746 (process_serial_event): Adjust.
1747 * server.h (discard_queued_stop_replies): Declare.
1748
f0db101d
PA
17492015-08-21 Pedro Alves <palves@redhat.com>
1750
1751 * linux-low.c (wait_for_sigstop): Always switch to no thread
1752 selected if the previously current thread dies.
1753 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1754 process instead of the current thread's.
1755 * remote-utils.c (input_interrupt): Don't check if there's no
1756 current thread.
1757 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1758 current thread to the general thread fails, error out.
1759 (handle_qxfer_auxv, handle_qxfer_libraries)
1760 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1761 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1762 (handle_query): Check if there's a thread selected instead of
1763 checking whether there's any thread in the thread list.
1764 (handle_qxfer_threads, handle_qxfer_btrace)
1765 (handle_qxfer_btrace_conf): Don't error out early if there's no
1766 thread in the thread list.
1767 (handle_v_cont, myresume): Don't set the current thread to the
1768 continue thread.
1769 (process_serial_event) <Hg handling>: Also set thread_id if the
1770 previous general thread is still alive.
1771 (process_serial_event) <g/G handling>: If setting the current
1772 thread to the general thread fails, error out.
1773 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1774 thread's lwp instead of the current thread's.
1775 * target.c (set_desired_thread): If the desired thread was not
1776 found, leave the current thread pointing to NULL. Return an int
1777 (boolean) indicating success.
1778 * target.h (set_desired_thread): Change return type to int.
1779
40045d91
MF
17802015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1781
1782 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1783 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1784 #includes.
1785 (ps_get_thread_area): New function.
1786
45face3b
GB
17872015-08-19 Gary Benson <gbenson@redhat.com>
1788
1789 * hostio.c (handle_pread): Do not attempt to read more data
1790 than hostio_reply_with_data can fit in a packet.
1791
16d5f642
JB
17922015-08-18 Joel Brobecker <brobecker@adacore.com>
1793
1794 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1795
a738da3a
MF
17962015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1797
1798 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1799
33ebda9d
PA
18002015-08-06 Pedro Alves <palves@redhat.com>
1801
1802 * tracepoint.c (expr_eval_result): Now an int.
1803
a44892be
PA
18042015-08-06 Pedro Alves <palves@redhat.com>
1805
1806 * gdbthread.h (struct regcache): Forward declare.
1807 (struct thread_info) <regcache_data>: Now a struct regcache
1808 pointer.
1809 * inferiors.c (inferior_regcache_data)
1810 (set_inferior_regcache_data): Now work with struct regcache
1811 pointers.
1812 * inferiors.h (struct regcache): Forward declare.
1813 (inferior_regcache_data, set_inferior_regcache_data): Now work
1814 with struct regcache pointers.
1815 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1816 (free_register_cache_thread): Remove struct regcache pointer
1817 casts.
1818
608a1e46
PA
18192015-08-06 Pedro Alves <palves@redhat.com>
1820
1821 * server.c (captured_main): On error, print the exception message
1822 to stderr, and if run_once is set, throw a quit.
1823
f0ce0d3a
PA
18242015-08-06 Pedro Alves <palves@redhat.com>
1825
1826 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1827 the current thread.
1828
bf47e248
PA
18292015-08-06 Pedro Alves <palves@redhat.com>
1830
1831 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1832 reading beyond the passed in buffer length.
1833
b6b9ffcc
PL
18342015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1835
1836 * tracepoint.c (symbol_list) <required>: Remove.
1837
863d01bd
PA
18382015-08-06 Pedro Alves <palves@redhat.com>
1839
1840 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1841 count if stopping and suspending threads.
1842 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1843 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1844 (linux_detach): Complete an ongoing step-over.
1845 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1846 throughout.
1847 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1848 (linux_wait_1): If passing a signal to the inferior after
1849 finishing a step-over, unsuspend and re-resume all lwps. If we
1850 see a single-step event but the thread should be continuing, don't
1851 pass the trap to gdb.
1852 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1853 internal_error instead of gdb_assert.
1854 (enqueue_pending_signal): New function.
1855 (check_ptrace_stopped_lwp_gone): Add debug output.
1856 (start_step_over): Use internal_error instead of gdb_assert.
1857 (complete_ongoing_step_over): New function.
1858 (linux_resume_one_thread): Don't resume a suspended thread.
1859 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1860 it stepping.
1861
00db26fa
PA
18622015-08-06 Pedro Alves <palves@redhat.com>
1863
1864 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1865 (linux_thread_alive): Use lwp_is_marked_dead.
1866 (extended_event_reported): Delete.
1867 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1868 instead of extended_event_reported.
1869 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1870 as well.
1871 (lwp_is_marked_dead): New function.
1872 (lwp_running): Use lwp_is_marked_dead.
1873 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1874 comment.
1875
ad071a30
PA
18762015-08-06 Pedro Alves <palves@redhat.com>
1877
1878 * linux-low.c (linux_wait_1): Move fork event output out of the
1879 !report_to_gdb check. Pass event_child->waitstatus to
1880 target_waitstatus_to_string instead of ourstatus.
1881
524b57e6
YQ
18822015-08-04 Yao Qi <yao.qi@linaro.org>
1883
1884 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1885 if current_thread is 32 bit.
1886
6085d6f6
YQ
18872015-08-04 Yao Qi <yao.qi@linaro.org>
1888
1889 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1890 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1891 * server.c (extended_protocol): Remove "static".
1892 * server.h (extended_protocol): Declare it.
1893
8a7e4587
YQ
18942015-08-04 Yao Qi <yao.qi@linaro.org>
1895
1896 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1897 both aarch64 and aarch32.
1898 (aarch64_set_pc): Likewise.
1899
3b53ae99
YQ
19002015-08-04 Yao Qi <yao.qi@linaro.org>
1901
1902 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1903 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1904 arm-with-neon.xml to srv_xmlfiles.
1905 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1906 (is_64bit_tdesc): New function.
1907 (aarch64_linux_read_description): New function.
1908 (aarch64_arch_setup): Call aarch64_linux_read_description.
1909 (regs_info): Rename to regs_info_aarch64.
1910 (aarch64_regs_info): Return right regs_info.
1911 (initialize_low_arch): Call initialize_low_arch_aarch32.
1912
bd9e6534
YQ
19132015-08-04 Yao Qi <yao.qi@linaro.org>
1914
1915 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1916 * linux-aarch32-low.c: New file.
1917 * linux-aarch32-low.h: New file.
1918 * linux-arm-low.c (arm_fill_gregset): Move it to
1919 linux-aarch32-low.c.
1920 (arm_store_gregset): Likewise.
1921 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1922 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1923 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1924 (regs_info): Rename to regs_info_arm.
1925 (arm_regs_info): Return regs_info_aarch32 if
1926 have_ptrace_getregset is 1 and target description is
1927 arm_with_neon or arm_with_vfpv3.
1928 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1929 Call initialize_low_arch_aarch32 instead.
1930
ded48a5e
YQ
19312015-08-04 Yao Qi <yao.qi@linaro.org>
1932
1933 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1934 * linux-low.c: ... here.
1935 * linux-low.h (have_ptrace_getregset): Declare it.
1936
96e9210f
PA
19372015-08-04 Pedro Alves <palves@redhat.com>
1938
1939 * thread-db.c (struct thread_db): Use new typedefs.
1940 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1941 CHK calls.
1942 (disable_thread_event_reporting): Cast result of dlsym to
1943 destination function pointer type.
1944 (thread_db_mourn): Use td_ta_delete_ftype.
1945
af60a1ef
SL
19462015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1947
1948 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1949 arch variant.
1950 (CDX_BREAKPOINT): Define for R2.
1951 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1952 (the_low_target): Add comments.
1953
e8b41681
YQ
19542015-07-30 Yao Qi <yao.qi@linaro.org>
1955
1956 * linux-arm-low.c (arm_hwcap): Remove it.
1957 (arm_read_description): New local variable arm_hwcap. Don't
1958 set arm_hwcap to zero.
1959
89abb039
YQ
19602015-07-30 Yao Qi <yao.qi@linaro.org>
1961
1962 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1963 Use regcache->tdesc instead.
1964 (arm_store_wmmxregset): Likewise.
1965 (arm_fill_vfpregset): Likewise.
1966 (arm_store_vfpregset): Likewise.
1967
deca266c
YQ
19682015-07-30 Yao Qi <yao.qi@linaro.org>
1969
1970 * linux-arm-low.c: Include arch/arm.h.
1971 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1972 (arm_store_gregset): Likewise.
1973
aa58a496
SM
19742015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1975
1976 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1977 ptrace's 4th parameter.
1978
50904b25
YQ
19792015-07-27 Yao Qi <yao.qi@linaro.org>
1980
1981 * configure.srv (case aarch64*-*-linux*): Don't set
1982 srv_linux_usrregs.
1983
5826e159
PA
19842015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1985
1986 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1987 sys/ptrace.h.
1988 * linux-arm-low.c: Likewise.
1989 * linux-cris-low.c: Likewise.
1990 * linux-crisv32-low.c: Likewise.
1991 * linux-low.c: Likewise.
1992 * linux-m68k-low.c: Likewise.
1993 * linux-mips-low.c: Likewise.
1994 * linux-nios2-low.c: Likewise.
1995 * linux-s390-low.c: Likewise.
1996 * linux-sparc-low.c: Likewise.
1997 * linux-tic6x-low.c: Likewise.
1998 * linux-tile-low.c: Likewise.
1999 * linux-x86-low.c: Likewise.
2000
54019719
PA
20012015-07-24 Pedro Alves <palves@redhat.com>
2002
2003 * config.in: Regenerate.
2004 * configure: Regenerate.
2005
eb7aa561
PA
20062015-07-24 Pedro Alves <palves@redhat.com>
2007
2008 * acinclude.m4: Include ../ptrace.m4.
2009 * configure.ac: Call GDB_AC_PTRACE.
2010 * config.in, configure: Regenerate.
2011
55d7b841
YQ
20122015-07-24 Yao Qi <yao.qi@linaro.org>
2013
2014 * linux-low.c (linux_create_inferior): Remove setting to
2015 proc->priv->new_inferior.
2016 (linux_attach): Likewise.
2017 (linux_low_filter_event): Likewise.
2018 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2019
c06cbd92
YQ
20202015-07-24 Yao Qi <yao.qi@linaro.org>
2021
2022 * linux-low.c (linux_arch_setup): New function.
2023 (linux_low_filter_event): If proc->tdesc is NULL and
2024 proc->attached is true, call the_low_target.arch_setup.
2025 Otherwise, keep status pending, and return.
2026 (linux_resume_one_lwp_throw): Don't call get_pc if
2027 thread->while_stepping isn't NULL. Don't call
2028 get_thread_regcache if proc->tdesc is NULL.
2029 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2030 (linux_target_ops): Install arch_setup.
2031 * server.c (start_inferior): Call the_target->arch_setup.
2032 * target.h (struct target_ops) <arch_setup>: New field.
2033 (target_arch_setup): New marco.
2034 * lynx-low.c (lynx_target_ops): Update.
2035 * nto-low.c (nto_target_ops): Update.
2036 * spu-low.c (spu_target_ops): Update.
2037 * win32-low.c (win32_target_ops): Update.
2038
5ae3ebba
YQ
20392015-07-24 Yao Qi <yao.qi@linaro.org>
2040
2041 * linux-low.c (linux_add_process): Don't set
2042 proc->priv->new_inferior.
2043 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2044 (linux_attach): Likewise.
2045
eb97750b
YQ
20462015-07-24 Yao Qi <yao.qi@linaro.org>
2047
2048 * server.c (start_inferior): Code refactor.
2049
51aee833
YQ
20502015-07-24 Yao Qi <yao.qi@linaro.org>
2051
2052 * server.c (process_serial_event): Set general_thread.
2053
af1b22f3
YQ
20542015-07-21 Yao Qi <yao.qi@linaro.org>
2055
2056 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2057 aarch64_linux_get_debug_reg_capacity.
2058
554717a3
YQ
20592015-07-17 Yao Qi <yao.qi@linaro.org>
2060
2061 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2062 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2063 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2064 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2065 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2066 (AARCH64_HWP_ALIGNMENT): Likewise.
2067 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2068 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2069 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2070 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2071 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2072 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2073 (struct aarch64_debug_reg_state): Likewise.
2074 (struct arch_lwp_info): Likewise.
2075 (aarch64_align_watchpoint): Likewise.
2076 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2077 (aarch64_watchpoint_length): Likewise.
2078 (aarch64_point_encode_ctrl_reg): Likewise
2079 (aarch64_point_is_aligned): Likewise.
2080 (aarch64_align_watchpoint): Likewise.
2081 (aarch64_linux_set_debug_regs):
2082 (aarch64_dr_state_insert_one_point): Likewise.
2083 (aarch64_dr_state_remove_one_point): Likewise.
2084 (aarch64_handle_breakpoint): Likewise.
2085 (aarch64_handle_aligned_watchpoint): Likewise.
2086 (aarch64_handle_unaligned_watchpoint): Likewise.
2087 (aarch64_handle_watchpoint): Likewise.
2088
c67ca4de
YQ
20892015-07-17 Yao Qi <yao.qi@linaro.org>
2090
2091 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2092 and don't aarch64_get_debug_reg_state. All callers update.
2093 (aarch64_handle_aligned_watchpoint): Likewise.
2094 (aarch64_handle_unaligned_watchpoint): Likewise.
2095 (aarch64_handle_watchpoint): Likewise.
2096 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2097 (aarch64_remove_point): Likewise.
2098
25abf979
YQ
20992015-07-17 Yao Qi <yao.qi@linaro.org>
2100
2101 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2102 debug_printf.
2103 (aarch64_handle_unaligned_watchpoint): Likewise.
2104
db1ff28b
JK
21052015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2106
2107 Revert the previous 3 commits:
2108 Move gdb_regex* to common/
2109 Move linux_find_memory_regions_full & co.
2110 gdbserver build-id attribute generator
2111
700ca40f
JK
21122015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2113 Jan Kratochvil <jan.kratochvil@redhat.com>
2114
2115 gdbserver build-id attribute generator.
2116 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2117 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2118 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2119 (find_phdr): New.
2120 (get_dynamic): Use find_pdhr to traverse program headers.
2121 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2122 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2123 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2124 (get_hex_build_id): New.
2125 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2126 to reply XML document.
2127
9904185c
JK
21282015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2129 Jan Kratochvil <jan.kratochvil@redhat.com>
2130
2131 * target.c: Include target/target-utils.h and fcntl.h.
2132 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2133 (target_fileio_read_stralloc): New functions.
2134
6e5b4429
JK
21352015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2136
2137 * Makefile.in (OBS): Add gdb_regex.o.
2138 (gdb_regex.o): New.
2139 * config.in: Rebuilt.
2140 * configure: Rebuilt.
2141
ddc98fbf
JK
21422015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2143 Jan Kratochvil <jan.kratochvil@redhat.com>
2144
2145 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2146 * Makefile.in (OBS): Add target-utils.o.
2147 (linux-maps.o, target-utils.o): New.
2148 * configure.srv (srv_linux_obj): Add linux-maps.o.
2149
e57bb7a0
PL
21502015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2151
2152 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2153 function, return 1.
2154 (the_low_target): Install it.
2155
586b02a9
PA
21562015-07-14 Pedro Alves <palves@redhat.com>
2157
2158 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2159 Instead, ignore ECHILD, and throw an error for other errnos.
2160
58c1b36c
PA
21612015-07-10 Pedro Alves <palves@redhat.com>
2162
2163 * event-loop.c (struct callback_event) <data>: Change type to
2164 gdb_client_data instance instead of gdb_client_data pointer.
2165 (append_callback_event): Adjust.
2166
421530db
PL
21672015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2168
2169 * linux-aarch64-low.c: Add comments for each linux_target_ops
2170 method. Remove comments already covered in target_ops and
2171 linux_target_ops definitions.
2172 (the_low_target): Add comments for each unimplemented method.
2173
c2d65f38
YQ
21742015-07-09 Yao Qi <yao.qi@linaro.org>
2175
2176 * linux-aarch64-low.c (aarch64_regmap): Remove.
2177 (aarch64_usrregs_info): Remove.
2178 (regs_info): Set field usrregs to NULL.
2179
b20a6524
MM
21802015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2181
2182 * linux-low.c: Include "rsp-low.h"
2183 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2184 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2185 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2186 (handle_btrace_enable_pt): New.
2187 (handle_btrace_general_set): Support "pt".
2188 (handle_btrace_conf_general_set): Support "pt:size".
2189
96c97461
PL
21902015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2191
2192 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2193 Z_PACKET_SW_BP.
2194
37d66942
PL
21952015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2196
2197 * linux-aarch64-low.c: Remove comment about endianness.
2198 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2199 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2200 memcmp.
2201
dc06243f
GB
22022015-06-24 Gary Benson <gbenson@redhat.com>
2203
2204 * linux-i386-ipa.c (stdint.h): Do not include.
2205 * lynx-i386-low.c (stdint.h): Likewise.
2206 * lynx-ppc-low.c (stdint.h): Likewise.
2207 * mem-break.c (stdint.h): Likewise.
2208 * thread-db.c (stdint.h): Likewise.
2209 * tracepoint.c (stdint.h): Likewise.
2210 * win32-low.c (stdint.h): Likewise.
2211
124e13d9
SM
22122015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2213
2214 * server.c (write_qxfer_response): Update call to
2215 remote_escape_output.
2216
909c2cda
JK
22172015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2218 Jan Kratochvil <jan.kratochvil@redhat.com>
2219
2220 Merge multiple hex conversions.
2221 * gdbreplay.c (tohex): Rename to 'fromhex'.
2222 (logchar): Use fromhex.
2223
24c05f46
JK
22242015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2225
2226 * server.c (handle_qxfer_libraries): Set `version' attribute for
2227 <library-list>.
2228
14d2069a
GB
22292015-06-10 Gary Benson <gbenson@redhat.com>
2230
2231 * target.h (struct target_ops) <multifs_open>: New field.
2232 <multifs_unlink>: Likewise.
2233 <multifs_readlink>: Likewise.
2234 * linux-low.c (nat/linux-namespaces.h): New include.
2235 (linux_target_ops): Initialize the_target->multifs_open,
2236 the_target->multifs_unlink and the_target->multifs_readlink.
2237 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2238 * hostio.c (hostio_fs_pid): New static variable.
2239 (hostio_handle_new_gdb_connection): New function.
2240 (handle_setfs): Likewise.
2241 (handle_open): Use the_target->multifs_open as appropriate.
2242 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2243 (handle_readlink): Use the_target->multifs_readlink as
2244 appropriate.
2245 (handle_vFile): Handle vFile:setfs packets.
2246 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2247 after target_handle_new_gdb_connection.
2248
4b8b5e72
GB
22492015-06-10 Gary Benson <gbenson@redhat.com>
2250
2251 * configure.ac (AC_CHECK_FUNCS): Add setns.
2252 * config.in: Regenerate.
2253 * configure: Likewise.
2254 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2255 (linux-namespaces.o): New rule.
2256 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2257
3ac2e371
GB
22582015-06-09 Gary Benson <gbenson@redhat.com>
2259
2260 * hostio.c (handle_open): Process mode argument with
2261 fileio_to_host_mode.
2262
ca9b78ce
YQ
22632015-06-01 Yao Qi <yao.qi@linaro.org>
2264
2265 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2266 * linux-x86-low.c: Likewise.
2267
bfacd19d
DB
22682015-05-28 Don Breazeal <donb@codesourcery.com>
2269
2270 * linux-low.c (handle_extended_wait): Initialize
2271 thread_info.last_resume_kind for new fork children.
2272
452003ef
PA
22732015-05-15 Pedro Alves <palves@redhat.com>
2274
2275 * target.h (target_handle_new_gdb_connection): Rewrite using if
2276 wrapped in do/while.
2277
1041a03c
JB
22782015-05-14 Joel Brobecker <brobecker@adacore.com>
2279
2280 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2281 * configure, config.in: Regenerate.
2282 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2283 Declare typedef.
2284
c269dbdb
DB
22852015-05-12 Don Breazeal <donb@codesourcery.com>
2286
2287 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2288 PTRACE_EVENT_VFORK_DONE.
2289 (linux_low_ptrace_options, extended_event_reported): Add vfork
2290 events.
2291 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2292 and "vforkdone" for RSP 'T' Stop Reply Packet.
2293 * server.h (report_vfork_events): Declare
2294 global variable.
2295
3a8a0396
DB
22962015-05-12 Don Breazeal <donb@codesourcery.com>
2297
2298 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2299 (the_low_target) <new_fork>: Initialize new member.
2300 * linux-arm-low.c (arm_new_fork): New function.
2301 (the_low_target) <new_fork>: Initialize new member.
2302 * linux-low.c (handle_extended_wait): Call new target function
2303 new_fork.
2304 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2305 * linux-mips-low.c (mips_add_watchpoint): New function
2306 extracted from mips_insert_point.
2307 (the_low_target) <new_fork>: Initialize new member.
2308 (mips_linux_new_fork): New function.
2309 (mips_insert_point): Call mips_add_watchpoint.
2310 * linux-x86-low.c (x86_linux_new_fork): New function.
2311 (the_low_target) <new_fork>: Initialize new member.
2312
de0d863e
DB
23132015-05-12 Don Breazeal <donb@codesourcery.com>
2314
2315 * linux-low.c (handle_extended_wait): Implement return value,
2316 rename argument 'event_child' to 'event_lwp', handle
2317 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2318 (linux_low_ptrace_options): New function.
2319 (linux_low_filter_event): Call linux_low_ptrace_options,
2320 use different argument fo linux_enable_event_reporting,
2321 use return value from handle_extended_wait.
2322 (extended_event_reported): New function.
2323 (linux_wait_1): Call extended_event_reported and set
2324 status to report fork events.
2325 (linux_write_memory): Add pid to debug message.
2326 (reset_lwp_ptrace_options_callback): New function.
2327 (linux_handle_new_gdb_connection): New function.
2328 (linux_target_ops): Initialize new structure member.
2329 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2330 * lynx-low.c: Initialize new structure member.
2331 * remote-utils.c (prepare_resume_reply): Implement stop reason
2332 "fork" for "T" stop message.
2333 * server.c (handle_query): Call handle_new_gdb_connection.
2334 * server.h (report_fork_events): Declare global flag.
2335 * target.h (struct target_ops) <handle_new_gdb_connection>:
2336 New member.
2337 (target_handle_new_gdb_connection): New macro.
2338 * win32-low.c: Initialize new structure member.
2339
ddcbc397
DB
23402015-05-12 Don Breazeal <donb@codesourcery.com>
2341
2342 * mem-break.c (APPEND_TO_LIST): Define macro.
2343 (clone_agent_expr): New function.
2344 (clone_one_breakpoint): New function.
2345 (clone_all_breakpoints): New function.
2346 * mem-break.h: Declare new functions.
2347
89245bc0
DB
23482015-05-12 Don Breazeal <donb@codesourcery.com>
2349
2350 * linux-low.c (linux_supports_fork_events): New function.
2351 (linux_supports_vfork_events): New function.
2352 (linux_target_ops): Initialize new structure members.
2353 (initialize_low): Call linux_check_ptrace_features.
2354 * lynx-low.c (lynx_target_ops): Initialize new structure
2355 members.
2356 * server.c (report_fork_events, report_vfork_events):
2357 New global flags.
2358 (handle_query): Add new features to qSupported packet and
2359 response.
2360 (captured_main): Initialize new global variables.
2361 * target.h (struct target_ops) <supports_fork_events>:
2362 New member.
2363 <supports_vfork_events>: New member.
2364 (target_supports_fork_events): New macro.
2365 (target_supports_vfork_events): New macro.
2366 * win32-low.c (win32_target_ops): Initialize new structure
2367 members.
2368
835205d0
GB
23692015-05-12 Gary Benson <gbenson@redhat.com>
2370
2371 * server.c (handle_qxfer_exec_file): Use current process
2372 if annex is empty.
2373
21e94bd9
SL
23742015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2375
2376 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2377 Remove HAVE_PTRACE_GETREGS conditionals.
2378 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2379 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2380
45614f15
YQ
23812015-05-08 Yao Qi <yao.qi@linaro.org>
2382
2383 * linux-low.c (linux_supports_conditional_breakpoints): New
2384 function.
2385 (linux_target_ops): Install new target method.
2386 * lynx-low.c (lynx_target_ops): Install NULL hook for
2387 supports_conditional_breakpoints.
2388 * nto-low.c (nto_target_ops): Likewise.
2389 * spu-low.c (spu_target_ops): Likewise.
2390 * win32-low.c (win32_target_ops): Likewise.
2391 * server.c (handle_query): Check
2392 target_supports_conditional_breakpoints.
2393 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2394 New field.
2395 (target_supports_conditional_breakpoints): New macro.
2396
80ad801e
PA
23972015-05-06 Pedro Alves <palves@redhat.com>
2398
2399 PR server/18081
2400 * server.c (start_inferior): If the process exits, mourn it.
2401
819843c7
GB
24022015-04-21 Gary Benson <gbenson@redhat.com>
2403
2404 * hostio.c (fileio_open_flags_to_host): Factored out to
2405 fileio_to_host_openflags in common/fileio.c. Single use
2406 updated.
2407
a2d5a9d7
MF
24082015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2409
2410 * linux-xtensa-low.c (xtensa_fill_gregset)
2411 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2412 XCHAL_HAVE_LOOP.
2413
deb44829
MF
24142015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2415
2416 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2417 (regs_info): Replace usrregs pointer with NULL.
2418
e57f1de3
GB
24192015-04-17 Gary Benson <gbenson@redhat.com>
2420
2421 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2422 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2423 * server.c (handle_qxfer_exec_file): New function.
2424 (qxfer_packets): Add exec-file entry.
2425 (handle_query): Report qXfer:exec-file:read as supported packet.
2426
62828379
RN
24272015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2428
2429 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2430
b88bb450
GB
24312015-04-09 Gary Benson <gbenson@redhat.com>
2432
2433 * hostio-errno.c (errno_to_fileio_error): Remove function.
2434 Update caller to use remote_fileio_to_fio_error.
2435
c8f4bfdd
YQ
24362015-04-09 Yao Qi <yao.qi@linaro.org>
2437
2438 * linux-low.c (linux_insert_point): Call
2439 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2440 (linux_remove_point): Call remove_memory_breakpoint if type is
2441 raw_bkpt_type_sw.
2442 * linux-x86-low.c (x86_insert_point): Don't call
2443 insert_memory_breakpoint.
2444 (x86_remove_point): Don't call remove_memory_breakpoint.
2445
41f98f02
PA
24462015-04-01 Pedro Alves <palves@redhat.com>
2447 Cleber Rosa <crosa@redhat.com>
2448
2449 * server.c (gdbserver_usage): Reorganize and extend the usage
2450 message.
2451
2bf6fb9d
PA
24522015-03-24 Pedro Alves <palves@redhat.com>
2453
2454 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2455 output. Also dump TRAP_TRACE.
2456 (linux_low_filter_event): In debug output, distinguish a
2457 resume_stop SIGSTOP from a delayed SIGSTOP.
2458
369f6daa
GB
24592015-03-24 Gary Benson <gbenson@redhat.com>
2460
2461 * linux-x86-low.c (x86_linux_new_thread): Moved to
2462 nat/x86-linux.c.
2463 (x86_linux_prepare_to_resume): Likewise.
2464
8e5d4070
GB
24652015-03-24 Gary Benson <gbenson@redhat.com>
2466
2467 * Makefile.in (x86-linux-dregs.o): New rule.
2468 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2469 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2470 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2471 (x86_linux_dr_get): Likewise.
2472 (x86_linux_dr_set): Likewise.
2473 (update_debug_registers_callback): Likewise.
2474 (x86_linux_dr_set_addr): Likewise.
2475 (x86_linux_dr_get_addr): Likewise.
2476 (x86_linux_dr_set_control): Likewise.
2477 (x86_linux_dr_get_control): Likewise.
2478 (x86_linux_dr_get_status): Likewise.
2479 (x86_linux_update_debug_registers): Likewise.
2480
2b95d440
GB
24812015-03-24 Gary Benson <gbenson@redhat.com>
2482
2483 * linux-x86-low.c (x86_linux_update_debug_registers):
2484 New function, factored out from...
2485 (x86_linux_prepare_to_resume): ...this.
2486
14b0bc68
GB
24872015-03-24 Gary Benson <gbenson@redhat.com>
2488
2489 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2490 (x86_linux_dr_set): Likewise.
2491 (update_debug_registers_callback): Likewise.
2492 (x86_linux_dr_set_addr): Likewise.
2493 (x86_linux_dr_get_addr): Likewise.
2494 (x86_linux_dr_set_control): Likewise.
2495 (x86_linux_dr_get_control): Likewise.
2496 (x86_linux_dr_get_status): Likewise.
2497 (x86_linux_prepare_to_resume): Likewise.
2498
5dfe6ca8
GB
24992015-03-24 Gary Benson <gbenson@redhat.com>
2500
2501 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2502 Use perror_with_name. Pass string through gettext.
2503 (x86_linux_dr_set): Likewise.
2504
d33472ad
GB
25052015-03-24 Gary Benson <gbenson@redhat.com>
2506
2507 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2508 (x86_linux_dr_set_addr): ...this.
2509 (x86_dr_low_get_addr): Rename to...
2510 (x86_linux_dr_get_addr): ...this.
2511 (x86_dr_low_set_control): Rename to...
2512 (x86_linux_dr_set_control): ...this.
2513 (x86_dr_low_get_control): Rename to...
2514 (x86_linux_dr_get_control): ...this.
2515 (x86_dr_low_get_status): Rename to...
2516 (x86_linux_dr_get_status): ...this.
2517 (x86_dr_low): Update with new function names.
2518
4b134ca1
GB
25192015-03-24 Gary Benson <gbenson@redhat.com>
2520
2521 * Makefile.in (x86-linux.o): New rule.
2522 * configure.srv: Add x86-linux.o to relevant targets.
2523 * linux-low.c (lwp_set_arch_private_info): New function.
2524 (lwp_arch_private_info): Likewise.
2525 * linux-x86-low.c: Include nat/x86-linux.h.
2526 (arch_lwp_info): Removed structure.
2527 (update_debug_registers_callback):
2528 Use lwp_set_debug_registers_changed.
2529 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2530 and lwp_set_debug_registers_changed.
2531 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2532
34c703da
GB
25332015-03-24 Gary Benson <gbenson@redhat.com>
2534
2535 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2536 * linux-arm-low.c (arm_new_thread): Likewise.
2537 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2538 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2539 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2540 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2541
cff068da
GB
25422015-03-24 Gary Benson <gbenson@redhat.com>
2543
2544 * linux-low.c (ptid_of_lwp): New function.
2545 (lwp_is_stopped): Likewise.
2546 (lwp_stop_reason): Likewise.
2547 * linux-x86-low.c (update_debug_registers_callback):
2548 Use lwp_is_stopped.
2549 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2550 lwp_stop_reason.
2551
b2f7c7e8
GB
25522015-03-24 Gary Benson <gbenson@redhat.com>
2553
2554 * linux-low.h (linux_stop_lwp): Remove declaration.
2555
6d4ee8c6
GB
25562015-03-24 Gary Benson <gbenson@redhat.com>
2557
2558 * linux-low.h: Include nat/linux-nat.h.
2559 * linux-low.c (iterate_over_lwps_args): New structure.
2560 (iterate_over_lwps_filter): New function.
2561 (iterate_over_lwps): Likewise.
2562 * linux-x86-low.c (update_debug_registers_callback):
2563 Update signature to what iterate_over_lwps expects.
2564 Remove PID check that iterate_over_lwps now performs.
2565 (x86_dr_low_set_addr): Use iterate_over_lwps.
2566 (x86_dr_low_set_control): Likewise.
2567
70a0bb6b
GB
25682015-03-24 Gary Benson <gbenson@redhat.com>
2569
2570 * linux-x86-low.c (x86_debug_reg_state): New function.
2571 (x86_linux_prepare_to_resume): Use the above.
2572
7b669087
GB
25732015-03-24 Gary Benson <gbenson@redhat.com>
2574
2575 * linux-low.c (current_lwp_ptid): New function.
2576 * linux-x86-low.c: Include nat/linux-nat.h.
2577 (x86_dr_low_get_addr): Use current_lwp_ptid.
2578 (x86_dr_low_get_control): Likewise.
2579 (x86_dr_low_get_status): Likewise.
2580
eef49a3d
PA
25812015-03-20 Pedro Alves <palves@redhat.com>
2582
2583 * tracepoint.c (cmd_qtstatus): Make "str" const.
2584
b2333d22
PA
25852015-03-20 Pedro Alves <palves@redhat.com>
2586
2587 * server.c (handle_general_set): Make "req_str" const.
2588
23f238d3
PA
25892015-03-19 Pedro Alves <palves@redhat.com>
2590
2591 * linux-low.c (linux_resume_one_lwp): Rename to ...
2592 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2593 instead call perror_with_name.
2594 (check_ptrace_stopped_lwp_gone): New function.
2595 (linux_resume_one_lwp): Reimplement as wrapper around
2596 linux_resume_one_lwp_throw that swallows errors if the LWP is
2597 gone.
2598
91baf43f
PA
25992015-03-19 Pedro Alves <palves@redhat.com>
2600
2601 * linux-low.c (count_events_callback, select_event_lwp_callback):
2602 No longer check whether the thread has resume_stop as last resume
2603 kind.
2604
8bf3b159
PA
26052015-03-19 Pedro Alves <palves@redhat.com>
2606
2607 * linux-low.c (count_events_callback, select_event_lwp_callback):
2608 Use the lwp's status_pending_p field, not the thread's.
2609
b90fc188
PA
26102015-03-19 Pedro Alves <palves@redhat.com>
2611
2612 * linux-low.c (select_event_lwp_callback): Update comments to
2613 no longer mention SIGTRAP.
2614
464b0089
GB
26152015-03-18 Gary Benson <gbenson@redhat.com>
2616
2617 * server.c (handle_query): Do not report vFile:fstat as supported.
2618
aa9e327f
GB
26192015-03-11 Gary Benson <gbenson@redhat.com>
2620
2621 * hostio.c (sys/types.h): New include.
2622 (sys/stat.h): Likewise.
2623 (common-remote-fileio.h): Likewise.
2624 (handle_fstat): New function.
2625 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2626
791c0056
GB
26272015-03-11 Gary Benson <gbenson@redhat.com>
2628
2629 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2630 struct stat.st_blocks and struct stat.st_blksize.
2631 * configure: Regenerate.
2632 * config.in: Likewise.
2633 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2634 (OBS): Add common-remote-fileio.o.
2635 (common-remote-fileio.o): New rule.
2636
9a9df970
PA
26372015-03-09 Pedro Alves <palves@redhat.com>
2638
2639 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2640 'struct sockaddr' pointer in 'accept' call.
2641
9eb1356e
PA
26422015-03-09 Pedro Alves <palves@redhat.com>
2643
2644 Revert:
2645 2015-03-07 Pedro Alves <palves@redhat.com>
2646 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2647 or <winsock2.h> here. Instead include "gdb_socket.h".
2648 (remote_open): Use union gdb_sockaddr_u.
2649 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2650 or <winsock2.h> here. Instead include "gdb_socket.h".
2651 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2652 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2653 or <sys/un.h>.
2654 (init_named_socket, gdb_agent_helper_thread): Use union
2655 gdb_sockaddr_u.
2656
aac331e4
PA
26572015-03-07 Pedro Alves <palves@redhat.com>
2658
2659 * configure.ac (build_warnings): Move
2660 -Wdeclaration-after-statement to the C-specific set.
2661 * configure: Regenerate.
2662
366c75fc
PA
26632015-03-07 Pedro Alves <palves@redhat.com>
2664
2665 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2666 or <winsock2.h> here. Instead include "gdb_socket.h".
2667 (remote_open): Use union gdb_sockaddr_u.
2668 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2669 or <winsock2.h> here. Instead include "gdb_socket.h".
2670 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2671 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2672 or <sys/un.h>.
2673 (init_named_socket, gdb_agent_helper_thread): Use union
2674 gdb_sockaddr_u.
2675
492d29ea
PA
26762015-03-07 Pedro Alves <palves@redhat.com>
2677
2678 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2679 instead.
2680
60a191ed
YQ
26812015-03-06 Yao Qi <yao.qi@linaro.org>
2682
2683 * linux-aarch64-low.c (aarch64_insert_point): Use
2684 show_debug_regs as a boolean.
2685 (aarch64_remove_point): Likewise.
2686
f5771b1d
PA
26872015-03-05 Pedro Alves <palves@redhat.com>
2688
2689 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2690 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2691 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2692 * nto-low.c (nto_target_ops): Likewise.
2693 * spu-low.c (spu_target_ops): Likewise.
2694 * win32-low.c (win32_target_ops): Likewise.
2695
3e572f71
PA
26962015-03-04 Pedro Alves <palves@redhat.com>
2697
72f4393d 2698 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2699 Decide whether a breakpoint triggered based on the SIGTRAP's
2700 siginfo.si_code.
72f4393d
L
2701 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2702 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2703 (linux_low_filter_event): Check for breakpoints before checking
2704 watchpoints.
2705 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2706 siginfo.si_code.
72f4393d
L
2707 (linux_stopped_by_sw_breakpoint)
2708 (linux_supports_stopped_by_sw_breakpoint)
2709 (linux_stopped_by_hw_breakpoint)
2710 (linux_supports_stopped_by_hw_breakpoint): New functions.
2711 (linux_target_ops): Install new target methods.
3e572f71 2712
1ec68e26
PA
27132015-03-04 Pedro Alves <palves@redhat.com>
2714
2715 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2716 * server.c (swbreak_feature, hwbreak_feature): New globals.
2717 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2718 (captured_main): Clear swbreak_feature and hwbreak_feature.
2719 * server.h (swbreak_feature, hwbreak_feature): Declare.
2720 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2721 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2722 supports_stopped_by_hw_breakpoint>: New fields.
2723 (target_supports_stopped_by_sw_breakpoint)
2724 (target_stopped_by_sw_breakpoint)
2725 (target_supports_stopped_by_hw_breakpoint)
2726 (target_stopped_by_hw_breakpoint): Declare.
2727
15c66dd6
PA
27282015-03-04 Pedro Alves <palves@redhat.com>
2729
2730 enum lwp_stop_reason -> enum target_stop_reason
2731 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2732 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2733 (linux_wait_1, stuck_in_jump_pad_callback)
2734 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2735 (linux_stopped_by_watchpoint):
2736 * linux-low.h (enum lwp_stop_reason): Delete.
2737 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2738 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2739
98fc70d6
YQ
27402015-03-04 Yao Qi <yao.qi@linaro.org>
2741
2742 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2743
dd2ac174
GB
27442015-03-03 Gary Benson <gbenson@redhat.com>
2745
2746 * hostio.c (handle_vFile): Fix prefix lengths.
2747
d68e53f4
MM
27482015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2749
2750 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2751 ptr_bits.
2752
bf2d68ab
AA
27532015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2754
2755 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2756 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2757 (clean): Add "rm -f" for above C files.
2758 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2759 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2760 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2761 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2762 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2763 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2764 (init_registers_s390x_vx_linux64)
2765 (init_registers_s390x_tevx_linux64)
2766 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2767 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2768 declarations.
2769 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2770 (s390_store_vxrs_high): New functions.
2771 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2772 NT_S390_VXRS_HIGH.
2773 (s390_arch_setup): Add logic for selecting one of the new target
2774 descriptions. Activate the new vector regsets if applicable.
2775 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2776 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2777 and init_registers_s390x_tevx_linux64.
2778
c966a859
PA
27792015-03-01 Pedro Alves <palves@redhat.com>
2780
2781 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2782 parameter.
2783
4180215b
PA
27842015-02-27 Pedro Alves <palves@redhat.com>
2785
2786 * linux-x86-low.c (u_debugreg_offset): New function.
2787 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2788
749bab01
PA
27892015-02-27 Pedro Alves <palves@redhat.com>
2790
2791 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2792 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2793 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2794 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2795 (ps_lsetfpregs, ps_getpid)
2796 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2797 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2798 (ps_lsetxregs, ps_plog): Declare.
2799
3c14e5a3
PA
28002015-02-27 Pedro Alves <palves@redhat.com>
2801
2802 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2803 IP_AGENT_EXPORT_FUNC.
2804 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2805 IP_AGENT_EXPORT_FUNC.
2806 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2807 (IP_AGENT_EXPORT): Delete.
2808 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2809 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2810 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2811 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2812 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2813 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2814 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2815 (traceframe_read_count, traceframe_write_count)
2816 (traceframes_created, trace_state_variables, get_raw_reg)
2817 (get_trace_state_variable_value, set_trace_state_variable_value)
2818 (ust_loaded, helper_thread_id, cmd_buf): Use
2819 IPA_SYM_EXPORTED_NAME.
2820 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2821 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2822 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2823 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2824 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2825 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2826 EXTERN_C_PUSH/EXTERN_C_POP.
2827 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2828 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2829 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2830 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2831 (traceframe_write_count, traceframe_read_count)
2832 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2833 (about_to_request_buffer_space, get_trace_state_variable_value)
2834 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2835 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2836 EXTERN_C_PUSH/EXTERN_C_POP.
2837 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2838 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2839 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2840 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2841 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2842 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2843 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2844 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2845 Define.
2846 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2847 (IP_AGENT_EXPORT_VAR_DECL): Define.
2848 (tracing): Declare.
2849 (gdb_agent_get_raw_reg): Declare.
2850
fe978cb0
PA
28512015-02-27 Tom Tromey <tromey@redhat.com>
2852 Pedro Alves <palves@redhat.com>
2853
2854 Rename symbols whose names are reserved C++ keywords throughout.
2855
3bc3d82a
PA
28562015-02-27 Pedro Alves <palves@redhat.com>
2857
2858 * Makefile.in (COMPILER): New, get it from autoconf.
2859 (CXX): Get from autoconf instead.
2860 (COMPILE.pre): Use COMPILER.
2861 (CC-LD): Rename to ...
2862 (CC_LD): ... this. Use COMPILER.
2863 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2864 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2865 * acinclude.m4: Include build-with-cxx.m4.
2866 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2867 Disable -Werror by default if building in C++ mode.
2868 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2869 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2870 the C++ compiler. Save/restore CXXFLAGS too.
2871 * configure: Regenerate.
2872
07697489
PA
28732015-02-27 Pedro Alves <palves@redhat.com>
2874
2875 * acinclude.m4: Include libiberty.m4.
2876 * configure.ac: Call libiberty_INIT.
2877 * config.in, configure: Regenerate.
2878
9beb7c4e
PA
28792015-02-26 Pedro Alves <palves@redhat.com>
2880
2881 * linux-low.c (linux_wait_1): When incrementing the PC past a
2882 program breakpoint always use the_low_target.breakpoint_len as
2883 increment, rather than the maximum between that and
2884 the_low_target.decr_pc_after_break.
2885
8090aef2
PA
28862015-02-23 Pedro Alves <palves@redhat.com>
2887
2888 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2889 thread was doing a step-over; always adjust the PC if
2890 we stepped over a permanent breakpoint.
2891 (linux_wait_1): If we stepped over breakpoint that was on top of a
2892 permanent breakpoint, manually advance the PC past it.
2893
bc9540e8
PA
28942015-02-23 Pedro Alves <palves@redhat.com>
2895
2896 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2897 modes.
2898 (x86_fill_gregset, x86_store_gregset): Use it when handling
2899 $orig_eax.
2900
2db9a427
PA
29012015-02-20 Pedro Alves <palves@redhat.com>
2902
2903 * thread-db.c: Include "nat/linux-procfs.h".
2904 (thread_db_init): Skip listing new threads if the kernel supports
2905 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2906
afa8d396
PA
29072015-02-20 Pedro Alves <palves@redhat.com>
2908
2909 * linux-low.c (status_pending_p_callback): Use ptid_match.
2910
c9587f88
AT
29112015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2912
2913 PR breakpoints/16812
2914 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2915 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2916 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2917
b05ec7a5
AT
29182015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2919
2920 PR breakpoints/15956
2921 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2922
d33501a5
MM
29232015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2924
2925 * linux-low.c (linux_low_btrace_conf): Print size.
2926 * server.c (handle_btrace_conf_general_set): New.
2927 (hanle_general_set): Call handle_btrace_conf_general_set.
2928 (handle_query): Report Qbtrace-conf:bts:size as supported.
2929
f4abbc16
MM
29302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2931
2932 * linux-low.c (linux_low_enable_btrace): Update parameters.
2933 (linux_low_btrace_conf): New.
2934 (linux_target_ops)<to_btrace_conf>: Initialize.
2935 * server.c (current_btrace_conf): New.
2936 (handle_btrace_enable): Rename to ...
2937 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2938 to target_enable_btrace. Update comment. Update users.
2939 (handle_qxfer_btrace_conf): New.
2940 (qxfer_packets): Add btrace-conf entry.
2941 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2942 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2943 (target_ops)<read_btrace_conf>: New.
2944 (target_enable_btrace): Update parameters.
2945 (target_read_btrace_conf): New.
2946
043c3577
MM
29472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2948
2949 * server.c (handle_btrace_general_set): Remove call to
2950 target_supports_btrace.
2951 (supported_btrace_packets): New.
2952 (handle_query): Call supported_btrace_packets.
2953 * target.h: include btrace-common.h.
2954 (btrace_target_info): Removed.
2955 (supports_btrace, target_supports_btrace): Update parameters.
2956
734b0e4b
MM
29572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2958
2959 * Makefile.in (SFILES): Add common/btrace-common.c.
2960 (OBS): Add common/btrace-common.o.
2961 (btrace-common.o): Add build rules.
2962 * linux-low: Include btrace-common.h.
2963 (linux_low_read_btrace): Use struct btrace_data. Call
2964 btrace_data_init and btrace_data_fini.
2965
d6c146e9
PA
29662015-02-06 Pedro Alves <palves@redhat.com>
2967
2968 * thread-db.c (find_new_threads_callback): Add debug output.
2969
20ba1ce6
PA
29702015-02-04 Pedro Alves <palves@redhat.com>
2971
2972 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2973 (resume_stopped_resumed_lwps): New function.
2974 (linux_wait_for_event_filtered): Use it.
2975
8cc73a39
SDJ
29762015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2977
2978 * Makefile.in (SFILES): Add linux-personality.c.
2979 (linux-personality.o): New rule.
2980 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2981 list of objects to be built.
2982 * linux-low.c: Include nat/linux-personality.h.
2983 (linux_create_inferior): Remove code to disable address space
2984 randomization (moved to ../nat/linux-personality.c). Create
2985 cleanup to disable address space randomization.
2986
fb23d554
SDJ
29872015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2988
2989 * Makefile.in (posix-strerror.o): New rule.
2990 (mingw-strerror.o): Likewise.
2991 * configure: Regenerated.
2992 * configure.ac: Source file ../common/common.host. Initialize new
2993 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2994
cdf43629
YQ
29952015-01-14 Yao Qi <yao@codesourcery.com>
2996
2997 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2998 (ppc-linux.o): New rule.
2999 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3000 * configure.ac: AC_CHECK_FUNCS(getauxval).
3001 * config.in: Re-generated.
3002 * configure: Re-generated.
3003 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3004 ppc64_64bit_inferior_p
3005
514c5338
YQ
30062015-01-14 Yao Qi <yao@codesourcery.com>
3007
3008 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3009 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3010 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3011 (PT_ORIG_R3, PT_TRAP): Likewise.
3012 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3013 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3014 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3015
3368c1e5
JB
30162015-01-10 Joel Brobecker <brobecker@adacore.com>
3017
3018 * i387-fp.c (i387_cache_to_xsave): In look over
3019 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3020 zmmh_low_space field by use of zmmh_high_space.
3021
582511be
PA
30222015-01-09 Pedro Alves <palves@redhat.com>
3023
3024 * linux-low.c (step_over_bkpt): Move higher up in the file.
3025 (handle_extended_wait): Don't store the stop_pc here.
3026 (get_stop_pc): Adjust comments and rename to ...
3027 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3028 stopped for a software breakpoint or hardware breakpoint.
3029 (thread_still_has_status_pending_p): New function.
3030 (status_pending_p_callback): Use
3031 thread_still_has_status_pending_p. If the event is no longer
3032 interesting, resume the LWP.
3033 (handle_tracepoints): Add assert.
3034 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3035 (wstatus_maybe_breakpoint): New function.
3036 (cancel_breakpoint): Delete function.
3037 (check_stopped_by_watchpoint): New function, factored out from
3038 linux_low_filter_event.
3039 (lp_status_maybe_breakpoint): Delete function.
3040 (linux_low_filter_event): Remove filter_ptid argument.
3041 Leave thread group exits pending here. Store the LWP's stop PC.
3042 Always leave events pending.
3043 (linux_wait_for_event_filtered): Pull all events out of the
3044 kernel, and leave them all pending.
3045 (count_events_callback, select_event_lwp_callback): Consider all
3046 events.
3047 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3048 (select_event_lwp): Only give preference to the stepping LWP in
3049 all-stop mode. Adjust comments.
3050 (ignore_event): New function.
3051 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3052 references to cancel_breakpoints. Adjust to renames. Also give
3053 equal priority to all LWPs that have had events in non-stop mode.
3054 If reporting a software breakpoint event, unadjust the LWP's PC.
3055 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3056 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3057 Adjust.
3058 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3059 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3060 (linux_stopped_by_watchpoint): Adjust.
3061 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3062 * linux-low.h (enum lwp_stop_reason): New.
3063 (struct lwp_info) <stop_pc>: Adjust comment.
3064 <stopped_by_watchpoint>: Delete field.
3065 <stop_reason>: New field.
3066 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3067 * mem-break.c (software_breakpoint_inserted_here)
3068 (hardware_breakpoint_inserted_here): New function.
3069 * mem-break.h (software_breakpoint_inserted_here)
3070 (hardware_breakpoint_inserted_here): Declare.
3071 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3072 (cancel_breakpoints): Delete.
3073 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3074 (upload_fast_traceframes): Remove references to
3075 cancel_breakpoints.
3076
a33e3959
PA
30772015-01-09 Pedro Alves <palves@redhat.com>
3078
3079 * thread-db.c (find_new_threads_callback): Ignore thread if the
3080 kernel thread ID is -1.
3081
8784d563
PA
30822015-01-09 Pedro Alves <palves@redhat.com>
3083
3084 * linux-low.c (linux_attach_fail_reason_string): Move to
3085 nat/linux-ptrace.c, and rename.
3086 (linux_attach_lwp): Update comment.
3087 (attach_proc_task_lwp_callback): New function.
3088 (linux_attach): Adjust to rename and use
3089 linux_proc_attach_tgid_threads.
3090 (linux_attach_fail_reason_string): Delete declaration.
3091
76f2b779
JB
30922015-01-01 Joel Brobecker <brobecker@adacore.com>
3093
3094 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3095 * server.c (gdbserver_version): Likewise.
3096
fafcc06a
SDJ
30972014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3098
3099 * remote-utils.c: Include ctype.h.
3100 (input_interrupt): Explicitly handle the case when the char
3101 received is the NUL byte. Improve the printing of non-ASCII
3102 characters.
3103
beed38b8
JB
31042014-12-16 Joel Brobecker <brobecker@adacore.com>
3105
3106 * linux-low.c (linux_low_filter_event): Update call to
3107 linux_enable_event_reporting following the addition of
3108 a new parameter to that function.
3109
bf330350
CU
31102014-12-16 Catalin Udma <catalin.udma@freescale.com>
3111
3112 PR server/17457
3113 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3114 (AARCH64_FPCR_REGNO): Likewise.
3115 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3116 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3117 (aarch64_store_fpregset): Likewise.
3118
5227d625
JB
31192014-12-15 Joel Brobecker <brobecker@adacore.com>
3120
3121 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3122 Remove FIXME comment about assumption about N.
3123
f93b65a0
JB
31242014-12-13 Joel Brobecker <brobecker@adacore.com>
3125
3126 * configure.ac: If large-file support is disabled in GDBserver,
3127 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3128 * configure: Regenerate.
3129
e5a9158d
AA
31302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3131
3132 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3133 warning upon ENODATA from ptrace.
3134 * linux-s390-low.c (s390_store_tdb): New.
3135 (s390_regsets): Add regset for NT_S390_TDB.
3136
feea5f36
AA
31372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3138
3139 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3140 without a fill_function.
3141 * linux-s390-low.c (s390_fill_last_break): Remove.
3142 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3143 (s390_arch_setup): Use regset's size instead of fill_function for
3144 loop end condition.
3145
098dbe61
AA
31462014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3147
3148 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3149 the regset's store function when ptrace returned an error.
3150 * regcache.c (get_thread_regcache): Invalidate register cache
3151 before fetching inferior's registers.
3152
28eef672
AA
31532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3154
3155 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3156 while-loop as for-loop.
3157 (regsets_store_inferior_registers): Likewise.
3158
bdca27a2
YQ
31592014-11-28 Yao Qi <yao@codesourcery.com>
3160
3161 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3162 * config.in, configure: Re-generate.
3163 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3164 is defined.
3165
9c232dda
YQ
31662014-11-21 Yao Qi <yao@codesourcery.com>
3167
3168 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3169 (AC_CHECK_HEADERS): Remove malloc.h.
3170 * configure: Re-generated.
3171 * config.in: Re-generated.
3172 * server.h: Don't include alloca.h and malloc.h.
3173 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3174 Don't include malloc.h.
3175
43968415
JB
31762014-11-17 Joel Brobecker <brobecker@adacore.com>
3177
3178 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3179 corresponding ERRNO check in same block.
3180
40e91bc7
PA
31812014-11-12 Pedro Alves <palves@redhat.com>
3182
3183 * server.c (cont_thread): Update comment.
3184 (start_inferior, attach_inferior): No longer clear cont_thread.
3185 (handle_v_cont): No longer set cont_thread.
3186 (captured_main): Clear cont_thread each time a GDB connects.
3187
c2c118cf
PA
31882014-11-12 Pedro Alves <palves@redhat.com>
3189
3190 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3191 thread, and don't resume all threads if the Hc thread has exited.
3192
78708b7c
PA
31932014-11-12 Pedro Alves <palves@redhat.com>
3194
3195 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3196 the process group instead of to a specific LWP.
3197
a2abc7de
PA
31982014-10-15 Pedro Alves <palves@redhat.com>
3199
3200 PR server/17487
3201 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3202 parameter.
3203 (arm_set_thread_context): Delete.
3204 (the_low_target): Adjust.
3205 * win32-i386-low.c (debug_registers_changed)
3206 (debug_registers_used): Delete.
3207 (update_debug_registers_callback): New function.
3208 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3209 needing to update their debug registers.
3210 (win32_get_current_dr): New function.
3211 (x86_dr_low_get_addr, x86_dr_low_get_control)
3212 (x86_dr_low_get_status): Fetch the debug register from the thread
3213 record's context.
3214 (i386_initial_stuff): Adjust.
3215 (i386_get_thread_context): Remove current_event parameter. Don't
3216 clear debug_registers_changed nor copy DR values to
3217 debug_reg_state.
3218 (i386_set_thread_context): Delete.
3219 (i386_prepare_to_resume): New function.
3220 (i386_thread_added): Mark the thread as needing to update irs
3221 debug registers.
3222 (the_low_target): Remove i386_set_thread_context and install
3223 i386_prepare_to_resume.
3224 * win32-low.c (win32_get_thread_context): Adjust.
3225 (win32_set_thread_context): Use SetThreadContext
3226 directly.
3227 (win32_prepare_to_resume): New function.
3228 (win32_require_context): New function, factored out from ...
3229 (thread_rec): ... this.
3230 (continue_one_thread): Call win32_prepare_to_resume on each thread
3231 we're about to continue.
3232 (win32_resume): Call win32_prepare_to_resume on the event thread.
3233 * win32-low.h (struct win32_thread_info)
3234 <debug_registers_changed>: New field.
3235 (struct win32_target_ops): Change prototype of set_thread_context,
3236 delete set_thread_context and add prepare_to_resume.
3237 (win32_require_context): New declaration.
3238
a442d071
GB
32392014-10-08 Gary Benson <gbenson@redhat.com>
3240
3241 * server.h: Do not include common-exceptions.h.
3242
6f1947e8
GB
32432014-10-08 Gary Benson <gbenson@redhat.com>
3244
3245 * server.h: Do not include cleanups.h.
3246
63b434a4
JH
32472014-09-30 James Hogan <james.hogan@imgtec.com>
3248
3249 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3250 mips64-dsp-linux.c.
3251
c4d9ceb6
YQ
32522014-09-23 Yao Qi <yao@codesourcery.com>
3253
3254 * linux-low.c (lp_status_maybe_breakpoint): New function.
3255 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3256 (count_events_callback): Likewise.
3257 (select_event_lwp_callback): Likewise.
3258 (cancel_breakpoints_callback): Likewise.
3259
89a5711c
DB
32602014-09-19 Don Breazeal <donb@codesourcery.com>
3261
3262 * linux-low.c (handle_extended_wait): Call
3263 linux_ptrace_get_extended_event.
3264 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3265 linux_is_extended_waitstatus.
3266
bffc0964
JB
32672014-09-16 Joel Brobecker <brobecker@adacore.com>
3268
3269 * Makefile.in (CPPFLAGS): Define.
3270 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3271 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3272
0bfdf32f
GB
32732014-09-16 Gary Benson <gbenson@redhat.com>
3274
3275 * inferiors.h (current_inferior): Renamed as...
3276 (current_thread): New variable. All uses updated.
3277 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3278 (maybe_move_out_of_jump_pad): Likewise.
3279 (cancel_breakpoint): Likewise.
3280 (linux_low_filter_event): Likewise.
3281 (wait_for_sigstop): Likewise.
3282 (linux_resume_one_lwp): Likewise.
3283 (need_step_over_p): Likewise.
3284 (start_step_over): Likewise.
3285 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3286 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3287 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3288 and save_inferior as saved_thread.
3289 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3290 saved_thread.
3291 (regcache_invalidate_thread): Likewise.
3292 * remote-utils.c (prepare_resume_reply): Likewise.
3293 * thread-db.c (thread_db_get_tls_address): Likewise.
3294 (disable_thread_event_reporting): Likewise.
3295 (remove_thread_event_breakpoints): Likewise.
3296 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3297 as saved_thread.
3298 * target.h (set_desired_inferior): Renamed as...
3299 (set_desired_thread): New declaration. All uses updated.
3300 * server.c (myresume): Updated comment to reference thread instead
3301 of inferior.
3302 (handle_serial_event): Likewise.
3303 (handle_target_event): Likewise.
3304
361c8ade
GB
33052014-09-12 Tom Tromey <tromey@redhat.com>
3306 Gary Benson <gbenson@redhat.com>
3307
3308 * regcache.h: Include common-regcache.h.
3309 (regcache_read_pc): Don't declare.
3310 * regcache.c (get_thread_regcache_for_ptid): New function.
3311
bd9269f7
GB
33122014-09-11 Tom Tromey <tromey@redhat.com>
3313 Gary Benson <gbenson@redhat.com>
3314
3315 * symbol.c: New file.
3316 * Makefile.in (SFILES): Add symbol.c.
3317 (OBS): Add symbol.o.
3318
f8c1d06b
GB
33192014-09-11 Gary Benson <gbenson@redhat.com>
3320
3321 * target.c (target_stop_ptid, target_continue_ptid): New
3322 functions.
3323
721ec300
GB
33242014-09-11 Tom Tromey <tromey@redhat.com>
3325 Gary Benson <gbenson@redhat.com>
3326
3327 * target.h: Include target/target.h.
3328 * target.c (target_read_memory, target_read_uint32)
3329 (target_write_memory): New functions.
3330
c5e92cca
GB
33312014-09-11 Gary Benson <gbenson@redhat.com>
3332
3333 * server.h (debug_hw_points): Don't declare.
3334 * server.c (debug_hw_points): Don't define. Replace all uses
3335 with show_debug_regs.
3336 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3337 all uses with show_debug_regs.
3338
2e4bb98a
EBM
33392014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3340
3341 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3342 endianness into account.
3343 (ppc_supply_ptrace_register): Likewise.
3344
ac740bc7
JH
33452014-09-03 James Hogan <james.hogan@imgtec.com>
3346
3347 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3348 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3349
97ea6506
GB
33502014-09-03 Gary Benson <gbenson@redhat.com>
3351
3352 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3353 ALL_DEBUG_ADDRESS_REGISTERS.
3354
df7e5265
GB
33552014-09-02 Gary Benson <gbenson@redhat.com>
3356
3357 * i386-low.h: Renamed as...
3358 * x86-low.h: New file. All type, function and variable name
3359 prefixes changed from "i386_" to "x86_". All references updated.
3360 * i386-low.c: Renamed as...
3361 * x86-low.c: New file. All type, function and variable name
3362 prefixes changed from "i386_" to "x86_". All references updated.
3363
ed859da7
GB
33642014-09-02 Gary Benson <gbenson@redhat.com>
3365
3366 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3367 (x86_linux_new_thread): Likewise.
3368
860789c7
GB
33692014-08-29 Gary Benson <gbenson@redhat.com>
3370
3371 * server.h (setjmp.h): Do not include.
3372 (toplevel): Do not declare.
3373 (common-exceptions.h): Include.
3374 (cleanups.h): Likewise.
3375 * server.c (toplevel): Do not define.
3376 (exit_code): New static global.
3377 (detach_or_kill_for_exit_cleanup): New function.
3378 (main): New function. Original main renamed to...
3379 (captured_main): New function.
3380 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3381
ff55e1b5
GB
33822014-08-29 Gary Benson <gbenson@redhat.com>
3383
3384 * Makefile.in (SFILES): Add common/common-exceptions.c.
3385 (OBS): Add common-exceptions.o.
3386 (common-exceptions.o): New rule.
3387 * utils.c (prepare_to_throw_exception): New function.
3388
e9bcb658
GB
33892014-08-29 Gary Benson <gbenson@redhat.com>
3390
3391 * config.in: Regenerate.
3392 * configure: Likewise.
3393
e3180625
GB
33942014-08-29 Gary Benson <gbenson@redhat.com>
3395
3396 * Makefile.in (SFILES): Add common/cleanups.c.
3397 (OBS): cleanups.o.
3398 (cleanups.o): New rule.
3399
e3d6ba5d
GB
34002014-08-29 Gary Benson <gbenson@redhat.com>
3401
3402 * utils.c (internal_vwarning): New function.
3403
7096e886
GB
34042014-08-28 Gary Benson <gbenson@redhat.com>
3405
3406 * utils.h (fatal): Remove declaration.
3407 * utils.c (fatal): Remove function.
3408
14ce3192
GB
34092014-08-28 Gary Benson <gbenson@redhat.com>
3410
3411 * tracepoint.c (gdb_agent_init): Replace fatal with
3412 perror_with_name.
3413 (initialize_tracepoint): Likewise.
3414
50278d59
GB
34152014-08-28 Gary Benson <gbenson@redhat.com>
3416
3417 * remote-utils.c (remote_prepare): Replace fatal with error.
3418
aa96c426
GB
34192014-08-28 Gary Benson <gbenson@redhat.com>
3420
3421 * linux-low.c (linux_async): Replace fatal with warning.
3422 Tidy up and return.
3423 (linux_start_non_stop): Return -1 if linux_async failed.
3424
f7160e97
GB
34252014-08-28 Gary Benson <gbenson@redhat.com>
3426
3427 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3428 gdb_assert.
3429 (i386_dr_low_get_addr): Remove vague comment.
3430 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3431 gdb_assert.
3432
38e08fca
GB
34332014-08-28 Gary Benson <gbenson@redhat.com>
3434
3435 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3436 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3437 internal_error.
3438 (linux_resume_one_lwp): Likewise.
3439 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3440 gdb_assert.
3441 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3442 with internal_error.
3443 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3444 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3445 (find_register_by_name): Replace fatal with internal_error.
3446 (find_regno): Likewise.
3447 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3448 * thread-db.c (thread_db_create_event): Likewise.
3449 (thread_db_load_search): Likewise.
3450 (try_thread_db_load_1): Likewise.
3451 * tracepoint.c (get_jump_space_head): Replace fatal with
3452 internal_error.
3453 (claim_trampoline_space): Likewise.
3454 (have_fast_tracepoint_trampoline_buffer): Likewise.
3455 (cmd_qtstart): Likewise.
3456 (stop_tracing): Likewise.
3457 (fast_tracepoint_collecting): Likewise.
3458 (target_malloc): Likewise.
3459 (download_tracepoint): Likewise.
3460 (download_trace_state_variables): Replace check with gdb_assert.
3461 (upload_fast_traceframes): Replace fatal with internal_error.
3462
34abf635
GB
34632014-08-19 Tom Tromey <tromey@redhat.com>
3464 Gary Benson <gbenson@redhat.com>
3465
3466 * Makefile.in (SFILES): Add common/common-debug.c.
3467 (OBS): Add common-debug.o.
3468 (common-debug.o): New rule.
3469 * debug.h (debug_printf): Don't declare.
3470 * debug.c (debug_printf): Renamed and rewritten as...
3471 (debug_vprintf): New function.
3472
f6e94d78
GB
34732014-08-19 Gary Benson <gbenson@redhat.com>
3474
3475 * utils.h: Do not include print-utils.h.
3476
9239eeab
GB
34772014-08-19 Tom Tromey <tromey@redhat.com>
3478 Gary Benson <gbenson@redhat.com>
3479
3480 * server.h: Add static assertion.
3481 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3482
ef87c8bb
GB
34832014-08-19 Tom Tromey <tromey@redhat.com>
3484 Gary Benson <gbenson@redhat.com>
3485
3486 * Makefile.in (SFILES): Add common/errors.c.
3487 (OBS): Add errors.o.
3488 (IPA_OBS): Add errors-ipa.o.
3489 (errors.o): New rule.
3490 (errors-ipa.o): Likewise.
3491 * utils.h (perror_with_name, error, warning): Don't declare.
3492 * utils.c (warning): Renamed and rewritten as...
3493 (vwarning): New function.
3494 (error): Renamed and rewritten as...
3495 (verror): New function.
3496 (internal_error): Renamed and rewritten as...
3497 (internal_verror): New function.
3498
bb974a24
GB
34992014-08-07 Gary Benson <gbenson@redhat.com>
3500
3501 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3502 * configure: Regenerate.
3503 * config.in: Likewise.
3504 * server.h: Do not include errno.h.
3505 * event-loop.c: Likewise.
3506 * hostio-errno.c: Likewise.
3507 * linux-low.c: Likewise.
3508 * remote-utils.c: Likewise.
3509 * spu-low.c: Likewise.
3510 * utils.c: Likewise.
3511 * gdbreplay.c: Unconditionally include errno.h.
3512
6d3d12eb
GB
35132014-08-07 Gary Benson <gbenson@redhat.com>
3514
3515 * server.h: Do not include string.h.
3516 * event-loop.c: Likewise.
3517 * linux-low.c: Likewise.
3518 * regcache.c: Likewise.
3519 * remote-utils.c: Likewise.
3520 * spu-low.c: Likewise.
3521 * utils.c: Likewise.
3522
dccbb609
GB
35232014-08-07 Gary Benson <gbenson@redhat.com>
3524
3525 * server.h: Do not include gdb_assert.h.
3526
e76df0d0
GB
35272014-08-07 Gary Benson <gbenson@redhat.com>
3528
3529 * server.h: Do not include common-utils.h.
3530
4cb9c816
GB
35312014-08-07 Gary Benson <gbenson@redhat.com>
3532
3533 * server.h: Do not include ptid.h.
3534 * notif.h: Likewise.
3535
3995eeee
GB
35362014-08-07 Gary Benson <gbenson@redhat.com>
3537
3538 * server.h: Do not include gdb_locale.h.
3539
cb9f1a9b
GB
35402014-08-07 Gary Benson <gbenson@redhat.com>
3541
3542 * server.h: Do not include gdb/signals.h.
3543 * win32-low.c: Likewise.
3544
a5fceff8
GB
35452014-08-07 Gary Benson <gbenson@redhat.com>
3546
3547 * server.h: Do not include pathmax.h.
3548
b9391142
GB
35492014-08-07 Gary Benson <gbenson@redhat.com>
3550
3551 * server.h: Do not include libiberty.h.
3552 * linux-bfin-low.c: Likewise.
3553
0e443c87
GB
35542014-08-07 Gary Benson <gbenson@redhat.com>
3555
3556 * server.h: Do not include ansidecl.h.
3557
8ebb3f56
GB
35582014-08-07 Gary Benson <gbenson@redhat.com>
3559
3560 * linux-x86-low.c: Do not include stddef.h.
3561 * lynx-ppc-low.c: Likewise.
3562 * tracepoint.c: Likewise.
3563
8980bdf6
GB
35642014-08-07 Gary Benson <gbenson@redhat.com>
3565
3566 * server.h: Do not include stdarg.h.
3567 * nto-low.c: Likewise.
3568
d7096f71
GB
35692014-08-07 Gary Benson <gbenson@redhat.com>
3570
3571 * server.h: Do not include stdlib.h.
3572 * inferiors.c: Likewise.
3573 * linux-low.c: Likewise.
3574 * regcache.c: Likewise.
3575 * spu-low.c: Likewise.
3576 * tracepoint.c: Likewise.
3577 * utils.c: Likewise.
3578
d02f550d
GB
35792014-08-07 Gary Benson <gbenson@redhat.com>
3580
3581 * server.h: Do not include stdio.h.
3582 * linux-low.c: Likewise.
3583 * remote-utils.c: Likewise.
3584 * spu-low.c: Likewise.
3585 * utils.c: Likewise.
3586 * wincecompat.c: Likewise.
3587
87f6c4e3
GB
35882014-08-06 Gary Benson <gbenson@redhat.com>
3589
3590 * regcache.c (init_register_cache): Move conditionals inside if.
3591
7089dca4
GB
35922014-08-06 Gary Benson <gbenson@redhat.com>
3593
3594 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3595
462f517e
GB
35962014-07-31 Gary Benson <gbenson@redhat.com>
3597
3598 * ax.h: Do not include server.h.
3599 * gdbthread.h: Likewise.
3600 * lynx-low.h: Likewise.
3601 * notif.h: Likewise.
3602
976411d6
GB
36032014-07-30 Gary Benson <gbenson@redhat.com>
3604
3605 * server.h: Include common-defs.h.
3606 Do not include config.h or build-gnulib-gdbserver/config.h.
3607
d41f6d8e
GB
36082014-07-30 Gary Benson <gbenson@redhat.com>
3609
3610 * hostio-errno.c: Move server.h to top of includes list.
3611 * inferiors.c: Likewise.
3612 * linux-x86-low.c: Likewise.
3613 * notif.c: Include server.h.
3614
314c6a35
TT
36152014-07-24 Tom Tromey <tromey@redhat.com>
3616 Gary Benson <gbenson@redhat.com>
3617
3618 * server.h (CORE_ADDR): Now unsigned.
3619
69ff6be5
PA
36202014-07-16 Pedro Alves <palves@redhat.com>
3621
3622 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3623
ce9e3fe7
PA
36242014-07-15 Pedro Alves <palves@redhat.com>
3625
3626 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3627 copy.
3628
e76126e8
PA
36292014-07-11 Pedro Alves <palves@redhat.com>
3630
3631 * linux-low.c (kill_wait_lwp): New function, based on
3632 kill_one_lwp_callback, but use my_waitpid directly.
3633 (kill_one_lwp_callback, linux_kill): Use it.
3634
8e9db26e
PA
36352014-06-23 Pedro Alves <palves@redhat.com>
3636
3637 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3638 before setting DR0..DR3.
3639
698b3e08
GB
36402014-06-20 Gary Benson <gbenson@redhat.com>
3641
3642 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3643 * configure: Regenerated.
3644 * config.in: Likewise.
3645
125f8a3d
GB
36462014-06-20 Gary Benson <gbenson@redhat.com>
3647
3648 * Makefile.in (SFILES): Update locations for files moved
3649 from common to nat.
3650 (object file files): Reordered.
3651
42995dbd
GB
36522014-06-20 Gary Benson <gbenson@redhat.com>
3653
3654 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3655 (i386_dr_low_set_addr): Likewise.
3656 (i386_dr_low_get_addr): Likewise.
3657 (i386_dr_low_can_set_control): Likewise.
3658 (i386_dr_low_set_control): Likewise.
3659 (i386_dr_low_get_control): Likewise.
3660 (i386_dr_low_get_status): Likewise.
3661 (i386_get_debug_register_length): Likewise.
3662 * linux-x86-low.c (i386_dr_low_set_addr):
3663 Changed signature. Made static.
3664 (i386_dr_low_get_addr): Likewise.
3665 (i386_dr_low_set_control): Likewise.
3666 (i386_dr_low_get_control): Likewise.
3667 (i386_dr_low_get_status): Likewise.
3668 (i386_dr_low): New global variable.
3669 * win32-i386-low.c (i386_dr_low_set_addr):
3670 Changed signature. Made static.
3671 (i386_dr_low_get_addr): Likewise.
3672 (i386_dr_low_set_control): Likewise.
3673 (i386_dr_low_get_control): Likewise.
3674 (i386_dr_low_get_status): Likewise.
3675 (i386_dr_low): New global variable.
3676
e1d2394b
MS
36772014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3678
3679 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3680 * Makefile.in (AR, AR_FLAGS): Define.
3681 * configure: Regenerate.
3682
3a8ee006
GB
36832014-06-19 Gary Benson <gbenson@redhat.com>
3684
3685 * Makefile.in (i386-dregs.o): New rule.
3686 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3687 * i386-low.c (target.h): Remove include.
3688 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3689 (DR_CONTROL_SHIFT): Likewise.
3690 (DR_CONTROL_SIZE): Likewise.
3691 (DR_RW_EXECUTE): Likewise.
3692 (DR_RW_WRITE): Likewise.
3693 (DR_RW_READ): Likewise.
3694 (DR_RW_IORW): Likewise.
3695 (DR_LEN_1): Likewise.
3696 (DR_LEN_2): Likewise.
3697 (DR_LEN_4): Likewise.
3698 (DR_LEN_8): Likewise.
3699 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3700 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3701 (DR_ENABLE_SIZE): Likewise.
3702 (DR_LOCAL_SLOWDOWN): Likewise.
3703 (DR_GLOBAL_SLOWDOWN): Likewise.
3704 (DR_CONTROL_RESERVED): Likewise.
3705 (I386_DR_CONTROL_MASK): Likewise.
3706 (I386_DR_VACANT): Likewise.
3707 (I386_DR_LOCAL_ENABLE): Likewise.
3708 (I386_DR_GLOBAL_ENABLE): Likewise.
3709 (I386_DR_DISABLE): Likewise.
3710 (I386_DR_SET_RW_LEN): Likewise.
3711 (I386_DR_GET_RW_LEN): Likewise.
3712 (I386_DR_WATCH_HIT): Likewise.
3713 (i386_wp_op_t): Likewise.
3714 (i386_show_dr): Likewise.
3715 (i386_length_and_rw_bits): Likewise.
3716 (i386_insert_aligned_watchpoint): Likewise.
3717 (i386_remove_aligned_watchpoint): Likewise.
3718 (i386_handle_nonaligned_watchpoint): Likewise.
3719 i386_update_inferior_debug_regs(): Likewise.
3720 (i386_dr_insert_watchpoint): Likewise.
3721 (i386_dr_remove_watchpoint): Likewise.
3722 (i386_dr_region_ok_for_watchpoint): Likewise.
3723 (i386_dr_stopped_data_address): Likewise.
3724 (i386_dr_stopped_by_watchpoint): Likewise.
3725
8f26655c
GB
37262014-06-19 Gary Benson <gbenson@redhat.com>
3727
3728 * i386-low.c (i386_dr_show): Renamed to
3729 i386_show_dr and made static. All uses updated.
3730 (i386_dr_length_and_rw_bits): Renamed to
3731 i386_length_and_rw_bits and made static.
3732 All uses updated.
3733 (i386_dr_insert_aligned_watchpoint): Renamed to
3734 i386_insert_aligned_watchpoint and made static.
3735 All uses updated.
3736 (i386_dr_remove_aligned_watchpoint): Renamed to
3737 i386_remove_aligned_watchpoint and made static.
3738 All uses updated.
3739 (i386_dr_update_inferior_debug_regs): Renamed to
3740 i386_update_inferior_debug_regs and made static.
3741 All uses updated.
3742
b9228891
GB
37432014-06-18 Gary Benson <gbenson@redhat.com>
3744
5171def3
GB
3745 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3746 (i386_dr_low_can_set_control): Likewise.
3747 (i386_get_debug_register_length): Likewise.
3748 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3749 (i386_dr_low_can_set_control): Likewise.
3750 (i386_get_debug_register_length): Likewise.
3751
37522014-06-17 Gary Benson <gbenson@redhat.com>
3753
b9228891
GB
3754 * i386-low.h (i386-dregs.h): New include.
3755 (DR_FIRSTADDR): Now in i386-dregs.h.
3756 (DR_LASTADDR): Likewise.
3757 (DR_NADDR): Likewise.
3758 (DR_STATUS): Likewise.
3759 (DR_CONTROL): Likewise.
3760 (i386_debug_reg_state): Likewise.
3761 (i386_dr_insert_watchpoint): Likewise.
3762 (i386_dr_remove_watchpoint): Likewise.
3763 (i386_dr_region_ok_for_watchpoint): Likewise.
3764 (i386_dr_stopped_data_address): Likewise.
3765 (i386_dr_stopped_by_watchpoint): Likewise.
3766 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3767
4be83cc2
GB
37682014-06-18 Gary Benson <gbenson@redhat.com>
3769
3770 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3771 i386_dr_insert_watchpoint.
3772 (i386_low_remove_watchpoint): Renamed to
3773 i386_dr_remove_watchpoint.
3774 (i386_low_region_ok_for_watchpoint): Renamed to
3775 i386_dr_region_ok_for_watchpoint.
3776 (i386_low_stopped_data_address): Renamed to
3777 i386_dr_stopped_data_address.
3778 (i386_low_stopped_by_watchpoint): Renamed to
3779 i386_dr_stopped_by_watchpoint.
3780 * i386-low.c (i386_show_dr): Renamed to
3781 i386_dr_show and made nonstatic. All uses updated.
3782 (i386_length_and_rw_bits): Renamed to
3783 i386_dr_length_and_rw_bits and made nonstatic.
3784 All uses updated.
3785 (i386_insert_aligned_watchpoint): Renamed to
3786 i386_dr_insert_aligned_watchpoint and made nonstatic.
3787 All uses updated.
3788 (i386_remove_aligned_watchpoint): Renamed to
3789 i386_dr_remove_aligned_watchpoint and made nonstatic.
3790 All uses updated.
3791 (i386_update_inferior_debug_regs): Renamed to
3792 i386_dr_update_inferior_debug_regs and made nonstatic.
3793 All uses updated.
3794 (i386_low_insert_watchpoint): Renamed to
3795 i386_dr_insert_watchpoint. All uses updated.
3796 (i386_low_remove_watchpoint): Renamed to
3797 i386_dr_remove_watchpoint. All uses updated.
3798 (i386_low_region_ok_for_watchpoint): Renamed to
3799 i386_dr_region_ok_for_watchpoint. All uses updated.
3800 (i386_low_stopped_data_address): Renamed to
3801 i386_dr_stopped_data_address. All uses updated.
3802 (i386_low_stopped_by_watchpoint): Renamed to
3803 i386_dr_stopped_by_watchpoint. All uses updated.
3804
131aa0d4
GB
38052014-06-18 Gary Benson <gbenson@redhat.com>
3806
3807 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3808 (i386_dr_low_can_set_control): Likewise.
3809 (i386_insert_aligned_watchpoint): New check.
3810
d9305f7f
GB
38112014-06-18 Gary Benson <gbenson@redhat.com>
3812
3813 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3814 Renamed to state.
3815
e927c9fc
GB
38162014-06-18 Gary Benson <gbenson@redhat.com>
3817
3818 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3819 instead of fatal and error.
3820 (i386_handle_nonaligned_watchpoint): Likewise.
3821
1b6d4134
GB
38222014-06-18 Gary Benson <gbenson@redhat.com>
3823
3824 * i386-low.c (i386_get_debug_register_length): New macro.
3825 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3826 (i386_show_dr): Use debug_printf instead of fprintf. Use
3827 phex to format values.
3828
6e62758f
GB
38292014-06-18 Gary Benson <gbenson@redhat.com>
3830
3831 * i386-low.h: Comment changes.
3832 * i386-low.c: Likewise.
3833
fc6e2f03
GB
38342014-06-18 Gary Benson <gbenson@redhat.com>
3835
3836 * i386-low.c: Whitespace changes.
3837
f9d1eeed
TT
38382014-06-12 Tom Tromey <tromey@redhat.com>
3839
3840 * utils.c (freeargv): Remove.
3841
0b04e523
TT
38422014-06-12 Tom Tromey <tromey@redhat.com>
3843
3844 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3845 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3846 (parse_debug_format_options): Likewise.
3847 (gdbserver_usage): Likewise.
3848 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3849 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3850 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3851 against libiberty.
3852 ($(LIBGNU)): Depend on libiberty.
3853 (all-lib): Recurse into all subdirs.
3854 (install-only): Invoke "install" target in subdirs.
3855 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3856 targets.
3857 * configure: Rebuild.
3858 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3859 for vasprintf, vsnprintf, or gettimeofday.
3860 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3861 srv_tgtobj.
3862
270c9937
JB
38632014-06-05 Joel Brobecker <brobecker@adacore.com>
3864
3865 * development.sh: Delete.
3866 * Makefile.in (config.status): Adjust dependency on development.sh.
3867 * configure.ac: Adjust development.sh source call.
3868 * configure: Regenerate.
3869
0a261ed8
PA
38702014-06-02 Pedro Alves <palves@redhat.com>
3871
3872 * ax.c (gdb_free_agent_expr): New function.
3873 * ax.h (gdb_free_agent_expr): New declaration.
3874 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3875 list.
3876 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3877 static.
3878 (clear_breakpoint_conditions_and_commands): New function.
3879 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3880 (clear_breakpoint_conditions_and_commands): New declaration.
3881
e9dae05e
RR
38822014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3883
3884 * linux-aarch64-low.c (asm/ptrace.h): Include.
3885
5876f503
JK
38862014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3887
3888 Fix TLS access for -static -pthread.
3889 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3890 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3891 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3892
802e8e6d
PA
38932014-05-20 Pedro Alves <palves@redhat.com>
3894
3895 * linux-aarch64-low.c (aarch64_insert_point)
3896 (aarch64_remove_point): No longer check whether the type is
3897 supported here. Adjust to new interface.
3898 (the_low_target): Install aarch64_supports_z_point_type as
3899 supports_z_point_type method.
3900 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3901 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3902 instead of a Z packet char. Adjust.
3903 (arm_supports_z_point_type): New function.
3904 (arm_insert_point, arm_remove_point): Adjust to new interface.
3905 (the_low_target): Install arm_supports_z_point_type.
3906 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3907 (cris_insert_point, cris_remove_point): Adjust to new interface.
3908 Don't check whether the type is supported here.
3909 (the_low_target): Install cris_supports_z_point_type.
3910 * linux-low.c (linux_supports_z_point_type): New function.
3911 (linux_insert_point, linux_remove_point): Adjust to new interface.
3912 * linux-low.h (struct linux_target_ops) <insert_point,
3913 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3914 raw_breakpoint pointer parameter.
3915 <supports_z_point_type>: New method.
3916 * linux-mips-low.c (mips_supports_z_point_type): New function.
3917 (mips_insert_point, mips_remove_point): Adjust to new interface.
3918 Use mips_supports_z_point_type.
3919 (the_low_target): Install mips_supports_z_point_type.
3920 * linux-ppc-low.c (the_low_target): Install NULL as
3921 supports_z_point_type method.
3922 * linux-s390-low.c (the_low_target): Install NULL as
3923 supports_z_point_type method.
3924 * linux-sparc-low.c (the_low_target): Install NULL as
3925 supports_z_point_type method.
3926 * linux-x86-low.c (x86_supports_z_point_type): New function.
3927 (x86_insert_point): Adjust to new insert_point interface. Use
3928 insert_memory_breakpoint. Adjust to new
3929 i386_low_insert_watchpoint interface.
3930 (x86_remove_point): Adjust to remove_point interface. Use
3931 remove_memory_breakpoint. Adjust to new
3932 i386_low_remove_watchpoint interface.
3933 (the_low_target): Install x86_supports_z_point_type.
3934 * lynx-low.c (lynx_target_ops): Install NULL as
3935 supports_z_point_type callback.
3936 * nto-low.c (nto_supports_z_point_type): New.
3937 (nto_insert_point, nto_remove_point): Adjust to new interface.
3938 (nto_target_ops): Install nto_supports_z_point_type.
3939 * mem-break.c: Adjust intro comment.
3940 (struct raw_breakpoint) <raw_type, size>: New fields.
3941 <inserted>: Update comment.
3942 <shlib_disabled>: Delete field.
3943 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3944 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3945 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3946 (raw_bkpt_type_to_target_hw_bp_type): New function.
3947 (find_enabled_raw_code_breakpoint_at): New function.
3948 (find_raw_breakpoint_at): New type and size parameters. Use them.
3949 (insert_memory_breakpoint): New function, based off
3950 set_raw_breakpoint_at.
3951 (remove_memory_breakpoint): New function.
3952 (set_raw_breakpoint_at): Reimplement.
3953 (set_breakpoint): New, based on set_breakpoint_at.
3954 (set_breakpoint_at): Reimplement.
3955 (delete_raw_breakpoint): Go through the_target->remove_point
3956 instead of assuming memory breakpoints.
3957 (find_gdb_breakpoint_at): Delete.
3958 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3959 (find_gdb_breakpoint): New function.
3960 (set_gdb_breakpoint_at): Delete.
3961 (z_type_supported): New function.
3962 (set_gdb_breakpoint_1): New function, loosely based off
3963 set_gdb_breakpoint_at.
3964 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3965 (delete_gdb_breakpoint_at): Delete.
3966 (delete_gdb_breakpoint_1): New function, loosely based off
3967 delete_gdb_breakpoint_at.
3968 (delete_gdb_breakpoint): New function.
3969 (clear_gdb_breakpoint_conditions): Rename to ...
3970 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3971 breakpoint.
3972 (add_condition_to_breakpoint): Make static.
3973 (add_breakpoint_condition): Take a struct breakpoint pointer
3974 instead of an address. Adjust.
3975 (gdb_condition_true_at_breakpoint): Rename to ...
3976 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3977 z_type parameter.
3978 (gdb_condition_true_at_breakpoint): Reimplement.
3979 (add_breakpoint_commands): Take a struct breakpoint pointer
3980 instead of an address. Adjust.
3981 (gdb_no_commands_at_breakpoint): Rename to ...
3982 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3983 parameter. Return true if no breakpoint was found. Change debug
3984 output.
3985 (gdb_no_commands_at_breakpoint): Reimplement.
3986 (run_breakpoint_commands): Rename to ...
3987 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3988 and change return type to boolean.
3989 (run_breakpoint_commands): New function.
3990 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3991 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3992 breakpoint. Go through the_target->remove_point instead of
3993 assuming memory breakpoint.
3994 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3995 software and hardware breakpoints.
3996 (reinsert_raw_breakpoint): Go through the_target->insert_point
3997 instead of assuming memory breakpoint.
3998 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3999 software and hardware breakpoints.
4000 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4001 Check both software and hardware breakpoints.
4002 (validate_inserted_breakpoint): Assert the breakpoint is a
4003 software breakpoint. Set the inserted flag to -1 instead of
4004 setting shlib_disabled.
4005 (delete_disabled_breakpoints): Adjust.
4006 (validate_breakpoints): Only validate software breakpoints.
4007 Adjust to inserted flag change.
4008 (check_mem_read, check_mem_write): Skip breakpoint types other
4009 than software breakpoints. Adjust to inserted flag change.
4010 * mem-break.h (enum raw_bkpt_type): New enum.
4011 (raw_breakpoint, struct process_info): Forward declare.
4012 (Z_packet_to_target_hw_bp_type): Delete declaration.
4013 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4014 (set_gdb_breakpoint, delete_gdb_breakpoint)
4015 (clear_breakpoint_conditions): New declarations.
4016 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4017 (breakpoint_inserted_here): Update comment.
4018 (add_breakpoint_condition, add_breakpoint_commands): Replace
4019 address parameter with a breakpoint pointer parameter.
4020 (gdb_breakpoint_here): Update comment.
4021 (delete_gdb_breakpoint_at): Delete.
4022 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4023 * server.c (process_point_options): Take a struct breakpoint
4024 pointer instead of an address. Adjust.
4025 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4026 delete_gdb_breakpoint.
4027 * spu-low.c (spu_target_ops): Install NULL as
4028 supports_z_point_type method.
4029 * target.h: Include mem-break.h.
4030 (struct target_ops) <prepare_to_access_memory>: Update comment.
4031 <supports_z_point_type>: New field.
4032 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4033 instead of a char. Also take a raw breakpoint pointer.
4034 * win32-arm-low.c (the_low_target): Install NULL as
4035 supports_z_point_type.
4036 * win32-i386-low.c (i386_supports_z_point_type): New function.
4037 (i386_insert_point, i386_remove_point): Adjust to new interface.
4038 (the_low_target): Install i386_supports_z_point_type.
4039 * win32-low.c (win32_supports_z_point_type): New function.
4040 (win32_insert_point, win32_remove_point): Adjust to new interface.
4041 (win32_target_ops): Install win32_supports_z_point_type.
4042 * win32-low.h (struct win32_target_ops):
4043 <supports_z_point_type>: New method.
4044 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4045 instead of a char. Also take a raw breakpoint pointer.
4046
932539e3
PA
40472014-05-20 Pedro Alves <palves@redhat.com>
4048
4049 * mem-break.h: Include break-common.h.
4050 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4051 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4052 (Z_packet_to_target_hw_bp_type): New declaration.
4053 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4054 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4055 (Z_PACKET_ACCESS_WP): Delete macros.
4056 (Z_packet_to_hw_type): Delete function.
4057 * i386-low.h: Don't include break-common.h here.
4058 (Z_packet_to_hw_type): Delete declaration.
4059 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4060 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4061 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4062 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4063 * linux-aarch64-low.c: Don't include break-common.h here.
4064 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4065 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4066 (Z_packet_to_target_hw_bp_type): Delete function.
4067 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4068 function.
4069 (mips_insert_point, mips_remove_point): Use
4070 Z_packet_to_target_hw_bp_type.
4071
4ff0d3d8
PA
40722014-05-20 Pedro Alves <palves@redhat.com>
4073
4074 * linux-aarch64-low.c: Include break-common.h.
4075 (enum target_point_type): Delete.
4076 (Z_packet_to_point_type): Rename to ...
4077 (Z_packet_to_target_hw_bp_type): ... this, and return a
4078 target_hw_bp_type instead.
4079 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4080 instead of an enum target_point_type.
4081 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4082 breakpoint type.
4083 (aarch64_dr_state_insert_one_point)
4084 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4085 (aarch64_handle_aligned_watchpoint)
4086 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4087 Take an enum target_hw_bp_type instead of an enum
4088 target_point_type.
4089 (aarch64_supports_z_point_type): New function.
4090 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4091 use Z_packet_to_target_hw_bp_type.
4092
786dc519
JB
40932014-05-20 Joel Brobecker <brobecker@adacore.com>
4094
4095 * configure.ac: Only use -Werror by default when DEVELOPMENT
4096 is true.
4097 * configure: Regenerate.
4098
9e0aa64f
JK
40992014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4100
4101 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4102 * linux-x86-low.c (X86_64_USER_REGS): New.
4103 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4104
2b577b92
YQ
41052014-04-28 Yao Qi <yao@codesourcery.com>
4106
4107 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4108 name.
4109
94611da2
PA
41102014-04-25 Pedro Alves <palves@redhat.com>
4111
4112 PR server/16255
4113 * linux-low.c (linux_attach_fail_reason_string): New function.
4114 (linux_attach_lwp): Delete.
4115 (linux_attach_lwp_1): Rename to ...
4116 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4117 argument. Remove "initial" parameter. Return int instead of
4118 void. Don't error or warn here.
4119 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4120 failure to attach to the tgid. Call warning when failing to
4121 attach to an lwp.
4122 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4123 argument. Remove "initial" parameter. Return int instead of
4124 void. Don't error or warn here.
4125 (linux_attach_fail_reason_string): New declaration.
4126 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4127 interface change. Use linux_attach_fail_reason_string.
4128
01f9f808
MS
41292014-04-24 Michael Sturm <michael.sturm@mintel.com>
4130 Walfred Tedeschi <walfred.tedeschi@intel.com>
4131
4132 * Makefile.in: Added rules to handle new files
4133 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4134 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4135 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4136 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4137 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4138 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4139 x32-avx512-linux.o.
4140 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4141 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4142 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4143 i386/x32-avx512.xml.
4144 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4145 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4146 i386/x32-avx512-linux.xml.
4147 * i387-fp.c (num_avx512_k_registers): New constant for number
4148 of K registers.
4149 (num_avx512_zmmh_low_registers): New constant for number of
4150 lower ZMM registers (0-15).
4151 (num_avx512_zmmh_high_registers): New constant for number of
4152 higher ZMM registers (16-31).
4153 (num_avx512_ymmh_registers): New contant for number of higher
4154 YMM registers (ymm16-31 added by avx521 on x86_64).
4155 (num_avx512_xmm_registers): New constant for number of higher
4156 XMM registers (xmm16-31 added by AVX512 on x86_64).
4157 (struct i387_xsave): Add space for AVX512 registers.
4158 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4159 Add code to handle AVX512 registers.
4160 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4161 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4162 prototypei from generated file.
4163 (tdesc_amd64_avx512_linux): Likewise.
4164 (init_registers_x32_avx512_linux): Likewise.
4165 (tdesc_x32_avx512_linux): Likewise.
4166 (init_registers_i386_avx512_linux): Likewise.
4167 (tdesc_i386_avx512_linux): Likewise.
4168 (x86_64_regmap): Add AVX512 registers.
4169 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4170 mask.
4171 (initialize_low_arch): Add code to initialize AVX512 registers.
4172
51aa91f9
PA
41732014-04-23 Pedro Alves <palves@redhat.com>
4174
4175 * mem-break.c (find_gdb_breakpoint_at): Make static.
4176 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4177
a4165e94
PA
41782014-04-23 Pedro Alves <palves@redhat.com>
4179
4180 * i386-low.c: Don't include break-common.h here.
4181 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4182 prototype to take target_hw_bp_type as argument instead of a Z
4183 packet char.
4184 * i386-low.h: Include break-common.h here.
4185 (Z_packet_to_hw_type): Declare.
4186 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4187 prototypes.
4188 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4189 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4190 (x86_remove_point): Convert the packet number to a
4191 target_hw_bp_type before calling i386_low_remove_watchpoint.
4192 * win32-i386-low.c (i386_insert_point): Convert the packet number
4193 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4194 (i386_remove_point): Convert the packet number to a
4195 target_hw_bp_type before calling i386_low_remove_watchpoint.
4196
b8acf843
PA
41972014-04-23 Pedro Alves <palves@redhat.com>
4198
4199 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4200
d708bcd1
PA
42012014-04-10 Pedro Alves <palves@redhat.com>
4202
4203 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4204 Check if the condition or command is NULL before checking if the
4205 breakpoint is known. On success, return true.
4206 * mem-break.h (add_breakpoint_condition): Document return.
4207 (add_breakpoint_commands): Add describing comment.
4208 * server.c (skip_to_semicolon): New function.
4209 (process_point_options): Use it.
4210
2eec7d5b
PA
42112014-04-09 Pedro Alves <palves@redhat.com>
4212
4213 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4214 to lwpid_of.
4215
fa96cb38
PA
42162014-02-27 Pedro Alves <palves@redhat.com>
4217
4218 PR 12702
4219 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4220 macros.
4221 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4222 output.
4223 (last_thread_of_process_p): Take a PID argument instead of a
4224 thread pointer.
4225 (linux_wait_for_lwp): Delete.
4226 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4227 functions.
4228 (linux_low_filter_event): New function, party factored out from
4229 linux_wait_for_event.
4230 (linux_wait_for_event): Rename to ...
4231 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4232 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4233 sigsuspend. Check for zombie leaders.
4234 (linux_wait_for_event): Reimplement as wrapper around
4235 linux_wait_for_event_filtered.
4236 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4237 a normal or signal exit is seen, it's the whole process exiting.
4238 (wait_for_sigstop): No longer a for_each_inferior callback.
4239 Rewrite on top of linux_wait_for_event_filtered.
4240 (stop_all_lwps): Call wait_for_sigstop directly.
4241 * server.c (resume, handle_target_event): Handle
4242 TARGET_WAITKIND_NO_RESUMED.
4243
d763de10
JB
42442014-02-26 Joel Brobecker <brobecker@adacore.com>
4245
4246 * win32-low.c (psapi_get_dll_name,
4247 * win32_CreateToolhelp32Snapshot): Delete.
4248 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4249 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4250 Delete.
4251 (handle_load_dll): Add function description.
4252 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4253
850a0f76
JB
42542014-02-26 Joel Brobecker <brobecker@adacore.com>
4255
4256 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4257 Add comment.
4258 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4259 base address when calling win32_add_one_solib.
4260 (handle_load_dll): Delete local variable load_addr.
4261 Remove 0x1000 offset applied to DLL base address when calling
4262 win32_add_one_solib.
4263 (handle_unload_dll): Add comment.
4264
f25b3fc3
JB
42652014-02-26 Joel Brobecker <brobecker@adacore.com>
4266
4267 * win32-low.c (win32_add_all_dlls): Renames
4268 win32_ensure_ntdll_loaded. Rewrite function documentation.
4269 Adjust implementation to always load all DLLs.
4270 Add 0x1000 offset to DLL base address when calling
4271 win32_add_one_solib.
4272 (child_initialization_done): New static global.
4273 (do_initial_child_stuff): Set child_initialization_done to
4274 zero during child initialization, and 1 after. Replace call
4275 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4276 Add comment.
4277 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4278 (handle_unload_dll): Add function documentation.
4279 (get_child_debug_event): Ignore load and unload DLL events
4280 during child initialization.
4281
d86d4aaf
DE
42822014-02-20 Doug Evans <dje@google.com>
4283
3bc32da3 4284 Remove global all_lwps.
d86d4aaf
DE
4285 * inferiors.h (ptid_of): Move here from linux-low.h.
4286 (pid_of, lwpid_of): Ditto.
4287 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4288 parameter is a struct thread_info * now.
4289 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4290 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4291 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4292 directly.
4293 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4294 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4295 * linux-arm-low.c (update_registers_callback): Update, "entry"
4296 parameter is a struct thread_info * now.
4297 Fetch lwpid from current_inferior directly.
4298 (arm_insert_point): Pass &all_threads to find_inferior instead of
4299 &all_lwps.
4300 (arm_remove_point): Ditto.
4301 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4302 (arm_prepare_to_resume): Fetch pid from thread.
4303 (arm_read_description): Fetch lwpid from current_inferior directly.
4304 * linux-low.c (all_lwps): Delete.
4305 (delete_lwp): Delete call to remove_inferior.
4306 (handle_extended_wait): Fetch lwpid from thread.
4307 (add_lwp): Don't set lwp->entry.id. Remove call to
4308 add_inferior_to_list.
4309 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4310 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4311 (kill_one_lwp_callback): Ditto.
4312 (linux_kill): Don't dereference NULL pointer.
4313 Fetch ptid,lwpid from thread.
4314 (get_detach_signal): Fetch ptid from thread.
4315 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4316 Simplify call to regcache_invalidate_thread.
4317 (delete_lwp_callback): Update, "entry" parameter is a
4318 struct thread_info * now. Fetch pid from thread.
4319 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4320 (status_pending_p_callback): Update, "entry" parameter is a
4321 struct thread_info * now. Fetch ptid from thread.
4322 (find_lwp_pid): Update, "entry" parameter is a
4323 struct thread_info * now.
4324 (linux_wait_for_lwp): Fetch pid from thread.
4325 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4326 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4327 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4328 (dequeue_one_deferred_signal): Ditto.
4329 (cancel_breakpoint): Fetch ptid from current_inferior.
4330 (linux_wait_for_event): Pass &all_threads to find_inferior,
4331 not &all_lwps. Fetch ptid, lwpid from thread.
4332 (count_events_callback): Update, "entry" parameter is a
4333 struct thread_info * now.
4334 (select_singlestep_lwp_callback): Ditto.
4335 (select_event_lwp_callback): Ditto.
4336 (cancel_breakpoints_callback): Ditto.
4337 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4338 not &all_lwps.
4339 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4340 (unsuspend_one_lwp): Update, "entry" parameter is a
4341 struct thread_info * now.
4342 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4343 not &all_lwps.
4344 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4345 Fetch lwpid from thread, not lwp.
4346 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4347 Pass &all_threads to find_inferior, not &all_lwps.
4348 (send_sigstop): Fetch lwpid from thread, not lwp.
4349 (send_sigstop_callback): Update, "entry" parameter is a
4350 struct thread_info * now.
4351 (suspend_and_send_sigstop_callback): Ditto.
4352 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4353 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4354 struct thread_info * now.
4355 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4356 from thread, lwp.
4357 (lwp_running): Update, "entry" parameter is a
4358 struct thread_info * now.
4359 (stop_all_lwps): Fetch ptid from thread.
4360 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4361 (linux_resume_one_lwp): Fetch lwpid from thread.
4362 (linux_set_resume_request): Update, "entry" parameter is a
4363 struct thread_info * now. Fetch pid, lwpid from thread.
4364 (resume_status_pending_p): Update, "entry" parameter is a
4365 struct thread_info * now.
4366 (need_step_over_p): Ditto. Fetch lwpid from thread.
4367 (start_step_over): Fetch lwpid from thread.
4368 (linux_resume_one_thread): Update, "entry" parameter is a
4369 struct thread_info * now. Fetch lwpid from thread.
4370 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4371 (proceed_one_lwp): Update, "entry" parameter is a
4372 struct thread_info * now. Fetch lwpid from thread.
4373 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4374 struct thread_info * now.
4375 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4376 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4377 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4378 directly.
4379 (regsets_store_inferior_registers): Ditto.
4380 (fetch_register, store_register): Ditto.
4381 (linux_read_memory, linux_write_memory): Ditto.
4382 (linux_request_interrupt): Ditto.
4383 (linux_read_auxv): Ditto.
4384 (linux_xfer_siginfo): Ditto.
4385 (linux_qxfer_spu): Ditto.
4386 (linux_qxfer_libraries_svr4): Ditto.
4387 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4388 moved to inferiors.h.
4389 (get_lwp): Delete.
4390 (get_thread_lwp): Update.
4391 (struct lwp_info): Delete member "entry". Simplify comment for
4392 member "thread".
4393 (all_lwps): Delete.
4394 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4395 current_inferior directly.
4396 (update_watch_registers_callback): Update, "entry" parameter is a
4397 struct thread_info * now. Fetch pid from thread.
4398 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4399 (mips_insert_point): Fetch lwpid from current_inferior.
4400 Pass &all_threads to find_inferior, not &all_lwps.
4401 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4402 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4403 directly.
4404 (mips_stopped_data_address): Ditto.
4405 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4406 directly.
4407 * linux-tile-low.c (tile_arch_setup): Ditto.
4408 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4409 (update_debug_registers_callback): Update, "entry" parameter is a
4410 struct thread_info * now. Fetch pid from thread.
4411 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4412 Pass &all_threads to find_inferior, not &all_lwps.
4413 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4414 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4415 Pass &all_threads to find_inferior, not &all_lwps.
4416 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4417 (i386_dr_low_get_status): Ditto.
4418 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4419 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4420 (x86_linux_read_description): Ditto.
4421 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4422
3b8361aa
DE
44232014-02-20 Doug Evans <dje@google.com>
4424
4425 * inferiors.c (get_first_inferior): Fix buglet.
4426
f7667f0d
DE
44272014-02-19 Doug Evans <dje@google.com>
4428
4429 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4430 * inferiors.c (add_thread): Change result type to struct thread_info *.
4431 All callers updated.
4432 (add_lwp): Call add_thread here instead of in callers.
4433 All callers updated.
4434 * linux-low.h (get_lwp_thread): Rewrite.
4435 (struct lwp_info): New member "thread".
4436
b3312d80
DE
44372014-02-19 Doug Evans <dje@google.com>
4438
4439 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4440 All callers updated.
4441
ecc6f45c
DE
44422014-02-19 Doug Evans <dje@google.com>
4443
4444 * inferiors.c (add_thread): Fix whitespace.
4445
649ebbca
DE
44462014-02-19 Doug Evans <dje@google.com>
4447
4448 * dll.c (clear_dlls): Replace accessing list implemention details
4449 with API function.
4450 * gdbthread.h (get_first_thread): Declare.
4451 * inferiors.c (for_each_inferior_with_data): New function.
4452 (get_first_thread): New function.
4453 (find_thread_ptid): Simplify.
4454 (get_first_inferior): New function.
4455 (clear_list): Delete.
4456 (one_inferior_p): New function.
4457 (clear_inferior_list): New function.
4458 (clear_inferiors): Update.
4459 * inferiors.h (for_each_inferior_with_data): Declare.
4460 (clear_inferior_list): Declare.
4461 (one_inferior_p): Declare.
4462 (get_first_inferior): Declare.
4463 * linux-low.c (linux_wait_for_event): Replace accessing list
4464 implemention details with API function.
4465 * server.c (target_running): Ditto.
4466 (accumulate_file_name_length): New function.
4467 (emit_dll_description): New function.
4468 (handle_qxfer_libraries): Replace accessing list implemention
4469 details with API function.
4470 (handle_qxfer_threads_worker): New function.
4471 (handle_qxfer_threads_proper): Replace accessing list implemention
4472 details with API function.
4473 (handle_query): Ditto.
4474 (visit_actioned_threads_callback_ftype): New typedef.
4475 (visit_actioned_threads_data): New struct.
4476 (visit_actioned_threads): Rewrite to be find_inferior callback.
4477 (resume): Call find_inferior.
4478 (handle_status): Replace accessing list implemention
4479 details with API function.
4480 (process_serial_event): Replace accessing list implemention details
4481 with API function.
4482 * target.c (set_desired_inferior): Replace accessing list implemention
4483 details with API function.
4484 * tracepoint.c (same_process_p): New function.
4485 (gdb_agent_about_to_close): Replace accessing list implemention
4486 details with API function.
4487 * win32-low.c (child_delete_thread): Replace accessing list
4488 implemention details with API function.
4489 (match_dll_by_basename): New function.
4490 (dll_is_loaded_by_basename): New function.
4491 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4492 details call to dll_is_loaded_by_basename.
4493
80894984
DE
44942014-02-19 Doug Evans <dje@google.com>
4495
4496 * dll.h (struct dll_info): Add comment.
4497 * gdbthread.h (struct thread_info): Add comment.
4498 (current_ptid): Simplify.
4499 * inferiors.c (add_process): Update.
4500 (remove_process): Update.
4501 * inferiors.h (struct process_info): Rename member "head" to "entry".
4502 * linux-low.c (delete_lwp): Update.
4503 (add_lwp): Update.
4504 (last_thread_of_process_p): Update.
4505 (kill_one_lwp_callback, linux_kill): Update.
4506 (status_pending_p_callback): Update.
4507 (wait_for_sigstop): Update. Simplify read of ptid.
4508 (start_step_over): Update.
4509 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4510 (get_lwp_thread): Update.
4511 (struct lwp_info): Rename member "head" to "entry".
4512 * regcache.h (inferior_list_entry): Delete.
4513 * server.c (kill_inferior_callback): Update.
4514 (detach_or_kill_inferior_callback): Update.
4515 (print_started_pid): Update.
4516 (print_attached_pid): Update.
4517 (process_serial_event): Simplify read of ptid.
4518 * thread-db.c (thread_db_create_event): Update.
4519 (thread_db_get_tls_address): Update.
4520 * win32-low.c (current_inferior_ptid): Simplify.
4521
46917d26
TT
45222014-02-19 Tom Tromey <tromey@redhat.com>
4523
4524 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4525 argument.
4526 (target_supports_btrace): Update.
4527
0759a81e
YQ
45282014-02-14 Yao Qi <yao@codesourcery.com>
4529
4530 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4531 (rsp-low-ipa.o): New target.
4532
a7191e8b
TT
45332014-02-12 Tom Tromey <tromey@redhat.com>
4534
4535 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4536 convert_ascii_to_int.
4537 * regcache.c (registers_to_string): Likewise.
4538 * remote-utils.c (decode_M_packet): Likewise.
4539 * server.c (process_serial_event): Likewise.
4540
ff0e980e
TT
45412014-02-12 Tom Tromey <tromey@redhat.com>
4542
4543 * server.c (handle_query, handle_v_run): Use hex2bin, not
4544 unhexify.
4545 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4546
e9371aff
TT
45472014-02-12 Tom Tromey <tromey@redhat.com>
4548
4549 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4550 convert_int_to_ascii.
4551 * regcache.c (registers_to_string, collect_register_as_string):
4552 Likewise.
4553 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4554 Likewise.
4555 * server.c (process_serial_event): Likewise.
4556 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4557 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4558
971dc0b8
TT
45592014-02-12 Tom Tromey <tromey@redhat.com>
4560
4561 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4562 bin2hex, not hexify.
4563 * tracepoint.c (cmd_qtstatus): Likewise.
4564
0a822afb
TT
45652014-02-12 Tom Tromey <tromey@redhat.com>
4566
4567 * remote-utils.c (monitor_output): Pass explicit length to
4568 hexify.
4569
9c3d6531
TT
45702014-02-12 Tom Tromey <tromey@redhat.com>
4571
4572 * tracepoint.c: Include rsp-low.h.
4573 * server.c: Include rsp-low.h.
4574 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4575 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4576 declare.
4577 * remote-utils.c: Include rsp-low.h.
4578 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4579 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4580 (convert_int_to_ascii, convert_ascii_to_int): Move to
4581 common/rsp-low.c.
4582 * regcache.c: Include rsp-low.h.
4583 * ax.c: Include rsp-low.h.
4584 * Makefile.in (SFILES): Add common/rsp-low.c.
4585 (OBS): Add rsp-low.o.
4586 (rsp-low.o): New target.
4587
01fd3ea5
TT
45882014-02-12 Tom Tromey <tromey@redhat.com>
4589
4590 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4591 Include print-utils.h.
4592 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4593 (plongest, thirty_two, phex_nz): Remove.
4594 * Makefile.in (SFILES): Add common/print-utils.c.
4595 (OBS): Add print-utils.o.
4596 (print-utils-ipa.o): New target.
4597 (print-utils.o): New target.
4598 (IPA_OBJS): Add print-utils-ipa.o.
4599
e99dc820
TT
46002014-02-06 Tom Tromey <tromey@redhat.com>
4601
4602 * Makefile.in (SFILES): Fix indentation.
4603
ee1e2d4f
DE
46042014-02-05 Doug Evans <dje@google.com>
4605
4606 * linux-low.c (linux_wait_for_event): Improve comment.
4607 (linux_wait_1): Keep current_inferior in sync with event_child.
4608
f5a02773
DE
46092014-01-22 Doug Evans <dje@google.com>
4610
4611 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4612
87ce2a04
DE
46132014-01-22 Doug Evans <dje@google.com>
4614
4615 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4616 * configure: Regenerate.
4617 * config.in: Regenerate.
4618 * Makefile.in (SFILES): Add debug.c.
4619 (OBS): Add debug.o.
4620 * debug.c: New file.
4621 * debug.h: New file.
4622 * linux-aarch64-low.c (*): Update all debugging printfs to use
4623 debug_printf instead of fprintf.
4624 * linux-arm-low.c (*): Ditto.
4625 * linux-cris-low.c (*): Ditto.
4626 * linux-crisv32-low.c (*): Ditto.
4627 * linux-m32r-low.c (*): Ditto.
4628 * linux-sparc-low.c (*): Ditto.
4629 * linux-x86.c (*): Ditto.
4630 * linux-low.c (*): Ditto.
4631 (linux_wait_1): Add calls to debug_enter, debug_exit.
4632 (linux_wait): Remove redundant debugging printf.
4633 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4634 (linux_resume, unstop_all_lwps): Ditto.
4635 * mem-break.c (*): Update all debugging printfs to use
4636 debug_printf instead of fprintf.
4637 * remote-utils.c (*): Ditto.
4638 * thread-db.c (*): Ditto.
4639 * server.c #include <ctype.h>, "gdb_vecs.h".
4640 (debug_threads): Moved to debug.c.
4641 (*): Update all debugging printfs to use debug_printf instead of
4642 fprintf.
4643 (start_inferior): Replace call to fflush with call to debug_flush.
4644 (monitor_show_help): Mention set debug-format.
4645 (parse_debug_format_options): New function.
4646 (handle_monitor_command): Handle "monitor set debug-format".
4647 (gdbserver_usage): Mention --debug-format.
4648 (main): Parse --debug-format.
4649 * server.h (debug_threads): Declaration moved to debug.h.
4650 #include "debug.h".
4651 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4652 trace_debug_1 that uses debug_printf.
4653 (tracepoint_look_up_symbols): Update all debugging printfs to use
4654 debug_printf instead of fprintf.
4655
e671835b
BS
46562014-01-20 Baruch Siach <baruch@tkos.co.il>
4657
4658 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4659 sys/ptrace.h.
4660
b5737fa9
PA
46612014-01-17 Pedro Alves <palves@redhat.com>
4662
ea38d2a9 4663 PR build/16445
c7faa97a
PA
4664 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4665 defined after including gdb_proc_service.h.
b5737fa9 4666
40ed484e
DE
46672014-01-16 Doug Evans <dje@google.com>
4668
4669 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4670 (match_dll): Use it.
4671
969c39fb
MM
46722014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4673
4674 * target.h (target_ops) <read_btrace>: Change parameters and
4675 return type to allow error reporting.
4676 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4677 trace reading errors on.
4678 * linux-low.c (linux_low_read_btrace): Pass trace reading
4679 errors on.
4680 (linux_low_disable_btrace): New.
4681
ab7f45ba
DE
46822014-01-15 Doug Evans <dje@google.com>
4683
4684 * inferiors.c (thread_id_to_gdb_id): Delete.
4685 * inferiors.h (thread_id_to_gdb_id): Delete.
4686
66af0f44
EZ
46872014-01-13 Eli Zaretskii <eliz@gnu.org>
4688
4689 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4690 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4691 versions.
4692
9939e131
PA
46932014-01-08 Pedro Alves <palves@redhat.com>
4694
4695 * server.c (handle_status): Don't discard previous queued stop
4696 replies or thread's pending status here.
4697 (main) <disconnection>: Do it here instead.
4698
b7ea362b
PA
46992014-01-08 Pedro Alves <palves@redhat.com>
4700
4701 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4702 * server.c (visit_actioned_threads, handle_pending_status): New
4703 function.
4704 (handle_v_cont): Factor out parts to ...
4705 (resume): ... this new function. If in all-stop, and a thread
4706 being resumed has a pending status, report it without actually
4707 resuming.
4708 (myresume): Adjust to use the new 'resume' function.
4709 (clear_pending_status_callback, set_pending_status_callback)
4710 (find_status_pending_thread_callback): New functions.
4711 (handle_status): Handle the case of multiple threads having
4712 interesting statuses to report. Report threads' real last signal
4713 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4714 with an interesting thread to report the status for, instead of
4715 always reporting the status of the first thread.
4716
28498c42
JB
47172014-01-01 Joel Brobecker <brobecker@adacore.com>
4718
4719 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4720 * gdbreplay.c (gdbreplay_version): Likewise.
4721
f45c82da
YZ
47222013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4723
4724 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4725 iov.iov_len with the real length in use.
4726
379a5e2d
JB
47272013-12-13 Joel Brobecker <brobecker@adacore.com>
4728
4729 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4730 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4731 for all targets that use win32-low.c.
4732 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4733 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4734
4210d83e
PA
47352013-12-13 Pedro Alves <palves@redhat.com>
4736
4737 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4738 if equal to TARGET_WAITKIND_LOADED.
4739 * win32-low.c (cached_status): New static global.
4740 (win32_wait): Add declaration.
4741 (do_initial_child_stuff): Flush all initial pending debug events
4742 up to the initial breakpoint.
4743 (win32_wait): If CACHED_STATUS was set, return that instead
4744 of doing a real wait. Remove the code resuming the execution
4745 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4746 during the initial phase. Also remove the code changing
4747 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4748 TARGET_WAITKIND_STOPPED.
4749
e7f0d979
YQ
47502013-12-11 Yao Qi <yao@codesourcery.com>
4751
4752 * notif.c (handle_notif_ack): Return 0 if no notification
4753 matches.
4754
ebcf782c
DE
47552013-11-20 Doug Evans <dje@google.com>
4756
4757 * linux-low.c (linux_set_resume_request): Fix comment.
4758
20ad9378
DE
47592013-11-20 Doug Evans <dje@google.com>
4760
4761 * linux-low.c (resume_status_pending_p): Tweak comment.
4762
a196ebeb
WT
47632013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4764
4765 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4766 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4767 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4768 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4769 (srv_amd64_regobj): Add amd64-mpx.o.
4770 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4771 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4772 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4773 * i387-fp.c (num_pl_bnd_register) Added constant.
4774 (num_pl_bnd_cfg_registers) Added constant.
4775 (struct i387_xsave) Added reserved area and MPX fields.
4776 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4777 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4778 function.
4779 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4780 (init_registers_amd64_mpx_linux): Declare new function.
4781 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4782 (x86_64_regmap): Add MPX registers.
4783 (x86_linux_read_description): Add MPX case.
4784 (initialize_low_arch): Initialize MPX targets.
4785
0080a2f6
TT
47862013-11-18 Tom Tromey <tromey@redhat.com>
4787
4788 * configure: Rebuild.
4789 * configure.ac: Don't check for stdlib.h.
4790 * gdbreplay.c: Unconditionally include stdlib.h.
4791
2978b111
TT
47922013-11-18 Tom Tromey <tromey@redhat.com>
4793
4794 * config.in: Rebuild.
4795 * configure: Rebuild.
4796 * configure.ac: Don't use AC_HEADER_DIRENT.
4797
a3d08894
TT
47982013-11-18 Tom Tromey <tromey@redhat.com>
4799
4800 * server.h: Don't check HAVE_STRING_H.
4801 * gdbreplay.c: Don't check HAVE_STRING_H.
4802 * configure: Rebuild.
4803
0a5dd17d
TT
48042013-11-18 Tom Tromey <tromey@redhat.com>
4805
4806 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4807 LIBGNU.
4808
1bd2f0ba
TT
48092013-11-08 Tom Tromey <tromey@redhat.com>
4810
4811 * configure, config.in: Rebuild.
4812 * configure.ac: Remove unused configury.
4813
3266f10b
TT
48142013-11-08 Tom Tromey <tromey@redhat.com>
4815
4816 * acinclude.m4: Include common.m4, codeset.m4.
4817 * configure, config.in: Rebuild.
4818 * configure.ac: Use GDB_AC_COMMON.
4819
6682d959
AA
48202013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4821
4822 * linux-s390-low.c (HWCAP_S390_TE): New define.
4823 (s390_arch_setup): Consider the TE field in the HWCAP for
4824 determining 'have_regset_tdb'.
4825
fd0a4d76
SDJ
48262013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4827
4828 PR gdb/16014
4829 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4830 call to sizeof.
4831
1a3d890b
PA
48322013-10-02 Pedro Alves <palves@redhat.com>
4833
4834 * server.c (process_serial_event): Don't output "GDBserver
4835 exiting" if GDB is connected through stdio.
4836 * target.c (mywait): Likewise, be silent if GDB is connected
4837 through stdio.
4838
97ad4581
JB
48392013-10-01 Joel Brobecker <brobecker@adacore.com>
4840
4841 * lynx-low.c (lynx_add_threads_after_attach): New function.
4842 (lynx_attach): Remove call to add_thread. Add call to
4843 lynx_add_threads_after_attach instead.
4844
5b4e221c
MF
48452013-09-28 Mike Frysinger <vapier@gentoo.org>
4846
4847 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4848 * config.in, configure: Regenerated.
4849
ee47b2f8
YQ
48502013-09-18 Yao Qi <yao@codesourcery.com>
4851
4852 PR server/15959
4853 * server.c (start_inferior): Clear 'resume_info'.
4854
d6707650 48552013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4856
d6707650
JW
4857 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4858 for each register.
4859
9243dd0e 48602013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4861
9243dd0e
JW
4862 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4863 linux-tile-low.o to srv_tgtobj.
4864
c623a6ef
WN
48652013-09-16 Will Newton <will.newton@linaro.org>
4866
4867 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4868 out regs.
4869
fb71d39e
PA
48702013-09-06 Pedro Alves <palves@redhat.com>
4871
4872 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4873 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4874 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4875 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4876 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4877 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4878
8e7e9910
PA
48792013-09-06 Pedro Alves <palves@redhat.com>
4880
4881 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4882 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4883
7c3a12ca
PA
48842013-09-06 Pedro Alves <palves@redhat.com>
4885
4886 * linux-amd64-ipa.c: Include tracepoint.h.
4887 * linux-i386-ipa.c: Include tracepoint.h.
4888
8eb3d7b6
RW
48892013-09-06 Ricard Wanderlof <ricardw@axis.com>
4890
4891 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4892 (ps_get_thread_area): New function.
4893
eddddb9d
RW
48942013-09-06 Ricard Wanderlof <ricardw@axis.com>
4895
4896 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4897 (initialize_low_arch): Call init_registers_crisv32 rather than
4898 init_register_crisv32.
4899
533b0600
PA
49002013-09-05 Pedro Alves <palves@redhat.com>
4901
4902 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4903 to ...
4904 * hostio.h: ... this new file.
4905 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4906 win32-low.c: Include hostio.h.
4907
0ce3d3b5
PA
49082013-09-05 Pedro Alves <palves@redhat.com>
4909
4910 * server.h (gdb_client_data, handler_func, callback_handler_func)
4911 (delete_file_handler, add_file_handler, append_callback_event)
4912 (delete_callback_event, start_event_loop, initialize_event_loop):
4913 Move to event-loop.h and include it.
4914 * event-loop.h: New file.
4915
799cdc37
PA
49162013-09-05 Pedro Alves <palves@redhat.com>
4917
4918 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4919 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4920 (loaded_dll, unloaded_dll): Move to ...
4921 * dll.h: ... this new file.
4922 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4923
6a6bbd9d
PA
49242013-09-05 Pedro Alves <palves@redhat.com>
4925
4926 * server.h (current_process, get_thread_process, all_processes)
4927 (add_inferior_to_list, for_each_inferior, current_inferior)
4928 (remove_inferior, add_process, remove_process, find_process_pid)
4929 (have_started_inferiors_p, have_attached_inferiors_p)
4930 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4931 (clear_inferiors, find_inferior, find_inferior_id)
4932 (inferior_target_data, set_inferior_target_data)
4933 (inferior_regcache_data, set_inferior_regcache_data): Move to
4934 inferiors.h, and include it.
4935 * inferiors.h: New file.
4936
f699aaba
PA
49372013-09-05 Pedro Alves <palves@redhat.com>
4938
4939 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4940 Move ...
72f4393d 4941 * ax.h: ... here.
f699aaba 4942
c144c7a0
PA
49432013-09-05 Pedro Alves <palves@redhat.com>
4944
4945 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4946 tracepoint.h.
4947 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4948 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4949 (handle_tracepoint_general_set, handle_tracepoint_query)
4950 (tracepoint_finished_step, tracepoint_was_hit)
4951 (release_while_stepping_state_list, current_traceframe)
4952 (in_readonly_region, traceframe_read_mem)
4953 (fetch_traceframe_registers, traceframe_read_sdata)
4954 (traceframe_read_info, struct fast_tpoint_collect_status)
4955 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4956 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4957 (supply_fast_tracepoint_registers)
4958 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4959 (ipa_tdesc, claim_trampoline_space)
4960 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4961 (agent_mem_read, agent_get_trace_state_variable_value)
4962 (agent_set_trace_state_variable_value, agent_tsv_read)
4963 (agent_mem_read_string, get_raw_reg_func_addr)
4964 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4965 * tracepoint.h: ... this new file.
4966
ff42e6ab
PA
49672013-09-05 Pedro Alves <palves@redhat.com>
4968
4969 * server.h (perror_with_name, error, fatal, warning, paddress)
4970 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4971 include it.
4972 * utils.h: New file.
4973
541af0f4
PA
49742013-09-05 Pedro Alves <palves@redhat.com>
4975
4976 * server.h (remote_debug, noack_mode, transport_is_reliable)
4977 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4978 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4979 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4980 (write_enn, initialize_async_io, enable_async_io)
4981 (disable_async_io, check_remote_input_interrupt_request)
4982 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4983 (dead_thread_notify, prepare_resume_reply)
4984 (decode_address_to_semicolon, decode_address, decode_m_packet)
4985 (decode_M_packet, decode_X_packet, decode_xfer_write)
4986 (decode_search_memory_packet, unhexify, hexify)
4987 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4988 (look_up_one_symbol, relocate_instruction)
4989 (monitor_output): Move to remote-utils.h, and include it.
4990 * remote-utils.h: New file.
4991
eebdf26b
PA
49922013-09-05 Pedro Alves <palves@redhat.com>
4993
4994 * server.h (_): Delete.
4995
3aafd2ff
PA
49962013-09-02 Pedro Alves <palves@redhat.com>
4997
4998 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4999 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5000 allocated.
5001 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5002
cee83bcb
PM
50032013-09-02 Pierre Muller <muller@sourceware.org>
5004
5005 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5006 or WriteProcessMemory complete successfully and handle
5007 ERROR_PARTIAL_COPY error.
5008
9a13b2fa
PA
50092013-09-02 Pedro Alves <palves@redhat.com>
5010
5011 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5012 error instead of EIO.
5013
602e3198
JK
50142013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5015
5016 PR server/15604
5017 * linux-low.c: Include filestuff.h.
5018 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5019 * lynx-low.c: Include filestuff.h.
5020 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5021 * server.c: Include filestuff.h.
5022 (main): Call notice_open_fds.
5023 * spu-low.c: Include filestuff.h.
5024 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5025
96d7229d
LM
50262013-08-22 Luis Machado <lgustavo@codesourcery.com>
5027
5028 * Makefile.in: Explain why ../target and ../nat are not
5029 listed as include file search paths.
5030 (linux-waitpid.o): New object file rule.
5031 * configure.srv (srv_native_linux_obj): New variable.
5032 Replace all occurrences of linux native object files with
5033 $srv_native_linux_obj.
5034 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5035 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5036 (linux_enable_event_reporting): Remove declaration.
5037 (my_waitpid): Moved to common/linux-waitpid.c.
5038 (linux_wait_for_event): Pass ptid when calling
5039 linux_enable_event_reporting.
5040 (linux_supports_tracefork_flag): Remove.
5041 (linux_enable_event_reporting): Likewise.
5042 (linux_tracefork_grandchild): Remove.
5043 (STACK_SIZE): Moved to common/linux-ptrace.c.
5044 (linux_tracefork_child): Remove.
5045 (linux_test_for_tracefork): Remove.
5046 (linux_look_up_symbols): Call linux_supports_traceclone.
5047 (initialize_low): Remove call to linux_test_for_tracefork.
5048 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5049 common/linux-ptrace.h.
5050 (PTRACE_TYPE_ARG4): Likewise.
5051 Include linux-ptrace.h.
5052
32940073
PA
50532013-08-21 Pedro Alves <palves@redhat.com>
5054
5055 * config.in: Renegerate.
5056
33b60d58 50572013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5058
33b60d58
LM
5059 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5060 (SFILES): Remove $(srcdir)/common/target-common.c and
5061 add $(srcdir)/target/waitstatus.c.
5062 (OBS): Remove target-common.o and add waitstatus.o.
5063 (server_h): Remove $(srcdir)/../common/target-common.h and
5064 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5065 and $(srcdir)/../target/waitstatus.h.
5066 (target-common.o): Remove.
5067 (waitstatus.o): New target object file.
5068 * target.h: Do not include target-common.h and
5069 include target/resume.h, target/wait.h and
5070 target/waitstatus.h.
5071
b8e1b30e
LM
50722013-08-13 Luis Machado <lgustavo@codesourcery.com>
5073
5074 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5075 to PTRACE_TYPE_ARG3.
5076 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5077 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5078 PTRACE_TYPE_ARG4.
5079 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5080 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5081
7a60ad40
YQ
50822013-07-27 Jie Zhang <jie@codesourcery.com>
5083 Daniel Jacobowitz <dan@codesourcery.com>
5084 Yao Qi <yao@codesourcery.com>
5085
5086 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5087 (mips-linux-watch.o): New rule.
5088 (mips_linux_watch_h): New variable.
5089 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5090 srv_tgtobj.
5091 * linux-mips-low.c: Include mips-linux-watch.h.
5092 (struct arch_process_info, struct arch_lwp_info): New.
5093 (update_watch_registers_callback): New function.
5094 (mips_linux_new_process, mips_linux_new_thread) New functions.
5095 (mips_linux_prepare_to_resume, mips_insert_point): New
5096 functions.
5097 (mips_remove_point, mips_stopped_by_watchpoint): New
5098 functions.
5099 (rsp_bp_type_to_target_hw_bp_type): New function.
5100 (mips_stopped_data_address): New function.
5101 (the_low_target): Add watchpoint support functions.
5102
de6f69ad
YQ
51032013-07-27 Yao Qi <yao@codesourcery.com>
5104
5105 * i386-low.c: Include break-common.h.
5106 (enum target_hw_bp_type): Remove.
5107
3360c0bf
LM
51082013-07-24 Luis Machado <lgustavo@codesourcery.com>
5109
5110 * Makefile.in (SFILES): /common/target-common.c.
5111 (OBS): Add target-common.o.
5112 (server_h): Add $(srcdir)/../common/target-common.h.
5113 (target-common.o): New target.
5114 * server.c (queue_stop_reply_callback): Free
5115 status string after use.
5116 * target.c (target_waitstatus_to_string): Remove.
5117 * target.h: Include target-common.h.
5118 (resume_kind): Likewise.
5119 (target_waitkind): Likewise.
5120 (target_waitstatus): Likewise.
5121 (TARGET_WNOHANG): Likewise.
5122
bd885420
YQ
51232013-07-04 Yao Qi <yao@codesourcery.com>
5124
5125 * Makefile.in (host_alias): Use @host_noncanonical@.
5126 (target_alias): Use @target_noncanonical@.
5127 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5128 ACX_NONCANONICAL_HOST.
5129 * configure: Regenerated.
5130
5131 Revert:
5132 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5133
5134 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5135 * configure: Rebuild.
5136 * Makefile.in (version_host, version_target): Get from configure.
5137 (version.c): Use $(version_host) and $(version_target).
5138
17ef446e
PA
51392013-07-03 Pedro Alves <palves@redhat.com>
5140
5141 * Makefile.in (config.status): Depend on development.sh.
5142 * acinclude.m4: Include libmcheck.m4.
5143 * configure: Regenerate.
5144
7a9a7487
MG
51452013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5146
5147 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5148 attribute inside the parentheses.
5149 (winapi_DebugSetProcessKillOnExit): Ditto.
5150 (winapi_DebugBreakProcess): Ditto.
5151 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5152
49b64de6
MG
51532013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5154
5155 * notif.h (notif_event): Add a dummy member to avoid compiler
5156 errors.
5157
d5749ee7
PA
51582013-07-01 Pedro Alves <palves@redhat.com>
5159
5160 * hostio.c (HOSTIO_PATH_MAX): Define.
5161 (require_filename, handle_open, handle_unlink, handle_readlink):
5162 Use it.
5163
d8d2a3ee
PA
51642013-07-01 Pedro Alves <palves@redhat.com>
5165
5166 * server.h: Include "pathmax.h".
5167 * linux-low.c: Don't include sys/param.h.
5168 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5169 MAXPATHLEN.
5170 * win32-low.c: Don't include sys/param.h.
5171 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5172
bc7dea8d
PA
51732013-07-01 Pedro Alves <palves@redhat.com>
5174
5175 * event-loop.c: Don't check HAVE_UNISTD_H before including
5176 <unistd.h>.
5177 * gdbreplay.c: Likewise.
5178 * remote-utils.c: Likewise.
5179 * server.c: Likewise.
5180 * configure.ac: Don't check for unistd.h.
5181 * configure: Regenerate.
5182
d6c2da54
TT
51832013-06-28 Tom Tromey <tromey@redhat.com>
5184
5185 * Makefile.in (version.c): Use version.in, not
5186 common/version.in.
5187
257b6bec
MG
51882013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5189
5190 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5191 * configure: Rebuild.
5192 * Makefile.in (version_host, version_target): Get from configure.
5193 (version.c): Use $(version_host) and $(version_target).
5194
86ebe149
DK
51952013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5196
5197 Fix trace-status to output user name without trailing colon.
5198 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5199
f30aa5af
DK
52002013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5201
5202 Fix trace-status to output proper start-time and stop-time.
5203 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5204 output start time and stop time in hex as gdb expects.
5205
28a93511
YQ
52062013-06-26 Pedro Alves <pedro@codesourcery.com>
5207
5208 * tracepoint.c (build_traceframe_info_xml): Output trace state
5209 variables present in the trace buffer.
5210
01208463
TT
52112013-06-24 Tom Tromey <tromey@redhat.com>
5212
5213 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5214 create-version.sh.
5215 (version.o): Remove.
5216 * gdbreplay.c: Include version.h.
5217 (version, host_name): Don't declare.
5218 * server.h: Include version.h.
5219 (version, host_name): Don't declare.
5220
760256f9
PA
52212013-06-12 Pedro Alves <palves@redhat.com>
5222
5223 * linux-x86-low.c (linux_is_elf64): Delete global.
5224 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5225 with local linux_pid_exe_is_elf_64_file use.
5226
030031ee
PA
52272013-06-11 Pedro Alves <palves@redhat.com>
5228
5229 * linux-low.c (regset_disabled, disable_regset): New functions.
5230 (regsets_fetch_inferior_registers)
5231 (regsets_store_inferior_registers): Use them.
5232 (initialize_regsets_info); Don't allocate the disabled_regsets
5233 array here.
5234 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5235 comment.
5236
5da6eb0a
PA
52372013-06-11 Pedro Alves <palves@redhat.com>
5238
5239 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5240 xmalloc.
5241
7e5aaa09
PA
52422013-06-11 Pedro Alves <palves@redhat.com>
5243
5244 * linux-x86-low.c (initialize_low_arch): Call
5245 init_registers_x32_avx_linux.
5246
d878444c
JK
52472013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5248
5249 Fix compatibility with Android Bionic.
5250 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5251 it is not empty.
5252
3aee8918
PA
52532013-06-07 Pedro Alves <palves@redhat.com>
5254
5f2b57b5 5255 PR server/14823
3aee8918
PA
5256 * Makefile.in (OBS): Add tdesc.o.
5257 (IPA_OBJS): Add tdesc-ipa.o.
5258 (tdesc-ipa.o): New rule.
5259 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5260 interface.
5261 * linux-low.c (new_inferior): Delete.
5262 (disabled_regsets, num_regsets): Delete.
5263 (linux_add_process): Adjust to set the new per-process
5264 new_inferior flag.
5265 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5266 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5267 was a stop. When calling arch_setup, switch the current inferior
5268 to the thread that got an event.
5269 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5270 (regsets_fetch_inferior_registers)
5271 (regsets_store_inferior_registers): New regsets_info parameter.
5272 Adjust to use it.
5273 (linux_register_in_regsets): New regs_info parameter. Adjust to
5274 use it.
5275 (register_addr, fetch_register, store_register): New usrregs_info
5276 parameter. Adjust to use it.
5277 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5278 parameter regs_info. Adjust to use it.
5279 (linux_fetch_registers): Get the current inferior's regs_info, and
5280 adjust to use it.
5281 (linux_store_registers): Ditto.
5282 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5283 (initialize_low): Don't initialize the target_regsets here. Call
5284 initialize_low_arch.
5285 * linux-low.h (target_regsets): Delete declaration.
5286 (struct regsets_info): New.
5287 (struct usrregs_info): New.
5288 (struct regs_info): New.
5289 (struct process_info_private) <new_inferior>: New field.
5290 (struct linux_target_ops): Delete the num_regs, regmap, and
5291 regset_bitmap fields. New field regs_info.
5292 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5293 * i387-fp.c (num_xmm_registers): Delete.
5294 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5295 calls to new interface.
5296 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5297 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5298 Infer the number of xmm registers from the regcache's target
5299 description.
5300 * i387-fp.h (num_xmm_registers): Delete.
5301 * inferiors.c (add_thread): Don't install the thread's regcache
5302 here.
5303 * proc-service.c (gregset_info): Fetch the current inferior's
5304 regs_info. Adjust to use it.
5305 * regcache.c: Include tdesc.h.
5306 (register_bytes, reg_defs, num_registers)
5307 (gdbserver_expedite_regs): Delete.
5308 (get_thread_regcache): If the thread doesn't have a regcache yet,
5309 create one, instead of aborting gdbserver.
5310 (regcache_invalidate_one): Rename to ...
5311 (regcache_invalidate_thread): ... this.
5312 (regcache_invalidate_one): New.
5313 (regcache_invalidate): Only invalidate registers of the current
5314 process.
5315 (init_register_cache): Add target_desc parameter, and use it.
5316 (new_register_cache): Ditto. Assert the target description has a
5317 non zero registers_size.
5318 (regcache_cpy): Add assertions. Adjust.
5319 (realloc_register_cache, set_register_cache): Delete.
5320 (registers_to_string, registers_from_string): Adjust.
5321 (find_register_by_name, find_regno, find_register_by_number)
5322 (register_cache_size): Add target_desc parameter, and use it.
5323 (free_register_cache_thread, free_register_cache_thread_one)
5324 (regcache_release, register_cache_size): New.
5325 (register_size): Add target_desc parameter, and use it.
5326 (register_data, supply_register, supply_register_zeroed)
5327 (supply_regblock, supply_register_by_name, collect_register)
5328 (collect_register_as_string, collect_register_by_name): Adjust.
5329 * regcache.h (struct target_desc): Forward declare.
5330 (struct regcache) <tdesc>: New field.
5331 (init_register_cache, new_register_cache): Add target_desc
5332 parameter.
5333 (regcache_invalidate_thread): Declare.
5334 (regcache_invalidate_one): Delete declaration.
5335 (regcache_release): Declare.
5336 (find_register_by_number, register_cache_size, register_size)
5337 (find_regno): Add target_desc parameter.
5338 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5339 declarations.
5340 * remote-utils.c: Include tdesc.h.
5341 (outreg, prepare_resume_reply): Adjust.
5342 * server.c: Include tdesc.h.
5343 (gdbserver_xmltarget): Delete declaration.
5344 (get_features_xml, process_serial_event): Adjust.
5345 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5346 declare.
5347 (struct process_info) <tdesc>: New field.
5348 (ipa_tdesc): Declare.
5349 * tdesc.c: New file.
5350 * tdesc.h: New file.
5351 * tracepoint.c: Include tdesc.h.
5352 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5353 (get_context_regcache): Adjust to pass ipa_tdesc down.
5354 (do_action_at_tracepoint): Adjust to get the register cache size
5355 from the context regcache's description.
5356 (traceframe_walk_blocks): Adjust to get the register cache size
5357 from the current trace frame's description.
5358 (traceframe_get_pc): Adjust to get current trace frame's
5359 description and pass it down.
5360 (gdb_collect): Adjust to get the register cache size from the
5361 IPA's description.
5362 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5363 (gdbserver_xmltarget): Delete.
5364 (initialize_low_tracepoint): Set the ipa's target description.
5365 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5366 (initialize_low_tracepoint): Set the ipa's target description.
5367 * linux-x86-low.c: Include tdesc.h.
5368 [__x86_64__] (is_64bit_tdesc): New.
5369 (ps_get_thread_area, x86_get_thread_area): Use it.
5370 (i386_cannot_store_register): Rename to ...
5371 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5372 (i386_cannot_fetch_register): Rename to ...
5373 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5374 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5375 to new interface.
5376 (target_regsets): Rename to ...
5377 (x86_regsets): ... this.
5378 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5379 interface.
5380 (x86_siginfo_fixup): Use is_64bit_tdesc.
5381 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5382 (tdesc_x32_avx_linux, tdesc_x32_linux)
5383 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5384 Declare.
5385 (x86_linux_update_xmltarget): Delete.
5386 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5387 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5388 (AMD64_LINUX_USER64_CS): New.
5389 (x86_linux_read_description): New, based on
5390 x86_linux_update_xmltarget.
5391 (same_process_callback): New.
5392 (x86_arch_setup_process_callback): New.
5393 (x86_linux_update_xmltarget): New.
5394 (x86_regsets_info): New.
5395 (amd64_linux_regs_info): New.
5396 (i386_linux_usrregs_info): New.
5397 (i386_linux_regs_info): New.
5398 (x86_linux_regs_info): New.
5399 (x86_arch_setup): Reimplement.
5400 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5401 (x86_emit_ops): Ditto.
5402 (the_low_target): Adjust. Install x86_linux_regs_info,
5403 x86_cannot_fetch_register, and x86_cannot_store_register.
5404 (initialize_low_arch): New.
5405 * linux-ia64-low.c (tdesc_ia64): Declare.
5406 (ia64_fetch_register): Adjust.
5407 (ia64_usrregs_info, regs_info): New globals.
5408 (ia64_regs_info): New function.
5409 (the_low_target): Adjust.
5410 (initialize_low_arch): New function.
5411 * linux-sparc-low.c (tdesc_sparc64): Declare.
5412 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5413 Adjust.
5414 (sparc_arch_setup): New function.
5415 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5416 (the_low_target): Adjust.
5417 (initialize_low_arch): New function.
5418 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5419 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5420 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5421 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5422 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5423 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5424 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5425 (tdesc_powerpc_isa205_vsx64l): Declare.
5426 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5427 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5428 (ppc_set_pc, ppc_get_hwcap): Adjust.
5429 (ppc_usrregs_info): Forward declare.
5430 (!__powerpc64__) ppc_regmap_adjusted: New global.
5431 (ppc_arch_setup): Adjust to the current process'es target
5432 description.
5433 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5434 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5435 (ppc_store_evrregset): Adjust.
5436 (target_regsets): Rename to ...
5437 (ppc_regsets): ... this, and make static.
5438 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5439 (ppc_regs_info): New function.
5440 (the_low_target): Adjust.
5441 (initialize_low_arch): New function.
5442 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5443 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5444 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5445 (tdesc_s390x_linux64v2): Declare.
5446 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5447 (s390_fill_gregset, s390_store_last_break): Adjust.
5448 (target_regsets): Rename to ...
5449 (s390_regsets): ... this, and make static.
5450 (s390_get_pc, s390_set_pc): Adjust.
5451 (s390_get_hwcap): New target_desc parameter, and use it.
5452 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5453 (s390_arch_setup): Adjust to set the current process'es target
5454 description. Don't adjust the regmap.
5455 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5456 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5457 (regs_info_3264): New globals.
5458 (s390_regs_info): New function.
5459 (the_low_target): Adjust.
5460 (initialize_low_arch): New function.
5461 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5462 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5463 [__mips64] (init_registers_mips_linux)
5464 (init_registers_mips_dsp_linux): Delete defines.
5465 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5466 (have_dsp): New global.
5467 (mips_read_description): New, based on mips_arch_setup.
5468 (mips_arch_setup): Reimplement.
5469 (get_usrregs_info): New function.
5470 (mips_cannot_fetch_register, mips_cannot_store_register)
5471 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5472 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5473 (target_regsets): Rename to ...
5474 (mips_regsets): ... this, and make static.
5475 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5476 (dsp_regs_info, regs_info): New globals.
5477 (mips_regs_info): New function.
5478 (the_low_target): Adjust.
5479 (initialize_low_arch): New function.
5480 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5481 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5482 Declare.
5483 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5484 (arm_read_description): New, with bits factored from
5485 arm_arch_setup.
5486 (arm_arch_setup): Reimplement.
5487 (target_regsets): Rename to ...
5488 (arm_regsets): ... this, and make static.
5489 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5490 (arm_regs_info): New function.
5491 (the_low_target): Adjust.
5492 (initialize_low_arch): New function.
5493 * linux-m68k-low.c (tdesc_m68k): Declare.
5494 (target_regsets): Rename to ...
5495 (m68k_regsets): ... this, and make static.
5496 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5497 (m68k_regs_info): New function.
5498 (m68k_arch_setup): New function.
5499 (the_low_target): Adjust.
5500 (initialize_low_arch): New function.
5501 * linux-sh-low.c (tdesc_sharch): Declare.
5502 (target_regsets): Rename to ...
5503 (sh_regsets): ... this, and make static.
5504 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5505 (sh_regs_info, sh_arch_setup): New functions.
5506 (the_low_target): Adjust.
5507 (initialize_low_arch): New function.
5508 * linux-bfin-low.c (tdesc_bfin): Declare.
5509 (bfin_arch_setup): New function.
5510 (bfin_usrregs_info, regs_info): New globals.
5511 (bfin_regs_info): New function.
5512 (the_low_target): Adjust.
5513 (initialize_low_arch): New function.
5514 * linux-cris-low.c (tdesc_cris): Declare.
5515 (cris_arch_setup): New function.
5516 (cris_usrregs_info, regs_info): New globals.
5517 (cris_regs_info): New function.
5518 (the_low_target): Adjust.
5519 (initialize_low_arch): New function.
5520 * linux-cris-low.c (tdesc_crisv32): Declare.
5521 (cris_arch_setup): New function.
5522 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5523 (cris_regs_info): New function.
5524 (the_low_target): Adjust.
5525 (initialize_low_arch): New function.
5526 * linux-m32r-low.c (tdesc_m32r): Declare.
5527 (m32r_arch_setup): New function.
5528 (m32r_usrregs_info, regs_info): New globals.
5529 (m32r_regs_info): Adjust.
5530 (initialize_low_arch): New function.
5531 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5532 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5533 (tic6x_usrregs_info): Forward declare.
5534 (tic6x_read_description): New function, based on ...
5535 (tic6x_arch_setup): ... this. Reimplement.
5536 (target_regsets): Rename to ...
5537 (tic6x_regsets): ... this, and make static.
5538 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5539 (tic6x_regs_info): New function.
5540 (the_low_target): Adjust.
5541 (initialize_low_arch): New function.
5542 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5543 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5544 (target_regsets): Rename to ...
5545 (xtensa_regsets): ... this, and make static.
5546 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5547 globals.
5548 (xtensa_arch_setup, xtensa_regs_info): New functions.
5549 (the_low_target): Adjust.
5550 (initialize_low_arch): New function.
5551 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5552 (nios2_arch_setup): Set the current process'es tdesc.
5553 (target_regsets): Rename to ...
5554 (nios2_regsets): ... this.
5555 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5556 (nios2_regs_info): New function.
5557 (the_low_target): Adjust.
5558 (initialize_low_arch): New function.
a261b8f5
PA
5559 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5560 (aarch64_arch_setup): Set the current process'es tdesc.
5561 (target_regsets): Rename to ...
5562 (aarch64_regsets): ... this.
5563 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5564 (aarch64_regs_info): New function.
5565 (the_low_target): Adjust.
5566 (initialize_low_arch): New function.
3aee8918
PA
5567 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5568 globals.
5569 (target_regsets): Rename to ...
5570 (tile_regsets): ... this.
5571 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5572 (tile_regs_info): New function.
5573 (tile_arch_setup): Set the current process'es tdesc.
5574 (the_low_target): Adjust.
5575 (initialize_low_arch): New function.
5576 * spu-low.c (tdesc_spu): Declare.
5577 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5578 * win32-arm-low.c (tdesc_arm): Declare.
5579 (arm_arch_setup): New function.
5580 (the_low_target): Install arm_arch_setup instead of
5581 init_registers_arm.
5582 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5583 (init_windows_x86): Rename to ...
5584 (i386_arch_setup): ... this. Set `win32_tdesc'.
5585 (the_low_target): Adjust.
5586 * win32-low.c (win32_tdesc): New global.
5587 (child_add_thread): Don't create the thread cache here.
5588 (do_initial_child_stuff): Set the new process'es tdesc.
5589 * win32-low.h (struct target_desc): Forward declare.
5590 (win32_tdesc): Declare.
5591 * lynx-i386-low.c (tdesc_i386): Declare global.
5592 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5593 * lynx-low.c (lynx_tdesc): New global.
5594 (lynx_add_process): Set the new process'es tdesc.
5595 * lynx-low.h (struct target_desc): Forward declare.
5596 (lynx_tdesc): Declare global.
5597 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5598 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5599 * nto-low.c (nto_tdesc): New global.
5600 (do_attach): Set the new process'es tdesc.
5601 * nto-low.h (struct target_desc): Forward declare.
5602 (nto_tdesc): Declare.
5603 * nto-x86-low.c (tdesc_i386): Declare.
5604 (nto_x86_arch_setup): Set `nto_tdesc'.
5605
b1fbec62
GB
56062013-06-04 Gary Benson <gbenson@redhat.com>
5607
5608 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5609 to qSupported response when appropriate.
5610 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5611 with nonzero-length annex.
5612 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5613 arguments supplied in annex.
5614
d1ec4ce7
DE
56152013-05-31 Doug Evans <dje@google.com>
5616
ac44adcb 5617 PR server/15594
d1ec4ce7
DE
5618 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5619 64 bits in 64-cross-32 environment.
5620
9b25f2d3
PA
56212013-05-28 Pedro Alves <palves@redhat.com>
5622
5623 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5624 (aarch64-without-fpu.c): Delete rule.
5625 * configure.srv (aarch64*-*-linux*): Remove references to
5626 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5627 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5628 declaration.
5629
6740dc9c
PA
56302013-05-24 Pedro Alves <palves@redhat.com>
5631
5632 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5633 instead of strchr/decode_address. Error if the range isn't split
5634 with a ','. Don't assume there's be a ':' in the action.
5635
c2d6af84
PA
56362013-05-23 Yao Qi <yao@codesourcery.com>
5637 Pedro Alves <palves@redhat.com>
5638
5639 * linux-low.c (lwp_in_step_range): New function.
5640 (linux_wait_1): If the thread was range stepping and stopped
5641 outside the stepping range, report the stop to GDB. Otherwise,
5642 continue stepping. Add range stepping debug output.
5643 (linux_set_resume_request): Copy the step range from the resume
5644 request to the lwp.
5645 (linux_supports_range_stepping): New.
5646 (linux_target_ops) <supports_range_stepping>: Set to
5647 linux_supports_range_stepping.
5648 * linux-low.h (struct linux_target_ops)
5649 <supports_range_stepping>: New field.
5650 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5651 * linux-x86-low.c (x86_supports_range_stepping): New.
5652 (the_low_target) <supports_range_stepping>: Set to
5653 x86_supports_range_stepping.
5654 * server.c (handle_v_cont): Handle 'r' action.
5655 (handle_v_requests): Append ";r" if the target supports range
5656 stepping.
5657 * target.h (struct thread_resume) <step_range_start,
5658 step_range_end>: New fields.
5659 (struct target_ops) <supports_range_stepping>:
5660 New field.
5661 (target_supports_range_stepping): New macro.
5662
58794e1a
JB
56632013-05-17 Joel Brobecker <brobecker@adacore.com>
5664
5665 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5666 confusion in comment.
5667
d631c5a7
JB
56682013-05-17 Joel Brobecker <brobecker@adacore.com>
5669
5670 * lynx-low.c (struct process_info_private): New type.
5671 (lynx_add_process): New function.
5672 (lynx_create_inferior, lynx_attach): Replace calls to
5673 add_process by calls to lynx_add_process.
5674 (lynx_resume): If PTID is null, then try using
5675 current_process()->private->last_wait_event_ptid.
5676 Add comments.
5677 (lynx_clear_inferiors): Delete. The contents of that function
5678 has been inlined in lynx_mourn;
5679 (lynx_wait_1): Save the ptid in the process's private data.
5680 (lynx_mourn): Free the process' private data. Replace call
5681 to lynx_clear_inferiors by call to clear_inferiors.
5682
96f7a20f
YQ
56832013-05-17 Yao Qi <yao@codesourcery.com>
5684
5685 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5686 the right place.
5687
db0dfaa0
LM
56882013-05-16 Luis Machado <lgustavo@codesourcery.com>
5689
5690 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5691 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5692 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5693 PT_TEXT_END_ADDR guards. Update comments.
5694 (linux_target_op) <read_offsets>: Conditionally define to
5695 linux_read_offsets if the target is UCLIBC and if it defines
5696 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5697
68f5f838
SL
56982013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5699 Andrew Jenner <andrew@codesourcery.com>
5700
5701 * Makefile.in (SFILES): Add linux-nios2-low.c.
5702 (clean): Add action to delete nios2-linux.c.
5703 (nios2-linux.c): New rule.
5704 * configure.srv: Add nios2*-*-linux*.
5705 * linux-nios2-low.c: New.
5706
1ebff1fd
HAQ
57072013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5708
5709 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5710
f6150862
HZ
57112013-04-25 Hui Zhu <hui@codesourcery.com>
5712
5713 PR gdb/15186
f6150862
HZ
5714 * ax.c (ax_printf): Add fflush.
5715
614c279d
TT
57162013-04-22 Tom Tromey <tromey@redhat.com>
5717
5718 * Makefile.in (SFILES): Add filestuff.c.
5719 (OBS): Add filestuff.o.
5720 (filestuff.o): New target.
5721 * config.in, configure: Rebuild.
5722 * configure.ac: Check for fdwalk, pipe2.
5723
7d4e5717
PA
57242013-04-17 Pedro Alves <palves@redhat.com>
5725
5726 * configure.ac (USE_THREAD_DB): Delete variable.
5727 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5728 Don't AC_SUBST USE_THREAD_DB.
5729 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5730 * config.in, configure: Regenerate.
5731
d5c93e41
PA
57322013-04-16 Pedro Alves <palves@redhat.com>
5733
5734 * linux-low.h (struct lwp_info) <thread_known>: Move under
5735 the USE_THREAD_DB #ifdef.
5736
04f5fe89
PA
57372013-04-16 Pedro Alves <palves@redhat.com>
5738
5739 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5740 (linux-low.o): Delete rule.
5741 * linux-low.h: Always include "gdb_thread_db.h" instead of
5742 conditionally including thread_db.h.
5743 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5744 HAVE_THREAD_DB_H.
5745
480b27bf
JK
57462013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5747
5748 * Makefile.in (install-only): Fix make install regression.
5749
43662968
JK
57502013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5751
5752 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5753 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5754 installation.
5755 * gdbserver.1: Remove.
5756
3e74e146
PA
57572013-03-22 Pedro Alves <palves@redhat.com>
5758
5759 * linux-low.c (handle_extended_wait): Don't call
5760 linux_enable_event_reporting.
5761
a8347a2a
TT
57622013-03-15 Tony Theodore <tonyt@logyst.com>
5763
5764 PR build/9098:
5765 * Makefile.in (SHELL): Use @SHELL@.
5766
eeb56fa7
SDJ
57672013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5768
5769 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5770 compiler warning.
5771
4fa7e2ff
JB
57722013-03-13 Joel Brobecker <brobecker@adacore.com>
5773
5774 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5775 Remove extraneous NULL element.
5776
8ddb1965
YQ
57772013-03-13 Yao Qi <yao@codesourcery.com>
5778
5779 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5780 'V' block in trace frame.
5781
9accd112
MM
57822013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5783
5784 * target.h (struct target_ops): Add btrace ops.
5785 (target_supports_btrace): New macro.
5786 (target_enable_btrace): New macro.
5787 (target_disable_btrace): New macro.
5788 (target_read_btrace): New macro.
5789 * gdbthread.h (struct thread_info): Add btrace field.
5790 * server.c: Include btrace-common.h.
5791 (handle_btrace_general_set): New function.
5792 (handle_btrace_enable): New function.
5793 (handle_btrace_disable): New function.
5794 (handle_general_set): Call handle_btrace_general_set.
5795 (handle_qxfer_btrace): New function.
5796 (struct qxfer qxfer_packets[]): Add btrace entry.
5797 * inferiors.c (remove_thread): Disable btrace.
5798 * linux-low: Include linux-btrace.h.
5799 (linux_low_enable_btrace): New function.
5800 (linux_low_read_btrace): New function.
5801 (linux_target_ops): Add btrace ops.
5802 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5803 Add srv_linux_btrace=yes.
5804 (x86_64-*-linux*): Add linux-btrace.o.
5805 Add srv_linux_btrace=yes.
5806 * configure.ac: Define HAVE_LINUX_BTRACE.
5807 * config.in: Regenerated.
5808 * configure: Regenerated.
5809
5cc22e4c
MM
58102013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5811
5812 * server.c (handle_qxfer): Preserve error message if -3 is
5813 returned.
5814 (qxfer): Document the -3 return value.
5815
7c97f91e
MM
58162013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5817
5818 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5819 (linux_btrace_h): New variable.
5820 (linux-btrace.o): New rule.
5821
be9a119c 58222013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5823 Hafiz Abid Qadeer <abidh@codesourcery.com>
5824
5825 * tracepoint.c (trace_buffer_size): New global.
5826 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5827 (init_trace_buffer): Change to one-argument function. Allocate
5828 trace buffer memory.
5829 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5830 handle QTBuffer:size packet.
5831 (cmd_bigqtbuffer_size): New function.
5832 (initialize_tracepoint): Call init_trace_buffer with
5833 DEFAULT_TRACE_BUFFER_SIZE.
5834 * server.c (handle_query): Add QTBuffer:size in the
5835 supported packets.
5836
e64f7499
YQ
58372013-03-07 Yao Qi <yao@codesourcery.com>
5838
5839 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5840 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5841 of -1.
5842 (cmd_qtsp): Adjust condition. Do post increment.
5843 Set cur_action and cur_step_action back to 0.
5844
f0ae6fc3
PA
58452013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5846
5847 PR server/15236
5848 * linux-low.c (linux_write_memory): Return early success if LEN is
5849 zero.
5850
b5b0b0af
CV
58512013-03-05 Corinna Vinschen <vinschen@redhat.de>
5852
334ad4a8 5853 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5854
589bc927
TT
58552013-02-28 Tom Tromey <tromey@redhat.com>
5856
5857 * configure.ac: Invoke AC_SYS_LARGEFILE.
5858 * configure, config.in: Rebuild.
5859
dfe07582
CV
58602013-02-28 Corinna Vinschen <vinschen@redhat.com>
5861
5862 * win32-low.c: Throughout, fix format strings and casts of
5863 printf-like functions to avoid type related warnings on all
5864 platforms.
5865 (get_child_debug_event): Print dwDebugEventCode as hex since
5866 that's how it's usually documented.
5867
736cd585
YQ
58682013-02-28 Yao Qi <yao@codesourcery.com>
5869
5870 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5871 pulongest.
5872
e1f58301
JW
58732013-02-27 Jiong Wang <jiwang@tilera.com>
5874
5875 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5876 (reg-tilegx32.c): New rule.
5877 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5878 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5879 different register info initializer according to elf class.
5880 (init_registers_tilgx32): New function. The tilegx32 register info
5881 initializer.
5882 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5883 (tile_store_gregset): Likewise.
5884
d171ca78
YQ
58852013-02-27 Yao Qi <yao@codesourcery.com>
5886
5887 * server.c (process_point_options): Print debug message when
5888 debug_threads is true.
5889
282bbdf3
YQ
58902013-02-26 Yao Qi <yao@codesourcery.com>
5891
5892 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5893
aca22551
PA
58942013-02-19 Pedro Alves <palves@redhat.com>
5895 Kai Tietz <ktietz@redhat.com>
5896
5897 PR gdb/15161
5898
5899 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5900 instead of strtoul to extract address from packet.
5901 (process_serial_event) <'z'>: Likewise.
5902
4f3cee1c
YQ
59032013-02-18 Yao Qi <yao@codesourcery.com>
5904
5905 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5906
8e1d55a3
PA
59072013-02-14 Pedro Alves <palves@redhat.com>
5908
5909 Plug memory leak.
5910
5911 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5912 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5913
458820da
PA
59142013-02-14 Pedro Alves <palves@redhat.com>
5915
5916 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5917
baea0dae
PA
59182013-02-14 Pedro Alves <palves@redhat.com>
5919
5920 * tracepoint.c (save_string): Delete.
5921 (add_tracepoint_action): Use savestring instead of save_string.
5922
0b1afbb3
PA
59232013-02-12 Pedro Alves <palves@redhat.com>
5924
5925 * linux-xtensa-low.c: Ditto.
5926 * xtensa-xtregs.c: Ditto.
5927
8a4ac37e
PA
59282013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5929
5930 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5931 thread_db.
5932
148de6bb
MS
59332013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5934
5935 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5936 aarch64_num_wp_regs and aarch64_num_bp_regs to
5937 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5938
55fac6e0
MS
59392013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5940
5941 * linux-aarch64-low.c (ps_get_thread_area): Replace
5942 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5943
176eb98c
MS
59442013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5945 Marcus Shawcroft <marcus.shawcroft@arm.com>
5946 Nigel Stephens <nigel.stephens@arm.com>
5947 Yufeng Zhang <yufeng.zhang@arm.com>
5948
5949 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5950 (aarch64.c, aarch64-without-fpu.c): New targets.
5951 * configure.srv (aarch64*-*-linux*): New.
5952 * linux-aarch64-low.c: New file.
5953
56f7af9c
MS
59542013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5955
43aaf8b6 5956 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5957 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5958 (dequeue_one_deferred_signal, linux_resume_one_thread)
5959 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5960 (linux_tracefork_grandchild, linux_test_for_tracefork)
5961 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5962 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5963 where the argument is 0.
5964
60f662b0
YQ
59652013-01-25 Yao Qi <yao@codesourcery.com>
5966
5967 * event-loop.c: Include "queue.h".
5968 (gdb_event_p): New typedef.
5969 (struct gdb_event) <next_event>: Remove.
5970 (event_queue): Change to QUEUE(gdb_event_p).
5971 (async_queue_event): Remove.
5972 (gdb_event_xfree): New.
5973 (initialize_event_loop): New.
5974 (process_event): Use API from QUEUE.
5975 (wait_for_event): Likewise.
5976 * server.c (main): Call initialize_event_loop.
5977 * server.h (initialize_event_loop): Declare.
5978
5ae4861a
YQ
59792013-01-18 Yao Qi <yao@codesourcery.com>
5980
5981 * ax.h (struct eval_agent_expr_context): New.
5982 (gdb_eval_agent_expr): Update declaration.
5983 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5984 TFRAME. Add new argument CTX.
5985 * server.h (struct eval_agent_expr_context): Declare.
5986 (agent_mem_read, agent_tsv_read): Update declaration.
5987 (agent_mem_read_string): Likewise.
5988 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5989 (add_traceframe_block): Add new argument TPOINT.
5990 Increase TPOINT->traceframe_usage.
5991 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5992 eval_tracepoint_agent_expr.
5993 (condition_true_at_tracepoint): Likewise.
5994 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5995 (agent_mem_read_string, agent_tsv_read): Likewise.
5996
85e00e85
YQ
59972013-01-16 Yao Qi <yao@codesourcery.com>
5998
5999 * linux-low.c (linux_resume_one_lwp): Don't check
6000 'lwp->bp_reinsert != 0'.
6001
4039cf45
JB
60022013-01-07 Joel Brobecker <brobecker@adacore.com>
6003 Pedro Alves <palves@redhat.com>
6004
6005 * lynx-low.c (ptrace_request_to_str): Define a temporary
6006 macro and use it to simplify this function's implementation.
6007
9044dee2
JB
60082013-01-07 Joel Brobecker <brobecker@adacore.com>
6009
6010 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6011 sets errno.
6012
e6352c8f
JB
60132013-01-07 Joel Brobecker <brobecker@adacore.com>
6014
6015 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6016
50681a27
JB
60172013-01-07 Joel Brobecker <brobecker@adacore.com>
6018
6019 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6020
3f6e77ef
JB
60212013-01-07 Joel Brobecker <brobecker@adacore.com>
6022
6023 * lynx-low.c (lynx_resume): Use the resume_info parameter
6024 to determine the ptid for the lynx_ptrace call, unless
6025 it is equal to minus_one_ptid, in which case we use the
6026 ptid of the current_inferior.
6027 (lynx_wait_1): After having received a thread create/exit
6028 event, resume the inferior's execution using the signaling
6029 thread's ptid, rather than the old ptid.
6030
7fda33ae
JB
60312013-01-07 Joel Brobecker <brobecker@adacore.com>
6032
6033 * lynx-low.c (lynx_resume): Delete variable ret.
6034
b9786c74
JB
60352013-01-01 Joel Brobecker <brobecker@adacore.com>
6036
6037 * gdbreplay.c (gdbreplay_version): Update copyright year.
6038 * server.c (gdbserver_version): Likewise.
6039
8b93d60f
JB
60402012-12-17 Joel Brobecker <brobecker@adacore.com>
6041
6042 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6043 new thread.
6044
037335a7
JB
60452012-12-17 Joel Brobecker <brobecker@adacore.com>
6046
6047 * lynx-low.c (ptrace_request_to_str): Add handling for
6048 PTRACE_GETTRACESIG.
6049
52d4cbd8
JB
60502012-12-17 Joel Brobecker <brobecker@adacore.com>
6051
6052 * lynx-low.c (lynx_attach): Delete variable new_process.
6053
ab8f6ca9
JB
60542012-12-17 Joel Brobecker <brobecker@adacore.com>
6055
6056 * lynx-low.c (lynx_create_inferior): Delete variable
6057 new_process.
6058
78cbc024
JB
60592012-12-17 Joel Brobecker <brobecker@adacore.com>
6060
6061 * lynx-low.c (ptrace_request_to_str): Do not handle
6062 PTRACE_GETTHREADLIST if this macro does not exist.
6063
14a00470
YQ
60642012-12-15 Yao Qi <yao@codesourcery.com>
6065
6066 * Makefile.in (OBS): Add notif.o.
6067 * notif.c, notif.h: New.
6068 * server.c: Include "notif.h".
6069 (struct vstop_notif) <next>: Remove.
6070 <base>: New field.
6071 (queue_stop_reply): Update.
6072 (push_event, send_next_stop_reply): Remove.
6073 (discard_queued_stop_replies): Update.
6074 (notif_stop): New variable.
6075 (handle_v_stopped): Remove.
6076 (handle_v_requests): Don't call handle_v_stopped. Call
6077 handle_ack_notif instead.
6078 (queue_stop_reply_callback): Call notif_event_enque instead
6079 of queue_stop_reply.
6080 (handle_status): Don't call send_next_stop_reply, call
6081 notif_write_event instead.
6082 (kill_inferior_callback): Likewise.
6083 (detach_or_kill_inferior_callback): Likewise.
6084 (main): Call initialize_notif.
6085 (process_serial_event): Call QUEUE_is_empty.
6086 (handle_target_event): Call notif_push instead of push event.
6087 * server.h (push_event): Remove declaration.
6088
61c125b9
TT
60892012-12-10 Tom Tromey <tromey@redhat.com>
6090
6091 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6092 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6093 macros.
6094 (.c.o): Rewrite.
6095 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6096 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6097 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6098 (amd64-linux-ipa.o, ax.o): Rewrite.
6099 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6100 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6101 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6102 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6103 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6104 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6105 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6106 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6107 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6108 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6109 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6110 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6111 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6112 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6113 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6114 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6115 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6116 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6117 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6118 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6119 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6120 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6121 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6122 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6123 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6124 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6125 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6126 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6127 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6128 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6129 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6130 (reg-tilegx.o): Remove.
6131 (all_object_files): New macro.
6132 Include .deps files.
6133 * aclocal.m4, configure: Rebuild.
6134 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6135 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6136 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6137
e90e9ad9
TT
61382012-12-05 Tom Tromey <tromey@redhat.com>
6139
6140 PR gdb/14917:
6141 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6142
02d403bf 61432012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6144
6145 * configure.ac: Check for linux/perf_event.h.
6146 * config.in: Regenerated.
6147 * configure: Regenerated.
6148
0270a750
PA
61492012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6150
6151 * hostio.c (handle_readlink): Decrease buffer size
6152 parameter passed to readlink by one byte.
6153
8c29b58e
YQ
61542012-11-26 Yao Qi <yao@codesourcery.com>
6155
6156 * configure.ac (build_warnings): Append '-Wempty-body'.
6157 * configure: Regenerated.
6158 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6159 body.
6160
8bdce1ff
PM
61612012-11-15 Pierre Muller <muller@sourceware.org>
6162
6163 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6164 * config.in: Regenerate.
6165 * configure: Regenerate.
6166 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6167 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6168 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6169 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6170 header.
6171 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6172 instead of <sys/wait.h> header.
6173 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6174
02d403bf 61752012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6176
6177 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6178 (various make rules): Remove -DGDBSERVER
6179
fbd5db48
YQ
61802012-11-09 Yao Qi <yao@codesourcery.com>
6181
6182 * spu-low.c (current_ptid): Move it to ..
6183 * gdbthread.h: ... here. New.
6184 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6185 * server.c (myresume, process_serial_event): Likewise.
6186 * thread-db.c (thread_db_find_new_threads): Likewise.
6187 * tracepoint.c (run_inferior_command): Likewise.
6188
b3dc46ff
AB
61892012-10-01 Andrew Burgess <aburgess@broadcom.com>
6190
6191 * server.c (handle_search_memory_1): Include access length in
6192 warning message.
6193
07c04788
HPN
61942012-09-05 Michael Brandt <michael.brandt@axis.com>
6195
6196 * linux-crisv32-low.c: Fix compile errors.
6197
918d227b
YQ
61982012-09-04 Yao Qi <yao@codesourcery.com>
6199
6200 * tracepoint.c (cmd_qtsv): Adjust debug message.
6201 Don't check CUR_TPOINT.
6202
18c1b81a
YQ
62032012-08-28 Yao Qi <yao@codesourcery.com>
6204
6205 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6206 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6207 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6208 Remove declarations of xmalloc, xreallloc, xstrdup and
6209 freeargv.
6210 * Makefile.in (libiberty_h): New.
6211 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6212 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6213
dc82f37b
YQ
62142012-08-23 Yao Qi <yao@codesourcery.com>
6215
6216 * server.h: Remove declaration of 'xsnprintf'.
6217
406b1477
KS
62182012-08-22 Keith Seitz <keiths@redhat.com>
6219
6220 * server.h: Include build-gnulib-gbserver/config.h.
6221 * gdbreplay.c: Likewise.
6222
e6712ff1
DE
62232012-08-08 Doug Evans <dje@google.com>
6224
6225 * Makefile.in (SFILES): Add gdb_vecs.c.
6226 (OBS): Add gdb_vecs.o.
6227 (gdb_vecs_h, host_defs_h): New variables.
6228 (thread-db.o): Add $(gdb_vecs_h) dependency.
6229 (gdb_vecs.o): New rule.
6230 * thread-db.c: #include "gdb_vecs.h".
6231 (thread_db_load_search): Use a vector to iterate over path elements.
6232 Handle text appearing after "$pdir".
6233
6234 * configure.ac: Add check for strstr.
6235 * config.in: Regenerate.
6236 * configure: Regenerate.
6237
7c3270ae
UW
62382012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6239
6240 * hostio.c (handle_pread): If pread fails, fall back to attempting
6241 lseek/read.
6242 (handle_pwrite): Likewise for pwrite.
6243
b62e2b27
UW
62442012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6245
6246 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6247 between unsupported TYPE and unimplementable ADDR/LEN combination.
6248 (arm_insert_point): Act on new return value.
6249
78a99e91
PA
62502012-07-31 Pedro Alves <palves@redhat.com>
6251
6252 * server.c (process_point_options): Only skip tokens if we find
6253 one that is unrecognized. Don't treat 'X' specially while
6254 skipping unrecognized tokens.
6255
fcf303ab
UW
62562012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6257
6258 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6259 to 4-byte-align HW breakpoint addresses for Thumb.
6260
7255706c
YQ
62612012-07-27 Yao Qi <yao@codesourcery.com>
6262
6263 PR remote/14161.
6264
6265 * server.h: Declare gdb_agent_about_to_close.
6266 * target.c (kill_inferior): Include "agent.h".
6267 New. Send command 'kill'.
6268 * target.h (kill_inferior): Removed macro.
6269 * tracepoint.c (gdb_agent_about_to_close): New.
6270 (gdb_agent_helper_thread): Handle command 'close'.
6271 Wait endlessly until the inferior stops.
6272 Install gdb_agent_remove_socket to atexit hook.
6273 (agent_socket_name): New static variable.
6274 (gdb_agent_socket_init): Replace local variable 'name' with
6275 'agent_socket_name'.
6276 (gdb_agent_remove_socket): New.
6277
5a3f286f
YQ
62782012-07-27 Yao Qi <yao@codesourcery.com>
6279
6280 * server.c (process_point_options): Stop at 'X' when parsing.
6281
961bd387
ME
62822012-07-19 Michael Eager <eager@eagercon.com>
6283
a261b8f5 6284 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6285 to hw_execute.
6286 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6287 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6288 hardware breakpoint.
6289
aa7c7447
JK
62902012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6291
6292 * gdbserver/linux-low.c (initialize_low): Call
6293 linux_ptrace_init_warnings.
6294
7f216e7c
DE
62952012-07-02 Doug Evans <dje@google.com>
6296
6297 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6298 pointer to int.
6299
d3ce09f5
SS
63002012-07-02 Stan Shebs <stan@codesourcery.com>
6301
6302 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6303 (ax.o): Add it to build rule.
6304 (ax-ipa.o): Ditto.
6305 (OBS): Add format.o.
6306 (IPA_OBS): Add format.o.
6307 * server.c (handle_query): Claim support for breakpoint commands.
6308 (process_point_options): Add command case.
6309 (process_serial_event): Leave running if there are printfs in
6310 effect.
6311 * mem-break.h (any_persistent_commands): Declare.
6312 (add_breakpoint_commands): Declare.
6313 (gdb_no_commands_at_breakpoint): Declare.
6314 (run_breakpoint_commands): Declare.
6315 * mem-break.c (struct point_command_list): New struct.
6316 (struct breakpoint): New field command_list.
6317 (any_persistent_commands): New function.
6318 (add_commands_to_breakpoint): New function.
6319 (add_breakpoint_commands): New function.
6320 (gdb_no_commands_at_breakpoint): New function.
6321 (run_breakpoint_commands): New function.
6322 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6323 locally.
6324 * ax.c: Include format.h.
6325 (ax_printf): New function.
6326 (gdb_eval_agent_expr): Add printf opcode.
6327
2f8f6aed
YQ
63282012-06-13 Yao Qi <yao@codesourcery.com>
6329
6330 * server.c (start_inferior): Remove duplicated writes to fields
6331 'last_resume_kind' and 'last_status' of 'current_inferior'.
6332
0c9070b3
YQ
63332012-06-12 Yao Qi <yao@codesourcery.com>
6334 Pedro Alves <palves@redhat.com>
6335
6336 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6337 comment.
6338 * server.c (handle_v_cont): Extend comment.
6339
c52daf70
YQ
63402012-06-11 Yao Qi <yao@codesourcery.com>
6341
6342 * linux-low.c (linux_attach): Add 'static'.
6343
d38bbb0a
YQ
63442012-06-06 Yao Qi <yao@codesourcery.com>
6345
6346 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6347
89dc0afd
JK
63482012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6349
6350 Fix gcc -flto compilation warning.
6351 * server.c (main): Make variable multi_mode and attach volatile.
6352
75f62ce7
TJB
63532012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6354
6355 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6356 if the platform doesn't know about it.
6357
65f479b6
PA
63582012-05-30 Jeff Kenton <jkenton@tilera.com>
6359
6360 * Makefile.in (SFILES): Add linux-tile-low.c.
6361 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6362 * configure.srv: Handle tilegx-*-linux*.
6363 * linux-tile-low.c: New file.
6364
0c5bf5a9
JK
63652012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6366
6367 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6368
a493e3e2
PA
63692012-05-24 Pedro Alves <palves@redhat.com>
6370
6371 PR gdb/7205
6372
43aaf8b6 6373 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6374
2ea28649
PA
63752012-05-24 Pedro Alves <palves@redhat.com>
6376
6377 PR gdb/7205
6378
6379 Replace target_signal with gdb_signal throughout.
6380
8d409d16
MR
63812012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6382
6383 * linux-low.c (linux_store_registers): Avoid the copying sequence
6384 when no data has been retrieved by ptrace.
6385
23512c01
MGD
63862012-05-22 Will Deacon <will.deacon@arm.com>
6387
6388 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6389 Include asm/ptrace.h.
6390 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6391 already defined.
6392
4934b29e
MR
63932012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6394
6395 * linux-low.c (linux_store_registers): Don't re-retrieve data
6396 with ptrace that has already been obtained from /proc. Always
6397 copy any data retrieved with ptrace to the buffer supplied.
6398
bde24c0a
PA
63992012-05-11 Yao Qi <yao@codesourcery.com>
6400 Pedro Alves <palves@redhat.com>
6401
6402 * linux-low.c (enum stopping_threads_kind): New.
6403 (stopping_threads): Change type to `enum stopping_threads_kind'.
6404 (handle_extended_wait): If stopping and suspending threads, leave
6405 the new_lwp suspended too.
6406 (linux_wait_for_event): Adjust.
6407 (stop_all_lwps): Set `stopping_threads' to
6408 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6409 whether we're suspending threads or just stopping them. Assert no
6410 recursion happens.
6411
623b6bdf
YQ
64122012-04-29 Yao Qi <yao@codesourcery.com>
6413
6414 * server.h: Move some code to ...
6415 * gdbthread.h: ... here. New.
6416 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6417 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6418 (nto-low.o, win32-low.o): Likewise.
6419 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6420 * regcache.c, remote-utils.c, server.c: Likewise.
6421 * target.c, tracepoint.c, win32-low.c: Likewise.
6422
f15f9948
TJB
64232012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6424
6425 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6426 (PTRACE_ARG4_TYPE): Likewise.
6427 (PTRACE_XFER_TYPE): Likewise.
6428 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6429 ptrace to PTRACE_ARG3_TYPE.
6430 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6431 (PTRACE_ARG4_TYPE): Likewise.
6432 (PTRACE_XFER_TYPE): Likewise.
6433 (linux_detach_one_lwp): Cast fourth argument of
6434 ptrace to long then PTRACE_ARG4_TYPE.
6435 (regsets_fetch_inferior_registers): Cast third argument of
6436 ptrace to long then PTRACE_ARG3_TYPE.
6437 (regsets_store_inferior_registers): Likewise.
6438
38ea300a
PA
64392012-04-20 Pedro Alves <palves@redhat.com>
6440
6441 * configure: Regenerate.
6442
c971b7fa
PA
64432012-04-19 Pedro Alves <palves@redhat.com>
6444
43aaf8b6 6445 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6446 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6447 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6448 (all, install-only, uninstall, clean-info, all-lib, clean): No
6449 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6450 (maintainer-clean realclean distclean): Use subdir_do.
6451 (subdir_do): New.
6452 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6453 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6454 * acinclude.m4: Include acx_configure_dir.m4.
6455 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6456 calls. Call AC_PROG_RANLIB. Configure gnulib using
6457 ACX_CONFIGURE_DIR.
6458 (GNULIB): New.
6459 (GNULIB_STDINT_H): Adjust.
6460 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6461 * gdbreplay.c: Include build-gnulib/config.h.
6462 * server.h: Likewise.
6463 * aclocal.m4: Regenerate.
6464 * config.in: Regenerate.
6465 * configure: Regenerate.
c971b7fa 6466
809277f8
PA
64672012-04-19 Pedro Alves <palves@redhat.com>
6468
6469 * Makefile.in (LIBGNU, INCGNU): Adjust.
6470 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6471 (all, install-only, uninstall, clean-info, all-lib, clean)
6472 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6473 * configure.ac: Adjust AC_OUTPUT output.
6474 * aclocal.m4: Regenerate.
6475 * configure: Regenerate.
6476
fd9bb8b8
PA
64772012-04-19 Pedro Alves <palves@redhat.com>
6478
6479 * Makefile.in (generated_files): New.
6480 (server_h): Remove the explicit dependency on config.h, and depend
6481 on $generated_files.
6482
1c298c66
PA
64832012-04-19 Pedro Alves <palves@redhat.com>
6484
6485 * Makefile.in (INCGNU): Add -Ignulib.
6486
57c4b50b
PA
64872012-04-19 Pedro Alves <palves@redhat.com>
6488
6489 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6490 (INCGNU): ... this, and spell out -I here.
6491 (GNULIB_LIB): Rename to ...
6492 (LIBGNU): ... this.
6493 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6494
1030e047
PA
64952012-04-19 Pedro Alves <palves@redhat.com>
6496
6497 * config.in: Regenerate.
6498
447d4319
PA
64992012-04-19 Pedro Alves <palves@redhat.com>
6500
6501 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6502 * server.h (memmem): Remove declaration.
6503 * config.in: Regenerate.
6504 * configure: Regenerate.
6505
aad9eab9
YQ
65062012-04-19 Yao Qi <yao@codesourcery.com>
6507
6508 * Makefile.in (SFILES): Add common/vec.c.
6509 (OBS): Add vec.o.
6510 (vec.o): New rule.
6511
3e10640f
YQ
65122012-04-19 Yao Qi <yao@codesourcery.com>
6513
6514 * remote-utils.c (prepare_resume_reply): Replace with macro
6515 target_core_of_thread.
6516 * server.c (handle_qxfer_threads_proper): Likewise.
6517 * target.h (traget_core_of_thread): New macro.
6518
71622373
PA
65192012-04-18 Pedro Alves <palves@redhat.com>
6520
6521 * aclocal.m4: Regenerate.
6522 * configure: Regenerate.
6523
80d26939
YQ
65242012-04-16 Yao Qi <yao@codesourcery.com>
6525
6526 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6527 duplicated on address.
6528
42476b70
YQ
65292012-04-16 Yao Qi <yao@codesourcery.com>
6530
6531 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6532 (struct tracepoint_action_ops) <send>: New field.
6533 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6534 (agent_expr_send, x_tracepoint_action_send): New.
6535 (l_tracepoint_action_send): New.
6536 (cmd_qtdp): Download and install tracepoint
6537 according to `use_agent'.
6538 (run_inferior_command): Add one more parameter `len'.
6539 Update callers.
6540 (tracepoint_send_agent): New.
6541 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6542
7bc83639
YQ
65432012-04-16 Yao Qi <yao@codesourcery.com>
6544
6545 * tracepoint.c (download_tracepoints): Moved to ...
6546 (cmd_qtstart): ... here.
6547
5f18041e
YQ
65482012-04-14 Yao Qi <yao@codesourcery.com>
6549
6550 * tracepoint.c: Include inttypes.h.
6551 (struct collect_memory_action): Use sized types.
6552 (struct tracepoint): Likewise.
6553 (cmd_qtdp, stop_tracing): Update print specifiers.
6554 (cmd_qtp, response_tracepoint): Likewise.
6555 (collect_data_at_tracepoint): Likewise.
6556 (collect_data_at_step): Likewise.
6557
55a8c076
YQ
65582012-04-14 Yao Qi <yao@codesourcery.com>
6559
6560 Import gnulib module inttypes.
6561 * aclocal.m4, config.in, configure: Regenerated.
6562
dc750257
YQ
65632012-04-14 Yao Qi <yao@codesourcery.com>
6564
6565 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6566 Makefile and config.status at last.
6567
0ab5faf9
YQ
65682012-04-13 Yao Qi <yao@codesourcery.com>
6569
6570 * tracepoint.c: Include stdint.h unconditionally.
6571
18f5fd81
TJB
65722012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6573
6574 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6575 on BFD_HAVE_SYS_PROCFS_TYPE.
6576 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6577 * configure: Regenerate.
6578 * config.in: Likewise.
6579
4d47af5c
L
65802012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6581
6582 * Makefile.in (clean): Also remove x32.c x32-linux.c
6583 x32-avx.c x32-avx-linux.c.
6584 (x32.o): New target.
6585 (x32.c): Likewise.
6586 (x32-linux.o): Likewise.
6587 (x32-linux.c): Likewise.
6588 (x32-avx.o): Likewise.
6589 (x32-avx.c): Likewise.
6590 (x32-avx-linux.o): Likewise.
6591 (x32-avx-linux.c): Likewise.
6592
6593 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6594 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6595 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6596 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6597 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6598 i386/x32-avx-linux.xml.
6599
6600 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6601 (init_registers_x32_avx_linux): Likwise.
6602 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6603 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6604
ecedbe58
PA
66052012-04-13 Pedro Alves <palves@redhat.com>
6606
6607 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6608 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6609 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6610 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6611 the sub-make.
6612
c92b5177
L
66132012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6614
6615 * linux-x86-low.c (compat_x32_clock_t): New.
6616 (compat_x32_siginfo_t): Likewise.
6617 (compat_x32_siginfo_from_siginfo): Likewise.
6618 (siginfo_from_compat_x32_siginfo): Likewise.
6619 (linux_is_elf64): Likewise.
6620 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6621 and siginfo_from_compat_x32_siginfo for x32.
6622 (x86_arch_setup): Set linux_is_elf64.
6623
214d508e
L
66242012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6625
6626 PR gdb/13969
6627 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6628 e_machine field.
6629 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6630 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6631 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6632 compatible with process.
6633
c9a1864a
YQ
66342012-04-12 Yao Qi <yao@codesourcery.com>
6635
6636 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6637 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6638 (install-only, install-info, clean): Handle sub dir gnulib.
6639 (all-lib, am--refresh): New targets.
6640 (memmem.o): Remove target.
6641 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6642 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6643 (AC_REPLACE_FUNCS): Remove memmem.
6644 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6645 (AC_OUTPUT): Generate Makefile in gnulib/.
6646 * aclocal.m4, config.in, configure: Regenerated.
6647
367ba2c2
MR
66482012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6649
6650 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6651
9d236627
PA
66522012-04-05 Pedro Alves <palves@redhat.com>
6653
6654 -Werror=strict-aliasing
6655
6656 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6657 pointer.
6658
111217b3
PA
66592012-04-04 Pedro Alves <palves@redhat.com>
6660
6661 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6662 (sparc_store_gregset_from_stack, sparc_store_gregset)
6663 (sparc_breakpoint_at): Fix formatting.
6664
8365dcf5
TJB
66652012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6666
6667 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6668 are available.
6669 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6670 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6671 * config.in: Regenerate.
6672 * configure: Likewise.
6673
689cc2ae
PA
66742012-03-29 Pedro Alves <palves@redhat.com>
6675
6676 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6677 Correct ptrace arguments.
6678
c14dfd32
PA
66792012-03-28 Pedro Alves <palves@redhat.com>
6680
6681 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6682 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6683 (IA64_FR1_REGNUM): New defines.
6684 (ia64_fetch_register): New.
6685 (the_low_target): Install it.
6686 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6687 field.
6688 * linux-low.c (linux_fetch_registers): Try the
6689 the_low_target.fetch_register hook first.
6690
6691 * linux-arm-low.c (the_low_target): Adjust.
6692 * linux-bfin-low.c (the_low_target): Adjust.
6693 * linux-cris-low.c (the_low_target): Adjust.
6694 * linux-crisv32-low.c (the_low_target): Adjust.
6695 * linux-m32r-low.c (the_low_target): Adjust.
6696 * linux-m68k-low.c (the_low_target): Adjust.
6697 * linux-mips-low.c (the_low_target): Adjust.
6698 * linux-ppc-low.c (the_low_target): Adjust.
6699 * linux-s390-low.c (the_low_target): Adjust.
6700 * linux-sh-low.c (the_low_target): Adjust.
6701 * linux-sparc-low.c (the_low_target): Adjust.
6702 * linux-tic6x-low.c (the_low_target): Adjust.
6703 * linux-x86-low.c (the_low_target): Adjust.
6704 * linux-xtensa-low.c (the_low_target): Adjust.
6705
63c88e13
PA
67062012-03-26 Pedro Alves <palves@redhat.com>
6707
6708 * server.c (handle_qxfer_libraries): Don't bail early if
6709 the_target->qxfer_libraries_svr4 is not NULL.
6710
fb723180
PA
67112012-03-26 Pedro Alves <palves@redhat.com>
6712
6713 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6714
0afae3cf
PA
67152012-03-23 Pedro Alves <palves@redhat.com>
6716
6717 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6718 "library-list-svr4" element's start tag when the the DSO list is
6719 empty.
6720
485f1ee4
PA
67212012-03-23 Pedro Alves <palves@redhat.com>
6722
6723 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6724 a variable whose type size is the same as the inferior's pointer
6725 size.
6726
a5362b9a
TS
67272012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6728
6729 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6730 struct siginfo.
6731 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6732 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6733 * linux-low.h: Include <signal.h>.
6734 (struct siginfo): Remove forward declaration.
6735 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6736 struct siginfo.
6737
d226c142
MF
67382012-03-21 Mike Frysinger <vapier@gentoo.org>
6739
6740 * .gitignore: Ignore more files.
6741
122f36ef
PA
67422012-03-19 Pedro Alves <palves@redhat.com>
6743 Jan Kratochvil <jan.kratochvil@redhat.com>
6744
6745 * server.c (cont_thread, general_thread): Add describing comments.
6746 (start_inferior): Clear `cont_thread'.
6747 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6748 of a process.
6749
fc3e5175
YQ
67502012-03-15 Yao Qi <yao@codesourcery.com>
6751
6752 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6753 handling to ...
6754 (cmd_qtdp): ... here.
6755
8d0d92cd
YQ
67562012-03-15 Yao Qi <yao@codesourcery.com>
6757
6758 * tracepoint.c (struct tracepoint_action_ops): New.
6759 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6760 (m_tracepoint_action_download): New.
6761 (r_tracepoint_action_download): New.
6762 (x_tracepoint_action_download): New.
6763 (l_tracepoint_action_download): New.
6764 (add_tracepoint_action): Install `action->ops' according type.
6765 (download_tracepoint_1): Move code `download' function pointer
6766 of various tracepoint_action_ops.
6767
87b0bb13
JK
67682012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6769
6770 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6771 linux_ptrace_attach_warnings.
6772
5f572dec
JK
67732012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6774
6775 * Makefile.in (linux-ptrace.o): New.
6776 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6777 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6778 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6779 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6780 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6781 of these targets.
6782 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6783
f4647387
YQ
67842012-03-08 Yao Qi <yao@codesourcery.com>
6785 Pedro Alves <palves@redhat.com>
6786
6787 Fix PR server/13392.
6788 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6789 offset of JMP insn.
6790 * tracepoint.c (remove_tracepoint): New.
6791 (cmd_qtdp): Call remove_tracepoint when failed to install.
6792
9b224c5e
PA
67932012-03-07 Pedro Alves <palves@redhat.com>
6794
6795 * linux-low.c (get_detach_signal): New.
6796 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6797 Pass on pending signals to PTRACE_DETACH. Check the result of the
6798 ptrace call.
6799 * server.c (program_signals, program_signals_p): New.
6800 (handle_general_set): Handle QProgramSignals.
6801 * server.h (program_signals, program_signals_p): Declare.
6802
e237a7e2
JK
68032012-03-05 Pedro Alves <palves@redhat.com>
6804 Jan Kratochvil <jan.kratochvil@redhat.com>
6805
6806 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6807 New comment why.
6808
5808517f
YQ
68092012-03-03 Yao Qi <yao@codesourcery.com>
6810
6811 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6812 agent_look_up_symbols.
6813
58b4daa5
YQ
68142012-03-03 Yao Qi <yao@codesourcery.com>
6815
6816 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6817 (linux-x86-low.o): Likewise.
6818 * server.h: Remove in_process_agent_loaded.
6819 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6820 common/agent.c.
6821 Update callers.
6822
8ffcbaaf
YQ
68232012-03-03 Yao Qi <yao@codesourcery.com>
6824
6825 * tracepoint.c (gdb_agent_capability): New global.
6826 (in_process_agent_loaded_ust): Renamed to
6827 `in_process_agent_supports_ust'.
6828 Update callers.
6829 (in_process_agent_supports_ust): Call agent_capability_check.
6830 (clear_installed_tracepoints): Assert that agent supports
6831 agent.
6832
d1feda86
YQ
68332012-03-03 Yao Qi <yao@codesourcery.com>
6834
6835 * linux-low.c (linux_supports_agent): New.
6836 (linux_target_ops): Initialize field `supports_agent' with
6837 linux_supports_agent.
6838 * target.h (struct target_ops) <supports_agent>: New.
6839 (target_supports_agent): New macro.
6840 * server.c (handle_general_set): Handle packet 'QAgent'.
6841 (handle_query): Send `QAgent+'.
6842 * Makefile.in (server.o): Depends on agent.h.
6843
2fa291ac
YQ
68442012-03-03 Yao Qi <yao@codesourcery.com>
6845
6846 * Makefile.in (OBS): Add agent.o.
6847 Add new rule for agent.o.
6848 Track dependence of tracepoint.c on agent.h.
6849 * tracepoint.c (run_inferior_command_1):
6850 (run_inferior_command): Call agent_run_command.
6851 (gdb_ust_connect_sync_socket): Deleted. Move it to
6852 common/agent.c.
6853 (resume_thread, stop_thread): Likewise.
6854 (gdb_ust_socket_init): Renamed to ...
6855 (gdb_agent_socket_init): ... New.
6856 (gdb_ust_thread): Renamed to ...
6857 (gdb_agent_helper_thread): ... New.
6858 (gdb_ust_init): Move some code to ...
6859 (gdb_agent_init): ... here. New.
6860 [HAVE_UST]: Call gdb_ust_init.
6861 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6862 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6863 * config.in, configure: Regenerated.
6864
05044653
PA
68652012-03-02 Pedro Alves <palves@redhat.com>
6866
6867 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6868 * linux-low.c (struct simple_pid_list): New.
6869 (stopped_pids): New a struct simple_pid_list pointer.
6870 (add_to_pid_list, pull_pid_from_list): New.
6871 (handle_extended_wait): Don't assume the first signal new children
6872 report is SIGSTOP. Adjust call to pull_pid_from_list.
6873 (linux_wait_for_lwp): Adjust.
6874
8d00225b
YQ
68752012-03-02 Yao Qi <yao@codesourcery.com>
6876
6877 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6878 debug log.
6879
19560ba5
YQ
68802012-03-02 Yao Qi <yao@codesourcery.com>
6881
6882 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6883 `stop_pc' and `tpoint'. Update caller.
6884
1faeff08
MR
68852012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6886
6887 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6888 * linux-low.c (use_linux_regsets): New macro.
6889 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6890 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6891 (linux_register_in_regsets): New function.
6892 (usr_fetch_inferior_registers): Skip registers covered by
6893 regsets.
6894 (usr_store_inferior_registers): Likewise.
6895 (usr_fetch_inferior_registers): New macro.
6896 (usr_store_inferior_registers): Likewise.
6897 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6898 (linux_store_registers): Likewise.
6899 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6900 prototype.
6901 (init_registers_mips64_dsp_linux): Likewise.
6902 (init_registers_mips_linux): New macro.
6903 (init_registers_mips_dsp_linux): Likewise.
6904 (mips_dsp_num_regs): Likewise.
6905 (DSP_BASE, DSP_CONTROL): New fallback macros.
6906 (mips_base_regs): New macro.
6907 (mips_regmap): Use it. Fix the size.
6908 (mips_dsp_regmap): New variable.
6909 (mips_dsp_regset_bitmap): Likewise.
6910 (mips_arch_setup): New function.
6911 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6912 than mips_regmap.
6913 (mips_cannot_store_register): Likewise.
6914 (the_low_target): Update .arch_setup, .num_regs and .regmap
6915 initializers. Add .regset_bitmap initializer.
6916 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6917 initializer.
6918 * linux-bfin-low.c (the_low_target): Likewise.
6919 * linux-cris-low.c (the_low_target): Likewise.
6920 * linux-crisv32-low.c (the_low_target): Likewise.
6921 * linux-ia64-low.c (the_low_target): Likewise.
6922 * linux-m32r-low.c (the_low_target): Likewise.
6923 * linux-m68k-low.c (the_low_target): Likewise.
6924 * linux-ppc-low.c (the_low_target): Likewise.
6925 * linux-s390-low.c (the_low_target): Likewise.
6926 * linux-sh-low.c (the_low_target): Likewise.
6927 * linux-sparc-low.c (the_low_target): Likewise.
6928 * linux-tic6x-low.c (the_low_target): Likewise.
6929 * linux-x86-low.c (the_low_target): Likewise.
6930 * linux-xtensa-low.c (the_low_target): Likewise.
6931 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6932 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6933 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6934 srv_xmlfiles.
6935 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6936 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6937
c03e6ccc
YQ
69382012-02-29 Yao Qi <yao@codesourcery.com>
6939 Pedro Alves <palves@redhat.com>
6940
6941 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6942 `step_over_finished' is true.
6943
644cebc9
PA
69442012-02-27 Pedro Alves <palves@redhat.com>
6945
6946 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6947 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6948
c14d7ab2
PA
69492012-02-27 Pedro Alves <palves@redhat.com>
6950
6951 PR server/9684
6952 * linux-low.c (pid_is_stopped): New.
6953 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6954
412c89dd
LM
69552012-02-25 Luis Machado <lgustavo@codesourcery.com>
6956
6957 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6958 of conditions.
6959
b745defe
MR
69602012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6961
6962 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6963
9f3a5c85
LM
69642012-02-24 Luis Machado <lgustavo@codesourcery>
6965
6966 * server.c (handle_query): Advertise support for target-side
6967 breakpoint condition evaluation.
6968 (process_point_options): New function.
6969 (process_serial_event): When inserting a breakpoint, check for
6970 a target-side condition that should be evaluated.
6971
6972 * mem-break.c: Include regcache.h and ax.h.
6973 (point_cond_list_t): New data structure.
6974 (breakpoint) <cond_list>: New field.
6975 (find_gdb_breakpoint_at): Make non-static.
6976 (delete_gdb_breakpoint_at): Clear any target-side
6977 conditions.
6978 (clear_gdb_breakpoint_conditions): New function.
6979 (add_condition_to_breakpoint): Likewise.
6980 (add_breakpoint_condition): Likewise.
6981 (gdb_condition_true_at_breakpoint): Likewise.
6982 (gdb_breakpoint_here): Return result directly instead
6983 of going through a local variable.
6984
6985 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6986 (clear_gdb_breakpoint_conditions): Likewise.
6987 (add_breakpoint_condition): Likewise.
6988 (gdb_condition_true_at_breakpoint): Likewise.
6989
6990 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6991 (need_step_over_p): Take target-side breakpoint condition into
6992 consideration.
6993
5e1dc496
LM
69942012-02-24 Luis Machado <lgustavo@codesourcery>
6995
6996 * server.h: Include tracepoint.h.
6997 (agent_mem_read, agent_get_trace_state_variable_value,
6998 agent_set_trace_state_variable_value,
6999 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7000 get_set_tsv_func_addr): New prototypes.
7001
7002 * ax.h: New include file.
7003 * ax.c: New source file.
7004
7005 * tracepoint.c: Include ax.h.
7006 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7007 agent_expr, eval_result_type): Move to ax.h.
7008 (parse_agent_expr): Rename to ...
7009 (gdb_parse_agent_expr): ... this, make it non-static and move
7010 to ax.h.
7011 (unparse_agent_expr) Rename to ...
7012 (gdb_unparse_agent_expr): ... this, make it non-static and move
7013 to ax.h.
7014 (eval_agent_expr): Rename to ...
7015 (eval_tracepoint_agent_expr): ... this.
7016 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7017 forward declarations.
7018 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7019 (agent_get_trace_state_variable_value): New function.
7020 (agent_set_trace_state_variable_value): New function.
7021 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7022 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7023 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7024 (condition_true_at_tracepoint): Likewise.
7025 (parse_agent_expr): Rename to ...
7026 (gdb_parse_agent_expr): ... this and move to ax.c.
7027 (unparse_agent_expr): Rename to ...
7028 (gdb_unparse_agent_expr): ... this and move to ax.c.
7029 (gdb_agent_op_name): Move to ax.c.
7030 (eval_agent_expr): Rename to ...
7031 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7032 and move to ax.c.
7033 (eval_tracepoint_agent_expr): New function.
7034 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7035 non-static.
5e1dc496
LM
7036 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7037 ax.c.
7038 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7039 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7040 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7041 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7042 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7043 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7044 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7045 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7046 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7047 (compile_bytecodes): Remove forward declaration.
7048 (is_goto_target): Move to ax.c.
7049 (compile_bytecodes): Move to ax.c and call
7050 agent_get_trace_state_variable_value (...) and
7051 agent_set_trace_state_variable_value (...).
7052
7053 * Makefile.in: Update ax.c and IPA dependencies.
7054
277e4e52
PA
70552012-02-24 Pedro Alves <palves@redhat.com>
7056
7057 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7058 (cmd_bigqtbuffer_circular): ... this. Only handle
7059 'QTBuffer:circular:'.
7060 (handle_tracepoint_general_set): Adjust.
7061
bf4c19f7
YQ
70622012-02-16 Yao Qi <yao@codesourcery.com>
7063
7064 * inferiors.c: Move code to ...
7065 * dll.c: .... here. New.
7066 * server.h: Declare clear_dlls.
7067 * Makefile.in (SFILES): Add dll.c.
7068 (OBS): Add dll.o
7069 (dll.o): New rule.
7070
d73f2619
YQ
70712012-02-11 Yao Qi <yao@codesourcery.com>
7072
7073 * server.c: (handle_monitor_command): Add a new parameter
7074 `own_buf'.
7075 (handle_query): Update caller.
7076
f8255c2a
JB
70772012-02-09 Joel Brobecker <brobecker@adacore.com>
7078
7079 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7080 * configure, config.in: Regenerate.
7081 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7082 is not defined.
7083
da84f473
PA
70842012-02-02 Pedro Alves <palves@redhat.com>
7085
7086 Try SIGKILL first, then PTRACE_KILL.
7087 * linux-low.c (linux_kill_one_lwp): New.
7088 (linux_kill_one_lwp): Rename to ...
7089 (kill_one_lwp_callback): ... this. Use the new
7090 linux_kill_one_lwp.
7091
e886a173
PA
70922012-02-02 Pedro Alves <palves@redhat.com>
7093
7094 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7095 inferior.
7096
be07f1a2
PA
70972012-01-27 Pedro Alves <palves@redhat.com>
7098
7099 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7100 (elf_64_file_p): Make static.
7101 (linux_pid_exe_is_elf_64_file): New.
7102 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7103 Delete declarations.
7104 (linux_pid_exe_is_elf_64_file): Declare.
7105 * linux-x86-low.c (x86_arch_setup): Use
7106 linux_pid_exe_is_elf_64_file.
7107
d8301ad1
JK
71082012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7109
7110 * linux-low.c (linux_wait_for_event_1): Rename to ...
7111 (linux_wait_for_event): ... here and merge it with former
7112 linux_wait_for_event - new variable wait_ptid, use it.
7113 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7114
01b17894
PA
71152012-01-23 Pedro Alves <palves@redhat.com>
7116
7117 * server.c (main): Avoid yet another case of infinite loop while
7118 detaching/killing after a longjmp.
7119
e825046f
JK
71202012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7121
7122 Code cleanup.
7123 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7124
b9e7b9c3
UW
71252012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7126
7127 * hostio.c (handle_readlink): New function.
7128 (handle_vFile): Call it to handle "vFile:readlink" packets.
7129
901f9912
UW
71302012-01-20 Pedro Alves <palves@redhat.com>
7131 Ulrich Weigand <ulrich.weigand@linaro.org>
7132
7133 * server.c (handle_v_requests): Only support vAttach and vRun to
7134 start multiple processes when in extended protocol mode.
7135
fc1ab1a0
PA
71362012-01-17 Pedro Alves <palves@redhat.com>
7137
7138 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7139 memalign plus mprotect to allocate the scratch buffer.
7140
7d5d4e98
PA
71412012-01-13 Pedro Alves <palves@redhat.com>
7142
7143 * server.c (attach_inferior): Clear `cont_thread'.
7144
f128d5e9
PA
71452012-01-13 Pedro Alves <palves@redhat.com>
7146
7147 * server.c (main): Avoid infinite loop while detaching/killing
7148 after a longjmp.
7149
06db92f0
DE
71502012-01-09 Doug Evans <dje@google.com>
7151
7152 * server.c (start_inferior): Set last_ptid in --wrapper case.
7153
32d92999
YQ
71542012-01-06 Yao Qi <yao@codesourcery.com>
7155
7156 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7157 defined.
7158 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7159
5e0a92a9
YQ
71602012-01-04 Yao Qi <yao@codesourcery.com>
7161
7162 * tracepoint.c (cmd_qtdp): Print debug message
7163 for static tracepoint.
7164
ae639e8c
YQ
71652012-01-04 Yao Qi <yao@codesourcery.com>
7166
7167 * tracepoint.c (trace_vdebug): Differentiate debug message
7168 between gdbserver and IPA.
7169
f72429c5
YQ
71702012-01-03 Yao Qi <yao@codesourcery.com>
7171
7172 * tracepoint.c (tracepoint_was_hit): Don't collect for
7173 static tracepoint.
7174
12c3e59c
JB
71752012-01-02 Joel Brobecker <brobecker@adacore.com>
7176
7177 * terminal.h: Reformat copyright header.
7178
67827812
JB
71792012-01-02 Joel Brobecker <brobecker@adacore.com>
7180
7181 * server.c (gdbserver_version): Update copyright year.
7182 * gdbreplay.c (gdbreplay_version): Likewise.
7183
3e52c33d
JK
71842011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7185
7186 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7187
7188 Revert:
7189 2011-12-18 Hui Zhu <teawater@gmail.com>
7190 * linux-low.c (linux_create_inferior): Save return value to ret.
7191
66f1260e
HZ
71922011-12-18 Hui Zhu <teawater@gmail.com>
7193
7194 * linux-low.c (linux_create_inferior): Save return value to ret.
7195
e77616d7
DE
71962011-12-16 Doug Evans <dje@google.com>
7197
e7b06c57
DE
7198 * linux-low.c (linux_create_inferior): If stdio connection,
7199 redirect stdin from /dev/null, stdout to stderr.
7200 * remote-utils.c (remote_is_stdio): New static global.
7201 (remote_connection_is_stdio): New function.
7202 (remote_prepare): Handle stdio connection.
7203 (remote_open): Ditto.
7204 (remote_close): Don't close stdin for stdio connections.
7205 (read_prim,write_prim): New functions. Replace all calls to
7206 read/write to these.
7207 * server.c (main): Watch for "-" argument. Move call to
7208 remote_prepare before start_inferior.
7209 * server.h (STDIO_CONNECTION_NAME): New macro.
7210 (remote_connection_is_stdio): Declare.
7211
e77616d7
DE
7212 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7213 in debugging output.
7214
82067193
YQ
72152011-12-15 Yao Qi <yao@codesourcery.com>
7216
7217 * tracepoint.c: Include sys/syscall.h.
7218 (gdb_ust_thread): Remove preprocessor conditional.
7219
82bfbe7e
PA
72202011-12-14 Pedro Alves <pedro@codesourcery.com>
7221
7222 * linux-low.c (linux_detach_one_lwp): Call
7223 the_low_target.prepare_to_resume before detaching.
7224
712c6575
YQ
72252011-12-14 Yao Qi <yao@codesourcery.com>
7226
7227 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7228 of write.
7229
d54d1edf
YQ
72302011-12-14 Yao Qi <yao@codesourcery.com>
7231
7232 * i386-low.c (i386_low_stopped_data_address): Initialize local
7233 variable `control'.
7234
6210a125
PA
72352011-12-13 Pedro Alves <pedro@codesourcery.com>
7236
7237 PR remote/13492
7238
7239 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7240 DR_CONTROL unless necessary. Extend comments.
7241 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7242 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7243
2ece8244
YQ
72442011-12-13 Yao Qi <yao@codesourcery.com>
7245
7246 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7247 macros.
7248 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7249
784867a5
JK
72502011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7251
7252 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7253 Print new debug message for such case.
7254
6bf36717
JK
72552011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7256
7257 Fix overlapping memcpy.
7258 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7259 the read_inferior_memory transfer.
7260 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7261 write_inferior_memory transfer.
7262 (set_fast_tracepoint_jump): New variable buf. Use it for the
7263 read_inferior_memory and write_inferior_memory transfers.
7264 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7265 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7266 Use it for the write_inferior_memory transfer.
7267 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7268 buffers.
7269
50275556
MR
72702011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7271
7272 * linux-low.c (fetch_register, store_register): Make code
7273 consistent, fix formatting.
7274
7325beb4
MR
72752011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7276
7277 * linux-low.c (usr_store_inferior_registers): Factor out code
7278 to handle individual registers into...
7279 (store_register): ... this new function.
7280
c642a434
UW
72812011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7282
7283 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7284 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7285 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7286 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7287 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7288 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7289 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7290 (srv_xmlfiles): Add new XML files.
7291
7292 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7293 and <sys/uio.h>.
7294 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7295 (init_registers_s390_linux32v1): Add prototype.
7296 (init_registers_s390_linux32v2): Likewise.
7297 (init_registers_s390_linux64v1): Likewise.
7298 (init_registers_s390_linux64v2): Likewise.
7299 (init_registers_s390x_linux64v1): Likewise.
7300 (init_registers_s390x_linux64v2): Likewise.
7301 (s390_num_regs): Increment to 52.
7302 (s390_regmap): Add orig_r2 register.
7303 (s390_num_regs_3264): Increment to 68.
7304 (s390_regmap_3264): Add orig_r2 register.
7305 (s390_collect_ptrace_register): Handle orig_r2 register.
7306 (s390_supply_ptrace_register): Likewise.
7307 (s390_fill_last_break): New function.
7308 (s390_store_last_break): Likewise.
7309 (s390_fill_system_call): New function.
7310 (s390_store_system_call): Likewise.
7311 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7312 register sets.
7313 (s390_check_regset): New function.
7314 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7315 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7316 Update target_regsets for available register sets.
7317
2268b414
JK
73182011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7319 Jan Kratochvil <jan.kratochvil@redhat.com>
7320
7321 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7322 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7323 New.
7324 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7325 * linux-low.h (struct process_info_private): New member r_debug.
7326 * server.c (handle_qxfer_libraries): Call
7327 the_target->qxfer_libraries_svr4.
7328 (handle_qxfer_libraries_svr4): New function.
7329 (qxfer_packets): New entry "libraries-svr4".
7330 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7331 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7332 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7333 PACKET_qXfer_libraries_svr4.
7334
d6db1fab
UW
73352011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7336
7337 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7338 PSW address/mask between 8-byte and 16-byte formats.
7339 (s390_supply_ptrace_register): Likewise.
7340 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7341 basic addressing mode bit.
7342
242f5f1c
SS
73432011-11-24 Stan Shebs <stan@codesourcery.com>
7344
7345 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7346
f196051f
SS
73472011-11-17 Stan Shebs <stan@codesourcery.com>
7348
7349 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7350 (tracing_start_time): New global.
7351 (tracing_stop_time): New global.
7352 (tracing_user_name): New global.
7353 (tracing_notes): New global.
7354 (tracing_stop_note): New global.
7355 (cmd_qtstart): Set traceframe_usage, start_time.
7356 (stop_tracing): Set stop_time.
7357 (cmd_qtstatus): Report additional status.
7358 (cmd_qtp): New function.
7359 (handle_tracepoint_query): Call it.
7360 (cmd_qtnotes): New function.
7361 (handle_tracepoint_general_set): Call it.
7362 (get_timestamp): Rename from tsv_get_timestamp.
7363
405f8e94
SS
73642011-11-14 Stan Shebs <stan@codesourcery.com>
7365 Kwok Cheung Yeung <kcy@codesourcery.com>
7366
7367 * linux-x86-low.c (small_jump_insn): New.
7368 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7369 trampoline and error message, build a trampoline and issue a small
7370 jump instruction to it.
7371 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7372 trampoline and error message.
7373 (x86_get_min_fast_tracepoint_insn_len): New.
7374 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7375 * linux-low.h (struct linux_target_ops): Add arguments to
7376 install_fast_tracepoint_jump_pad operation, add new operation.
7377 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7378 arguments.
7379 (linux_get_min_fast_tracepoint_insn_len): New function.
7380 (linux_target_op): Add new operation.
7381 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7382 (gdb_trampoline_buffer_end): Ditto.
7383 (gdb_trampoline_buffer_error): Ditto.
7384 (struct ipa_sym_addresses): Add fields for new IPA variables.
7385 (symbol_list): Add entries for new IPA variables.
7386 (struct tracepoint): Add fields to hold the address range of the
7387 trampoline used by the tracepoint.
7388 (trampoline_buffer_head): New static variable.
7389 (trampoline_buffer_tail): Ditto.
7390 (claim_trampoline_space): New function.
7391 (have_fast_tracepoint_trampoline_buffer): New function.
7392 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7393 structure.
7394 (install_fast_tracepoint): Ditto, also add error buffer argument.
7395 (cmd_qtminftpilen): New function.
7396 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7397 (fast_tracepoint_from_trampoline_address): New function.
7398 (fast_tracepoint_collecting): Handle trampoline as part of jump
7399 pad space.
7400 (set_trampoline_buffer_space): New function.
7401 (initialize_tracepoint): Initialize new IPA variables.
7402 * target.h (struct target_ops): Add arguments to
7403 install_fast_tracepoint_jump_pad operation, add new
7404 get_min_fast_tracepoint_insn_len operation.
7405 (target_get_min_fast_tracepoint_insn_len): New.
7406 (install_fast_tracepoint_jump_pad): Add arguments.
7407 * server.h (IPA_BUFSIZ): Define.
7408 * linux-i386-ipa.c: Include extra header files.
7409 (initialize_fast_tracepoint_trampoline_buffer): New function.
7410 (initialize_low_tracepoint): Call it.
7411 * server.h (set_trampoline_buffer_space): Declare.
7412 (claim_trampoline_space): Ditto.
7413 (have_fast_tracepoint_trampoline_buffer): Ditto.
7414
1e4d1764
YQ
74152011-11-14 Yao Qi <yao@codesourcery.com>
7416
7417 * server.c (handle_query): Handle InstallInTrace for qSupported.
7418 * tracepoint.c (add_tracepoint): Sort list.
7419 (install_tracepoint, download_tracepoint): New.
7420 (cmd_qtdp): Call them to install and download tracepoints.
7421 (sort_tracepoints): Removed.
7422 (cmd_qtstart): Update.
7423
5c73ff4e
YQ
74242011-11-14 Yao Qi <yao@codesourcery.com>
7425
7426 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7427 * mem-break.h: Declare.
7428 * tracepoint.c (cmd_qtstart): Move some code to ...
7429 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7430 New.
7431 (download_tracepoints): Move some code to ...
7432 (download_tracepoint_1): ... here. New.
7433
86a30030
YQ
74342011-11-08 Yao Qi <yao@codesourcery.com>
7435
7436 * remote-utils.c (relocate_instruction): A comment fix.
7437
8d26e50c
JB
74382011-11-07 Joel Brobecker <brobecker@adacore.com>
7439
7440 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7441 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7442 dr_status_mirror and dr_control_mirror from debug_reg_state.
7443 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7444 (i386_initial_stuff): Remove use of deleted globals.
7445 (i386_get_thread_context, i386_set_thread_context,
7446 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7447 from debug_reg_state.
7448
a59306a3
YQ
74492011-11-05 Yao Qi <yao@codesourcery.com>
7450
7451 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7452 address as TPOINT's.
7453
3065dfb6
SS
74542011-11-02 Stan Shebs <stan@codesourcery.com>
7455
7456 * tracepoint.c (agent_mem_read_string): New function.
7457 (eval_agent_expr): Call it for tracenz.
7458 * server.c (handle_query): Report support for tracenz.
7459
fd0d8c7c
YQ
74602011-11-02 Yao Qi <yao@codesourcery.com>
7461
7462 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7463
609086b1
YQ
74642011-11-02 Yao Qi <yao@codesourcery.com>
7465
7466 * target.h: Fix a typo in comment.
7467
b9fd1791
PA
74682011-10-31 Pedro Alves <pedro@codesourcery.com>
7469
7470 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7471 clobber the breakpoints' shadows with fast tracepoint jumps.
7472 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7473 * target.c (write_inferior_memory): Also pass MYADDR down to
7474 check_mem_write.
7475
03583c20
UW
74762011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7477
7478 * configure.ac: Check support for personality routine.
7479 * configure: Regenerate.
7480 * config.in: Likewise.
7481 * linux-low.c: Include <sys/personality.h>.
7482 Define ADDR_NO_RANDOMIZE if necessary.
7483 (linux_create_inferior): Disable address space randomization when
7484 forking inferior, if requested.
7485 (linux_supports_disable_randomization): New function.
7486 (linux_target_ops): Install it.
7487 * server.h (disable_randomization): Declare.
7488 * server.c (disable_randomization): New global variable.
7489 (handle_general_set): Handle QDisableRandomization.
7490 (handle_query): Likewise for qSupported.
7491 (main): Support --disable-randomization and --no-disable-randomization
7492 command line arguments.
7493 * target.h (struct target_ops): Add supports_disable_randomization.
7494 (target_supports_disable_randomization): New macro.
7495
723b724b
MF
74962011-09-29 Mike Frysinger <vapier@gentoo.org>
7497
7498 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7499 ifdef check.
7500 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7501 [!PT_GETDSBT] (target_loadmap): New definition.
7502 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7503 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7504 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7505 and PT_GETDSBT to LINUX_LOADMAP.
7506 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7507 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7508
55329a5c 75092011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7510
7511 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7512 (arm_linux_hwbp_cap): New static variable.
7513 (arm_linux_get_hwbp_cap): Replace by ...
7514 (arm_linux_init_hwbp_cap): ... this new function.
7515 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7516 (arm_linux_get_hw_watchpoint_count): Likewise.
7517 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7518 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7519 (arm_prepare_to_resume): Use perror_with_name instead of error.
7520
55329a5c 75212011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7522
7523 * linux-arm-low.c: Include <signal.h>.
7524 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7525 (struct arm_linux_hwbp_cap): New data type.
7526 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7527 (struct arm_linux_hw_breakpoint): New data type.
7528 (MAX_BPTS, MAX_WPTS): Define.
7529 (struct arch_process_info, struct arch_lwp_info): New data types.
7530 (arm_linux_get_hwbp_cap): New function.
7531 (arm_linux_get_hw_breakpoint_count): Likewise.
7532 (arm_linux_get_hw_watchpoint_count): Likewise.
7533 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7534 (arm_hwbp_control_initialize): Likewise.
7535 (arm_hwbp_control_is_enabled): Likewise.
7536 (arm_hwbp_control_is_initialized): Likewise.
7537 (arm_hwbp_control_disable): Likewise.
7538 (arm_linux_hw_breakpoint_equal): Likewise.
7539 (arm_linux_hw_point_initialize): Likewise.
7540 (struct update_registers_data): New data structure.
7541 (update_registers_callback: New function.
7542 (arm_insert_point): Likewise.
7543 (arm_remove_point): Likewise.
7544 (arm_stopped_by_watchpoint): Likewise.
7545 (arm_stopped_data_address): Likewise.
7546 (arm_new_process): Likewise.
7547 (arm_new_thread): Likewise.
7548 (arm_prepare_to_resume): Likewise.
7549 (the_low_target): Register arm_insert_point, arm_remove_point,
7550 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7551 arm_new_thread, and arm_prepare_to_resume.
7552
6b9801d4
SS
75532011-09-15 Stan Shebs <stan@codesourcery.com>
7554
7555 * server.h (struct emit_ops): Add compare-goto fields.
7556 * tracepoint.c (gdb_agent_op_sizes): New table.
7557 (emit_eq_goto): New function.
7558 (emit_ne_goto): New function.
7559 (emit_lt_goto): New function.
7560 (emit_le_goto): New function.
7561 (emit_gt_goto): New function.
7562 (emit_ge_goto): New function.
7563 (is_goto_target): New function.
7564 (compile_bytecodes): Recognize special cases of compare-goto
7565 combinations and call specialized emitters for them.
7566 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7567 (amd64_emit_ne_goto): New function.
7568 (amd64_emit_lt_goto): New function.
7569 (amd64_emit_le_goto): New function.
7570 (amd64_emit_gt_goto): New function.
7571 (amd64_emit_ge_goto): New function.
7572 (amd64_emit_ops): Add the new functions.
7573 (i386_emit_eq_goto): New function.
7574 (i386_emit_ne_goto): New function.
7575 (i386_emit_lt_goto): New function.
7576 (i386_emit_le_goto): New function.
7577 (i386_emit_gt_goto): New function.
7578 (i386_emit_ge_goto): New function.
7579 (i386_emit_ops): Add the new functions.
7580
bf15cbda
SS
75812011-09-08 Stan Shebs <stan@codesourcery.com>
7582
7583 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7584 (i386_emit_epilogue): Restore %ebx.
7585
943ca1dd
JZ
75862011-08-31 Jie Zhang <jzhang918@gmail.com>
7587
7588 * server.c (step_thread): Remove definition.
7589 (process_serial_event): Don't handle Hs.
7590 * server.h (step_thread): Remove declaration.
7591 * target.c (set_desired_inferior): Remove use of step_thread.
7592
e3deef73
LM
75932011-08-24 Luis Machado <lgustavo@codesourcery.com>
7594
7595 * linux-low.c: Include linux-procfs.h.
7596 (linux_attach_lwp_1): Update comments.
7597 (linux_attach): Scan for existing threads when attaching to a
7598 process that is the tgid.
7599 * Makefile.in: Update dependencies.
7600
13da1c97
LM
76012011-08-24 Luis Machado <lgustavo@codesourcery.com>
7602
7603 * configure.srv: Add linux-procfs.o dependencies.
7604
881127c9
YQ
76052011-08-14 Yao Qi <yao@codesourcery.com>
7606
7607 * target.h (struct target_ops): Fix indent.
7608 * win32-low.c (win32_target_ops): Fix comment.
7609
58dbd541
YQ
76102011-08-14 Andrew Jenner <andrew@codesourcery.com>
7611 Yao Qi <yao@codesourcery.com>
7612
7613 * Makefile.in (clean): Remove tic6x-*.c files.
7614 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7615 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7616 (tic6x-c64xp-linux.c): Likewise.
7617 * configure.srv: Add support for tic6x-*-uclinux.
7618 * linux-tic6x-low.c: New.
7619 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7620
78d85199
YQ
76212011-08-14 Andrew Stubbs <ams@codesourcery.com>
7622 Yao Qi <yao@codesourcery.com>
7623
7624 * target.h (struct target_ops): Add read_loadmap.
7625 * linux-low.c (struct target_loadseg): New type.
7626 (struct target_loadmap): New type.
7627 (linux_read_loadmap): New function.
7628 (linux_target_ops): Add linux_read_loadmap.
7629 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7630 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7631 to NULL.
78d85199 7632
a959a88d
EZ
76332011-08-05 Eli Zaretskii <eliz@gnu.org>
7634
7635 * win32-low.c: Include <stdint.h>.
7636
1ced966e
PA
76372011-07-22 Pedro Alves <pedro@codesourcery.com>
7638
7639 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7640 to the inferior here.
7641 (i386_remove_aligned_watchpoint): Ditto.
7642 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7643 fit part of the watchpoint in the debug registers.
7644 (i386_update_inferior_debug_regs): New.
7645 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7646 registers, and only update the inferior on success.
7647 (i386_low_remove_watchpoint): Ditto.
7648
d26e3629
KY
76492011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7650
7651 * linux-low.c (compare_ints, unique, list_threads, show_process,
7652 linux_core_of_thread): Delete.
7653 (linux_target_ops): Change linux_core_of_thread to
7654 linux_common_core_of_thread.
7655 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7656 * utils.c (malloc_failure): Change type of argument.
7657 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7658 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7659 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7660 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7661 (IPA_OBJS): Add common-utils-ipa.o.
7662 (ptid_h, linux_osdata_h): New macros.
7663 (server_h): Add common/common-utils.h, common/xml-utils.h,
7664 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7665 common/ptid.h.
7666 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7667 ptid.o, buffer.o): New rules.
7668 (linux-low.o): Add common/linux-osdata.h as a dependency.
7669 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7670 * configure.ac: Add AC_HEADER_DIRENT check.
7671 * config.in: Regenerate.
7672 * configure: Regenerate.
7673 * remote-utils.c (xml_escape_text): Delete.
7674 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7675 buffer_xml_printf): Move to common/buffer.c.
7676 * server.c (main): Remove call to initialize_inferiors.
7677 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7678 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7679 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7680 internal_error, gdb_assert, gdb_assert_fail): Delete.
7681 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7682 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7683 common/buffer.h.
7684 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7685 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7686 initialize_inferiors): Delete.
7687
2275a1a7
PA
76882011-07-20 Pedro Alves <pedro@codesourcery.com>
7689
7690 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7691 symbol error.
7692
0a5b1e09
PA
76932011-05-31 Pedro Alves <pedro@codesourcery.com>
7694
7695 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7696 assertion.
7697 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7698
6938fd34
YQ
76992011-05-26 Yao Qi <yao@codesourcery.com>
7700
7701 * Makefile.in (thread-db.o): Track dependence to
7702 common/gdb_thread_db.h.
7703 * thread-db.c: include gdb_thread_db.h from right place.
7704
b481f9e0
TT
77052011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7706
7707 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7708 __FILE__ and __LINE__ to internal_error.
7709
98a5dd13
DE
77102011-05-13 Doug Evans <dje@google.com>
7711
7712 * thread-db.c (try_thread_db_load_from_sdir): New function.
7713 (try_thread_db_load_from_dir): New function.
7714 (thread_db_load_search): Handle $sdir, ignore $pdir.
7715 Remove trying of system directories if search of
7716 libthread-db-search-path fails, that is now done via $sdir.
7717
d248b706
KY
77182011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7719
7720 * server.c (handle_query): Add EnableDisableTracepoints to the list
7721 of supported features.
43aaf8b6 7722 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7723 tracepoints.
43aaf8b6
PA
7724 (cmd_qtenable_disable): New.
7725 (cmd_qtstart): Install tracepoints even if disabled.
7726 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7727 receiving a QTEnable or QTDisable packet.
7728 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7729 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7730 tracepoints.
7731 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7732
84e578fb
DE
77332011-05-10 Doug Evans <dje@google.com>
7734
7735 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7736
71f55dd8
DE
77372011-05-04 Doug Evans <dje@google.com>
7738
7739 * linux-low.c (linux_join): Skip process lookup.
7740 * spu-low.c (spu_join): Ditto.
7741 * server.c (join_inferiors_callback): Delete.
7742 (process_serial_event): For 'D' packet (detach) call join_inferior
7743 directly.
7744
4d393d60
JM
77452011-05-04 Joseph Myers <joseph@codesourcery.com>
7746
7747 * README: Don't mention xscale*-*-linux*.
7748 * configure.srv (xscale*-*-linux*): Don't handle target.
7749
b00ad6ff
NF
77502011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7751
7752 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7753 casting pointers.
7754 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7755 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7756 (i386_emit_void_call_2): Likewise.
7757
af96c192
YQ
77582011-04-26 Yao Qi <yao@codesourcery.com>
7759
43aaf8b6
PA
7760 * linux-low.c: Move common macros to linux-ptrace.h.
7761 Include linux-ptrace.h.
af96c192
YQ
7762 * Makefile.in (linux_ptrace_h): New.
7763 (linux-low.o): Depends on linux-ptrace.h.
7764
03f2bd59
JK
77652011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7766
7767 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7768 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7769 (remote_prepare): New function with most of the TCP code from ...
7770 (remote_open): ... here. Detect PORT here unconditionally. Move also
7771 setting transport_is_reliable.
7772 * server.c (run_once): New variable.
7773 (gdbserver_usage): Document it.
7774 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7775 the first run if RUN_ONCE.
7776 * server.h (run_once, remote_prepare): New declarations.
7777
7a9dd1b2
TT
77782011-04-19 Tom Tromey <tromey@redhat.com>
7779
7780 * win32-low.c (handle_load_dll): Remove duplicate "the".
7781
81239425
PM
77822011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7783
7784 Remove support for old Cygwin 1.5 versions.
7785 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7786 function to avoid warning.
7787 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7788 warning.
7789
9e0627f1
PM
77902011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7791
7792 * gdbserver/server.h (Macro _): Define it if not available.
7793
588eebee
MS
77942011-03-14 Michael Snyder <msnyder@vmware.com>
7795
348af9f7 7796 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7797
43f70d4c
JB
77982011-03-10 Joel Brobecker <brobecker@adacore.com>
7799
7800 * Makefile.in (maintainer-clean realclean distclean): Remove
7801 "make ... subdir_do" command.
7802
348af9f7
MS
78032011-03-10 Michael Snyder <msnyder@vmware.com>
7804
7805 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7806
7807 * server.c (handle_v_run): Free alloced buffer on early return.
7808
e637a4f5
YQ
78092011-03-09 Yao Qi <yao@codesourcery.com>
7810
7811 Revert:
7812 2011-03-04 Yao Qi <yao@codesourcery.com>
7813
7814 * Makefile.in: Remove GNU make feature --directory.
7815
7816 2011-03-05 Yao Qi <yao@codesourcery.com>
7817
7818 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7819 (subdir_do): New make target. Copied from gdb/Makefile.
7820 (maintainer-clean, realclean, distclean, clean): Call corresponding
7821 make targets in common/Makefile.
7822
7823 2011-02-11 Yao Qi <yao@codesourcery.com>
7824
7825 * configure.ac: Call AC_PROG_RANLIB.
7826 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7827 * configure: Regenerate.
7828
e6edda56
JK
78292011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7830
7831 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7832
e5141119
JB
78332011-03-06 Yao Qi <yao@codesourcery.com>
7834
7835 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7836
64794aa4
JB
78372011-03-05 Yao Qi <yao@codesourcery.com>
7838
7839 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7840 (subdir_do): New make target. Copied from gdb/Makefile.
7841 (maintainer-clean, realclean, distclean, clean): Call corresponding
7842 make targets in common/Makefile.
7843
7a762829
YQ
78442011-03-04 Yao Qi <yao@codesourcery.com>
7845
7846 * Makefile.in: Remove GNU make feature --directory.
7847
348af9f7
MS
78482011-03-04 Michael Snyder <msnyder@vmware.com>
7849
7850 * server.c (queue_stop_reply): Call xmalloc not malloc.
7851
78522011-03-02 Michael Snyder <msnyder@vmware.com>
7853
7854 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7855
9f72fee2
MS
78562011-02-28 Michael Snyder <msnyder@vmware.com>
7857
588eebee
MS
7858 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7859 (cmd_qtframe): Ditto.
7860 (cmd_qtbuffer): Ditto.
7861 (cmd_bigqtbuffer): Ditto.
7862
9f72fee2
MS
7863 * utils.c (decimal2str): Initialize 'width' to nine, then
7864 don't mess with it.
7865
8040bd49
UW
78662011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7867
7868 * hostio.c (require_data): Free *data, not data.
7869
7e52cbd0
JK
78702011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7871
7872 * hostio.c (require_data): Use free, not xfree.
7873
9130f83e
MS
78742011-02-27 Michael Snyder <msnyder@vmware.com>
7875
4b812f4e
MS
7876 * server.c (handle_query): Discard unused value.
7877
9130f83e
MS
7878 * hostio.c (require_data): Free malloc memory before returning
7879 error.
7880
69d37113
MS
78812011-02-26 Michael Snyder <msnyder@vmware.com>
7882
7883 * linux-low.c (list_threads): Call closedir for dirent.
7884
35f5825a
MS
78852011-02-27 Michael Snyder <msnyder@vmware.com>
7886
2a589cef
MS
7887 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7888 a case statement falls through.
7889
0adea5f7
MS
7890 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7891
35f5825a
MS
7892 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7893 in comparison.
7894
238f1c74
MS
78952011-02-26 Michael Snyder <msnyder@vmware.com>
7896
7897 * utils.c (decimal2str): Eliminate dead code and dead param.
7898 (pulongest): Drop dead param from call to decimal2str.
7899 (plongest): Ditto.
7900
633ff500
JB
79012011-02-24 Joel Brobecker <brobecker@adacore.com>
7902
7903 Revert the following patch (not approved yet):
7904 2011-02-21 Hui Zhu <teawater@gmail.com>
7905 * tracepoint.c (tp_printf): New function.
7906 (eval_agent_expr): Handle gdb_agent_op_printf.
7907
f9c6ff72
HZ
79082011-02-21 Hui Zhu <teawater@gmail.com>
7909
7910 * tracepoint.c (tp_printf): New function.
7911 (eval_agent_expr): Handle gdb_agent_op_printf.
7912
94d5e490
TT
79132011-02-18 Tom Tromey <tromey@redhat.com>
7914
7915 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7916 (tracepoint.o): Likewise.
7917 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7918 (gdb_agent_op_names): Likewise.
7919
c7f96d2b
TT
79202011-02-18 Tom Tromey <tromey@redhat.com>
7921
7922 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7923 gdb_agent_op_rot>: New constants.
7924 (gdb_agent_op_names): Add pick and roll.
7925 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7926 cases.
7927
0feedb2c
JK
79282011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7929
7930 * aclocal.m4: Regenerated with aclocal-1.11.1.
7931
b3b9301e
PA
79322011-02-14 Pedro Alves <pedro@codesourcery.com>
7933
7934 * server.c (handle_qxfer_traceframe_info): New.
7935 (qxfer_packets): Register "traceframe-info".
7936 (handle_query): Report support for qXfer:traceframe-info:read+.
7937 * tracepoint.c (match_blocktype): New.
7938 (traceframe_find_block_type): Rename to ...
7939 (traceframe_walk_blocks): ... this. Add callback filter argument,
7940 and use it.
7941 (traceframe_find_block_type): New, reimplemented on top of
7942 traceframe_walk_blocks.
7943 (build_traceframe_info_xml): New.
7944 (traceframe_read_info): New.
7945 * server.h (traceframe_read_info): Declare.
7946
4f3e6fb7
YQ
79472011-02-11 Yao Qi <yao@codesourcery.com>
7948
7949 * configure.ac: Call AC_PROG_RANLIB.
7950 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7951 * configure: Regenerate.
7952
764880b7
PA
79532011-02-07 Pedro Alves <pedro@codesourcery.com>
7954
7955 * server.c (gdb_read_memory): Change return semantics to allow
7956 partial transfers.
7957 (handle_search_memory_1): Adjust.
7958 (process_serial_event) <'m' packet>: Handle partial transfers.
7959 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7960
1c79eb8a
PA
79612011-01-28 Pedro Alves <pedro@codesourcery.com>
7962
7963 * regcache.c (init_register_cache): Initialize
7964 regcache->register_status.
7965 (free_register_cache): Release regcache->register_status.
7966 (regcache_cpy): Copy register_status.
7967 (registers_to_string): Print 'x's for unavailable registers.
7968 (supply_register): Mark the register's status valid or
7969 unavailable, depending on whether a buffer was passed in or not.
7970 (supply_register_zeroed): New.
7971 (supply_regblock): Mark the registers' status valid or
7972 unavailable, depending on whether a buffer was passed in or not.
7973 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7974 (struct regcache): New `register_status' field.
7975 (supply_register_zeroed): Declare.
7976 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7977 supply_register_zeroed, rather than passing a NULL buffer to
7978 supply_register.
7979 * tracepoint.c (fetch_traceframe_registers): Update comment.
7980
85724a0e
PA
79812011-01-28 Pedro Alves <pedro@codesourcery.com>
7982
7983 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7984 buffer explicit.
7985
d08aafef
PA
79862011-01-25 Pedro Alves <pedro@codesourcery.com>
7987
7988 * server.h (decode_xfer_write): Change prototype.
7989 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7990 and don't extract the annex here.
7991 * server.c (decode_xfer_read): Remove `annex' parameter,
7992 and don't extract the annex here.
7993 (decode_xfer): New.
7994 (struct qxfer): New.
7995 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7996 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7997 (handle_qxfer_statictrace): New functions, abstracted out from
7998 handle_query, and made to use the struct qxfer interface.
7999 (handle_threads_qxfer_proper): Rename to ...
8000 (handle_qxfer_threads_proper): ... this.
8001 (handle_threads_qxfer): Rename to ...
8002 (handle_qxfer_threads): ... this. Adjust.
8003 (qxfer_packets): New array.
8004 (handle_qxfer): New function.
8005 (handle_query): Use handle_qxfer.
8006
493e2a69
MS
80072011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8008
8009 * gdbreplay.c: Shorten lines of >= 80 columns.
8010 * linux-low.c: Ditto.
8011 * linux-ppc-low.c: Ditto.
8012 * linux-s390-low.c: Ditto.
8013 * linux-sparc-low.c: Ditto.
8014 * linux-x86-low.c: Ditto.
8015 * linux-xtensa-low.c: Ditto.
8016 * mem-break.c: Ditto.
8017 * nto-low.c: Ditto.
8018 * regcache.h: Ditto.
8019 * remote-utils.c: Ditto.
8020 * server.c: Ditto.
8021 * server.h: Ditto.
8022 * thread-db.c: Ditto.
8023 * tracepoint.c: Ditto.
8024 * utils.c: Ditto.
8025 * win32-low.h: Ditto.
8026
44944448
JB
80272011-01-05 Joel Brobecker <brobecker@adacore.com>
8028
8029 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8030 update.
8031
71ce852c
JB
80322011-01-01 Joel Brobecker <brobecker@adacore.com>
8033
8034 * server.c (gdbserver_version): Update copyright year in version
8035 output.
8036 * gdbreplay.c (gdbreplay_version): Ditto.
8037
eb826dc6
MF
80382010-12-29 Jie Zhang <jie.zhang@analog.com>
8039
8040 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8041 * linux-bfin-low.c: New file.
8042 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8043 PT_DATA_ADDR for BFIN targets.
8044 * Makefile.in (SFILES): Add linux-bfin-low.c.
8045 (clean): Remove reg-bfin.c.
8046 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8047 * README: Mention supported Blackfin targets.
8048
39ab222a
MF
80492010-12-23 Mike Frysinger <vapier@gentoo.org>
8050
8051 * .gitignore: New file.
8052
a1f2ce7d
MF
80532010-11-16 Mike Frysinger <vapier@gentoo.org>
8054
8055 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8056
f474844c
JZ
80572010-10-22 Jie Zhang <jie@codesourcery.com>
8058
8059 * Makefile.in: Add FLAGS_TO_PASS variable.
8060 (install): Remove dependency of install-only and recursively
8061 invoke make for install-only.
8062
f1048712
DE
80632010-10-04 Doug Evans <dje@google.com>
8064
8065 * Makefile.in (uninstall): Use $(DESTDIR).
8066
b53a1623
PA
80672010-09-24 Pedro Alves <pedro@codesourcery.com>
8068
e6ee044d
PA
8069 PR gdb/11842
8070
b53a1623
PA
8071 * linux-x86-low.c (compat_siginfo_from_siginfo)
8072 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8073 si_code is < 0. Check for si_code == SI_TIMER before checking for
8074 si_code < 0.
8075
fa1bd1e4
JB
80762010-09-13 Joel Brobecker <brobecker@adacore.com>
8077
8078 * lynx-i386-low.c: New file.
8079 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8080
47fac8f8
JB
80812010-09-13 Joel Brobecker <brobecker@adacore.com>
8082
8083 * lynx-low.c (ptrace_request_to_str): Remove handling for
8084 request values that have been removed in LynxOS 5.x.
8085
1adfc54d
JB
80862010-09-13 Joel Brobecker <brobecker@adacore.com>
8087
8088 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8089 <ptrace.h>
8090
c2a66c29
NS
80912010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8092
8093 * configure.ac: Add --enable-inprocess-agent option.
8094 * configure: Rebuilt.
8095
32fcada3
YQ
80962010-09-06 Yao Qi <yao@codesourcery.com>
8097
8098 * linux-low.c (linux_kill): Remove unused variable.
8099 (linux_stabilize_threads): Likewise.
8100 * server.c (start_inferior): Likewise.
8101 (queue_stop_reply_callback): Likewise.
8102 * tracepoint.c (do_action_at_tracepoint): Likewise.
8103
0cccb683
YQ
81042010-09-06 Yao Qi <yao@codesourcery.com>
8105
8106 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8107 on return.
8108
423ec54c
JK
81092010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8110
8111 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8112
12ac6819
PA
81132010-09-06 Pedro Alves <pedro@codesourcery.com>
8114
8115 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8116 "$(IPA_DEPFILES)".
8117
8ed54b31
JB
81182010-09-01 Joel Brobecker <brobecker@adacore.com>
8119
8120 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8121 gdbserver/lynx-ppc-low.c: New files.
8122 * Makefile.in (lynx_low_h): New variable.
8123 (lynx-low.o, lynx-ppc-low.o): New rules.
8124 * configure.ac: On LynxOS, link with -lnetinet.
8125 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8126 * configure: regenerate.
8127
bb0116a4
JB
81282010-09-01 Joel Brobecker <brobecker@adacore.com>
8129
8130 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8131 * configure.ac: Add check for vasprintf and vsnprintf.
8132 * configure, config.in: Regenerate.
8133 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8134
a778ab81 81352010-09-01 Joel Brobecker <brobecker@adacore.com>
8136
8137 * gdbreplay.c: Move include of alloca.h up, next to include of
8138 malloc.h.
8139 * server.h: Add include of malloc.h.
8140 * mem-break.c: Remove include of malloc.h.
8141 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8142
8b034a19 81432010-09-01 Joel Brobecker <brobecker@adacore.com>
8144
8145 * Makefile.in (memmem.o): Build with -Wno-error.
8146
81472010-09-01 Joel Brobecker <brobecker@adacore.com>
8148
8149 * utils.c (xsnprintf): Make non-static.
8150 * server.h: Add xsnprintf declaration.
8151 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8152 replace calls to snprintf by calls to xsnprintf throughout.
8153
81542010-09-01 Joel Brobecker <brobecker@adacore.com>
8155
8156 * configure.ac: Add configure check for alloca.
8157 * configure, config.in: Regenerate.
8158 * server.h: Include alloca.h if it exists.
8159 * gdbreplay.c: Include alloca.h if it exists.
8160
1a981360
PA
81612010-08-28 Pedro Alves <pedro@codesourcery.com>
8162
8163 * linux-low.c (__SIGRTMIN): Define if not already defined.
8164 (linux_create_inferior): Check for __ANDROID__ rather than
8165 __SIGRTMIN.
8166 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8167 are already deferred.
8168 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8169 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8170 stopped and already has a pending signal to report.
8171 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8172 a pending signal to report or is moving out of a jump pad.
8173 (linux_init_signals): Check for __ANDROID__ rather than
8174 __SIGRTMIN.
8175
b4d51a55
PA
81762010-08-28 Pedro Alves <pedro@codesourcery.com>
8177
8178 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8179 debug_threads check. Avoid a linear search when not doing debug
8180 output.
8181
ec48365d
PA
81822010-08-27 Pedro Alves <pedro@codesourcery.com>
8183
8184 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8185 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8186 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8187 (process_event): Change local fd's type to gdb_fildes_t.
8188 (create_file_handler): Adjust prototype.
8189 (delete_file_handler): Adjust prototype.
8190 (handle_file_event): Adjust prototype. Use pfildes.
8191 (create_file_event): Adjsut prototype.
8192 * remote-utils.c (remote_desc, listen_desc): Change type to
8193 gdb_fildes_t.
8194 * server.h: New gdb_fildes_t typedef.
8195 [USE_WIN32API]: Include winsock2.h.
8196 (delete_file_handler, add_file_handler): Adjust prototypes.
8197 (pfildes): Declare.
8198 * utils.c (pfildes): New.
8199
854d88f0
PA
82002010-08-27 Pedro Alves <pedro@codesourcery.com>
8201
8202 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8203 * configure: Regenerate.
8204
0146f85b
PA
82052010-08-27 Pedro Alves <pedro@codesourcery.com>
8206
8207 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8208 (linux_done_accessing_memory): ... this.
8209 (linux_target_ops): Adjust.
8210 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8211 * nto-low.c (nto_target_ops): Adjust comment.
8212 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8213 * spu-low.c (spu_target_ops): Adjust comment.
8214 * target.h (target_ops): Rename unprepare_to_access_memory field
8215 to done_accessing_memory.
8216 (unprepare_to_access_memory): Rename to ...
8217 (done_accessing_memory): ... this.
8218
90d74c30
PA
82192010-08-26 Pedro Alves <pedro@codesourcery.com>
8220
8221 * linux-low.c (linux_prepare_to_access_memory): New.
8222 (linux_unprepare_to_access_memory): New.
8223 (linux_target_ops): Install them.
8224 * server.c (read_memory): Rename to ...
8225 (gdb_read_memory): ... this. Use
8226 prepare_to_access_memory/prepare_to_access_memory.
8227 (write_memory): Rename to ...
8228 (gdb_write_memory): ... this. Use
8229 prepare_to_access_memory/prepare_to_access_memory.
8230 (handle_search_memory_1): Adjust.
8231 (process_serial_event): Adjust.
8232 * target.h (struct target_ops): New fields
8233 prepare_to_access_memory and unprepare_to_access_memory.
8234 (prepare_to_access_memory, unprepare_to_access_memory): New.
8235 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8236 prepare_to_access_memory/prepare_to_access_memory.
8237 * nto-low.c (nto_target_ops): Adjust.
8238 * spu-low.c (spu_target_ops): Adjust.
8239 * win32-low.c (win32_target_ops): Adjust.
8240
fd467969
PA
82412010-08-26 Pedro Alves <pedro@codesourcery.com>
8242
8243 * Makefile.in (WARN_CFLAGS): Get it from configure.
8244 (WERROR_CFLAGS): New.
8245 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8246 * configure.ac: Introduce --enable-werror, which adds -Werror to
8247 the compiler command line. Enabled by default. Disable with
8248 --disable-werror. Add -Wdeclaration-after-statement
8249 Wpointer-arith and -Wformat-nonliteral to warning flags.
8250 * configure: Regenerate.
8251
331e2f5f
PA
82522010-08-26 Pedro Alves <pedro@codesourcery.com>
8253
8254 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8255
e581f2b4
PA
82562010-08-26 Pedro Alves <pedro@codesourcery.com>
8257
8258 * gdbreplay.c (remote_error): New.
8259 (gdbchar): New.
8260 (expect): Use gdbchar. Check for error reading from GDB.
8261 Clarify sync error output.
8262 (play): Check for errors writing to GDB.
8263 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8264 * remote-utils.c (getpkt): Check for errors writing to the remote
8265 descriptor.
8266
3c11dd79
PA
82672010-08-25 Pedro Alves <pedro@codesourcery.com>
8268
8269 * linux-low.c (linux_wait_1): Move non-debugging code out of
8270 `debug_threads' control.
8271
d20a8ad9
PA
82722010-08-25 Pedro Alves <pedro@codesourcery.com>
8273
8274 * linux-low.c (linux_wait_1): Don't set last_status here.
8275 * server.c (push_event, queue_stop_reply_callback): Assert we're
8276 not pushing a TARGET_WAITKIND_IGNORE event.
8277 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8278 (myresume, handle_target_event): Set the thread's last_resume_kind
8279 and last_status from the target returned status.
8280
964e4306
PA
82812010-08-25 Pedro Alves <pedro@codesourcery.com>
8282
8283 PR threads/10729
8284
8285 * linux-x86-low.c (update_debug_registers_callback): New.
8286 (i386_dr_low_set_addr): Use it.
8287 (i386_dr_low_get_addr): New.
8288 (i386_dr_low_set_control): Use update_debug_registers_callback.
8289 (i386_dr_low_get_control): New.
8290 (i386_dr_low_get_status): Adjust.
8291 * linux-low.c (linux_stop_lwp): New.
8292 * linux-low.h (linux_stop_lwp): Declare.
8293
8294 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8295 argument instead of a i386_debug_reg_state.
8296 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8297 a i386_debug_reg_state.
8298 (i386_insert_aligned_watchpoint): Adjust.
8299 (i386_remove_aligned_watchpoint): Adjust.
8300 (i386_low_stopped_data_address): Read the debug registers from the
8301 inferior instead of from the mirrors.
8302 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8303 (i386_dr_low_get_addr): Declare.
8304 (i386_dr_low_get_control): Declare.
8305 (i386_dr_low_get_status): Change prototype.
8306
8307 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8308 (i386_dr_low_get_addr): New.
8309 (i386_dr_low_get_control): New.
8310 (i386_dr_low_get_status): Adjust prototype. Return
8311 dr_status_mirror.
8312 (i386_initial_stuff): Clear dr_status_mirror and
8313 dr_control_mirror.
8314 (i386_get_thread_context): Adjust.
8315 (i386_set_thread_context): Adjust.
8316 (i386_thread_added): Adjust.
8317
5f21a75b
PA
83182010-08-24 Pedro Alves <pedro@codesourcery.com>
8319
8320 * linux-low.h (linux_thread_area): Delete declaration.
8321
3e4c1235
TS
83222010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8323
8324 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8325 after its termination.
8326
1971b033
PA
83272010-08-09 Pedro Alves <pedro@codesourcery.com>
8328
8329 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8330 (gdb_wants_all_stopped): Delete.
8331 (linux_wait_1): Don't call them.
8332 * server.c (handle_v_cont): Tag all threads as want-stopped.
8333 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8334 stopped as "client-wants-stopped".
8335
310444ac
PA
83362010-07-31 Pedro Alves <pedro@codesourcery.com>
8337
8338 * Makefile.in (signals_h): New.
8339 (server_h): Depend on it.
8340 (server.o): Don't depend on $(signals_def).
8341 (signals.o): Depend on $(signals_def).
8342
a19cae16
JK
83432010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8344
8345 * Makefile.in (signals_def): New.
8346 (server_h): Append include/gdb/signals.h and signals_def.
8347 (server.o): Append signals_def.
8348
30d50328
JK
83492010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8350
8351 * server.c (handle_target_event): Use target_signal_to_host for
8352 resume_info.sig initialization.
8353 * target.h (struct thread_resume) <sig>: New comment.
8354
5c3216e2
OS
83552010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8356
c6f46ca0
OS
8357 * server.c (handle_query): strcpy() the returned string from paddress()
8358 instead of sprintf().
5c3216e2
OS
8359 * utils.c (paddress): Return phex_nz().
8360
6bd31874
JB
83612010-07-07 Joel Brobecker <brobecker@adacore.com>
8362
8363 * server.c (handle_v_cont): Call mourn_inferior if process
8364 just exited.
8365 (myresume): Likewise.
8366
0fb4aa4b
PA
83672010-07-01 Pedro Alves <pedro@codesourcery.com>
8368
8369 Static tracepoints, and integration with UST.
8370
8371 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8372 * mem-break.c (uninsert_all_breakpoints)
8373 (reinsert_all_breakpoints): New.
8374 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8375 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8376 (gdb_agent_ust_loaded, helper_thread_id)
8377 (gdb_agent_helper_thread_id): New macros.
8378 (struct ipa_sym_addresses): Add addr_ust_loaded,
8379 addr_helper_thread_id, addr_cmd_buf.
8380 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8381 (in_process_agent_loaded_ust): New.
8382 (write_e_ust_not_loaded): New.
8383 (maybe_write_ipa_ust_not_loaded): New.
8384 (struct collect_static_trace_data_action): New.
8385 (enum tracepoint_type) <static_tracepoint>: New.
8386 (struct tracepoint) <handle>: Mention static tracepoints.
8387 (struct static_tracepoint_ctx): New.
8388 (CMD_BUF_SIZE): New.
8389 (add_tracepoint_action): Handle static tracepoint actions.
8390 (unprobe_marker_at): New.
8391 (clear_installed_tracepoints): Handle static tracepoints.
8392 (cmd_qtdp): Handle static tracepoints.
8393 (probe_marker_at): New.
8394 (cmd_qtstart): Handle static tracepoints.
8395 (response_tracepoint): Handle static tracepoints.
8396 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8397 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8398 (get_context_regcache): Handle static tracepoints.
8399 (do_action_at_tracepoint): Handle static tracepoint actions.
8400 (traceframe_find_block_type): Handle static trace data blocks.
8401 (traceframe_read_sdata): New.
8402 (download_tracepoints): Download static tracepoint actions.
8403 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8404 (GDB_PROBE_NAME): New.
8405 (ust_ops): New.
8406 (GET_UST_SYM): New.
8407 (USTF): New.
8408 (dlsym_ust): New.
8409 (ust_marker_to_static_tracepoint): New.
8410 (gdb_probe): New.
8411 (collect_ust_data_at_tracepoint): New.
8412 (gdb_ust_probe): New.
8413 (UNIX_PATH_MAX, SOCK_DIR): New.
8414 (gdb_ust_connect_sync_socket): New.
8415 (resume_thread, stop_thread): New.
8416 (run_inferior_command): New.
8417 (init_named_socket): New.
8418 (gdb_ust_socket_init): New.
8419 (cstr_to_hexstr): New.
8420 (next_st): New.
8421 (first_marker, next_marker): New.
8422 (response_ust_marker): New.
8423 (cmd_qtfstm, cmd_qtsstm): New.
8424 (unprobe_marker_at, probe_marker_at): New.
8425 (cmd_qtstmat, gdb_ust_thread): New.
8426 (gdb_ust_init): New.
8427 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8428 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8429 (ST_REGENTRY): New.
8430 (x86_64_st_collect_regmap): New.
8431 (X86_64_NUM_ST_COLLECT_GREGS): New.
8432 (AMD64_RIP_REGNUM): New.
8433 (supply_static_tracepoint_registers): New.
8434 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8435 (ST_REGENTRY): New.
8436 (i386_st_collect_regmap): New.
8437 (i386_NUM_ST_COLLECT_GREGS): New.
8438 (supply_static_tracepoint_registers): New.
8439 * server.c (handle_query): Handle qXfer:statictrace:read.
8440 <qSupported>: Report support for StaticTracepoints, and
8441 qXfer:statictrace:read features.
8442 * server.h (traceframe_read_sdata)
8443 (supply_static_tracepoint_registers): Declare.
8444 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8445 (unpack_varlen_hex): Include in IPA build.
8446 * Makefile.in (ustlibs, ustinc): New.
8447 (IPA_OBJS): Add remote-utils-ipa.o.
8448 ($(IPA_LIB)): Link -ldl and -lpthread.
8449 (UST_CFLAGS): New.
8450 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8451 * config.in, configure: Regenerate.
8452
9e4344e5
PA
84532010-06-20 Ian Lance Taylor <iant@google.com>
8454 Pedro Alves <pedro@codesourcery.com>
8455
8456 * linux-x86-low.c (always_true): Delete.
8457 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8458 trying to fool the compiler with always_true.
8459
c6beb2cb
PA
84602010-06-20 Pedro Alves <pedro@codesourcery.com>
8461
8462 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8463 conditions in gdbserver.
8464
d2ed6730
UW
84652010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8466
8467 * spu-low.c (spu_read_memory): Wrap around local store limit.
8468 (spu_write_memory): Likewise.
8469
4e29fb54
PA
84702010-06-15 Pedro Alves <pedro@codesourcery.com>
8471
8472 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8473 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8474 LONGEST uses.
8475 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8476 uses.
8477 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8478 uses with LONGEST uses.
8479
6a271cae
PA
84802010-06-14 Stan Shebs <stan@codesourcery.com>
8481 Pedro Alves <pedro@codesourcery.com>
8482
8483 Bytecode compiler.
8484
8485 * linux-x86-low.c: Include limits.h.
8486 (add_insns): New.
8487 (always_true): New.
8488 (EMIT_ASM): New.
8489 (EMIT_ASM32): New.
8490 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8491 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8492 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8493 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8494 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8495 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8496 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8497 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8498 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8499 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8500 (amd64_emit_void_call_2): New.
8501 (amd64_emit_ops): New.
8502 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8503 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8504 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8505 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8506 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8507 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8508 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8509 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8510 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8511 (i386_emit_stack_adjust, i386_emit_int_call_1)
8512 (i386_emit_void_call_2): New.
8513 (i386_emit_ops): New.
8514 (x86_emit_ops): New.
8515 (the_low_target): Install x86_emit_ops.
8516 * server.h (struct emit_ops): New.
8517 (get_raw_reg_func_addr): Declare.
8518 (current_insn_ptr, emit_error): Declare.
8519 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8520 (set_trace_state_variable_value): New defines.
8521 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8522 addr_get_trace_state_variable_value and
8523 addr_set_trace_state_variable_value.
8524 (symbol_list): New fields for get_raw_reg,
8525 get_trace_state_variable_value and set_trace_state_variable_value.
8526 (condfn): New typedef.
8527 (struct tracepoint): New field `compiled_cond'.
8528 (do_action_at_tracepoint): Clear compiled_cond.
8529 (get_trace_state_variable_value, set_trace_state_variable_value):
8530 Export in the IPA.
8531 (condition_true_at_tracepoint): If there's a compiled condition,
8532 run that.
8533 (current_insn_ptr, emit_error): New globals.
8534 (struct bytecode_address): New.
8535 (get_raw_reg_func_addr): New.
8536 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8537 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8538 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8539 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8540 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8541 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8542 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8543 (compile_tracepoint_condition, compile_bytecodes): New.
8544 * target.h (emit_ops): Forward declare.
8545 (struct target_ops): New field emit_ops.
8546 (target_emit_ops): New.
8547 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8548 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8549 * linux-low.c (linux_emit_ops): New.
8550 (linux_target_ops): Install it.
8551 * linux-low.h (struct linux_target_ops): New field emit_ops.
8552
92b72907
UW
85532010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8554
8555 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8556 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8557
fa593d66
PA
85582010-06-01 Pedro Alves <pedro@codesourcery.com>
8559 Stan Shebs <stan@codesourcery.com>
8560
8561 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8562 (all): Depend on $(extra_libraries).
8563 (install-only): Install the IPA.
8564 (IPA_OBJS, IPA_LIB): New.
8565 (clean): Remove the IPA lib.
8566 (IPAGENT_CFLAGS): New.
8567 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8568 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8569 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8570 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8571 * configure.ac: Check for atomic builtins support in the compiler.
8572 (IPA_DEPFILES, extra_libraries): Define.
8573 * configure.srv (ipa_obj): Add description.
8574 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8575 (i[34567]86-*-linux*): Set ipa_obj.
8576 (x86_64-*-linux*): Set ipa_obj.
8577 * linux-low.c (stabilizing_threads): New.
8578 (supports_fast_tracepoints): New.
8579 (linux_detach): Stabilize threads before detaching.
8580 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8581 the lwp is either not stabilizing, or is moving out of a jump pad.
8582 (linux_fast_tracepoint_collecting): New.
8583 (maybe_move_out_of_jump_pad): New.
8584 (enqueue_one_deferred_signal): New.
8585 (dequeue_one_deferred_signal): New.
8586 (linux_wait_for_event_1): If moving out of a jump pad, defer
8587 pending signals to later.
8588 (linux_stabilize_threads): New.
8589 (linux_wait_1): Check if threads need moving out of jump pads, and
8590 do it if so.
8591 (stuck_in_jump_pad_callback): New.
8592 (move_out_of_jump_pad_callback): New.
8593 (lwp_running): New.
8594 (linux_resume_one_lwp): Handle moving out of jump pads.
8595 (linux_set_resume_request): Dequeue deferred signals.
8596 (need_step_over_p): Also step over fast tracepoint jumps.
8597 (start_step_over): Also uninsert fast tracepoint jumps.
8598 (finish_step_over): Also reinsert fast tracepoint jumps.
8599 (linux_install_fast_tracepoint_jump): New.
8600 (linux_target_ops): Install linux_stabilize_threads and
8601 linux_install_fast_tracepoint_jump_pad.
8602 * linux-low.h (linux_target_ops) <get_thread_area,
8603 install_fast_tracepoint_jump_pad>: New fields.
8604 (struct lwp_info) <collecting_fast_tracepoint,
8605 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8606 (linux_get_thread_area): Declare.
8607 * linux-x86-low.c (jump_insn): New.
8608 (x86_get_thread_area): New.
8609 (append_insns): New.
8610 (push_opcode): New.
8611 (amd64_install_fast_tracepoint_jump_pad): New.
8612 (i386_install_fast_tracepoint_jump_pad): New.
8613 (x86_install_fast_tracepoint_jump_pad): New.
8614 (the_low_target): Install x86_get_thread_area and
8615 x86_install_fast_tracepoint_jump_pad.
8616 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8617 (struct fast_tracepoint_jump): New.
8618 (fast_tracepoint_jump_insn): New.
8619 (fast_tracepoint_jump_shadow): New.
8620 (find_fast_tracepoint_jump_at): New.
8621 (fast_tracepoint_jump_here): New.
8622 (delete_fast_tracepoint_jump): New.
8623 (set_fast_tracepoint_jump): New.
8624 (uninsert_fast_tracepoint_jumps_at): New.
8625 (reinsert_fast_tracepoint_jumps_at): New.
8626 (set_breakpoint_at): Use write_inferior_memory.
8627 (uninsert_raw_breakpoint): Use write_inferior_memory.
8628 (check_mem_read): Mask out fast tracepoint jumps.
8629 (check_mem_write): Mask out fast tracepoint jumps.
8630 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8631 (set_fast_tracepoint_jump): Declare.
8632 (delete_fast_tracepoint_jump)
8633 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8634 (reinsert_fast_tracepoint_jumps_at): Declare.
8635 * regcache.c: Don't compile many functions when building the
8636 in-process agent library.
8637 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8638 the register buffer in the heap.
8639 (free_register_cache): If the register buffer isn't owned by the
8640 regcache, don't free it.
8641 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8642 pre-existing register caches.
8643 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8644 type.
8645 (convert_ascii_to_int): : Constify `from' parameter type.
8646 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8647 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8648 the needed buffer in-place.
8649 (relocate_instruction): New.
8650 * server.c (handle_query) <qSymbols>: If the target supports
8651 tracepoints, give it a chance of looking up symbols. Report
8652 support for fast tracepoints.
8653 (handle_status): Stabilize threads.
8654 (process_serial_event): Adjust.
8655 * server.h (struct fast_tracepoint_jump): Forward declare.
8656 (struct process_info) <fast_tracepoint_jumps>: New field.
8657 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8658 (decode_X_packet, decode_M_packet): Adjust.
8659 (relocate_instruction): Declare.
8660 (in_process_agent_loaded): Declare.
8661 (tracepoint_look_up_symbols): Declare.
8662 (struct fast_tpoint_collect_status): Declare.
8663 (fast_tracepoint_collecting): Declare.
8664 (force_unlock_trace_buffer): Declare.
8665 (handle_tracepoint_bkpts): Declare.
8666 (initialize_low_tracepoint)
8667 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8668 * target.h (struct target_ops) <stabilize_threads,
8669 install_fast_tracepoint_jump_pad>: New fields.
8670 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8671 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8672 [HAVE_STDINT_H]: Include stdint.h.
8673 (trace_debug_1): Rename to ...
8674 (trace_vdebug): ... this.
8675 (trace_debug): Rename to ...
8676 (trace_debug_1): ... this. Add `level' parameter.
8677 (trace_debug): New.
8678 (ATTR_USED, ATTR_NOINLINE): New.
8679 (IP_AGENT_EXPORT): New.
8680 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8681 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8682 (about_to_request_buffer_space, trace_buffer_is_full)
8683 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8684 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8685 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8686 (traceframe_write_count, traceframes_created)
8687 (trace_state_variables)
8688 New renaming defines.
8689 (struct ipa_sym_addresses): New.
8690 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8691 (symbol_list): New.
8692 (ipa_sym_addrs): New.
8693 (all_tracepoint_symbols_looked_up): New.
8694 (in_process_agent_loaded): New.
8695 (write_e_ipa_not_loaded): New.
8696 (maybe_write_ipa_not_loaded): New.
8697 (tracepoint_look_up_symbols): New.
8698 (debug_threads) [IN_PROCESS_AGENT]: New.
8699 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8700 (UNKNOWN_SIDE_EFFECTS): New.
8701 (stop_tracing): New.
8702 (flush_trace_buffer): New.
8703 (stop_tracing_bkpt): New.
8704 (flush_trace_buffer_bkpt): New.
8705 (read_inferior_integer): New.
8706 (read_inferior_uinteger): New.
8707 (read_inferior_data_pointer): New.
8708 (write_inferior_data_pointer): New.
8709 (write_inferior_integer): New.
8710 (write_inferior_uinteger): New.
8711 (struct collect_static_trace_data_action): Delete.
8712 (enum tracepoint_type): New.
8713 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8714 <actions_str, step_actions, step_actions_str>: Only include in
8715 GDBserver.
fa593d66
PA
8716 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8717 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8718 (tracepoints): Use IP_AGENT_EXPORT.
8719 (last_tracepoint): Don't include in the IPA.
8720 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8721 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8722 (alloced_trace_state_variables): New.
8723 (trace_state_variables): Use IP_AGENT_EXPORT.
8724 (traceframe_t): Delete unused variable.
8725 (circular_trace_buffer): Don't include in the IPA.
8726 (trace_buffer_start): Delete.
8727 (struct trace_buffer_control): New.
8728 (trace_buffer_free): Delete.
8729 (struct ipa_trace_buffer_control): New.
8730 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8731 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8732 New.
8733 (trace_buffer_ctrl): New.
8734 (TRACE_BUFFER_CTRL_CURR): New.
8735 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8736 Reimplement as macros.
8737 (trace_buffer_wrap): Delete.
8738 (traceframe_write_count, traceframe_read_count)
8739 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8740 (struct tracepoint_hit_ctx) <type>: New field.
8741 (struct fast_tracepoint_ctx): New.
8742 (memory_barrier): New.
8743 (cmpxchg): New.
8744 (record_tracepoint_error): Update atomically in the IPA.
8745 (clear_inferior_trace_buffer): New.
8746 (about_to_request_buffer_space): New.
8747 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8748 updating the same buffer.
8749 (add_tracepoint): Default the tracepoint's type to trap
8750 tracepoint, and orig_size to -1.
8751 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8752 internal variables.
8753 (create_trace_state_variable): New parameter `gdb'. Handle it.
8754 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8755 (cmd_qtdp): Handle fast tracepoints.
8756 (cmd_qtdv): Adjust.
8757 (max_jump_pad_size): New.
8758 (gdb_jump_pad_head): New.
8759 (get_jump_space_head): New.
8760 (claim_jump_space): New.
8761 (sort_tracepoints): New.
8762 (MAX_JUMP_SIZE): New.
8763 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8764 IPA.
8765 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8766 support. Upload fast traceframes, and delete internal IPA
8767 breakpoints.
8768 (stop_tracing_handler): New.
8769 (flush_trace_buffer_handler): New.
8770 (cmd_qtstop): Upload fast tracepoints.
8771 (response_tracepoint): Handle fast tracepoints.
8772 (tracepoint_finished_step): Upload fast traceframes. Set the
8773 tracepoint hit context's tracepoint type.
8774 (handle_tracepoint_bkpts): New.
8775 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8776 type. Add comment about fast tracepoints.
8777 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8778 non-existing action_str field.
8779 (get_context_regcache): Handle fast tracepoints.
8780 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8781 to the regcache.
8782 (fast_tracepoint_from_jump_pad_address): New.
8783 (fast_tracepoint_from_ipa_tpoint_address): New.
8784 (collecting_t): New.
8785 (force_unlock_trace_buffer): New.
8786 (fast_tracepoint_collecting): New.
8787 (collecting): New.
8788 (gdb_collect): New.
8789 (write_inferior_data_ptr): New.
8790 (target_tp_heap): New.
8791 (target_malloc): New.
8792 (download_agent_expr): New.
8793 (UALIGN): New.
8794 (download_tracepoints): New.
8795 (download_trace_state_variables): New.
8796 (upload_fast_traceframes): New.
8797 (IPA_FIRST_TRACEFRAME): New.
8798 (IPA_NEXT_TRACEFRAME_1): New.
8799 (IPA_NEXT_TRACEFRAME): New.
8800 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8801 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8802 (gdb_jump_pad_buffer_end): New.
8803 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8804 (initialize_tracepoint): Adjust.
8805 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8806 buffer. Initialize the low module.
8807 * utils.c (PREFIX, TOOLNAME): New.
8808 (malloc_failure): Use PREFIX.
8809 (error): In the IPA, an error causes an exit.
8810 (fatal, warning): Use PREFIX.
8811 (internal_error): Use TOOLNAME.
8812 (NUMCELLS): Increase to 10.
8813 * configure, config.in: Regenerate.
8814
d149dd1d
PA
88152010-06-01 Pedro Alves <pedro@codesourcery.com>
8816
8817 * server.c (handle_query) <qSupported>: Do two passes over the
8818 qSupported string to avoid nesting strtok.
8819
f6528abd
JK
88202010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8821
8822 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8823 (CDEPS): New.
8824 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8825 -Wl,--dynamic-list.
8826 * configure: Regenerate.
8827 * proc-service.list: New.
8828
ca2a87a0
JK
88292010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8830
8831 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8832 New comment.
8833
363a6e9f
OS
88342010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8835
8836 * gdbreplay.c (remote_open): Check error return from socket() call by
8837 its equality to -1 not by it being negative.
8838 * remote-utils.c (remote_open): Likewise.
8839
d23b6cb1
PA
88402010-05-23 Pedro Alves <pedro@codesourcery.com>
8841
8842 * config.h: Regenerate.
8843
28d3cf85
MK
88442010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8845
8846 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8847 doesn't provide PTRACE_GET_THREAD_AREA.
8848
fea36a59
MK
88492010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8850
8851 * linux-m68k-low.c: Include <asm/ptrace.h>
8852 (ps_get_thread_area): Implement.
8853
24b066ba
DE
88542010-05-03 Doug Evans <dje@google.com>
8855
8856 * event-loop.c (struct callback_event): New struct.
8857 (callback_list): New global.
8858 (append_callback_event, delete_callback_event): New functions.
8859 (process_callback): New function.
8860 (start_event_loop): Call it.
8861 * remote-utils.c (NOT_SCHEDULED): Define.
8862 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8863 moved out of readchar.
8864 (readchar): Rewrite. Call reschedule before returning.
8865 (reset_readchar): New function.
8866 (remote_close): Call it.
8867 (process_remaining, reschedule): New functions.
8868 * server.h (callback_handler_func): New typedef.
8869 (append_callback_event, delete_callback_event): Declare.
8870
9836d6ea
PA
88712010-05-03 Pedro Alves <pedro@codesourcery.com>
8872
8873 * proc-service.c (ps_pglobal_lookup): Use
8874 thread_db_look_up_one_symbol.
8875 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8876 parameter. Use it instead of all_symbols_looked_up.
8877 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8878 field.
8879 (all_symbols_looked_up): Don't declare.
8880 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8881 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8882 field.
8883 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8884 Set all_symbols_looked_up here.
8885 (thread_db_look_up_one_symbol): New.
8886 (thread_db_get_tls_address): Adjust.
8887 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8888 thread_db object on the heap, and tentatively set it in the
8889 process structure.
8890 (thread_db_init): Don't set all_symbols_looked_up here.
8891 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8892
7984d532
PA
88932010-05-03 Pedro Alves <pedro@codesourcery.com>
8894
8895 * linux-low.c (linux_kill, linux_detach): Adjust.
8896 (status_pending_p_callback): Remove redundant statement. Check
8897 for !TARGET_WAITIKIND_IGNORE, instead of
8898 TARGET_WAITKIND_STOPPED.
8899 (handle_tracepoints): Make sure LWP is locked. Adjust.
8900 (linux_wait_for_event_1): Adjust.
8901 (linux_cancel_breakpoints): New.
8902 (unsuspend_one_lwp): New.
8903 (unsuspend_all_lwps): New.
8904 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8905 (send_sigstop_callback): Change return type to int, add new
8906 `except' parameter and handle it.
8907 (suspend_and_send_sigstop_callback): New.
8908 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8909 pass them down. If SUSPEND, also increment the lwp's suspend
8910 count.
8911 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8912 (need_step_over_p): Don't consider suspended LWPs.
8913 (start_step_over): Adjust.
8914 (proceed_one_lwp): Change return type to int, add new `except'
8915 parameter and handle it.
8916 (unsuspend_and_proceed_one_lwp): New.
8917 (proceed_all_lwps): Use find_inferior instead of
8918 for_each_inferior.
8919 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8920 also decrement the suspend count of LWPs. Pass `except' down,
8921 instead of hacking its suspend count.
8922 (linux_pause_all): Add `freeze' parameter. Adjust.
8923 (linux_unpause_all): New.
8924 (linux_target_ops): Install linux_unpause_all.
8925 * server.c (handle_status): Adjust.
8926 * target.h (struct target_ops): New fields `unpause_all' and
8927 `cancel_breakpoints'. Add new parameter to `pause_all'.
8928 (pause_all): Add new `freeze' parameter.
8929 (unpause_all): New.
8930 (cancel_breakpoints): New.
8931 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8932 cancel breakpoints.
8933 (cmd_qtstart): Pause threads.
8934 (stop_tracing): Pause threads, and cancel breakpoints.
8935 * win32-low.c (win32_target_ops): Adjust.
8936
e471f25b
PA
89372010-05-03 Pedro Alves <pedro@codesourcery.com>
8938
8939 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8940 the inferior right away from here...
8941 (linux_wait_1): ... to here, and adjust to check the thread's
8942 last_resume_kind instead of the lwp's step or stop_expected flags.
8943
1915ef4f
PA
89442010-05-02 Pedro Alves <pedro@codesourcery.com>
8945
8946 * README: Use consistent `GDB' and `GDBserver' spellings.
8947
f9e39928
PA
89482010-05-02 Pedro Alves <pedro@codesourcery.com>
8949
8950 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8951 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8952 (linux_detach_one_lwp): Assume the lwp is stopped.
8953 (any_thread_of): Delete.
8954 (linux_detach): Stop all lwps here. Don't blindly delete all
8955 breakpoints.
8956 (delete_lwp_callback): New.
8957 (linux_mourn): Delete all lwps of the process that is gone.
8958 (linux_wait_1): Don't delete the last lwp of the process here.
8959 * mem-break.h (mark_breakpoints_out): Declare.
8960 * mem-break.c (mark_breakpoints_out): New.
8961 (free_all_breakpoints): Use it.
8962 * server.c (handle_target_event): If the process is gone, mark
8963 breakpoints out.
8964 * thread-db.c (struct thread_db) <create_bp>: New field.
8965 (thread_db_enable_reporting): Fix prototype. Store a thread event
8966 breakpoint reference in the thread_db struct.
8967 (thread_db_load_search): Clear the thread_db object.
8968 (try_thread_db_load_1): Ditto.
8969 (switch_to_process): New.
8970 (disable_thread_event_reporting): Use it.
8971 (remove_thread_event_breakpoints): New.
8972 (thread_db_detach, thread_db_mourn): Use it.
8973
1e7fc18c
PA
89742010-05-01 Pedro Alves <pedro@codesourcery.com>
8975
8976 * linux-low.c (linux_enable_event_reporting): New.
8977 (linux_wait_for_event_1, handle_extended_wait): Use it.
8978
02fc4de7
PA
89792010-04-30 Pedro Alves <pedro@codesourcery.com>
8980
8981 * linux-low.c (linux_kill_one_lwp, linux_kill)
8982 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8983 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8984 SIGSTOP even if the LWP is stopped.
8985 (send_sigstop_callback): New.
8986 (stop_all_lwps): Use send_sigstop_callback instead.
8987 (linux_resume_one_thread): Adjust.
8988 (proceed_one_lwp): Still proceed an LWP that the client has
8989 requested to stop, if we haven't reported it as stopped yet. Make
8990 sure that LWPs the client want stopped, have a pending SIGSTOP.
8991
bc3b5632
DE
89922010-04-26 Doug Evans <dje@google.com>
8993
ae1ada35
DE
8994 * server.c (handle_general_set): Make static.
8995
bc3b5632
DE
8996 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8997 Print received char after testing for error/eof instead of before.
8998 (input_interrupt): Tweak comment.
8999
65730243
DE
90002010-04-23 Doug Evans <dje@google.com>
9001
9002 * server.c (start_inferior): Print inferior argv if --debug.
9003
a8ae7dc0
AR
90042010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9005
9006 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9007 * nto-x86-low.c: Include server.h
9008
1c07cc19
PM
90092010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9010
9011 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9012 be consistent with other sources of this directory.
9013 (init_registers_amd64): Correct name of source file of this function
9014 in the comment.
9015
e0a61e09
PM
90162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9017
9018 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9019 64-bit executables.
9020
54709339
PM
90212010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9022
9023 * win32-i386-low.c: Add 64-bit support.
9024 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9025 (init_registers_amd64): Declare.
9026 (mappings): Add 64-bit version of array.
9027 (init_windows_x86): New function.
9028 (the_low_target): Change init_arch field to init_windows_x86.
9029
e8f0053d
PM
90302010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9031
9032 * win32-low.c: Adapt to support also 64-bit architecture.
9033 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9034 (get_image_name): Use SIZE_T type for local variable `done'.
9035 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9036 (toolhelp_get_dll_name): Idem.
9037 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9038 Use uintptr_t typecast to avoid warning.
9039 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9040 (handle_exception): Use phex_nz to avoid warning.
9041 (win32_wait): Remove unused local variable `process'.
9042
c481e77e
PM
90432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9044
9045 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9046 `amd64-avx.o'.
9047
12ea4b69
PM
90482010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9049
9050 * configure.ac: Use `ws2_32' library for srv_mingw.
9051 * configure: Regenerate.
9052 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9053 * remote-utils.c: Likewise.
9054
f6d1620c
L
90552010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9056
9057 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9058 if __x86_64__ is defined.
9059
8e642873
PM
90602010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9061
9062 * configure: Regenerate.
9063
711e434b
PM
90642010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9065
9066 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9067 * target.h (target_ops): New get_tib_address field.
9068 * win32-low.h (win32_thread_info): Add thread_local_base field.
9069 * win32-low.c (child_add_thread): Add tlb argument.
9070 Set thread_local_base field to TLB.
9071 (get_child_debug_event): Adapt to child_add_thread change.
9072 (win32_get_tib_address): New function.
9073 (win32_target_ops): Set get_tib_address field to
9074 win32_get_tib_address.
9075 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9076
505106cd
PA
90772010-04-12 Pedro Alves <pedro@codesourcery.com>
9078
505106cd
PA
9079 * linux-low.c (linux_mourn): Also remove the process.
9080 * server.c (handle_target_event): Don't remove the process here.
9081 * nto-low.c (nto_mourn): New.
9082 (nto_target_ops): Install it.
9083 * spu-low.c (spu_mourn): New.
9084 (spu_target_ops): Install it.
9085 * win32-low.c (win32_mourn): New.
9086 (win32_target_ops): Install it.
9087
e8470a06
PA
90882010-04-12 Pedro Alves <pedro@codesourcery.com>
9089
9090 * server.h (buffer_xml_printf): Remove redundant `;'.
9091
45ba0d02
PA
90922010-04-12 Pedro Alves <pedro@codesourcery.com>
9093
9094 * regcache.c (set_register_cache): Invalidate regcaches before
9095 changing the register cache layout.
9096 (regcache_invalidate_one): Allow a NULL regcache.
9097 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9098 regcaches before changing the register cache layout or the target
9099 regsets.
9100
59e04013
L
91012010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9102
9103 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9104 variable warning on Linux/x86-64.
9105
8336d594
PA
91062010-04-11 Pedro Alves <pedro@codesourcery.com>
9107
9108 GDBserver disconnected tracing support.
9109
9110 * linux-low.c (linux_remove_process): Delete.
9111 (add_lwp): Don't set last_resume_kind here.
9112 (linux_kill): Use `mourn'.
9113 (linux_detach): Use `thread_db_detach', and `mourn'.
9114 (linux_mourn): New.
9115 (linux_attach_lwp_1): Adjust comment.
9116 (linux_attach): last_resume_kind moved the thread_info; adjust.
9117 (status_pending_p_callback): Adjust.
9118 (linux_wait_for_event_1): Adjust.
9119 (count_events_callback, select_singlestep_lwp_callback)
9120 (select_event_lwp_callback, cancel_breakpoints_callback)
9121 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9122 (proceed_one_lwp): Adjust.
9123 (linux_async): Add debug output.
9124 (linux_thread_stopped): New.
9125 (linux_pause_all): New.
9126 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9127 linux_pause_all.
9128 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9129 (thread_db_free): Delete declaration.
9130 (thread_db_detach, thread_db_mourn): Declare.
9131 * thread-db.c (thread_db_init): Use thread_db_mourn.
9132 (thread_db_free): Delete, split in two.
9133 (disable_thread_event_reporting): New.
9134 (thread_db_detach): New.
9135 (thread_db_mourn): New.
9136
9137 * server.h (struct thread_info) <last_resume_kind>: New field.
9138 <attached>: Add comment.
9139 <gdb_detached>: New field.
9140 (handler_func): Change return type to int.
9141 (handle_serial_event, handle_target_event): Ditto.
9142 (gdb_connected): Declare.
9143 (tracing): Delete.
9144 (disconnected_tracing): Declare.
9145 (stop_tracing): Declare.
9146
9147 * server.c (handle_query) <qSupported>: Report support for
9148 disconnected tracing.
9149 (queue_stop_reply_callback): Account for running threads.
9150 (gdb_wants_thread_stopped): New.
9151 (gdb_wants_all_threads_stopped): New.
9152 (gdb_reattached_process): New.
9153 (handle_status): Clear the `gdb_detached' flag of all processes.
9154 In all-stop, stop all threads.
9155 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9156 (process_serial_event): If the remote connection breaks, or if an
9157 exit was forced with "monitor exit", force an event loop exit.
9158 Handle disconnected tracing on detach.
9159 (handle_serial_event): Adjust.
9160 (handle_target_event): If GDB isn't connected, forward events back
9161 to the inferior, unless the last process exited, in which case,
9162 exit gdbserver. Adjust interface.
9163
9164 * remote-utils.c (remote_open): Don't block in accept. Instead
9165 register an event loop source on the listen socket file
9166 descriptor. Refactor bits into ...
9167 (listen_desc): ... this new global.
9168 (gdb_connected): ... this new function.
9169 (enable_async_notification): ... this new function.
9170 (handle_accept_event): ... this new function.
9171 (remote_close): Clear remote_desc.
9172
9173 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9174
9175 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9176 New fields.
9177 (mourn_inferior): Define.
9178 (target_process_qsupported): Avoid the dangling else problem.
9179 (thread_stopped): Define.
9180 (pause_all): Define.
9181 (target_waitstatus_to_string): Declare.
9182 * target.c (target_waitstatus_to_string): New.
9183
9184 * tracepoint.c (tracing): Make extern.
9185 (disconnected_tracing): New.
9186 (stop_tracing): Make extern. Handle tracing stops due to GDB
9187 disconnecting.
9188 (cmd_qtdisconnected): New.
9189 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9190 (handle_tracepoint_general_set): Handle QTDisconnected.
9191
9192 * event-loop.c (event_handler_func): Change return type to int.
9193 (process_event): Bail out if the event handler wants the event
9194 loop to stop.
9195 (handle_file_event): Ditto.
9196 (start_event_loop): Bail out if the event handler wants the event
9197 loop to stop.
9198
9199 * nto-low.c (nto_target_ops): Adjust.
9200 * spu-low.c (spu_wait): Don't remove the process here.
9201 (spu_target_ops): Adjust.
9202 * win32-low.c (win32_wait): Don't remove the process here.
9203 (win32_target_ops): Adjust.
9204
5d267c4c
PA
92052010-04-11 Pedro Alves <pedro@codesourcery.com>
9206
9207 * regcache.c (realloc_register_cache): Invalidate inferior's
9208 regcache before recreating it.
9209
623ccd72
PA
92102010-04-09 Pedro Alves <pedro@codesourcery.com>
9211
9212 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9213
219f2f23
PA
92142010-04-09 Stan Shebs <stan@codesourcery.com>
9215 Pedro Alves <pedro@codesourcery.com>
9216
9217 * server.h (LONGEST): New.
9218 (struct thread_info) <while_stepping>: New field.
9219 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9220 Declare.
9221 (initialize_tracepoint, handle_tracepoint_general_set)
9222 (handle_tracepoint_query, tracepoint_finished_step)
9223 (tracepoint_was_hit, release_while_stepping_state_list):
9224 (current_traceframe): Declare.
9225 * server.c (handle_general_set): Handle tracepoint packets.
9226 (read_memory): New.
9227 (write_memory): New.
9228 (handle_search_memory_1): Use read_memory.
9229 (handle_query): Report support for conditional tracepoints, trace
9230 state variables, and tracepoint sources. Handle tracepoint
9231 queries.
9232 (main): Initialize the tracepoints module.
9233 (process_serial_event): Handle traceframe reads/writes.
9234
9235 * linux-low.c (handle_tracepoints): New.
9236 (linux_wait_1): Call it.
9237 (linux_resume_one_lwp): Handle while-stepping.
9238 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9239 (linux_target_ops): Install them.
9240 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9241 New field.
9242 * linux-x86-low.c (x86_supports_tracepoints): New.
9243 (the_low_target). Install it.
9244
9245 * mem-break.h (delete_breakpoint): Declare.
9246 * mem-break.c (delete_breakpoint): Make external.
9247
9248 * target.h (struct target_ops): Add `supports_tracepoints',
9249 `read_pc', and `write_pc' fields.
9250 (target_supports_tracepoints): Define.
9251 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9252 (phex_nz): New.
9253
9254 * regcache.h (struct regcache) <registers_owned>: New field.
9255 (init_register_cache, regcache_cpy): Declare.
9256 (regcache_read_pc, regcache_write_pc): Declare.
9257 (register_cache_size): Declare.
9258 (supply_regblock): Declare.
9259 * regcache.c (init_register_cache): New.
9260 (new_register_cache): Use it.
9261 (regcache_cpy): New.
9262 (register_cache_size): New.
9263 (supply_regblock): New.
9264 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9265
219f2f23
PA
9266 * tracepoint.c: New.
9267
9268 * Makefile.in (OBS): Add tracepoint.o.
9269 (tracepoint.o): New rule.
9270
3a13a53b
L
92712010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9272
9273 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9274 (i386-mmx.o): New.
9275 (i386-mmx.c): Likewise.
9276 (i386-mmx-linux.o): Likewise.
9277 (i386-mmx-linux.c): Likewise.
9278
9279 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9280 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9281 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9282 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9283
9284 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9285 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9286 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9287
1570b33e
L
92882010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9289
9290 * Makefile.in (clean): Updated.
9291 (i386-avx.o): New.
9292 (i386-avx.c): Likewise.
9293 (i386-avx-linux.o): Likewise.
9294 (i386-avx-linux.c): Likewise.
9295 (amd64-avx.o): Likewise.
9296 (amd64-avx.c): Likewise.
9297 (amd64-avx-linux.o): Likewise.
9298 (amd64-avx-linux.c): Likewise.
9299
9300 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9301 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9302 (srv_amd64_regobj): Add amd64-avx.o.
9303 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9304 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9305 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9306 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9307 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9308 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9309 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9310
9311 * i387-fp.c: Include "i386-xstate.h".
9312 (i387_xsave): New.
9313 (i387_cache_to_xsave): Likewise.
9314 (i387_xsave_to_cache): Likewise.
9315 (x86_xcr0): Likewise.
9316
9317 * i387-fp.h (i387_cache_to_xsave): Likewise.
9318 (i387_xsave_to_cache): Likewise.
9319 (x86_xcr0): Likewise.
9320
9321 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9322 * linux-crisv32-low.c (target_regsets): Likewise.
9323 * linux-m68k-low.c (target_regsets): Likewise.
9324 * linux-mips-low.c (target_regsets): Likewise.
9325 * linux-ppc-low.c (target_regsets): Likewise.
9326 * linux-s390-low.c (target_regsets): Likewise.
9327 * linux-sh-low.c (target_regsets): Likewise.
9328 * linux-sparc-low.c (target_regsets): Likewise.
9329 * linux-xtensa-low.c (target_regsets): Likewise.
9330
9331 * linux-low.c: Include <sys/uio.h>.
9332 (regsets_fetch_inferior_registers): Support nt_type.
9333 (regsets_store_inferior_registers): Likewise.
9334 (linux_process_qsupported): New.
9335 (linux_target_ops): Add linux_process_qsupported.
9336
9337 * linux-low.h (regset_info): Add nt_type.
9338 (linux_target_ops): Add process_qsupported.
9339
9340 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9341 and <sys/uio.h>.
9342 (init_registers_i386_avx_linux): New.
9343 (init_registers_amd64_avx_linux): Likewise.
9344 (xmltarget_i386_linux_no_xml): Likewise.
9345 (xmltarget_amd64_linux_no_xml): Likewise.
9346 (PTRACE_GETREGSET): Likewise.
9347 (PTRACE_SETREGSET): Likewise.
9348 (x86_fill_xstateregset): Likewise.
9349 (x86_store_xstateregset): Likewise.
9350 (use_xml): Likewise.
9351 (x86_linux_update_xmltarget): Likewise.
9352 (x86_linux_process_qsupported): Likewise.
9353 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9354 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9355 init_registers_i386_linux here. Call
9356 x86_linux_update_xmltarget.
9357 (the_low_target): Add x86_linux_process_qsupported.
9358
9359 * server.c (handle_query): Call target_process_qsupported.
9360
9361 * target.h (target_ops): Add process_qsupported.
9362 (target_process_qsupported): New.
9363
fc7238bb
PA
93642010-04-03 Pedro Alves <pedro@codesourcery.com>
9365
9366 * inferiors.c (add_thread): Set last_status kind to
9367 TARGET_WAITKIND_IGNORE.
9368 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9369 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9370 (linux_wait_1): Move `thread' local definition to block that uses
9371 it. Don't NULL initialize `event_child'.
9372 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9373 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9374 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9375
bdabb078
PA
93762010-04-01 Pedro Alves <pedro@codesourcery.com>
9377
9378 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9379 an extended waitstatus, or by a watchpoint.
9380 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9381 thread was stepping or has been stopped by a watchpoint.
9382
d3bbe7a0
PA
93832010-04-01 Pedro Alves <pedro@codesourcery.com>
9384
9385 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9386 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9387 of another, then delete the previous, and validate all
9388 breakpoints.
9389 (validate_inserted_breakpoint): New.
9390 (delete_disabled_breakpoints): New.
9391 (validate_breakpoints): New.
9392 (check_mem_read): Validate breakpoints before trusting their
9393 shadow. Delete disabled breakpoints.
9394 (check_mem_write): Validate breakpoints before trusting they
9395 should be inserted. Delete disabled breakpoints.
9396 * mem-break.h (validate_breakpoints):
9397 * server.c (handle_query): Validate breakpoints when we see a
9398 qSymbol query.
9399
8b07ae33
PA
94002010-04-01 Pedro Alves <pedro@codesourcery.com>
9401
9402 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9403 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9404 if we could tell there's a GDB breakpoint at stop_pc.
9405 (need_step_over_p): Don't do a step over if we find a GDB
9406 breakpoint at the resume PC.
9407
9408 * mem-break.c (struct raw_breakpoint): New.
9409 (enum bkpt_type): New type `gdb_breakpoint'.
9410 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9411 fields. New field `raw'.
9412 (find_raw_breakpoint_at): New.
9413 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9414 breakpoint instead.
9415 (set_breakpoint_at): Adjust.
9416 (delete_raw_breakpoint): New.
9417 (release_breakpoint): New.
9418 (delete_breakpoint): Rename to...
9419 (delete_breakpoint_1): ... this. Add proc parameter. Use
9420 release_breakpoint. Return ENOENT.
9421 (delete_breakpoint): Reimplement.
9422 (find_breakpoint_at): Delete.
9423 (find_gdb_breakpoint_at): New.
9424 (delete_breakpoint_at): Delete.
9425 (set_gdb_breakpoint_at): New.
9426 (delete_gdb_breakpoint_at): New.
9427 (gdb_breakpoint_here): New.
9428 (set_reinsert_breakpoint): Use release_breakpoint.
9429 (uninsert_breakpoint): Rename to ...
9430 (uninsert_raw_breakpoint): ... this.
9431 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9432 (reinsert_raw_breakpoint): Change parameter type to
9433 raw_breakpoint.
9434 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9435 instead.
9436 (check_breakpoints): Adjust. Use release_breakpoint.
9437 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9438 (breakpoint_inserted_here): Ditto.
9439 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9440 Don't trust the breakpoint's shadow if it is not inserted.
9441 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9442 (delete_all_breakpoints): Adjust.
9443 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9444 use delete_breakpoint_1.
9445
9446 * mem-break.h (breakpoints_supported): Delete declaration.
9447 (set_gdb_breakpoint_at): Declare.
9448 (gdb_breakpoint_here): Declare.
9449 (delete_breakpoint_at): Delete.
9450 (delete_gdb_breakpoint_at): Declare.
9451
9452 * server.h (struct raw_breakpoint): Forward declare.
9453 (struct process_info): New field `raw_breakpoints'.
9454
9455 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9456 breakpoints.
9457
6bf5e0ba
PA
94582010-03-24 Pedro Alves <pedro@codesourcery.com>
9459
9460 * linux-low.c (status_pending_p_callback): Fix comment.
9461 (linux_wait_for_event_1): Move most of the internal breakpoint
9462 handling from here...
9463 (linux_wait_1): ... to here.
9464 (count_events_callback): New.
9465 (select_singlestep_lwp_callback): New.
9466 (select_event_lwp_callback): New.
9467 (cancel_breakpoints_callback): New.
9468 (select_event_lwp): New.
9469 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9470 priority to all LWPs that have had events that should be reported
9471 to the client. Cancel breakpoints when about to reporting the
9472 event to the client, not while stopping lwps. No longer cancel
9473 finished single-steps here.
9474 (cancel_finished_single_step): Delete.
9475 (cancel_finished_single_steps): Delete.
9476
414a389f
PA
94772010-03-24 Pedro Alves <pedro@codesourcery.com>
9478
9479 * mem-break.c (enum bkpt_type): New.
9480 (struct breakpoint): New field `type'.
9481 (set_breakpoint_at): Change return type to struct breakpoint
9482 pointer. Set type to `other_breakpoint' by default.
9483 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9484 in the breakpoint list.
9485 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9486 (reinsert_breakpoint): Rename to ...
9487 (reinsert_raw_breakpoint): ... this.
9488 (reinsert_breakpoints_at): Adjust.
9489 * mem-break.h (struct breakpoint): Declare.
9490 (set_breakpoint_at): Change return type to struct breakpoint
9491 pointer.
9492
2280c721
PA
94932010-03-24 Pedro Alves <pedro@codesourcery.com>
9494
9495 * server.c (handle_query): Assign, not compare.
9496
d50171e4
PA
94972010-03-24 Pedro Alves <pedro@codesourcery.com>
9498
9499 Teach linux gdbserver to step-over-breakpoints.
9500
9501 * linux-low.c (can_hardware_single_step): New.
9502 (supports_breakpoints): New.
9503 (handle_extended_wait): If stopping threads, read the stop pc of
9504 the new cloned LWP.
9505 (get_pc): New.
9506 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9507 low target doesn't support retrieving the PC.
9508 (add_lwp): Set last_resume_kind to resume_continue.
9509 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9510 (linux_attach): Don't clear stop_expected. Set the lwp's
9511 last_resume_kind to resume_stop.
9512 (linux_detach_one_lwp): Don't check for removed breakpoints.
9513 (check_removed_breakpoint): Delete.
9514 (status_pending_p): Rename to ...
9515 (status_pending_p_callback): ... this. Don't check for removed
9516 breakpoints. Don't consider threads that are stopped from GDB's
9517 perspective.
9518 (linux_wait_for_lwp): Always read the stop_pc here.
9519 (cancel_breakpoint): New.
9520 (step_over_bkpt): New global.
9521 (linux_wait_for_event_1): Implement stepping over breakpoints.
9522 (gdb_wants_lwp_stopped): New.
9523 (gdb_wants_all_stopped): New.
9524 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9525 single-step traps here. Store the thread's last reported target
9526 wait status.
9527 (send_sigstop): Don't clear stop_expected. Always set it,
9528 instead.
9529 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9530 (cancel_finished_single_step): New.
9531 (cancel_finished_single_steps): New.
9532 (wait_for_sigstop): Don't cancel finished single-step traps here.
9533 (linux_resume_one_lwp): Don't check for removed breakpoints.
9534 Don't set `step' on non-hardware step archs.
9535 (linux_set_resume_request): Ignore resume_stop requests if already
9536 stopping or stopped. Set the lwp's last_resume_kind.
9537 (resume_status_pending_p): Don't check for removed breakpoints.
9538 (need_step_over_p): New.
9539 (start_step_over): New.
9540 (finish_step_over): New.
9541 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9542 requests. Clear the thread's last reported target waitstatus.
9543 Don't use the `suspended' flag. Don't consider pending breakpoints.
9544 (linux_resume): Start a step-over if necessary.
9545 (proceed_one_lwp): New.
9546 (proceed_all_lwps): New.
9547 (unstop_all_lwps): New.
9548 * linux-low.h (struct lwp_info): Rewrite comment for the
9549 `suspended' flag. Add the `stop_pc' field. Delete the
9550 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9551 Add `'last_resume_kind' and `need_step_over' fields.
9552 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9553 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9554 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9555 (set_raw_breakpoint_at): New.
9556 (set_breakpoint_at): Rewrite to use it.
9557 (reinsert_breakpoint_handler): Delete.
9558 (set_reinsert_breakpoint): New.
9559 (reinsert_breakpoint_by_bp): Delete.
9560 (delete_reinsert_breakpoints): New.
9561 (uninsert_breakpoint): Rewrite.
9562 (uninsert_breakpoints_at): New.
9563 (reinsert_breakpoint): Rewrite.
9564 (reinsert_breakpoints_at): New.
9565 (check_breakpoints): Rewrite.
9566 (breakpoint_here): New.
9567 (breakpoint_inserted_here): New.
9568 (check_mem_read): Adjust.
9569 * mem-break.h (breakpoints_supported, breakpoint_here)
9570 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9571 (reinsert_breakpoint_by_bp): Delete declaration.
9572 (delete_reinsert_breakpoints): Declare.
9573 (reinsert_breakpoint): Delete declaration.
9574 (reinsert_breakpoints_at): Declare.
9575 (uninsert_breakpoint): Delete declaration.
9576 (uninsert_breakpoints_at): Declare.
9577 (check_breakpoints): Adjust prototype.
9578 * server.h: Adjust include order.
9579 (struct thread_info): Declare here. Add a `last_status' field.
9580
30ba68cb
MS
95812010-03-23 Michael Snyder <msnyder@vmware.com>
9582
9583 * server.c (crc32): New function.
9584 (handle_query): Add handling for 'qCRC:' request.
9585
b9a881c2
PA
95862010-03-23 Pedro Alves <pedro@codesourcery.com>
9587
9588 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9589 lwp had been stopped by a watchpoint.
9590
e92d13d5
PA
95912010-03-16 Pedro Alves <pedro@codesourcery.com>
9592
9593 * server.h (internal_error): Declare.
9594 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9595 * utils.c (internal_error): New function.
9596
64daa791
AS
95972010-03-15 Andreas Schwab <schwab@redhat.com>
9598
9599 * configure.srv: Fix typo setting srv_regobj.
9600
f52cd8cd
PA
96012010-03-15 Pedro Alves <pedro@codesourcery.com>
9602
9603 * linux-low.c (fetch_register): Avoid passing a non string literal
9604 format to `error'.
9605 (usr_store_inferior_registers): Ditto.
9606
93ae6fdc
PA
96072010-03-14 Pedro Alves <pedro@codesourcery.com>
9608
9609 * linux-low.c (linux_write_memory): Bail out early if peeking
9610 memory failed.
9611
c3adc08c
PA
96122010-03-14 Pedro Alves <pedro@codesourcery.com>
9613
9614 * linux-low.h (struct lwp_info): New fields
9615 `stopped_by_watchpoint' and `stopped_data_address'.
9616 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9617 here, and cache them in the lwp object.
9618 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9619 directly.
9620 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9621 field.
9622 (linux_stopped_by_watchpoint): Rewrite.
9623 (linux_stopped_data_address): Rewrite.
9624
bce522a2
PA
96252010-03-06 Simo Melenius <simo.melenius@iki.fi>
9626
9627 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9628 switching the current inferior, not before.
9629
90884b2b
L
96302010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9631
9632 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9633 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9634 i386-linux.c and amd64-linux.c.
9635 (reg-i386.o): Removed.
9636 (reg-i386.c): Likewise.
9637 (reg-i386-linux.o): Likewise.
9638 (reg-i386-linux.c): Likewise.
9639 (reg-x86-64.o): Likewise.
9640 (reg-x86-64.c): Likewise.
9641 (reg-x86-64-linux.o): Likewise.
9642 (reg-x86-64-linux.c): Likewise.
9643 (i386.o): New.
9644 (i386.c): Likewise.
9645 (i386-linux.o): Likewise.
9646 (i386-linux.c): Likewise.
9647 (amd64.o): Likewise.
9648 (amd64.c): Likewise.
9649 (amd64-linux.o): Likewise.
9650 (amd64-linux.c): Likewise.
9651
9652 * configure.srv (srv_i386_regobj): New.
9653 (srv_i386_linux_regobj): Likewise.
9654 (srv_amd64_regobj): Likewise.
9655 (srv_amd64_linux_regobj): Likewise.
9656 (srv_i386_32bit_xmlfiles): Likewise.
9657 (srv_i386_64bit_xmlfiles): Likewise.
9658 (srv_i386_xmlfiles): Likewise.
9659 (srv_amd64_xmlfiles): Likewise.
9660 (srv_i386_linux_xmlfiles): Likewise.
9661 (srv_amd64_linux_xmlfiles): Likewise.
9662 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9663 srv_xmlfiles to $srv_i386_xmlfiles.
9664 (i[34567]86-*-mingw32ce*): Likewise.
9665 (i[34567]86-*-mingw*): Likewise.
9666 (i[34567]86-*-nto*): Likewise.
9667 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9668 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9669 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9670 (x86_64-*-linux*): Likewise.
9671
9672 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9673 (init_registers_amd64_linux): New.
9674 (x86_arch_setup): Replace init_registers_x86_64_linux with
9675 init_registers_amd64_linux.
9676
193f13e6
MK
96772010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9678
9679 * configure.ac: Check for libdl. If it is not available link against
9680 static libthread_db.
9681 * configure: Regenerate.
9682
85d721b8
PA
96832010-02-22 Pedro Alves <pedro@codesourcery.com>
9684
9685 PR9605
9686
9687 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9688 handing a read watchpoint.
9689 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9690
6076632b
DE
96912010-02-12 Doug Evans <dje@google.com>
9692
9693 * linux-low.c (linux_supports_tracefork_flag): Document.
9694 (linux_look_up_symbols): Add comment.
9695
3327ccf7
L
96962010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9697
9698 * regcache.c (supply_register): Clear regcache if buf is NULL.
9699
0718675c 97002010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9701 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9702
9703 * inferiors.c (find_inferior): Add function documentation.
9704 (unloaded_dll): Handle the case where the unloaded dll has not
9705 been previously registered in the dll list.
9706
177321bd
DJ
97072010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9708
9709 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9710 (thumb2_breakpoint): New.
9711 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9712
2b009048
DJ
97132010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9714
9715 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9716 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9717 breakpoints.
9718
3be029c7
PA
97192010-01-21 Pedro Alves <pedro@codesourcery.com>
9720
9721 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9722
18f5de3b
JK
97232010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9724
9725 * linux-s390-low.c (s390_collect_ptrace_register)
9726 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9727
3743bb4f
DE
97282010-01-21 Doug Evans <dje@google.com>
9729
14ce3065
DE
9730 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9731 (PTRACE_ARG4_TYPE): New macro.
9732 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9733 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9734 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9735 (usr_store_inferior_registers): Ditto.
9736 (linux_read_memory, linux_write_memory): Ditto.
9737 (linux_test_for_tracefork): Ditto.
9738
3743bb4f
DE
9739 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9740 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9741
8b315be5
PA
97422010-01-21 Pedro Alves <pedro@codesourcery.com>
9743
9744 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9745 target.
9746
85492558
PA
97472010-01-21 Pedro Alves <pedro@codesourcery.com>
9748
9749 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9750 prototype to take a regcache. Adjust.
9751
442ea881
PA
97522010-01-20 Pedro Alves <pedro@codesourcery.com>
9753
9754 * regcache.h (struct thread_info): Forward declare.
9755 (struct regcache): New.
9756 (new_register_cache): Adjust prototype.
9757 (get_thread_regcache): Declare.
9758 (free_register_cache): Adjust prototype.
9759 (registers_to_string, registers_from_string): Ditto.
9760 (supply_register, supply_register_by_name, collect_register)
9761 (collect_register_as_string, collect_register_by_name): Ditto.
9762 * regcache.c (struct inferior_regcache_data): Delete.
9763 (get_regcache): Rename to ...
9764 (get_thread_regcache): ... this. Adjust. Switch inferior before
9765 fetching registers.
9766 (regcache_invalidate_one): Adjust.
9767 (regcache_invalidate): Fix prototype.
9768 (new_register_cache): Return the new register cache.
9769 (free_register_cache): Change prototype.
9770 (realloc_register_cache): Adjust.
9771 (registers_to_string): Change prototype to take a regcache. Adjust.
9772 (registers_from_string): Ditto.
9773 (register_data): Ditto.
9774 (supply_register): Ditto.
9775 (supply_register_by_name): Ditto.
9776 (collect_register): Ditto.
9777 (collect_register_as_string): Ditto.
9778 (collect_register_by_name): Ditto.
9779 * server.c (process_serial_event): Adjust.
9780 * linux-low.h (regset_fill_func, regset_store_func): Change
9781 prototype.
9782 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9783 Change prototype.
9784 * linux-low.c (get_stop_pc): Adjust.
9785 (check_removed_breakpoint): Adjust.
9786 (linux_wait_for_event): Adjust.
9787 (linux_resume_one_lwp): Adjust.
9788 (fetch_register): Add regcache parameter. Adjust.
9789 (usr_store_inferior_registers): Ditto.
9790 (regsets_fetch_inferior_registers): Ditto.
9791 (regsets_store_inferior_registers): Ditto.
9792 (linux_fetch_registers, linux_store_registers): Ditto.
9793 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9794 regcache. Adjust.
43aaf8b6
PA
9795 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9796 Ditto.
442ea881
PA
9797 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9798 prototype to take a regcache.
9799 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9800 * remote-utils.c (convert_ascii_to_int, outreg)
9801 (prepare_resume_reply): Change prototype to take a regcache.
9802 Adjust.
9803 * target.h (struct target_ops) <fetch_registers, store_registers>:
9804 Change prototype to take a regcache.
9805 (fetch_inferior_registers, store_inferior_registers): Change
9806 prototype to take a regcache. Adjust.
9807 * proc-service.c (ps_lgetregs): Adjust.
9808 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9809 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9810 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9811 take a regcache. Adjust.
9812 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9813 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9814 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9815 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9816 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9817 (cris_cannot_fetch_register):
9818 (cris_breakpoint_at): Change prototype to take a regcache.
9819 Adjust.
9820 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9821 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9822 to take a regcache. Adjust.
9823 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9824 Adjust.
9825 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9826 take a regcache. Adjust.
9827 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9828 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9829 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9830 * linux-mips-low.c (mips_get_pc):
9831 (mips_set_pc): Change prototype to take a regcache. Adjust.
9832 (mips_reinsert_addr): Adjust.
9833 (mips_collect_register): Change prototype to take a regcache.
9834 Adjust.
9835 (mips_supply_register):
9836 (mips_collect_register_32bit, mips_supply_register_32bit)
9837 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9838 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9839 * linux-ppc-low.c (ppc_supply_ptrace_register)
9840 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9841 (parse_spufs_run): Adjust.
9842 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9843 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9844 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9845 take a regcache. Adjust.
9846 * linux-s390-low.c (s390_collect_ptrace_register)
9847 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9848 (s390_set_pc): Change prototype to take a regcache. Adjust.
9849 (s390_arch_setup): Adjust.
9850 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9851 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9852 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9853 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9854 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9855 regcache. Adjust.
9856 (sparc_breakpoint_at): Adjust.
9857 * linux-xtensa-low.c (xtensa_fill_gregset):
9858 (xtensa_store_gregset):
9859 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9860 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9861 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9862 prototype to take a regcache. Adjust.
9863 * win32-arm-low.c (arm_fetch_inferior_register)
9864 (arm_store_inferior_register): Change prototype to take a
9865 regcache. Adjust.
9866 * win32-i386-low.c (i386_fetch_inferior_register)
9867 (i386_store_inferior_register): Change prototype to take a
9868 regcache. Adjust.
9869 * win32-low.c (child_fetch_inferior_registers)
9870 (child_store_inferior_registers): Change prototype to take a
9871 regcache. Adjust.
9872 (win32_wait): Adjust.
9873 (win32_fetch_inferior_registers): Change prototype to take a
9874 regcache. Adjust.
9875 (win32_store_inferior_registers): Adjust.
9876 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9877 store_inferior_register>: Change prototype to take a regcache.
9878
60c3d7b0
DE
98792010-01-20 Doug Evans <dje@google.com>
9880
9881 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9882 #ifdef.
9883 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9884 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9885
dc146f7c
VP
98862010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9887
9888 * linux-low.c (linux_core_of_thread): New.
9889 (compare_ints, show_process, list_threads): New.
9890 (linux_qxfer_osdata): Report threads and cores.
9891 (linux_target_op): Register linux_core_of_thread.
9892 * remote-utils.c (prepare_resume_reply): Report the core.
9893 (buffer_xml_printf): Support %d specifier.
9894 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9895 New.
9896 (handle_query): Handle qXfer:threads. Announce availability
9897 thereof.
9898 * target.h (struct target_ops): New field core_of_thread.
9899
7803799a
UW
99002010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9901
9902 * Makefile.in (clean): Remove new generated files.
9903 (reg-s390.o, reg-s390.c): Remove rules.
9904 (reg-s390x.o, reg-s390x.c): Likewise.
9905 (s390-linux32.o, s390-linux32.c): Add rules.
9906 (s390-linux64.o, s390-linux64.c): Likewise.
9907 (s390x-linux64.o, s390x-linux64.c): Likewise.
9908 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9909 * linux-s390-low.c: Include <elf.h>.
9910 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9911 (init_registers_s390): Remove prototype.
9912 (init_registers_s390x): Likewise.
9913 (init_registers_s390_linux32): Add prototype.
9914 (init_registers_s390_linux64): Likewise.
9915 (init_registers_s390x_linux64): Likewise.
9916 (s390_num_regs_3264): New define.
9917 (s390_regmap_3264): New global variable.
9918 (s390_cannot_fetch_register): Remove obsolete check.
9919 (s390_cannot_store_register): Likewise.
9920 (s390_collect_ptrace_register): Handle upper/lower register halves.
9921 (s390_supply_ptrace_register): Likewise.
9922 (s390_fill_gregset): Update to register number changes.
9923 (s390_get_hwcap): New routine.
9924 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9925 Install appropriate regmap and register set.
9926
6e7ffa39
JB
99272010-01-01 Joel Brobecker <brobecker@adacore.com>
9928
9929 * server.c (gdbserver_version): Update copyright year to 2010.
9930 * gdbreplay.c (gdbreplay_version): Likewise.
9931
957f3f49
DE
99322009-12-28 Doug Evans <dje@google.com>
9933
9934 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9935 elf/external.h. Include <elf.h> instead but only if necessary.
9936
ca5c370d
PA
99372009-12-28 Pedro Alves <pedro@codesourcery.com>
9938
9939 * linux-low.c (linux_remove_process): Remove `detaching'
9940 parameter. Don't release/detach from thread_db here.
9941 (linux_kill): Release/detach from thread_db here, ...
9942 (linux_detach): ... and here, before actually detaching.
9943 (linux_wait_1): ... and here, when a process exits.
9944 * thread-db.c (any_thread_of): New.
9945 (thread_db_free): Switch the current inferior to a thread of the
9946 passed in process.
9947
4ee62156
DE
99482009-12-21 Doug Evans <dje@google.com>
9949
d90e6a88
DE
9950 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9951
c5f62d5f
DE
9952 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9953 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9954 warning ifndef __NR_tkill. Move setting of errno there too.
9955 Delete unnecessary resetting of errno after syscall.
9956 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9957
10e86dd7
DE
9958 * configure.ac: Check for dladdr.
9959 * config.in: Regenerate.
9960 * configure: Regenerate.
9961 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9962 (try_thread_db_load): Update.
9963
4ee62156
DE
9964 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9965
00f515da
DE
99662009-12-18 Doug Evans <dje@google.com>
9967
e9464885
DE
9968 * event-loop.c: Include unistd.h if it exists.
9969
07d4f67e
DE
9970 * linux-low.c (my_waitpid): Move definition away from being in
9971 between linux_tracefork_child/linux_test_for_tracefork.
9972
00f515da
DE
9973 * gdb_proc_service.h (psaddr_t): Fix type.
9974 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9975 signature to match glibc.
9976
1de1badb
DE
99772009-12-16 Doug Evans <dje@google.com>
9978
9979 * linux-low.c (linux_read_memory): Fix argument to read.
9980
aeeb81d1
PA
99812009-11-26 Pedro Alves <pedro@codesourcery.com>
9982
9983 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9984 events, don't leave current_inferior pointing at null.
9985
10357975
PA
99862009-11-26 Pedro Alves <pedro@codesourcery.com>
9987
9988 * win32-low.c (LOG): Delete.
9989 (OUTMSG): Output to stderr.
9990 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9991 on compile time LOG macro.
9992 (win32_wait): Fix debug output.
9993
cf6e3471
PA
99942009-11-26 Pedro Alves <pedro@codesourcery.com>
9995
9996 * win32-low.c (win32_add_one_solib): If the dll name is
9997 "ntdll.dll", prepend the system directory to the dll path.
9998
0c85e18e
MK
99992009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10000
10001 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10002
9ac544ce 100032009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10004 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10005
10006 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10007 * configure.ac: Check for __mcoldfire__ and set
10008 gdb_cv_m68k_is_coldfire.
10009 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10010 reg-cf.o and reg-m68k.o.
10011 * configure: Regenerated.
10012
fd7dd3e6
PA
100132009-11-16 Pedro Alves <pedro@codesourcery.com>
10014
10015 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10016 Pass it to thread_db_free.
10017 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10018 proper `detaching' argument to linux_remove_process.
10019 * linux-low.h (thread_db_free): Add `detaching' parameter.
10020 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10021 to thread_db_free.
10022 (thread_db_free): Add `detaching' parameter. Only
10023 call td_ta_clear_event if detaching from process.
10024
75aa492e
MK
100252009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10026
10027 * thread-db.c (thread_db_free): Fix typo.
10028
21e1bee4
PP
100292009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10030
10031 PR gdb/10838
10032 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10033
8838b45e
NS
100342009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10035
10036 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10037 with an i686 compiler.
10038 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10039 needed.
10040 * configure: Rebuilt.
10041
8a35fb51
SL
100422009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10043
10044 PR gdb/10783
10045
10046 * server.c (handle_search_memory_1): Correct read_addr initialization
10047 in loop for searching subsequent chunks.
10048
96f15937
PP
100492009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10050
10051 * configure.ac: New --with-libthread-db option.
10052 * thread-db.c: Allow direct dependence on libthread_db.
10053 (thread_db_free): Adjust.
10054 * config.in: Regenerate.
10055 * configure: Likewise.
889bf7c5 10056
5f7d1694
PP
100572009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10058
10059 PR gdb/10757
10060 * thread-db.c (attach_thread): New function.
10061 (maybe_attach_thread): Return success/failure.
10062 (find_new_threads_callback): Adjust.
889bf7c5
PA
10063 (thread_db_find_new_threads): Loop until no new threads.
10064
88e3b899
PA
100652009-10-13 Pedro Alves <pedro@codesourcery.com>
10066
10067 * proc-service.c (ps_lgetregs): Formatting.
10068
cdbfd419
PP
100692009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10070
10071 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10072 * configure.ac: Adjust.
10073 * linux-low.h (struct process_info_private): Move members to struct
10074 thread_db.
10075 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10076 * linux-low.c (linux_remove_process): Adjust.
10077 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10078 * server.c (handle_query): Move code ...
10079 (handle_monitor_command): ... here. New function.
10080 * target.h (struct target_ops): New member.
10081 * thread-db.c (struct thread_db): New.
10082 (libthread_db_search_path): New variable.
10083 (thread_db_create_event, thread_db_enable_reporting)
10084 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10085 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10086 (try_thread_db_load_1, dladdr_to_soname): New functions.
10087 (try_thread_db_load, thread_db_load_search): New functions.
10088 (thread_db_init): Search for libthread_db.
10089 (thread_db_free): New function.
10090 (thread_db_handle_monitor_command): Likewise.
10091 * config.in: Regenerate.
10092 * configure: Regenerate.
889bf7c5 10093
4168d2d6
UW
100942009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10095
10096 * spu-low.c (spu_kill): Wait for inferior to terminate.
10097 Call clear_inferiors.
10098 (spu_detach): Call clear_inferiors.
10099
81ecdfbb
RW
101002009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10101
10102 * aclocal.m4: Regenerate.
10103 * config.in: Likewise.
10104 * configure: Likewise.
10105
0b9ff2c0
UW
101062009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10107
10108 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10109 (parse_spufs_run): New function.
10110 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10111 (ppc_breakpoint_at): Handle SPU breakpoints.
10112
efcbbd14
UW
101132009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10114
10115 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10116 (SPUFS_MAGIC): Define.
10117 (spu_enumerate_spu_ids): New function.
10118 (linux_qxfer_spu): New function.
10119 (linux_target_ops): Install linux_qxfer_spu.
10120
f4d9bade
UW
101212009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10122
10123 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10124 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10125 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10126 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10127 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10128 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10129 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10130 (init_registers_powerpc_cell32l): Add prototype.
10131 (init_registers_powerpc_cell64l): Likewise.
10132 (ppc_arch_setup): Detect Cell/B.E. architecture.
10133
96e946ca
RW
101342009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10135
10136 * Makefile.in (datarootdir): New variable.
10137
58d6951d
DJ
101382009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10139
10140 * linux-low.c (linux_write_memory): Update debugging output.
10141 * Makefile.in (clean): Add new descriptions.
10142 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10143 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10144 * configure.srv: Add new files for arm*-*-linux*.
10145 * linux-arm-low.c: Add new declarations.
10146 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10147 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10148 (HWCAP_VFPv3D16): New.
10149 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10150 instead of __IWMMXT__.
10151 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10152 (arm_arch_setup): New.
10153 (target_regsets): Remove #ifdef. Add VFP regset.
10154 (the_low_target): Use arm_arch_setup.
10155
12b42a12
DJ
101562009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10157
10158 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10159 the main thread again.
10160
ac8c974e
AR
101612009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10162
10163 Adding Neutrino gdbserver.
10164 * configure: Regenerated.
10165 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10166 * configure.srv (i[34567]86-*-nto*): New target.
10167 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10168 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10169 (nto_comctrl) [__QNX__]: New function.
10170 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10171
4424e0c3 101722009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10173
10174 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10175 srv_tgtobj.
10176
912cf4ba
PA
101772009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10178 Pedro Alves <pedro@codesourcery.com>
10179
10180 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10181 don't support CONTEXT_EXTENDED_REGISTERS.
10182 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10183 (the_low_target): Install them.
10184 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10185 failing with ERROR_PIPE_NOT_CONNECTED.
10186
aa5ca48f
DE
101872009-06-30 Doug Evans <dje@google.com>
10188 Pierre Muller <muller@ics.u-strasbg.fr>
10189
10190 Add h/w watchpoint support to x86-linux, win32-i386.
10191 * Makefile.in (SFILES): Add i386-low.c
10192 (i386_low_h): Define.
10193 (i386-low.o): Add dependencies.
10194 (linux-x86-low.o): Add i386-low.h dependency.
10195 (win32-i386-low.o): Ditto.
10196 * i386-low.c: New file.
10197 * i386-low.h: New file.
10198 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10199 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10200 * linux-low.c (linux_add_process): Initialize arch_private.
10201 (linux_remove_process): Free arch_private.
10202 (add_lwp): Initialize arch_private.
10203 (delete_lwp): Free arch_private.
10204 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10205 provided.
10206 * linux-low.h (process_info_private): New member arch_private.
10207 (lwp_info): New member arch_private.
10208 (linux_target_ops): New members new_process, new_thread,
10209 prepare_to_resume.
10210 (ptid_of): New macro.
10211 * linux-x86-low.c: Include stddef.h, i386-low.h.
10212 (arch_process_info): New struct.
10213 (arch_lwp_info): New struct.
10214 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10215 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10216 (i386_dr_low_get_status): New function.
10217 (x86_insert_point, x86_remove_point): New functions.
10218 (x86_stopped_by_watchpoint): New function.
10219 (x86_stopped_data_address): New function.
10220 (x86_linux_new_process, x86_linux_new_thread): New functions.
10221 (x86_linux_prepare_to_resume): New function.
10222 (the_low_target): Add entries for insert_point, remove_point,
10223 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10224 prepare_to_resume.
10225 * server.c (debug_hw_points): New global.
10226 (monitor_show_help): Document set debug-hw-points.
10227 (handle_query): Process "set debug-hw-points".
10228 * server.h (debug_hw_points): Declare.
10229 (paddress): Declare.
10230 * utils.c (NUMCELLS, CELLSIZE): New macros.
10231 (get_sell, xsnprintf, paddress): New functions.
10232 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10233 remove_point, stopped_by_watchpoint, stopped_data_address.
10234 * win32-i386-low.c: Include i386-low.h.
10235 (debug_reg_state): Replaces dr.
10236 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10237 (i386_dr_low_get_status): New function.
10238 (i386_insert_point, i386_remove_point): New functions.
10239 (i386_stopped_by_watchpoint): New function.
10240 (i386_stopped_data_address): New function.
10241 (i386_initial_stuff): Update.
10242 (get_thread_context,set_thread_context,i386_thread_added): Update.
10243 (the_low_target): Add entries for insert_point,
10244 remove_point, stopped_by_watchpoint, stopped_data_address.
10245 * win32-low.c (win32_insert_watchpoint): New function.
10246 (win32_remove_watchpoint): New function.
10247 (win32_stopped_by_watchpoint): New function.
10248 (win32_stopped_data_address): New function.
10249 (win32_target_ops): Add entries for insert_watchpoint,
10250 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10251 * win32-low.h (win32_target_ops): New members insert_point,
10252 remove_point, stopped_by_watchpoint, stopped_data_address.
10253
d993e290
PA
102542009-06-25 Pedro Alves <pedro@codesourcery.com>
10255
10256 * server.c (process_serial_event): Re-return unsupported, not
10257 error, if the type isn't recognized. Re-allow supporting only
10258 insert or remove packets. Also call require_running for
10259 breakpoints. Add missing break statement to default case. Tidy.
10260 * target.h (struct target_ops): Rename insert_watchpoint to
10261 insert_point, and remove_watchpoint to remove_point.
10262
10263 * linux-low.h (struct linux_target_ops): Likewise.
10264 * linux-low.c (linux_insert_watchpoint): Rename to ...
10265 (linux_insert_point): ... this. Adjust.
10266 (linux_remove_watchpoint): Rename to ...
10267 (linux_remove_point): ... this. Adjust.
10268 (linux_target_ops): Adjust.
10269 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10270 (cris_insert_point): ... this.
10271 (cris_remove_watchpoint): Rename to ...
10272 (cris_remove_point): ... this.
10273 (the_low_target): Adjust.
10274
0f54c268
PM
102752009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10276
10277 * server.c (handle_v_kill): Pass signal_pid to
10278 kill_inferior if multi_process is zero.
10279
c6314022
AR
102802009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10281
10282 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10283 * target.h (target_ops): Comment for *_watchpoint to make it clear
10284 the functions can get types '0' and '1'.
10285
4463ce24
AR
102862009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10287
10288 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10289 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10290 * regcache.c (get_regcache): Likewise.
10291 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10292 * win32-low.c (child_fetch_inferior_registers): Remove check for
10293 regno 0.
10294
cf8fd78b
PA
102952009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10296 Pedro Alves <pedro@codesourcery.com>
10297
10298 * target.h (struct target_ops) <supports_multi_process>: New
10299 callback.
10300 (target_supports_multi_process): New.
10301 * server.c (handle_query): Even if GDB reports support, only
10302 enable multi-process if the target also supports it. Report
10303 multi-process support only if the target backend supports it.
10304 * linux-low.c (linux_supports_multi_process): New function.
10305 (linux_target_ops): Install it as target_supports_multi_process
10306 callback.
10307
47c0c975
DE
103082009-05-24 Doug Evans <dje@google.com>
10309
e09875d4
DE
10310 Global renaming of find_thread_pid to find_thread_ptid.
10311 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10312 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10313 All callers updated.
10314
e27d73f6
DE
10315 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10316 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10317 directly.
10318
47c0c975
DE
10319 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10320 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10321 (linux_resume_one_lwp): Ditto.
10322
2acc282a
DE
103232009-05-23 Doug Evans <dje@google.com>
10324
10325 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10326 from struct inferior_list_entry * to struct lwp_info *.
10327 All callers updated.
10328
9f1036c1
DE
103292009-05-13 Doug Evans <dje@google.com>
10330
10331 * linux-x86-low.c: Don't include assert.h.
10332 (x86_siginfo_fixup): Use fatal, not assert.
10333 (x86_arch_setup): Fix comment.
10334
d0722149
DE
103352009-05-12 Doug Evans <dje@google.com>
10336
10337 Biarch support for i386/amd64 gdbserver.
10338 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10339 Add linux-x86-low.c.
10340 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10341 (linux-x86-low.o): Add.
10342 * linux-x86-64-low.c: Delete.
10343 * linux-i386-low.c: Delete.
10344 * linux-x86-low.c: New file.
10345 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10346 linux-x86-low.o.
10347 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10348 linux-x86-low.o.
10349 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10350 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10351 (linux_child_pid_to_exec_file): New function.
10352 (elf_64_header_p, elf_64_file_p): New functions.
10353 (siginfo_fixup): New function.
10354 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10355 give target a chance to convert layout.
10356 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10357 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10358
fdeb2a12
DE
103592009-05-07 Doug Evans <dje@google.com>
10360
10361 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10362 (regsets_store_inferior_registers): Ditto.
10363
a6dbe5df
PA
103642009-05-06 Pedro Alves <pedro@codesourcery.com>
10365
10366 PR server/10048
10367
10368 * linux-low.c (must_set_ptrace_flags): Delete.
10369 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10370 of the global.
10371 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10372 `lwp->must_set_ptrace_flags' instead.
ba42693b 10373 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10374 (linux_wait_1): ... not here.
10375
5091eb23
DE
103762009-04-30 Doug Evans <dje@google.com>
10377
9f767825
DE
10378 * inferiors.c (started_inferior_callback): New function.
10379 (attached_inferior_callback): New function.
10380 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10381 * server.c (print_started_pid, print_attached_pid): New functions.
10382 (detach_or_kill_for_exit): New function.
10383 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10384 * server.h (have_started_inferiors_p): Declare.
10385 (have_attached_inferiors_p): Declare.
10386
5091eb23
DE
10387 * inferiors.c (remove_process): Fix memory leak, free process.
10388 * linux-low.c (linux_remove_process): New function.
10389 (linux_kill): Call it instead of remove_process.
10390 (linux_detach, linux_wait_1): Ditto.
10391
155c8968
PA
103922009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10393
10394 * configure.srv: Add x86 Windows CE target.
10395
7fe519cb
UW
103962009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10397
10398 * inferiors.c (get_thread_process): Make global.
10399 * server.h (get_thread_process): Add prototype.
10400 * thread-db.c (find_one_thread): Use get_thread_process
10401 instead of current_process.
10402 (thread_db_get_tls_address): Do not crash if called when
10403 thread layer is not yet initialized.
10404
5472f405
UW
104052009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10406
10407 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10408 * spu-low.c (current_tid): Rename to ...
10409 (current_ptid): ... this.
10410 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10411 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10412 ptid_get_lwp (current_ptid) instead of current_tid.
10413 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10414 instead of current_tid. Use find_process_pid to verify pid
10415 argument is valid. Pass proper argument to remove_process.
10416 (spu_thread_alive): Compare current_ptid instead of current_tid.
10417 (spu_resume): Likewise.
10418
55ac2b99
PA
104192009-04-02 Pedro Alves <pedro@codesourcery.com>
10420
10421 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10422 variable.
10423
95954743
PA
104242009-04-01 Pedro Alves <pedro@codesourcery.com>
10425
10426 Implement the multiprocess extensions, and add linux multiprocess
10427 support.
10428
10429 * server.h (ULONGEST): Declare.
10430 (struct ptid, ptid_t): New.
10431 (minus_one_ptid, null_ptid): Declare.
10432 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10433 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10434 (struct inferior_list_entry): Change `id' type from unsigned from
10435 to ptid_t.
10436 (struct sym_cache, struct breakpoint, struct
10437 process_info_private): Forward declare.
10438 (struct process_info): Declare.
10439 (current_process): Declare.
10440 (all_processes): Declare.
10441 (initialize_inferiors): Declare.
10442 (add_thread): Adjust to use ptid_t.
10443 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10444 (add_process, remove_process, find_thread_pid): Declare.
10445 (find_inferior_id): Adjust to use ptid_t.
10446 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10447 (multi_process): Declare.
10448 (push_event): Adjust to use ptid_t.
10449 (read_ptid, write_ptid): Declare.
10450 (prepare_resume_reply): Adjust to use ptid_t.
10451 (clear_symbol_cache): Declare.
10452 * inferiors.c (all_processes): New.
10453 (null_ptid, minus_one_ptid): New.
10454 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10455 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10456 (add_thread): Change unsigned long to ptid. Remove gdb_id
10457 parameter. Adjust.
10458 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10459 (gdb_id_to_thread): Rename to ...
10460 (find_thread_pid): ... this. Change unsigned long to ptid.
10461 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10462 (loaded_dll, pull_pid_from_list): Adjust.
10463 (add_process, remove_process, find_process_pid)
10464 (get_thread_process, current_process, initialize_inferiors): New.
10465 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10466 (struct target_waitstatus) <related_pid>: Ditto.
10467 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10468 return type to int.
10469 (struct target_ops) <join>: Add `pid' argument.
10470 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10471 (struct target_ops) <wait>: Add `ptid' field. Change return type
10472 to ptid.
10473 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10474 (mywait): Add `ptid' argument. Change return type to ptid_t.
10475 (target_pid_to_str): Declare.
10476 * target.c (set_desired_inferior): Adjust to use ptids.
10477 (mywait): Add new `ptid' argument. Adjust.
10478 (target_pid_to_str): New.
10479 * mem-break.h (free_all_breakpoints): Declare.
10480 * mem-break.c (breakpoints): Delelete.
10481 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10482 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10483 to use per-process breakpoint list.
10484 (free_all_breakpoints): New.
10485 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10486 (symbol_cache, all_symbols_looked_up): Delete.
10487 (hexchars): New.
10488 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10489 read_ptid): New.
10490 (prepare_resume_reply): Change ptid argument's type from unsigned
10491 long to ptid_t. Adjust. Implement W;process and X;process.
10492 (free_sym_cache, clear_symbol_cache): New.
10493 (look_up_one_symbol): Adjust to per-process symbol cache. *
10494 * server.c (cont_thread, general_thread, step_thread): Change type
10495 to ptid_t.
10496 (attached): Delete.
10497 (multi_process): New.
10498 (last_ptid): Change type to ptid_t.
10499 (struct vstop_notif) <ptid>: Change type to ptid_t.
10500 (queue_stop_reply, push_event): Change `ptid' argument's type to
10501 ptid_t.
10502 (discard_queued_stop_replies): Add `pid' argument.
10503 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10504 changes. Don't reference the `attached' global.
10505 (attach_inferior): Adjust to mywait interface changes.
10506 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10507 features. Handle and report "multiprocess+". Handle
10508 "qAttached:PID".
10509 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10510 changes.
10511 (handle_v_kill): New.
10512 (handle_v_stopped): Adjust to use target_pid_to_str.
10513 (handle_v_requests): Allow multiple attaches and runs when
10514 multiprocess extensions are in effect. Handle "vKill".
10515 (myresume): Adjust to use ptids.
10516 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10517 (handle_status): Adjust to discard_queued_stop_replies interface
10518 change.
10519 (first_thread_of, kill_inferior_callback)
10520 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10521 (main): Call initialize_inferiors. Adjust to use ptids, killing
10522 and detaching from all inferiors. Handle multiprocess packet
10523 variants.
10524 * linux-low.h: Include gdb_proc_service.h.
10525 (struct process_info_private): New.
10526 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10527 <lwpid_of>: Use ptid_get_lwp.
10528 (get_lwp_thread): Adjust.
10529 (struct lwp_info): Add `dead' member.
10530 (find_lwp_pid): Declare.
10531 * linux-low.c (thread_db_active): Delete.
10532 (new_inferior): Adjust comment.
10533 (inferior_pid): Delete.
10534 (linux_add_process): New.
10535 (handle_extended_wait): Adjust.
10536 (add_lwp): Change unsigned long to ptid.
10537 (linux_create_inferior): Add process to processes table. Adjust
10538 to use ptids. Don't set new_inferior here.
10539 (linux_attach_lwp): Rename to ...
10540 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10541 it. Adjust to use ptids.
10542 (linux_attach_lwp): New.
10543 (linux_attach): Add process to processes table. Don't set
10544 new_inferior here.
10545 (struct counter): New.
10546 (second_thread_of_pid_p, last_thread_of_process_p): New.
10547 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10548 multiple processes.
10549 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10550 processes. Remove process from process table.
10551 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10552 to multiple processes.
10553 (any_thread_of): New.
10554 (linux_detach): Add `pid' argument, and handle it. Remove process
10555 from processes table.
10556 (linux_join): Add `pid' argument. Handle it.
10557 (linux_thread_alive): Change unsighed long argument to ptid_t.
10558 Consider dead lwps as not being alive.
10559 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10560 threads we're not interested in.
10561 (same_lwp, find_lwp_pid): New.
10562 (linux_wait_for_lwp): Change `pid' argument's type from int to
10563 ptid_t. Adjust.
10564 (linux_wait_for_event): Rename to ...
10565 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10566 from int to ptid_t. Adjust.
10567 (linux_wait_for_event): New.
10568 (linux_wait_1): Add `ptid' argument. Change return type to
10569 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10570 that exit from the process table.
10571 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10572 Adjust.
10573 (mark_lwp_dead): New.
10574 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10575 stopping all threads, mark its main lwp as dead.
10576 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10577 ptids.
10578 (fetch_register, usr_store_inferior_registers)
10579 (regsets_fetch_inferior_registers)
10580 (regsets_store_inferior_registers, linux_read_memory)
10581 (linux_write_memory): Inline `inferior_pid'.
10582 (linux_look_up_symbols): Adjust to use per-process
10583 `thread_db_active'.
10584 (linux_request_interrupt): Adjust to use ptids.
10585 (linux_read_auxv): Inline `inferior_pid'.
10586 (initialize_low): Don't reference thread_db_active.
10587 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10588 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10589 (ps_getpid): Return the pid of the current inferior.
10590 * thread-db.c (proc_handle, thread_agent): Delete.
10591 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10592 per-process data.
10593 (find_one_thread): Change argument type to ptid_t. Adjust to
10594 per-process data.
10595 (maybe_attach_thread): Adjust to per-process data and ptids.
10596 (thread_db_find_new_threads): Ditto.
10597 (thread_db_init): Ditto.
10598 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10599 processes table. Adjust to use ptids.
10600 (spu_kill, spu_detach): Adjust interface. Remove process from
10601 processes table.
10602 (spu_join, spu_thread_alive): Adjust interface.
10603 (spu_wait): Adjust interface. Remove process from processes
10604 table. Adjust to use ptids.
10605 * win32-low.c (current_inferior_tid): Delete.
10606 (current_inferior_ptid): New.
10607 (debug_event_ptid): New.
10608 (thread_rec): Take a ptid. Adjust.
10609 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10610 (child_delete_thread): Ditto.
10611 (do_initial_child_stuff): Add `attached' argument. Add process to
10612 processes table.
10613 (child_fetch_inferior_registers, child_store_inferior_registers):
10614 Adjust.
10615 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10616 (win32_attach): Pass 1 to do_initial_child_stuff.
10617 (win32_kill): Adjust interface. Remove process from processes
10618 table.
10619 (win32_detach): Ditto.
10620 (win32_join): Adjust interface.
10621 (win32_thread_alive): Take a ptid.
10622 (win32_resume): Adjust to use ptids.
10623 (get_child_debug_event): Ditto.
10624 (win32_wait): Adjust interface. Remove exiting process from
10625 processes table.
10626
bd99dc85
PA
106272009-04-01 Pedro Alves <pedro@codesourcery.com>
10628
10629 Non-stop mode support.
10630
10631 * server.h (non_stop): Declare.
10632 (gdb_client_data, handler_func): Declare.
10633 (delete_file_handler, add_file_handler, start_event_loop):
10634 Declare.
10635 (handle_serial_event, handle_target_event, push_event)
10636 (putpkt_notif): Declare.
10637 * target.h (enum resume_kind): New.
10638 (struct thread_resume): Replace `step' field by `kind' field.
10639 (TARGET_WNOHANG): Define.
10640 (struct target_ops) <wait>: Add `options' argument.
10641 <supports_non_stop, async, start_non_stop>: New fields.
10642 (target_supports_non_stop, target_async): New.
10643 (start_non_stop): Declare.
10644 (mywait): Add `options' argument.
10645 * target.c (mywait): Add `options' argument. Print child exit
10646 notifications here.
10647 (start_non_stop): New.
10648 * server.c (non_stop, own_buf, mem_buf): New globals.
10649 (struct vstop_notif): New.
10650 (notif_queue): New global.
10651 (queue_stop_reply, push_event, discard_queued_stop_replies)
10652 (send_next_stop_reply): New.
10653 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10654 interface changes.
10655 (attach_inferior): In non-stop mode, don't wait for the target
10656 here.
10657 (handle_general_set): Handle QNonStop.
10658 (handle_query): When handling qC, return the current general
10659 thread, instead of the first thread of the list.
10660 (handle_query): If the backend supports non-stop mode, include
10661 QNonStop+ in the qSupported query response.
10662 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10663 and non-stop mode.
10664 (handle_v_attach, handle_v_run): Handle non-stop mode.
10665 (handle_v_stopped): New.
10666 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10667 (myresume): Adjust to use resume_kind. Handle non-stop.
10668 (queue_stop_reply_callback): New.
10669 (handle_status): Handle non-stop mode.
10670 (main): Clear non_stop flag on reconnection. Use the event-loop.
10671 Refactor serial protocol handling from here ...
10672 (process_serial_event): ... to this new function. When GDB
10673 selects any thread, select one here. In non-stop mode, wait until
10674 GDB acks all pending events before exiting.
10675 (handle_serial_event, handle_target_event): New.
10676 * remote-utils.c (remote_open): Install remote_desc in the event
10677 loop.
10678 (remote_close): Remove remote_desc from the event loop.
10679 (putpkt_binary): Rename to...
10680 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10681 (putpkt_binary): New as wrapper around putpkt_binary_1.
10682 (putpkt_notif): New.
10683 (prepare_resume_reply): In non-stop mode, don't change the
10684 general_thread.
10685 * event-loop.c: New.
10686 * Makefile.in (OBJ): Add event-loop.o.
10687 (event-loop.o): New rule.
10688
10689 * linux-low.h (pid_of): Moved here.
10690 (lwpid_of): New.
10691 (get_lwp_thread): Use lwpid_of.
10692 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10693 * linux-low.c (pid_of): Delete.
10694 (inferior_pid): Use lwpid_of.
10695 (linux_event_pipe): New.
10696 (target_is_async_p): New.
10697 (delete_lwp): New.
10698 (handle_extended_wait): Use lwpid_of.
10699 (add_lwp): Don't set lwpid field.
10700 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10701 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10702 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10703 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10704 first. Adjust to linux_wait_for_event interface changes. Use
10705 lwpid_of.
10706 (linux_detach): Don't delete the main lwp here.
10707 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10708 (status_pending_p): Don't consider explicitly suspended lwps.
10709 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10710 pointer. Add OPTIONS argument. Change return type to int. Use
10711 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10712 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10713 pointer. Add status pointer argument. Return a pid instead of a
10714 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10715 changes. In non-stop mode, don't switch to a random thread.
10716 (linux_wait): Rename to...
10717 (linux_wait_1): ... this. Add target_options argument, and handle
10718 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10719 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10720 clean exit and signal exit code. Don't stop all threads in
10721 non-stop mode. In all-stop mode, only stop all threads when
10722 reporting a stop to GDB. Handle explicit thread stop requests.
10723 (async_file_flush, async_file_mark): New.
10724 (linux_wait): New.
10725 (send_sigstop): Use lwpid_of.
10726 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10727 interface changes. In non-stop mode, don't switch to a random
10728 thread.
10729 (linux_resume_one_lwp): Use lwpid_of.
10730 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10731 (linux_resume_one_thread): ... this. Handle resume_stop. In
10732 non-stop mode, don't look for pending flag in all threads.
10733 (resume_status_pending_p): Don't consider explicitly suspended
10734 threads.
10735 (my_waitpid): Reimplement. Emulate __WALL.
10736 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10737 Use lwpid_of.
10738 (sigchld_handler, linux_supports_non_stop, linux_async)
10739 (linux_start_non_stop): New.
10740 (linux_target_ops): Register linux_supports_non_stop, linux_async
10741 and linux_start_non_stop.
10742 (initialize_low): Install SIGCHLD handler.
10743 * thread-db.c (thread_db_create_event, find_one_thread)
10744 (thread_db_get_tls_address): Use lwpid_of.
10745 * win32-low.c (win32_detach): Adjust to use resume_kind.
10746 (win32_wait): Add `options' argument.
10747 * spu-low.c (spu_resume): Adjust to use resume_kind.
10748 (spu_wait): Add `options' argument.
10749
5b1c542e
PA
107502009-04-01 Pedro Alves <pedro@codesourcery.com>
10751
10752 Decouple target code from remote protocol.
10753
10754 * target.h (enum target_waitkind): New.
10755 (struct target_waitstatus): New.
10756 (struct target_ops) <wait>: Return an unsigned long. Take a
10757 target_waitstatus pointer instead of a char pointer.
10758 (mywait): Likewise.
10759 * target.c (mywait): Change prototype to return an unsigned long.
10760 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10761 * server.h (thread_from_wait, old_thread_from_wait): Delete
10762 declarations.
10763 (prepare_resume_reply): Change prototype to take a
10764 target_waitstatus.
10765 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10766 (last_status, last_ptid): New.
10767 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10768 pid instead of a signal.
10769 (attach_inferior): Remove "status" and "signal" parameters.
10770 Adjust.
10771 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10772 not as an address.
10773 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10774 (handle_v_requests, myresume): Remove "status" and "signal"
10775 parameters. Adjust.
10776 (handle_status): New.
10777 (main): Delete local `status'. Adjust.
10778 * remote-utils.c: Include target.h.
10779 (prepare_resume_reply): Change prototype to take a
10780 target_waitstatus. Adjust.
10781
10782 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10783 interface.
10784 * spu-low.c (spu_wait): Adjust.
10785 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10786 Delete.
10787 (win32_wait): Adjust.
10788
2bd7c093
PA
107892009-04-01 Pedro Alves <pedro@codesourcery.com>
10790
10791 * target.h (struct thread_resume): Delete leave_stopped member.
10792 (struct target_ops): Add a `n' argument to the `resume' callback.
10793 * server.c (start_inferior): Adjust.
10794 (handle_v_cont, myresume): Adjust.
10795 * linux-low.c (check_removed_breakpoint): Adjust to resume
10796 interface change, and to removed leave_stopped field.
10797 (resume_ptr): Delete.
10798 (struct thread_resume_array): New.
10799 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10800 resume interface change.
10801 (linux_continue_one_thread, linux_queue_one_thread)
10802 (resume_status_pending_p): Check if the resume field is NULL
10803 instead of checking the leave_stopped member.
10804 (linux_resume): Adjust to the target resume interface change.
10805 * spu-low.c (spu_resume): Adjust to the target resume interface
10806 change.
10807 * win32-low.c (win32_detach, win32_resume): Ditto.
10808
c35fafde
PA
108092009-04-01 Pedro Alves <pedro@codesourcery.com>
10810
10811 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10812 flag.
10813 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10814 pending.
10815 (linux_continue_one_thread): Only preserve the stepping flag if
10816 there's a pending breakpoint.
10817
0a59d50b
PA
108182009-03-31 Pedro Alves <pedro@codesourcery.com>
10819
10820 * server.c (main): After the inferior having exited, call
10821 remote_close before exiting gdbserver.
10822
f04c6d38
TJB
108232009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10824
10825 Fix size of FPSCR in Power 7 processors.
10826 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10827 (PPC_FEATURE_HAS_DFP): New #define.
10828 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10829 size of the FPSCR.
10830
78e5cee6
PA
108312009-03-23 Pedro Alves <pedro@codesourcery.com>
10832
10833 * server.c (handle_query) Whitespace and formatting.
10834
1b3f6016
PA
108352009-03-22 Pedro Alves <pedro@codesourcery.com>
10836
10837 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10838 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10839 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10840 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10841 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10842 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10843 Makefile.in, configure.ac: Fix whitespace throughout.
10844 * configure: Regenerate.
10845
a07b2135
PA
108462009-03-22 Pedro Alves <pedro@codesourcery.com>
10847
10848 * inferiors.c (find_inferior): Make it safe for the callback
10849 function to delete the currently iterated inferior.
10850
67cc2626
PA
108512009-03-22 Pedro Alves <pedro@codesourcery.com>
10852
10853 * Makefile.in (linuw_low_h): Move higher.
10854 (thread-db.o): Depend on $(linux_low_h).
10855
54a0b537
PA
108562009-03-17 Pedro Alves <pedro@codesourcery.com>
10857
10858 Rename "process" to "lwp" throughout.
10859
10860 * linux-low.c (all_processes): Rename to...
10861 (all_lwps): ... this.
10862 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10863 (add_process): Rename to ...
10864 (add_lwp): ... this. Adjust.
10865 (linux_create_inferior): Adjust.
10866 (linux_attach_lwp): Adjust.
10867 (linux_attach): Adjust.
10868 (linux_kill_one_process): Rename to ...
10869 (linux_kill_one_lwp): ... this. Adjust.
10870 (linux_kill): Adjust.
10871 (linux_detach_one_process): Rename to ...
10872 (linux_detach_one_lwp): ... this. Adjust.
10873 (linux_detach): Adjust.
10874 (check_removed_breakpoint): Adjust.
10875 (status_pending_p): Adjust.
10876 (linux_wait_for_process): Rename to ...
10877 (linux_wait_for_lwp): ... this. Adjust.
10878 (linux_wait_for_event): Adjust.
10879 (send_sigstop): Adjust.
10880 (wait_for_sigstop): Adjust.
10881 (stop_all_processes): Rename to ...
10882 (stop_all_lwps): ... this.
10883 (linux_resume_one_process): Rename to ...
10884 (linux_resume_one_lwp): ... this. Adjust.
10885 (linux_set_resume_request, linux_continue_one_thread)
10886 (linux_queue_one_thread, resume_status_pending_p)
10887 (usr_store_inferior_registers, regsets_store_inferior_registers)
10888 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10889 Adjust.
10890 * linux-low.h (get_process): Rename to ...
10891 (get_lwp): ... this. Adjust.
10892 (get_thread_process): Rename to ...
10893 (get_thread_lwp): ... this. Adjust.
10894 (get_process_thread): Rename to ...
10895 (get_lwp_thread): ... this. Adjust.
10896 (struct process_info): Rename to ...
10897 (struct lwp_info): ... this.
10898 (all_processes): Rename to ...
10899 (all_lwps): ... this.
10900 * proc-service.c (ps_lgetregs): Adjust.
10901 * thread-db.c (thread_db_create_event, find_one_thread)
10902 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10903
0b16c5cf
PA
109042009-03-14 Pedro Alves <pedro@codesourcery.com>
10905
10906 * server.c (handle_query): Handle "qAttached".
10907
32de4b9d
NS
109082009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10909
10910 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10911 GPLv3, update license URL.
10912
2aecd87f
DE
109132009-03-01 Doug Evans <dje@google.com>
10914
93efd302 10915 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10916 (server_h): Add gdb_signals.h.
10917 (signals.o): Update.
10918 * server.h (target_signal_from_host,target_signal_to_host_p)
10919 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10920
86b1f9c5
PM
109212009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10922
10923 * remote-utils.c (getpkt): Also generate remote-debug
10924 information if noack_mode is set.
10925
4aa995e1
PA
109262009-02-06 Pedro Alves <pedro@codesourcery.com>
10927
10928 * server.c (handle_query): Report qXfer:siginfo:read and
10929 qXfer:siginfo:write as supported and handle them.
10930 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10931 * linux-low.c (linux_xfer_siginfo): New.
10932 (linux_target_ops): Set it.
10933
62709adf
PA
109342009-01-26 Pedro Alves <pedro@codesourcery.com>
10935
10936 * server.c (gdbserver_usage): Mention --remote-debug.
10937 (main): Accept '--remote-debug' switch.
10938
aef93bd7
DE
109392009-01-18 Doug Evans <dje@google.com>
10940
10941 * regcache.c (new_register_cache): No need to check result of xcalloc.
10942 * server.c (handle_search_memory): Back out calls to xmalloc,
10943 result is checked and error is returned to user upon failure.
10944 (handle_query): Ditto. Add more checks for result of malloc.
10945 (handle_v_cont): Check result of malloc, report error back to
10946 user upon failure.
10947 (handle_v_run): Ditto. Call freeargv.
10948 * server.h (freeargv): Declare.
10949 * utils.c (freeargv): New fn.
10950
54363045
DE
109512009-01-15 Doug Evans <dje@google.com>
10952
f626972c
DE
10953 * gdbreplay.c (perror_with_name): Make arg const char *.
10954 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10955 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10956 * utils.c (perror_with_name): Make arg const char *.
54363045 10957
18aae699
PA
109582009-01-14 Pedro Alves <pedro@codesourcery.com>
10959
10960 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10961 when handling a EXIT_PROCESS_DEBUG_EVENT.
10962
ff703abe
JB
109632009-01-06 Joel Brobecker <brobecker@adacore.com>
10964
10965 * gdbreplay.c (gdbreplay_version): Update copyright year.
10966 * server.c (gdbserver_version): Likewise.
10967
f21cc1a2 109682009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10969
10970 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10971 (handle_extended_wait): Improve comment.
0e21c1ec 10972
bca929d3
DE
109732008-12-13 Doug Evans <dje@google.com>
10974
10975 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10976 * server.h (ATTR_MALLOC): New macro.
10977 (xmalloc,xcalloc,xstrdup): Declare.
10978 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10979 * inferiors.c: Ditto.
10980 * linux-low.c: Ditto.
10981 * mem-break.c: Ditto.
10982 * regcache.c: Ditto.
10983 * remote-utils.c: Ditto.
10984 * server.c: Ditto.
10985 * target.c: Ditto.
10986 * win32-low.c: Ditto.
10987
97438e3f
DE
109882008-12-12 Doug Evans <dje@google.com>
10989
896c7fbb
DE
10990 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10991 in debugging printf.
10992
97438e3f
DE
10993 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10994
e3b886f8
DE
109952008-12-09 Doug Evans <dje@google.com>
10996
10997 * linux-low.h (struct process_info): Delete member tid, unused.
10998 * thread-db.c (find_one_thread): Update.
10999 (maybe_attach_thread): Update.
11000
07e059b5
VP
110012008-12-02 Pedro Alves <pedro@codesourcery.com>
11002
889bf7c5
PA
11003 * target.h (struct target_ops): Add qxfer_osdata member.
11004 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11005 and dirent.h.
11006 (linux_qxfer_osdata): New functions.
11007 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11008 callback.
11009 * server.c (handle_query): Handle "qXfer:osdata:read:".
11010 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11011 (buffer_xml_printf): New functions.
11012 * server.h (struct buffer): New.
11013 (buffer_grow_str, buffer_grow_str0): New macros.
11014 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11015 (buffer_xml_printf): Declare.
07e059b5 11016
4cab47ab
DE
110172008-11-24 Doug Evans <dje@google.com>
11018
11019 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11020
f142445f
DJ
110212008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11022
11023 * server.c (handle_v_run): Always use the supplied argument list.
11024
d0107bb6 110252008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11026
d0107bb6
BW
11027 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11028 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11029
2c4ad781
TJB
110302008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11031
11032 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11033 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11034 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11035 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11036 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11037 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11038 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11039 XML target descriptions.
11040 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11041 when inferior is running on an ISA 2.05 or later processor. Add
11042 special case to return offset for full 64-bit slot of FPSCR when
11043 in 32-bits.
11044
dfb64f85
DJ
110452008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11046
11047 * Makefile.in (SFILES, clean): Added sparc64 files.
11048 (reg-sparc64.o, reg-sparc64.c): New.
11049 * configure.srv (sparc*-*-linux*): New configuration.
11050 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11051 syscall arguments for SPARC.
11052 (regsets_store_inferior_registers): Likewise.
11053 * linux-sparc-low.c: New file.
11054
66b6e1dd
DE
110552008-10-21 Doug Evans <dje@google.com>
11056
11057 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11058 (READLINE_DIR,READLINE_DEP): Delete.
11059 (INTERNAL_CFLAGS): Update.
11060 (LINTFLAGS): Update.
11061
9b710a42
PA
110622008-10-10 Pedro Alves <pedro@codesourcery.com>
11063
11064 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11065 whole argv from the last run, not just argv[0].
11066
5822d809
PA
110672008-09-08 Pedro Alves <pedro@codesourcery.com>
11068
11069 * regcache.c (new_register_cache): Return NULL if the register
11070 cache size isn't known yet.
11071 (free_register_cache): Avoid dereferencing a NULL regcache.
11072
74aac56f
DJ
110732008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11074
11075 * configure.srv: Merge MIPS and MIPS64.
11076
400b20f5
MR
110772008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11078
11079 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11080
677c5bb1
LM
110812008-08-18 Luis Machado <luisgpm@br.ibm.com>
11082
11083 * Makefile.in: Add required vsx dependencies.
11084
11085 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11086 Declare init_registers_powerpc_vsx32l.
11087 Declare init_registers_powerpc_vsx64l.
11088 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11089 (ppc_arch_setup): Check for VSX in hwcap.
11090 (ppc_fill_vsxregset): New function.
11091 (ppc_store_vsxregset): New function.
11092 Add new VSX entry in regset_info target_regsets.
11093
11094 * configure.srv: Add new VSX dependencies.
11095
a6f3e723
SL
110962008-08-12 Pedro Alves <pedro@codesourcery.com>
11097
11098 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11099 (remote_open): Set or clear transport_is_reliable.
11100 (putpkt_binary): Don't expect acks in noack mode.
11101 (getpkt): Don't send ack/nac in noack mode.
11102 * server.c (handle_general_set): Handle QStartNoAckMode.
11103 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11104 qSupported.
11105 (main): Reset noack_mode on every connection.
11106 * server.h (noack_mode): Declare.
11107
a417dc56
RW
111082008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11109
11110 * Makefile.in (GDBREPLAY_OBS): New variable.
11111 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11112
3221518c
UW
111132008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11114 Daniel Jacobowitz <dan@codesourcery.com>
11115
11116 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11117 (usr_store_inferior_registers): Likewise.
11118 (regsets_store_inferior_registers): Likewise.
11119
ec56be1b
PA
111202008-07-31 Rolf Jansen <rj@surtec.com>
11121 Pedro Alves <pedro@codesourcery.com>
11122
11123 * configure.ac: Check for memmem declaration.
11124 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11125 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11126 (disable_packet_qfThreadInfo): Unconditionally compile.
11127 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11128 * configure, config.in: Regenerate.
11129
2fe5e3ff
DE
111302008-07-28 Doug Kwan <dougkwan@google.com>
11131
11132 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11133 (linux_write_memory): Remove declaration of errno.
11134
836acd6d
UW
111352008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11136
11137 * linux-low.c (handle_extended_wait): Do not use "status"
11138 variable uninitialized.
11139
aeba519e
PA
111402008-07-07 Pedro Alves <pedro@codesourcery.com>
11141
11142 * server.c (handle_v_attach): Inhibit reporting dll changes.
11143
db42f210
PA
111442008-06-27 Pedro Alves <pedro@codesourcery.com>
11145
11146 * remote-utils.c (prepare_resume_reply): If requested, don't
11147 output "thread:TID" in the T stop reply.
11148
11149 * server.c (disable_packet_vCont, disable_packet_Tthread)
11150 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11151 (handle_query): If requested, disable support for qC, qfThreadInfo
11152 and qsThreadInfo.
11153 (handle_v_requests): If requested, disable support for vCont.
11154 (gdbserver_show_disableable): New.
11155 (main): Handle --disable-packet and --disable-packet=LIST.
11156
11157 * server.h (disable_packet_vCont, disable_packet_Tthread)
11158 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11159
8e4c5421
CD
111602008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11161
11162 * server.c (gdbserver_usage): Mention --version.
11163
6e23a804
DJ
111642008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11165
11166 * Makefile.in (gdbreplay.o): New rule.
11167
90aa6a40
JM
111682008-06-06 Joseph Myers <joseph@codesourcery.com>
11169
11170 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11171 message, not gdbserver.
11172
c16158bc 111732008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11174 Nathan Sidwell <nathan@codesourcery.com>
11175 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11176
11177 * acinclude.m4: Include ../../config/acx.m4.
11178 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11179 * configure, config.in: Regenerate.
11180 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11181 * server.c (gdbserver_version): Print PKGVERSION.
11182 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11183 (main): Adjust gdbserver_usage calls.
11184 * gdbreplay.c (version, host_name): Add declarations.
11185 (gdbreplay_version, gdbreplay_usage): New.
11186 (main): Accept --version and --help options.
11187
aeb75bf5
DJ
111882008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11189
11190 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11191 (arm_breakpoint_at): Handle Thumb.
11192 (the_low_target): Add comment.
11193
76b233dd
UW
111942008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11195
11196 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11197
08388c79
DE
111982008-05-09 Doug Evans <dje@google.com>
11199
a3c83fae
DE
11200 * server.h (decode_search_memory_packet): Declare.
11201 * remote-utils.c (decode_search_memory_packet): New fn.
11202 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11203 (handle_search_memory): New fn.
11204 (handle_query): Process qSearch:memory packets.
11205
bb9c3d36
UW
112062008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11207
11208 * regcache.c (registers_length): Remove.
11209 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11210 full register packet.
11211 * regcache.h (registers_length): Remove prototype.
11212 * server.h (PBUFSIZ): Define to 16384.
11213
7284e1be
UW
112142008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11215
11216 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11217 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11218 powerpc-64l.o, and powerpc-altivec64l.o.
11219 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11220 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11221 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11222 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11223 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11224 to srv_xmlfiles.
11225
11226 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11227 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11228 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11229 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11230 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11231 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11232 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11233 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11234 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11235 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11236 (clean): Update.
11237
11238 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11239 (init_registers_powerpc_32l): ... this new prototype.
11240 (init_registers_powerpc_32): Remove, replace by ...
11241 (init_registers_powerpc_altivec32l): ... this new prototype.
11242 (init_registers_powerpc_e500): Remove, replace by ...
11243 (init_registers_powerpc_e500l): ... this new prototype.
11244 (init_registers_ppc64): Remove, replace by ...
11245 (init_registers_powerpc_64l): ... this new prototype.
11246 (init_registers_powerpc_64): Remove, replace by ...
11247 (init_registers_powerpc_altivec64l): ... this new prototype.
11248 (ppc_num_regs): Set to 73.
11249 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11250 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11251 (ppc_cannot_store_register): Handle orig_r3 and trap.
11252 (ppc_arch_setup): Update init_registers_... calls.
11253 (ppc_fill_gregset): Handle orig_r3 and trap.
11254
11255 * inferiors.c (clear_inferiors): Reset current_inferior.
11256
fdc59709
PB
112572008-04-23 Paolo Bonzini <bonzini@gnu.org>
11258
889bf7c5
PA
11259 * acinclude.m4: Add override.m4.
11260 * configure: Regenerate.
fdc59709 11261
c9b2f845
UW
112622008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11263
11264 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11265 initial call to init_register_ppc64.
11266
550512b8
UW
112672008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11268
43aaf8b6
PA
11269 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11270 single powerpc*-*-linux* case.
550512b8
UW
11271 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11272
b6430ec3
UW
112732008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11274
11275 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11276 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11277 from reg_xmlfiles.
11278 * linux-ppc-low.c: Include <elf.h>.
11279 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11280 (ppc_hwcap): New global variable.
11281 (ppc_regmap): Remove __SPE__ #ifdef sections.
11282 (ppc_regmap_e500): New global variable.
11283 (ppc_cannot_store_register): Update __SPE__ special case.
11284 (ppc_get_hwcap): New function.
11285 (ppc_arch_setup): Use it to determine whether inferior supports
11286 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11287 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11288 Do not access registers if target does not support AltiVec.
11289 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11290 Do not access registers if target does not support SPE.
11291 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11292
52fa2412
UW
112932008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11294
11295 * linux-low.c (disabled_regsets, num_regsets): New.
11296 (use_regsets_p): Delete.
11297 (linux_wait_for_process): Clear disabled_regsets.
11298 (regsets_fetch_inferior_registers): Check and set it.
11299 (regsets_store_inferior_registers): Likewise.
11300 (linux_fetch_registers, linux_store_registers): Do not use
11301 use_regsets_p.
11302 (initialize_low): Allocate disabled_regsets.
11303
e28b3332
DJ
113042008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11305
11306 * Makefile.in (LIBOBJS): New.
11307 (OBS): Use LIBOBJS.
11308 (memmem.o): New rule.
11309 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11310 * configure: Regenerated.
11311
4536995d
UW
113122008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11313
11314 * server.c (handle_query): Never return "unsupported" for
11315 qXfer:features:read queries.
11316
221c031f
UW
113172008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11318
11319 * server.c (get_features_xml): Fix inverted condition.
11320 (handle_query): Always support qXfer:feature:read.
11321
ccd213ac
DJ
113222008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11323
11324 * server.c (wrapper_argv): New.
11325 (start_inferior): Handle wrapper_argv. If set, expect an extra
11326 trap.
11327 (gdbserver_usage): Document --wrapper.
11328 (main): Parse --wrapper.
11329
6fe305f7
UW
113302008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11331
11332 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11333 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11334 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11335 (ppc_set_pc): Likewise.
11336 (ppc_arch_setup): New function.
11337 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11338 of collect_register.
889bf7c5 11339 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11340
5b0a002e
UW
113412008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11342
11343 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11344 instead of linux-ppc64-low.o.
11345 * linux-ppc64-low.c: Remove file.
11346 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11347 (linux-ppc64-low.o): Remove rule.
11348
11349 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11350 (init_registers_powerpc_64): Likewise.
11351 (ppc_regmap): Conditionally define depending on __powerpc64__.
11352 (ppc_cannot_store_register): Do not special-case "fpscr" when
11353 compiled on __powerpc64__.
11354 (ppc_collect_ptrace_register): New function.
11355 (ppc_supply_ptrace_register): New function.
11356 (ppc_breakpoint): Change type to "unsigned int".
11357 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11358 (the_low_target): Conditionally provide initializers for the
889bf7c5 11359 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11360 collect_ptrace_register and supply_ptrace_register members.
11361
9b4b61c8
UW
113622008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11363
11364 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11365 * server.c (gdbserver_xmltarget): Define.
11366 (get_features_xml): Use it to replace "target.xml" and arch_string.
11367
11368 * configure.srv: Remove srv_xmltarget. Add XML files that were
11369 mentioned there to srv_xmlfiles instead. Remove conditional tests
11370 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11371 srv_xmlfiles and srv_regobj to include all possible choices.
11372 * configure.ac (srv_xmltarget): Remove.
11373 (srv_xmlfiles): Do not add "target.xml".
11374 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11375 checks for supplementary target information.
11376 * configure: Regenerate.
11377 * Makefile.in (XML_TARGET): Remove.
11378 (target.xml): Remove rule.
11379 (clean): Do not clean up target.xml.
11380 (.PRECIOUS): Do not mention target.xml.
11381
11382 * target.h (struct target_ops): Remove arch_string member.
11383 * linux-low.c (linux_arch_string): Remove.
11384 (linux_target_ops): Remove arch_string initializer.
11385 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11386 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11387 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11388 * spu-low.c (spu_arch_string): Remove.
11389 (spu_target_ops): Remove arch_string initializer.
11390 * win32-low.c (win32_arch_string): Remove.
11391 (win32_target_ops): Remove arch_string initializer.
11392 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11393 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11394 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11395
ee1a7ae4
UW
113962008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11397
11398 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11399 by collect_ptrace_register and supply_ptrace_register hooks.
11400 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11401 instead of checking for the_low_target.left_pad_xfer.
11402 (usr_store_inferior_registers): Use collect_ptrace_register callback
11403 instead of checking for the_low_target.left_pad_xfer.
11404
11405 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11406 (s390_supply_ptrace_register): Likewise.
11407 (s390_fill_gregset): Call s390_collect_ptrace_register.
11408 (the_low_target): Update.
11409
11410 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11411 (ppc_supply_ptrace_register): Likewise.
11412 (the_low_target): Update.
11413
11414 * linux-i386-low.c (the_low_target): Update.
11415 * linux-x86-64-low.c (the_low_target): Update.
11416
d61ddec4
UW
114172008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11418
11419 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11420 reg-s390.o and reg-s390x.o.
11421
11422 * linux-low.c (new_inferior): New global variable.
11423 (linux_create_inferior, linux_attach): Set it.
11424 (linux_wait_for_process): Call the_low_target.arch_setup after the
11425 target has stopped for the first time.
11426 (initialize_low): Do not call the_low_target.arch_setup.
11427
11428 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11429 (s390_set_pc): Likewise.
11430 (s390_arch_setup): New function.
11431 (the_low_target): Use s390_arch_setup as arch_setup routine.
11432
11433 * regcache.c (realloc_register_cache): New function.
11434 (set_register_cache): Call it for each existing regcache.
11435
d05b4ac3
UW
114362008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11437
11438 * server.h (init_registers): Remove prototype.
11439
11440 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11441 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11442 instead of init_registers ().
11443 * linux-arm-low.c (init_registers_arm): Add prototype.
11444 (init_registers_arm_with_iwmmxt): Likewise.
11445 (the_low_target): Add initializer for arch_setup field.
11446 * linux-cris-low.c (init_registers_cris): Add prototype.
11447 (the_low_target): Add initializer for arch_setup field.
11448 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11449 (the_low_target): Add initializer for arch_setup field.
11450 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11451 (the_low_target): Add initializer for arch_setup field.
11452 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11453 (the_low_target): Add initializer for arch_setup field.
11454 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11455 (the_low_target): Add initializer for arch_setup field.
11456 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11457 (the_low_target): Add initializer for arch_setup field.
11458 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11459 (init_registers_mips64_linux): Likewise.
11460 (the_low_target): Add initializer for arch_setup field.
11461 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11462 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11463 (the_low_target): Add initializer for arch_setup field.
11464 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11465 (init_registers_powerpc_64): Likewise.
11466 (the_low_target): Add initializer for arch_setup field.
11467 * linux-s390-low.c (init_registers_s390): Add prototype.
11468 (init_registers_s390x): Likewise.
11469 (the_low_target): Add initializer for arch_setup field.
11470 * linux-sh-low.c (init_registers_sh): Add prototype.
11471 (the_low_target): Add initializer for arch_setup field.
11472 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11473 (the_low_target): Add initializer for arch_setup field.
11474 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11475 (the_low_target): Add initializer for arch_setup field.
11476
11477 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11478 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11479 instead of init_registers ().
11480 * win32-arm-low.c (init_registers_arm): Add prototype.
11481 (the_low_target): Add initializer for arch_setup field.
11482 * win32-i386-low.c (init_registers_i386): Add prototype.
11483 (the_low_target): Add initializer for arch_setup field.
11484
11485 * spu-low.c (init_registers_spu): Add prototype.
11486 (initialize_low): Call initialie_registers_spu () instead of
11487 initialize_registers ().
11488
fd96d250
PA
114892008-02-19 Pedro Alves <pedro@codesourcery.com>
11490
11491 * server.c (handle_v_requests): When handling the vRun and vAttach
11492 packets, if already debugging a process, don't kill it. Return an
11493 error instead.
11494
d41b6bb4
DJ
114952008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11496
11497 * server.c (handle_query): Correct length check.
11498
5ac588cf
PA
114992008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11500
11501 * win32-low.c (do_initial_child_stuff): Add process handle
11502 parameter. Set current_process_handle and current_process_id from the
11503 parameters. Clear globals.
11504 (win32_create_inferior): Don't set current_process_handle and
11505 current_process_id here. Instead pass them on the call to
11506 do_initial_child_stuff.
11507 (win32_attach): Likewise.
11508 (win32_clear_inferiors): New.
11509 (win32_kill): Don't close the current process handle or the
11510 current thread handle here. Instead call win32_clear_inferiors.
11511 (win32_detach): Don't open a new handle to the process. Call
11512 win32_clear_inferiors.
11513 (win32_join): Don't rely on current_process_handle; open a new
11514 handle using the process id.
11515 (win32_wait): Call win32_clear_inferiors when the inferior process
11516 has exited.
11517
ecd7ecbc
DJ
115182008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11519
11520 * server.c (monitor_show_help): Add "exit".
11521
1525d545
MG
115222008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11523
ecd7ecbc 11524 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11525 (clean): Add reg-xtensa.c.
11526 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11527 * configure.srv (xtensa*-*-linux*) New target.
11528 * linux-xtensa-low.c: New.
11529 * xtensa-xtregs.c: New.
1525d545 11530
59a016f0
PA
115312008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11532
11533 * hostio.c: Don't include errno.h.
11534 (errno_to_fileio_errno): Move to hostio-errno.
11535 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11536 error number outputting to the target->hostio_last_error callback.
11537 (hostio_packet_error): Use FILEIO_EINVAL directly.
11538 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11539 calls to hostio_error.
11540 * hostio-errno.c: New.
11541 * server.h (hostio_last_error_from_errno): Declare.
11542 * target.h (target_ops): Add hostio_last_error member.
11543 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11544 as hostio_last_error handler.
889bf7c5 11545 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11546 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11547 (wince_hostio_last_error): New functions.
11548 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11549 as hostio_last_error handler.
11550 (win32_target_ops) [!_WIN32_WCE]: Register
11551 hostio_last_error_from_errno as hostio_last_error handler.
11552 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11553 (hostio-errno.o): New rule.
11554 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11555 * configure.srv (srv_hostio_err_objs): New variable. Default to
11556 hostio-errno.o.
11557 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11558 * configure: Regenerate.
11559
2d717e4f
DJ
115602008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11561
11562 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11563 (linux_kill, linux_detach): Clean up the process list.
11564 * remote-utils.c (remote_open): Improve port number parsing.
11565 (putpkt_binary, input_interrupt): Only send interrupts if the target
11566 is running.
11567 * server.c (extended_protocol): Make static.
11568 (attached): Define earlier.
11569 (exit_requested, response_needed, program_argv): New variables.
11570 (target_running): New.
11571 (start_inferior): Clear attached here.
11572 (attach_inferior): Set attached here.
11573 (require_running): Define.
11574 (handle_query): Use require_running and target_running. Implement
11575 "monitor exit".
11576 (handle_v_attach, handle_v_run): New.
11577 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11578 (gdbserver_usage): Update.
11579 (main): Redo argument parsing. Handle --debug and --multi. Handle
11580 --attach along with other options or after the port. Save
11581 program_argv. Support no initial program. Resynchronize
11582 communication with GDB after an error. Handle "monitor exit".
11583 Use require_running and target_running. Always allow the extended
11584 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11585 restart in extended mode.
11586 * README: Refer to the GDB manual. Update --attach usage.
11587
7407e2de
AS
115882007-12-20 Andreas Schwab <schwab@suse.de>
11589
11590 * linux-low.c (STACK_SIZE): Define.
11591 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11592 (linux_test_for_tracefork): Likewise.
11593
b65d95c5
DJ
115942007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11595
11596 * linux-low.c (linux_wait_for_event): Update messages. Do not
11597 reinsert auto-delete breakpoints.
11598 * mem-break.c (struct breakpoint): Change return type of handler to
11599 int.
11600 (set_breakpoint_at): Update handler type.
11601 (reinsert_breakpoint_handler): Return 1 instead of calling
11602 delete_breakpoint.
11603 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11604 setting a new one.
11605 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11606 * mem-break.h (set_breakpoint_at): Update handler type.
11607 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11608 * win32-low.c (auto_delete_breakpoint): New.
11609 (get_child_debug_event): Use it.
11610
4e799345
DJ
116112007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11612
11613 * configure.ac: Check for pread and pwrite.
11614 * hostio.c (handle_pread): Fall back to lseek and read.
11615 (handle_pwrite): Fall back to lseek and write.
11616 * config.in, configure: Regenerated.
11617
27524b67
DJ
116182007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11619
11620 * server.c (myresume): Add own_buf argument.
11621 (main): Update calls.
11622
a20d5e98
DJ
116232007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11624
11625 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11626 * remote-utils.c (remote_open): Do not call disable_async_io.
11627 (block_async_io): Delete.
11628 (unblock_async_io): Make static.
11629 (initialize_async_io): New.
11630 * server.c (handle_v_cont): Handle async I/O here.
11631 (myresume): Likewise. Move other common resume tasks here...
11632 (main): ... from here. Call initialize_async_io. Disable async
11633 I/O before the main loop.
11634 * server.h (initialize_async_io): Declare.
11635 (block_async_io, unblock_async_io): Delete prototypes.
11636 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11637
b79d787e
DJ
116382007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11639
11640 * remote-utils.c (readchar): Allow binary data in received messages.
11641
d97903b2
PA
116422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11643
11644 * win32-low.c (attaching): New global.
11645 (win32_create_inferior): Clear the `attaching' global.
11646 (win32_attach): Set the `attaching' global.
11647 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11648 attaching. Only set a breakpoint at the entry point if not
11649 attaching.
11650
311de423
PA
116512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11652
11653 * server.c (main): Don't report dll events on the initial
11654 connection on attaches.
11655
6c2d16d2
PA
116562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11657
11658 * server.c (main): Relax numerical bases supported for the pid of
11659 the --attach command line argument.
11660
5ca906e6
PA
116612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11662
11663 * win32-low.c (win32_attach): Call OpenProcess before
11664 DebugActiveProcess, not after. Add last error output to error
11665 call.
11666
9c6c8194
PA
116672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11668
11669 * win32-low.c (win32_get_thread_context)
11670 (win32_set_thread_context): New functions.
11671 (thread_rec): Use win32_get_thread_context.
11672 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11673 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11674 field.
11675
4d5d1aaa
PA
116762007-12-03 Leo Zayas
11677 Pedro Alves <pedro_alves@portugalmail.pt>
11678
11679 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11680 global variables.
11681 (child_add_thread): Minor cleanup.
11682 (child_continue): Resume artificially suspended threads before
11683 calling ContinueDebugEvent.
11684 (suspend_one_thread): New.
11685 (fake_breakpoint_event): New.
11686 (get_child_debug_event): Change return type to int. Check here if
11687 gdb sent an interrupt request. If a soft interrupt was requested,
11688 fake a breakpoint event. Return 0 if there is no event to handle,
11689 and 1 otherwise.
11690 (win32_wait): Don't check here if gdb sent an interrupt request.
11691 Ensure there is a valid event to handle.
11692 (win32_request_interrupt): Add soft interruption method as last
11693 resort.
11694
c436e841
PA
116952007-12-03 Leo Zayas
11696 Pedro Alves <pedro_alves@portugalmail.pt>
11697
11698 * win32-low.h (win32_thread_info): Add descriptions to the
11699 structure members. Replace `suspend_count' counter by a
11700 `suspended' flag.
11701 * win32-low.c (thread_rec): Update condition of when to get the
11702 context from the inferior. Rely on ContextFlags being set if it
11703 has already been retrieved. Only suspend the inferior thread if
11704 we haven't already. Warn if that fails.
11705 (continue_one_thread): s/suspend_count/suspended/. Only call
11706 ResumeThread once. Warn if that fails.
11707
e7b5fa67
PA
117082007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11709
11710 * win32-low.c (win32_wait): Don't read from the inferior when it
11711 has already exited.
11712
a385171d
PA
117132007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11714
11715 * Makefile.in (win32_low_h): New variable.
11716 (win32-low.o): Add dependency on $(win32_low_h).
11717 (win32-arm-low.o, win32-i386-low.o): New rules.
11718
f80c84b3
DJ
117192007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11720
11721 * hostio.c: Correct copyright year.
11722
a6b151f1
DJ
117232007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11724
11725 * Makefile.in (OBS): Add hostio.o.
11726 (hostio.o): New rule.
11727 * server.h (handle_vFile): Declare.
11728 * hostio.c: New file.
11729 * server.c (handle_v_requests): Take packet_len and new_packet_len
11730 for binary packets. Call handle_vFile.
11731 (main): Update call to handle_v_requests.
11732
f9387fc3
DJ
117332007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11734
11735 * linux-low.c: Include <sched.h>.
11736
51c2684e
DJ
117372007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11738
11739 * linux-low.c (linux_tracefork_grandchild): New.
11740 (linux_tracefork_child): Use clone.
11741 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11742
75f83163
JB
117432007-10-31 Joel Brobecker <brobecker@adacore.com>
11744
11745 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11746
da5898ce
DJ
117472007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11748
11749 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11750
24a09b5f
DJ
117512007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11752
11753 * inferiors.c (change_inferior_id): Delete.
11754 (add_pid_to_list, pull_pid_from_list): New.
11755 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11756 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11757 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11758 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11759 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11760 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11761 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11762 (using_threads): Always set to 1.
11763 (handle_extended_wait): New.
11764 (add_process): Do not set TID.
11765 (linux_create_inferior): Set must_set_ptrace_flags.
11766 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11767 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11768 (linux_thread_alive): Rename TID argument to LWPID.
11769 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11770 (linux_wait_for_event): Do not use TID or check using_threads. Update
11771 call to dead_thread_notify. Call handle_extended_wait.
11772 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11773 (send_sigstop): Delete sigstop_sent.
11774 (wait_for_sigstop): Avoid TID.
11775 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11776 (linux_test_for_tracefork): New.
11777 (linux_lookup_signals): Use thread_db_active and
11778 linux_supports_tracefork_flag.
11779 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11780 * linux-low.h (get_process_thread): Avoid TID.
11781 (struct process_ifo): Move thread_known and tid to the end. Remove
11782 sigstop_sent.
11783 (linux_attach_lwp, thread_db_init): Update prototypes.
11784 * server.h (change_inferior_id): Delete prototype.
11785 (add_pid_to_list, pull_pid_from_list): New prototypes.
11786 * thread-db.c (thread_db_use_events): New.
11787 (find_first_thread): Rename to...
11788 (find_one_thread): ...this. Update callers and messages. Do not
11789 call fatal. Check thread_db_use_events. Do not call
11790 change_inferior_id or new_thread_notify.
11791 (maybe_attach_thread): Update. Do not call new_thread_notify.
11792 (thread_db_init): Set thread_db_use_events. Check use_events.
11793 * utils.c (fatal, warning): Correct message prefix.
11794
30ed0a8f
DJ
117952007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11796
11797 * Makefile.in (clean): Remove new files.
11798 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11799 (powerpc-64.o, powerpc-64.c): New rules.
11800 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11801 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11802 with SPE.
11803 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11804 SPE targets.
11805 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11806 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11807 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11808 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11809 (target_regsets): Add AltiVec and SPE register sets.
11810 * configure.ac: Check for AltiVec and SPE.
11811 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11812 (ppc_fill_vrregset, ppc_store_vrregset): New.
11813 (target_regsets): Add AltiVec register set.
11814 * configure: Regenerated.
11815
fd462a61
DJ
118162007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11817
11818 * linux-low.c (O_LARGEFILE): Define.
11819 (linux_read_memory): Use /proc/PID/mem.
11820 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11821 * configure, config.in: Regenerated.
11822
69f223ed
DJ
118232007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11824
11825 * linux-low.c (linux_wait_for_event): Do not pass signals while
11826 single-stepping.
11827
aec18585
PA
118282007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11829
11830 * win32-low.c (create_process): New.
11831 (win32_create_inferior): Use create_process instead of
11832 CreateProcess. If create_process failed retry appending an ".exe"
11833 suffix. Store the GetLastError result immediatelly after
11834 create_process calls and use it on the call to error.
11835
34d86ddd
PA
118362007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11837
11838 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11839
5a0e3bd0
JB
118402007-08-23 Joel Brobecker <brobecker@adacore.com>
11841
11842 * configure.ac: Switch license to GPLv3.
11843
f88c79e6
MS
118442007-08-01 Michael Snyder <msnyder@access-company.com>
11845
11846 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11847
6b3d9b83
PA
118482007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11849
11850 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11851 typedef.
11852 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11853 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11854 CloseToolhelp32Snapshot.
11855 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11856 CloseToolhelp32Snapshot.
11857
c588c53c
MS
118582007-07-27 Michael Snyder <michael.snyder@access-company.com>
11859
11860 * server.c (main): Check for inferior exit before main loop.
11861
aa0403d9
PA
118622007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11863
11864 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11865 instead of on tmp_desc.
11866
255e7678
DJ
118672007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11868 Daniel Jacobowitz <dan@codesourcery.com>
11869
11870 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11871 (add_thread): Minor cleanups.
11872 (clear_inferiors): Move lower in the file. Clear the DLL
11873 list.
11874 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11875 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11876 (xml_escape_text): New.
11877 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11878 for qSupported.
11879 (handle_v_cont): Report errors.
11880 (gdbserver_version): Update.
11881 (main): Correct size of own_buf. Do not report initial DLL events.
11882 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11883 (unloaded_dll, xml_escape_text): New.
11884 * win32-low.c (enum target_waitkind): Update comments.
11885 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11886 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11887 (win32_EnumProcessModules, win32_GetModuleInformation)
11888 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11889 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11890 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11891 (win32_Module32First, win32_Module32Next, load_toolhelp)
11892 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11893 (get_child_debug_event): Handle DLL events.
11894 (win32_wait): Likewise.
11895
0d37add9
DJ
118962007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11897
11898 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11899 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11900
45e2715e
PA
119012007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11902
11903 * win32-low.c (handle_output_debug_string): Ignore event if not
11904 waiting.
11905
c5674cf1
PA
119062007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11907
11908 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11909
2bbe3cc1
DJ
119102007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11911
11912 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11913
ae13219e
DJ
119142007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11915
11916 * inferiors.c (change_inferior_id): Add comment.
11917 * linux-low.c (check_removed_breakpoint): Add an early
11918 prototype. Improve debug output.
11919 (linux_attach): Doc update.
11920 (linux_detach_one_process, linux_detach): Clean up before releasing
11921 each process.
11922 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11923 * linux-low.h (struct process_info): Doc improvement.
11924 * mem-break.c (delete_all_breakpoints): New.
11925 * mem-break.h (delete_all_breakpoints): New prototype.
11926 * thread-db.c (find_first_thread): New.
11927 (thread_db_create_event): Call it instead of
11928 thread_db_find_new_threads. Clean up unused variables.
11929 (maybe_attach_thread): Remove first thread handling.
11930 (thread_db_find_new_threads): Use find_first_thread.
11931 (thread_db_get_tls_address): Likewise.
11932
4105de34
DJ
119332007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11934
11935 * thread-db.c (thread_db_find_new_threads): Add prototype.
11936 (thread_db_create_event): Check for the main thread before adding
11937 a new thread.
11938 (maybe_attach_thread): Only enable event reporting if TID == 0.
11939 (thread_db_get_tls_address): Check for new threads.
11940
2b876972
DJ
119412007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11942
11943 * linux-low.c (linux_create_inferior): Try execv before execvp.
11944 * spu-low.c (spu_create_inferior): Likewise.
11945
7a245884
DJ
119462007-06-13 Mike Frysinger <vapier@gentoo.org>
11947
11948 * linux-low.c (linux_create_inferior): Change execv to execvp.
11949 * spu-low.c (spu_create_inferior): Likewies.
11950
117ce543
DJ
119512007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11952
11953 * Makefile.in (clean): Clean new files instead of deleted ones.
11954 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11955 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11956 rules.
11957 * configure.srv: Specify XML files and new regformats for MIPS and
11958 MIPS64 GNU/Linux.
11959 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11960 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11961 an entry for the restart register.
11962 (mips_cannot_fetch_register, mips_cannot_store_register)
11963 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11964 register names to match the XML descriptions.
11965 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11966 restart register instead of $0.
11967
0e7f50da
UW
119682007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11969 Markus Deuling <deuling@de.ibm.com>
11970
11971 * remote-utils.c (decode_xfer_write): New function.
11972 * server.h (decode_xfer_write): Add prototype.
11973 * server.c (handle_query): Add PACKET_LEN argument. Support
11974 qXfer:spu:read and qXfer:spu:write packets.
11975 (main): Pass packet_len to handle_query.
11976 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11977 * target.h (target_ops): Add qxfer_spu.
11978
374c1d38
UW
119792007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11980
11981 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11982 accessing non-seekable spufs files.
11983
bb63802a
UW
119842007-05-16 Markus Deuling <deuling@de.ibm.com>
11985
889bf7c5 11986 * server.c (handle_query): Add reply for qC packet.
bb63802a 11987
7390519e
PA
119882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11989 Leo Zayas <lerele@champenstudios@com>
11990
11991 * server.h (check_remote_input_interrupt_request): New function.
11992 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11993 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11994 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11995 (check_remote_input_interrupt_request): New function.
11996 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11997 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11998 winapi_GenerateConsoleCtrlEvent): New typedefs.
11999 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12000 to 250 ms.
12001 (win32_wait): Check for remote interrupt request
12002 with check_remote_input_interrupt_request.
12003 (win32_request_interrupt): New function.
12004 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12005
34b34921
PA
120062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12007
12008 * win32-low.c (debug_registers_changed,
12009 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12010 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12011 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12012 (thread_rec): Get context using the low target.
12013 (child_add_thread): Call thread_added on the low target,
12014 which does the same thing.
12015 (regptr): Delete.
12016 (do_initial_child_stuff): Remove debug registers references.
12017 Set context using the low target. Resume threads after
12018 setting the contexts.
12019 (child_continue): Remove dead variable. Remove debug
12020 registers references.
12021 (child_fetch_inferior_registers): Go through the low target.
12022 (do_child_store_inferior_registers): Remove.
12023 (child_store_inferior_registers): Go through the low target.
12024 (win32_resume): Remove debug registers references.
12025 Set context using the low target.
12026 (handle_exception): Change return type to void. Don't record
12027 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12028 first chance exception.
889bf7c5 12029 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12030 goto loop. Always return after waiting for debug event.
12031 (win32_wait): Convert to switch statement. Handle spurious
12032 events.
12033
12034 * win32-i386-low.c (debug_registers_changed,
12035 debug_registers_used): New.
12036 (initial_stuff): Rename to ...
12037 (i386_initial_stuff): ... this. Clear debug registers
12038 state variables.
12039 (store_debug_registers): Delete.
12040 (i386_get_thread_context): New.
12041 (load_debug_registers): Delete.
12042 (i386_set_thread_context): New.
12043 (i386_thread_added): New.
12044 (single_step): Rename to ...
12045 (i386_single_step): ... this.
12046 (do_fetch_inferior_registers): Rename to ...
12047 (i386_fetch_inferior_register): ... this.
12048 (i386_store_inferior_register): New.
12049 (the_low_target): Adapt to new interface.
12050
12051 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12052 (arm_get_thread_context): New.
12053 (arm_set_thread_context): New.
12054 (regptr): New.
12055 (do_fetch_inferior_registers): Rename to ...
12056 (arm_fetch_inferior_register): ... this.
12057 (arm_store_inferior_register): New.
12058 (arm_wince_breakpoint): Reimplement as unsigned long.
12059 (arm_wince_breakpoint_len): Define.
12060 (the_low_target): Adapt to new interface.
12061
12062 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12063 load_debug_registers. Add get_thread_context, set_thread_context,
12064 thread_added and store_inferior_register. Rename
12065 fetch_inferior_registers to fetch_inferior_register.
12066 (regptr): Remove declaration.
12067
dd6953e1
PA
120682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12069
12070 * linux-low.c (linux_detach): Change return type to int. Return 0.
12071 * spu-low.c (spu_detach): Likewise.
12072
444d6139
PA
120732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12074
12075 * target.h (target_ops): Change return type of detach to int.
12076 Add join.
12077 (join_inferior): New.
12078 * server.c (main): Don't skip detach support on mingw32.
12079 If the inferior doesn't support detaching return error.
12080 Call join_inferior instead of using waitpid.
12081 * linux-low.c (linux_join): New.
12082 (linux_target_op): Add linux_join.
12083 * spu-low.c (spu_join): New.
12084 (spu_target_ops): Add spu_join.
12085 * win32-low.c (win32_detach): Adapt to new interface.
12086 Reopen current_process_handle before detaching. Issue a child
12087 resume before detaching.
12088 (win32_join): New.
12089 (win32_target_op): Add win32_join.
12090
1d5315fe
PA
120912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12092
12093 * win32-low.c (win32-attach): Fix return value.
12094 * target.h (target_ops): Describe ATTACH return values.
12095
bf914831
PA
120962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12097
12098 * win32-low.c (GETPROCADDRESS): Define.
12099 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12100 (winapi_DebugSetProcessKillOnExit): Likewise.
12101 (win32_create_inferior): Force usage of ansi CreateProcessA.
12102 (win32_attach): Use GETPROCADDRESS.
12103 (win32_detach): Likewise.
12104
f72f3e60
PA
121052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12106
12107 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12108
ed50f18f
PA
121092007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12110
12111 * win32-low.c: Commit leftover changes from 2007-03-29.
12112
0c2ead7e
DJ
121132007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12114
12115 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12116 fields short instead of int. Add explicit padding.
12117 (i387_cache_to_fsave): Remove unnecessary casts.
12118 (i387_fsave_to_cache): Doc fix.
12119 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12120
73725ff3
DJ
121212007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12122
12123 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12124 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12125
d99f33d8
PA
121262007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12127
12128 * configure.srv (arm*-*-mingw32ce*): Move near the other
12129 arm targets.
12130
68070c10
PA
121312007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12132
2482afc6 12133 * configure.ac: Add errno checking.
68070c10
PA
12134 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12135 sys/file.h and malloc.h.
12136 (AC_CHECK_DECLS): Add perror.
12137 (srv_mingwce): Handle.
2482afc6 12138 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12139 win32-i386-low.o to srv_tgtobj.
12140 (i[34567]86-*-mingw*): Likewise.
12141 (arm*-*-mingw32ce*): Add case.
12142 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12143 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12144 [__MINGW32CE__] (strerror): New function.
12145 [__MINGW32CE__] (errno): Define to GetLastError.
12146 [__MINGW32CE__] (COUNTOF): New macro.
12147 (remote_open): Remove extra close call.
12148 * mem-break.c (delete_breakpoint_at): New function.
12149 * mem-break.h (delete_breakpoint_at): Declare.
12150 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12151 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12152 [USE_WIN32API] (read, write): Add char* casts.
12153 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12154 * server.h: Include wincecompat.h on Windows CE.
12155 [HAVE_ERRNO_H]: Check.
12156 (perror): Declare if not declared.
12157 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12158 (perror_with_name): Remove errno declaration.
12159 * wincecompat.h: New.
12160 * wincecompat.c: New.
12161 * win32-low.h: New.
12162 * win32-arm-low.c: New.
12163 * win32-i386-low.c: New.
12164 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12165 (OUTMSG2): Make it safe.
12166 (_T): New macro.
12167 (COUNTOF): New macro.
12168 (NUM_REGS): Get it from the low target.
12169 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12170 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12171 (thread_rec): Let low target handle debug registers.
12172 (child_add_thread): Likewise.
12173 (child_init_thread_list): Likewise.
12174 (continue_one_thread): Likewise.
12175 (regptr): New.
12176 (do_child_fetch_inferior_registers): Move to ...
12177 * win32-i386-low.c: ... here, and rename to ...
12178 (do_fetch_inferior_registers): ... this.
889bf7c5 12179 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12180 Go through the low target.
12181 (do_child_store_inferior_registers): Use regptr.
12182 (strwinerror): New function.
12183 (win32_create_inferior): Handle Windows CE.
12184 Use strwinerror instead of strerror on Windows error
12185 codes. Add program to the error output.
12186 Don't close the main thread handle on Windows CE.
12187 (win32_attach): Use coredll.dll on Windows CE.
12188 (win32_kill): Close current process and current
12189 thread handles.
12190 (win32_detach): Use coredll.dll on Windows CE.
12191 (win32_resume): Let low target handle debug registers, and
12192 step request.
12193 (handle_exception): Add/Remove initial breakpoint. Avoid
12194 non-existant WSTOPSIG on Windows CE.
12195 (win32_read_inferior_memory): Cast to remove warning.
12196 (win32_arch_string): Go through the low target.
12197 (initialize_low): Call set_breakpoint_data with the low
12198 target's breakpoint.
12199 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12200 FOP_REGNUM, mappings): Move to ...
12201 * win32-i386-low.c: ... here.
12202 * win32-low.c (win32_thread_info): Move to ...
12203 * win32-low.h: ... here.
12204 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12205 win32-arm-low.c and wincecompat.c.
12206 (all:): Add $EXEEXT.
12207 (install-only:): Likewise.
12208 (gdbserver:): Likewise.
12209 (gdbreplay:): Likewise.
12210 * config.in: Regenerate.
12211 * configure: Regenerate.
12212
41093d81
PA
122132007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12214
12215 * win32-low.c: Rename typedef thread_info to
12216 win32_thread_info throughout.
12217
544afa54
PA
122182007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12219
12220 * win32-i386-low.c: Rename to ...
12221 * win32-low.c: ... this.
12222 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12223 * Makefile.in: Likewise.
12224
bce7165d
PA
122252007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12226
12227 * remote-utils.c (monitor_output): Constify msg parameter.
12228 * server.h (monitor_output): Likewise.
12229 * win32-i386-low.c (handle_output_debug_string): New.
12230 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12231 handle_output_debug_string.
12232 (get_child_debug_event): Likewise.
12233
506c7aa0
DJ
122342007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12235
12236 * server.c (main): Correct strtoul check.
12237
42c81e2a
DJ
122382007-03-27 Jon Ringle <jon@ringle.org>
12239
12240 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12241
9453113a
DJ
122422007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12243
12244 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12245
64a69107
DJ
122462007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12247
12248 * terminal.h: Check HAVE_SGTTY_H.
12249
122502007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12251
12252 * remote-utils.c (remote_open): Print out the assigned port number.
12253
c74d0ad8
DJ
122542007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12255
12256 * remote-utils.c (monitor_output): New function.
12257 * server.c (debug_threads): Define here.
12258 (monitor_show_help): New function.
12259 (handle_query): Handle qRcmd.
12260 (main): Do not handle 'd' packet.
12261 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12262 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12263 of debug_threads.
12264
de7c3b4a
PA
122652007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12266
12267 * Makefile.in (EXEEXT): New.
12268 (clean): Use $(EXEEXT).
12269
ef57601b
PA
122702007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12271
12272 * target.h (target_ops): Rename send_signal to request_interrupt,
12273 and remove enum target_signal parameter.
12274 * linux-low.c (linux_request_interrupt): Rename from
12275 linux_send_signal, and always send SIGINT.
12276 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12277 and always send SIGINT.
12278 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12279 of send_signal.
12280 (input_interrupt): Likewise.
12281
820f2bda
PA
122822007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12283
12284 * server.c (get_features_xml): Check if target implemented
12285 arch_string.
12286 * win32-i386-low.c (win32_arch_string): New.
12287 (win32_target_ops): Add win32_arch_string as arch_string member.
12288
ab39bf24
UW
122892007-02-22 Markus Deuling <deuling@de.ibm.com>
12290
12291 * spu-low.c (spu_arch_string): New.
12292 (spu_target_ops): Add spu_arch_string.
12293
61ff6e04
DJ
122942007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12295
12296 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12297 * configure.ac: Do not check for terminal.h.
12298 * configure, config.in: Regenerated.
12299
fb1e4ffc
DJ
123002007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12301
12302 * Makefile.in (OBS): Add $(XML_BUILTIN).
12303 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12304 (clean): Update.
12305 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12306 (arm-with-iwmmxt.c): New.
12307 * config.in, configure: Regenerate.
12308 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12309 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12310 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12311 (arm*-*-linux*): Add iWMMXt and regset support.
12312 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12313 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12314 (arm_store_wmmxregset, target_regsets): New.
12315 * server.c (get_features_xml): Take annex argument. Check builtin
12316 XML documents.
12317 (handle_query): Handle multiple annexes.
12318
0f48aa01
DJ
123192007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12320
12321 * remote-utils.c [USE_WIN32API] (read, write): Define.
12322 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12323 write.
12324
23181151
DJ
123252007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12326
12327 * linux-i386-low.c (the_low_target): Set arch_string.
12328 * linux-x86-64-low.c (the_low_target): Likewise.
12329 * linux-low.c (linux_arch_string): New.
12330 (linux_target_ops): Add it.
12331 * linux-low.h (struct linux_target_ops): Add arch_string.
12332 * server.c (write_qxfer_response): Use const void * for DATA.
12333 (get_features_xml): New.
12334 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12335 * target.h (struct target_ops): Add arch_string method.
12336
9d606399
DJ
123372007-01-03 Denis Pilat <denis.pilat@st.com>
12338 Daniel Jacobowitz <dan@codesourcery.com>
12339
12340 * linux-low.c (linux_kill): Handle being called with no threads.
12341 * win32-i386-low.c (win32_kill): Likewise.
12342 (get_child_debug_event): Clear current_process_handle.
12343
123442006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12345 Daniel Jacobowitz <dan@codesourcery.com>
12346
12347 * remote-utils.c (remote_open): Check the type of specified
12348 serial port devices before opening them.
12349 * server.c (main): Kill the inferior if an error occurs during
12350 the first remote_open.
12351
a5e13d24
DJ
123522006-12-05 Markus Deuling <deuling@de.ibm.com>
12353
12354 * README: Update supported targets.
12355
186947f7
DJ
123562006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12357
12358 * Makefile.in (clean): Remove reg-mips64.c.
12359 (reg-mips64.c, reg-mips64.o): New rules.
12360 * configure.srv: Handle mips64. Include regset support for mips.
12361 * linux-mips-low.c (union mips_register): New.
12362 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12363 (mips_breakpoint, mips_breakpoint_at): Use int.
12364 (mips_collect_register, mips_supply_register)
12365 (mips_collect_register_32bit, mips_supply_register_32bit)
12366 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12367 (mips_store_fpregset, target_regsets): New.
12368 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12369
a13e2c95
UW
123702006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12371
12372 * configure.srv: Add target "spu*-*-*".
12373 * Makefile.in (clean): Remove reg-spu.c.
12374 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12375 * spu-low.c: New file.
12376
cb7283db
DJ
123772006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12378
12379 * configure.ac: Correct td_thr_tls_get_addr test.
12380 * configure: Regenerated.
12381
89be2091
DJ
123822006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12383
12384 * linux-low.c (linux_wait_for_event): Reformat. Use the
12385 pass_signals array.
12386 * remote-utils.c (decode_address_to_semicolon): New.
12387 * server.c (pass_signals, handle_general_set): New.
12388 (handle_query): Mention QPassSignals for qSupported.
12389 (main): Call handle_general_set.
12390 * server.h (pass_signals, decode_address_to_semicolon): New.
12391
000ef4f0
DJ
123922006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12393
12394 * server.c (handle_query): Correct error handling for read_auxv.
12395
b7149293
UW
123962005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12397
12398 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12399 and srv_linux_thread_db to yes.
12400 * linux-s390-low.c (s390_fill_gregset): New function.
12401 (target_regsets): Define data structure.
12402
dae5f5cf
DJ
124032006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12404
12405 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12406 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12407 * config.in, configure: Regenerated.
12408 * inferiors.c (gdb_id_to_thread): New function.
12409 (gdb_id_to_thread_id): Use it.
12410 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12411 * linux-low.h (struct process_info): Add th member.
12412 (thread_db_get_tls_address): New prototype.
12413 * remote-utils.c (decode_address): Make non-static.
12414 * server.c (handle_query): Handle qGetTLSAddr.
12415 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12416 * target.h (struct target_ops): Add get_tls_address.
12417 * thread-db.c (maybe_attach_thread): Save the thread handle.
12418 (thread_db_get_tls_address): New.
12419
32ca6d61
DJ
124202006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12421
12422 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12423 (linux_resume_one_process): Take a siginfo_t *. Update all
12424 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12425 (struct pending_signals): Add a siginfo_t.
12426 (linux_wait_for_process): Always set last_status.
12427 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12428 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12429 * linux-low.h (struct process_info): Add last_status.
12430
5ffff7c1
DJ
124312006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12432
12433 * remote-utils.c (try_rle): New function.
12434 (putpkt_binary): Use it.
12435
8695c747
DJ
124362006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12437
12438 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12439 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12440 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12441 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12442 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12443 point registers.
12444
290fadea
RS
124452006-08-08 Richard Sandiford <richard@codesourcery.com>
12446
12447 * server.c (terminal_fd): New variable.
12448 (old_foreground_pgrp): Likewise.
12449 (restore_old_foreground_pgrp): New function.
12450 (start_inferior): Record the terminal file descriptor in terminal_fd
12451 and its original foreground group in old_foreground_pgrp. Register
12452 restore_old_foreground_pgrp with atexit().
12453
9f2e1e63
DJ
124542006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12455
12456 * server.c (handle_query): Correct qPart to qXfer.
12457
b80864fb
DJ
124582006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12459
12460 * configure.ac: Check for more headers which are missing on
12461 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12462 * configure.srv: Add Cygwin and mingw32.
12463 * remote-utils.c: Don't include headers unconditionally which
12464 are missing on mingw32. Include <winsock.h> for mingw32.
12465 (remote_open): Adjust for mingw32 support. Flush
12466 standard error after writing to it.
12467 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12468 (unblock_async_io, enable_async_io, disable_async_io)
12469 (readchar, getpkt): Update for Winsock support.
12470 (prepare_resume_reply): Expect a protocol signal number.
12471 * server.c: Disable <sys/wait.h> on mingw32.
12472 (start_inferior): Adjust for mingw32 support. Flush
12473 standard error after writing to it.
12474 (attach_inferior): Likewise. Use protocol signal
12475 numbers.
12476 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12477 and names.
12478 * win32-i386-low.c: New file.
12479 * Makefile.in (XM_CLIBS): Set.
12480 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12481 (win32-i386-low.o): New dependency rule.
12482 * linux-low.c (linux_wait): Use target signal numbers.
12483 * target.h (struct target_ops): Doc fix.
12484 * server.h (target_signal_to_name): New prototype.
12485 * gdbreplay.c: Don't include headers unconditionally which
12486 are missing on mingw32. Include <winsock.h> for mingw32.
12487 (remote_close, remote_open): Adjust for Winsock support.
12488 * configure, config.in: Regenerated.
12489
0876f84a
DJ
124902006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12491
12492 * server.c (decode_xfer_read, write_qxfer_response): New.
12493 (handle_query): Take a packet length argument. Handle
12494 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12495 the qSupported response.
12496 (main): Update call to handle_query.
12497
01f9e8fa
DJ
124982006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12499
12500 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12501 (putpkt_binary): Renamed from putpkt and adjusted for binary
12502 data.
12503 (putpkt): New wrapper for putpkt_binary.
12504 (readchar): Don't mask off the high bit.
12505 (decode_X_packet): New function.
12506 * server.c (main): Call putpkt_binary if a handler sets the packet
12507 length. Save the length of the incoming packet. Handle 'X'.
12508 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12509
be2a5f71
DJ
125102006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12511
12512 * server.c (handle_query): Handle qSupported.
12513
ea025f5f
DJ
125142006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12515
12516 * remote-utils.c (all_symbols_looked_up): New variable.
12517 (look_up_one_symbol): Check it.
12518 * server.h (look_up_one_symbol): New declaration.
12519 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12520
9308fc88
DJ
125212006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12522
12523 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12524 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12525 (PTRACE_GET_THREAD_AREA): Define.
12526 (ps_get_thread_area): New function.
12527
52fb6437
NS
125282006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12529
12530 * configure.srv (m68k*-*-uclinux*): New target.
12531 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12532 (linux_resume_one_process): Remove extraneous cast.
12533 (linux_read_offsets): New.
12534 (linux_target_op): Add linux_read_offsets on mmuless systems.
12535 * server.c (handle_query): Add qOffsets logic.
12536 * target.h (struct target_ops): Add read_offsets.
12537
21b0f40c
DJ
125382006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12539
12540 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12541 (PTRACE_GET_THREAD_AREA): Define.
12542 (ps_get_thread_area): New function.
12543 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12544 (linux-x86-64-low.o): Update.
12545
0050a760
DJ
125462006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12547
12548 * configure.ac: Remove checks for prfpregset_t.
12549 * gdb_proc_service.h: New file.
12550 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12551 new "gdb_proc_service.h".
12552 * proc-service.c: Likewise.
12553 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12554 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12555 * Makefile.in (gdb_proc_service_h): Updated.
12556 * configure, config.in: Regenerated.
12557
b92a518e
DJ
125582006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12559
12560 * remote-utils.c (prepare_resume_reply): Move declaration
12561 of gdb_id_from_wait to the top of the block.
12562
545587ee
DJ
125632006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12564
12565 * linux-low.c (regsets_store_inferior_registers): Read the regset
12566 from the target before filling it.
12567
9db87ebd
DJ
125682006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12569
12570 * server.c (attach_inferior): Return SIGTRAP for a successful
12571 attach.
12572
dd24457d
DJ
125732006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12574
12575 * Makefile.in (OBS): Add version.o.
12576 (STAGESTUFF): Delete.
12577 (version.o): Add dependencies.
12578 (version.c): Replace rule.
12579 (clean): Remove version.c.
12580 * server.c (gdbserver_version): New.
12581 (gdbserver_usage): Use printf.
12582 (main): Handle --version and --help.
12583 * server.h (version, host_name): Add declarations.
12584
6f0f660e
EZ
125852005-12-23 Eli Zaretskii <eliz@gnu.org>
12586
889bf7c5
PA
12587 * linux-arm-low.c:
12588 * linux-arm-low.c:
12589 * inferiors.c:
12590 * i387-fp.h:
12591 * i387-fp.c:
12592 * gdbreplay.c:
12593 * regcache.c:
12594 * proc-service.c:
12595 * mem-break.h:
12596 * mem-break.c:
12597 * linux-x86-64-low.c:
12598 * linux-sh-low.c:
12599 * linux-s390-low.c:
12600 * linux-ppc64-low.c:
12601 * linux-ppc-low.c:
12602 * linux-mips-low.c:
12603 * linux-m68k-low.c:
12604 * linux-m32r-low.c:
12605 * linux-low.h:
12606 * linux-low.c:
12607 * linux-ia64-low.c:
12608 * linux-i386-low.c:
12609 * linux-crisv32-low.c:
12610 * thread-db.c:
12611 * terminal.h:
12612 * target.h:
12613 * target.c:
12614 * server.h:
12615 * server.c:
12616 * remote-utils.c:
12617 * regcache.h:
12618 * utils.c:
12619 * Makefile.in:
12620 * configure.ac:
6f0f660e
EZ
12621 * gdbserver.1: Add (C) after Copyright. Update the FSF
12622 address.
12623
9d1fb177
DJ
126242005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12625
12626 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12627 (arm_breakpoint_at): Recognize both breakpoints.
12628 (the_low_target): Use the correct breakpoint instruction.
12629
011a70c2
DJ
126302005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12631
12632 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12633 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12634 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12635 (the_low_target): Update.
12636
7fb85e41
AS
126372005-10-25 Andreas Schwab <schwab@suse.de>
12638
12639 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12640
12641 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12642 (ia64_num_regs): Reduce to 462.
12643
3db0444b
DJ
126442005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12645
12646 * acinclude.m4: Correct quoting.
12647 * aclocal.m4: Regenerated.
12648
12649 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12650 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12651 (thread_db_init): Call thread_db_err_str.
12652 * configure.ac: Check for TD_VERSION.
12653 * config.in, configure: Regenerated.
12654
bee0189a
DJ
126552005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12656
12657 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12658
e9d25b98
DJ
126592005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12660
12661 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12662 is not available. Define HAVE_PTRACE_GETREGS if it is.
12663 * config.in, configure: Regenerated.
12664 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12665 * linux-i386-low.c, linux-m68k-low.c: Update to use
12666 HAVE_PTRACE_GETREGS.
12667 * linux-low.c (regsets_fetch_inferior_registers)
12668 (regsets_store_inferior_registers): Only return 0 if we processed
12669 GENERAL_REGS.
12670 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12671 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12672
a06660f7
DJ
126732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12674
12675 * inferiors.c (struct thread_info): Add gdb_id.
12676 (add_thread): Add gdb_id argument.
12677 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12678 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12679 calls to add_thread.
12680 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12681 * server.c (handle_query): Use thread_to_gdb_id.
12682 (handle_v_cont, main): Use gdb_id_to_thread_id.
12683 * server.h (add_thread): Update prototype.
12684 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12685 prototypes.
12686
5a1f5858
DJ
126872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12688
12689 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12690 left-padded registers.
12691 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12692 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12693
e122f1f5
SE
126942005-07-01 Steve Ellcey <sje@cup.hp.com>
12695
12696 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12697 * configure: Regenerate.
12698 * config.in: Regenerate.
12699 * server.h (NEED_DECLARATION_STRERROR):
12700 Replace with !HAVE_DECL_STRERROR.
12701
d592fa2f
DJ
127022005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12703
12704 * linux-low.c (linux_wait, linux_send_signal): Don't test
12705 an unsigned long variable for > 0 if it could be MAX_ULONG.
12706 * server.c (myresume): Likewise.
12707 * target.c (set_desired_inferior): Likewise.
12708
ccbd4912
MK
127092005-06-13 Mark Kettenis <kettenis@gnu.org>
12710
12711 * configure.ac: Simplify and improve check for socklen_t.
12712 * configure, config.in: Regenerate.
12713
f450004a
DJ
127142005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12715
12716 * acconfig.h: Remove.
12717 * configure.ac: Add a test for socklen_t. Use three-argument
12718 AC_DEFINE throughout.
12719 * config.in: Regenerated using autoheader 2.59.
12720 * configure: Regenerated.
12721
12722 * gdbreplay.c (socklen_t): Provide a default.
12723 (remote_open): Use socklen_t.
12724 * remote-utils.c (socklen_t): Provide a default.
12725 (remote_open): Use socklen_t.
12726 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12727 unsigned char.
12728
12729 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12730 char for buffers.
12731 * linux-low.c (linux_read_memory, linux_write_memory)
12732 (linux_read_auxv): Likewise.
12733 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12734 (check_mem_write): Likewise.
12735 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12736 Likewise.
12737 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12738 (registers_from_string, register_data): Likewise.
12739 * server.c (handle_query, main): Likewise.
12740 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12741 (decode_M_packet): Likewise.
12742 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12743 * target.h (struct target_ops): Update read_memory, write_memory,
12744 and read_auxv.
12745 (read_inferior_memory, write_inferior_memory): Update.
12746 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12747 to unsigned char *.
12748 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12749 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12750 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12751 linux-s390-low.c, linux-sh-low.c: Update for changes in
12752 read_inferior_memory and the_low_target->breakpoint.
12753
eee84df1
DJ
127542005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12755
12756 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12757 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12758 * configure.srv: Add powerpc64-*-linux*.
12759 * linux-ppc64-low.c: New file.
12760
45b134e5
OF
127612005-05-23 Orjan Friberg <orjanf@axis.com>
12762
12763 * linux-cris-low.c: New file with support for CRIS.
12764 * linux-crisv32-low.c: Ditto for CRISv32.
12765 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12766 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12767 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12768 reg-crisv32.o, and reg-crisv32.c to make rules.
12769 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12770 recognized targets.
12771
48d93c75
UW
127722005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12773
12774 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12775 of sizeof (PTRACE_XFER_TYPE).
12776 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12777
e013ee27
OF
127782005-05-12 Orjan Friberg <orjanf@axis.com>
12779
889bf7c5 12780 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12781 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12782 pointers for hardware watchpoint support.
12783 * linux-low.h (struct linux_target_ops): Ditto.
12784 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12785 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12786 to linux_target_ops.
12787 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12788 reply packet.
12789 * server.c (main): Recognize 'Z' and 'z' packets.
12790
b0ded00b
UW
127912005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12792
12793 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12794 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12795 (the_low_target): Add new members.
12796
8643e2ad
DJ
127972005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12798
12799 * proc-service.c (ps_lgetregs): Search all_processes instead of
12800 all_threads.
12801
fc620387
DJ
128022005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12803
12804 * server.c (start_inferior): Change return type to int.
12805 (attach_inferior): Change sigptr to int *.
12806 (handle_v_cont, handle_v_requests): Change signal to int *.
12807 (main): Change signal to int.
12808
128092005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12810
12811 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12812 * configure.srv: Add m32r*-*-linux*.
12813 * linux-m32r-low.c: New file.
12814
e0e76420
DJ
128152005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12816
12817 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12818
a1928bad
DJ
128192005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12820
12821 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12822 Take unsigned long arguments for PIDs.
12823 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12824 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12825 (wait_for_sigstop, linux_resume_one_process)
12826 (regsets_fetch_inferior_registers, linux_send_signal)
12827 (linux_read_auxv): Likewise. Update the types of variables holding
12828 PIDs. Update format string specifiers.
12829 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12830 * remote-utils.c (prepare_resume_reply): Likewise.
12831 * server.c (cont_thread, general_thread, step_thread)
12832 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12833 unsigned long.
12834 (handle_query): Update format specifiers.
12835 (handle_v_cont, main): Use strtoul for thread IDs.
12836 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12837 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12838 (general_thread, step_thread, thread_from_wait)
12839 (old_thread_from_wait): Update.
12840 * target.h (struct thread_resume): Use unsigned long for THREAD.
12841 (struct target_ops): Use unsigned long for arguments to attach and
12842 thread_alive.
12843
dcdb98d2
DJ
128442005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12845
12846 * acinclude.m4: Include bfd/bfd.m4 directly.
12847 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12848 <agriffis@toolchain.org>.
12849 * aclocal.m4, configure: Regenerated.
12850
bec39cab
AC
128512005-01-07 Andrew Cagney <cagney@gnu.org>
12852
12853 * configure.ac: Rename configure.in, require autoconf 2.59.
12854 * configure: Re-generate.
12855
434c4c77
DJ
128562004-12-08 Daniel Jacobowitz <dan@debian.org>
12857
12858 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12859 LIBS when finished.
12860 * aclocal.m4: Regenerated.
12861 * configure: Regenerated.
12862
db1d3e1b
AS
128632004-11-21 Andreas Schwab <schwab@suse.de>
12864
12865 * linux-m68k-low.c (m68k_num_gregs): Define.
12866 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12867 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12868 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12869 (m68k_breakpoint_at): New. Add to the_low_target.
12870
12871 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12872 srv_linux_thread_db to yes.
12873
43360365
JB
128742004-10-20 Joel Brobecker <brobecker@gnat.com>
12875
12876 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12877 (ARCH_SET_FS): Likewise.
12878 (ARCH_GET_FS): Likewise.
12879 (ARCH_GET_GS): Likewise.
12880
fd500816
DJ
128812004-10-16 Daniel Jacobowitz <dan@debian.org>
12882
12883 * linux-i386-low.c (ps_get_thread_area): New.
12884 * linux-x86-64-low.c (ps_get_thread_area): New.
12885 * linux-low.c: Include <sys/syscall.h>.
12886 (linux_kill_one_process): Don't kill the first thread here.
12887 (linux_kill): Kill the first thread here.
12888 (kill_lwp): New function.
12889 (send_sigstop, linux_send_signal): Use it.
12890 * proc-service.c: Clean up #ifdefs.
12891 (fpregset_info): Delete.
12892 (ps_lgetregs): Update and enable implementation.
12893 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12894 implementations.
12895 * remote-utils.c (struct sym_cache, symbol_cache): New.
12896 (input_interrupt): Print a clearer message.
12897 (async_io_enabled): New variable.
12898 (enable_async_io, disable_async_io): Use it. Update comments.
12899 (look_up_one_symbol): Use the symbol cache.
12900 * thread-db.c (thread_db_look_up_symbols): New function.
12901 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12902
f6de3c42
DJ
129032004-10-16 Daniel Jacobowitz <dan@debian.org>
12904
12905 * configure.in: Test for -rdynamic.
12906 * configure: Regenerated.
12907 * Makefile (INTERNAL_LDFLAGS): New.
12908 (gdbserver, gdbreplay): Use it.
12909
2c0fc042
AC
129102004-09-02 Andrew Cagney <cagney@gnu.org>
12911
12912 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12913
075b3282
DJ
129142004-03-23 Daniel Jacobowitz <drow@mvista.com>
12915
12916 * linux-low.c (linux_wait): Clear all_processes list also.
12917
fa6a77dc
DJ
129182004-03-12 Daniel Jacobowitz <drow@mvista.com>
12919
12920 * linux-low.c: Include <errno.h>. Remove extern declaration of
12921 errno.
12922
6d782a97
DJ
129232004-03-12 Daniel Jacobowitz <drow@mvista.com>
12924
12925 * gdbreplay.c, server.h, utils.c: Update copyright years.
12926
3a7fb99b
DJ
129272004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12928
12929 * server.c (main): Print child status or termination signal from
12930 variable 'signal', not 'sig'.
12931
c3e735a6
DJ
129322004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12933
12934 * linux-low.c (linux_read_memory): Change return type to
12935 int. Check for and return error from ptrace().
12936 * target.c (read_inferior_memory): Change return type to int. Pass
12937 back return status from the_target->read_memory().
12938 * target.h (struct target_ops): Adapt *read_memory() prototype.
12939 Update comment.
12940 (read_inferior_memory): Adapt prototype.
12941 * server.c (main): Return an error packet if
12942 read_inferior_memory() returns an error.
12943
a59d1c82
DJ
129442004-03-04 Daniel Jacobowitz <drow@mvista.com>
12945
12946 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12947 Unify with other clean targets.
12948
dc3f8883
DJ
129492004-02-29 Daniel Jacobowitz <drow@mvista.com>
12950
12951 * server.c (handle_v_cont): Call set_desired_inferior.
12952
89a208da
DJ
129532004-02-29 Daniel Jacobowitz <drow@mvista.com>
12954
12955 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12956
62ea82f5
DJ
129572004-02-29 Daniel Jacobowitz <drow@mvista.com>
12958
12959 * linux-low.c (linux_wait): Unblock async I/O.
12960 (linux_resume): Block and enable async I/O.
12961 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12962 * server.h (block_async_io, unblock_async_io): Add prototypes.
12963
6910d122
DJ
129642004-02-29 Daniel Jacobowitz <drow@mvista.com>
12965
12966 * remote-utils.c (remote_open): Print a status notice after
12967 opening a TCP port.
12968 * server.c (attach_inferior): Print a status notice after
12969 attaching.
12970
129712004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12972
12973 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12974
c89dc5d4
DJ
129752004-02-26 Daniel Jacobowitz <drow@mvista.com>
12976
12977 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12978 error packet.
12979 * server.c, target.h: Update copyright years.
12980
4b8dad4a
RM
129812004-02-25 Roland McGrath <roland@redhat.com>
12982
12983 * target.h (struct target_ops): New member `read_auxv'.
12984 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12985 * linux-low.c (linux_read_auxv): New function.
12986 (linux_target_ops): Initialize `read_auxv' member to that.
12987
d7446758
JB
129882004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12989
12990 Committed by Jim Blandy <jimb@redhat.com>.
12991
12992 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12993 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12994 instead of GPR_SIZE to distiguish s390 and s390x targets.
12995
5544ad89
DJ
129962004-01-31 Daniel Jacobowitz <drow@mvista.com>
12997
12998 * linux-low.c: Update copyright year.
12999 (check_removed_breakpoint): Clear pending_is_breakpoint.
13000 (linux_set_resume_request, linux_queue_one_thread)
13001 (resume_status_pending_p): New functions.
13002 (linux_continue_one_thread): Use process->resume.
13003 (linux_resume): Only resume threads if there are no pending events.
13004 * linux-low.h (struct process_info): Add resume request
13005 pointer.
13006
2a68b70e
DJ
130072004-01-30 Daniel Jacobowitz <drow@mvista.com>
13008
13009 * regcache.c (new_register_cache): Clear the allocated register
13010 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13011
64386c31
DJ
130122003-10-13 Daniel Jacobowitz <drow@mvista.com>
13013
13014 * linux-low.c (linux_resume): Take a struct thread_resume *
13015 argument.
13016 (linux_wait): Update call.
13017 (resume_ptr): New static variable.
13018 (linux_continue_one_thread): Renamed from
13019 linux_continue_one_process. Use resume_ptr.
13020 (linux_resume): Use linux_continue_one_thread.
13021 * server.c (handle_v_cont, handle_v_requests): New functions.
13022 (myresume): New function.
13023 (main): Handle 'v' case.
13024 * target.h (struct thread_resume): New type.
13025 (struct target_ops): Change argument of "resume" to struct
13026 thread_resume *.
13027 (myresume): Delete macro.
13028
c938e9b0
L
130292003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13030
13031 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13032 (uninstall): Support DESTDIR.
13033
7f313d07
BC
13034Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13035
13036 * configure.srv: Add xscale*linux copy of arm*linux entry.
13037
3b2fc2ea
DJ
130382003-07-24 Daniel Jacobowitz <drow@mvista.com>
13039
13040 * linux-arm-low.c (arm_reinsert_addr): New function.
13041 (the_low_target): Add arm_reinsert_addr.
13042
1c0a559e
MK
130432003-07-08 Mark Kettenis <kettenis@gnu.org>
13044
13045 * mem-break.c: Remove whitespace at end of file.
13046
43d5792c
DJ
130472003-06-28 Daniel Jacobowitz <drow@mvista.com>
13048
13049 * configure.in: Check whether we need to prototype strerror.
13050 * server.h: Optionally prototype strerror.
13051 * gdbreplay.c (perror_with_name): Use strerror.
13052 * linux-low.c (linux_attach_lwp): Use strerror.
13053 * utils.c (perror_with_name): Use strerror.
13054 * config.in, configure: Regenerated.
13055
c8a86edf
DJ
130562003-06-28 Daniel Jacobowitz <drow@mvista.com>
13057
13058 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13059 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13060
73d37363
DJ
130612003-06-20 Daniel Jacobowitz <drow@mvista.com>
13062
13063 * Makefile.in (SFILES): Update.
13064 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13065 low-sun3.c: Remove files.
13066
6ad8ae5c
DJ
130672003-06-17 Daniel Jacobowitz <drow@mvista.com>
13068
13069 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13070 (linux_detach_one_process, linux_detach): New functions.
13071 (linux_target_ops): Add linux_detach.
13072 * server.c (main): Handle 'D' packet.
13073 * target.h (struct target_ops): Add "detach" member.
13074 (detach_inferior): Define.
13075
1581182a
MK
130762003-06-13 Mark Kettenis <kettenis@gnu.org>
13077
13078 From Kelley Cook <kelleycook@wideopenwest.com>:
13079 * configure.srv: Accept i[34567]86 variants.
13080
e5379b03
DJ
130812003-06-05 Daniel Jacobowitz <drow@mvista.com>
13082
13083 * linux-low.c (linux_wait_for_event): Correct comment typos.
13084 (linux_resume_one_process): Call check_removed_breakpoint.
13085 (linux_send_signal): New function.
13086 (linux_target_ops): Add linux_send_signal.
13087 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13088 of kill.
13089 * target.h (struct target_ops): Add send_signal.
13090
2ff29de4
JB
130912003-05-29 Jim Blandy <jimb@redhat.com>
13092
13093 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13094 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13095 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13096 away part of the register's value.
13097
254787d4
DJ
130982003-03-26 Daniel Jacobowitz <drow@mvista.com>
13099
13100 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13101 (linux_wait_for_event, linux_init_signals): Likewise.
13102
94e10508
DJ
131032003-03-17 Daniel Jacobowitz <drow@mvista.com>
13104
13105 * configure.in: Check for stdlib.h.
13106 * configure: Regenerated.
13107 * config.in: Regenerated.
13108
4c0711e0
DJ
131092003-01-04 Andreas Schwab <schwab@suse.de>
13110
13111 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13112
ef66e766
AC
131132003-01-02 Andrew Cagney <ac131313@redhat.com>
13114
13115 * Makefile.in: Remove obsolete code.
13116
a1358604
DJ
131172002-11-20 Daniel Jacobowitz <drow@mvista.com>
13118
13119 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13120 defined(PT_FPR0_HI).
13121
23ce3b1c
DJ
131222002-11-17 Stuart Hughes <seh@zee2.com>
13123
13124 * linux-arm-low.c (arm_num_regs): Increase.
13125 (arm_regmap): Include status register.
13126
131272002-11-17 Daniel Jacobowitz <drow@mvista.com>
13128
13129 * linux-low.c (register_addr): Remove incorrect -1 check.
13130
a9fa9f7d
DJ
131312002-08-29 Daniel Jacobowitz <drow@mvista.com>
13132
13133 * linux-low.c (linux_create_inferior): Call setpgid. Return
13134 the new PID.
13135 (unstopped_p, linux_signal_pid): Remove.
13136 (linux_target_ops): Remove linux_signal_pid.
13137 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13138 global instead of target method.
13139 * target.h (struct target_ops): Remove signal_pid. Update comment
13140 for create_inferior.
13141 * server.c (signal_pid): New variable.
13142 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13143 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13144 (attach_inferior): Set signal_pid.
13145
17574093
DJ
131462002-08-23 Daniel Jacobowitz <drow@mvista.com>
13147
13148 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13149
131502002-08-20 Jim Blandy <jimb@redhat.com>
13151
13152 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13153 default for this.
13154
131552002-08-01 Andrew Cagney <cagney@redhat.com>
13156
13157 * Makefile.in: Make chill references obsolete.
13158
131592002-07-24 Kevin Buettner <kevinb@redhat.com>
13160
13161 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13162 * configure: Regenerate.
13163 * config.in: Regenerate.
13164
131652002-07-09 David O'Brien <obrien@FreeBSD.org>
13166
13167 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13168 (perror_with_name, remote_close, remote_open, expect, play): Static.
13169
131702002-07-04 Michal Ludvig <mludvig@suse.cz>
13171
4b8dad4a 13172 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13173 byte offsets instead of an array of indexes.
13174 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13175
131762002-06-13 Daniel Jacobowitz <drow@mvista.com>
13177
13178 * regcache.c: Add comment.
13179
131802002-06-11 Daniel Jacobowitz <drow@mvista.com>
13181
13182 * thread-db.c: New file.
13183 * proc-service.c: New file.
13184 * acinclude.m4: New file.
13185 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13186 proc-service.o, and thread-db.o.
13187 (linux-low.o): Add USE_THREAD_DB.
13188 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13189 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13190 * aclocal.m4: Regenerated.
13191 * config.in: Regenerated.
13192 * configure: Regenerated.
13193 * configure.in: Check for proc_service.h, sys/procfs.h,
13194 thread_db.h, and linux/elf.h headrs.
13195 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13196 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13197 Check for -lthread_db and thread support.
13198 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13199 PowerPC, and SuperH.
13200 * i387-fp.c: Constify arguments.
13201 * i387-fp.h: Likewise.
13202 * inferiors.c: (struct thread_info): Renamed from
13203 `struct inferior_info'. Remove PID member. Use generic inferior
13204 list header. All uses updated.
13205 (inferiors, signal_pid): Removed.
13206 (all_threads): New variable.
13207 (get_thread): Define.
13208 (add_inferior_to_list): New function.
13209 (for_each_inferior): New function.
13210 (change_inferior_id): New function.
13211 (add_inferior): Removed.
13212 (remove_inferior): New function.
13213 (add_thread): New function.
13214 (free_one_thread): New function.
13215 (remove_thread): New function.
13216 (clear_inferiors): Use for_each_inferior and free_one_thread.
13217 (find_inferior): New function.
13218 (find_inferior_id): New function.
13219 (inferior_target_data): Update argument type.
13220 (set_inferior_target_data): Likewise.
13221 (inferior_regcache_data): Likewise.
13222 (set_inferior_regcache_data): Likewise.
13223 * linux-low.c (linux_bp_reinsert): Remove.
13224 (all_processes, stopping_threads, using_thrads)
13225 (struct pending_signals, debug_threads, pid_of): New.
13226 (inferior_pid): Replace with macro.
13227 (struct inferior_linux_data): Remove.
13228 (get_stop_pc, add_process): New functions.
13229 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13230 Use add_process and add_thread.
13231 (linux_attach_lwp): New function, based on old linux_attach. Use
13232 add_process and add_thread. Set stop_expected for new threads.
13233 (linux_attach): New function.
13234 (linux_kill_one_process): New function.
13235 (linux_kill): Kill all LWPs.
13236 (linux_thread_alive): Use find_inferior_id.
13237 (check_removed_breakpoints, status_pending_p): New functions.
13238 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13239 Update. Use WNOHANG. Wait for cloned processes also. Update process
13240 struct for the found process.
13241 (linux_wait_for_event): New function.
13242 (linux_wait): Use it. Support LWPs.
13243 (send_sigstop, wait_for_sigstop, stop_all_processes)
13244 (linux_resume_one_process, linux_continue_one_process): New functions.
13245 (linux_resume): Support LWPs.
13246 (REGISTER_RAW_SIZE): Remove.
13247 (fetch_register): Use register_size instead. Call supply_register.
13248 (usr_store_inferior_registers): Likewise. Call collect_register.
13249 Fix recursive case.
13250 (regsets_fetch_inferior_registers): Improve error message.
13251 (regsets_store_inferior_registers): Add debugging.
13252 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13253 (unstopped_p, linux_signal_pid): New functions.
13254 (linux_target_ops): Add linux_signal_pid.
13255 (linux_init_signals): New function.
13256 (initialize_low): Call it. Initialize using_threads.
13257 * regcache.c (inferior_regcache_data): Add valid
13258 flag.
13259 (get_regcache): Fetch registers lazily. Add fetch argument
13260 and update all callers.
13261 (regcache_invalidate_one, regcache_invalidate): New
13262 functions.
13263 (new_register_cache): Renamed from create_register_cache.
13264 Return the new regcache.
13265 (free_register_cache): Change argument to a void *.
13266 (registers_to_string, registers_from_string): Call get_regcache
13267 with fetch flag set.
13268 (register_data): Make static. Pass fetch flag to get_regcache.
13269 (supply_register): Call get_regcache with fetch flag clear.
13270 (collect_register): Call get_regcache with fetch flag set.
13271 (collect_register_as_string): New function.
13272 * regcache.h: Update.
13273 * remote-utils.c (putpkt): Flush after debug output and use
13274 stderr.
13275 Handle input interrupts while waiting for an ACK.
13276 (input_interrupt): Use signal_pid method.
13277 (getpkt): Flush after debug output and use stderr.
13278 (outreg): Use collect_register_as_string.
13279 (new_thread_notify, dead_thread_notify): New functions.
13280 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13281 and general_thread.
13282 (look_up_one_symbol): Flush after debug output.
13283 * server.c (step_thread, server_waiting): New variables.
13284 (start_inferior): Don't use signal_pid. Update call to mywait.
13285 (attach_inferior): Update call to mywait.
13286 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13287 (main): Don't fetch/store registers explicitly. Use
13288 set_desired_inferior. Support proposed ``Hs'' packet. Update
13289 calls to mywait.
13290 * server.h: Update.
13291 (struct inferior_list, struct_inferior_list_entry): New.
13292 * target.c (set_desired_inferior): New.
13293 (write_inferior_memory): Constify.
13294 (mywait): New function.
13295 * target.h: Update.
13296 (struct target_ops): New signal_pid method.
13297 (mywait): Removed macro, added prototype.
13298
13299 * linux-low.h (regset_func): Removed.
13300 (regset_fill_func, regset_store_func): New.
13301 (enum regset_type): New.
13302 (struct regset_info): Add type field. Use new operation types.
13303 (struct linux_target_ops): stop_pc renamed to get_pc.
13304 Add decr_pc_after_break and breakpoint_at.
13305 (get_process, get_thread_proess, get_process_thread)
13306 (strut process_info, all_processes, linux_attach_lwp)
13307 (thread_db_init): New.
13308
13309 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13310 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13311 (the_low_target): Add new members.
13312 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13313 (i386_store_fpxregset): Constify.
13314 (target_regsets): Add new kind identifier.
13315 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13316 (i386_set_pc): Add debugging.
13317 (i386_breakpoint_at): New function.
13318 (the_low_target): Add new members.
13319 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13320 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13321 (mips_breakpoint_at): New.
13322 (the_low_target): Add new members.
13323 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13324 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13325 (the_low_target): Add new members.
13326 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13327 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13328 (the_low_target): Add new members.
13329 * linux-x86-64-low.c (target_regsets): Add new kind
13330 identifier.
13331
133322002-05-15 Daniel Jacobowitz <drow@mvista.com>
13333
13334 From Martin Pool <mbp@samba.org>:
13335 * server.c (gdbserver_usage): New function.
13336 (main): Call it.
13337
133382002-05-14 Daniel Jacobowitz <drow@mvista.com>
13339
13340 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13341 stop_at -> stop_pc.
13342
133432002-05-04 Andrew Cagney <ac131313@redhat.com>
13344
13345 * Makefile.in: Remove obsolete code.
13346
133472002-04-24 Michal Ludvig <mludvig@suse.cz>
13348
13349 * linux-low.c (regsets_fetch_inferior_registers),
13350 (regsets_store_inferior_registers): Removed cast to int from
13351 ptrace() calls.
13352 * regcache.h: Added declaration of struct inferior_info.
13353
133542002-04-20 Daniel Jacobowitz <drow@mvista.com>
13355
13356 * inferiors.c (struct inferior_info): Add regcache_data.
13357 (add_inferior): Call create_register_cache.
13358 (clear_inferiors): Call free_register_cache.
13359 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13360 * regcache.c (struct inferior_regcache_data): New.
13361 (registers): Remove.
13362 (get_regcache): New function.
13363 (create_register_cache, free_register_cache): New functions.
13364 (set_register_cache): Don't initialize the register cache here.
13365 (registers_to_string, registers_from_string, register_data): Call
13366 get_regcache.
13367 * regcache.h: Add prototypes.
13368 * server.h: Likewise.
13369
133702002-04-20 Daniel Jacobowitz <drow@mvista.com>
13371
13372 * mem-break.c: New file.
13373 * mem-break.h: New file.
13374 * Makefile.in: Add mem-break.o rule; update server.h
13375 dependencies.
13376 * inferiors.c (struct inferior_info): Add target_data
13377 member.
13378 (clear_inferiors): Free target_data member if set.
13379 (inferior_target_data, set_inferior_target_data): New functions.
13380 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13381 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13382 * linux-low.c (linux_bp_reinsert): New variable.
13383 (struct inferior_linux_data): New.
13384 (linux_create_inferior): Use set_inferior_target_data.
13385 (linux_attach): Likewise. Call add_inferior.
13386 (linux_wait_for_one_inferior): New function.
13387 (linux_wait): Call it.
13388 (linux_write_memory): Add const.
13389 (initialize_low): Call set_breakpoint_data.
13390 * linux-low.h (struct linux_target_ops): Add breakpoint
13391 handling members.
13392 * server.c (attach_inferior): Remove extra add_inferior
13393 call.
13394 * server.h: Include mem-break.h. Update inferior.c
13395 prototypes.
13396 * target.c (read_inferior_memory)
13397 (write_inferior_memory): New functions.
13398 * target.h (read_inferior_memory)
13399 (write_inferior_memory): Change macros to prototypes.
13400 (struct target_ops): Update comments. Add const to write_memory
13401 definition.
13402
134032002-04-11 Daniel Jacobowitz <drow@mvista.com>
13404
13405 * linux-low.c (usr_store_inferior_registers): Support
13406 registers which are allowed to fail to store.
13407 * linux-low.h (linux_target_ops): Likewise.
13408 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13409 (ppc_cannot_store_register): FPSCR may not be storable.
13410
134112002-04-09 Daniel Jacobowitz <drow@mvista.com>
13412
13413 * server.h: Include <string.h> if HAVE_STRING_H.
13414 * ChangeLog: Correct paths in last ChangeLog entry.
13415
134162002-04-09 Daniel Jacobowitz <drow@mvista.com>
13417
13418 * linux-low.h: Remove obsolete prototypes.
13419 (struct linux_target_ops): New.
13420 (extern the_low_target): New.
13421 * linux-low.c (num_regs, regmap): Remove declarations.
13422 (register_addr): Use the_low_target explicitly.
13423 (fetch_register): Likewise.
13424 (usr_fetch_inferior_registers): Likewise.
13425 (usr_store_inferior_registers): Likewise.
13426 * linux-arm-low.c (num_regs): Remove.
13427 (arm_num_regs): Define.
13428 (arm_regmap): Renamed from regmap, made static.
13429 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13430 made static.
13431 (arm_cannot_store_register): Renamed from cannot_store_register,
13432 made static.
13433 (the_low_target): New.
13434 * linux-i386-low.c (num_regs): Remove.
13435 (i386_num_regs): Define.
13436 (i386_regmap): Renamed from regmap, made static.
13437 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13438 made static.
13439 (i386_cannot_store_register): Renamed from cannot_store_register,
13440 made static.
13441 (the_low_target): New.
13442 * linux-ia64-low.c (num_regs): Remove.
13443 (ia64_num_regs): Define.
13444 (ia64_regmap): Renamed from regmap, made static.
13445 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13446 made static.
13447 (ia64_cannot_store_register): Renamed from cannot_store_register,
13448 made static.
13449 (the_low_target): New.
13450 * linux-m68k-low.c (num_regs): Remove.
13451 (m68k_num_regs): Define.
13452 (m68k_regmap): Renamed from regmap, made static.
13453 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13454 made static.
13455 (m68k_cannot_store_register): Renamed from cannot_store_register,
13456 made static.
13457 (the_low_target): New.
13458 * linux-mips-low.c (num_regs): Remove.
13459 (mips_num_regs): Define.
13460 (mips_regmap): Renamed from regmap, made static.
13461 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13462 made static.
13463 (mips_cannot_store_register): Renamed from cannot_store_register,
13464 made static.
13465 (the_low_target): New.
13466 * linux-ppc-low.c (num_regs): Remove.
13467 (ppc_num_regs): Define.
13468 (ppc_regmap): Renamed from regmap, made static.
13469 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13470 made static.
13471 (ppc_cannot_store_register): Renamed from cannot_store_register,
13472 made static.
13473 (the_low_target): New.
13474 * linux-s390-low.c (num_regs): Remove.
13475 (s390_num_regs): Define.
13476 (s390_regmap): Renamed from regmap, made static.
13477 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13478 made static.
13479 (s390_cannot_store_register): Renamed from cannot_store_register,
13480 made static.
13481 (the_low_target): New.
13482 * linux-sh-low.c (num_regs): Remove.
13483 (sh_num_regs): Define.
13484 (sh_regmap): Renamed from regmap, made static.
13485 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13486 made static.
13487 (sh_cannot_store_register): Renamed from cannot_store_register,
13488 made static.
13489 (the_low_target): New.
13490 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13491 (the_low_target): New.
13492
134932002-04-09 Daniel Jacobowitz <drow@mvista.com>
13494
13495 * Makefile.in: Add stamp-h target.
13496 * configure.in: Create stamp-h.
13497 * configure: Regenerated.
13498
134992002-04-09 Daniel Jacobowitz <drow@mvista.com>
13500
13501 * inferiors.c: New file.
13502 * target.c: New file.
13503 * target.h: New file.
13504 * Makefile.in: Add target.o and inferiors.o. Update
13505 dependencies.
13506 * linux-low.c (inferior_pid): New static variable,
13507 moved from server.c.
13508 (linux_create_inferior): Renamed from create_inferior.
13509 Call add_inferior. Return 0 on success instead of a PID.
13510 (linux_attach): Renamed from myattach.
13511 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13512 (linux_thread_alive): Renamed from mythread_alive.
13513 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13514 child dies.
13515 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13516 (regsets_store_inferior_registers): Correct error message.
13517 Add missing ``return 0''.
13518 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13519 (linux_store_registers): Renamed from store_inferior_registers.
13520 (linux_read_memory): Renamed from read_inferior_memory.
13521 (linux_write_memory): Renamed from write_inferior_memory.
13522 (linux_target_ops): New structure.
13523 (initialize_low): Call set_target_ops ().
13524 * remote-utils.c (unhexify): New function.
13525 (hexify): New function.
13526 (input_interrupt): Send signals to ``signal_pid''.
13527 * server.c (inferior_pid): Remove.
13528 (start_inferior): Update create_inferior call.
13529 (attach_inferior): Call add_inferior.
13530 (handle_query): New function.
13531 (main): Call handle_query for `q' packets.
13532 * server.h: Include "target.h". Remove obsolete prototypes.
13533 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13534
135352002-04-09 Daniel Jacobowitz <drow@mvista.com>
13536
13537 * Makefile.in: Add WARN_CFLAGS. Update configury
13538 dependencies.
13539 * configure.in: Check for <string.h>
13540 * configure: Regenerate.
13541 * config.in: Regenerate.
13542 * gdbreplay.c: Include needed system headers.
13543 (remote_open): Remove strchr prototype.
13544 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13545 * regcache.c (supply_register): Change buf argument to const void *.
13546 (supply_register_by_name): Likewise.
13547 (collect_register): Change buf argument to void *.
13548 (collect_register_by_name): Likewise.
13549 * regcache.h: Add missing prototypes.
13550 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13551 * server.c (handle_query): New function.
13552 (attached): New static variable, moved out of main.
13553 (main): Quiet longjmp clobber warnings.
13554 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13555 * utils.c (error): Remove NORETURN.
13556 (fatal): Likewise.
This page took 1.618375 seconds and 4 git commands to generate.