Revert "ABS32"
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
b00b61e1
MK
12016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2
3 * linux-s390-low.c (s390_supports_z_point_type): New function.
4 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5
553cb527
YQ
62016-02-16 Yao Qi <yao.qi@linaro.org>
7
8 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9 PC. Get pc from regcache_read_pc.
10
a5652c21
YQ
112016-02-12 Yao Qi <yao.qi@linaro.org>
12
13 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
14 or linux_get_pc_32bit.
15 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
16
ed443b61
YQ
172016-02-12 Yao Qi <yao.qi@linaro.org>
18
19 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
20 arm_linux_get_next_pcs_fixup.
21
020ecd38
MK
222016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
23
24 * tracepoint.c (x_tracepoint_action_download): Change
25 write_inferior_data_ptr to write_inferior_data_pointer.
26 (cmd_qtstart): Likewise.
27 (write_inferior_data_ptr): Remove.
28 (download_agent_expr): Change write_inferior_data_ptr to
29 write_inferior_data_pointer.
30 (download_tracepoint_1): Likewise.
31 (download_tracepoint): Likewise.
32 (download_trace_state_variables): Likewise.
33
7cae9051
WW
342016-02-11 Wei-cheng Wang <cole945@gmail.com>
35 Marcin Kościelnicki <koriakin@0x04.net>
36
37 * tracepoint.c (struct tracepoint_action_ops): Remove.
38 (struct tracepoint_action): Remove ops.
39 (m_tracepoint_action_download, r_tracepoint_action_download)
40 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
41 size and offset accordingly.
42 (m_tracepoint_action_ops, r_tracepoint_action_ops)
43 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
44 (tracepoint_action_send, tracepoint_action_download): New functions.
45 Helpers for trace action handlers.
46 (add_tracepoint_action): Remove setup actions ops.
47 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
48
9f6a71b4
YQ
492016-02-10 Yao Qi <yao.qi@linaro.org>
50
51 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
52
1e94266c
SM
532016-02-09 Simon Marchi <simon.marchi@ericsson.com>
54
55 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
56 to AC_OUTPUT.
57 * configure: Regenerate.
58
8adce034
SM
592016-02-09 Simon Marchi <simon.marchi@ericsson.com>
60
61 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
62 void * to gdb_byte *.
63 * linux-low.c (siginfo_fixup): Likewise.
64 (linux_xfer_siginfo): Likewise.
65 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
66 Likewise.
67 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
68
93813b37
WT
692016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
70
71 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
72 to srv_tgtobj.
73 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
74 to srv_tgtobj.
75 * linux-x86-low.c [__x86_64__]: Include
76 "nat/amd64-linux-siginfo.h".
77 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
78 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
79 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
80 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
81 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
82 (cpt_si_fd, si_timerid, si_overrun): Move from
83 nat/amd64-linux-siginfo.c.
84 * Makefile.in (amd64-linux-siginfo.o:): New rule.
85
8424cc97
SM
862016-01-28 Simon Marchi <simon.marchi@ericsson.com>
87
88 * server.c (skip_to_semicolon): Remove.
89 (process_point_options): Use strchrnul instead of
90 skip_to_semicolon.
91
4d18591b
YQ
922016-01-26 Yao Qi <yao.qi@linaro.org>
93
94 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
95 * linux-low.c (install_software_single_step_breakpoints): Don't
96 call regcache_read_pc.
97 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
98 argument pc.
99
d8020970
YQ
1002016-01-26 Yao Qi <yao.qi@linaro.org>
101
102 * linux-low.c (install_software_single_step_breakpoints): Call
103 regcache_read_pc instead of get_pc.
104
8b207339
YQ
1052016-01-26 Yao Qi <yao.qi@linaro.org>
106
107 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
108 (unblock_async_io): Rename to ...
109 (block_unblock_async_io): ... it. New function.
110 (enable_async_io): Don't install SIGIO handler. Unblock it
111 instead.
112 (disable_async_io): Don't ignore SIGIO. Block it instead.
113 (initialize_async_io): Install SIGIO handler. Don't call
114 unblock_async_io.
115
18879fef
YQ
1162016-01-26 Yao Qi <yao.qi@linaro.org>
117
118 * remote-utils.c (getpkt): If the buffer isn't empty, and the
119 first character is '\003', call *the_target->request_interrupt.
120
a0f8e08a
YQ
1212016-01-25 Yao Qi <yao.qi@linaro.org>
122
123 * remote-utils.c (new_thread_notify): Remove.
124 (dead_thread_notify): Likewise.
125 * remote-utils.h (new_thread_notify): Remove declaration.
126 (dead_thread_notify): Likewise.
127
cc5fd9ab
MK
1282016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
129
130 * gdb.trace/pending.exp: Fix expected message on continue.
131
99e8eb11
MK
1322016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
133
134 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
135 it works properly on big-endian machines where sizeof (CORE_ADDR)
136 != sizeof (void *).
137
a994041d
PA
1382016-01-21 Pedro Alves <palves@redhat.com>
139
140 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
141 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
142 * configure: Regenerate.
143
f7a6a40d
YQ
1442016-01-21 Yao Qi <yao.qi@linaro.org>
145
146 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
147 is_thumb and set it according to CPSR saved on the stack.
148 (get_next_pcs_syscall_next_pc): Pass is_thumb to
149 arm_sigreturn_next_pc.
150
6f69e520
YQ
1512016-01-18 Yao Qi <yao.qi@linaro.org>
152
153 * linux-low.c (linux_set_pc_64bit): New function.
154 (linux_get_pc_64bit): New function.
155 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
156 Declare.
157 * linux-sparc-low.c (debug_threads): Remove declaration.
158 (sparc_get_pc): Remove.
159 (the_low_target): Use linux_get_pc_64bit instead of
160 sparc_get_pc.
161 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
162 (the_low_target): Use linux_get_pc_64bit and
163 linux_set_pc_64bit.
164
276d4552
YQ
1652016-01-18 Yao Qi <yao.qi@linaro.org>
166
167 * linux-arm-low.c (debug_threads): Remove declaration.
168 (arm_get_pc, arm_set_pc): Remove.
169 (the_low_target): Use linux_get_pc_32bit and
170 linux_set_pc_32bit.
171 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
172 (the_low_target): Use linux_get_pc_32bit and
173 linux_set_pc_32bit.
174 * linux-cris-low.c (debug_threads): Remove declaration.
175 (cris_get_pc, cris_set_pc,): Remove.
176 (the_low_target): Use linux_get_pc_32bit and
177 linux_set_pc_32bit.
178 * linux-crisv32-low.c (debug_threads): Remove declaration.
179 (cris_get_pc, cris_set_pc): Remove.
180 (the_low_target): Use linux_get_pc_32bit and
181 linux_set_pc_32bit.
182 * linux-low.c: Include inttypes.h.
183 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
184 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
185 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
186 (the_low_target): Use linux_get_pc_32bit and
187 linux_set_pc_32bit.
188 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
189 (the_low_target): Use linux_get_pc_32bit and
190 linux_set_pc_32bit.
191 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
192 (the_low_target): Use linux_get_pc_32bit and
193 linux_set_pc_32bit.
194 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
195 (the_low_target): Use linux_get_pc_32bit and
196 linux_set_pc_32bit.
197 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
198 (the_low_target): Use linux_get_pc_32bit and
199 linux_set_pc_32bit.
200
eb0edac8
GB
2012016-01-18 Gary Benson <gbenson@redhat.com>
202
203 * configure.ac (AC_FUNC_FORK): New check.
204 * config.in: Regenerate.
205 * configure: Likewise.
206
1b451dda
YQ
2072016-01-14 Yao Qi <yao.qi@linaro.org>
208
209 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
210 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
211 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
212 arm_get_next_pcs_ctor.
213
82075af2
JS
2142016-01-12 Josh Stone <jistone@redhat.com>
215 Philippe Waroquiers <philippe.waroquiers@skynet.be>
216
217 * inferiors.h: Include "gdb_vecs.h".
218 (struct process_info): Add syscalls_to_catch.
219 * inferiors.c (remove_process): Free syscalls_to_catch.
220 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
221 syscall_return stops.
222 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
223 * server.c (handle_general_set): Handle QCatchSyscalls.
224 (handle_query): Report support for QCatchSyscalls.
225 * target.h (struct target_ops): Add supports_catch_syscall.
226 (target_supports_catch_syscall): New macro.
227 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
228 (struct lwp_info): Add syscall_state.
229 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
230 Maintain syscall_state and syscalls_to_catch across exec.
231 (get_syscall_trapinfo): New function, proxy to the_low_target.
232 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
233 (linux_low_filter_event): Toggle syscall_state entry/return for
234 syscall traps, and set it ignored for all others.
235 (gdb_catching_syscalls_p): New function.
236 (gdb_catch_this_syscall_p): New function.
237 (linux_wait_1): Handle SYSCALL_SIGTRAP.
238 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
239 (linux_supports_catch_syscall): New function.
240 (linux_target_ops): Install it.
241 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
242 (the_low_target): Install it.
243
8f13a3ce
MF
2442016-01-12 Mike Frysinger <vapier@gentoo.org>
245
246 * acinclude.m4: Include new ../warning.m4 file.
247 * configure: Regenerated.
248 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
249
5b3da067
MF
2502016-01-12 Mike Frysinger <vapier@gentoo.org>
251
252 * ax.c (is_goto_target): Mark static.
253 * linux-low.c (register_addr): Likewise.
254 (linux_fetch_registers, linux_store_registers): Likewise.
255 * mem-break.c (any_persistent_commands): Fix old prototype.
256 (add_commands_to_breakpoint): Mark static.
257 * regcache.c (find_register_by_name): Delete unused func.
258 * remote-utils.c (hex_or_minus_one): Mark static.
259 * server.c (monitor_show_help): Mark static.
260 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
261 handle_v_requests): Likewise.
262
bc504a31
PA
2632016-01-12 Pedro Alves <palves@redhat.com>
264
265 Remove use of the registered trademark symbol throughout.
266
5a0dd67a
YQ
2672016-01-08 Yao Qi <yao.qi@linaro.org>
268
269 * remote-utils.c (getpkt): If c is '\003', call target hook
270 request_interrupt.
271
b2ca446f
YQ
2722016-01-06 Yao Qi <yao.qi@linaro.org>
273
274 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
275 linux-aarch32-low.c.
276 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
277 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
278 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
279 (thumb2_breakpoint): Declare.
280 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
281 linux-aarch32-low.h.
282 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
283 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
284 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
285
edd88788
JB
2862016-01-01 Joel Brobecker <brobecker@adacore.com>
287
288 * gdbreplay.c (gdbreplay_version): Change copyright year in
289 version message.
290 * server.c (gdbserver_version): Likewise.
291
65da7f14
PP
2922015-12-28 Patrick Palka <patrick@parcs.ath.cx>
293
294 * server.c (crc32_table): Delete.
295 (crc32): Use libiberty's xcrc32 function.
296
4abd5ed2
JB
2972015-12-22 Joel Brobecker <brobecker@adacore.com>
298
299 * lynx-low.c (lynx_delete_thread_callback): New function.
300 (lynx_mourn): Properly delete our process and all of its
301 threads. Remove call to clear_inferiors.
302
0e50fe5c
JB
3032015-12-22 Joel Brobecker <brobecker@adacore.com>
304
305 * target.c (thread_search_callback): Add check that
306 the thread_stopped target callback is not NULL before
307 calling it.
308
35adc03f
YQ
3092015-12-21 Yao Qi <yao.qi@linaro.org>
310
311 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
312 arm breakpoint.
313
bd2b2909
AT
3142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
315
316 * server.c (handle_query): Call target_supports_software_single_step.
317
7fe5e27e
AT
3182015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
319
320 * linux-low.c (single_step): New function.
321 (linux_resume_one_lwp_throw): Call single_step.
322 (start_step_over): Likewise.
323
d9311bfa
AT
3242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
325
326 * Makefile.in (SFILES): Append arch/arm-linux.c,
327 arch/arm-get-next-pcs.c.
328 (arm-linux.o): New rule.
329 (arm-get-next-pcs.o): New rule.
330 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
331 arm-linux.o.
332 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
333 to linux-aarch32-low.c.
334 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
335 (arm_breakpoint_len, thumb_breakpoint): Likewise.
336 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
337 (thumb2_breakpoint_len): Likewise.
338 (arm_is_thumb_mode): Make non-static.
339 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
340 from linux-aarch32-low.c.
341 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
342 (arm_breakpoint_len, thumb_breakpoint): Likewise.
343 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
344 (thumb2_breakpoint_len): Likewise.
345 (arm_is_thumb_mode): New declaration.
346 * linux-arm-low.c: Include arch/arm-linux.h
347 aarch/arm-get-next-pcs.h, sys/syscall.h.
348 (get_next_pcs_ops): New struct.
349 (get_next_pcs_addr_bits_remove): New function.
350 (get_next_pcs_is_thumb): New function.
351 (get_next_pcs_read_memory_unsigned_integer): Likewise.
352 (arm_sigreturn_next_pc): Likewise.
353 (get_next_pcs_syscall_next_pc): Likewise.
354 (arm_gdbserver_get_next_pcs): Likewise.
355 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
356 Initialize.
357 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
358 * server.h: Include gdb_vecs.h.
359
68ce2059
AT
3602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
361
362 * Makefile.in (SFILES): Append common/common-regcache.c.
363 (OBS): Append common-regcache.o.
364 (common-regcache.o): New rule.
365 * regcache.c (init_register_cache): Initialize cache to
366 REG_UNAVAILABLE.
367 (regcache_raw_read_unsigned): New function.
368 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
369 register_status enum.
370
fa5308bd
AT
3712015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
372
373 * linux-aarch64-low.c (the_low_targets): Rename
374 breakpoint_reinsert_addr to get_next_pcs.
375 * linux-arm-low.c (the_low_targets): Likewise.
376 * linux-bfin-low.c (the_low_targets): Likewise.
377 * linux-cris-low.c (the_low_targets): Likewise.
378 * linux-crisv32-low.c (the_low_targets): Likewise.
379 * linux-low.c (can_software_single_step): Likewise.
380 (install_software_single_step_breakpoints): New function.
381 (start_step_over): Use install_software_single_step_breakpoints.
382 * linux-low.h: New CORE_ADDR vector.
383 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
384 get_next_pcs.
385 * linux-mips-low.c (the_low_targets): Likewise.
386 * linux-nios2-low.c (the_low_targets): Likewise.
387 * linux-sparc-low.c (the_low_targets): Likewise.
388
4a6ed09b
PA
3892015-12-17 Pedro Alves <palves@redhat.com>
390
391 * linux-low.c (linux_kill_one_lwp): Remove references to
392 LinuxThreads.
393 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
394 to 'kill'.
395 (linux_init_signals): Delete.
396 (initialize_low): Adjust.
397 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
398
7544db95
PA
3992015-12-16 Pedro Alves <palves@redhat.com>
400
401 * configure.ac (compiler warning flags): When testing a
402 -Wno-foo option, check whether -Wfoo works instead.
403 * configure: Regenerate.
404
8020350c
DB
4052015-12-11 Don Breazeal <donb@codesourcery.com>
406
407 * server.c (process_serial_event): Don't exit from gdbserver
408 in remote mode if there are still active inferiors.
409
db91f502
YQ
4102015-12-11 Yao Qi <yao.qi@linaro.org>
411
412 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
413 arm_breakpoint_at if the process is 32-bit.
414
b37a6290
YQ
4152015-12-11 Yao Qi <yao.qi@linaro.org>
416
417 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
418 arm breakpoint.
419
17b1509a
YQ
4202015-12-07 Yao Qi <yao.qi@linaro.org>
421
422 * configure.srv: Append arm.o to srv_tgtobj for
423 aarch64*-*-linux* target.
424 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
425 from linux-arm-low.c.
426 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
427 (arm_breakpoint_len, thumb_breakpoint): Likewise.
428 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
429 (thumb2_breakpoint_len): Likewise.
430 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
431 (arm_breakpoint_kinds): Likewise.
432 (arm_breakpoint_kind_from_pc): Likewise.
433 (arm_sw_breakpoint_from_kind): Likewise.
434 (arm_breakpoint_kind_from_current_state): Likewise.
435 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
436 (arm_sw_breakpoint_from_kind): Declare.
437 (arm_breakpoint_kind_from_current_state): Declare.
438 (arm_breakpoint_at): Declare.
439 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
440 arm_sw_breakpoint_from_kind if process is 32-bit.
441 (aarch64_breakpoint_kind_from_pc): New function.
442 (aarch64_breakpoint_kind_from_current_state): New function.
443 (the_low_target): Initialize fields breakpoint_kind_from_pc
444 and breakpoint_kind_from_current_state.
445 * linux-arm-low.c (arm_breakpoint_kinds): Move to
446 linux-aarch32-low.c.
447 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
448 (arm_breakpoint, arm_breakpoint_len): Likewise.
449 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
450 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
451 (arm_is_thumb_mode): Likewise.
452 (arm_breakpoint_at): Likewise.
453 (arm_breakpoint_kind_from_pc): Likewise.
454 (arm_sw_breakpoint_from_kind): Likewise.
455 (arm_breakpoint_kind_from_current_state): Likewise.
456
457 Revert:
458 2015-08-04 Yao Qi <yao.qi@linaro.org>
459
460 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
461 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
462 * server.c (extended_protocol): Remove "static".
463 * server.h (extended_protocol): Declare it.
464
ece66d65
JS
4652015-12-04 Josh Stone <jistone@redhat.com>
466
467 * target.h (struct target_ops) <arch_setup>: Rename to ...
468 (struct target_ops) <post_create_inferior>: ... this.
469 (target_arch_setup): Rename to ...
470 (target_post_create_inferior): ... this, calling post_create_inferior.
471 * server.c (start_inferior): Update target_arch_setup calls to
472 target_post_create_inferior.
473 * linux-low.c (linux_low_ptrace_options): Forward declare.
474 (linux_arch_setup): Update its comment for general use.
475 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
476 (struct linux_target_ops): Use linux_post_create_inferior.
477 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
478 to post_create_inferior.
479 * nto-low.c (struct nto_target_ops): Likewise.
480 * spu-low.c (struct spu_target_ops): Likewise.
481 * win32-low.c (struct win32_target_ops): Likewise.
482
e58c48b4
AT
4832015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
484
485 * linux-arm-low.c: Remove duplicate arch/arm.h include.
486
fbec8956
AT
4872015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
488
489 * linux-arm-low.c (arm_reinsert_addr): Remove function.
490 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
491 * linux-cris-low.c (cris_reinsert_addr> Remove function.
492 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
493 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
494 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
495 * linux-mips-low.c (mips_reinsert_addr): Remove function.
496 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
497 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
498 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
499 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
500 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
501
9b4c5f87
AT
5022015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
503
504 * linux-low.c (linux_look_up_symbols): Don't call
505 linux_supports_traceclone.
506 * linux-low.h (thread_db_init): Remove use_events argument.
507 * thread-db.c (thread_db_use_event): Remove global variable.
508 (struct thread_db) <td_thr_event_enable_p>: Remove field.
509 (struct thread_db) <td_create_bp>: Remove field.
510 (thread_db_create_event): Remove function.
511 (thread_db_enable_reporting): Likewise.
512 (find_one_thread): Don't check for thread_db_use_events.
513 (attach_thread): Likewise.
514 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
515 (try_thread_db_load_1): Don't check for thread_db_use_events.
516 (thread_db_init): Remove use_events argument and thread events
517 handling.
518 (remove_thread_event_breakpoints): Remove function.
519 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
520
7d00775e
AT
5212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
522
523 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
524 New function.
525 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
526 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
527 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
528 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
529 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
530 Initialize.
531 * linux-crisv32-low.c (cris_supports_hardware_single_step):
532 New function.
533 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
534 * linux-low.c (can_hardware_single_step): Use
535 supports_hardware_single_step.
536 (can_software_single_step): New function.
537 (start_step_over): Call can_software_single_step.
538 (linux_supports_hardware_single_step): New function.
539 (struct target_ops) <supports_software_single_step>: Initialize.
540 * linux-low.h (struct linux_target_ops)
541 <supports_hardware_single_step>: Initialize.
542 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
543 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
544 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
545 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
546 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
547 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
548 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
549 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
550 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
551 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
552 Initialize.
553 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
554 (struct linux_target_ops) <tile_supports_hardware_single_step>:
555 Initialize.
556 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
557 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
558 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
559 New function.
560 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
561 * target.h (struct target_ops): <supports_software_single_step>:
562 New field.
563 (target_supports_software_single_step): New macro.
564
2d97cd35
AT
5652015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
566
567 * linux-low.c (linux_wait_1): Fix pc advance condition.
568 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
569 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
570
769ef81f
AT
5712015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
572
573 * linux-arm-low.c (arm_is_thumb_mode): New function.
574 (arm_breakpoint_at): Use arm_is_thumb_mode.
575 (arm_breakpoint_kind_from_current_state): New function.
576 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
577 Initialize.
578 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
579 (linux_breakpoint_kind_from_current_state): New function.
580 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
581 * linux-low.h (struct linux_target_ops)
582 <breakpoint_kind_from_current_state>: New field.
583 * target.h (struct target_ops): Likewise.
584 (target_breakpoint_kind_from_current_state): New macro.
585
1bebeeca
PA
5862015-11-30 Pedro Alves <palves@redhat.com>
587
588 * linux-low.c (linux_resume): Wake up the event loop before
589 returning.
590
a67a9fae
PA
5912015-11-30 Pedro Alves <palves@redhat.com>
592
593 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
594 check.
595 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
596 to -1.
597 * target.c (struct thread_search): New structure.
598 (thread_search_callback): New function.
599 (prev_general_thread): New global.
600 (prepare_to_access_memory, done_accessing_memory): New functions.
601 * target.h (prepare_to_access_memory, done_accessing_memory):
602 Replace macros with function declarations.
603
f2faf941
PA
6042015-11-30 Pedro Alves <palves@redhat.com>
605
606 PR 14618
607 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
608 report TARGET_WAITKIND_NO_RESUMED.
609 * remote-utils.c (prepare_resume_reply): Handle
610 TARGET_WAITKIND_NO_RESUMED.
611 * server.c (report_no_resumed): New global.
612 (handle_query) <qSupported>: Handle "no-resumed+". Report
613 "no-resumed+" support.
614 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
615 return error if the client doesn't support no-resumed events.
616 (push_stop_notification): New function.
617 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
618 events if the client supports them.
619
a681f9c9
PA
6202015-11-30 Pedro Alves <palves@redhat.com>
621
622 * linux-low.c (thread_still_has_status_pending_p): Don't check
623 vCont;t here.
624 (lwp_resumed): New function.
625 (status_pending_p_callback): Return early if the LWP is not
626 supposed to be resumed.
627
65706a29
PA
6282015-11-30 Pedro Alves <palves@redhat.com>
629
630 * linux-low.c (handle_extended_wait): Assert that the LWP's
631 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
632 thread create events, leave the new child's status pending.
633 (linux_low_filter_event): If GDB wants to hear about thread exit
634 events, leave the LWP marked dead and don't delete it.
635 (linux_wait_for_event_filtered): Don't check for thread exit.
636 (filter_exit_event): New function.
637 (linux_wait_1): Use it, when returning an exit event.
638 (linux_resume_one_lwp_throw): Assert that the LWP's
639 waitstatus is TARGET_WAITKIND_IGNORE.
640 * remote-utils.c (prepare_resume_reply): Handle
641 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
642 * server.c (report_thread_events): New global.
643 (handle_general_set): Handle QThreadEvents.
644 (handle_query) <qSupported>: Handle and report QThreadEvents+;
645 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
646 TARGET_WAITKIND_THREAD_EXITED.
647 * server.h (report_thread_events): Declare.
648
56cf4bed
PA
6492015-11-30 Pedro Alves <palves@redhat.com>
650
651 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
652 the thread's last_resume_kind was resume_stop.
653
500c1d85
PA
6542015-11-30 Pedro Alves <palves@redhat.com>
655
656 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
657 before returning.
658
de979965
PA
6592015-11-30 Pedro Alves <palves@redhat.com>
660
661 * server.c (handle_v_requests): Handle vCtrlC.
662
34c65914
PA
6632015-11-30 Pedro Alves <palves@redhat.com>
664
665 * gdbthread.h (find_any_thread_of_pid): Declare.
666 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
667 functions.
668 * server.c (handle_query): If current_thread is NULL, look for
669 another thread of the selected process.
670
79efa585 6712015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 672 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
673
674 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
675 * server.c (handle_qxfer_threads_worker): Refactor to include thread
676 name in reply.
677 * target.h (struct target_ops) <thread_name>: New field.
678 (target_thread_name): New macro.
679
80d82c19
JB
6802015-11-23 Joel Brobecker <brobecker@adacore.com>
681
682 * regcache.h (regcache_invalidate_pid): Add declaration.
683 * regcache.c (regcache_invalidate_pid): New function, extracted
684 from regcache_invalidate.
685 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
686 Add trivial documentation comment.
687 * lynx-low.c: Use regcache_invalidate_pid instead of
688 regcache_invalidate.
689
64da5dd5
JB
6902015-11-23 Joel Brobecker <brobecker@adacore.com>
691
692 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
693 and Elf64_auxv_t if the target is Android.
694
37ce4055
DE
6952015-11-22 Doug Evans <xdje42@gmail.com>
696
697 * target.h: #include <sys/types.h>.
698
06e03fff
PA
6992015-11-19 Pedro Alves <palves@redhat.com>
700
701 * linux-low.c (linux_process_qsupported): Change prototype.
702 Adjust.
703 * linux-low.h (struct linux_target_ops) <process_qsupported>:
704 Change prototype.
705 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
706 and adjust to loop over all features.
707 * server.c (handle_query) <qSupported>: Adjust to call
708 target_process_qsupported once, passing it a vector of unprocessed
709 features.
710 * target.h (struct target_ops) <process_qsupported>: Change
711 prototype.
712 (target_process_qsupported): Adjust.
713
9a084706
PA
7142015-11-19 Pedro Alves <palves@redhat.com>
715
716 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
717 mode.
718 * configure: Regenerate.
719
dad44a1f
PA
7202015-11-19 Pedro Alves <palves@redhat.com>
721
722 * configure: Regenerate.
723
231c0592
YQ
7242015-11-19 Yao Qi <yao.qi@linaro.org>
725
726 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
727 type to uint32_t.
728
6c1c9a8b
YQ
7292015-11-19 Yao Qi <yao.qi@linaro.org>
730
731 * linux-aarch64-low.c (enum aarch64_operand_type): New.
732 (struct aarch64_operand): Move enum out.
733
9caa3311
YQ
7342015-11-19 Yao Qi <yao.qi@linaro.org>
735
736 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
737 struct user_fpsimd_state *.
738 (aarch64_store_fpregset): Likewise.
739
6a69a054
YQ
7402015-11-19 Yao Qi <yao.qi@linaro.org>
741
742 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
743 struct user_pt_regs *.
744 (aarch64_store_gregset): Likewise.
745
1798301e
PA
7462015-11-18 Pedro Alves <palves@redhat.com>
747
748 * Makefile.in (all_object_files): Add $IPA_OBJS.
749
ce7715e2
PA
7502015-11-17 Pedro Alves <palves@redhat.com>
751
752 * win32-low.c (win32_resume): Use gdb_signal_from_host,
753 GDB_SIGNAL_0 and gdb_signal_to_string.
754
c0879059
PA
7552015-11-17 Pedro Alves <palves@redhat.com>
756
757 * win32-low.c (handle_output_debug_string): Remove parameter.
758 (win32_kill): Remove our_status local and adjust call to
759 handle_output_debug_string.
760 (get_child_debug_event): Adjust call to
761 handle_output_debug_string.
762
1996e237
SM
7632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
764
765 * linux-mips-low.c (mips_fill_gregset): Add cast.
766 (mips_store_gregset): Likewise.
767 (mips_fill_fpregset): Likewise.
768 (mips_store_fpregset): Likewise.
769
cbec665b
SM
7702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
771
772 * linux-mips-low.c (mips_add_watchpoint): Rename private to
773 priv.
774
eb3e3c67
SM
7752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
776
777 * linux-mips-low.c (mips_linux_new_thread): Change type of
778 watch_type to enum target_hw_bp_type.
779
171de4b8
SM
7802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
781
782 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
783 Change return type to arm_hwbp_type.
784
04248ead
SM
7852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
786
787 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
788 (arm_store_gregset): Likewise.
789 * linux-arm-low.c (arm_get_hwcap): Likewise.
790 (arm_read_description): Likewise.
791
04b3479c
SM
7922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
793
794 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
795
2bc84e8a
SM
7962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
797
798 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
799 (ppc_fill_vsxregset): Likewise.
800 (ppc_store_vsxregset): Likewise.
801 (ppc_fill_vrregset): Likewise.
802 (ppc_store_vrregset): Likewise.
803 (ppc_fill_evrregset): Likewise.
804 (ppc_store_evrregset): Likewise.
805
e6c5bb05
SM
8062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
807
808 * linux-ppc-low.c (ppc_usrregs_info): Remove
809 forward-declaration.
810 (ppc_arch_setup): Move lower in file.
811
7ea45d72
SM
8122015-10-30 Simon Marchi <simon.marchi@ericsson.com>
813
814 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
815 (ps_pdwrite): Likewise.
816
69291610
HW
8172015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
818
819 * linux-arm-low.c (arm_new_thread): Move pointer dereference
820 to after assert checks.
821
b42945fd
SM
8222015-10-29 Simon Marchi <simon.marchi@ericsson.com>
823
824 * proc-service.c (ps_pdread): Add/adjust casts.
825 (ps_pdwrite): Add/adjust casts.
826
d6f85c84
SM
8272015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
828
829 * server.c (handle_search_memory_1): Cast return value of
830 memmem.
831
f98cd059
SM
8322015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
833
834 * server.c (write_qxfer_response): Change type of data to
835 gdb_byte *.
836
d2412fa5
PA
8372015-10-29 Pedro Alves <palves@redhat.com>
838
839 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
840
c17414a2
PA
8412015-10-29 Pedro Alves <palves@redhat.com>
842
843 * tracepoint.c (clear_installed_tracepoints): Add casts.
844
e053fbc4
PA
8452015-10-29 Pedro Alves <palves@redhat.com>
846
847 * server.c (handle_v_cont, process_serial_event): Add enum
848 gdb_signal casts to signal parsing code.
849
add67df8
PA
8502015-10-29 Pedro Alves <palves@redhat.com>
851
852 * linux-low.h (NULL_REGSET): Define.
853 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
854 * linux-arm-low.c (arm_regsets): Likewise.
855 * linux-crisv32-low.c (cris_regsets): Likewise.
856 * linux-m68k-low.c (m68k_regsets): Likewise.
857 * linux-mips-low.c (mips_regsets): Likewise.
858 * linux-nios2-low.c (nios2_regsets): Likewise.
859 * linux-ppc-low.c (ppc_regsets): Likewise.
860 * linux-s390-low.c (s390_regsets): Likewise.
861 * linux-sh-low.c (sh_regsets): Likewise.
862 * linux-sparc-low.c (sparc_regsets): Likewise.
863 * linux-tic6x-low.c (tic6x_regsets): Likewise.
864 * linux-tile-low.c (tile_regsets): Likewise.
865 * linux-x86-low.c (x86_regsets): Likewise.
866 * linux-xtensa-low.c (xtensa_regsets): Likewise.
867
50bc912a
PA
8682015-10-29 Pedro Alves <palves@redhat.com>
869
870 * linux-low.h (NULL_REGSET): Define.
871 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
872 * linux-arm-low.c (arm_regsets): Likewise.
873 * linux-crisv32-low.c (cris_regsets): Likewise.
874 * linux-m68k-low.c (m68k_regsets): Likewise.
875 * linux-mips-low.c (mips_regsets): Likewise.
876 * linux-nios2-low.c (nios2_regsets): Likewise.
877 * linux-ppc-low.c (ppc_regsets): Likewise.
878 * linux-s390-low.c (s390_regsets): Likewise.
879 * linux-sh-low.c (sh_regsets): Likewise.
880 * linux-sparc-low.c (sparc_regsets): Likewise.
881 * linux-tic6x-low.c (tic6x_regsets): Likewise.
882 * linux-tile-low.c (tile_regsets): Likewise.
883 * linux-x86-low.c (x86_regsets): Likewise.
884 * linux-xtensa-low.c (xtensa_regsets): Likewise.
885
682b2546
DE
8862015-10-26 Doug Evans <dje@google.com>
887
888 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
889
963843d4
DE
8902015-10-26 Doug Evans <dje@google.com>
891
892 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
893
d41401ac
DE
8942015-10-26 Doug Evans <dje@google.com>
895
896 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
897 for debug_printf.
898 (attach_thread, find_new_threads_callback): Ditto.
899
3db28855
AT
9002015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
901
902 * mem-break.h (set_breakpoint_data): Remove.
903
fb78e89c
AT
9042015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
905
906 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
907 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
908 (initialize_low): Remove set_breakpoint_data call.
909 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
910 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
911 (initialize_low): Remove set_breakpoint_data call.
912 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
913 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
914 (initialize_low): Remove set_breakpoint_data call.
915
2e6ee069
AT
9162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
917
918 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
919 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
920 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
921 * target.h (target_breakpoint_kind_from_pc): New macro.
922
1652a986
AT
9232015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
924
925 * linux-low.c (default_breakpoint_kind_from_pc): New function.
926 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
927 the default breakpoint kind.
928
abeead09
AT
9292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
930
931 * linux-arm-low.c (arm_supports_z_point_type): Add software
932 breakpoint support.
933
b0b4b501
AT
9342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
935
936 * linux-arm-low.c: Refactor breakpoint definitions.
937 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
938 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
939
8689682c
AT
9402015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
941
942 * Makefile.in: Add arm.c/o.
943 * configure.srv: Likewise.
944 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
945 (arm_breakpoint_kind_from_pc): New function.
946 (arm_sw_breakpoint_from_kind): Return proper kind.
947 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
948
27165294
AT
9492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
950
951 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
952 removal.
953 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
954 (struct raw_breakpoint) <size>: Remove.
955 (struct raw_breakpoint) <kind>: Add.
956 (bp_size): New function.
957 (bp_opcode): Likewise.
958 (find_raw_breakpoint_at): Adjust for kind.
959 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
960 (remove_memory_breakpoint): Adjust for kind call bp_size.
961 (set_raw_breakpoint_at): Adjust for kind.
962 (set_breakpoint): Likewise.
963 (set_breakpoint_at): Call breakpoint_kind_from_pc.
964 (delete_raw_breakpoint): Adjust for kind.
965 (delete_breakpoint): Likewise.
966 (find_gdb_breakpoint): Likewise.
967 (set_gdb_breakpoint_1): Likewise.
968 (set_gdb_breakpoint): Likewise.
969 (delete_gdb_breakpoint_1): Likewise.
970 (delete_gdb_breakpoint): Likewise.
971 (uninsert_raw_breakpoint): Likewise.
972 (reinsert_raw_breakpoint): Likewise.
973 (set_breakpoint_data): Remove.
974 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
975 (check_mem_read): Adjust for kind call bp_size.
976 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
977 (clone_one_breakpoint): Adjust for kind.
978 * mem-break.h (set_gdb_breakpoint): Likewise.
979 (delete_gdb_breakpoint): Likewise.
980 * server.c (process_serial_event): Likewise.
981
dd373349
AT
9822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
983
984 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
985 (struct linux_target_ops) <breakpoint>: Remove.
986 (struct linux_target_ops) <breakpoint_len>: Remove.
987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
989 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
990 (arm_sw_breakpoint_from_kind): New function.
991 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
992 (struct linux_target_ops) <breakpoint>: Remove.
993 (struct linux_target_ops) <breakpoint_len>: Remove.
994 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
995 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
996 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
997 (struct linux_target_ops) <breakpoint>: Remove.
998 (struct linux_target_ops) <breakpoint_len>: Remove.
999 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1000 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1001 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1002 (struct linux_target_ops) <breakpoint>: Remove.
1003 (struct linux_target_ops) <breakpoint_len>: Remove.
1004 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1005 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1006 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1007 and sw_breakpoint_from_kind to increment the pc.
1008 (linux_breakpoint_kind_from_pc): New function.
1009 (linux_sw_breakpoint_from_kind): New function.
1010 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1011 (initialize_low): Call breakpoint_kind_from_pc and
1012 sw_breakpoint_from_kind to replace breakpoint_data/len.
1013 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1014 New field.
1015 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1016 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1017 (struct linux_target_ops) <breakpoint>: Remove.
1018 (struct linux_target_ops) <breakpoint_len>: Remove.
1019 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1020 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1021 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1022 (struct linux_target_ops) <breakpoint>: Remove.
1023 (struct linux_target_ops) <breakpoint_len>: Remove.
1024 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1025 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1026 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1027 (struct linux_target_ops) <breakpoint>: Remove.
1028 (struct linux_target_ops) <breakpoint_len>: Remove.
1029 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1030 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1031 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1032 (struct linux_target_ops) <breakpoint>: Remove.
1033 (struct linux_target_ops) <breakpoint_len>: Remove.
1034 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1035 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1036 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1037 (struct linux_target_ops) <breakpoint>: Remove.
1038 (struct linux_target_ops) <breakpoint_len>: Remove.
1039 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1040 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1041 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1042 (struct linux_target_ops) <breakpoint>: Remove.
1043 (struct linux_target_ops) <breakpoint_len>: Remove.
1044 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1045 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1046 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1047 (struct linux_target_ops) <breakpoint>: Remove.
1048 (struct linux_target_ops) <breakpoint_len>: Remove.
1049 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1050 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1051 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1052 (struct linux_target_ops) <breakpoint>: Remove.
1053 (struct linux_target_ops) <breakpoint_len>: Remove.
1054 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1055 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1056 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1057 (struct linux_target_ops) <breakpoint>: Remove.
1058 (struct linux_target_ops) <breakpoint_len>: Remove.
1059 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1060 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1061 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1062 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1063 (struct linux_target_ops) <breakpoint>: Remove.
1064 (struct linux_target_ops) <breakpoint_len>: Remove.
1065 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1066 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1067 * linux-xtensa-low.c (xtensa_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
4cd98a19
AT
10732015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1074
1075 * linux-cris-low.c (cris_get_pc): Remove void arg.
1076
774ee6d2
AR
10772015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1078
1079 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1080 variable name.
1081
833dcd29
AR
10822015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1083
1084 * inferiors.c (thread_pid_matches_callback): New function.
1085 (find_thread_process): New function.
1086 (remove_thread): Reset current_thread.
1087 (remove_process): Assert threads have been removed first.
1088
8d689ee5
YQ
10892015-10-15 Yao Qi <yao.qi@linaro.org>
1090
1091 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1092 if it is 3.
1093 (aarch64_remove_point): Likewise.
1094 * regcache.c (regcache_register_size): New function.
1095
1c2e1515
YQ
10962015-10-12 Yao Qi <yao.qi@linaro.org>
1097
1098 * linux-aarch64-low.c: Update all callers as emit_load_store
1099 is renamed to aarch64_emit_load_store.
1100
e1c587c3
YQ
11012015-10-12 Yao Qi <yao.qi@linaro.org>
1102
1103 * linux-aarch64-low.c: Update all callers of function renaming
1104 from emit_insn to aarch64_emit_insn.
1105
b6542f81
YQ
11062015-10-12 Yao Qi <yao.qi@linaro.org>
1107
1108 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1109 arch/aarch64-insn.h.
1110 (struct aarch64_memory_operand): Likewise.
1111 (ENCODE): Likewise.
1112 (emit_insn): Move to arch/aarch64-insn.c.
1113 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1114 (emit_load_store): Move to arch/aarch64-insn.c.
1115 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1116 (can_encode_int32): Remove.
1117
246994ce
YQ
11182015-10-12 Yao Qi <yao.qi@linaro.org>
1119
1120 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1121 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1122 (aarch64_relocate_instruction): Likewise.
1123 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1124 (struct aarch64_insn_visitor): Likewise.
1125
0badd99f
YQ
11262015-10-12 Yao Qi <yao.qi@linaro.org>
1127
1128 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1129 (struct aarch64_insn_visitor): New.
1130 (struct aarch64_insn_relocation_data): New.
1131 (aarch64_ftrace_insn_reloc_b): New function.
1132 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1133 (aarch64_ftrace_insn_reloc_cb): Likewise.
1134 (aarch64_ftrace_insn_reloc_tb): Likewise.
1135 (aarch64_ftrace_insn_reloc_adr): Likewise.
1136 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1137 (aarch64_ftrace_insn_reloc_others): Likewise.
1138 (visitor): New.
1139 (aarch64_relocate_instruction): Use visitor.
1140
dfaffe9d
YQ
11412015-10-12 Yao Qi <yao.qi@linaro.org>
1142
1143 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1144 int. Add argument buf.
1145 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1146 aarch64_relocate_instruction.
1147
70b439f0
YQ
11482015-10-12 Yao Qi <yao.qi@linaro.org>
1149
1150 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1151 argument insn. Remove local variable insn. Don't call
1152 target_read_uint32.
1153 (aarch64_install_fast_tracepoint_jump_pad): Call
1154 target_read_uint32.
1155
7781c06f
YQ
11562015-09-30 Yao Qi <yao.qi@linaro.org>
1157
1158 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1159 (emit_load_store_pair): Likewise.
1160
9a3c8263
SM
11612015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1162
1163 * dll.c (match_dll): Add cast(s).
1164 (unloaded_dll): Likewise.
1165 * linux-low.c (second_thread_of_pid_p): Likewise.
1166 (delete_lwp_callback): Likewise.
1167 (count_events_callback): Likewise.
1168 (select_event_lwp_callback): Likewise.
1169 (linux_set_resume_request): Likewise.
1170 * server.c (accumulate_file_name_length): Likewise.
1171 (emit_dll_description): Likewise.
1172 (handle_qxfer_threads_worker): Likewise.
1173 (visit_actioned_threads): Likewise.
1174 * thread-db.c (any_thread_of): Likewise.
1175 * tracepoint.c (same_process_p): Likewise.
1176 (match_blocktype): Likewise.
1177 (build_traceframe_info_xml): Likewise.
1178
224c3ddb
SM
11792015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1180
1181 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1182 assignment.
1183 (gdb_unparse_agent_expr): Likewise.
1184 * hostio.c (require_data): Likewise.
1185 (handle_pread): Likewise.
1186 * linux-low.c (disable_regset): Likewise.
1187 (fetch_register): Likewise.
1188 (store_register): Likewise.
1189 (get_dynamic): Likewise.
1190 (linux_qxfer_libraries_svr4): Likewise.
1191 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1192 (set_fast_tracepoint_jump): Likewise.
1193 (uninsert_fast_tracepoint_jumps_at): Likewise.
1194 (reinsert_fast_tracepoint_jumps_at): Likewise.
1195 (validate_inserted_breakpoint): Likewise.
1196 (clone_agent_expr): Likewise.
1197 * regcache.c (init_register_cache): Likewise.
1198 * remote-utils.c (putpkt_binary_1): Likewise.
1199 (decode_M_packet): Likewise.
1200 (decode_X_packet): Likewise.
1201 (look_up_one_symbol): Likewise.
1202 (relocate_instruction): Likewise.
1203 (monitor_output): Likewise.
1204 * server.c (handle_search_memory): Likewise.
1205 (handle_qxfer_exec_file): Likewise.
1206 (handle_qxfer_libraries): Likewise.
1207 (handle_qxfer): Likewise.
1208 (handle_query): Likewise.
1209 (handle_v_cont): Likewise.
1210 (handle_v_run): Likewise.
1211 (captured_main): Likewise.
1212 * target.c (write_inferior_memory): Likewise.
1213 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1214 * tracepoint.c (init_trace_buffer): Likewise.
1215 (add_tracepoint_action): Likewise.
1216 (add_traceframe): Likewise.
1217 (add_traceframe_block): Likewise.
1218 (cmd_qtdpsrc): Likewise.
1219 (cmd_qtdv): Likewise.
1220 (cmd_qtstatus): Likewise.
1221 (response_source): Likewise.
1222 (response_tsv): Likewise.
1223 (cmd_qtnotes): Likewise.
1224 (gdb_collect): Likewise.
1225 (initialize_tracepoint): Likewise.
1226
afbe19f8
PL
12272015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1228
1229 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1230 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1231 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1232 <NOP>: New.
1233 (enum aarch64_condition_codes): New enum.
1234 (w0): New static global.
1235 (fp): Likewise.
1236 (lr): Likewise.
1237 (struct aarch64_memory_operand) <type>: New
1238 MEMORY_OPERAND_POSTINDEX type.
1239 (postindex_memory_operand): New helper function.
1240 (emit_ret): New function.
1241 (emit_load_store_pair): New function, factored out of emit_stp
1242 with support for MEMORY_OPERAND_POSTINDEX.
1243 (emit_stp): Rewrite using emit_load_store_pair.
1244 (emit_ldp): New function.
1245 (emit_load_store): Likewise.
1246 (emit_ldr): Mention post-index instruction in comment.
1247 (emit_ldrh): New function.
1248 (emit_ldrb): New function.
1249 (emit_ldrsw): Mention post-index instruction in comment.
1250 (emit_str): Likewise.
1251 (emit_subs): New function.
1252 (emit_cmp): Likewise.
1253 (emit_and): Likewise.
1254 (emit_orr): Likewise.
1255 (emit_orn): Likewise.
1256 (emit_eor): Likewise.
1257 (emit_mvn): Likewise.
1258 (emit_lslv): Likewise.
1259 (emit_lsrv): Likewise.
1260 (emit_asrv): Likewise.
1261 (emit_mul): Likewise.
1262 (emit_sbfm): Likewise.
1263 (emit_sbfx): Likewise.
1264 (emit_ubfm): Likewise.
1265 (emit_ubfx): Likewise.
1266 (emit_csinc): Likewise.
1267 (emit_cset): Likewise.
1268 (emit_nop): Likewise.
1269 (emit_ops_insns): New helper function.
1270 (emit_pop): Likewise.
1271 (emit_push): Likewise.
1272 (aarch64_emit_prologue): New function.
1273 (aarch64_emit_epilogue): Likewise.
1274 (aarch64_emit_add): Likewise.
1275 (aarch64_emit_sub): Likewise.
1276 (aarch64_emit_mul): Likewise.
1277 (aarch64_emit_lsh): Likewise.
1278 (aarch64_emit_rsh_signed): Likewise.
1279 (aarch64_emit_rsh_unsigned): Likewise.
1280 (aarch64_emit_ext): Likewise.
1281 (aarch64_emit_log_not): Likewise.
1282 (aarch64_emit_bit_and): Likewise.
1283 (aarch64_emit_bit_or): Likewise.
1284 (aarch64_emit_bit_xor): Likewise.
1285 (aarch64_emit_bit_not): Likewise.
1286 (aarch64_emit_equal): Likewise.
1287 (aarch64_emit_less_signed): Likewise.
1288 (aarch64_emit_less_unsigned): Likewise.
1289 (aarch64_emit_ref): Likewise.
1290 (aarch64_emit_if_goto): Likewise.
1291 (aarch64_emit_goto): Likewise.
1292 (aarch64_write_goto_address): Likewise.
1293 (aarch64_emit_const): Likewise.
1294 (aarch64_emit_call): Likewise.
1295 (aarch64_emit_reg): Likewise.
1296 (aarch64_emit_pop): Likewise.
1297 (aarch64_emit_stack_flush): Likewise.
1298 (aarch64_emit_zero_ext): Likewise.
1299 (aarch64_emit_swap): Likewise.
1300 (aarch64_emit_stack_adjust): Likewise.
1301 (aarch64_emit_int_call_1): Likewise.
1302 (aarch64_emit_void_call_2): Likewise.
1303 (aarch64_emit_eq_goto): Likewise.
1304 (aarch64_emit_ne_goto): Likewise.
1305 (aarch64_emit_lt_goto): Likewise.
1306 (aarch64_emit_le_goto): Likewise.
1307 (aarch64_emit_gt_goto): Likewise.
1308 (aarch64_emit_ge_got): Likewise.
1309 (aarch64_emit_ops_impl): New static global variable.
1310 (aarch64_emit_ops): New target function, return
1311 &aarch64_emit_ops_impl.
1312 (struct linux_target_ops): Install it.
1313
bb903df0
PL
13142015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1315
1316 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1317 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1318 aarch64-ipa.o.
1319 * linux-aarch64-ipa.c: New file.
1320 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1321 and endian.h.
1322 (aarch64_get_thread_area): New target method.
1323 (extract_signed_bitfield): New helper function.
1324 (aarch64_decode_ldr_literal): New function.
1325 (enum aarch64_opcodes): New enum.
1326 (struct aarch64_register): New struct.
1327 (struct aarch64_operand): New struct.
1328 (x0): New static global.
1329 (x1): Likewise.
1330 (x2): Likewise.
1331 (x3): Likewise.
1332 (x4): Likewise.
1333 (w2): Likewise.
1334 (ip0): Likewise.
1335 (sp): Likewise.
1336 (xzr): Likewise.
1337 (aarch64_register): New helper function.
1338 (register_operand): Likewise.
1339 (immediate_operand): Likewise.
1340 (struct aarch64_memory_operand): New struct.
1341 (offset_memory_operand): New helper function.
1342 (preindex_memory_operand): Likewise.
1343 (enum aarch64_system_control_registers): New enum.
1344 (ENCODE): New macro.
1345 (emit_insn): New helper function.
1346 (emit_b): New function.
1347 (emit_bcond): Likewise.
1348 (emit_cb): Likewise.
1349 (emit_tb): Likewise.
1350 (emit_blr): Likewise.
1351 (emit_stp): Likewise.
1352 (emit_ldp_q_offset): Likewise.
1353 (emit_stp_q_offset): Likewise.
1354 (emit_load_store): Likewise.
1355 (emit_ldr): Likewise.
1356 (emit_ldrsw): Likewise.
1357 (emit_str): Likewise.
1358 (emit_ldaxr): Likewise.
1359 (emit_stxr): Likewise.
1360 (emit_stlr): Likewise.
1361 (emit_data_processing_reg): Likewise.
1362 (emit_data_processing): Likewise.
1363 (emit_add): Likewise.
1364 (emit_sub): Likewise.
1365 (emit_mov): Likewise.
1366 (emit_movk): Likewise.
1367 (emit_mov_addr): Likewise.
1368 (emit_mrs): Likewise.
1369 (emit_msr): Likewise.
1370 (emit_sevl): Likewise.
1371 (emit_wfe): Likewise.
1372 (append_insns): Likewise.
1373 (can_encode_int32_in): New helper function.
1374 (aarch64_relocate_instruction): New function.
1375 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1376 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1377 (struct linux_target_ops): Install aarch64_get_thread_area,
1378 aarch64_install_fast_tracepoint_jump_pad and
1379 aarch64_get_min_fast_tracepoint_insn_len.
1380
787749ea
PL
13812015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1382
1383 * Makefile.in (aarch64-insn.o): New rule.
1384 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1385
9812b2e6
YQ
13862015-09-21 Yao Qi <yao.qi@linaro.org>
1387
1388 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1389
18fe412b
YQ
13902015-09-21 Yao Qi <yao.qi@linaro.org>
1391
1392 * tracepoint.c (max_jump_pad_size): Remove.
1393
a0cc84cd
YQ
13942015-09-18 Yao Qi <yao.qi@linaro.org>
1395
1396 * linux-aarch64-low.c: Don't include sys/uio.h.
1397 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1398
d78908cf
WW
13992015-09-16 Wei-cheng Wang <cole945@gmail.com>
1400
1401 * tracepoint.c (eval_result_type): Change prototype.
1402 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1403
d57e0d50
PA
14042015-09-15 Pedro Alves <palves@redhat.com>
1405
1406 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1407 Check whether to report exec events instead of checking whether
1408 multiprocess is enabled.
1409
5a676acc
PA
14102015-09-15 Pedro Alves <palves@redhat.com>
1411
1412 PR remote/18965
1413 * remote-utils.c (prepare_resume_reply): Merge
1414 TARGET_WAITKIND_VFORK_DONE switch case with the
1415 TARGET_WAITKIND_FORKED case.
1416
7c5d0fad
YQ
14172015-09-15 Yao Qi <yao.qi@linaro.org>
1418
1419 * server.c (handle_query): Check string comparison using
1420 "else if" instead of "if".
1421
750ce8d1
YQ
14222015-09-15 Yao Qi <yao.qi@linaro.org>
1423
1424 * server.c (vCont_supported): New global variable.
1425 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1426 matches. Append ";vContSupported+" to own_buf.
1427 (handle_v_requests): Append ";s;S" to own_buf if target supports
1428 hardware single step or vCont_supported is false.
1429 (capture_main): Set vCont_supported to zero.
1430
70b90b91
YQ
14312015-09-15 Yao Qi <yao.qi@linaro.org>
1432
1433 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1434 it to ...
1435 (linux_supports_hardware_single_step): ... New function.
1436 (linux_target_ops): Update.
1437 * lynx-low.c (lynx_target_ops): Set field
1438 supports_hardware_single_step to target_can_do_hardware_single_step.
1439 * nto-low.c (nto_target_ops): Likewise.
1440 * spu-low.c (spu_target_ops): Likewise.
1441 * win32-low.c (win32_target_ops): Likewise.
1442 * target.c (target_can_do_hardware_single_step): New function.
1443 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1444 Remove. <supports_hardware_single_step>: New field.
1445 (target_supports_conditional_breakpoints): Remove.
1446 (target_supports_hardware_single_step): New macro.
1447 (target_can_do_hardware_single_step): Declare.
1448 * server.c (handle_query): Use target_supports_hardware_single_step
1449 instead of target_supports_conditional_breakpoints.
1450
ade90bde
YQ
14512015-09-15 Yao Qi <yao.qi@linaro.org>
1452
1453 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1454 function.
1455 (struct linux_target_ops the_low_target): Install
1456 aarch64_linux_siginfo_fixup.
1457
94585166
DB
14582015-09-11 Don Breazeal <donb@codesourcery.com>
1459 Luis Machado <lgustavo@codesourcery.com>
1460
1461 * linux-low.c (linux_mourn): Static declaration.
1462 (linux_arch_setup): Move in front of
1463 handle_extended_wait.
1464 (linux_arch_setup_thread): New function.
1465 (handle_extended_wait): Handle exec events. Call
1466 linux_arch_setup_thread. Make event_lwp argument a
1467 pointer-to-a-pointer.
1468 (check_zombie_leaders): Do not check stopped threads.
1469 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1470 (linux_low_filter_event): Add lwp and thread for exec'ing
1471 non-leader thread if leader thread has been deleted.
1472 Refactor code into linux_arch_setup_thread and call it.
1473 Pass child lwp pointer by reference to handle_extended_wait.
1474 (linux_wait_for_event_filtered): Update comment.
1475 (linux_wait_1): Prevent clobbering exec event status.
1476 (linux_supports_exec_events): New function.
1477 (linux_target_ops) <supports_exec_events>: Initialize new member.
1478 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1479 new member.
1480 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1481 * server.c (report_exec_events): New global variable.
1482 (handle_query): Handle qSupported query for exec-events feature.
1483 (captured_main): Initialize report_exec_events.
1484 * server.h (report_exec_events): Declare new global variable.
1485 * target.h (struct target_ops) <supports_exec_events>: New
1486 member.
1487 (target_supports_exec_events): New macro.
1488 * win32-low.c (win32_target_ops) <supports_exec_events>:
1489 Initialize new member.
1490
0568462b
MM
14912015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1492
1493 * linux-low.c (linux_low_enable_btrace): Remove.
1494 (linux_target_ops): Replace linux_low_enable_btrace with
1495 linux_enable_btrace.
1496
39edd165
YQ
14972015-09-03 Yao Qi <yao.qi@linaro.org>
1498
1499 * linux-aarch64-low.c (aarch64_insert_point): Call
1500 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1501 returns true.
1502
1db33b5a
UW
15032015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1504
1505 * linux-low.c (check_stopped_by_breakpoint): Use
1506 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1507
ab290430
PA
15082015-08-27 Pedro Alves <palves@redhat.com>
1509
1510 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1511
8d749320
SM
15122015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1513
6711b7f8
SM
1514 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1515 the XNEW-family equivalent.
8d749320
SM
1516 (compile_bytecodes): Likewise.
1517 * dll.c (loaded_dll): Likewise.
1518 * event-loop.c (append_callback_event): Likewise.
1519 (create_file_handler): Likewise.
1520 (create_file_event): Likewise.
1521 * hostio.c (handle_open): Likewise.
1522 * inferiors.c (add_thread): Likewise.
1523 (add_process): Likewise.
1524 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1525 * linux-arm-low.c (arm_new_process): Likewise.
1526 (arm_new_thread): Likewise.
1527 * linux-low.c (add_to_pid_list): Likewise.
1528 (linux_add_process): Likewise.
1529 (handle_extended_wait): Likewise.
1530 (add_lwp): Likewise.
1531 (enqueue_one_deferred_signal): Likewise.
1532 (enqueue_pending_signal): Likewise.
1533 (linux_resume_one_lwp_throw): Likewise.
1534 (linux_resume_one_thread): Likewise.
1535 (linux_read_memory): Likewise.
1536 (linux_write_memory): Likewise.
1537 * linux-mips-low.c (mips_linux_new_process): Likewise.
1538 (mips_linux_new_thread): Likewise.
1539 (mips_add_watchpoint): Likewise.
1540 * linux-x86-low.c (initialize_low_arch): Likewise.
1541 * lynx-low.c (lynx_add_process): Likewise.
1542 * mem-break.c (set_raw_breakpoint_at): Likewise.
1543 (set_breakpoint): Likewise.
1544 (add_condition_to_breakpoint): Likewise.
1545 (add_commands_to_breakpoint): Likewise.
1546 (clone_agent_expr): Likewise.
1547 (clone_one_breakpoint): Likewise.
1548 * regcache.c (new_register_cache): Likewise.
1549 * remote-utils.c (look_up_one_symbol): Likewise.
1550 * server.c (queue_stop_reply): Likewise.
1551 (start_inferior): Likewise.
1552 (queue_stop_reply_callback): Likewise.
1553 (handle_target_event): Likewise.
1554 * spu-low.c (fetch_ppc_memory): Likewise.
1555 (store_ppc_memory): Likewise.
1556 * target.c (set_target_ops): Likewise.
1557 * thread-db.c (thread_db_load_search): Likewise.
1558 (try_thread_db_load_1): Likewise.
1559 * tracepoint.c (add_tracepoint): Likewise.
1560 (add_tracepoint_action): Likewise.
1561 (create_trace_state_variable): Likewise.
1562 (cmd_qtdpsrc): Likewise.
1563 (cmd_qtro): Likewise.
1564 (add_while_stepping_state): Likewise.
1565 * win32-low.c (child_add_thread): Likewise.
1566 (get_image_name): Likewise.
1567
ed8b7b42
YQ
15682015-08-25 Yao Qi <yao.qi@linaro.org>
1569
1570 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1571
db3cb7cb
YQ
15722015-08-25 Yao Qi <yao.qi@linaro.org>
1573
1574 * Makefile.in (aarch64-linux.o): New rule.
1575 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1576 srv_tgtobj.
1577 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1578 (aarch64_init_debug_reg_state): Make it extern.
1579 (aarch64_linux_prepare_to_resume): Remove.
1580
f6011a1c
YQ
15812015-08-25 Yao Qi <yao.qi@linaro.org>
1582
1583 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1584 lwp_arch_private_info and ptid_of_lwp.
1585
88e2cf7e
YQ
15862015-08-25 Yao Qi <yao.qi@linaro.org>
1587
1588 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1589 Find proc_info by find_process_pid. All callers updated.
1590
5e35436e
YQ
15912015-08-25 Yao Qi <yao.qi@linaro.org>
1592
1593 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1594 Remove.
1595 (debug_reg_change_callback): Remove.
1596 (aarch64_notify_debug_reg_change): Remove.
1597
4a8a7965
YQ
15982015-08-25 Yao Qi <yao.qi@linaro.org>
1599
1600 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1601 Call current_lwp_ptid.
1602
32a271ee
YQ
16032015-08-25 Yao Qi <yao.qi@linaro.org>
1604
1605 * linux-aarch64-low.c (debug_reg_change_callback): Use
1606 debug_printf.
1607
0d51c8d7
YQ
16082015-08-25 Yao Qi <yao.qi@linaro.org>
1609
1610 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1611
31a43dd5
YQ
16122015-08-25 Yao Qi <yao.qi@linaro.org>
1613
1614 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1615
8ee52567
YQ
16162015-08-25 Yao Qi <yao.qi@linaro.org>
1617
1618 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1619 the code.
1620
ff3f0f45
YQ
16212015-08-25 Yao Qi <yao.qi@linaro.org>
1622
1623 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1624 Remove.
1625 (debug_reg_change_callback): Remove argument entry and add argument
1626 lwp. Remove local variable thread. Don't print thread id in the
1627 debugging output. Don't check whether pid of thread equals to pid.
1628 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1629 iterate_over_lwps instead find_inferior.
1630
3d40fbb5
PA
16312015-08-24 Pedro Alves <palves@redhat.com>
1632
1633 * inferiors.c (get_first_process): New function.
1634 * inferiors.h (get_first_process): New declaration.
1635 * remote-utils.c (read_ptid): Default to the first process in the
1636 list, instead of to the current thread's process.
1637
438e1e42
PA
16382015-08-24 Pedro Alves <palves@redhat.com>
1639
1640 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1641 * event-loop.c: Likewise.
1642 * remote-utils.c: Likewise.
1643 * tracepoint.c: Likewise.
1644
a8c6d4fc
PA
16452015-08-24 Pedro Alves <palves@redhat.com>
1646
1647 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1648 ptid_get_lwp.
1649
99b0bb12
PA
16502015-08-21 Pedro Alves <palves@redhat.com>
1651
1652 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1653 instead of literal 1.
1654
f8904751
PA
16552015-08-21 Pedro Alves <palves@redhat.com>
1656
1657 * tdesc.c (default_description): Explicitly zero-initialize.
1658
465a859e
PA
16592015-08-21 Pedro Alves <palves@redhat.com>
1660
1661 PR gdb/18749
1662 * inferiors.c (remove_thread): Discard any pending stop reply for
1663 this thread.
1664 * server.c (remove_all_on_match_pid): Rename to ...
1665 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1666 instead of a pid.
1667 (discard_queued_stop_replies): Change parameter to a ptid. Now
1668 extern.
1669 (handle_v_kill, kill_inferior_callback, captured_main)
1670 (process_serial_event): Adjust.
1671 * server.h (discard_queued_stop_replies): Declare.
1672
f0db101d
PA
16732015-08-21 Pedro Alves <palves@redhat.com>
1674
1675 * linux-low.c (wait_for_sigstop): Always switch to no thread
1676 selected if the previously current thread dies.
1677 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1678 process instead of the current thread's.
1679 * remote-utils.c (input_interrupt): Don't check if there's no
1680 current thread.
1681 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1682 current thread to the general thread fails, error out.
1683 (handle_qxfer_auxv, handle_qxfer_libraries)
1684 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1685 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1686 (handle_query): Check if there's a thread selected instead of
1687 checking whether there's any thread in the thread list.
1688 (handle_qxfer_threads, handle_qxfer_btrace)
1689 (handle_qxfer_btrace_conf): Don't error out early if there's no
1690 thread in the thread list.
1691 (handle_v_cont, myresume): Don't set the current thread to the
1692 continue thread.
1693 (process_serial_event) <Hg handling>: Also set thread_id if the
1694 previous general thread is still alive.
1695 (process_serial_event) <g/G handling>: If setting the current
1696 thread to the general thread fails, error out.
1697 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1698 thread's lwp instead of the current thread's.
1699 * target.c (set_desired_thread): If the desired thread was not
1700 found, leave the current thread pointing to NULL. Return an int
1701 (boolean) indicating success.
1702 * target.h (set_desired_thread): Change return type to int.
1703
40045d91
MF
17042015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1705
1706 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1707 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1708 #includes.
1709 (ps_get_thread_area): New function.
1710
45face3b
GB
17112015-08-19 Gary Benson <gbenson@redhat.com>
1712
1713 * hostio.c (handle_pread): Do not attempt to read more data
1714 than hostio_reply_with_data can fit in a packet.
1715
16d5f642
JB
17162015-08-18 Joel Brobecker <brobecker@adacore.com>
1717
1718 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1719
a738da3a
MF
17202015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1721
1722 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1723
33ebda9d
PA
17242015-08-06 Pedro Alves <palves@redhat.com>
1725
1726 * tracepoint.c (expr_eval_result): Now an int.
1727
a44892be
PA
17282015-08-06 Pedro Alves <palves@redhat.com>
1729
1730 * gdbthread.h (struct regcache): Forward declare.
1731 (struct thread_info) <regcache_data>: Now a struct regcache
1732 pointer.
1733 * inferiors.c (inferior_regcache_data)
1734 (set_inferior_regcache_data): Now work with struct regcache
1735 pointers.
1736 * inferiors.h (struct regcache): Forward declare.
1737 (inferior_regcache_data, set_inferior_regcache_data): Now work
1738 with struct regcache pointers.
1739 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1740 (free_register_cache_thread): Remove struct regcache pointer
1741 casts.
1742
608a1e46
PA
17432015-08-06 Pedro Alves <palves@redhat.com>
1744
1745 * server.c (captured_main): On error, print the exception message
1746 to stderr, and if run_once is set, throw a quit.
1747
f0ce0d3a
PA
17482015-08-06 Pedro Alves <palves@redhat.com>
1749
1750 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1751 the current thread.
1752
bf47e248
PA
17532015-08-06 Pedro Alves <palves@redhat.com>
1754
1755 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1756 reading beyond the passed in buffer length.
1757
b6b9ffcc
PL
17582015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1759
1760 * tracepoint.c (symbol_list) <required>: Remove.
1761
863d01bd
PA
17622015-08-06 Pedro Alves <palves@redhat.com>
1763
1764 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1765 count if stopping and suspending threads.
1766 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1767 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1768 (linux_detach): Complete an ongoing step-over.
1769 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1770 throughout.
1771 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1772 (linux_wait_1): If passing a signal to the inferior after
1773 finishing a step-over, unsuspend and re-resume all lwps. If we
1774 see a single-step event but the thread should be continuing, don't
1775 pass the trap to gdb.
1776 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1777 internal_error instead of gdb_assert.
1778 (enqueue_pending_signal): New function.
1779 (check_ptrace_stopped_lwp_gone): Add debug output.
1780 (start_step_over): Use internal_error instead of gdb_assert.
1781 (complete_ongoing_step_over): New function.
1782 (linux_resume_one_thread): Don't resume a suspended thread.
1783 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1784 it stepping.
1785
00db26fa
PA
17862015-08-06 Pedro Alves <palves@redhat.com>
1787
1788 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1789 (linux_thread_alive): Use lwp_is_marked_dead.
1790 (extended_event_reported): Delete.
1791 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1792 instead of extended_event_reported.
1793 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1794 as well.
1795 (lwp_is_marked_dead): New function.
1796 (lwp_running): Use lwp_is_marked_dead.
1797 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1798 comment.
1799
ad071a30
PA
18002015-08-06 Pedro Alves <palves@redhat.com>
1801
1802 * linux-low.c (linux_wait_1): Move fork event output out of the
1803 !report_to_gdb check. Pass event_child->waitstatus to
1804 target_waitstatus_to_string instead of ourstatus.
1805
524b57e6
YQ
18062015-08-04 Yao Qi <yao.qi@linaro.org>
1807
1808 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1809 if current_thread is 32 bit.
1810
6085d6f6
YQ
18112015-08-04 Yao Qi <yao.qi@linaro.org>
1812
1813 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1814 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1815 * server.c (extended_protocol): Remove "static".
1816 * server.h (extended_protocol): Declare it.
1817
8a7e4587
YQ
18182015-08-04 Yao Qi <yao.qi@linaro.org>
1819
1820 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1821 both aarch64 and aarch32.
1822 (aarch64_set_pc): Likewise.
1823
3b53ae99
YQ
18242015-08-04 Yao Qi <yao.qi@linaro.org>
1825
1826 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1827 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1828 arm-with-neon.xml to srv_xmlfiles.
1829 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1830 (is_64bit_tdesc): New function.
1831 (aarch64_linux_read_description): New function.
1832 (aarch64_arch_setup): Call aarch64_linux_read_description.
1833 (regs_info): Rename to regs_info_aarch64.
1834 (aarch64_regs_info): Return right regs_info.
1835 (initialize_low_arch): Call initialize_low_arch_aarch32.
1836
bd9e6534
YQ
18372015-08-04 Yao Qi <yao.qi@linaro.org>
1838
1839 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1840 * linux-aarch32-low.c: New file.
1841 * linux-aarch32-low.h: New file.
1842 * linux-arm-low.c (arm_fill_gregset): Move it to
1843 linux-aarch32-low.c.
1844 (arm_store_gregset): Likewise.
1845 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1846 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1847 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1848 (regs_info): Rename to regs_info_arm.
1849 (arm_regs_info): Return regs_info_aarch32 if
1850 have_ptrace_getregset is 1 and target description is
1851 arm_with_neon or arm_with_vfpv3.
1852 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1853 Call initialize_low_arch_aarch32 instead.
1854
ded48a5e
YQ
18552015-08-04 Yao Qi <yao.qi@linaro.org>
1856
1857 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1858 * linux-low.c: ... here.
1859 * linux-low.h (have_ptrace_getregset): Declare it.
1860
96e9210f
PA
18612015-08-04 Pedro Alves <palves@redhat.com>
1862
1863 * thread-db.c (struct thread_db): Use new typedefs.
1864 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1865 CHK calls.
1866 (disable_thread_event_reporting): Cast result of dlsym to
1867 destination function pointer type.
1868 (thread_db_mourn): Use td_ta_delete_ftype.
1869
af60a1ef
SL
18702015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1871
1872 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1873 arch variant.
1874 (CDX_BREAKPOINT): Define for R2.
1875 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1876 (the_low_target): Add comments.
1877
e8b41681
YQ
18782015-07-30 Yao Qi <yao.qi@linaro.org>
1879
1880 * linux-arm-low.c (arm_hwcap): Remove it.
1881 (arm_read_description): New local variable arm_hwcap. Don't
1882 set arm_hwcap to zero.
1883
89abb039
YQ
18842015-07-30 Yao Qi <yao.qi@linaro.org>
1885
1886 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1887 Use regcache->tdesc instead.
1888 (arm_store_wmmxregset): Likewise.
1889 (arm_fill_vfpregset): Likewise.
1890 (arm_store_vfpregset): Likewise.
1891
deca266c
YQ
18922015-07-30 Yao Qi <yao.qi@linaro.org>
1893
1894 * linux-arm-low.c: Include arch/arm.h.
1895 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1896 (arm_store_gregset): Likewise.
1897
aa58a496
SM
18982015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1899
1900 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1901 ptrace's 4th parameter.
1902
50904b25
YQ
19032015-07-27 Yao Qi <yao.qi@linaro.org>
1904
1905 * configure.srv (case aarch64*-*-linux*): Don't set
1906 srv_linux_usrregs.
1907
5826e159
PA
19082015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1909
1910 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1911 sys/ptrace.h.
1912 * linux-arm-low.c: Likewise.
1913 * linux-cris-low.c: Likewise.
1914 * linux-crisv32-low.c: Likewise.
1915 * linux-low.c: Likewise.
1916 * linux-m68k-low.c: Likewise.
1917 * linux-mips-low.c: Likewise.
1918 * linux-nios2-low.c: Likewise.
1919 * linux-s390-low.c: Likewise.
1920 * linux-sparc-low.c: Likewise.
1921 * linux-tic6x-low.c: Likewise.
1922 * linux-tile-low.c: Likewise.
1923 * linux-x86-low.c: Likewise.
1924
54019719
PA
19252015-07-24 Pedro Alves <palves@redhat.com>
1926
1927 * config.in: Regenerate.
1928 * configure: Regenerate.
1929
eb7aa561
PA
19302015-07-24 Pedro Alves <palves@redhat.com>
1931
1932 * acinclude.m4: Include ../ptrace.m4.
1933 * configure.ac: Call GDB_AC_PTRACE.
1934 * config.in, configure: Regenerate.
1935
55d7b841
YQ
19362015-07-24 Yao Qi <yao.qi@linaro.org>
1937
1938 * linux-low.c (linux_create_inferior): Remove setting to
1939 proc->priv->new_inferior.
1940 (linux_attach): Likewise.
1941 (linux_low_filter_event): Likewise.
1942 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1943
c06cbd92
YQ
19442015-07-24 Yao Qi <yao.qi@linaro.org>
1945
1946 * linux-low.c (linux_arch_setup): New function.
1947 (linux_low_filter_event): If proc->tdesc is NULL and
1948 proc->attached is true, call the_low_target.arch_setup.
1949 Otherwise, keep status pending, and return.
1950 (linux_resume_one_lwp_throw): Don't call get_pc if
1951 thread->while_stepping isn't NULL. Don't call
1952 get_thread_regcache if proc->tdesc is NULL.
1953 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1954 (linux_target_ops): Install arch_setup.
1955 * server.c (start_inferior): Call the_target->arch_setup.
1956 * target.h (struct target_ops) <arch_setup>: New field.
1957 (target_arch_setup): New marco.
1958 * lynx-low.c (lynx_target_ops): Update.
1959 * nto-low.c (nto_target_ops): Update.
1960 * spu-low.c (spu_target_ops): Update.
1961 * win32-low.c (win32_target_ops): Update.
1962
5ae3ebba
YQ
19632015-07-24 Yao Qi <yao.qi@linaro.org>
1964
1965 * linux-low.c (linux_add_process): Don't set
1966 proc->priv->new_inferior.
1967 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1968 (linux_attach): Likewise.
1969
eb97750b
YQ
19702015-07-24 Yao Qi <yao.qi@linaro.org>
1971
1972 * server.c (start_inferior): Code refactor.
1973
51aee833
YQ
19742015-07-24 Yao Qi <yao.qi@linaro.org>
1975
1976 * server.c (process_serial_event): Set general_thread.
1977
af1b22f3
YQ
19782015-07-21 Yao Qi <yao.qi@linaro.org>
1979
1980 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1981 aarch64_linux_get_debug_reg_capacity.
1982
554717a3
YQ
19832015-07-17 Yao Qi <yao.qi@linaro.org>
1984
1985 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1986 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1987 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1988 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1989 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1990 (AARCH64_HWP_ALIGNMENT): Likewise.
1991 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1992 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1993 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1994 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1995 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1996 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1997 (struct aarch64_debug_reg_state): Likewise.
1998 (struct arch_lwp_info): Likewise.
1999 (aarch64_align_watchpoint): Likewise.
2000 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2001 (aarch64_watchpoint_length): Likewise.
2002 (aarch64_point_encode_ctrl_reg): Likewise
2003 (aarch64_point_is_aligned): Likewise.
2004 (aarch64_align_watchpoint): Likewise.
2005 (aarch64_linux_set_debug_regs):
2006 (aarch64_dr_state_insert_one_point): Likewise.
2007 (aarch64_dr_state_remove_one_point): Likewise.
2008 (aarch64_handle_breakpoint): Likewise.
2009 (aarch64_handle_aligned_watchpoint): Likewise.
2010 (aarch64_handle_unaligned_watchpoint): Likewise.
2011 (aarch64_handle_watchpoint): Likewise.
2012
c67ca4de
YQ
20132015-07-17 Yao Qi <yao.qi@linaro.org>
2014
2015 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2016 and don't aarch64_get_debug_reg_state. All callers update.
2017 (aarch64_handle_aligned_watchpoint): Likewise.
2018 (aarch64_handle_unaligned_watchpoint): Likewise.
2019 (aarch64_handle_watchpoint): Likewise.
2020 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2021 (aarch64_remove_point): Likewise.
2022
25abf979
YQ
20232015-07-17 Yao Qi <yao.qi@linaro.org>
2024
2025 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2026 debug_printf.
2027 (aarch64_handle_unaligned_watchpoint): Likewise.
2028
db1ff28b
JK
20292015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2030
2031 Revert the previous 3 commits:
2032 Move gdb_regex* to common/
2033 Move linux_find_memory_regions_full & co.
2034 gdbserver build-id attribute generator
2035
700ca40f
JK
20362015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2037 Jan Kratochvil <jan.kratochvil@redhat.com>
2038
2039 gdbserver build-id attribute generator.
2040 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2041 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2042 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2043 (find_phdr): New.
2044 (get_dynamic): Use find_pdhr to traverse program headers.
2045 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2046 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2047 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2048 (get_hex_build_id): New.
2049 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2050 to reply XML document.
2051
9904185c
JK
20522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2053 Jan Kratochvil <jan.kratochvil@redhat.com>
2054
2055 * target.c: Include target/target-utils.h and fcntl.h.
2056 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2057 (target_fileio_read_stralloc): New functions.
2058
6e5b4429
JK
20592015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2060
2061 * Makefile.in (OBS): Add gdb_regex.o.
2062 (gdb_regex.o): New.
2063 * config.in: Rebuilt.
2064 * configure: Rebuilt.
2065
ddc98fbf
JK
20662015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2067 Jan Kratochvil <jan.kratochvil@redhat.com>
2068
2069 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2070 * Makefile.in (OBS): Add target-utils.o.
2071 (linux-maps.o, target-utils.o): New.
2072 * configure.srv (srv_linux_obj): Add linux-maps.o.
2073
e57bb7a0
PL
20742015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2075
2076 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2077 function, return 1.
2078 (the_low_target): Install it.
2079
586b02a9
PA
20802015-07-14 Pedro Alves <palves@redhat.com>
2081
2082 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2083 Instead, ignore ECHILD, and throw an error for other errnos.
2084
58c1b36c
PA
20852015-07-10 Pedro Alves <palves@redhat.com>
2086
2087 * event-loop.c (struct callback_event) <data>: Change type to
2088 gdb_client_data instance instead of gdb_client_data pointer.
2089 (append_callback_event): Adjust.
2090
421530db
PL
20912015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2092
2093 * linux-aarch64-low.c: Add comments for each linux_target_ops
2094 method. Remove comments already covered in target_ops and
2095 linux_target_ops definitions.
2096 (the_low_target): Add comments for each unimplemented method.
2097
c2d65f38
YQ
20982015-07-09 Yao Qi <yao.qi@linaro.org>
2099
2100 * linux-aarch64-low.c (aarch64_regmap): Remove.
2101 (aarch64_usrregs_info): Remove.
2102 (regs_info): Set field usrregs to NULL.
2103
b20a6524
MM
21042015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2105
2106 * linux-low.c: Include "rsp-low.h"
2107 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2108 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2109 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2110 (handle_btrace_enable_pt): New.
2111 (handle_btrace_general_set): Support "pt".
2112 (handle_btrace_conf_general_set): Support "pt:size".
2113
96c97461
PL
21142015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2115
2116 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2117 Z_PACKET_SW_BP.
2118
37d66942
PL
21192015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2120
2121 * linux-aarch64-low.c: Remove comment about endianness.
2122 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2123 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2124 memcmp.
2125
dc06243f
GB
21262015-06-24 Gary Benson <gbenson@redhat.com>
2127
2128 * linux-i386-ipa.c (stdint.h): Do not include.
2129 * lynx-i386-low.c (stdint.h): Likewise.
2130 * lynx-ppc-low.c (stdint.h): Likewise.
2131 * mem-break.c (stdint.h): Likewise.
2132 * thread-db.c (stdint.h): Likewise.
2133 * tracepoint.c (stdint.h): Likewise.
2134 * win32-low.c (stdint.h): Likewise.
2135
124e13d9
SM
21362015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2137
2138 * server.c (write_qxfer_response): Update call to
2139 remote_escape_output.
2140
909c2cda
JK
21412015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2142 Jan Kratochvil <jan.kratochvil@redhat.com>
2143
2144 Merge multiple hex conversions.
2145 * gdbreplay.c (tohex): Rename to 'fromhex'.
2146 (logchar): Use fromhex.
2147
24c05f46
JK
21482015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2149
2150 * server.c (handle_qxfer_libraries): Set `version' attribute for
2151 <library-list>.
2152
14d2069a
GB
21532015-06-10 Gary Benson <gbenson@redhat.com>
2154
2155 * target.h (struct target_ops) <multifs_open>: New field.
2156 <multifs_unlink>: Likewise.
2157 <multifs_readlink>: Likewise.
2158 * linux-low.c (nat/linux-namespaces.h): New include.
2159 (linux_target_ops): Initialize the_target->multifs_open,
2160 the_target->multifs_unlink and the_target->multifs_readlink.
2161 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2162 * hostio.c (hostio_fs_pid): New static variable.
2163 (hostio_handle_new_gdb_connection): New function.
2164 (handle_setfs): Likewise.
2165 (handle_open): Use the_target->multifs_open as appropriate.
2166 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2167 (handle_readlink): Use the_target->multifs_readlink as
2168 appropriate.
2169 (handle_vFile): Handle vFile:setfs packets.
2170 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2171 after target_handle_new_gdb_connection.
2172
4b8b5e72
GB
21732015-06-10 Gary Benson <gbenson@redhat.com>
2174
2175 * configure.ac (AC_CHECK_FUNCS): Add setns.
2176 * config.in: Regenerate.
2177 * configure: Likewise.
2178 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2179 (linux-namespaces.o): New rule.
2180 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2181
3ac2e371
GB
21822015-06-09 Gary Benson <gbenson@redhat.com>
2183
2184 * hostio.c (handle_open): Process mode argument with
2185 fileio_to_host_mode.
2186
ca9b78ce
YQ
21872015-06-01 Yao Qi <yao.qi@linaro.org>
2188
2189 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2190 * linux-x86-low.c: Likewise.
2191
bfacd19d
DB
21922015-05-28 Don Breazeal <donb@codesourcery.com>
2193
2194 * linux-low.c (handle_extended_wait): Initialize
2195 thread_info.last_resume_kind for new fork children.
2196
452003ef
PA
21972015-05-15 Pedro Alves <palves@redhat.com>
2198
2199 * target.h (target_handle_new_gdb_connection): Rewrite using if
2200 wrapped in do/while.
2201
1041a03c
JB
22022015-05-14 Joel Brobecker <brobecker@adacore.com>
2203
2204 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2205 * configure, config.in: Regenerate.
2206 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2207 Declare typedef.
2208
c269dbdb
DB
22092015-05-12 Don Breazeal <donb@codesourcery.com>
2210
2211 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2212 PTRACE_EVENT_VFORK_DONE.
2213 (linux_low_ptrace_options, extended_event_reported): Add vfork
2214 events.
2215 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2216 and "vforkdone" for RSP 'T' Stop Reply Packet.
2217 * server.h (report_vfork_events): Declare
2218 global variable.
2219
3a8a0396
DB
22202015-05-12 Don Breazeal <donb@codesourcery.com>
2221
2222 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2223 (the_low_target) <new_fork>: Initialize new member.
2224 * linux-arm-low.c (arm_new_fork): New function.
2225 (the_low_target) <new_fork>: Initialize new member.
2226 * linux-low.c (handle_extended_wait): Call new target function
2227 new_fork.
2228 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2229 * linux-mips-low.c (mips_add_watchpoint): New function
2230 extracted from mips_insert_point.
2231 (the_low_target) <new_fork>: Initialize new member.
2232 (mips_linux_new_fork): New function.
2233 (mips_insert_point): Call mips_add_watchpoint.
2234 * linux-x86-low.c (x86_linux_new_fork): New function.
2235 (the_low_target) <new_fork>: Initialize new member.
2236
de0d863e
DB
22372015-05-12 Don Breazeal <donb@codesourcery.com>
2238
2239 * linux-low.c (handle_extended_wait): Implement return value,
2240 rename argument 'event_child' to 'event_lwp', handle
2241 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2242 (linux_low_ptrace_options): New function.
2243 (linux_low_filter_event): Call linux_low_ptrace_options,
2244 use different argument fo linux_enable_event_reporting,
2245 use return value from handle_extended_wait.
2246 (extended_event_reported): New function.
2247 (linux_wait_1): Call extended_event_reported and set
2248 status to report fork events.
2249 (linux_write_memory): Add pid to debug message.
2250 (reset_lwp_ptrace_options_callback): New function.
2251 (linux_handle_new_gdb_connection): New function.
2252 (linux_target_ops): Initialize new structure member.
2253 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2254 * lynx-low.c: Initialize new structure member.
2255 * remote-utils.c (prepare_resume_reply): Implement stop reason
2256 "fork" for "T" stop message.
2257 * server.c (handle_query): Call handle_new_gdb_connection.
2258 * server.h (report_fork_events): Declare global flag.
2259 * target.h (struct target_ops) <handle_new_gdb_connection>:
2260 New member.
2261 (target_handle_new_gdb_connection): New macro.
2262 * win32-low.c: Initialize new structure member.
2263
ddcbc397
DB
22642015-05-12 Don Breazeal <donb@codesourcery.com>
2265
2266 * mem-break.c (APPEND_TO_LIST): Define macro.
2267 (clone_agent_expr): New function.
2268 (clone_one_breakpoint): New function.
2269 (clone_all_breakpoints): New function.
2270 * mem-break.h: Declare new functions.
2271
89245bc0
DB
22722015-05-12 Don Breazeal <donb@codesourcery.com>
2273
2274 * linux-low.c (linux_supports_fork_events): New function.
2275 (linux_supports_vfork_events): New function.
2276 (linux_target_ops): Initialize new structure members.
2277 (initialize_low): Call linux_check_ptrace_features.
2278 * lynx-low.c (lynx_target_ops): Initialize new structure
2279 members.
2280 * server.c (report_fork_events, report_vfork_events):
2281 New global flags.
2282 (handle_query): Add new features to qSupported packet and
2283 response.
2284 (captured_main): Initialize new global variables.
2285 * target.h (struct target_ops) <supports_fork_events>:
2286 New member.
2287 <supports_vfork_events>: New member.
2288 (target_supports_fork_events): New macro.
2289 (target_supports_vfork_events): New macro.
2290 * win32-low.c (win32_target_ops): Initialize new structure
2291 members.
2292
835205d0
GB
22932015-05-12 Gary Benson <gbenson@redhat.com>
2294
2295 * server.c (handle_qxfer_exec_file): Use current process
2296 if annex is empty.
2297
21e94bd9
SL
22982015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2299
2300 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2301 Remove HAVE_PTRACE_GETREGS conditionals.
2302 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2303 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2304
45614f15
YQ
23052015-05-08 Yao Qi <yao.qi@linaro.org>
2306
2307 * linux-low.c (linux_supports_conditional_breakpoints): New
2308 function.
2309 (linux_target_ops): Install new target method.
2310 * lynx-low.c (lynx_target_ops): Install NULL hook for
2311 supports_conditional_breakpoints.
2312 * nto-low.c (nto_target_ops): Likewise.
2313 * spu-low.c (spu_target_ops): Likewise.
2314 * win32-low.c (win32_target_ops): Likewise.
2315 * server.c (handle_query): Check
2316 target_supports_conditional_breakpoints.
2317 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2318 New field.
2319 (target_supports_conditional_breakpoints): New macro.
2320
80ad801e
PA
23212015-05-06 Pedro Alves <palves@redhat.com>
2322
2323 PR server/18081
2324 * server.c (start_inferior): If the process exits, mourn it.
2325
819843c7
GB
23262015-04-21 Gary Benson <gbenson@redhat.com>
2327
2328 * hostio.c (fileio_open_flags_to_host): Factored out to
2329 fileio_to_host_openflags in common/fileio.c. Single use
2330 updated.
2331
a2d5a9d7
MF
23322015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2333
2334 * linux-xtensa-low.c (xtensa_fill_gregset)
2335 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2336 XCHAL_HAVE_LOOP.
2337
deb44829
MF
23382015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2339
2340 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2341 (regs_info): Replace usrregs pointer with NULL.
2342
e57f1de3
GB
23432015-04-17 Gary Benson <gbenson@redhat.com>
2344
2345 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2346 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2347 * server.c (handle_qxfer_exec_file): New function.
2348 (qxfer_packets): Add exec-file entry.
2349 (handle_query): Report qXfer:exec-file:read as supported packet.
2350
62828379
RN
23512015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2352
2353 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2354
b88bb450
GB
23552015-04-09 Gary Benson <gbenson@redhat.com>
2356
2357 * hostio-errno.c (errno_to_fileio_error): Remove function.
2358 Update caller to use remote_fileio_to_fio_error.
2359
c8f4bfdd
YQ
23602015-04-09 Yao Qi <yao.qi@linaro.org>
2361
2362 * linux-low.c (linux_insert_point): Call
2363 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2364 (linux_remove_point): Call remove_memory_breakpoint if type is
2365 raw_bkpt_type_sw.
2366 * linux-x86-low.c (x86_insert_point): Don't call
2367 insert_memory_breakpoint.
2368 (x86_remove_point): Don't call remove_memory_breakpoint.
2369
41f98f02
PA
23702015-04-01 Pedro Alves <palves@redhat.com>
2371 Cleber Rosa <crosa@redhat.com>
2372
2373 * server.c (gdbserver_usage): Reorganize and extend the usage
2374 message.
2375
2bf6fb9d
PA
23762015-03-24 Pedro Alves <palves@redhat.com>
2377
2378 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2379 output. Also dump TRAP_TRACE.
2380 (linux_low_filter_event): In debug output, distinguish a
2381 resume_stop SIGSTOP from a delayed SIGSTOP.
2382
369f6daa
GB
23832015-03-24 Gary Benson <gbenson@redhat.com>
2384
2385 * linux-x86-low.c (x86_linux_new_thread): Moved to
2386 nat/x86-linux.c.
2387 (x86_linux_prepare_to_resume): Likewise.
2388
8e5d4070
GB
23892015-03-24 Gary Benson <gbenson@redhat.com>
2390
2391 * Makefile.in (x86-linux-dregs.o): New rule.
2392 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2393 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2394 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2395 (x86_linux_dr_get): Likewise.
2396 (x86_linux_dr_set): Likewise.
2397 (update_debug_registers_callback): Likewise.
2398 (x86_linux_dr_set_addr): Likewise.
2399 (x86_linux_dr_get_addr): Likewise.
2400 (x86_linux_dr_set_control): Likewise.
2401 (x86_linux_dr_get_control): Likewise.
2402 (x86_linux_dr_get_status): Likewise.
2403 (x86_linux_update_debug_registers): Likewise.
2404
2b95d440
GB
24052015-03-24 Gary Benson <gbenson@redhat.com>
2406
2407 * linux-x86-low.c (x86_linux_update_debug_registers):
2408 New function, factored out from...
2409 (x86_linux_prepare_to_resume): ...this.
2410
14b0bc68
GB
24112015-03-24 Gary Benson <gbenson@redhat.com>
2412
2413 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2414 (x86_linux_dr_set): Likewise.
2415 (update_debug_registers_callback): Likewise.
2416 (x86_linux_dr_set_addr): Likewise.
2417 (x86_linux_dr_get_addr): Likewise.
2418 (x86_linux_dr_set_control): Likewise.
2419 (x86_linux_dr_get_control): Likewise.
2420 (x86_linux_dr_get_status): Likewise.
2421 (x86_linux_prepare_to_resume): Likewise.
2422
5dfe6ca8
GB
24232015-03-24 Gary Benson <gbenson@redhat.com>
2424
2425 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2426 Use perror_with_name. Pass string through gettext.
2427 (x86_linux_dr_set): Likewise.
2428
d33472ad
GB
24292015-03-24 Gary Benson <gbenson@redhat.com>
2430
2431 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2432 (x86_linux_dr_set_addr): ...this.
2433 (x86_dr_low_get_addr): Rename to...
2434 (x86_linux_dr_get_addr): ...this.
2435 (x86_dr_low_set_control): Rename to...
2436 (x86_linux_dr_set_control): ...this.
2437 (x86_dr_low_get_control): Rename to...
2438 (x86_linux_dr_get_control): ...this.
2439 (x86_dr_low_get_status): Rename to...
2440 (x86_linux_dr_get_status): ...this.
2441 (x86_dr_low): Update with new function names.
2442
4b134ca1
GB
24432015-03-24 Gary Benson <gbenson@redhat.com>
2444
2445 * Makefile.in (x86-linux.o): New rule.
2446 * configure.srv: Add x86-linux.o to relevant targets.
2447 * linux-low.c (lwp_set_arch_private_info): New function.
2448 (lwp_arch_private_info): Likewise.
2449 * linux-x86-low.c: Include nat/x86-linux.h.
2450 (arch_lwp_info): Removed structure.
2451 (update_debug_registers_callback):
2452 Use lwp_set_debug_registers_changed.
2453 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2454 and lwp_set_debug_registers_changed.
2455 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2456
34c703da
GB
24572015-03-24 Gary Benson <gbenson@redhat.com>
2458
2459 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2460 * linux-arm-low.c (arm_new_thread): Likewise.
2461 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2462 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2463 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2464 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2465
cff068da
GB
24662015-03-24 Gary Benson <gbenson@redhat.com>
2467
2468 * linux-low.c (ptid_of_lwp): New function.
2469 (lwp_is_stopped): Likewise.
2470 (lwp_stop_reason): Likewise.
2471 * linux-x86-low.c (update_debug_registers_callback):
2472 Use lwp_is_stopped.
2473 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2474 lwp_stop_reason.
2475
b2f7c7e8
GB
24762015-03-24 Gary Benson <gbenson@redhat.com>
2477
2478 * linux-low.h (linux_stop_lwp): Remove declaration.
2479
6d4ee8c6
GB
24802015-03-24 Gary Benson <gbenson@redhat.com>
2481
2482 * linux-low.h: Include nat/linux-nat.h.
2483 * linux-low.c (iterate_over_lwps_args): New structure.
2484 (iterate_over_lwps_filter): New function.
2485 (iterate_over_lwps): Likewise.
2486 * linux-x86-low.c (update_debug_registers_callback):
2487 Update signature to what iterate_over_lwps expects.
2488 Remove PID check that iterate_over_lwps now performs.
2489 (x86_dr_low_set_addr): Use iterate_over_lwps.
2490 (x86_dr_low_set_control): Likewise.
2491
70a0bb6b
GB
24922015-03-24 Gary Benson <gbenson@redhat.com>
2493
2494 * linux-x86-low.c (x86_debug_reg_state): New function.
2495 (x86_linux_prepare_to_resume): Use the above.
2496
7b669087
GB
24972015-03-24 Gary Benson <gbenson@redhat.com>
2498
2499 * linux-low.c (current_lwp_ptid): New function.
2500 * linux-x86-low.c: Include nat/linux-nat.h.
2501 (x86_dr_low_get_addr): Use current_lwp_ptid.
2502 (x86_dr_low_get_control): Likewise.
2503 (x86_dr_low_get_status): Likewise.
2504
eef49a3d
PA
25052015-03-20 Pedro Alves <palves@redhat.com>
2506
2507 * tracepoint.c (cmd_qtstatus): Make "str" const.
2508
b2333d22
PA
25092015-03-20 Pedro Alves <palves@redhat.com>
2510
2511 * server.c (handle_general_set): Make "req_str" const.
2512
23f238d3
PA
25132015-03-19 Pedro Alves <palves@redhat.com>
2514
2515 * linux-low.c (linux_resume_one_lwp): Rename to ...
2516 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2517 instead call perror_with_name.
2518 (check_ptrace_stopped_lwp_gone): New function.
2519 (linux_resume_one_lwp): Reimplement as wrapper around
2520 linux_resume_one_lwp_throw that swallows errors if the LWP is
2521 gone.
2522
91baf43f
PA
25232015-03-19 Pedro Alves <palves@redhat.com>
2524
2525 * linux-low.c (count_events_callback, select_event_lwp_callback):
2526 No longer check whether the thread has resume_stop as last resume
2527 kind.
2528
8bf3b159
PA
25292015-03-19 Pedro Alves <palves@redhat.com>
2530
2531 * linux-low.c (count_events_callback, select_event_lwp_callback):
2532 Use the lwp's status_pending_p field, not the thread's.
2533
b90fc188
PA
25342015-03-19 Pedro Alves <palves@redhat.com>
2535
2536 * linux-low.c (select_event_lwp_callback): Update comments to
2537 no longer mention SIGTRAP.
2538
464b0089
GB
25392015-03-18 Gary Benson <gbenson@redhat.com>
2540
2541 * server.c (handle_query): Do not report vFile:fstat as supported.
2542
aa9e327f
GB
25432015-03-11 Gary Benson <gbenson@redhat.com>
2544
2545 * hostio.c (sys/types.h): New include.
2546 (sys/stat.h): Likewise.
2547 (common-remote-fileio.h): Likewise.
2548 (handle_fstat): New function.
2549 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2550
791c0056
GB
25512015-03-11 Gary Benson <gbenson@redhat.com>
2552
2553 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2554 struct stat.st_blocks and struct stat.st_blksize.
2555 * configure: Regenerate.
2556 * config.in: Likewise.
2557 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2558 (OBS): Add common-remote-fileio.o.
2559 (common-remote-fileio.o): New rule.
2560
9a9df970
PA
25612015-03-09 Pedro Alves <palves@redhat.com>
2562
2563 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2564 'struct sockaddr' pointer in 'accept' call.
2565
9eb1356e
PA
25662015-03-09 Pedro Alves <palves@redhat.com>
2567
2568 Revert:
2569 2015-03-07 Pedro Alves <palves@redhat.com>
2570 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2571 or <winsock2.h> here. Instead include "gdb_socket.h".
2572 (remote_open): Use union gdb_sockaddr_u.
2573 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2574 or <winsock2.h> here. Instead include "gdb_socket.h".
2575 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2576 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2577 or <sys/un.h>.
2578 (init_named_socket, gdb_agent_helper_thread): Use union
2579 gdb_sockaddr_u.
2580
aac331e4
PA
25812015-03-07 Pedro Alves <palves@redhat.com>
2582
2583 * configure.ac (build_warnings): Move
2584 -Wdeclaration-after-statement to the C-specific set.
2585 * configure: Regenerate.
2586
366c75fc
PA
25872015-03-07 Pedro Alves <palves@redhat.com>
2588
2589 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2590 or <winsock2.h> here. Instead include "gdb_socket.h".
2591 (remote_open): Use union gdb_sockaddr_u.
2592 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2593 or <winsock2.h> here. Instead include "gdb_socket.h".
2594 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2595 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2596 or <sys/un.h>.
2597 (init_named_socket, gdb_agent_helper_thread): Use union
2598 gdb_sockaddr_u.
2599
492d29ea
PA
26002015-03-07 Pedro Alves <palves@redhat.com>
2601
2602 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2603 instead.
2604
60a191ed
YQ
26052015-03-06 Yao Qi <yao.qi@linaro.org>
2606
2607 * linux-aarch64-low.c (aarch64_insert_point): Use
2608 show_debug_regs as a boolean.
2609 (aarch64_remove_point): Likewise.
2610
f5771b1d
PA
26112015-03-05 Pedro Alves <palves@redhat.com>
2612
2613 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2614 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2615 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2616 * nto-low.c (nto_target_ops): Likewise.
2617 * spu-low.c (spu_target_ops): Likewise.
2618 * win32-low.c (win32_target_ops): Likewise.
2619
3e572f71
PA
26202015-03-04 Pedro Alves <palves@redhat.com>
2621
72f4393d 2622 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2623 Decide whether a breakpoint triggered based on the SIGTRAP's
2624 siginfo.si_code.
72f4393d
L
2625 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2626 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2627 (linux_low_filter_event): Check for breakpoints before checking
2628 watchpoints.
2629 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2630 siginfo.si_code.
72f4393d
L
2631 (linux_stopped_by_sw_breakpoint)
2632 (linux_supports_stopped_by_sw_breakpoint)
2633 (linux_stopped_by_hw_breakpoint)
2634 (linux_supports_stopped_by_hw_breakpoint): New functions.
2635 (linux_target_ops): Install new target methods.
3e572f71 2636
1ec68e26
PA
26372015-03-04 Pedro Alves <palves@redhat.com>
2638
2639 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2640 * server.c (swbreak_feature, hwbreak_feature): New globals.
2641 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2642 (captured_main): Clear swbreak_feature and hwbreak_feature.
2643 * server.h (swbreak_feature, hwbreak_feature): Declare.
2644 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2645 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2646 supports_stopped_by_hw_breakpoint>: New fields.
2647 (target_supports_stopped_by_sw_breakpoint)
2648 (target_stopped_by_sw_breakpoint)
2649 (target_supports_stopped_by_hw_breakpoint)
2650 (target_stopped_by_hw_breakpoint): Declare.
2651
15c66dd6
PA
26522015-03-04 Pedro Alves <palves@redhat.com>
2653
2654 enum lwp_stop_reason -> enum target_stop_reason
2655 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2656 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2657 (linux_wait_1, stuck_in_jump_pad_callback)
2658 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2659 (linux_stopped_by_watchpoint):
2660 * linux-low.h (enum lwp_stop_reason): Delete.
2661 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2662 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2663
98fc70d6
YQ
26642015-03-04 Yao Qi <yao.qi@linaro.org>
2665
2666 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2667
dd2ac174
GB
26682015-03-03 Gary Benson <gbenson@redhat.com>
2669
2670 * hostio.c (handle_vFile): Fix prefix lengths.
2671
d68e53f4
MM
26722015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2673
2674 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2675 ptr_bits.
2676
bf2d68ab
AA
26772015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2678
2679 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2680 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2681 (clean): Add "rm -f" for above C files.
2682 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2683 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2684 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2685 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2686 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2687 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2688 (init_registers_s390x_vx_linux64)
2689 (init_registers_s390x_tevx_linux64)
2690 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2691 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2692 declarations.
2693 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2694 (s390_store_vxrs_high): New functions.
2695 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2696 NT_S390_VXRS_HIGH.
2697 (s390_arch_setup): Add logic for selecting one of the new target
2698 descriptions. Activate the new vector regsets if applicable.
2699 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2700 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2701 and init_registers_s390x_tevx_linux64.
2702
c966a859
PA
27032015-03-01 Pedro Alves <palves@redhat.com>
2704
2705 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2706 parameter.
2707
4180215b
PA
27082015-02-27 Pedro Alves <palves@redhat.com>
2709
2710 * linux-x86-low.c (u_debugreg_offset): New function.
2711 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2712
749bab01
PA
27132015-02-27 Pedro Alves <palves@redhat.com>
2714
2715 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2716 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2717 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2718 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2719 (ps_lsetfpregs, ps_getpid)
2720 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2721 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2722 (ps_lsetxregs, ps_plog): Declare.
2723
3c14e5a3
PA
27242015-02-27 Pedro Alves <palves@redhat.com>
2725
2726 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2727 IP_AGENT_EXPORT_FUNC.
2728 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2729 IP_AGENT_EXPORT_FUNC.
2730 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2731 (IP_AGENT_EXPORT): Delete.
2732 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2733 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2734 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2735 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2736 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2737 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2738 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2739 (traceframe_read_count, traceframe_write_count)
2740 (traceframes_created, trace_state_variables, get_raw_reg)
2741 (get_trace_state_variable_value, set_trace_state_variable_value)
2742 (ust_loaded, helper_thread_id, cmd_buf): Use
2743 IPA_SYM_EXPORTED_NAME.
2744 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2745 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2746 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2747 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2748 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2749 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2750 EXTERN_C_PUSH/EXTERN_C_POP.
2751 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2752 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2753 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2754 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2755 (traceframe_write_count, traceframe_read_count)
2756 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2757 (about_to_request_buffer_space, get_trace_state_variable_value)
2758 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2759 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2760 EXTERN_C_PUSH/EXTERN_C_POP.
2761 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2762 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2763 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2764 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2765 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2766 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2767 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2768 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2769 Define.
2770 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2771 (IP_AGENT_EXPORT_VAR_DECL): Define.
2772 (tracing): Declare.
2773 (gdb_agent_get_raw_reg): Declare.
2774
fe978cb0
PA
27752015-02-27 Tom Tromey <tromey@redhat.com>
2776 Pedro Alves <palves@redhat.com>
2777
2778 Rename symbols whose names are reserved C++ keywords throughout.
2779
3bc3d82a
PA
27802015-02-27 Pedro Alves <palves@redhat.com>
2781
2782 * Makefile.in (COMPILER): New, get it from autoconf.
2783 (CXX): Get from autoconf instead.
2784 (COMPILE.pre): Use COMPILER.
2785 (CC-LD): Rename to ...
2786 (CC_LD): ... this. Use COMPILER.
2787 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2788 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2789 * acinclude.m4: Include build-with-cxx.m4.
2790 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2791 Disable -Werror by default if building in C++ mode.
2792 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2793 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2794 the C++ compiler. Save/restore CXXFLAGS too.
2795 * configure: Regenerate.
2796
07697489
PA
27972015-02-27 Pedro Alves <palves@redhat.com>
2798
2799 * acinclude.m4: Include libiberty.m4.
2800 * configure.ac: Call libiberty_INIT.
2801 * config.in, configure: Regenerate.
2802
9beb7c4e
PA
28032015-02-26 Pedro Alves <palves@redhat.com>
2804
2805 * linux-low.c (linux_wait_1): When incrementing the PC past a
2806 program breakpoint always use the_low_target.breakpoint_len as
2807 increment, rather than the maximum between that and
2808 the_low_target.decr_pc_after_break.
2809
8090aef2
PA
28102015-02-23 Pedro Alves <palves@redhat.com>
2811
2812 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2813 thread was doing a step-over; always adjust the PC if
2814 we stepped over a permanent breakpoint.
2815 (linux_wait_1): If we stepped over breakpoint that was on top of a
2816 permanent breakpoint, manually advance the PC past it.
2817
bc9540e8
PA
28182015-02-23 Pedro Alves <palves@redhat.com>
2819
2820 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2821 modes.
2822 (x86_fill_gregset, x86_store_gregset): Use it when handling
2823 $orig_eax.
2824
2db9a427
PA
28252015-02-20 Pedro Alves <palves@redhat.com>
2826
2827 * thread-db.c: Include "nat/linux-procfs.h".
2828 (thread_db_init): Skip listing new threads if the kernel supports
2829 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2830
afa8d396
PA
28312015-02-20 Pedro Alves <palves@redhat.com>
2832
2833 * linux-low.c (status_pending_p_callback): Use ptid_match.
2834
c9587f88
AT
28352015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2836
2837 PR breakpoints/16812
2838 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2839 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2840 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2841
b05ec7a5
AT
28422015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2843
2844 PR breakpoints/15956
2845 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2846
d33501a5
MM
28472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2848
2849 * linux-low.c (linux_low_btrace_conf): Print size.
2850 * server.c (handle_btrace_conf_general_set): New.
2851 (hanle_general_set): Call handle_btrace_conf_general_set.
2852 (handle_query): Report Qbtrace-conf:bts:size as supported.
2853
f4abbc16
MM
28542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2855
2856 * linux-low.c (linux_low_enable_btrace): Update parameters.
2857 (linux_low_btrace_conf): New.
2858 (linux_target_ops)<to_btrace_conf>: Initialize.
2859 * server.c (current_btrace_conf): New.
2860 (handle_btrace_enable): Rename to ...
2861 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2862 to target_enable_btrace. Update comment. Update users.
2863 (handle_qxfer_btrace_conf): New.
2864 (qxfer_packets): Add btrace-conf entry.
2865 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2866 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2867 (target_ops)<read_btrace_conf>: New.
2868 (target_enable_btrace): Update parameters.
2869 (target_read_btrace_conf): New.
2870
043c3577
MM
28712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2872
2873 * server.c (handle_btrace_general_set): Remove call to
2874 target_supports_btrace.
2875 (supported_btrace_packets): New.
2876 (handle_query): Call supported_btrace_packets.
2877 * target.h: include btrace-common.h.
2878 (btrace_target_info): Removed.
2879 (supports_btrace, target_supports_btrace): Update parameters.
2880
734b0e4b
MM
28812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2882
2883 * Makefile.in (SFILES): Add common/btrace-common.c.
2884 (OBS): Add common/btrace-common.o.
2885 (btrace-common.o): Add build rules.
2886 * linux-low: Include btrace-common.h.
2887 (linux_low_read_btrace): Use struct btrace_data. Call
2888 btrace_data_init and btrace_data_fini.
2889
d6c146e9
PA
28902015-02-06 Pedro Alves <palves@redhat.com>
2891
2892 * thread-db.c (find_new_threads_callback): Add debug output.
2893
20ba1ce6
PA
28942015-02-04 Pedro Alves <palves@redhat.com>
2895
2896 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2897 (resume_stopped_resumed_lwps): New function.
2898 (linux_wait_for_event_filtered): Use it.
2899
8cc73a39
SDJ
29002015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2901
2902 * Makefile.in (SFILES): Add linux-personality.c.
2903 (linux-personality.o): New rule.
2904 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2905 list of objects to be built.
2906 * linux-low.c: Include nat/linux-personality.h.
2907 (linux_create_inferior): Remove code to disable address space
2908 randomization (moved to ../nat/linux-personality.c). Create
2909 cleanup to disable address space randomization.
2910
fb23d554
SDJ
29112015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2912
2913 * Makefile.in (posix-strerror.o): New rule.
2914 (mingw-strerror.o): Likewise.
2915 * configure: Regenerated.
2916 * configure.ac: Source file ../common/common.host. Initialize new
2917 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2918
cdf43629
YQ
29192015-01-14 Yao Qi <yao@codesourcery.com>
2920
2921 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2922 (ppc-linux.o): New rule.
2923 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2924 * configure.ac: AC_CHECK_FUNCS(getauxval).
2925 * config.in: Re-generated.
2926 * configure: Re-generated.
2927 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2928 ppc64_64bit_inferior_p
2929
514c5338
YQ
29302015-01-14 Yao Qi <yao@codesourcery.com>
2931
2932 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2933 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2934 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2935 (PT_ORIG_R3, PT_TRAP): Likewise.
2936 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2937 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2938 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2939
3368c1e5
JB
29402015-01-10 Joel Brobecker <brobecker@adacore.com>
2941
2942 * i387-fp.c (i387_cache_to_xsave): In look over
2943 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2944 zmmh_low_space field by use of zmmh_high_space.
2945
582511be
PA
29462015-01-09 Pedro Alves <palves@redhat.com>
2947
2948 * linux-low.c (step_over_bkpt): Move higher up in the file.
2949 (handle_extended_wait): Don't store the stop_pc here.
2950 (get_stop_pc): Adjust comments and rename to ...
2951 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2952 stopped for a software breakpoint or hardware breakpoint.
2953 (thread_still_has_status_pending_p): New function.
2954 (status_pending_p_callback): Use
2955 thread_still_has_status_pending_p. If the event is no longer
2956 interesting, resume the LWP.
2957 (handle_tracepoints): Add assert.
2958 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2959 (wstatus_maybe_breakpoint): New function.
2960 (cancel_breakpoint): Delete function.
2961 (check_stopped_by_watchpoint): New function, factored out from
2962 linux_low_filter_event.
2963 (lp_status_maybe_breakpoint): Delete function.
2964 (linux_low_filter_event): Remove filter_ptid argument.
2965 Leave thread group exits pending here. Store the LWP's stop PC.
2966 Always leave events pending.
2967 (linux_wait_for_event_filtered): Pull all events out of the
2968 kernel, and leave them all pending.
2969 (count_events_callback, select_event_lwp_callback): Consider all
2970 events.
2971 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2972 (select_event_lwp): Only give preference to the stepping LWP in
2973 all-stop mode. Adjust comments.
2974 (ignore_event): New function.
2975 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2976 references to cancel_breakpoints. Adjust to renames. Also give
2977 equal priority to all LWPs that have had events in non-stop mode.
2978 If reporting a software breakpoint event, unadjust the LWP's PC.
2979 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2980 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2981 Adjust.
2982 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2983 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2984 (linux_stopped_by_watchpoint): Adjust.
2985 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2986 * linux-low.h (enum lwp_stop_reason): New.
2987 (struct lwp_info) <stop_pc>: Adjust comment.
2988 <stopped_by_watchpoint>: Delete field.
2989 <stop_reason>: New field.
2990 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2991 * mem-break.c (software_breakpoint_inserted_here)
2992 (hardware_breakpoint_inserted_here): New function.
2993 * mem-break.h (software_breakpoint_inserted_here)
2994 (hardware_breakpoint_inserted_here): Declare.
2995 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2996 (cancel_breakpoints): Delete.
2997 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2998 (upload_fast_traceframes): Remove references to
2999 cancel_breakpoints.
3000
a33e3959
PA
30012015-01-09 Pedro Alves <palves@redhat.com>
3002
3003 * thread-db.c (find_new_threads_callback): Ignore thread if the
3004 kernel thread ID is -1.
3005
8784d563
PA
30062015-01-09 Pedro Alves <palves@redhat.com>
3007
3008 * linux-low.c (linux_attach_fail_reason_string): Move to
3009 nat/linux-ptrace.c, and rename.
3010 (linux_attach_lwp): Update comment.
3011 (attach_proc_task_lwp_callback): New function.
3012 (linux_attach): Adjust to rename and use
3013 linux_proc_attach_tgid_threads.
3014 (linux_attach_fail_reason_string): Delete declaration.
3015
76f2b779
JB
30162015-01-01 Joel Brobecker <brobecker@adacore.com>
3017
3018 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3019 * server.c (gdbserver_version): Likewise.
3020
fafcc06a
SDJ
30212014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3022
3023 * remote-utils.c: Include ctype.h.
3024 (input_interrupt): Explicitly handle the case when the char
3025 received is the NUL byte. Improve the printing of non-ASCII
3026 characters.
3027
beed38b8
JB
30282014-12-16 Joel Brobecker <brobecker@adacore.com>
3029
3030 * linux-low.c (linux_low_filter_event): Update call to
3031 linux_enable_event_reporting following the addition of
3032 a new parameter to that function.
3033
bf330350
CU
30342014-12-16 Catalin Udma <catalin.udma@freescale.com>
3035
3036 PR server/17457
3037 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3038 (AARCH64_FPCR_REGNO): Likewise.
3039 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3040 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3041 (aarch64_store_fpregset): Likewise.
3042
5227d625
JB
30432014-12-15 Joel Brobecker <brobecker@adacore.com>
3044
3045 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3046 Remove FIXME comment about assumption about N.
3047
f93b65a0
JB
30482014-12-13 Joel Brobecker <brobecker@adacore.com>
3049
3050 * configure.ac: If large-file support is disabled in GDBserver,
3051 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3052 * configure: Regenerate.
3053
e5a9158d
AA
30542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3055
3056 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3057 warning upon ENODATA from ptrace.
3058 * linux-s390-low.c (s390_store_tdb): New.
3059 (s390_regsets): Add regset for NT_S390_TDB.
3060
feea5f36
AA
30612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3062
3063 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3064 without a fill_function.
3065 * linux-s390-low.c (s390_fill_last_break): Remove.
3066 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3067 (s390_arch_setup): Use regset's size instead of fill_function for
3068 loop end condition.
3069
098dbe61
AA
30702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3071
3072 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3073 the regset's store function when ptrace returned an error.
3074 * regcache.c (get_thread_regcache): Invalidate register cache
3075 before fetching inferior's registers.
3076
28eef672
AA
30772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3078
3079 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3080 while-loop as for-loop.
3081 (regsets_store_inferior_registers): Likewise.
3082
bdca27a2
YQ
30832014-11-28 Yao Qi <yao@codesourcery.com>
3084
3085 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3086 * config.in, configure: Re-generate.
3087 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3088 is defined.
3089
9c232dda
YQ
30902014-11-21 Yao Qi <yao@codesourcery.com>
3091
3092 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3093 (AC_CHECK_HEADERS): Remove malloc.h.
3094 * configure: Re-generated.
3095 * config.in: Re-generated.
3096 * server.h: Don't include alloca.h and malloc.h.
3097 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3098 Don't include malloc.h.
3099
43968415
JB
31002014-11-17 Joel Brobecker <brobecker@adacore.com>
3101
3102 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3103 corresponding ERRNO check in same block.
3104
40e91bc7
PA
31052014-11-12 Pedro Alves <palves@redhat.com>
3106
3107 * server.c (cont_thread): Update comment.
3108 (start_inferior, attach_inferior): No longer clear cont_thread.
3109 (handle_v_cont): No longer set cont_thread.
3110 (captured_main): Clear cont_thread each time a GDB connects.
3111
c2c118cf
PA
31122014-11-12 Pedro Alves <palves@redhat.com>
3113
3114 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3115 thread, and don't resume all threads if the Hc thread has exited.
3116
78708b7c
PA
31172014-11-12 Pedro Alves <palves@redhat.com>
3118
3119 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3120 the process group instead of to a specific LWP.
3121
a2abc7de
PA
31222014-10-15 Pedro Alves <palves@redhat.com>
3123
3124 PR server/17487
3125 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3126 parameter.
3127 (arm_set_thread_context): Delete.
3128 (the_low_target): Adjust.
3129 * win32-i386-low.c (debug_registers_changed)
3130 (debug_registers_used): Delete.
3131 (update_debug_registers_callback): New function.
3132 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3133 needing to update their debug registers.
3134 (win32_get_current_dr): New function.
3135 (x86_dr_low_get_addr, x86_dr_low_get_control)
3136 (x86_dr_low_get_status): Fetch the debug register from the thread
3137 record's context.
3138 (i386_initial_stuff): Adjust.
3139 (i386_get_thread_context): Remove current_event parameter. Don't
3140 clear debug_registers_changed nor copy DR values to
3141 debug_reg_state.
3142 (i386_set_thread_context): Delete.
3143 (i386_prepare_to_resume): New function.
3144 (i386_thread_added): Mark the thread as needing to update irs
3145 debug registers.
3146 (the_low_target): Remove i386_set_thread_context and install
3147 i386_prepare_to_resume.
3148 * win32-low.c (win32_get_thread_context): Adjust.
3149 (win32_set_thread_context): Use SetThreadContext
3150 directly.
3151 (win32_prepare_to_resume): New function.
3152 (win32_require_context): New function, factored out from ...
3153 (thread_rec): ... this.
3154 (continue_one_thread): Call win32_prepare_to_resume on each thread
3155 we're about to continue.
3156 (win32_resume): Call win32_prepare_to_resume on the event thread.
3157 * win32-low.h (struct win32_thread_info)
3158 <debug_registers_changed>: New field.
3159 (struct win32_target_ops): Change prototype of set_thread_context,
3160 delete set_thread_context and add prepare_to_resume.
3161 (win32_require_context): New declaration.
3162
a442d071
GB
31632014-10-08 Gary Benson <gbenson@redhat.com>
3164
3165 * server.h: Do not include common-exceptions.h.
3166
6f1947e8
GB
31672014-10-08 Gary Benson <gbenson@redhat.com>
3168
3169 * server.h: Do not include cleanups.h.
3170
63b434a4
JH
31712014-09-30 James Hogan <james.hogan@imgtec.com>
3172
3173 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3174 mips64-dsp-linux.c.
3175
c4d9ceb6
YQ
31762014-09-23 Yao Qi <yao@codesourcery.com>
3177
3178 * linux-low.c (lp_status_maybe_breakpoint): New function.
3179 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3180 (count_events_callback): Likewise.
3181 (select_event_lwp_callback): Likewise.
3182 (cancel_breakpoints_callback): Likewise.
3183
89a5711c
DB
31842014-09-19 Don Breazeal <donb@codesourcery.com>
3185
3186 * linux-low.c (handle_extended_wait): Call
3187 linux_ptrace_get_extended_event.
3188 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3189 linux_is_extended_waitstatus.
3190
bffc0964
JB
31912014-09-16 Joel Brobecker <brobecker@adacore.com>
3192
3193 * Makefile.in (CPPFLAGS): Define.
3194 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3195 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3196
0bfdf32f
GB
31972014-09-16 Gary Benson <gbenson@redhat.com>
3198
3199 * inferiors.h (current_inferior): Renamed as...
3200 (current_thread): New variable. All uses updated.
3201 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3202 (maybe_move_out_of_jump_pad): Likewise.
3203 (cancel_breakpoint): Likewise.
3204 (linux_low_filter_event): Likewise.
3205 (wait_for_sigstop): Likewise.
3206 (linux_resume_one_lwp): Likewise.
3207 (need_step_over_p): Likewise.
3208 (start_step_over): Likewise.
3209 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3210 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3211 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3212 and save_inferior as saved_thread.
3213 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3214 saved_thread.
3215 (regcache_invalidate_thread): Likewise.
3216 * remote-utils.c (prepare_resume_reply): Likewise.
3217 * thread-db.c (thread_db_get_tls_address): Likewise.
3218 (disable_thread_event_reporting): Likewise.
3219 (remove_thread_event_breakpoints): Likewise.
3220 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3221 as saved_thread.
3222 * target.h (set_desired_inferior): Renamed as...
3223 (set_desired_thread): New declaration. All uses updated.
3224 * server.c (myresume): Updated comment to reference thread instead
3225 of inferior.
3226 (handle_serial_event): Likewise.
3227 (handle_target_event): Likewise.
3228
361c8ade
GB
32292014-09-12 Tom Tromey <tromey@redhat.com>
3230 Gary Benson <gbenson@redhat.com>
3231
3232 * regcache.h: Include common-regcache.h.
3233 (regcache_read_pc): Don't declare.
3234 * regcache.c (get_thread_regcache_for_ptid): New function.
3235
bd9269f7
GB
32362014-09-11 Tom Tromey <tromey@redhat.com>
3237 Gary Benson <gbenson@redhat.com>
3238
3239 * symbol.c: New file.
3240 * Makefile.in (SFILES): Add symbol.c.
3241 (OBS): Add symbol.o.
3242
f8c1d06b
GB
32432014-09-11 Gary Benson <gbenson@redhat.com>
3244
3245 * target.c (target_stop_ptid, target_continue_ptid): New
3246 functions.
3247
721ec300
GB
32482014-09-11 Tom Tromey <tromey@redhat.com>
3249 Gary Benson <gbenson@redhat.com>
3250
3251 * target.h: Include target/target.h.
3252 * target.c (target_read_memory, target_read_uint32)
3253 (target_write_memory): New functions.
3254
c5e92cca
GB
32552014-09-11 Gary Benson <gbenson@redhat.com>
3256
3257 * server.h (debug_hw_points): Don't declare.
3258 * server.c (debug_hw_points): Don't define. Replace all uses
3259 with show_debug_regs.
3260 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3261 all uses with show_debug_regs.
3262
2e4bb98a
EBM
32632014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3264
3265 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3266 endianness into account.
3267 (ppc_supply_ptrace_register): Likewise.
3268
ac740bc7
JH
32692014-09-03 James Hogan <james.hogan@imgtec.com>
3270
3271 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3272 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3273
97ea6506
GB
32742014-09-03 Gary Benson <gbenson@redhat.com>
3275
3276 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3277 ALL_DEBUG_ADDRESS_REGISTERS.
3278
df7e5265
GB
32792014-09-02 Gary Benson <gbenson@redhat.com>
3280
3281 * i386-low.h: Renamed as...
3282 * x86-low.h: New file. All type, function and variable name
3283 prefixes changed from "i386_" to "x86_". All references updated.
3284 * i386-low.c: Renamed as...
3285 * x86-low.c: New file. All type, function and variable name
3286 prefixes changed from "i386_" to "x86_". All references updated.
3287
ed859da7
GB
32882014-09-02 Gary Benson <gbenson@redhat.com>
3289
3290 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3291 (x86_linux_new_thread): Likewise.
3292
860789c7
GB
32932014-08-29 Gary Benson <gbenson@redhat.com>
3294
3295 * server.h (setjmp.h): Do not include.
3296 (toplevel): Do not declare.
3297 (common-exceptions.h): Include.
3298 (cleanups.h): Likewise.
3299 * server.c (toplevel): Do not define.
3300 (exit_code): New static global.
3301 (detach_or_kill_for_exit_cleanup): New function.
3302 (main): New function. Original main renamed to...
3303 (captured_main): New function.
3304 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3305
ff55e1b5
GB
33062014-08-29 Gary Benson <gbenson@redhat.com>
3307
3308 * Makefile.in (SFILES): Add common/common-exceptions.c.
3309 (OBS): Add common-exceptions.o.
3310 (common-exceptions.o): New rule.
3311 * utils.c (prepare_to_throw_exception): New function.
3312
e9bcb658
GB
33132014-08-29 Gary Benson <gbenson@redhat.com>
3314
3315 * config.in: Regenerate.
3316 * configure: Likewise.
3317
e3180625
GB
33182014-08-29 Gary Benson <gbenson@redhat.com>
3319
3320 * Makefile.in (SFILES): Add common/cleanups.c.
3321 (OBS): cleanups.o.
3322 (cleanups.o): New rule.
3323
e3d6ba5d
GB
33242014-08-29 Gary Benson <gbenson@redhat.com>
3325
3326 * utils.c (internal_vwarning): New function.
3327
7096e886
GB
33282014-08-28 Gary Benson <gbenson@redhat.com>
3329
3330 * utils.h (fatal): Remove declaration.
3331 * utils.c (fatal): Remove function.
3332
14ce3192
GB
33332014-08-28 Gary Benson <gbenson@redhat.com>
3334
3335 * tracepoint.c (gdb_agent_init): Replace fatal with
3336 perror_with_name.
3337 (initialize_tracepoint): Likewise.
3338
50278d59
GB
33392014-08-28 Gary Benson <gbenson@redhat.com>
3340
3341 * remote-utils.c (remote_prepare): Replace fatal with error.
3342
aa96c426
GB
33432014-08-28 Gary Benson <gbenson@redhat.com>
3344
3345 * linux-low.c (linux_async): Replace fatal with warning.
3346 Tidy up and return.
3347 (linux_start_non_stop): Return -1 if linux_async failed.
3348
f7160e97
GB
33492014-08-28 Gary Benson <gbenson@redhat.com>
3350
3351 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3352 gdb_assert.
3353 (i386_dr_low_get_addr): Remove vague comment.
3354 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3355 gdb_assert.
3356
38e08fca
GB
33572014-08-28 Gary Benson <gbenson@redhat.com>
3358
3359 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3360 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3361 internal_error.
3362 (linux_resume_one_lwp): Likewise.
3363 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3364 gdb_assert.
3365 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3366 with internal_error.
3367 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3368 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3369 (find_register_by_name): Replace fatal with internal_error.
3370 (find_regno): Likewise.
3371 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3372 * thread-db.c (thread_db_create_event): Likewise.
3373 (thread_db_load_search): Likewise.
3374 (try_thread_db_load_1): Likewise.
3375 * tracepoint.c (get_jump_space_head): Replace fatal with
3376 internal_error.
3377 (claim_trampoline_space): Likewise.
3378 (have_fast_tracepoint_trampoline_buffer): Likewise.
3379 (cmd_qtstart): Likewise.
3380 (stop_tracing): Likewise.
3381 (fast_tracepoint_collecting): Likewise.
3382 (target_malloc): Likewise.
3383 (download_tracepoint): Likewise.
3384 (download_trace_state_variables): Replace check with gdb_assert.
3385 (upload_fast_traceframes): Replace fatal with internal_error.
3386
34abf635
GB
33872014-08-19 Tom Tromey <tromey@redhat.com>
3388 Gary Benson <gbenson@redhat.com>
3389
3390 * Makefile.in (SFILES): Add common/common-debug.c.
3391 (OBS): Add common-debug.o.
3392 (common-debug.o): New rule.
3393 * debug.h (debug_printf): Don't declare.
3394 * debug.c (debug_printf): Renamed and rewritten as...
3395 (debug_vprintf): New function.
3396
f6e94d78
GB
33972014-08-19 Gary Benson <gbenson@redhat.com>
3398
3399 * utils.h: Do not include print-utils.h.
3400
9239eeab
GB
34012014-08-19 Tom Tromey <tromey@redhat.com>
3402 Gary Benson <gbenson@redhat.com>
3403
3404 * server.h: Add static assertion.
3405 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3406
ef87c8bb
GB
34072014-08-19 Tom Tromey <tromey@redhat.com>
3408 Gary Benson <gbenson@redhat.com>
3409
3410 * Makefile.in (SFILES): Add common/errors.c.
3411 (OBS): Add errors.o.
3412 (IPA_OBS): Add errors-ipa.o.
3413 (errors.o): New rule.
3414 (errors-ipa.o): Likewise.
3415 * utils.h (perror_with_name, error, warning): Don't declare.
3416 * utils.c (warning): Renamed and rewritten as...
3417 (vwarning): New function.
3418 (error): Renamed and rewritten as...
3419 (verror): New function.
3420 (internal_error): Renamed and rewritten as...
3421 (internal_verror): New function.
3422
bb974a24
GB
34232014-08-07 Gary Benson <gbenson@redhat.com>
3424
3425 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3426 * configure: Regenerate.
3427 * config.in: Likewise.
3428 * server.h: Do not include errno.h.
3429 * event-loop.c: Likewise.
3430 * hostio-errno.c: Likewise.
3431 * linux-low.c: Likewise.
3432 * remote-utils.c: Likewise.
3433 * spu-low.c: Likewise.
3434 * utils.c: Likewise.
3435 * gdbreplay.c: Unconditionally include errno.h.
3436
6d3d12eb
GB
34372014-08-07 Gary Benson <gbenson@redhat.com>
3438
3439 * server.h: Do not include string.h.
3440 * event-loop.c: Likewise.
3441 * linux-low.c: Likewise.
3442 * regcache.c: Likewise.
3443 * remote-utils.c: Likewise.
3444 * spu-low.c: Likewise.
3445 * utils.c: Likewise.
3446
dccbb609
GB
34472014-08-07 Gary Benson <gbenson@redhat.com>
3448
3449 * server.h: Do not include gdb_assert.h.
3450
e76df0d0
GB
34512014-08-07 Gary Benson <gbenson@redhat.com>
3452
3453 * server.h: Do not include common-utils.h.
3454
4cb9c816
GB
34552014-08-07 Gary Benson <gbenson@redhat.com>
3456
3457 * server.h: Do not include ptid.h.
3458 * notif.h: Likewise.
3459
3995eeee
GB
34602014-08-07 Gary Benson <gbenson@redhat.com>
3461
3462 * server.h: Do not include gdb_locale.h.
3463
cb9f1a9b
GB
34642014-08-07 Gary Benson <gbenson@redhat.com>
3465
3466 * server.h: Do not include gdb/signals.h.
3467 * win32-low.c: Likewise.
3468
a5fceff8
GB
34692014-08-07 Gary Benson <gbenson@redhat.com>
3470
3471 * server.h: Do not include pathmax.h.
3472
b9391142
GB
34732014-08-07 Gary Benson <gbenson@redhat.com>
3474
3475 * server.h: Do not include libiberty.h.
3476 * linux-bfin-low.c: Likewise.
3477
0e443c87
GB
34782014-08-07 Gary Benson <gbenson@redhat.com>
3479
3480 * server.h: Do not include ansidecl.h.
3481
8ebb3f56
GB
34822014-08-07 Gary Benson <gbenson@redhat.com>
3483
3484 * linux-x86-low.c: Do not include stddef.h.
3485 * lynx-ppc-low.c: Likewise.
3486 * tracepoint.c: Likewise.
3487
8980bdf6
GB
34882014-08-07 Gary Benson <gbenson@redhat.com>
3489
3490 * server.h: Do not include stdarg.h.
3491 * nto-low.c: Likewise.
3492
d7096f71
GB
34932014-08-07 Gary Benson <gbenson@redhat.com>
3494
3495 * server.h: Do not include stdlib.h.
3496 * inferiors.c: Likewise.
3497 * linux-low.c: Likewise.
3498 * regcache.c: Likewise.
3499 * spu-low.c: Likewise.
3500 * tracepoint.c: Likewise.
3501 * utils.c: Likewise.
3502
d02f550d
GB
35032014-08-07 Gary Benson <gbenson@redhat.com>
3504
3505 * server.h: Do not include stdio.h.
3506 * linux-low.c: Likewise.
3507 * remote-utils.c: Likewise.
3508 * spu-low.c: Likewise.
3509 * utils.c: Likewise.
3510 * wincecompat.c: Likewise.
3511
87f6c4e3
GB
35122014-08-06 Gary Benson <gbenson@redhat.com>
3513
3514 * regcache.c (init_register_cache): Move conditionals inside if.
3515
7089dca4
GB
35162014-08-06 Gary Benson <gbenson@redhat.com>
3517
3518 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3519
462f517e
GB
35202014-07-31 Gary Benson <gbenson@redhat.com>
3521
3522 * ax.h: Do not include server.h.
3523 * gdbthread.h: Likewise.
3524 * lynx-low.h: Likewise.
3525 * notif.h: Likewise.
3526
976411d6
GB
35272014-07-30 Gary Benson <gbenson@redhat.com>
3528
3529 * server.h: Include common-defs.h.
3530 Do not include config.h or build-gnulib-gdbserver/config.h.
3531
d41f6d8e
GB
35322014-07-30 Gary Benson <gbenson@redhat.com>
3533
3534 * hostio-errno.c: Move server.h to top of includes list.
3535 * inferiors.c: Likewise.
3536 * linux-x86-low.c: Likewise.
3537 * notif.c: Include server.h.
3538
314c6a35
TT
35392014-07-24 Tom Tromey <tromey@redhat.com>
3540 Gary Benson <gbenson@redhat.com>
3541
3542 * server.h (CORE_ADDR): Now unsigned.
3543
69ff6be5
PA
35442014-07-16 Pedro Alves <palves@redhat.com>
3545
3546 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3547
ce9e3fe7
PA
35482014-07-15 Pedro Alves <palves@redhat.com>
3549
3550 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3551 copy.
3552
e76126e8
PA
35532014-07-11 Pedro Alves <palves@redhat.com>
3554
3555 * linux-low.c (kill_wait_lwp): New function, based on
3556 kill_one_lwp_callback, but use my_waitpid directly.
3557 (kill_one_lwp_callback, linux_kill): Use it.
3558
8e9db26e
PA
35592014-06-23 Pedro Alves <palves@redhat.com>
3560
3561 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3562 before setting DR0..DR3.
3563
698b3e08
GB
35642014-06-20 Gary Benson <gbenson@redhat.com>
3565
3566 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3567 * configure: Regenerated.
3568 * config.in: Likewise.
3569
125f8a3d
GB
35702014-06-20 Gary Benson <gbenson@redhat.com>
3571
3572 * Makefile.in (SFILES): Update locations for files moved
3573 from common to nat.
3574 (object file files): Reordered.
3575
42995dbd
GB
35762014-06-20 Gary Benson <gbenson@redhat.com>
3577
3578 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3579 (i386_dr_low_set_addr): Likewise.
3580 (i386_dr_low_get_addr): Likewise.
3581 (i386_dr_low_can_set_control): Likewise.
3582 (i386_dr_low_set_control): Likewise.
3583 (i386_dr_low_get_control): Likewise.
3584 (i386_dr_low_get_status): Likewise.
3585 (i386_get_debug_register_length): Likewise.
3586 * linux-x86-low.c (i386_dr_low_set_addr):
3587 Changed signature. Made static.
3588 (i386_dr_low_get_addr): Likewise.
3589 (i386_dr_low_set_control): Likewise.
3590 (i386_dr_low_get_control): Likewise.
3591 (i386_dr_low_get_status): Likewise.
3592 (i386_dr_low): New global variable.
3593 * win32-i386-low.c (i386_dr_low_set_addr):
3594 Changed signature. Made static.
3595 (i386_dr_low_get_addr): Likewise.
3596 (i386_dr_low_set_control): Likewise.
3597 (i386_dr_low_get_control): Likewise.
3598 (i386_dr_low_get_status): Likewise.
3599 (i386_dr_low): New global variable.
3600
e1d2394b
MS
36012014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3602
3603 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3604 * Makefile.in (AR, AR_FLAGS): Define.
3605 * configure: Regenerate.
3606
3a8ee006
GB
36072014-06-19 Gary Benson <gbenson@redhat.com>
3608
3609 * Makefile.in (i386-dregs.o): New rule.
3610 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3611 * i386-low.c (target.h): Remove include.
3612 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3613 (DR_CONTROL_SHIFT): Likewise.
3614 (DR_CONTROL_SIZE): Likewise.
3615 (DR_RW_EXECUTE): Likewise.
3616 (DR_RW_WRITE): Likewise.
3617 (DR_RW_READ): Likewise.
3618 (DR_RW_IORW): Likewise.
3619 (DR_LEN_1): Likewise.
3620 (DR_LEN_2): Likewise.
3621 (DR_LEN_4): Likewise.
3622 (DR_LEN_8): Likewise.
3623 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3624 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3625 (DR_ENABLE_SIZE): Likewise.
3626 (DR_LOCAL_SLOWDOWN): Likewise.
3627 (DR_GLOBAL_SLOWDOWN): Likewise.
3628 (DR_CONTROL_RESERVED): Likewise.
3629 (I386_DR_CONTROL_MASK): Likewise.
3630 (I386_DR_VACANT): Likewise.
3631 (I386_DR_LOCAL_ENABLE): Likewise.
3632 (I386_DR_GLOBAL_ENABLE): Likewise.
3633 (I386_DR_DISABLE): Likewise.
3634 (I386_DR_SET_RW_LEN): Likewise.
3635 (I386_DR_GET_RW_LEN): Likewise.
3636 (I386_DR_WATCH_HIT): Likewise.
3637 (i386_wp_op_t): Likewise.
3638 (i386_show_dr): Likewise.
3639 (i386_length_and_rw_bits): Likewise.
3640 (i386_insert_aligned_watchpoint): Likewise.
3641 (i386_remove_aligned_watchpoint): Likewise.
3642 (i386_handle_nonaligned_watchpoint): Likewise.
3643 i386_update_inferior_debug_regs(): Likewise.
3644 (i386_dr_insert_watchpoint): Likewise.
3645 (i386_dr_remove_watchpoint): Likewise.
3646 (i386_dr_region_ok_for_watchpoint): Likewise.
3647 (i386_dr_stopped_data_address): Likewise.
3648 (i386_dr_stopped_by_watchpoint): Likewise.
3649
8f26655c
GB
36502014-06-19 Gary Benson <gbenson@redhat.com>
3651
3652 * i386-low.c (i386_dr_show): Renamed to
3653 i386_show_dr and made static. All uses updated.
3654 (i386_dr_length_and_rw_bits): Renamed to
3655 i386_length_and_rw_bits and made static.
3656 All uses updated.
3657 (i386_dr_insert_aligned_watchpoint): Renamed to
3658 i386_insert_aligned_watchpoint and made static.
3659 All uses updated.
3660 (i386_dr_remove_aligned_watchpoint): Renamed to
3661 i386_remove_aligned_watchpoint and made static.
3662 All uses updated.
3663 (i386_dr_update_inferior_debug_regs): Renamed to
3664 i386_update_inferior_debug_regs and made static.
3665 All uses updated.
3666
b9228891
GB
36672014-06-18 Gary Benson <gbenson@redhat.com>
3668
5171def3
GB
3669 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3670 (i386_dr_low_can_set_control): Likewise.
3671 (i386_get_debug_register_length): Likewise.
3672 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3673 (i386_dr_low_can_set_control): Likewise.
3674 (i386_get_debug_register_length): Likewise.
3675
36762014-06-17 Gary Benson <gbenson@redhat.com>
3677
b9228891
GB
3678 * i386-low.h (i386-dregs.h): New include.
3679 (DR_FIRSTADDR): Now in i386-dregs.h.
3680 (DR_LASTADDR): Likewise.
3681 (DR_NADDR): Likewise.
3682 (DR_STATUS): Likewise.
3683 (DR_CONTROL): Likewise.
3684 (i386_debug_reg_state): Likewise.
3685 (i386_dr_insert_watchpoint): Likewise.
3686 (i386_dr_remove_watchpoint): Likewise.
3687 (i386_dr_region_ok_for_watchpoint): Likewise.
3688 (i386_dr_stopped_data_address): Likewise.
3689 (i386_dr_stopped_by_watchpoint): Likewise.
3690 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3691
4be83cc2
GB
36922014-06-18 Gary Benson <gbenson@redhat.com>
3693
3694 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3695 i386_dr_insert_watchpoint.
3696 (i386_low_remove_watchpoint): Renamed to
3697 i386_dr_remove_watchpoint.
3698 (i386_low_region_ok_for_watchpoint): Renamed to
3699 i386_dr_region_ok_for_watchpoint.
3700 (i386_low_stopped_data_address): Renamed to
3701 i386_dr_stopped_data_address.
3702 (i386_low_stopped_by_watchpoint): Renamed to
3703 i386_dr_stopped_by_watchpoint.
3704 * i386-low.c (i386_show_dr): Renamed to
3705 i386_dr_show and made nonstatic. All uses updated.
3706 (i386_length_and_rw_bits): Renamed to
3707 i386_dr_length_and_rw_bits and made nonstatic.
3708 All uses updated.
3709 (i386_insert_aligned_watchpoint): Renamed to
3710 i386_dr_insert_aligned_watchpoint and made nonstatic.
3711 All uses updated.
3712 (i386_remove_aligned_watchpoint): Renamed to
3713 i386_dr_remove_aligned_watchpoint and made nonstatic.
3714 All uses updated.
3715 (i386_update_inferior_debug_regs): Renamed to
3716 i386_dr_update_inferior_debug_regs and made nonstatic.
3717 All uses updated.
3718 (i386_low_insert_watchpoint): Renamed to
3719 i386_dr_insert_watchpoint. All uses updated.
3720 (i386_low_remove_watchpoint): Renamed to
3721 i386_dr_remove_watchpoint. All uses updated.
3722 (i386_low_region_ok_for_watchpoint): Renamed to
3723 i386_dr_region_ok_for_watchpoint. All uses updated.
3724 (i386_low_stopped_data_address): Renamed to
3725 i386_dr_stopped_data_address. All uses updated.
3726 (i386_low_stopped_by_watchpoint): Renamed to
3727 i386_dr_stopped_by_watchpoint. All uses updated.
3728
131aa0d4
GB
37292014-06-18 Gary Benson <gbenson@redhat.com>
3730
3731 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3732 (i386_dr_low_can_set_control): Likewise.
3733 (i386_insert_aligned_watchpoint): New check.
3734
d9305f7f
GB
37352014-06-18 Gary Benson <gbenson@redhat.com>
3736
3737 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3738 Renamed to state.
3739
e927c9fc
GB
37402014-06-18 Gary Benson <gbenson@redhat.com>
3741
3742 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3743 instead of fatal and error.
3744 (i386_handle_nonaligned_watchpoint): Likewise.
3745
1b6d4134
GB
37462014-06-18 Gary Benson <gbenson@redhat.com>
3747
3748 * i386-low.c (i386_get_debug_register_length): New macro.
3749 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3750 (i386_show_dr): Use debug_printf instead of fprintf. Use
3751 phex to format values.
3752
6e62758f
GB
37532014-06-18 Gary Benson <gbenson@redhat.com>
3754
3755 * i386-low.h: Comment changes.
3756 * i386-low.c: Likewise.
3757
fc6e2f03
GB
37582014-06-18 Gary Benson <gbenson@redhat.com>
3759
3760 * i386-low.c: Whitespace changes.
3761
f9d1eeed
TT
37622014-06-12 Tom Tromey <tromey@redhat.com>
3763
3764 * utils.c (freeargv): Remove.
3765
0b04e523
TT
37662014-06-12 Tom Tromey <tromey@redhat.com>
3767
3768 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3769 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3770 (parse_debug_format_options): Likewise.
3771 (gdbserver_usage): Likewise.
3772 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3773 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3774 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3775 against libiberty.
3776 ($(LIBGNU)): Depend on libiberty.
3777 (all-lib): Recurse into all subdirs.
3778 (install-only): Invoke "install" target in subdirs.
3779 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3780 targets.
3781 * configure: Rebuild.
3782 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3783 for vasprintf, vsnprintf, or gettimeofday.
3784 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3785 srv_tgtobj.
3786
270c9937
JB
37872014-06-05 Joel Brobecker <brobecker@adacore.com>
3788
3789 * development.sh: Delete.
3790 * Makefile.in (config.status): Adjust dependency on development.sh.
3791 * configure.ac: Adjust development.sh source call.
3792 * configure: Regenerate.
3793
0a261ed8
PA
37942014-06-02 Pedro Alves <palves@redhat.com>
3795
3796 * ax.c (gdb_free_agent_expr): New function.
3797 * ax.h (gdb_free_agent_expr): New declaration.
3798 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3799 list.
3800 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3801 static.
3802 (clear_breakpoint_conditions_and_commands): New function.
3803 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3804 (clear_breakpoint_conditions_and_commands): New declaration.
3805
e9dae05e
RR
38062014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3807
3808 * linux-aarch64-low.c (asm/ptrace.h): Include.
3809
5876f503
JK
38102014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3811
3812 Fix TLS access for -static -pthread.
3813 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3814 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3815 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3816
802e8e6d
PA
38172014-05-20 Pedro Alves <palves@redhat.com>
3818
3819 * linux-aarch64-low.c (aarch64_insert_point)
3820 (aarch64_remove_point): No longer check whether the type is
3821 supported here. Adjust to new interface.
3822 (the_low_target): Install aarch64_supports_z_point_type as
3823 supports_z_point_type method.
3824 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3825 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3826 instead of a Z packet char. Adjust.
3827 (arm_supports_z_point_type): New function.
3828 (arm_insert_point, arm_remove_point): Adjust to new interface.
3829 (the_low_target): Install arm_supports_z_point_type.
3830 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3831 (cris_insert_point, cris_remove_point): Adjust to new interface.
3832 Don't check whether the type is supported here.
3833 (the_low_target): Install cris_supports_z_point_type.
3834 * linux-low.c (linux_supports_z_point_type): New function.
3835 (linux_insert_point, linux_remove_point): Adjust to new interface.
3836 * linux-low.h (struct linux_target_ops) <insert_point,
3837 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3838 raw_breakpoint pointer parameter.
3839 <supports_z_point_type>: New method.
3840 * linux-mips-low.c (mips_supports_z_point_type): New function.
3841 (mips_insert_point, mips_remove_point): Adjust to new interface.
3842 Use mips_supports_z_point_type.
3843 (the_low_target): Install mips_supports_z_point_type.
3844 * linux-ppc-low.c (the_low_target): Install NULL as
3845 supports_z_point_type method.
3846 * linux-s390-low.c (the_low_target): Install NULL as
3847 supports_z_point_type method.
3848 * linux-sparc-low.c (the_low_target): Install NULL as
3849 supports_z_point_type method.
3850 * linux-x86-low.c (x86_supports_z_point_type): New function.
3851 (x86_insert_point): Adjust to new insert_point interface. Use
3852 insert_memory_breakpoint. Adjust to new
3853 i386_low_insert_watchpoint interface.
3854 (x86_remove_point): Adjust to remove_point interface. Use
3855 remove_memory_breakpoint. Adjust to new
3856 i386_low_remove_watchpoint interface.
3857 (the_low_target): Install x86_supports_z_point_type.
3858 * lynx-low.c (lynx_target_ops): Install NULL as
3859 supports_z_point_type callback.
3860 * nto-low.c (nto_supports_z_point_type): New.
3861 (nto_insert_point, nto_remove_point): Adjust to new interface.
3862 (nto_target_ops): Install nto_supports_z_point_type.
3863 * mem-break.c: Adjust intro comment.
3864 (struct raw_breakpoint) <raw_type, size>: New fields.
3865 <inserted>: Update comment.
3866 <shlib_disabled>: Delete field.
3867 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3868 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3869 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3870 (raw_bkpt_type_to_target_hw_bp_type): New function.
3871 (find_enabled_raw_code_breakpoint_at): New function.
3872 (find_raw_breakpoint_at): New type and size parameters. Use them.
3873 (insert_memory_breakpoint): New function, based off
3874 set_raw_breakpoint_at.
3875 (remove_memory_breakpoint): New function.
3876 (set_raw_breakpoint_at): Reimplement.
3877 (set_breakpoint): New, based on set_breakpoint_at.
3878 (set_breakpoint_at): Reimplement.
3879 (delete_raw_breakpoint): Go through the_target->remove_point
3880 instead of assuming memory breakpoints.
3881 (find_gdb_breakpoint_at): Delete.
3882 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3883 (find_gdb_breakpoint): New function.
3884 (set_gdb_breakpoint_at): Delete.
3885 (z_type_supported): New function.
3886 (set_gdb_breakpoint_1): New function, loosely based off
3887 set_gdb_breakpoint_at.
3888 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3889 (delete_gdb_breakpoint_at): Delete.
3890 (delete_gdb_breakpoint_1): New function, loosely based off
3891 delete_gdb_breakpoint_at.
3892 (delete_gdb_breakpoint): New function.
3893 (clear_gdb_breakpoint_conditions): Rename to ...
3894 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3895 breakpoint.
3896 (add_condition_to_breakpoint): Make static.
3897 (add_breakpoint_condition): Take a struct breakpoint pointer
3898 instead of an address. Adjust.
3899 (gdb_condition_true_at_breakpoint): Rename to ...
3900 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3901 z_type parameter.
3902 (gdb_condition_true_at_breakpoint): Reimplement.
3903 (add_breakpoint_commands): Take a struct breakpoint pointer
3904 instead of an address. Adjust.
3905 (gdb_no_commands_at_breakpoint): Rename to ...
3906 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3907 parameter. Return true if no breakpoint was found. Change debug
3908 output.
3909 (gdb_no_commands_at_breakpoint): Reimplement.
3910 (run_breakpoint_commands): Rename to ...
3911 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3912 and change return type to boolean.
3913 (run_breakpoint_commands): New function.
3914 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3915 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3916 breakpoint. Go through the_target->remove_point instead of
3917 assuming memory breakpoint.
3918 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3919 software and hardware breakpoints.
3920 (reinsert_raw_breakpoint): Go through the_target->insert_point
3921 instead of assuming memory breakpoint.
3922 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3923 software and hardware breakpoints.
3924 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3925 Check both software and hardware breakpoints.
3926 (validate_inserted_breakpoint): Assert the breakpoint is a
3927 software breakpoint. Set the inserted flag to -1 instead of
3928 setting shlib_disabled.
3929 (delete_disabled_breakpoints): Adjust.
3930 (validate_breakpoints): Only validate software breakpoints.
3931 Adjust to inserted flag change.
3932 (check_mem_read, check_mem_write): Skip breakpoint types other
3933 than software breakpoints. Adjust to inserted flag change.
3934 * mem-break.h (enum raw_bkpt_type): New enum.
3935 (raw_breakpoint, struct process_info): Forward declare.
3936 (Z_packet_to_target_hw_bp_type): Delete declaration.
3937 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3938 (set_gdb_breakpoint, delete_gdb_breakpoint)
3939 (clear_breakpoint_conditions): New declarations.
3940 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3941 (breakpoint_inserted_here): Update comment.
3942 (add_breakpoint_condition, add_breakpoint_commands): Replace
3943 address parameter with a breakpoint pointer parameter.
3944 (gdb_breakpoint_here): Update comment.
3945 (delete_gdb_breakpoint_at): Delete.
3946 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3947 * server.c (process_point_options): Take a struct breakpoint
3948 pointer instead of an address. Adjust.
3949 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3950 delete_gdb_breakpoint.
3951 * spu-low.c (spu_target_ops): Install NULL as
3952 supports_z_point_type method.
3953 * target.h: Include mem-break.h.
3954 (struct target_ops) <prepare_to_access_memory>: Update comment.
3955 <supports_z_point_type>: New field.
3956 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3957 instead of a char. Also take a raw breakpoint pointer.
3958 * win32-arm-low.c (the_low_target): Install NULL as
3959 supports_z_point_type.
3960 * win32-i386-low.c (i386_supports_z_point_type): New function.
3961 (i386_insert_point, i386_remove_point): Adjust to new interface.
3962 (the_low_target): Install i386_supports_z_point_type.
3963 * win32-low.c (win32_supports_z_point_type): New function.
3964 (win32_insert_point, win32_remove_point): Adjust to new interface.
3965 (win32_target_ops): Install win32_supports_z_point_type.
3966 * win32-low.h (struct win32_target_ops):
3967 <supports_z_point_type>: New method.
3968 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3969 instead of a char. Also take a raw breakpoint pointer.
3970
932539e3
PA
39712014-05-20 Pedro Alves <palves@redhat.com>
3972
3973 * mem-break.h: Include break-common.h.
3974 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3975 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3976 (Z_packet_to_target_hw_bp_type): New declaration.
3977 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3978 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3979 (Z_PACKET_ACCESS_WP): Delete macros.
3980 (Z_packet_to_hw_type): Delete function.
3981 * i386-low.h: Don't include break-common.h here.
3982 (Z_packet_to_hw_type): Delete declaration.
3983 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3984 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3985 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3986 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3987 * linux-aarch64-low.c: Don't include break-common.h here.
3988 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3989 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3990 (Z_packet_to_target_hw_bp_type): Delete function.
3991 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3992 function.
3993 (mips_insert_point, mips_remove_point): Use
3994 Z_packet_to_target_hw_bp_type.
3995
4ff0d3d8
PA
39962014-05-20 Pedro Alves <palves@redhat.com>
3997
3998 * linux-aarch64-low.c: Include break-common.h.
3999 (enum target_point_type): Delete.
4000 (Z_packet_to_point_type): Rename to ...
4001 (Z_packet_to_target_hw_bp_type): ... this, and return a
4002 target_hw_bp_type instead.
4003 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4004 instead of an enum target_point_type.
4005 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4006 breakpoint type.
4007 (aarch64_dr_state_insert_one_point)
4008 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4009 (aarch64_handle_aligned_watchpoint)
4010 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4011 Take an enum target_hw_bp_type instead of an enum
4012 target_point_type.
4013 (aarch64_supports_z_point_type): New function.
4014 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4015 use Z_packet_to_target_hw_bp_type.
4016
786dc519
JB
40172014-05-20 Joel Brobecker <brobecker@adacore.com>
4018
4019 * configure.ac: Only use -Werror by default when DEVELOPMENT
4020 is true.
4021 * configure: Regenerate.
4022
9e0aa64f
JK
40232014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4024
4025 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4026 * linux-x86-low.c (X86_64_USER_REGS): New.
4027 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4028
2b577b92
YQ
40292014-04-28 Yao Qi <yao@codesourcery.com>
4030
4031 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4032 name.
4033
94611da2
PA
40342014-04-25 Pedro Alves <palves@redhat.com>
4035
4036 PR server/16255
4037 * linux-low.c (linux_attach_fail_reason_string): New function.
4038 (linux_attach_lwp): Delete.
4039 (linux_attach_lwp_1): Rename to ...
4040 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4041 argument. Remove "initial" parameter. Return int instead of
4042 void. Don't error or warn here.
4043 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4044 failure to attach to the tgid. Call warning when failing to
4045 attach to an lwp.
4046 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4047 argument. Remove "initial" parameter. Return int instead of
4048 void. Don't error or warn here.
4049 (linux_attach_fail_reason_string): New declaration.
4050 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4051 interface change. Use linux_attach_fail_reason_string.
4052
01f9f808
MS
40532014-04-24 Michael Sturm <michael.sturm@mintel.com>
4054 Walfred Tedeschi <walfred.tedeschi@intel.com>
4055
4056 * Makefile.in: Added rules to handle new files
4057 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4058 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4059 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4060 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4061 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4062 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4063 x32-avx512-linux.o.
4064 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4065 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4066 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4067 i386/x32-avx512.xml.
4068 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4069 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4070 i386/x32-avx512-linux.xml.
4071 * i387-fp.c (num_avx512_k_registers): New constant for number
4072 of K registers.
4073 (num_avx512_zmmh_low_registers): New constant for number of
4074 lower ZMM registers (0-15).
4075 (num_avx512_zmmh_high_registers): New constant for number of
4076 higher ZMM registers (16-31).
4077 (num_avx512_ymmh_registers): New contant for number of higher
4078 YMM registers (ymm16-31 added by avx521 on x86_64).
4079 (num_avx512_xmm_registers): New constant for number of higher
4080 XMM registers (xmm16-31 added by AVX512 on x86_64).
4081 (struct i387_xsave): Add space for AVX512 registers.
4082 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4083 Add code to handle AVX512 registers.
4084 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4085 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4086 prototypei from generated file.
4087 (tdesc_amd64_avx512_linux): Likewise.
4088 (init_registers_x32_avx512_linux): Likewise.
4089 (tdesc_x32_avx512_linux): Likewise.
4090 (init_registers_i386_avx512_linux): Likewise.
4091 (tdesc_i386_avx512_linux): Likewise.
4092 (x86_64_regmap): Add AVX512 registers.
4093 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4094 mask.
4095 (initialize_low_arch): Add code to initialize AVX512 registers.
4096
51aa91f9
PA
40972014-04-23 Pedro Alves <palves@redhat.com>
4098
4099 * mem-break.c (find_gdb_breakpoint_at): Make static.
4100 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4101
a4165e94
PA
41022014-04-23 Pedro Alves <palves@redhat.com>
4103
4104 * i386-low.c: Don't include break-common.h here.
4105 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4106 prototype to take target_hw_bp_type as argument instead of a Z
4107 packet char.
4108 * i386-low.h: Include break-common.h here.
4109 (Z_packet_to_hw_type): Declare.
4110 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4111 prototypes.
4112 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4113 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4114 (x86_remove_point): Convert the packet number to a
4115 target_hw_bp_type before calling i386_low_remove_watchpoint.
4116 * win32-i386-low.c (i386_insert_point): Convert the packet number
4117 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4118 (i386_remove_point): Convert the packet number to a
4119 target_hw_bp_type before calling i386_low_remove_watchpoint.
4120
b8acf843
PA
41212014-04-23 Pedro Alves <palves@redhat.com>
4122
4123 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4124
d708bcd1
PA
41252014-04-10 Pedro Alves <palves@redhat.com>
4126
4127 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4128 Check if the condition or command is NULL before checking if the
4129 breakpoint is known. On success, return true.
4130 * mem-break.h (add_breakpoint_condition): Document return.
4131 (add_breakpoint_commands): Add describing comment.
4132 * server.c (skip_to_semicolon): New function.
4133 (process_point_options): Use it.
4134
2eec7d5b
PA
41352014-04-09 Pedro Alves <palves@redhat.com>
4136
4137 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4138 to lwpid_of.
4139
fa96cb38
PA
41402014-02-27 Pedro Alves <palves@redhat.com>
4141
4142 PR 12702
4143 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4144 macros.
4145 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4146 output.
4147 (last_thread_of_process_p): Take a PID argument instead of a
4148 thread pointer.
4149 (linux_wait_for_lwp): Delete.
4150 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4151 functions.
4152 (linux_low_filter_event): New function, party factored out from
4153 linux_wait_for_event.
4154 (linux_wait_for_event): Rename to ...
4155 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4156 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4157 sigsuspend. Check for zombie leaders.
4158 (linux_wait_for_event): Reimplement as wrapper around
4159 linux_wait_for_event_filtered.
4160 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4161 a normal or signal exit is seen, it's the whole process exiting.
4162 (wait_for_sigstop): No longer a for_each_inferior callback.
4163 Rewrite on top of linux_wait_for_event_filtered.
4164 (stop_all_lwps): Call wait_for_sigstop directly.
4165 * server.c (resume, handle_target_event): Handle
4166 TARGET_WAITKIND_NO_RESUMED.
4167
d763de10
JB
41682014-02-26 Joel Brobecker <brobecker@adacore.com>
4169
4170 * win32-low.c (psapi_get_dll_name,
4171 * win32_CreateToolhelp32Snapshot): Delete.
4172 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4173 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4174 Delete.
4175 (handle_load_dll): Add function description.
4176 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4177
850a0f76
JB
41782014-02-26 Joel Brobecker <brobecker@adacore.com>
4179
4180 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4181 Add comment.
4182 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4183 base address when calling win32_add_one_solib.
4184 (handle_load_dll): Delete local variable load_addr.
4185 Remove 0x1000 offset applied to DLL base address when calling
4186 win32_add_one_solib.
4187 (handle_unload_dll): Add comment.
4188
f25b3fc3
JB
41892014-02-26 Joel Brobecker <brobecker@adacore.com>
4190
4191 * win32-low.c (win32_add_all_dlls): Renames
4192 win32_ensure_ntdll_loaded. Rewrite function documentation.
4193 Adjust implementation to always load all DLLs.
4194 Add 0x1000 offset to DLL base address when calling
4195 win32_add_one_solib.
4196 (child_initialization_done): New static global.
4197 (do_initial_child_stuff): Set child_initialization_done to
4198 zero during child initialization, and 1 after. Replace call
4199 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4200 Add comment.
4201 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4202 (handle_unload_dll): Add function documentation.
4203 (get_child_debug_event): Ignore load and unload DLL events
4204 during child initialization.
4205
d86d4aaf
DE
42062014-02-20 Doug Evans <dje@google.com>
4207
3bc32da3 4208 Remove global all_lwps.
d86d4aaf
DE
4209 * inferiors.h (ptid_of): Move here from linux-low.h.
4210 (pid_of, lwpid_of): Ditto.
4211 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4212 parameter is a struct thread_info * now.
4213 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4214 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4215 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4216 directly.
4217 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4218 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4219 * linux-arm-low.c (update_registers_callback): Update, "entry"
4220 parameter is a struct thread_info * now.
4221 Fetch lwpid from current_inferior directly.
4222 (arm_insert_point): Pass &all_threads to find_inferior instead of
4223 &all_lwps.
4224 (arm_remove_point): Ditto.
4225 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4226 (arm_prepare_to_resume): Fetch pid from thread.
4227 (arm_read_description): Fetch lwpid from current_inferior directly.
4228 * linux-low.c (all_lwps): Delete.
4229 (delete_lwp): Delete call to remove_inferior.
4230 (handle_extended_wait): Fetch lwpid from thread.
4231 (add_lwp): Don't set lwp->entry.id. Remove call to
4232 add_inferior_to_list.
4233 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4234 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4235 (kill_one_lwp_callback): Ditto.
4236 (linux_kill): Don't dereference NULL pointer.
4237 Fetch ptid,lwpid from thread.
4238 (get_detach_signal): Fetch ptid from thread.
4239 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4240 Simplify call to regcache_invalidate_thread.
4241 (delete_lwp_callback): Update, "entry" parameter is a
4242 struct thread_info * now. Fetch pid from thread.
4243 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4244 (status_pending_p_callback): Update, "entry" parameter is a
4245 struct thread_info * now. Fetch ptid from thread.
4246 (find_lwp_pid): Update, "entry" parameter is a
4247 struct thread_info * now.
4248 (linux_wait_for_lwp): Fetch pid from thread.
4249 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4250 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4251 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4252 (dequeue_one_deferred_signal): Ditto.
4253 (cancel_breakpoint): Fetch ptid from current_inferior.
4254 (linux_wait_for_event): Pass &all_threads to find_inferior,
4255 not &all_lwps. Fetch ptid, lwpid from thread.
4256 (count_events_callback): Update, "entry" parameter is a
4257 struct thread_info * now.
4258 (select_singlestep_lwp_callback): Ditto.
4259 (select_event_lwp_callback): Ditto.
4260 (cancel_breakpoints_callback): Ditto.
4261 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4262 not &all_lwps.
4263 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4264 (unsuspend_one_lwp): Update, "entry" parameter is a
4265 struct thread_info * now.
4266 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4267 not &all_lwps.
4268 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4269 Fetch lwpid from thread, not lwp.
4270 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4271 Pass &all_threads to find_inferior, not &all_lwps.
4272 (send_sigstop): Fetch lwpid from thread, not lwp.
4273 (send_sigstop_callback): Update, "entry" parameter is a
4274 struct thread_info * now.
4275 (suspend_and_send_sigstop_callback): Ditto.
4276 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4277 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4278 struct thread_info * now.
4279 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4280 from thread, lwp.
4281 (lwp_running): Update, "entry" parameter is a
4282 struct thread_info * now.
4283 (stop_all_lwps): Fetch ptid from thread.
4284 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4285 (linux_resume_one_lwp): Fetch lwpid from thread.
4286 (linux_set_resume_request): Update, "entry" parameter is a
4287 struct thread_info * now. Fetch pid, lwpid from thread.
4288 (resume_status_pending_p): Update, "entry" parameter is a
4289 struct thread_info * now.
4290 (need_step_over_p): Ditto. Fetch lwpid from thread.
4291 (start_step_over): Fetch lwpid from thread.
4292 (linux_resume_one_thread): Update, "entry" parameter is a
4293 struct thread_info * now. Fetch lwpid from thread.
4294 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4295 (proceed_one_lwp): Update, "entry" parameter is a
4296 struct thread_info * now. Fetch lwpid from thread.
4297 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4298 struct thread_info * now.
4299 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4300 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4301 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4302 directly.
4303 (regsets_store_inferior_registers): Ditto.
4304 (fetch_register, store_register): Ditto.
4305 (linux_read_memory, linux_write_memory): Ditto.
4306 (linux_request_interrupt): Ditto.
4307 (linux_read_auxv): Ditto.
4308 (linux_xfer_siginfo): Ditto.
4309 (linux_qxfer_spu): Ditto.
4310 (linux_qxfer_libraries_svr4): Ditto.
4311 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4312 moved to inferiors.h.
4313 (get_lwp): Delete.
4314 (get_thread_lwp): Update.
4315 (struct lwp_info): Delete member "entry". Simplify comment for
4316 member "thread".
4317 (all_lwps): Delete.
4318 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4319 current_inferior directly.
4320 (update_watch_registers_callback): Update, "entry" parameter is a
4321 struct thread_info * now. Fetch pid from thread.
4322 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4323 (mips_insert_point): Fetch lwpid from current_inferior.
4324 Pass &all_threads to find_inferior, not &all_lwps.
4325 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4326 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4327 directly.
4328 (mips_stopped_data_address): Ditto.
4329 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4330 directly.
4331 * linux-tile-low.c (tile_arch_setup): Ditto.
4332 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4333 (update_debug_registers_callback): Update, "entry" parameter is a
4334 struct thread_info * now. Fetch pid from thread.
4335 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4336 Pass &all_threads to find_inferior, not &all_lwps.
4337 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4338 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4339 Pass &all_threads to find_inferior, not &all_lwps.
4340 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4341 (i386_dr_low_get_status): Ditto.
4342 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4343 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4344 (x86_linux_read_description): Ditto.
4345 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4346
3b8361aa
DE
43472014-02-20 Doug Evans <dje@google.com>
4348
4349 * inferiors.c (get_first_inferior): Fix buglet.
4350
f7667f0d
DE
43512014-02-19 Doug Evans <dje@google.com>
4352
4353 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4354 * inferiors.c (add_thread): Change result type to struct thread_info *.
4355 All callers updated.
4356 (add_lwp): Call add_thread here instead of in callers.
4357 All callers updated.
4358 * linux-low.h (get_lwp_thread): Rewrite.
4359 (struct lwp_info): New member "thread".
4360
b3312d80
DE
43612014-02-19 Doug Evans <dje@google.com>
4362
4363 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4364 All callers updated.
4365
ecc6f45c
DE
43662014-02-19 Doug Evans <dje@google.com>
4367
4368 * inferiors.c (add_thread): Fix whitespace.
4369
649ebbca
DE
43702014-02-19 Doug Evans <dje@google.com>
4371
4372 * dll.c (clear_dlls): Replace accessing list implemention details
4373 with API function.
4374 * gdbthread.h (get_first_thread): Declare.
4375 * inferiors.c (for_each_inferior_with_data): New function.
4376 (get_first_thread): New function.
4377 (find_thread_ptid): Simplify.
4378 (get_first_inferior): New function.
4379 (clear_list): Delete.
4380 (one_inferior_p): New function.
4381 (clear_inferior_list): New function.
4382 (clear_inferiors): Update.
4383 * inferiors.h (for_each_inferior_with_data): Declare.
4384 (clear_inferior_list): Declare.
4385 (one_inferior_p): Declare.
4386 (get_first_inferior): Declare.
4387 * linux-low.c (linux_wait_for_event): Replace accessing list
4388 implemention details with API function.
4389 * server.c (target_running): Ditto.
4390 (accumulate_file_name_length): New function.
4391 (emit_dll_description): New function.
4392 (handle_qxfer_libraries): Replace accessing list implemention
4393 details with API function.
4394 (handle_qxfer_threads_worker): New function.
4395 (handle_qxfer_threads_proper): Replace accessing list implemention
4396 details with API function.
4397 (handle_query): Ditto.
4398 (visit_actioned_threads_callback_ftype): New typedef.
4399 (visit_actioned_threads_data): New struct.
4400 (visit_actioned_threads): Rewrite to be find_inferior callback.
4401 (resume): Call find_inferior.
4402 (handle_status): Replace accessing list implemention
4403 details with API function.
4404 (process_serial_event): Replace accessing list implemention details
4405 with API function.
4406 * target.c (set_desired_inferior): Replace accessing list implemention
4407 details with API function.
4408 * tracepoint.c (same_process_p): New function.
4409 (gdb_agent_about_to_close): Replace accessing list implemention
4410 details with API function.
4411 * win32-low.c (child_delete_thread): Replace accessing list
4412 implemention details with API function.
4413 (match_dll_by_basename): New function.
4414 (dll_is_loaded_by_basename): New function.
4415 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4416 details call to dll_is_loaded_by_basename.
4417
80894984
DE
44182014-02-19 Doug Evans <dje@google.com>
4419
4420 * dll.h (struct dll_info): Add comment.
4421 * gdbthread.h (struct thread_info): Add comment.
4422 (current_ptid): Simplify.
4423 * inferiors.c (add_process): Update.
4424 (remove_process): Update.
4425 * inferiors.h (struct process_info): Rename member "head" to "entry".
4426 * linux-low.c (delete_lwp): Update.
4427 (add_lwp): Update.
4428 (last_thread_of_process_p): Update.
4429 (kill_one_lwp_callback, linux_kill): Update.
4430 (status_pending_p_callback): Update.
4431 (wait_for_sigstop): Update. Simplify read of ptid.
4432 (start_step_over): Update.
4433 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4434 (get_lwp_thread): Update.
4435 (struct lwp_info): Rename member "head" to "entry".
4436 * regcache.h (inferior_list_entry): Delete.
4437 * server.c (kill_inferior_callback): Update.
4438 (detach_or_kill_inferior_callback): Update.
4439 (print_started_pid): Update.
4440 (print_attached_pid): Update.
4441 (process_serial_event): Simplify read of ptid.
4442 * thread-db.c (thread_db_create_event): Update.
4443 (thread_db_get_tls_address): Update.
4444 * win32-low.c (current_inferior_ptid): Simplify.
4445
46917d26
TT
44462014-02-19 Tom Tromey <tromey@redhat.com>
4447
4448 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4449 argument.
4450 (target_supports_btrace): Update.
4451
0759a81e
YQ
44522014-02-14 Yao Qi <yao@codesourcery.com>
4453
4454 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4455 (rsp-low-ipa.o): New target.
4456
a7191e8b
TT
44572014-02-12 Tom Tromey <tromey@redhat.com>
4458
4459 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4460 convert_ascii_to_int.
4461 * regcache.c (registers_to_string): Likewise.
4462 * remote-utils.c (decode_M_packet): Likewise.
4463 * server.c (process_serial_event): Likewise.
4464
ff0e980e
TT
44652014-02-12 Tom Tromey <tromey@redhat.com>
4466
4467 * server.c (handle_query, handle_v_run): Use hex2bin, not
4468 unhexify.
4469 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4470
e9371aff
TT
44712014-02-12 Tom Tromey <tromey@redhat.com>
4472
4473 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4474 convert_int_to_ascii.
4475 * regcache.c (registers_to_string, collect_register_as_string):
4476 Likewise.
4477 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4478 Likewise.
4479 * server.c (process_serial_event): Likewise.
4480 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4481 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4482
971dc0b8
TT
44832014-02-12 Tom Tromey <tromey@redhat.com>
4484
4485 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4486 bin2hex, not hexify.
4487 * tracepoint.c (cmd_qtstatus): Likewise.
4488
0a822afb
TT
44892014-02-12 Tom Tromey <tromey@redhat.com>
4490
4491 * remote-utils.c (monitor_output): Pass explicit length to
4492 hexify.
4493
9c3d6531
TT
44942014-02-12 Tom Tromey <tromey@redhat.com>
4495
4496 * tracepoint.c: Include rsp-low.h.
4497 * server.c: Include rsp-low.h.
4498 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4499 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4500 declare.
4501 * remote-utils.c: Include rsp-low.h.
4502 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4503 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4504 (convert_int_to_ascii, convert_ascii_to_int): Move to
4505 common/rsp-low.c.
4506 * regcache.c: Include rsp-low.h.
4507 * ax.c: Include rsp-low.h.
4508 * Makefile.in (SFILES): Add common/rsp-low.c.
4509 (OBS): Add rsp-low.o.
4510 (rsp-low.o): New target.
4511
01fd3ea5
TT
45122014-02-12 Tom Tromey <tromey@redhat.com>
4513
4514 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4515 Include print-utils.h.
4516 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4517 (plongest, thirty_two, phex_nz): Remove.
4518 * Makefile.in (SFILES): Add common/print-utils.c.
4519 (OBS): Add print-utils.o.
4520 (print-utils-ipa.o): New target.
4521 (print-utils.o): New target.
4522 (IPA_OBJS): Add print-utils-ipa.o.
4523
e99dc820
TT
45242014-02-06 Tom Tromey <tromey@redhat.com>
4525
4526 * Makefile.in (SFILES): Fix indentation.
4527
ee1e2d4f
DE
45282014-02-05 Doug Evans <dje@google.com>
4529
4530 * linux-low.c (linux_wait_for_event): Improve comment.
4531 (linux_wait_1): Keep current_inferior in sync with event_child.
4532
f5a02773
DE
45332014-01-22 Doug Evans <dje@google.com>
4534
4535 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4536
87ce2a04
DE
45372014-01-22 Doug Evans <dje@google.com>
4538
4539 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4540 * configure: Regenerate.
4541 * config.in: Regenerate.
4542 * Makefile.in (SFILES): Add debug.c.
4543 (OBS): Add debug.o.
4544 * debug.c: New file.
4545 * debug.h: New file.
4546 * linux-aarch64-low.c (*): Update all debugging printfs to use
4547 debug_printf instead of fprintf.
4548 * linux-arm-low.c (*): Ditto.
4549 * linux-cris-low.c (*): Ditto.
4550 * linux-crisv32-low.c (*): Ditto.
4551 * linux-m32r-low.c (*): Ditto.
4552 * linux-sparc-low.c (*): Ditto.
4553 * linux-x86.c (*): Ditto.
4554 * linux-low.c (*): Ditto.
4555 (linux_wait_1): Add calls to debug_enter, debug_exit.
4556 (linux_wait): Remove redundant debugging printf.
4557 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4558 (linux_resume, unstop_all_lwps): Ditto.
4559 * mem-break.c (*): Update all debugging printfs to use
4560 debug_printf instead of fprintf.
4561 * remote-utils.c (*): Ditto.
4562 * thread-db.c (*): Ditto.
4563 * server.c #include <ctype.h>, "gdb_vecs.h".
4564 (debug_threads): Moved to debug.c.
4565 (*): Update all debugging printfs to use debug_printf instead of
4566 fprintf.
4567 (start_inferior): Replace call to fflush with call to debug_flush.
4568 (monitor_show_help): Mention set debug-format.
4569 (parse_debug_format_options): New function.
4570 (handle_monitor_command): Handle "monitor set debug-format".
4571 (gdbserver_usage): Mention --debug-format.
4572 (main): Parse --debug-format.
4573 * server.h (debug_threads): Declaration moved to debug.h.
4574 #include "debug.h".
4575 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4576 trace_debug_1 that uses debug_printf.
4577 (tracepoint_look_up_symbols): Update all debugging printfs to use
4578 debug_printf instead of fprintf.
4579
e671835b
BS
45802014-01-20 Baruch Siach <baruch@tkos.co.il>
4581
4582 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4583 sys/ptrace.h.
4584
b5737fa9
PA
45852014-01-17 Pedro Alves <palves@redhat.com>
4586
ea38d2a9 4587 PR build/16445
c7faa97a
PA
4588 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4589 defined after including gdb_proc_service.h.
b5737fa9 4590
40ed484e
DE
45912014-01-16 Doug Evans <dje@google.com>
4592
4593 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4594 (match_dll): Use it.
4595
969c39fb
MM
45962014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4597
4598 * target.h (target_ops) <read_btrace>: Change parameters and
4599 return type to allow error reporting.
4600 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4601 trace reading errors on.
4602 * linux-low.c (linux_low_read_btrace): Pass trace reading
4603 errors on.
4604 (linux_low_disable_btrace): New.
4605
ab7f45ba
DE
46062014-01-15 Doug Evans <dje@google.com>
4607
4608 * inferiors.c (thread_id_to_gdb_id): Delete.
4609 * inferiors.h (thread_id_to_gdb_id): Delete.
4610
66af0f44
EZ
46112014-01-13 Eli Zaretskii <eliz@gnu.org>
4612
4613 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4614 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4615 versions.
4616
9939e131
PA
46172014-01-08 Pedro Alves <palves@redhat.com>
4618
4619 * server.c (handle_status): Don't discard previous queued stop
4620 replies or thread's pending status here.
4621 (main) <disconnection>: Do it here instead.
4622
b7ea362b
PA
46232014-01-08 Pedro Alves <palves@redhat.com>
4624
4625 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4626 * server.c (visit_actioned_threads, handle_pending_status): New
4627 function.
4628 (handle_v_cont): Factor out parts to ...
4629 (resume): ... this new function. If in all-stop, and a thread
4630 being resumed has a pending status, report it without actually
4631 resuming.
4632 (myresume): Adjust to use the new 'resume' function.
4633 (clear_pending_status_callback, set_pending_status_callback)
4634 (find_status_pending_thread_callback): New functions.
4635 (handle_status): Handle the case of multiple threads having
4636 interesting statuses to report. Report threads' real last signal
4637 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4638 with an interesting thread to report the status for, instead of
4639 always reporting the status of the first thread.
4640
28498c42
JB
46412014-01-01 Joel Brobecker <brobecker@adacore.com>
4642
4643 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4644 * gdbreplay.c (gdbreplay_version): Likewise.
4645
f45c82da
YZ
46462013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4647
4648 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4649 iov.iov_len with the real length in use.
4650
379a5e2d
JB
46512013-12-13 Joel Brobecker <brobecker@adacore.com>
4652
4653 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4654 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4655 for all targets that use win32-low.c.
4656 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4657 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4658
4210d83e
PA
46592013-12-13 Pedro Alves <palves@redhat.com>
4660
4661 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4662 if equal to TARGET_WAITKIND_LOADED.
4663 * win32-low.c (cached_status): New static global.
4664 (win32_wait): Add declaration.
4665 (do_initial_child_stuff): Flush all initial pending debug events
4666 up to the initial breakpoint.
4667 (win32_wait): If CACHED_STATUS was set, return that instead
4668 of doing a real wait. Remove the code resuming the execution
4669 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4670 during the initial phase. Also remove the code changing
4671 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4672 TARGET_WAITKIND_STOPPED.
4673
e7f0d979
YQ
46742013-12-11 Yao Qi <yao@codesourcery.com>
4675
4676 * notif.c (handle_notif_ack): Return 0 if no notification
4677 matches.
4678
ebcf782c
DE
46792013-11-20 Doug Evans <dje@google.com>
4680
4681 * linux-low.c (linux_set_resume_request): Fix comment.
4682
20ad9378
DE
46832013-11-20 Doug Evans <dje@google.com>
4684
4685 * linux-low.c (resume_status_pending_p): Tweak comment.
4686
a196ebeb
WT
46872013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4688
4689 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4690 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4691 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4692 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4693 (srv_amd64_regobj): Add amd64-mpx.o.
4694 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4695 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4696 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4697 * i387-fp.c (num_pl_bnd_register) Added constant.
4698 (num_pl_bnd_cfg_registers) Added constant.
4699 (struct i387_xsave) Added reserved area and MPX fields.
4700 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4701 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4702 function.
4703 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4704 (init_registers_amd64_mpx_linux): Declare new function.
4705 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4706 (x86_64_regmap): Add MPX registers.
4707 (x86_linux_read_description): Add MPX case.
4708 (initialize_low_arch): Initialize MPX targets.
4709
0080a2f6
TT
47102013-11-18 Tom Tromey <tromey@redhat.com>
4711
4712 * configure: Rebuild.
4713 * configure.ac: Don't check for stdlib.h.
4714 * gdbreplay.c: Unconditionally include stdlib.h.
4715
2978b111
TT
47162013-11-18 Tom Tromey <tromey@redhat.com>
4717
4718 * config.in: Rebuild.
4719 * configure: Rebuild.
4720 * configure.ac: Don't use AC_HEADER_DIRENT.
4721
a3d08894
TT
47222013-11-18 Tom Tromey <tromey@redhat.com>
4723
4724 * server.h: Don't check HAVE_STRING_H.
4725 * gdbreplay.c: Don't check HAVE_STRING_H.
4726 * configure: Rebuild.
4727
0a5dd17d
TT
47282013-11-18 Tom Tromey <tromey@redhat.com>
4729
4730 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4731 LIBGNU.
4732
1bd2f0ba
TT
47332013-11-08 Tom Tromey <tromey@redhat.com>
4734
4735 * configure, config.in: Rebuild.
4736 * configure.ac: Remove unused configury.
4737
3266f10b
TT
47382013-11-08 Tom Tromey <tromey@redhat.com>
4739
4740 * acinclude.m4: Include common.m4, codeset.m4.
4741 * configure, config.in: Rebuild.
4742 * configure.ac: Use GDB_AC_COMMON.
4743
6682d959
AA
47442013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4745
4746 * linux-s390-low.c (HWCAP_S390_TE): New define.
4747 (s390_arch_setup): Consider the TE field in the HWCAP for
4748 determining 'have_regset_tdb'.
4749
fd0a4d76
SDJ
47502013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4751
4752 PR gdb/16014
4753 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4754 call to sizeof.
4755
1a3d890b
PA
47562013-10-02 Pedro Alves <palves@redhat.com>
4757
4758 * server.c (process_serial_event): Don't output "GDBserver
4759 exiting" if GDB is connected through stdio.
4760 * target.c (mywait): Likewise, be silent if GDB is connected
4761 through stdio.
4762
97ad4581
JB
47632013-10-01 Joel Brobecker <brobecker@adacore.com>
4764
4765 * lynx-low.c (lynx_add_threads_after_attach): New function.
4766 (lynx_attach): Remove call to add_thread. Add call to
4767 lynx_add_threads_after_attach instead.
4768
5b4e221c
MF
47692013-09-28 Mike Frysinger <vapier@gentoo.org>
4770
4771 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4772 * config.in, configure: Regenerated.
4773
ee47b2f8
YQ
47742013-09-18 Yao Qi <yao@codesourcery.com>
4775
4776 PR server/15959
4777 * server.c (start_inferior): Clear 'resume_info'.
4778
d6707650 47792013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4780
d6707650
JW
4781 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4782 for each register.
4783
9243dd0e 47842013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4785
9243dd0e
JW
4786 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4787 linux-tile-low.o to srv_tgtobj.
4788
c623a6ef
WN
47892013-09-16 Will Newton <will.newton@linaro.org>
4790
4791 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4792 out regs.
4793
fb71d39e
PA
47942013-09-06 Pedro Alves <palves@redhat.com>
4795
4796 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4797 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4798 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4799 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4800 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4801 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4802
8e7e9910
PA
48032013-09-06 Pedro Alves <palves@redhat.com>
4804
4805 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4806 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4807
7c3a12ca
PA
48082013-09-06 Pedro Alves <palves@redhat.com>
4809
4810 * linux-amd64-ipa.c: Include tracepoint.h.
4811 * linux-i386-ipa.c: Include tracepoint.h.
4812
8eb3d7b6
RW
48132013-09-06 Ricard Wanderlof <ricardw@axis.com>
4814
4815 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4816 (ps_get_thread_area): New function.
4817
eddddb9d
RW
48182013-09-06 Ricard Wanderlof <ricardw@axis.com>
4819
4820 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4821 (initialize_low_arch): Call init_registers_crisv32 rather than
4822 init_register_crisv32.
4823
533b0600
PA
48242013-09-05 Pedro Alves <palves@redhat.com>
4825
4826 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4827 to ...
4828 * hostio.h: ... this new file.
4829 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4830 win32-low.c: Include hostio.h.
4831
0ce3d3b5
PA
48322013-09-05 Pedro Alves <palves@redhat.com>
4833
4834 * server.h (gdb_client_data, handler_func, callback_handler_func)
4835 (delete_file_handler, add_file_handler, append_callback_event)
4836 (delete_callback_event, start_event_loop, initialize_event_loop):
4837 Move to event-loop.h and include it.
4838 * event-loop.h: New file.
4839
799cdc37
PA
48402013-09-05 Pedro Alves <palves@redhat.com>
4841
4842 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4843 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4844 (loaded_dll, unloaded_dll): Move to ...
4845 * dll.h: ... this new file.
4846 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4847
6a6bbd9d
PA
48482013-09-05 Pedro Alves <palves@redhat.com>
4849
4850 * server.h (current_process, get_thread_process, all_processes)
4851 (add_inferior_to_list, for_each_inferior, current_inferior)
4852 (remove_inferior, add_process, remove_process, find_process_pid)
4853 (have_started_inferiors_p, have_attached_inferiors_p)
4854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4855 (clear_inferiors, find_inferior, find_inferior_id)
4856 (inferior_target_data, set_inferior_target_data)
4857 (inferior_regcache_data, set_inferior_regcache_data): Move to
4858 inferiors.h, and include it.
4859 * inferiors.h: New file.
4860
f699aaba
PA
48612013-09-05 Pedro Alves <palves@redhat.com>
4862
4863 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4864 Move ...
72f4393d 4865 * ax.h: ... here.
f699aaba 4866
c144c7a0
PA
48672013-09-05 Pedro Alves <palves@redhat.com>
4868
4869 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4870 tracepoint.h.
4871 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4872 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4873 (handle_tracepoint_general_set, handle_tracepoint_query)
4874 (tracepoint_finished_step, tracepoint_was_hit)
4875 (release_while_stepping_state_list, current_traceframe)
4876 (in_readonly_region, traceframe_read_mem)
4877 (fetch_traceframe_registers, traceframe_read_sdata)
4878 (traceframe_read_info, struct fast_tpoint_collect_status)
4879 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4880 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4881 (supply_fast_tracepoint_registers)
4882 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4883 (ipa_tdesc, claim_trampoline_space)
4884 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4885 (agent_mem_read, agent_get_trace_state_variable_value)
4886 (agent_set_trace_state_variable_value, agent_tsv_read)
4887 (agent_mem_read_string, get_raw_reg_func_addr)
4888 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4889 * tracepoint.h: ... this new file.
4890
ff42e6ab
PA
48912013-09-05 Pedro Alves <palves@redhat.com>
4892
4893 * server.h (perror_with_name, error, fatal, warning, paddress)
4894 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4895 include it.
4896 * utils.h: New file.
4897
541af0f4
PA
48982013-09-05 Pedro Alves <palves@redhat.com>
4899
4900 * server.h (remote_debug, noack_mode, transport_is_reliable)
4901 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4902 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4903 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4904 (write_enn, initialize_async_io, enable_async_io)
4905 (disable_async_io, check_remote_input_interrupt_request)
4906 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4907 (dead_thread_notify, prepare_resume_reply)
4908 (decode_address_to_semicolon, decode_address, decode_m_packet)
4909 (decode_M_packet, decode_X_packet, decode_xfer_write)
4910 (decode_search_memory_packet, unhexify, hexify)
4911 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4912 (look_up_one_symbol, relocate_instruction)
4913 (monitor_output): Move to remote-utils.h, and include it.
4914 * remote-utils.h: New file.
4915
eebdf26b
PA
49162013-09-05 Pedro Alves <palves@redhat.com>
4917
4918 * server.h (_): Delete.
4919
3aafd2ff
PA
49202013-09-02 Pedro Alves <palves@redhat.com>
4921
4922 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4923 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4924 allocated.
4925 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4926
cee83bcb
PM
49272013-09-02 Pierre Muller <muller@sourceware.org>
4928
4929 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4930 or WriteProcessMemory complete successfully and handle
4931 ERROR_PARTIAL_COPY error.
4932
9a13b2fa
PA
49332013-09-02 Pedro Alves <palves@redhat.com>
4934
4935 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4936 error instead of EIO.
4937
602e3198
JK
49382013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4939
4940 PR server/15604
4941 * linux-low.c: Include filestuff.h.
4942 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4943 * lynx-low.c: Include filestuff.h.
4944 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4945 * server.c: Include filestuff.h.
4946 (main): Call notice_open_fds.
4947 * spu-low.c: Include filestuff.h.
4948 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4949
96d7229d
LM
49502013-08-22 Luis Machado <lgustavo@codesourcery.com>
4951
4952 * Makefile.in: Explain why ../target and ../nat are not
4953 listed as include file search paths.
4954 (linux-waitpid.o): New object file rule.
4955 * configure.srv (srv_native_linux_obj): New variable.
4956 Replace all occurrences of linux native object files with
4957 $srv_native_linux_obj.
4958 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4959 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4960 (linux_enable_event_reporting): Remove declaration.
4961 (my_waitpid): Moved to common/linux-waitpid.c.
4962 (linux_wait_for_event): Pass ptid when calling
4963 linux_enable_event_reporting.
4964 (linux_supports_tracefork_flag): Remove.
4965 (linux_enable_event_reporting): Likewise.
4966 (linux_tracefork_grandchild): Remove.
4967 (STACK_SIZE): Moved to common/linux-ptrace.c.
4968 (linux_tracefork_child): Remove.
4969 (linux_test_for_tracefork): Remove.
4970 (linux_look_up_symbols): Call linux_supports_traceclone.
4971 (initialize_low): Remove call to linux_test_for_tracefork.
4972 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4973 common/linux-ptrace.h.
4974 (PTRACE_TYPE_ARG4): Likewise.
4975 Include linux-ptrace.h.
4976
32940073
PA
49772013-08-21 Pedro Alves <palves@redhat.com>
4978
4979 * config.in: Renegerate.
4980
33b60d58 49812013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4982
33b60d58
LM
4983 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4984 (SFILES): Remove $(srcdir)/common/target-common.c and
4985 add $(srcdir)/target/waitstatus.c.
4986 (OBS): Remove target-common.o and add waitstatus.o.
4987 (server_h): Remove $(srcdir)/../common/target-common.h and
4988 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4989 and $(srcdir)/../target/waitstatus.h.
4990 (target-common.o): Remove.
4991 (waitstatus.o): New target object file.
4992 * target.h: Do not include target-common.h and
4993 include target/resume.h, target/wait.h and
4994 target/waitstatus.h.
4995
b8e1b30e
LM
49962013-08-13 Luis Machado <lgustavo@codesourcery.com>
4997
4998 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4999 to PTRACE_TYPE_ARG3.
5000 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5001 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5002 PTRACE_TYPE_ARG4.
5003 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5004 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5005
7a60ad40
YQ
50062013-07-27 Jie Zhang <jie@codesourcery.com>
5007 Daniel Jacobowitz <dan@codesourcery.com>
5008 Yao Qi <yao@codesourcery.com>
5009
5010 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5011 (mips-linux-watch.o): New rule.
5012 (mips_linux_watch_h): New variable.
5013 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5014 srv_tgtobj.
5015 * linux-mips-low.c: Include mips-linux-watch.h.
5016 (struct arch_process_info, struct arch_lwp_info): New.
5017 (update_watch_registers_callback): New function.
5018 (mips_linux_new_process, mips_linux_new_thread) New functions.
5019 (mips_linux_prepare_to_resume, mips_insert_point): New
5020 functions.
5021 (mips_remove_point, mips_stopped_by_watchpoint): New
5022 functions.
5023 (rsp_bp_type_to_target_hw_bp_type): New function.
5024 (mips_stopped_data_address): New function.
5025 (the_low_target): Add watchpoint support functions.
5026
de6f69ad
YQ
50272013-07-27 Yao Qi <yao@codesourcery.com>
5028
5029 * i386-low.c: Include break-common.h.
5030 (enum target_hw_bp_type): Remove.
5031
3360c0bf
LM
50322013-07-24 Luis Machado <lgustavo@codesourcery.com>
5033
5034 * Makefile.in (SFILES): /common/target-common.c.
5035 (OBS): Add target-common.o.
5036 (server_h): Add $(srcdir)/../common/target-common.h.
5037 (target-common.o): New target.
5038 * server.c (queue_stop_reply_callback): Free
5039 status string after use.
5040 * target.c (target_waitstatus_to_string): Remove.
5041 * target.h: Include target-common.h.
5042 (resume_kind): Likewise.
5043 (target_waitkind): Likewise.
5044 (target_waitstatus): Likewise.
5045 (TARGET_WNOHANG): Likewise.
5046
bd885420
YQ
50472013-07-04 Yao Qi <yao@codesourcery.com>
5048
5049 * Makefile.in (host_alias): Use @host_noncanonical@.
5050 (target_alias): Use @target_noncanonical@.
5051 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5052 ACX_NONCANONICAL_HOST.
5053 * configure: Regenerated.
5054
5055 Revert:
5056 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5057
5058 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5059 * configure: Rebuild.
5060 * Makefile.in (version_host, version_target): Get from configure.
5061 (version.c): Use $(version_host) and $(version_target).
5062
17ef446e
PA
50632013-07-03 Pedro Alves <palves@redhat.com>
5064
5065 * Makefile.in (config.status): Depend on development.sh.
5066 * acinclude.m4: Include libmcheck.m4.
5067 * configure: Regenerate.
5068
7a9a7487
MG
50692013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5070
5071 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5072 attribute inside the parentheses.
5073 (winapi_DebugSetProcessKillOnExit): Ditto.
5074 (winapi_DebugBreakProcess): Ditto.
5075 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5076
49b64de6
MG
50772013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5078
5079 * notif.h (notif_event): Add a dummy member to avoid compiler
5080 errors.
5081
d5749ee7
PA
50822013-07-01 Pedro Alves <palves@redhat.com>
5083
5084 * hostio.c (HOSTIO_PATH_MAX): Define.
5085 (require_filename, handle_open, handle_unlink, handle_readlink):
5086 Use it.
5087
d8d2a3ee
PA
50882013-07-01 Pedro Alves <palves@redhat.com>
5089
5090 * server.h: Include "pathmax.h".
5091 * linux-low.c: Don't include sys/param.h.
5092 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5093 MAXPATHLEN.
5094 * win32-low.c: Don't include sys/param.h.
5095 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5096
bc7dea8d
PA
50972013-07-01 Pedro Alves <palves@redhat.com>
5098
5099 * event-loop.c: Don't check HAVE_UNISTD_H before including
5100 <unistd.h>.
5101 * gdbreplay.c: Likewise.
5102 * remote-utils.c: Likewise.
5103 * server.c: Likewise.
5104 * configure.ac: Don't check for unistd.h.
5105 * configure: Regenerate.
5106
d6c2da54
TT
51072013-06-28 Tom Tromey <tromey@redhat.com>
5108
5109 * Makefile.in (version.c): Use version.in, not
5110 common/version.in.
5111
257b6bec
MG
51122013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5113
5114 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5115 * configure: Rebuild.
5116 * Makefile.in (version_host, version_target): Get from configure.
5117 (version.c): Use $(version_host) and $(version_target).
5118
86ebe149
DK
51192013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5120
5121 Fix trace-status to output user name without trailing colon.
5122 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5123
f30aa5af
DK
51242013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5125
5126 Fix trace-status to output proper start-time and stop-time.
5127 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5128 output start time and stop time in hex as gdb expects.
5129
28a93511
YQ
51302013-06-26 Pedro Alves <pedro@codesourcery.com>
5131
5132 * tracepoint.c (build_traceframe_info_xml): Output trace state
5133 variables present in the trace buffer.
5134
01208463
TT
51352013-06-24 Tom Tromey <tromey@redhat.com>
5136
5137 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5138 create-version.sh.
5139 (version.o): Remove.
5140 * gdbreplay.c: Include version.h.
5141 (version, host_name): Don't declare.
5142 * server.h: Include version.h.
5143 (version, host_name): Don't declare.
5144
760256f9
PA
51452013-06-12 Pedro Alves <palves@redhat.com>
5146
5147 * linux-x86-low.c (linux_is_elf64): Delete global.
5148 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5149 with local linux_pid_exe_is_elf_64_file use.
5150
030031ee
PA
51512013-06-11 Pedro Alves <palves@redhat.com>
5152
5153 * linux-low.c (regset_disabled, disable_regset): New functions.
5154 (regsets_fetch_inferior_registers)
5155 (regsets_store_inferior_registers): Use them.
5156 (initialize_regsets_info); Don't allocate the disabled_regsets
5157 array here.
5158 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5159 comment.
5160
5da6eb0a
PA
51612013-06-11 Pedro Alves <palves@redhat.com>
5162
5163 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5164 xmalloc.
5165
7e5aaa09
PA
51662013-06-11 Pedro Alves <palves@redhat.com>
5167
5168 * linux-x86-low.c (initialize_low_arch): Call
5169 init_registers_x32_avx_linux.
5170
d878444c
JK
51712013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5172
5173 Fix compatibility with Android Bionic.
5174 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5175 it is not empty.
5176
3aee8918
PA
51772013-06-07 Pedro Alves <palves@redhat.com>
5178
5f2b57b5 5179 PR server/14823
3aee8918
PA
5180 * Makefile.in (OBS): Add tdesc.o.
5181 (IPA_OBJS): Add tdesc-ipa.o.
5182 (tdesc-ipa.o): New rule.
5183 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5184 interface.
5185 * linux-low.c (new_inferior): Delete.
5186 (disabled_regsets, num_regsets): Delete.
5187 (linux_add_process): Adjust to set the new per-process
5188 new_inferior flag.
5189 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5190 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5191 was a stop. When calling arch_setup, switch the current inferior
5192 to the thread that got an event.
5193 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5194 (regsets_fetch_inferior_registers)
5195 (regsets_store_inferior_registers): New regsets_info parameter.
5196 Adjust to use it.
5197 (linux_register_in_regsets): New regs_info parameter. Adjust to
5198 use it.
5199 (register_addr, fetch_register, store_register): New usrregs_info
5200 parameter. Adjust to use it.
5201 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5202 parameter regs_info. Adjust to use it.
5203 (linux_fetch_registers): Get the current inferior's regs_info, and
5204 adjust to use it.
5205 (linux_store_registers): Ditto.
5206 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5207 (initialize_low): Don't initialize the target_regsets here. Call
5208 initialize_low_arch.
5209 * linux-low.h (target_regsets): Delete declaration.
5210 (struct regsets_info): New.
5211 (struct usrregs_info): New.
5212 (struct regs_info): New.
5213 (struct process_info_private) <new_inferior>: New field.
5214 (struct linux_target_ops): Delete the num_regs, regmap, and
5215 regset_bitmap fields. New field regs_info.
5216 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5217 * i387-fp.c (num_xmm_registers): Delete.
5218 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5219 calls to new interface.
5220 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5221 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5222 Infer the number of xmm registers from the regcache's target
5223 description.
5224 * i387-fp.h (num_xmm_registers): Delete.
5225 * inferiors.c (add_thread): Don't install the thread's regcache
5226 here.
5227 * proc-service.c (gregset_info): Fetch the current inferior's
5228 regs_info. Adjust to use it.
5229 * regcache.c: Include tdesc.h.
5230 (register_bytes, reg_defs, num_registers)
5231 (gdbserver_expedite_regs): Delete.
5232 (get_thread_regcache): If the thread doesn't have a regcache yet,
5233 create one, instead of aborting gdbserver.
5234 (regcache_invalidate_one): Rename to ...
5235 (regcache_invalidate_thread): ... this.
5236 (regcache_invalidate_one): New.
5237 (regcache_invalidate): Only invalidate registers of the current
5238 process.
5239 (init_register_cache): Add target_desc parameter, and use it.
5240 (new_register_cache): Ditto. Assert the target description has a
5241 non zero registers_size.
5242 (regcache_cpy): Add assertions. Adjust.
5243 (realloc_register_cache, set_register_cache): Delete.
5244 (registers_to_string, registers_from_string): Adjust.
5245 (find_register_by_name, find_regno, find_register_by_number)
5246 (register_cache_size): Add target_desc parameter, and use it.
5247 (free_register_cache_thread, free_register_cache_thread_one)
5248 (regcache_release, register_cache_size): New.
5249 (register_size): Add target_desc parameter, and use it.
5250 (register_data, supply_register, supply_register_zeroed)
5251 (supply_regblock, supply_register_by_name, collect_register)
5252 (collect_register_as_string, collect_register_by_name): Adjust.
5253 * regcache.h (struct target_desc): Forward declare.
5254 (struct regcache) <tdesc>: New field.
5255 (init_register_cache, new_register_cache): Add target_desc
5256 parameter.
5257 (regcache_invalidate_thread): Declare.
5258 (regcache_invalidate_one): Delete declaration.
5259 (regcache_release): Declare.
5260 (find_register_by_number, register_cache_size, register_size)
5261 (find_regno): Add target_desc parameter.
5262 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5263 declarations.
5264 * remote-utils.c: Include tdesc.h.
5265 (outreg, prepare_resume_reply): Adjust.
5266 * server.c: Include tdesc.h.
5267 (gdbserver_xmltarget): Delete declaration.
5268 (get_features_xml, process_serial_event): Adjust.
5269 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5270 declare.
5271 (struct process_info) <tdesc>: New field.
5272 (ipa_tdesc): Declare.
5273 * tdesc.c: New file.
5274 * tdesc.h: New file.
5275 * tracepoint.c: Include tdesc.h.
5276 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5277 (get_context_regcache): Adjust to pass ipa_tdesc down.
5278 (do_action_at_tracepoint): Adjust to get the register cache size
5279 from the context regcache's description.
5280 (traceframe_walk_blocks): Adjust to get the register cache size
5281 from the current trace frame's description.
5282 (traceframe_get_pc): Adjust to get current trace frame's
5283 description and pass it down.
5284 (gdb_collect): Adjust to get the register cache size from the
5285 IPA's description.
5286 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5287 (gdbserver_xmltarget): Delete.
5288 (initialize_low_tracepoint): Set the ipa's target description.
5289 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5290 (initialize_low_tracepoint): Set the ipa's target description.
5291 * linux-x86-low.c: Include tdesc.h.
5292 [__x86_64__] (is_64bit_tdesc): New.
5293 (ps_get_thread_area, x86_get_thread_area): Use it.
5294 (i386_cannot_store_register): Rename to ...
5295 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5296 (i386_cannot_fetch_register): Rename to ...
5297 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5298 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5299 to new interface.
5300 (target_regsets): Rename to ...
5301 (x86_regsets): ... this.
5302 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5303 interface.
5304 (x86_siginfo_fixup): Use is_64bit_tdesc.
5305 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5306 (tdesc_x32_avx_linux, tdesc_x32_linux)
5307 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5308 Declare.
5309 (x86_linux_update_xmltarget): Delete.
5310 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5311 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5312 (AMD64_LINUX_USER64_CS): New.
5313 (x86_linux_read_description): New, based on
5314 x86_linux_update_xmltarget.
5315 (same_process_callback): New.
5316 (x86_arch_setup_process_callback): New.
5317 (x86_linux_update_xmltarget): New.
5318 (x86_regsets_info): New.
5319 (amd64_linux_regs_info): New.
5320 (i386_linux_usrregs_info): New.
5321 (i386_linux_regs_info): New.
5322 (x86_linux_regs_info): New.
5323 (x86_arch_setup): Reimplement.
5324 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5325 (x86_emit_ops): Ditto.
5326 (the_low_target): Adjust. Install x86_linux_regs_info,
5327 x86_cannot_fetch_register, and x86_cannot_store_register.
5328 (initialize_low_arch): New.
5329 * linux-ia64-low.c (tdesc_ia64): Declare.
5330 (ia64_fetch_register): Adjust.
5331 (ia64_usrregs_info, regs_info): New globals.
5332 (ia64_regs_info): New function.
5333 (the_low_target): Adjust.
5334 (initialize_low_arch): New function.
5335 * linux-sparc-low.c (tdesc_sparc64): Declare.
5336 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5337 Adjust.
5338 (sparc_arch_setup): New function.
5339 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5340 (the_low_target): Adjust.
5341 (initialize_low_arch): New function.
5342 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5343 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5344 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5345 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5346 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5347 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5348 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5349 (tdesc_powerpc_isa205_vsx64l): Declare.
5350 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5351 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5352 (ppc_set_pc, ppc_get_hwcap): Adjust.
5353 (ppc_usrregs_info): Forward declare.
5354 (!__powerpc64__) ppc_regmap_adjusted: New global.
5355 (ppc_arch_setup): Adjust to the current process'es target
5356 description.
5357 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5358 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5359 (ppc_store_evrregset): Adjust.
5360 (target_regsets): Rename to ...
5361 (ppc_regsets): ... this, and make static.
5362 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5363 (ppc_regs_info): New function.
5364 (the_low_target): Adjust.
5365 (initialize_low_arch): New function.
5366 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5367 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5368 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5369 (tdesc_s390x_linux64v2): Declare.
5370 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5371 (s390_fill_gregset, s390_store_last_break): Adjust.
5372 (target_regsets): Rename to ...
5373 (s390_regsets): ... this, and make static.
5374 (s390_get_pc, s390_set_pc): Adjust.
5375 (s390_get_hwcap): New target_desc parameter, and use it.
5376 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5377 (s390_arch_setup): Adjust to set the current process'es target
5378 description. Don't adjust the regmap.
5379 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5380 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5381 (regs_info_3264): New globals.
5382 (s390_regs_info): New function.
5383 (the_low_target): Adjust.
5384 (initialize_low_arch): New function.
5385 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5386 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5387 [__mips64] (init_registers_mips_linux)
5388 (init_registers_mips_dsp_linux): Delete defines.
5389 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5390 (have_dsp): New global.
5391 (mips_read_description): New, based on mips_arch_setup.
5392 (mips_arch_setup): Reimplement.
5393 (get_usrregs_info): New function.
5394 (mips_cannot_fetch_register, mips_cannot_store_register)
5395 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5396 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5397 (target_regsets): Rename to ...
5398 (mips_regsets): ... this, and make static.
5399 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5400 (dsp_regs_info, regs_info): New globals.
5401 (mips_regs_info): New function.
5402 (the_low_target): Adjust.
5403 (initialize_low_arch): New function.
5404 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5405 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5406 Declare.
5407 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5408 (arm_read_description): New, with bits factored from
5409 arm_arch_setup.
5410 (arm_arch_setup): Reimplement.
5411 (target_regsets): Rename to ...
5412 (arm_regsets): ... this, and make static.
5413 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5414 (arm_regs_info): New function.
5415 (the_low_target): Adjust.
5416 (initialize_low_arch): New function.
5417 * linux-m68k-low.c (tdesc_m68k): Declare.
5418 (target_regsets): Rename to ...
5419 (m68k_regsets): ... this, and make static.
5420 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5421 (m68k_regs_info): New function.
5422 (m68k_arch_setup): New function.
5423 (the_low_target): Adjust.
5424 (initialize_low_arch): New function.
5425 * linux-sh-low.c (tdesc_sharch): Declare.
5426 (target_regsets): Rename to ...
5427 (sh_regsets): ... this, and make static.
5428 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5429 (sh_regs_info, sh_arch_setup): New functions.
5430 (the_low_target): Adjust.
5431 (initialize_low_arch): New function.
5432 * linux-bfin-low.c (tdesc_bfin): Declare.
5433 (bfin_arch_setup): New function.
5434 (bfin_usrregs_info, regs_info): New globals.
5435 (bfin_regs_info): New function.
5436 (the_low_target): Adjust.
5437 (initialize_low_arch): New function.
5438 * linux-cris-low.c (tdesc_cris): Declare.
5439 (cris_arch_setup): New function.
5440 (cris_usrregs_info, regs_info): New globals.
5441 (cris_regs_info): New function.
5442 (the_low_target): Adjust.
5443 (initialize_low_arch): New function.
5444 * linux-cris-low.c (tdesc_crisv32): Declare.
5445 (cris_arch_setup): New function.
5446 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5447 (cris_regs_info): New function.
5448 (the_low_target): Adjust.
5449 (initialize_low_arch): New function.
5450 * linux-m32r-low.c (tdesc_m32r): Declare.
5451 (m32r_arch_setup): New function.
5452 (m32r_usrregs_info, regs_info): New globals.
5453 (m32r_regs_info): Adjust.
5454 (initialize_low_arch): New function.
5455 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5456 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5457 (tic6x_usrregs_info): Forward declare.
5458 (tic6x_read_description): New function, based on ...
5459 (tic6x_arch_setup): ... this. Reimplement.
5460 (target_regsets): Rename to ...
5461 (tic6x_regsets): ... this, and make static.
5462 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5463 (tic6x_regs_info): New function.
5464 (the_low_target): Adjust.
5465 (initialize_low_arch): New function.
5466 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5467 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5468 (target_regsets): Rename to ...
5469 (xtensa_regsets): ... this, and make static.
5470 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5471 globals.
5472 (xtensa_arch_setup, xtensa_regs_info): New functions.
5473 (the_low_target): Adjust.
5474 (initialize_low_arch): New function.
5475 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5476 (nios2_arch_setup): Set the current process'es tdesc.
5477 (target_regsets): Rename to ...
5478 (nios2_regsets): ... this.
5479 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5480 (nios2_regs_info): New function.
5481 (the_low_target): Adjust.
5482 (initialize_low_arch): New function.
a261b8f5
PA
5483 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5484 (aarch64_arch_setup): Set the current process'es tdesc.
5485 (target_regsets): Rename to ...
5486 (aarch64_regsets): ... this.
5487 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5488 (aarch64_regs_info): New function.
5489 (the_low_target): Adjust.
5490 (initialize_low_arch): New function.
3aee8918
PA
5491 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5492 globals.
5493 (target_regsets): Rename to ...
5494 (tile_regsets): ... this.
5495 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5496 (tile_regs_info): New function.
5497 (tile_arch_setup): Set the current process'es tdesc.
5498 (the_low_target): Adjust.
5499 (initialize_low_arch): New function.
5500 * spu-low.c (tdesc_spu): Declare.
5501 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5502 * win32-arm-low.c (tdesc_arm): Declare.
5503 (arm_arch_setup): New function.
5504 (the_low_target): Install arm_arch_setup instead of
5505 init_registers_arm.
5506 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5507 (init_windows_x86): Rename to ...
5508 (i386_arch_setup): ... this. Set `win32_tdesc'.
5509 (the_low_target): Adjust.
5510 * win32-low.c (win32_tdesc): New global.
5511 (child_add_thread): Don't create the thread cache here.
5512 (do_initial_child_stuff): Set the new process'es tdesc.
5513 * win32-low.h (struct target_desc): Forward declare.
5514 (win32_tdesc): Declare.
5515 * lynx-i386-low.c (tdesc_i386): Declare global.
5516 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5517 * lynx-low.c (lynx_tdesc): New global.
5518 (lynx_add_process): Set the new process'es tdesc.
5519 * lynx-low.h (struct target_desc): Forward declare.
5520 (lynx_tdesc): Declare global.
5521 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5522 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5523 * nto-low.c (nto_tdesc): New global.
5524 (do_attach): Set the new process'es tdesc.
5525 * nto-low.h (struct target_desc): Forward declare.
5526 (nto_tdesc): Declare.
5527 * nto-x86-low.c (tdesc_i386): Declare.
5528 (nto_x86_arch_setup): Set `nto_tdesc'.
5529
b1fbec62
GB
55302013-06-04 Gary Benson <gbenson@redhat.com>
5531
5532 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5533 to qSupported response when appropriate.
5534 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5535 with nonzero-length annex.
5536 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5537 arguments supplied in annex.
5538
d1ec4ce7
DE
55392013-05-31 Doug Evans <dje@google.com>
5540
ac44adcb 5541 PR server/15594
d1ec4ce7
DE
5542 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5543 64 bits in 64-cross-32 environment.
5544
9b25f2d3
PA
55452013-05-28 Pedro Alves <palves@redhat.com>
5546
5547 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5548 (aarch64-without-fpu.c): Delete rule.
5549 * configure.srv (aarch64*-*-linux*): Remove references to
5550 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5551 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5552 declaration.
5553
6740dc9c
PA
55542013-05-24 Pedro Alves <palves@redhat.com>
5555
5556 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5557 instead of strchr/decode_address. Error if the range isn't split
5558 with a ','. Don't assume there's be a ':' in the action.
5559
c2d6af84
PA
55602013-05-23 Yao Qi <yao@codesourcery.com>
5561 Pedro Alves <palves@redhat.com>
5562
5563 * linux-low.c (lwp_in_step_range): New function.
5564 (linux_wait_1): If the thread was range stepping and stopped
5565 outside the stepping range, report the stop to GDB. Otherwise,
5566 continue stepping. Add range stepping debug output.
5567 (linux_set_resume_request): Copy the step range from the resume
5568 request to the lwp.
5569 (linux_supports_range_stepping): New.
5570 (linux_target_ops) <supports_range_stepping>: Set to
5571 linux_supports_range_stepping.
5572 * linux-low.h (struct linux_target_ops)
5573 <supports_range_stepping>: New field.
5574 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5575 * linux-x86-low.c (x86_supports_range_stepping): New.
5576 (the_low_target) <supports_range_stepping>: Set to
5577 x86_supports_range_stepping.
5578 * server.c (handle_v_cont): Handle 'r' action.
5579 (handle_v_requests): Append ";r" if the target supports range
5580 stepping.
5581 * target.h (struct thread_resume) <step_range_start,
5582 step_range_end>: New fields.
5583 (struct target_ops) <supports_range_stepping>:
5584 New field.
5585 (target_supports_range_stepping): New macro.
5586
58794e1a
JB
55872013-05-17 Joel Brobecker <brobecker@adacore.com>
5588
5589 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5590 confusion in comment.
5591
d631c5a7
JB
55922013-05-17 Joel Brobecker <brobecker@adacore.com>
5593
5594 * lynx-low.c (struct process_info_private): New type.
5595 (lynx_add_process): New function.
5596 (lynx_create_inferior, lynx_attach): Replace calls to
5597 add_process by calls to lynx_add_process.
5598 (lynx_resume): If PTID is null, then try using
5599 current_process()->private->last_wait_event_ptid.
5600 Add comments.
5601 (lynx_clear_inferiors): Delete. The contents of that function
5602 has been inlined in lynx_mourn;
5603 (lynx_wait_1): Save the ptid in the process's private data.
5604 (lynx_mourn): Free the process' private data. Replace call
5605 to lynx_clear_inferiors by call to clear_inferiors.
5606
96f7a20f
YQ
56072013-05-17 Yao Qi <yao@codesourcery.com>
5608
5609 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5610 the right place.
5611
db0dfaa0
LM
56122013-05-16 Luis Machado <lgustavo@codesourcery.com>
5613
5614 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5615 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5616 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5617 PT_TEXT_END_ADDR guards. Update comments.
5618 (linux_target_op) <read_offsets>: Conditionally define to
5619 linux_read_offsets if the target is UCLIBC and if it defines
5620 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5621
68f5f838
SL
56222013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5623 Andrew Jenner <andrew@codesourcery.com>
5624
5625 * Makefile.in (SFILES): Add linux-nios2-low.c.
5626 (clean): Add action to delete nios2-linux.c.
5627 (nios2-linux.c): New rule.
5628 * configure.srv: Add nios2*-*-linux*.
5629 * linux-nios2-low.c: New.
5630
1ebff1fd
HAQ
56312013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5632
5633 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5634
f6150862
HZ
56352013-04-25 Hui Zhu <hui@codesourcery.com>
5636
5637 PR gdb/15186
f6150862
HZ
5638 * ax.c (ax_printf): Add fflush.
5639
614c279d
TT
56402013-04-22 Tom Tromey <tromey@redhat.com>
5641
5642 * Makefile.in (SFILES): Add filestuff.c.
5643 (OBS): Add filestuff.o.
5644 (filestuff.o): New target.
5645 * config.in, configure: Rebuild.
5646 * configure.ac: Check for fdwalk, pipe2.
5647
7d4e5717
PA
56482013-04-17 Pedro Alves <palves@redhat.com>
5649
5650 * configure.ac (USE_THREAD_DB): Delete variable.
5651 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5652 Don't AC_SUBST USE_THREAD_DB.
5653 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5654 * config.in, configure: Regenerate.
5655
d5c93e41
PA
56562013-04-16 Pedro Alves <palves@redhat.com>
5657
5658 * linux-low.h (struct lwp_info) <thread_known>: Move under
5659 the USE_THREAD_DB #ifdef.
5660
04f5fe89
PA
56612013-04-16 Pedro Alves <palves@redhat.com>
5662
5663 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5664 (linux-low.o): Delete rule.
5665 * linux-low.h: Always include "gdb_thread_db.h" instead of
5666 conditionally including thread_db.h.
5667 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5668 HAVE_THREAD_DB_H.
5669
480b27bf
JK
56702013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5671
5672 * Makefile.in (install-only): Fix make install regression.
5673
43662968
JK
56742013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5675
5676 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5677 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5678 installation.
5679 * gdbserver.1: Remove.
5680
3e74e146
PA
56812013-03-22 Pedro Alves <palves@redhat.com>
5682
5683 * linux-low.c (handle_extended_wait): Don't call
5684 linux_enable_event_reporting.
5685
a8347a2a
TT
56862013-03-15 Tony Theodore <tonyt@logyst.com>
5687
5688 PR build/9098:
5689 * Makefile.in (SHELL): Use @SHELL@.
5690
eeb56fa7
SDJ
56912013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5692
5693 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5694 compiler warning.
5695
4fa7e2ff
JB
56962013-03-13 Joel Brobecker <brobecker@adacore.com>
5697
5698 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5699 Remove extraneous NULL element.
5700
8ddb1965
YQ
57012013-03-13 Yao Qi <yao@codesourcery.com>
5702
5703 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5704 'V' block in trace frame.
5705
9accd112
MM
57062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5707
5708 * target.h (struct target_ops): Add btrace ops.
5709 (target_supports_btrace): New macro.
5710 (target_enable_btrace): New macro.
5711 (target_disable_btrace): New macro.
5712 (target_read_btrace): New macro.
5713 * gdbthread.h (struct thread_info): Add btrace field.
5714 * server.c: Include btrace-common.h.
5715 (handle_btrace_general_set): New function.
5716 (handle_btrace_enable): New function.
5717 (handle_btrace_disable): New function.
5718 (handle_general_set): Call handle_btrace_general_set.
5719 (handle_qxfer_btrace): New function.
5720 (struct qxfer qxfer_packets[]): Add btrace entry.
5721 * inferiors.c (remove_thread): Disable btrace.
5722 * linux-low: Include linux-btrace.h.
5723 (linux_low_enable_btrace): New function.
5724 (linux_low_read_btrace): New function.
5725 (linux_target_ops): Add btrace ops.
5726 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5727 Add srv_linux_btrace=yes.
5728 (x86_64-*-linux*): Add linux-btrace.o.
5729 Add srv_linux_btrace=yes.
5730 * configure.ac: Define HAVE_LINUX_BTRACE.
5731 * config.in: Regenerated.
5732 * configure: Regenerated.
5733
5cc22e4c
MM
57342013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5735
5736 * server.c (handle_qxfer): Preserve error message if -3 is
5737 returned.
5738 (qxfer): Document the -3 return value.
5739
7c97f91e
MM
57402013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5741
5742 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5743 (linux_btrace_h): New variable.
5744 (linux-btrace.o): New rule.
5745
be9a119c 57462013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5747 Hafiz Abid Qadeer <abidh@codesourcery.com>
5748
5749 * tracepoint.c (trace_buffer_size): New global.
5750 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5751 (init_trace_buffer): Change to one-argument function. Allocate
5752 trace buffer memory.
5753 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5754 handle QTBuffer:size packet.
5755 (cmd_bigqtbuffer_size): New function.
5756 (initialize_tracepoint): Call init_trace_buffer with
5757 DEFAULT_TRACE_BUFFER_SIZE.
5758 * server.c (handle_query): Add QTBuffer:size in the
5759 supported packets.
5760
e64f7499
YQ
57612013-03-07 Yao Qi <yao@codesourcery.com>
5762
5763 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5764 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5765 of -1.
5766 (cmd_qtsp): Adjust condition. Do post increment.
5767 Set cur_action and cur_step_action back to 0.
5768
f0ae6fc3
PA
57692013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5770
5771 PR server/15236
5772 * linux-low.c (linux_write_memory): Return early success if LEN is
5773 zero.
5774
b5b0b0af
CV
57752013-03-05 Corinna Vinschen <vinschen@redhat.de>
5776
334ad4a8 5777 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5778
589bc927
TT
57792013-02-28 Tom Tromey <tromey@redhat.com>
5780
5781 * configure.ac: Invoke AC_SYS_LARGEFILE.
5782 * configure, config.in: Rebuild.
5783
dfe07582
CV
57842013-02-28 Corinna Vinschen <vinschen@redhat.com>
5785
5786 * win32-low.c: Throughout, fix format strings and casts of
5787 printf-like functions to avoid type related warnings on all
5788 platforms.
5789 (get_child_debug_event): Print dwDebugEventCode as hex since
5790 that's how it's usually documented.
5791
736cd585
YQ
57922013-02-28 Yao Qi <yao@codesourcery.com>
5793
5794 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5795 pulongest.
5796
e1f58301
JW
57972013-02-27 Jiong Wang <jiwang@tilera.com>
5798
5799 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5800 (reg-tilegx32.c): New rule.
5801 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5802 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5803 different register info initializer according to elf class.
5804 (init_registers_tilgx32): New function. The tilegx32 register info
5805 initializer.
5806 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5807 (tile_store_gregset): Likewise.
5808
d171ca78
YQ
58092013-02-27 Yao Qi <yao@codesourcery.com>
5810
5811 * server.c (process_point_options): Print debug message when
5812 debug_threads is true.
5813
282bbdf3
YQ
58142013-02-26 Yao Qi <yao@codesourcery.com>
5815
5816 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5817
aca22551
PA
58182013-02-19 Pedro Alves <palves@redhat.com>
5819 Kai Tietz <ktietz@redhat.com>
5820
5821 PR gdb/15161
5822
5823 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5824 instead of strtoul to extract address from packet.
5825 (process_serial_event) <'z'>: Likewise.
5826
4f3cee1c
YQ
58272013-02-18 Yao Qi <yao@codesourcery.com>
5828
5829 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5830
8e1d55a3
PA
58312013-02-14 Pedro Alves <palves@redhat.com>
5832
5833 Plug memory leak.
5834
5835 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5836 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5837
458820da
PA
58382013-02-14 Pedro Alves <palves@redhat.com>
5839
5840 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5841
baea0dae
PA
58422013-02-14 Pedro Alves <palves@redhat.com>
5843
5844 * tracepoint.c (save_string): Delete.
5845 (add_tracepoint_action): Use savestring instead of save_string.
5846
0b1afbb3
PA
58472013-02-12 Pedro Alves <palves@redhat.com>
5848
5849 * linux-xtensa-low.c: Ditto.
5850 * xtensa-xtregs.c: Ditto.
5851
8a4ac37e
PA
58522013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5853
5854 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5855 thread_db.
5856
148de6bb
MS
58572013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5858
5859 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5860 aarch64_num_wp_regs and aarch64_num_bp_regs to
5861 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5862
55fac6e0
MS
58632013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5864
5865 * linux-aarch64-low.c (ps_get_thread_area): Replace
5866 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5867
176eb98c
MS
58682013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5869 Marcus Shawcroft <marcus.shawcroft@arm.com>
5870 Nigel Stephens <nigel.stephens@arm.com>
5871 Yufeng Zhang <yufeng.zhang@arm.com>
5872
5873 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5874 (aarch64.c, aarch64-without-fpu.c): New targets.
5875 * configure.srv (aarch64*-*-linux*): New.
5876 * linux-aarch64-low.c: New file.
5877
56f7af9c
MS
58782013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5879
43aaf8b6 5880 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5881 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5882 (dequeue_one_deferred_signal, linux_resume_one_thread)
5883 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5884 (linux_tracefork_grandchild, linux_test_for_tracefork)
5885 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5886 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5887 where the argument is 0.
5888
60f662b0
YQ
58892013-01-25 Yao Qi <yao@codesourcery.com>
5890
5891 * event-loop.c: Include "queue.h".
5892 (gdb_event_p): New typedef.
5893 (struct gdb_event) <next_event>: Remove.
5894 (event_queue): Change to QUEUE(gdb_event_p).
5895 (async_queue_event): Remove.
5896 (gdb_event_xfree): New.
5897 (initialize_event_loop): New.
5898 (process_event): Use API from QUEUE.
5899 (wait_for_event): Likewise.
5900 * server.c (main): Call initialize_event_loop.
5901 * server.h (initialize_event_loop): Declare.
5902
5ae4861a
YQ
59032013-01-18 Yao Qi <yao@codesourcery.com>
5904
5905 * ax.h (struct eval_agent_expr_context): New.
5906 (gdb_eval_agent_expr): Update declaration.
5907 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5908 TFRAME. Add new argument CTX.
5909 * server.h (struct eval_agent_expr_context): Declare.
5910 (agent_mem_read, agent_tsv_read): Update declaration.
5911 (agent_mem_read_string): Likewise.
5912 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5913 (add_traceframe_block): Add new argument TPOINT.
5914 Increase TPOINT->traceframe_usage.
5915 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5916 eval_tracepoint_agent_expr.
5917 (condition_true_at_tracepoint): Likewise.
5918 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5919 (agent_mem_read_string, agent_tsv_read): Likewise.
5920
85e00e85
YQ
59212013-01-16 Yao Qi <yao@codesourcery.com>
5922
5923 * linux-low.c (linux_resume_one_lwp): Don't check
5924 'lwp->bp_reinsert != 0'.
5925
4039cf45
JB
59262013-01-07 Joel Brobecker <brobecker@adacore.com>
5927 Pedro Alves <palves@redhat.com>
5928
5929 * lynx-low.c (ptrace_request_to_str): Define a temporary
5930 macro and use it to simplify this function's implementation.
5931
9044dee2
JB
59322013-01-07 Joel Brobecker <brobecker@adacore.com>
5933
5934 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5935 sets errno.
5936
e6352c8f
JB
59372013-01-07 Joel Brobecker <brobecker@adacore.com>
5938
5939 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5940
50681a27
JB
59412013-01-07 Joel Brobecker <brobecker@adacore.com>
5942
5943 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5944
3f6e77ef
JB
59452013-01-07 Joel Brobecker <brobecker@adacore.com>
5946
5947 * lynx-low.c (lynx_resume): Use the resume_info parameter
5948 to determine the ptid for the lynx_ptrace call, unless
5949 it is equal to minus_one_ptid, in which case we use the
5950 ptid of the current_inferior.
5951 (lynx_wait_1): After having received a thread create/exit
5952 event, resume the inferior's execution using the signaling
5953 thread's ptid, rather than the old ptid.
5954
7fda33ae
JB
59552013-01-07 Joel Brobecker <brobecker@adacore.com>
5956
5957 * lynx-low.c (lynx_resume): Delete variable ret.
5958
b9786c74
JB
59592013-01-01 Joel Brobecker <brobecker@adacore.com>
5960
5961 * gdbreplay.c (gdbreplay_version): Update copyright year.
5962 * server.c (gdbserver_version): Likewise.
5963
8b93d60f
JB
59642012-12-17 Joel Brobecker <brobecker@adacore.com>
5965
5966 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5967 new thread.
5968
037335a7
JB
59692012-12-17 Joel Brobecker <brobecker@adacore.com>
5970
5971 * lynx-low.c (ptrace_request_to_str): Add handling for
5972 PTRACE_GETTRACESIG.
5973
52d4cbd8
JB
59742012-12-17 Joel Brobecker <brobecker@adacore.com>
5975
5976 * lynx-low.c (lynx_attach): Delete variable new_process.
5977
ab8f6ca9
JB
59782012-12-17 Joel Brobecker <brobecker@adacore.com>
5979
5980 * lynx-low.c (lynx_create_inferior): Delete variable
5981 new_process.
5982
78cbc024
JB
59832012-12-17 Joel Brobecker <brobecker@adacore.com>
5984
5985 * lynx-low.c (ptrace_request_to_str): Do not handle
5986 PTRACE_GETTHREADLIST if this macro does not exist.
5987
14a00470
YQ
59882012-12-15 Yao Qi <yao@codesourcery.com>
5989
5990 * Makefile.in (OBS): Add notif.o.
5991 * notif.c, notif.h: New.
5992 * server.c: Include "notif.h".
5993 (struct vstop_notif) <next>: Remove.
5994 <base>: New field.
5995 (queue_stop_reply): Update.
5996 (push_event, send_next_stop_reply): Remove.
5997 (discard_queued_stop_replies): Update.
5998 (notif_stop): New variable.
5999 (handle_v_stopped): Remove.
6000 (handle_v_requests): Don't call handle_v_stopped. Call
6001 handle_ack_notif instead.
6002 (queue_stop_reply_callback): Call notif_event_enque instead
6003 of queue_stop_reply.
6004 (handle_status): Don't call send_next_stop_reply, call
6005 notif_write_event instead.
6006 (kill_inferior_callback): Likewise.
6007 (detach_or_kill_inferior_callback): Likewise.
6008 (main): Call initialize_notif.
6009 (process_serial_event): Call QUEUE_is_empty.
6010 (handle_target_event): Call notif_push instead of push event.
6011 * server.h (push_event): Remove declaration.
6012
61c125b9
TT
60132012-12-10 Tom Tromey <tromey@redhat.com>
6014
6015 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6016 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6017 macros.
6018 (.c.o): Rewrite.
6019 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6020 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6021 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6022 (amd64-linux-ipa.o, ax.o): Rewrite.
6023 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6024 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6025 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6026 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6027 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6028 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6029 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6030 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6031 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6032 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6033 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6034 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6035 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6036 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6037 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6038 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6039 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6040 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6041 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6042 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6043 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6044 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6045 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6046 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6047 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6048 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6049 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6050 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6051 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6052 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6053 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6054 (reg-tilegx.o): Remove.
6055 (all_object_files): New macro.
6056 Include .deps files.
6057 * aclocal.m4, configure: Rebuild.
6058 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6059 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6060 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6061
e90e9ad9
TT
60622012-12-05 Tom Tromey <tromey@redhat.com>
6063
6064 PR gdb/14917:
6065 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6066
02d403bf 60672012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6068
6069 * configure.ac: Check for linux/perf_event.h.
6070 * config.in: Regenerated.
6071 * configure: Regenerated.
6072
0270a750
PA
60732012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6074
6075 * hostio.c (handle_readlink): Decrease buffer size
6076 parameter passed to readlink by one byte.
6077
8c29b58e
YQ
60782012-11-26 Yao Qi <yao@codesourcery.com>
6079
6080 * configure.ac (build_warnings): Append '-Wempty-body'.
6081 * configure: Regenerated.
6082 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6083 body.
6084
8bdce1ff
PM
60852012-11-15 Pierre Muller <muller@sourceware.org>
6086
6087 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6088 * config.in: Regenerate.
6089 * configure: Regenerate.
6090 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6091 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6092 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6093 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6094 header.
6095 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6096 instead of <sys/wait.h> header.
6097 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6098
02d403bf 60992012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6100
6101 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6102 (various make rules): Remove -DGDBSERVER
6103
fbd5db48
YQ
61042012-11-09 Yao Qi <yao@codesourcery.com>
6105
6106 * spu-low.c (current_ptid): Move it to ..
6107 * gdbthread.h: ... here. New.
6108 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6109 * server.c (myresume, process_serial_event): Likewise.
6110 * thread-db.c (thread_db_find_new_threads): Likewise.
6111 * tracepoint.c (run_inferior_command): Likewise.
6112
b3dc46ff
AB
61132012-10-01 Andrew Burgess <aburgess@broadcom.com>
6114
6115 * server.c (handle_search_memory_1): Include access length in
6116 warning message.
6117
07c04788
HPN
61182012-09-05 Michael Brandt <michael.brandt@axis.com>
6119
6120 * linux-crisv32-low.c: Fix compile errors.
6121
918d227b
YQ
61222012-09-04 Yao Qi <yao@codesourcery.com>
6123
6124 * tracepoint.c (cmd_qtsv): Adjust debug message.
6125 Don't check CUR_TPOINT.
6126
18c1b81a
YQ
61272012-08-28 Yao Qi <yao@codesourcery.com>
6128
6129 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6130 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6131 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6132 Remove declarations of xmalloc, xreallloc, xstrdup and
6133 freeargv.
6134 * Makefile.in (libiberty_h): New.
6135 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6136 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6137
dc82f37b
YQ
61382012-08-23 Yao Qi <yao@codesourcery.com>
6139
6140 * server.h: Remove declaration of 'xsnprintf'.
6141
406b1477
KS
61422012-08-22 Keith Seitz <keiths@redhat.com>
6143
6144 * server.h: Include build-gnulib-gbserver/config.h.
6145 * gdbreplay.c: Likewise.
6146
e6712ff1
DE
61472012-08-08 Doug Evans <dje@google.com>
6148
6149 * Makefile.in (SFILES): Add gdb_vecs.c.
6150 (OBS): Add gdb_vecs.o.
6151 (gdb_vecs_h, host_defs_h): New variables.
6152 (thread-db.o): Add $(gdb_vecs_h) dependency.
6153 (gdb_vecs.o): New rule.
6154 * thread-db.c: #include "gdb_vecs.h".
6155 (thread_db_load_search): Use a vector to iterate over path elements.
6156 Handle text appearing after "$pdir".
6157
6158 * configure.ac: Add check for strstr.
6159 * config.in: Regenerate.
6160 * configure: Regenerate.
6161
7c3270ae
UW
61622012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6163
6164 * hostio.c (handle_pread): If pread fails, fall back to attempting
6165 lseek/read.
6166 (handle_pwrite): Likewise for pwrite.
6167
b62e2b27
UW
61682012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6169
6170 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6171 between unsupported TYPE and unimplementable ADDR/LEN combination.
6172 (arm_insert_point): Act on new return value.
6173
78a99e91
PA
61742012-07-31 Pedro Alves <palves@redhat.com>
6175
6176 * server.c (process_point_options): Only skip tokens if we find
6177 one that is unrecognized. Don't treat 'X' specially while
6178 skipping unrecognized tokens.
6179
fcf303ab
UW
61802012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6181
6182 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6183 to 4-byte-align HW breakpoint addresses for Thumb.
6184
7255706c
YQ
61852012-07-27 Yao Qi <yao@codesourcery.com>
6186
6187 PR remote/14161.
6188
6189 * server.h: Declare gdb_agent_about_to_close.
6190 * target.c (kill_inferior): Include "agent.h".
6191 New. Send command 'kill'.
6192 * target.h (kill_inferior): Removed macro.
6193 * tracepoint.c (gdb_agent_about_to_close): New.
6194 (gdb_agent_helper_thread): Handle command 'close'.
6195 Wait endlessly until the inferior stops.
6196 Install gdb_agent_remove_socket to atexit hook.
6197 (agent_socket_name): New static variable.
6198 (gdb_agent_socket_init): Replace local variable 'name' with
6199 'agent_socket_name'.
6200 (gdb_agent_remove_socket): New.
6201
5a3f286f
YQ
62022012-07-27 Yao Qi <yao@codesourcery.com>
6203
6204 * server.c (process_point_options): Stop at 'X' when parsing.
6205
961bd387
ME
62062012-07-19 Michael Eager <eager@eagercon.com>
6207
a261b8f5 6208 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6209 to hw_execute.
6210 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6211 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6212 hardware breakpoint.
6213
aa7c7447
JK
62142012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6215
6216 * gdbserver/linux-low.c (initialize_low): Call
6217 linux_ptrace_init_warnings.
6218
7f216e7c
DE
62192012-07-02 Doug Evans <dje@google.com>
6220
6221 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6222 pointer to int.
6223
d3ce09f5
SS
62242012-07-02 Stan Shebs <stan@codesourcery.com>
6225
6226 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6227 (ax.o): Add it to build rule.
6228 (ax-ipa.o): Ditto.
6229 (OBS): Add format.o.
6230 (IPA_OBS): Add format.o.
6231 * server.c (handle_query): Claim support for breakpoint commands.
6232 (process_point_options): Add command case.
6233 (process_serial_event): Leave running if there are printfs in
6234 effect.
6235 * mem-break.h (any_persistent_commands): Declare.
6236 (add_breakpoint_commands): Declare.
6237 (gdb_no_commands_at_breakpoint): Declare.
6238 (run_breakpoint_commands): Declare.
6239 * mem-break.c (struct point_command_list): New struct.
6240 (struct breakpoint): New field command_list.
6241 (any_persistent_commands): New function.
6242 (add_commands_to_breakpoint): New function.
6243 (add_breakpoint_commands): New function.
6244 (gdb_no_commands_at_breakpoint): New function.
6245 (run_breakpoint_commands): New function.
6246 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6247 locally.
6248 * ax.c: Include format.h.
6249 (ax_printf): New function.
6250 (gdb_eval_agent_expr): Add printf opcode.
6251
2f8f6aed
YQ
62522012-06-13 Yao Qi <yao@codesourcery.com>
6253
6254 * server.c (start_inferior): Remove duplicated writes to fields
6255 'last_resume_kind' and 'last_status' of 'current_inferior'.
6256
0c9070b3
YQ
62572012-06-12 Yao Qi <yao@codesourcery.com>
6258 Pedro Alves <palves@redhat.com>
6259
6260 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6261 comment.
6262 * server.c (handle_v_cont): Extend comment.
6263
c52daf70
YQ
62642012-06-11 Yao Qi <yao@codesourcery.com>
6265
6266 * linux-low.c (linux_attach): Add 'static'.
6267
d38bbb0a
YQ
62682012-06-06 Yao Qi <yao@codesourcery.com>
6269
6270 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6271
89dc0afd
JK
62722012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6273
6274 Fix gcc -flto compilation warning.
6275 * server.c (main): Make variable multi_mode and attach volatile.
6276
75f62ce7
TJB
62772012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6278
6279 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6280 if the platform doesn't know about it.
6281
65f479b6
PA
62822012-05-30 Jeff Kenton <jkenton@tilera.com>
6283
6284 * Makefile.in (SFILES): Add linux-tile-low.c.
6285 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6286 * configure.srv: Handle tilegx-*-linux*.
6287 * linux-tile-low.c: New file.
6288
0c5bf5a9
JK
62892012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6290
6291 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6292
a493e3e2
PA
62932012-05-24 Pedro Alves <palves@redhat.com>
6294
6295 PR gdb/7205
6296
43aaf8b6 6297 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6298
2ea28649
PA
62992012-05-24 Pedro Alves <palves@redhat.com>
6300
6301 PR gdb/7205
6302
6303 Replace target_signal with gdb_signal throughout.
6304
8d409d16
MR
63052012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6306
6307 * linux-low.c (linux_store_registers): Avoid the copying sequence
6308 when no data has been retrieved by ptrace.
6309
23512c01
MGD
63102012-05-22 Will Deacon <will.deacon@arm.com>
6311
6312 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6313 Include asm/ptrace.h.
6314 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6315 already defined.
6316
4934b29e
MR
63172012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6318
6319 * linux-low.c (linux_store_registers): Don't re-retrieve data
6320 with ptrace that has already been obtained from /proc. Always
6321 copy any data retrieved with ptrace to the buffer supplied.
6322
bde24c0a
PA
63232012-05-11 Yao Qi <yao@codesourcery.com>
6324 Pedro Alves <palves@redhat.com>
6325
6326 * linux-low.c (enum stopping_threads_kind): New.
6327 (stopping_threads): Change type to `enum stopping_threads_kind'.
6328 (handle_extended_wait): If stopping and suspending threads, leave
6329 the new_lwp suspended too.
6330 (linux_wait_for_event): Adjust.
6331 (stop_all_lwps): Set `stopping_threads' to
6332 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6333 whether we're suspending threads or just stopping them. Assert no
6334 recursion happens.
6335
623b6bdf
YQ
63362012-04-29 Yao Qi <yao@codesourcery.com>
6337
6338 * server.h: Move some code to ...
6339 * gdbthread.h: ... here. New.
6340 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6341 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6342 (nto-low.o, win32-low.o): Likewise.
6343 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6344 * regcache.c, remote-utils.c, server.c: Likewise.
6345 * target.c, tracepoint.c, win32-low.c: Likewise.
6346
f15f9948
TJB
63472012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6348
6349 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6350 (PTRACE_ARG4_TYPE): Likewise.
6351 (PTRACE_XFER_TYPE): Likewise.
6352 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6353 ptrace to PTRACE_ARG3_TYPE.
6354 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6355 (PTRACE_ARG4_TYPE): Likewise.
6356 (PTRACE_XFER_TYPE): Likewise.
6357 (linux_detach_one_lwp): Cast fourth argument of
6358 ptrace to long then PTRACE_ARG4_TYPE.
6359 (regsets_fetch_inferior_registers): Cast third argument of
6360 ptrace to long then PTRACE_ARG3_TYPE.
6361 (regsets_store_inferior_registers): Likewise.
6362
38ea300a
PA
63632012-04-20 Pedro Alves <palves@redhat.com>
6364
6365 * configure: Regenerate.
6366
c971b7fa
PA
63672012-04-19 Pedro Alves <palves@redhat.com>
6368
43aaf8b6 6369 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6370 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6371 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6372 (all, install-only, uninstall, clean-info, all-lib, clean): No
6373 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6374 (maintainer-clean realclean distclean): Use subdir_do.
6375 (subdir_do): New.
6376 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6377 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6378 * acinclude.m4: Include acx_configure_dir.m4.
6379 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6380 calls. Call AC_PROG_RANLIB. Configure gnulib using
6381 ACX_CONFIGURE_DIR.
6382 (GNULIB): New.
6383 (GNULIB_STDINT_H): Adjust.
6384 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6385 * gdbreplay.c: Include build-gnulib/config.h.
6386 * server.h: Likewise.
6387 * aclocal.m4: Regenerate.
6388 * config.in: Regenerate.
6389 * configure: Regenerate.
c971b7fa 6390
809277f8
PA
63912012-04-19 Pedro Alves <palves@redhat.com>
6392
6393 * Makefile.in (LIBGNU, INCGNU): Adjust.
6394 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6395 (all, install-only, uninstall, clean-info, all-lib, clean)
6396 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6397 * configure.ac: Adjust AC_OUTPUT output.
6398 * aclocal.m4: Regenerate.
6399 * configure: Regenerate.
6400
fd9bb8b8
PA
64012012-04-19 Pedro Alves <palves@redhat.com>
6402
6403 * Makefile.in (generated_files): New.
6404 (server_h): Remove the explicit dependency on config.h, and depend
6405 on $generated_files.
6406
1c298c66
PA
64072012-04-19 Pedro Alves <palves@redhat.com>
6408
6409 * Makefile.in (INCGNU): Add -Ignulib.
6410
57c4b50b
PA
64112012-04-19 Pedro Alves <palves@redhat.com>
6412
6413 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6414 (INCGNU): ... this, and spell out -I here.
6415 (GNULIB_LIB): Rename to ...
6416 (LIBGNU): ... this.
6417 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6418
1030e047
PA
64192012-04-19 Pedro Alves <palves@redhat.com>
6420
6421 * config.in: Regenerate.
6422
447d4319
PA
64232012-04-19 Pedro Alves <palves@redhat.com>
6424
6425 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6426 * server.h (memmem): Remove declaration.
6427 * config.in: Regenerate.
6428 * configure: Regenerate.
6429
aad9eab9
YQ
64302012-04-19 Yao Qi <yao@codesourcery.com>
6431
6432 * Makefile.in (SFILES): Add common/vec.c.
6433 (OBS): Add vec.o.
6434 (vec.o): New rule.
6435
3e10640f
YQ
64362012-04-19 Yao Qi <yao@codesourcery.com>
6437
6438 * remote-utils.c (prepare_resume_reply): Replace with macro
6439 target_core_of_thread.
6440 * server.c (handle_qxfer_threads_proper): Likewise.
6441 * target.h (traget_core_of_thread): New macro.
6442
71622373
PA
64432012-04-18 Pedro Alves <palves@redhat.com>
6444
6445 * aclocal.m4: Regenerate.
6446 * configure: Regenerate.
6447
80d26939
YQ
64482012-04-16 Yao Qi <yao@codesourcery.com>
6449
6450 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6451 duplicated on address.
6452
42476b70
YQ
64532012-04-16 Yao Qi <yao@codesourcery.com>
6454
6455 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6456 (struct tracepoint_action_ops) <send>: New field.
6457 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6458 (agent_expr_send, x_tracepoint_action_send): New.
6459 (l_tracepoint_action_send): New.
6460 (cmd_qtdp): Download and install tracepoint
6461 according to `use_agent'.
6462 (run_inferior_command): Add one more parameter `len'.
6463 Update callers.
6464 (tracepoint_send_agent): New.
6465 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6466
7bc83639
YQ
64672012-04-16 Yao Qi <yao@codesourcery.com>
6468
6469 * tracepoint.c (download_tracepoints): Moved to ...
6470 (cmd_qtstart): ... here.
6471
5f18041e
YQ
64722012-04-14 Yao Qi <yao@codesourcery.com>
6473
6474 * tracepoint.c: Include inttypes.h.
6475 (struct collect_memory_action): Use sized types.
6476 (struct tracepoint): Likewise.
6477 (cmd_qtdp, stop_tracing): Update print specifiers.
6478 (cmd_qtp, response_tracepoint): Likewise.
6479 (collect_data_at_tracepoint): Likewise.
6480 (collect_data_at_step): Likewise.
6481
55a8c076
YQ
64822012-04-14 Yao Qi <yao@codesourcery.com>
6483
6484 Import gnulib module inttypes.
6485 * aclocal.m4, config.in, configure: Regenerated.
6486
dc750257
YQ
64872012-04-14 Yao Qi <yao@codesourcery.com>
6488
6489 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6490 Makefile and config.status at last.
6491
0ab5faf9
YQ
64922012-04-13 Yao Qi <yao@codesourcery.com>
6493
6494 * tracepoint.c: Include stdint.h unconditionally.
6495
18f5fd81
TJB
64962012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6497
6498 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6499 on BFD_HAVE_SYS_PROCFS_TYPE.
6500 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6501 * configure: Regenerate.
6502 * config.in: Likewise.
6503
4d47af5c
L
65042012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6505
6506 * Makefile.in (clean): Also remove x32.c x32-linux.c
6507 x32-avx.c x32-avx-linux.c.
6508 (x32.o): New target.
6509 (x32.c): Likewise.
6510 (x32-linux.o): Likewise.
6511 (x32-linux.c): Likewise.
6512 (x32-avx.o): Likewise.
6513 (x32-avx.c): Likewise.
6514 (x32-avx-linux.o): Likewise.
6515 (x32-avx-linux.c): Likewise.
6516
6517 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6518 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6519 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6520 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6521 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6522 i386/x32-avx-linux.xml.
6523
6524 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6525 (init_registers_x32_avx_linux): Likwise.
6526 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6527 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6528
ecedbe58
PA
65292012-04-13 Pedro Alves <palves@redhat.com>
6530
6531 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6532 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6533 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6534 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6535 the sub-make.
6536
c92b5177
L
65372012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6538
6539 * linux-x86-low.c (compat_x32_clock_t): New.
6540 (compat_x32_siginfo_t): Likewise.
6541 (compat_x32_siginfo_from_siginfo): Likewise.
6542 (siginfo_from_compat_x32_siginfo): Likewise.
6543 (linux_is_elf64): Likewise.
6544 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6545 and siginfo_from_compat_x32_siginfo for x32.
6546 (x86_arch_setup): Set linux_is_elf64.
6547
214d508e
L
65482012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6549
6550 PR gdb/13969
6551 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6552 e_machine field.
6553 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6554 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6555 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6556 compatible with process.
6557
c9a1864a
YQ
65582012-04-12 Yao Qi <yao@codesourcery.com>
6559
6560 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6561 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6562 (install-only, install-info, clean): Handle sub dir gnulib.
6563 (all-lib, am--refresh): New targets.
6564 (memmem.o): Remove target.
6565 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6566 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6567 (AC_REPLACE_FUNCS): Remove memmem.
6568 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6569 (AC_OUTPUT): Generate Makefile in gnulib/.
6570 * aclocal.m4, config.in, configure: Regenerated.
6571
367ba2c2
MR
65722012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6573
6574 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6575
9d236627
PA
65762012-04-05 Pedro Alves <palves@redhat.com>
6577
6578 -Werror=strict-aliasing
6579
6580 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6581 pointer.
6582
111217b3
PA
65832012-04-04 Pedro Alves <palves@redhat.com>
6584
6585 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6586 (sparc_store_gregset_from_stack, sparc_store_gregset)
6587 (sparc_breakpoint_at): Fix formatting.
6588
8365dcf5
TJB
65892012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6590
6591 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6592 are available.
6593 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6594 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6595 * config.in: Regenerate.
6596 * configure: Likewise.
6597
689cc2ae
PA
65982012-03-29 Pedro Alves <palves@redhat.com>
6599
6600 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6601 Correct ptrace arguments.
6602
c14dfd32
PA
66032012-03-28 Pedro Alves <palves@redhat.com>
6604
6605 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6606 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6607 (IA64_FR1_REGNUM): New defines.
6608 (ia64_fetch_register): New.
6609 (the_low_target): Install it.
6610 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6611 field.
6612 * linux-low.c (linux_fetch_registers): Try the
6613 the_low_target.fetch_register hook first.
6614
6615 * linux-arm-low.c (the_low_target): Adjust.
6616 * linux-bfin-low.c (the_low_target): Adjust.
6617 * linux-cris-low.c (the_low_target): Adjust.
6618 * linux-crisv32-low.c (the_low_target): Adjust.
6619 * linux-m32r-low.c (the_low_target): Adjust.
6620 * linux-m68k-low.c (the_low_target): Adjust.
6621 * linux-mips-low.c (the_low_target): Adjust.
6622 * linux-ppc-low.c (the_low_target): Adjust.
6623 * linux-s390-low.c (the_low_target): Adjust.
6624 * linux-sh-low.c (the_low_target): Adjust.
6625 * linux-sparc-low.c (the_low_target): Adjust.
6626 * linux-tic6x-low.c (the_low_target): Adjust.
6627 * linux-x86-low.c (the_low_target): Adjust.
6628 * linux-xtensa-low.c (the_low_target): Adjust.
6629
63c88e13
PA
66302012-03-26 Pedro Alves <palves@redhat.com>
6631
6632 * server.c (handle_qxfer_libraries): Don't bail early if
6633 the_target->qxfer_libraries_svr4 is not NULL.
6634
fb723180
PA
66352012-03-26 Pedro Alves <palves@redhat.com>
6636
6637 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6638
0afae3cf
PA
66392012-03-23 Pedro Alves <palves@redhat.com>
6640
6641 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6642 "library-list-svr4" element's start tag when the the DSO list is
6643 empty.
6644
485f1ee4
PA
66452012-03-23 Pedro Alves <palves@redhat.com>
6646
6647 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6648 a variable whose type size is the same as the inferior's pointer
6649 size.
6650
a5362b9a
TS
66512012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6652
6653 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6654 struct siginfo.
6655 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6656 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6657 * linux-low.h: Include <signal.h>.
6658 (struct siginfo): Remove forward declaration.
6659 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6660 struct siginfo.
6661
d226c142
MF
66622012-03-21 Mike Frysinger <vapier@gentoo.org>
6663
6664 * .gitignore: Ignore more files.
6665
122f36ef
PA
66662012-03-19 Pedro Alves <palves@redhat.com>
6667 Jan Kratochvil <jan.kratochvil@redhat.com>
6668
6669 * server.c (cont_thread, general_thread): Add describing comments.
6670 (start_inferior): Clear `cont_thread'.
6671 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6672 of a process.
6673
fc3e5175
YQ
66742012-03-15 Yao Qi <yao@codesourcery.com>
6675
6676 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6677 handling to ...
6678 (cmd_qtdp): ... here.
6679
8d0d92cd
YQ
66802012-03-15 Yao Qi <yao@codesourcery.com>
6681
6682 * tracepoint.c (struct tracepoint_action_ops): New.
6683 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6684 (m_tracepoint_action_download): New.
6685 (r_tracepoint_action_download): New.
6686 (x_tracepoint_action_download): New.
6687 (l_tracepoint_action_download): New.
6688 (add_tracepoint_action): Install `action->ops' according type.
6689 (download_tracepoint_1): Move code `download' function pointer
6690 of various tracepoint_action_ops.
6691
87b0bb13
JK
66922012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6693
6694 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6695 linux_ptrace_attach_warnings.
6696
5f572dec
JK
66972012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6698
6699 * Makefile.in (linux-ptrace.o): New.
6700 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6701 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6702 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6703 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6704 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6705 of these targets.
6706 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6707
f4647387
YQ
67082012-03-08 Yao Qi <yao@codesourcery.com>
6709 Pedro Alves <palves@redhat.com>
6710
6711 Fix PR server/13392.
6712 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6713 offset of JMP insn.
6714 * tracepoint.c (remove_tracepoint): New.
6715 (cmd_qtdp): Call remove_tracepoint when failed to install.
6716
9b224c5e
PA
67172012-03-07 Pedro Alves <palves@redhat.com>
6718
6719 * linux-low.c (get_detach_signal): New.
6720 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6721 Pass on pending signals to PTRACE_DETACH. Check the result of the
6722 ptrace call.
6723 * server.c (program_signals, program_signals_p): New.
6724 (handle_general_set): Handle QProgramSignals.
6725 * server.h (program_signals, program_signals_p): Declare.
6726
e237a7e2
JK
67272012-03-05 Pedro Alves <palves@redhat.com>
6728 Jan Kratochvil <jan.kratochvil@redhat.com>
6729
6730 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6731 New comment why.
6732
5808517f
YQ
67332012-03-03 Yao Qi <yao@codesourcery.com>
6734
6735 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6736 agent_look_up_symbols.
6737
58b4daa5
YQ
67382012-03-03 Yao Qi <yao@codesourcery.com>
6739
6740 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6741 (linux-x86-low.o): Likewise.
6742 * server.h: Remove in_process_agent_loaded.
6743 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6744 common/agent.c.
6745 Update callers.
6746
8ffcbaaf
YQ
67472012-03-03 Yao Qi <yao@codesourcery.com>
6748
6749 * tracepoint.c (gdb_agent_capability): New global.
6750 (in_process_agent_loaded_ust): Renamed to
6751 `in_process_agent_supports_ust'.
6752 Update callers.
6753 (in_process_agent_supports_ust): Call agent_capability_check.
6754 (clear_installed_tracepoints): Assert that agent supports
6755 agent.
6756
d1feda86
YQ
67572012-03-03 Yao Qi <yao@codesourcery.com>
6758
6759 * linux-low.c (linux_supports_agent): New.
6760 (linux_target_ops): Initialize field `supports_agent' with
6761 linux_supports_agent.
6762 * target.h (struct target_ops) <supports_agent>: New.
6763 (target_supports_agent): New macro.
6764 * server.c (handle_general_set): Handle packet 'QAgent'.
6765 (handle_query): Send `QAgent+'.
6766 * Makefile.in (server.o): Depends on agent.h.
6767
2fa291ac
YQ
67682012-03-03 Yao Qi <yao@codesourcery.com>
6769
6770 * Makefile.in (OBS): Add agent.o.
6771 Add new rule for agent.o.
6772 Track dependence of tracepoint.c on agent.h.
6773 * tracepoint.c (run_inferior_command_1):
6774 (run_inferior_command): Call agent_run_command.
6775 (gdb_ust_connect_sync_socket): Deleted. Move it to
6776 common/agent.c.
6777 (resume_thread, stop_thread): Likewise.
6778 (gdb_ust_socket_init): Renamed to ...
6779 (gdb_agent_socket_init): ... New.
6780 (gdb_ust_thread): Renamed to ...
6781 (gdb_agent_helper_thread): ... New.
6782 (gdb_ust_init): Move some code to ...
6783 (gdb_agent_init): ... here. New.
6784 [HAVE_UST]: Call gdb_ust_init.
6785 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6786 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6787 * config.in, configure: Regenerated.
6788
05044653
PA
67892012-03-02 Pedro Alves <palves@redhat.com>
6790
6791 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6792 * linux-low.c (struct simple_pid_list): New.
6793 (stopped_pids): New a struct simple_pid_list pointer.
6794 (add_to_pid_list, pull_pid_from_list): New.
6795 (handle_extended_wait): Don't assume the first signal new children
6796 report is SIGSTOP. Adjust call to pull_pid_from_list.
6797 (linux_wait_for_lwp): Adjust.
6798
8d00225b
YQ
67992012-03-02 Yao Qi <yao@codesourcery.com>
6800
6801 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6802 debug log.
6803
19560ba5
YQ
68042012-03-02 Yao Qi <yao@codesourcery.com>
6805
6806 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6807 `stop_pc' and `tpoint'. Update caller.
6808
1faeff08
MR
68092012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6810
6811 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6812 * linux-low.c (use_linux_regsets): New macro.
6813 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6814 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6815 (linux_register_in_regsets): New function.
6816 (usr_fetch_inferior_registers): Skip registers covered by
6817 regsets.
6818 (usr_store_inferior_registers): Likewise.
6819 (usr_fetch_inferior_registers): New macro.
6820 (usr_store_inferior_registers): Likewise.
6821 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6822 (linux_store_registers): Likewise.
6823 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6824 prototype.
6825 (init_registers_mips64_dsp_linux): Likewise.
6826 (init_registers_mips_linux): New macro.
6827 (init_registers_mips_dsp_linux): Likewise.
6828 (mips_dsp_num_regs): Likewise.
6829 (DSP_BASE, DSP_CONTROL): New fallback macros.
6830 (mips_base_regs): New macro.
6831 (mips_regmap): Use it. Fix the size.
6832 (mips_dsp_regmap): New variable.
6833 (mips_dsp_regset_bitmap): Likewise.
6834 (mips_arch_setup): New function.
6835 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6836 than mips_regmap.
6837 (mips_cannot_store_register): Likewise.
6838 (the_low_target): Update .arch_setup, .num_regs and .regmap
6839 initializers. Add .regset_bitmap initializer.
6840 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6841 initializer.
6842 * linux-bfin-low.c (the_low_target): Likewise.
6843 * linux-cris-low.c (the_low_target): Likewise.
6844 * linux-crisv32-low.c (the_low_target): Likewise.
6845 * linux-ia64-low.c (the_low_target): Likewise.
6846 * linux-m32r-low.c (the_low_target): Likewise.
6847 * linux-m68k-low.c (the_low_target): Likewise.
6848 * linux-ppc-low.c (the_low_target): Likewise.
6849 * linux-s390-low.c (the_low_target): Likewise.
6850 * linux-sh-low.c (the_low_target): Likewise.
6851 * linux-sparc-low.c (the_low_target): Likewise.
6852 * linux-tic6x-low.c (the_low_target): Likewise.
6853 * linux-x86-low.c (the_low_target): Likewise.
6854 * linux-xtensa-low.c (the_low_target): Likewise.
6855 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6856 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6857 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6858 srv_xmlfiles.
6859 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6860 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6861
c03e6ccc
YQ
68622012-02-29 Yao Qi <yao@codesourcery.com>
6863 Pedro Alves <palves@redhat.com>
6864
6865 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6866 `step_over_finished' is true.
6867
644cebc9
PA
68682012-02-27 Pedro Alves <palves@redhat.com>
6869
6870 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6871 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6872
c14d7ab2
PA
68732012-02-27 Pedro Alves <palves@redhat.com>
6874
6875 PR server/9684
6876 * linux-low.c (pid_is_stopped): New.
6877 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6878
412c89dd
LM
68792012-02-25 Luis Machado <lgustavo@codesourcery.com>
6880
6881 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6882 of conditions.
6883
b745defe
MR
68842012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6885
6886 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6887
9f3a5c85
LM
68882012-02-24 Luis Machado <lgustavo@codesourcery>
6889
6890 * server.c (handle_query): Advertise support for target-side
6891 breakpoint condition evaluation.
6892 (process_point_options): New function.
6893 (process_serial_event): When inserting a breakpoint, check for
6894 a target-side condition that should be evaluated.
6895
6896 * mem-break.c: Include regcache.h and ax.h.
6897 (point_cond_list_t): New data structure.
6898 (breakpoint) <cond_list>: New field.
6899 (find_gdb_breakpoint_at): Make non-static.
6900 (delete_gdb_breakpoint_at): Clear any target-side
6901 conditions.
6902 (clear_gdb_breakpoint_conditions): New function.
6903 (add_condition_to_breakpoint): Likewise.
6904 (add_breakpoint_condition): Likewise.
6905 (gdb_condition_true_at_breakpoint): Likewise.
6906 (gdb_breakpoint_here): Return result directly instead
6907 of going through a local variable.
6908
6909 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6910 (clear_gdb_breakpoint_conditions): Likewise.
6911 (add_breakpoint_condition): Likewise.
6912 (gdb_condition_true_at_breakpoint): Likewise.
6913
6914 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6915 (need_step_over_p): Take target-side breakpoint condition into
6916 consideration.
6917
5e1dc496
LM
69182012-02-24 Luis Machado <lgustavo@codesourcery>
6919
6920 * server.h: Include tracepoint.h.
6921 (agent_mem_read, agent_get_trace_state_variable_value,
6922 agent_set_trace_state_variable_value,
6923 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6924 get_set_tsv_func_addr): New prototypes.
6925
6926 * ax.h: New include file.
6927 * ax.c: New source file.
6928
6929 * tracepoint.c: Include ax.h.
6930 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6931 agent_expr, eval_result_type): Move to ax.h.
6932 (parse_agent_expr): Rename to ...
6933 (gdb_parse_agent_expr): ... this, make it non-static and move
6934 to ax.h.
6935 (unparse_agent_expr) Rename to ...
6936 (gdb_unparse_agent_expr): ... this, make it non-static and move
6937 to ax.h.
6938 (eval_agent_expr): Rename to ...
6939 (eval_tracepoint_agent_expr): ... this.
6940 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6941 forward declarations.
6942 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6943 (agent_get_trace_state_variable_value): New function.
6944 (agent_set_trace_state_variable_value): New function.
6945 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6946 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6947 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6948 (condition_true_at_tracepoint): Likewise.
6949 (parse_agent_expr): Rename to ...
6950 (gdb_parse_agent_expr): ... this and move to ax.c.
6951 (unparse_agent_expr): Rename to ...
6952 (gdb_unparse_agent_expr): ... this and move to ax.c.
6953 (gdb_agent_op_name): Move to ax.c.
6954 (eval_agent_expr): Rename to ...
6955 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6956 and move to ax.c.
6957 (eval_tracepoint_agent_expr): New function.
6958 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6959 non-static.
5e1dc496
LM
6960 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6961 ax.c.
6962 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6963 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6964 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6965 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6966 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6967 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6968 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6969 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6970 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6971 (compile_bytecodes): Remove forward declaration.
6972 (is_goto_target): Move to ax.c.
6973 (compile_bytecodes): Move to ax.c and call
6974 agent_get_trace_state_variable_value (...) and
6975 agent_set_trace_state_variable_value (...).
6976
6977 * Makefile.in: Update ax.c and IPA dependencies.
6978
277e4e52
PA
69792012-02-24 Pedro Alves <palves@redhat.com>
6980
6981 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6982 (cmd_bigqtbuffer_circular): ... this. Only handle
6983 'QTBuffer:circular:'.
6984 (handle_tracepoint_general_set): Adjust.
6985
bf4c19f7
YQ
69862012-02-16 Yao Qi <yao@codesourcery.com>
6987
6988 * inferiors.c: Move code to ...
6989 * dll.c: .... here. New.
6990 * server.h: Declare clear_dlls.
6991 * Makefile.in (SFILES): Add dll.c.
6992 (OBS): Add dll.o
6993 (dll.o): New rule.
6994
d73f2619
YQ
69952012-02-11 Yao Qi <yao@codesourcery.com>
6996
6997 * server.c: (handle_monitor_command): Add a new parameter
6998 `own_buf'.
6999 (handle_query): Update caller.
7000
f8255c2a
JB
70012012-02-09 Joel Brobecker <brobecker@adacore.com>
7002
7003 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7004 * configure, config.in: Regenerate.
7005 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7006 is not defined.
7007
da84f473
PA
70082012-02-02 Pedro Alves <palves@redhat.com>
7009
7010 Try SIGKILL first, then PTRACE_KILL.
7011 * linux-low.c (linux_kill_one_lwp): New.
7012 (linux_kill_one_lwp): Rename to ...
7013 (kill_one_lwp_callback): ... this. Use the new
7014 linux_kill_one_lwp.
7015
e886a173
PA
70162012-02-02 Pedro Alves <palves@redhat.com>
7017
7018 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7019 inferior.
7020
be07f1a2
PA
70212012-01-27 Pedro Alves <palves@redhat.com>
7022
7023 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7024 (elf_64_file_p): Make static.
7025 (linux_pid_exe_is_elf_64_file): New.
7026 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7027 Delete declarations.
7028 (linux_pid_exe_is_elf_64_file): Declare.
7029 * linux-x86-low.c (x86_arch_setup): Use
7030 linux_pid_exe_is_elf_64_file.
7031
d8301ad1
JK
70322012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7033
7034 * linux-low.c (linux_wait_for_event_1): Rename to ...
7035 (linux_wait_for_event): ... here and merge it with former
7036 linux_wait_for_event - new variable wait_ptid, use it.
7037 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7038
01b17894
PA
70392012-01-23 Pedro Alves <palves@redhat.com>
7040
7041 * server.c (main): Avoid yet another case of infinite loop while
7042 detaching/killing after a longjmp.
7043
e825046f
JK
70442012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7045
7046 Code cleanup.
7047 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7048
b9e7b9c3
UW
70492012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7050
7051 * hostio.c (handle_readlink): New function.
7052 (handle_vFile): Call it to handle "vFile:readlink" packets.
7053
901f9912
UW
70542012-01-20 Pedro Alves <palves@redhat.com>
7055 Ulrich Weigand <ulrich.weigand@linaro.org>
7056
7057 * server.c (handle_v_requests): Only support vAttach and vRun to
7058 start multiple processes when in extended protocol mode.
7059
fc1ab1a0
PA
70602012-01-17 Pedro Alves <palves@redhat.com>
7061
7062 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7063 memalign plus mprotect to allocate the scratch buffer.
7064
7d5d4e98
PA
70652012-01-13 Pedro Alves <palves@redhat.com>
7066
7067 * server.c (attach_inferior): Clear `cont_thread'.
7068
f128d5e9
PA
70692012-01-13 Pedro Alves <palves@redhat.com>
7070
7071 * server.c (main): Avoid infinite loop while detaching/killing
7072 after a longjmp.
7073
06db92f0
DE
70742012-01-09 Doug Evans <dje@google.com>
7075
7076 * server.c (start_inferior): Set last_ptid in --wrapper case.
7077
32d92999
YQ
70782012-01-06 Yao Qi <yao@codesourcery.com>
7079
7080 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7081 defined.
7082 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7083
5e0a92a9
YQ
70842012-01-04 Yao Qi <yao@codesourcery.com>
7085
7086 * tracepoint.c (cmd_qtdp): Print debug message
7087 for static tracepoint.
7088
ae639e8c
YQ
70892012-01-04 Yao Qi <yao@codesourcery.com>
7090
7091 * tracepoint.c (trace_vdebug): Differentiate debug message
7092 between gdbserver and IPA.
7093
f72429c5
YQ
70942012-01-03 Yao Qi <yao@codesourcery.com>
7095
7096 * tracepoint.c (tracepoint_was_hit): Don't collect for
7097 static tracepoint.
7098
12c3e59c
JB
70992012-01-02 Joel Brobecker <brobecker@adacore.com>
7100
7101 * terminal.h: Reformat copyright header.
7102
67827812
JB
71032012-01-02 Joel Brobecker <brobecker@adacore.com>
7104
7105 * server.c (gdbserver_version): Update copyright year.
7106 * gdbreplay.c (gdbreplay_version): Likewise.
7107
3e52c33d
JK
71082011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7109
7110 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7111
7112 Revert:
7113 2011-12-18 Hui Zhu <teawater@gmail.com>
7114 * linux-low.c (linux_create_inferior): Save return value to ret.
7115
66f1260e
HZ
71162011-12-18 Hui Zhu <teawater@gmail.com>
7117
7118 * linux-low.c (linux_create_inferior): Save return value to ret.
7119
e77616d7
DE
71202011-12-16 Doug Evans <dje@google.com>
7121
e7b06c57
DE
7122 * linux-low.c (linux_create_inferior): If stdio connection,
7123 redirect stdin from /dev/null, stdout to stderr.
7124 * remote-utils.c (remote_is_stdio): New static global.
7125 (remote_connection_is_stdio): New function.
7126 (remote_prepare): Handle stdio connection.
7127 (remote_open): Ditto.
7128 (remote_close): Don't close stdin for stdio connections.
7129 (read_prim,write_prim): New functions. Replace all calls to
7130 read/write to these.
7131 * server.c (main): Watch for "-" argument. Move call to
7132 remote_prepare before start_inferior.
7133 * server.h (STDIO_CONNECTION_NAME): New macro.
7134 (remote_connection_is_stdio): Declare.
7135
e77616d7
DE
7136 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7137 in debugging output.
7138
82067193
YQ
71392011-12-15 Yao Qi <yao@codesourcery.com>
7140
7141 * tracepoint.c: Include sys/syscall.h.
7142 (gdb_ust_thread): Remove preprocessor conditional.
7143
82bfbe7e
PA
71442011-12-14 Pedro Alves <pedro@codesourcery.com>
7145
7146 * linux-low.c (linux_detach_one_lwp): Call
7147 the_low_target.prepare_to_resume before detaching.
7148
712c6575
YQ
71492011-12-14 Yao Qi <yao@codesourcery.com>
7150
7151 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7152 of write.
7153
d54d1edf
YQ
71542011-12-14 Yao Qi <yao@codesourcery.com>
7155
7156 * i386-low.c (i386_low_stopped_data_address): Initialize local
7157 variable `control'.
7158
6210a125
PA
71592011-12-13 Pedro Alves <pedro@codesourcery.com>
7160
7161 PR remote/13492
7162
7163 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7164 DR_CONTROL unless necessary. Extend comments.
7165 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7166 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7167
2ece8244
YQ
71682011-12-13 Yao Qi <yao@codesourcery.com>
7169
7170 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7171 macros.
7172 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7173
784867a5
JK
71742011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7175
7176 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7177 Print new debug message for such case.
7178
6bf36717
JK
71792011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7180
7181 Fix overlapping memcpy.
7182 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7183 the read_inferior_memory transfer.
7184 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7185 write_inferior_memory transfer.
7186 (set_fast_tracepoint_jump): New variable buf. Use it for the
7187 read_inferior_memory and write_inferior_memory transfers.
7188 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7189 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7190 Use it for the write_inferior_memory transfer.
7191 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7192 buffers.
7193
50275556
MR
71942011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7195
7196 * linux-low.c (fetch_register, store_register): Make code
7197 consistent, fix formatting.
7198
7325beb4
MR
71992011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7200
7201 * linux-low.c (usr_store_inferior_registers): Factor out code
7202 to handle individual registers into...
7203 (store_register): ... this new function.
7204
c642a434
UW
72052011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7206
7207 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7208 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7209 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7210 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7211 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7212 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7213 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7214 (srv_xmlfiles): Add new XML files.
7215
7216 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7217 and <sys/uio.h>.
7218 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7219 (init_registers_s390_linux32v1): Add prototype.
7220 (init_registers_s390_linux32v2): Likewise.
7221 (init_registers_s390_linux64v1): Likewise.
7222 (init_registers_s390_linux64v2): Likewise.
7223 (init_registers_s390x_linux64v1): Likewise.
7224 (init_registers_s390x_linux64v2): Likewise.
7225 (s390_num_regs): Increment to 52.
7226 (s390_regmap): Add orig_r2 register.
7227 (s390_num_regs_3264): Increment to 68.
7228 (s390_regmap_3264): Add orig_r2 register.
7229 (s390_collect_ptrace_register): Handle orig_r2 register.
7230 (s390_supply_ptrace_register): Likewise.
7231 (s390_fill_last_break): New function.
7232 (s390_store_last_break): Likewise.
7233 (s390_fill_system_call): New function.
7234 (s390_store_system_call): Likewise.
7235 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7236 register sets.
7237 (s390_check_regset): New function.
7238 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7239 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7240 Update target_regsets for available register sets.
7241
2268b414
JK
72422011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7243 Jan Kratochvil <jan.kratochvil@redhat.com>
7244
7245 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7246 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7247 New.
7248 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7249 * linux-low.h (struct process_info_private): New member r_debug.
7250 * server.c (handle_qxfer_libraries): Call
7251 the_target->qxfer_libraries_svr4.
7252 (handle_qxfer_libraries_svr4): New function.
7253 (qxfer_packets): New entry "libraries-svr4".
7254 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7255 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7256 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7257 PACKET_qXfer_libraries_svr4.
7258
d6db1fab
UW
72592011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7260
7261 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7262 PSW address/mask between 8-byte and 16-byte formats.
7263 (s390_supply_ptrace_register): Likewise.
7264 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7265 basic addressing mode bit.
7266
242f5f1c
SS
72672011-11-24 Stan Shebs <stan@codesourcery.com>
7268
7269 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7270
f196051f
SS
72712011-11-17 Stan Shebs <stan@codesourcery.com>
7272
7273 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7274 (tracing_start_time): New global.
7275 (tracing_stop_time): New global.
7276 (tracing_user_name): New global.
7277 (tracing_notes): New global.
7278 (tracing_stop_note): New global.
7279 (cmd_qtstart): Set traceframe_usage, start_time.
7280 (stop_tracing): Set stop_time.
7281 (cmd_qtstatus): Report additional status.
7282 (cmd_qtp): New function.
7283 (handle_tracepoint_query): Call it.
7284 (cmd_qtnotes): New function.
7285 (handle_tracepoint_general_set): Call it.
7286 (get_timestamp): Rename from tsv_get_timestamp.
7287
405f8e94
SS
72882011-11-14 Stan Shebs <stan@codesourcery.com>
7289 Kwok Cheung Yeung <kcy@codesourcery.com>
7290
7291 * linux-x86-low.c (small_jump_insn): New.
7292 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7293 trampoline and error message, build a trampoline and issue a small
7294 jump instruction to it.
7295 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7296 trampoline and error message.
7297 (x86_get_min_fast_tracepoint_insn_len): New.
7298 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7299 * linux-low.h (struct linux_target_ops): Add arguments to
7300 install_fast_tracepoint_jump_pad operation, add new operation.
7301 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7302 arguments.
7303 (linux_get_min_fast_tracepoint_insn_len): New function.
7304 (linux_target_op): Add new operation.
7305 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7306 (gdb_trampoline_buffer_end): Ditto.
7307 (gdb_trampoline_buffer_error): Ditto.
7308 (struct ipa_sym_addresses): Add fields for new IPA variables.
7309 (symbol_list): Add entries for new IPA variables.
7310 (struct tracepoint): Add fields to hold the address range of the
7311 trampoline used by the tracepoint.
7312 (trampoline_buffer_head): New static variable.
7313 (trampoline_buffer_tail): Ditto.
7314 (claim_trampoline_space): New function.
7315 (have_fast_tracepoint_trampoline_buffer): New function.
7316 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7317 structure.
7318 (install_fast_tracepoint): Ditto, also add error buffer argument.
7319 (cmd_qtminftpilen): New function.
7320 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7321 (fast_tracepoint_from_trampoline_address): New function.
7322 (fast_tracepoint_collecting): Handle trampoline as part of jump
7323 pad space.
7324 (set_trampoline_buffer_space): New function.
7325 (initialize_tracepoint): Initialize new IPA variables.
7326 * target.h (struct target_ops): Add arguments to
7327 install_fast_tracepoint_jump_pad operation, add new
7328 get_min_fast_tracepoint_insn_len operation.
7329 (target_get_min_fast_tracepoint_insn_len): New.
7330 (install_fast_tracepoint_jump_pad): Add arguments.
7331 * server.h (IPA_BUFSIZ): Define.
7332 * linux-i386-ipa.c: Include extra header files.
7333 (initialize_fast_tracepoint_trampoline_buffer): New function.
7334 (initialize_low_tracepoint): Call it.
7335 * server.h (set_trampoline_buffer_space): Declare.
7336 (claim_trampoline_space): Ditto.
7337 (have_fast_tracepoint_trampoline_buffer): Ditto.
7338
1e4d1764
YQ
73392011-11-14 Yao Qi <yao@codesourcery.com>
7340
7341 * server.c (handle_query): Handle InstallInTrace for qSupported.
7342 * tracepoint.c (add_tracepoint): Sort list.
7343 (install_tracepoint, download_tracepoint): New.
7344 (cmd_qtdp): Call them to install and download tracepoints.
7345 (sort_tracepoints): Removed.
7346 (cmd_qtstart): Update.
7347
5c73ff4e
YQ
73482011-11-14 Yao Qi <yao@codesourcery.com>
7349
7350 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7351 * mem-break.h: Declare.
7352 * tracepoint.c (cmd_qtstart): Move some code to ...
7353 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7354 New.
7355 (download_tracepoints): Move some code to ...
7356 (download_tracepoint_1): ... here. New.
7357
86a30030
YQ
73582011-11-08 Yao Qi <yao@codesourcery.com>
7359
7360 * remote-utils.c (relocate_instruction): A comment fix.
7361
8d26e50c
JB
73622011-11-07 Joel Brobecker <brobecker@adacore.com>
7363
7364 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7365 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7366 dr_status_mirror and dr_control_mirror from debug_reg_state.
7367 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7368 (i386_initial_stuff): Remove use of deleted globals.
7369 (i386_get_thread_context, i386_set_thread_context,
7370 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7371 from debug_reg_state.
7372
a59306a3
YQ
73732011-11-05 Yao Qi <yao@codesourcery.com>
7374
7375 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7376 address as TPOINT's.
7377
3065dfb6
SS
73782011-11-02 Stan Shebs <stan@codesourcery.com>
7379
7380 * tracepoint.c (agent_mem_read_string): New function.
7381 (eval_agent_expr): Call it for tracenz.
7382 * server.c (handle_query): Report support for tracenz.
7383
fd0d8c7c
YQ
73842011-11-02 Yao Qi <yao@codesourcery.com>
7385
7386 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7387
609086b1
YQ
73882011-11-02 Yao Qi <yao@codesourcery.com>
7389
7390 * target.h: Fix a typo in comment.
7391
b9fd1791
PA
73922011-10-31 Pedro Alves <pedro@codesourcery.com>
7393
7394 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7395 clobber the breakpoints' shadows with fast tracepoint jumps.
7396 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7397 * target.c (write_inferior_memory): Also pass MYADDR down to
7398 check_mem_write.
7399
03583c20
UW
74002011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7401
7402 * configure.ac: Check support for personality routine.
7403 * configure: Regenerate.
7404 * config.in: Likewise.
7405 * linux-low.c: Include <sys/personality.h>.
7406 Define ADDR_NO_RANDOMIZE if necessary.
7407 (linux_create_inferior): Disable address space randomization when
7408 forking inferior, if requested.
7409 (linux_supports_disable_randomization): New function.
7410 (linux_target_ops): Install it.
7411 * server.h (disable_randomization): Declare.
7412 * server.c (disable_randomization): New global variable.
7413 (handle_general_set): Handle QDisableRandomization.
7414 (handle_query): Likewise for qSupported.
7415 (main): Support --disable-randomization and --no-disable-randomization
7416 command line arguments.
7417 * target.h (struct target_ops): Add supports_disable_randomization.
7418 (target_supports_disable_randomization): New macro.
7419
723b724b
MF
74202011-09-29 Mike Frysinger <vapier@gentoo.org>
7421
7422 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7423 ifdef check.
7424 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7425 [!PT_GETDSBT] (target_loadmap): New definition.
7426 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7427 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7428 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7429 and PT_GETDSBT to LINUX_LOADMAP.
7430 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7431 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7432
55329a5c 74332011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7434
7435 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7436 (arm_linux_hwbp_cap): New static variable.
7437 (arm_linux_get_hwbp_cap): Replace by ...
7438 (arm_linux_init_hwbp_cap): ... this new function.
7439 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7440 (arm_linux_get_hw_watchpoint_count): Likewise.
7441 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7442 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7443 (arm_prepare_to_resume): Use perror_with_name instead of error.
7444
55329a5c 74452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7446
7447 * linux-arm-low.c: Include <signal.h>.
7448 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7449 (struct arm_linux_hwbp_cap): New data type.
7450 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7451 (struct arm_linux_hw_breakpoint): New data type.
7452 (MAX_BPTS, MAX_WPTS): Define.
7453 (struct arch_process_info, struct arch_lwp_info): New data types.
7454 (arm_linux_get_hwbp_cap): New function.
7455 (arm_linux_get_hw_breakpoint_count): Likewise.
7456 (arm_linux_get_hw_watchpoint_count): Likewise.
7457 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7458 (arm_hwbp_control_initialize): Likewise.
7459 (arm_hwbp_control_is_enabled): Likewise.
7460 (arm_hwbp_control_is_initialized): Likewise.
7461 (arm_hwbp_control_disable): Likewise.
7462 (arm_linux_hw_breakpoint_equal): Likewise.
7463 (arm_linux_hw_point_initialize): Likewise.
7464 (struct update_registers_data): New data structure.
7465 (update_registers_callback: New function.
7466 (arm_insert_point): Likewise.
7467 (arm_remove_point): Likewise.
7468 (arm_stopped_by_watchpoint): Likewise.
7469 (arm_stopped_data_address): Likewise.
7470 (arm_new_process): Likewise.
7471 (arm_new_thread): Likewise.
7472 (arm_prepare_to_resume): Likewise.
7473 (the_low_target): Register arm_insert_point, arm_remove_point,
7474 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7475 arm_new_thread, and arm_prepare_to_resume.
7476
6b9801d4
SS
74772011-09-15 Stan Shebs <stan@codesourcery.com>
7478
7479 * server.h (struct emit_ops): Add compare-goto fields.
7480 * tracepoint.c (gdb_agent_op_sizes): New table.
7481 (emit_eq_goto): New function.
7482 (emit_ne_goto): New function.
7483 (emit_lt_goto): New function.
7484 (emit_le_goto): New function.
7485 (emit_gt_goto): New function.
7486 (emit_ge_goto): New function.
7487 (is_goto_target): New function.
7488 (compile_bytecodes): Recognize special cases of compare-goto
7489 combinations and call specialized emitters for them.
7490 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7491 (amd64_emit_ne_goto): New function.
7492 (amd64_emit_lt_goto): New function.
7493 (amd64_emit_le_goto): New function.
7494 (amd64_emit_gt_goto): New function.
7495 (amd64_emit_ge_goto): New function.
7496 (amd64_emit_ops): Add the new functions.
7497 (i386_emit_eq_goto): New function.
7498 (i386_emit_ne_goto): New function.
7499 (i386_emit_lt_goto): New function.
7500 (i386_emit_le_goto): New function.
7501 (i386_emit_gt_goto): New function.
7502 (i386_emit_ge_goto): New function.
7503 (i386_emit_ops): Add the new functions.
7504
bf15cbda
SS
75052011-09-08 Stan Shebs <stan@codesourcery.com>
7506
7507 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7508 (i386_emit_epilogue): Restore %ebx.
7509
943ca1dd
JZ
75102011-08-31 Jie Zhang <jzhang918@gmail.com>
7511
7512 * server.c (step_thread): Remove definition.
7513 (process_serial_event): Don't handle Hs.
7514 * server.h (step_thread): Remove declaration.
7515 * target.c (set_desired_inferior): Remove use of step_thread.
7516
e3deef73
LM
75172011-08-24 Luis Machado <lgustavo@codesourcery.com>
7518
7519 * linux-low.c: Include linux-procfs.h.
7520 (linux_attach_lwp_1): Update comments.
7521 (linux_attach): Scan for existing threads when attaching to a
7522 process that is the tgid.
7523 * Makefile.in: Update dependencies.
7524
13da1c97
LM
75252011-08-24 Luis Machado <lgustavo@codesourcery.com>
7526
7527 * configure.srv: Add linux-procfs.o dependencies.
7528
881127c9
YQ
75292011-08-14 Yao Qi <yao@codesourcery.com>
7530
7531 * target.h (struct target_ops): Fix indent.
7532 * win32-low.c (win32_target_ops): Fix comment.
7533
58dbd541
YQ
75342011-08-14 Andrew Jenner <andrew@codesourcery.com>
7535 Yao Qi <yao@codesourcery.com>
7536
7537 * Makefile.in (clean): Remove tic6x-*.c files.
7538 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7539 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7540 (tic6x-c64xp-linux.c): Likewise.
7541 * configure.srv: Add support for tic6x-*-uclinux.
7542 * linux-tic6x-low.c: New.
7543 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7544
78d85199
YQ
75452011-08-14 Andrew Stubbs <ams@codesourcery.com>
7546 Yao Qi <yao@codesourcery.com>
7547
7548 * target.h (struct target_ops): Add read_loadmap.
7549 * linux-low.c (struct target_loadseg): New type.
7550 (struct target_loadmap): New type.
7551 (linux_read_loadmap): New function.
7552 (linux_target_ops): Add linux_read_loadmap.
7553 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7554 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7555 to NULL.
78d85199 7556
a959a88d
EZ
75572011-08-05 Eli Zaretskii <eliz@gnu.org>
7558
7559 * win32-low.c: Include <stdint.h>.
7560
1ced966e
PA
75612011-07-22 Pedro Alves <pedro@codesourcery.com>
7562
7563 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7564 to the inferior here.
7565 (i386_remove_aligned_watchpoint): Ditto.
7566 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7567 fit part of the watchpoint in the debug registers.
7568 (i386_update_inferior_debug_regs): New.
7569 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7570 registers, and only update the inferior on success.
7571 (i386_low_remove_watchpoint): Ditto.
7572
d26e3629
KY
75732011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7574
7575 * linux-low.c (compare_ints, unique, list_threads, show_process,
7576 linux_core_of_thread): Delete.
7577 (linux_target_ops): Change linux_core_of_thread to
7578 linux_common_core_of_thread.
7579 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7580 * utils.c (malloc_failure): Change type of argument.
7581 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7582 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7583 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7584 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7585 (IPA_OBJS): Add common-utils-ipa.o.
7586 (ptid_h, linux_osdata_h): New macros.
7587 (server_h): Add common/common-utils.h, common/xml-utils.h,
7588 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7589 common/ptid.h.
7590 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7591 ptid.o, buffer.o): New rules.
7592 (linux-low.o): Add common/linux-osdata.h as a dependency.
7593 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7594 * configure.ac: Add AC_HEADER_DIRENT check.
7595 * config.in: Regenerate.
7596 * configure: Regenerate.
7597 * remote-utils.c (xml_escape_text): Delete.
7598 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7599 buffer_xml_printf): Move to common/buffer.c.
7600 * server.c (main): Remove call to initialize_inferiors.
7601 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7602 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7603 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7604 internal_error, gdb_assert, gdb_assert_fail): Delete.
7605 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7606 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7607 common/buffer.h.
7608 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7609 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7610 initialize_inferiors): Delete.
7611
2275a1a7
PA
76122011-07-20 Pedro Alves <pedro@codesourcery.com>
7613
7614 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7615 symbol error.
7616
0a5b1e09
PA
76172011-05-31 Pedro Alves <pedro@codesourcery.com>
7618
7619 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7620 assertion.
7621 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7622
6938fd34
YQ
76232011-05-26 Yao Qi <yao@codesourcery.com>
7624
7625 * Makefile.in (thread-db.o): Track dependence to
7626 common/gdb_thread_db.h.
7627 * thread-db.c: include gdb_thread_db.h from right place.
7628
b481f9e0
TT
76292011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7630
7631 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7632 __FILE__ and __LINE__ to internal_error.
7633
98a5dd13
DE
76342011-05-13 Doug Evans <dje@google.com>
7635
7636 * thread-db.c (try_thread_db_load_from_sdir): New function.
7637 (try_thread_db_load_from_dir): New function.
7638 (thread_db_load_search): Handle $sdir, ignore $pdir.
7639 Remove trying of system directories if search of
7640 libthread-db-search-path fails, that is now done via $sdir.
7641
d248b706
KY
76422011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7643
7644 * server.c (handle_query): Add EnableDisableTracepoints to the list
7645 of supported features.
43aaf8b6 7646 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7647 tracepoints.
43aaf8b6
PA
7648 (cmd_qtenable_disable): New.
7649 (cmd_qtstart): Install tracepoints even if disabled.
7650 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7651 receiving a QTEnable or QTDisable packet.
7652 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7653 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7654 tracepoints.
7655 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7656
84e578fb
DE
76572011-05-10 Doug Evans <dje@google.com>
7658
7659 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7660
71f55dd8
DE
76612011-05-04 Doug Evans <dje@google.com>
7662
7663 * linux-low.c (linux_join): Skip process lookup.
7664 * spu-low.c (spu_join): Ditto.
7665 * server.c (join_inferiors_callback): Delete.
7666 (process_serial_event): For 'D' packet (detach) call join_inferior
7667 directly.
7668
4d393d60
JM
76692011-05-04 Joseph Myers <joseph@codesourcery.com>
7670
7671 * README: Don't mention xscale*-*-linux*.
7672 * configure.srv (xscale*-*-linux*): Don't handle target.
7673
b00ad6ff
NF
76742011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7675
7676 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7677 casting pointers.
7678 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7679 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7680 (i386_emit_void_call_2): Likewise.
7681
af96c192
YQ
76822011-04-26 Yao Qi <yao@codesourcery.com>
7683
43aaf8b6
PA
7684 * linux-low.c: Move common macros to linux-ptrace.h.
7685 Include linux-ptrace.h.
af96c192
YQ
7686 * Makefile.in (linux_ptrace_h): New.
7687 (linux-low.o): Depends on linux-ptrace.h.
7688
03f2bd59
JK
76892011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7690
7691 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7692 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7693 (remote_prepare): New function with most of the TCP code from ...
7694 (remote_open): ... here. Detect PORT here unconditionally. Move also
7695 setting transport_is_reliable.
7696 * server.c (run_once): New variable.
7697 (gdbserver_usage): Document it.
7698 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7699 the first run if RUN_ONCE.
7700 * server.h (run_once, remote_prepare): New declarations.
7701
7a9dd1b2
TT
77022011-04-19 Tom Tromey <tromey@redhat.com>
7703
7704 * win32-low.c (handle_load_dll): Remove duplicate "the".
7705
81239425
PM
77062011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7707
7708 Remove support for old Cygwin 1.5 versions.
7709 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7710 function to avoid warning.
7711 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7712 warning.
7713
9e0627f1
PM
77142011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7715
7716 * gdbserver/server.h (Macro _): Define it if not available.
7717
588eebee
MS
77182011-03-14 Michael Snyder <msnyder@vmware.com>
7719
348af9f7 7720 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7721
43f70d4c
JB
77222011-03-10 Joel Brobecker <brobecker@adacore.com>
7723
7724 * Makefile.in (maintainer-clean realclean distclean): Remove
7725 "make ... subdir_do" command.
7726
348af9f7
MS
77272011-03-10 Michael Snyder <msnyder@vmware.com>
7728
7729 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7730
7731 * server.c (handle_v_run): Free alloced buffer on early return.
7732
e637a4f5
YQ
77332011-03-09 Yao Qi <yao@codesourcery.com>
7734
7735 Revert:
7736 2011-03-04 Yao Qi <yao@codesourcery.com>
7737
7738 * Makefile.in: Remove GNU make feature --directory.
7739
7740 2011-03-05 Yao Qi <yao@codesourcery.com>
7741
7742 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7743 (subdir_do): New make target. Copied from gdb/Makefile.
7744 (maintainer-clean, realclean, distclean, clean): Call corresponding
7745 make targets in common/Makefile.
7746
7747 2011-02-11 Yao Qi <yao@codesourcery.com>
7748
7749 * configure.ac: Call AC_PROG_RANLIB.
7750 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7751 * configure: Regenerate.
7752
e6edda56
JK
77532011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7754
7755 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7756
e5141119
JB
77572011-03-06 Yao Qi <yao@codesourcery.com>
7758
7759 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7760
64794aa4
JB
77612011-03-05 Yao Qi <yao@codesourcery.com>
7762
7763 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7764 (subdir_do): New make target. Copied from gdb/Makefile.
7765 (maintainer-clean, realclean, distclean, clean): Call corresponding
7766 make targets in common/Makefile.
7767
7a762829
YQ
77682011-03-04 Yao Qi <yao@codesourcery.com>
7769
7770 * Makefile.in: Remove GNU make feature --directory.
7771
348af9f7
MS
77722011-03-04 Michael Snyder <msnyder@vmware.com>
7773
7774 * server.c (queue_stop_reply): Call xmalloc not malloc.
7775
77762011-03-02 Michael Snyder <msnyder@vmware.com>
7777
7778 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7779
9f72fee2
MS
77802011-02-28 Michael Snyder <msnyder@vmware.com>
7781
588eebee
MS
7782 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7783 (cmd_qtframe): Ditto.
7784 (cmd_qtbuffer): Ditto.
7785 (cmd_bigqtbuffer): Ditto.
7786
9f72fee2
MS
7787 * utils.c (decimal2str): Initialize 'width' to nine, then
7788 don't mess with it.
7789
8040bd49
UW
77902011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7791
7792 * hostio.c (require_data): Free *data, not data.
7793
7e52cbd0
JK
77942011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7795
7796 * hostio.c (require_data): Use free, not xfree.
7797
9130f83e
MS
77982011-02-27 Michael Snyder <msnyder@vmware.com>
7799
4b812f4e
MS
7800 * server.c (handle_query): Discard unused value.
7801
9130f83e
MS
7802 * hostio.c (require_data): Free malloc memory before returning
7803 error.
7804
69d37113
MS
78052011-02-26 Michael Snyder <msnyder@vmware.com>
7806
7807 * linux-low.c (list_threads): Call closedir for dirent.
7808
35f5825a
MS
78092011-02-27 Michael Snyder <msnyder@vmware.com>
7810
2a589cef
MS
7811 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7812 a case statement falls through.
7813
0adea5f7
MS
7814 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7815
35f5825a
MS
7816 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7817 in comparison.
7818
238f1c74
MS
78192011-02-26 Michael Snyder <msnyder@vmware.com>
7820
7821 * utils.c (decimal2str): Eliminate dead code and dead param.
7822 (pulongest): Drop dead param from call to decimal2str.
7823 (plongest): Ditto.
7824
633ff500
JB
78252011-02-24 Joel Brobecker <brobecker@adacore.com>
7826
7827 Revert the following patch (not approved yet):
7828 2011-02-21 Hui Zhu <teawater@gmail.com>
7829 * tracepoint.c (tp_printf): New function.
7830 (eval_agent_expr): Handle gdb_agent_op_printf.
7831
f9c6ff72
HZ
78322011-02-21 Hui Zhu <teawater@gmail.com>
7833
7834 * tracepoint.c (tp_printf): New function.
7835 (eval_agent_expr): Handle gdb_agent_op_printf.
7836
94d5e490
TT
78372011-02-18 Tom Tromey <tromey@redhat.com>
7838
7839 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7840 (tracepoint.o): Likewise.
7841 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7842 (gdb_agent_op_names): Likewise.
7843
c7f96d2b
TT
78442011-02-18 Tom Tromey <tromey@redhat.com>
7845
7846 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7847 gdb_agent_op_rot>: New constants.
7848 (gdb_agent_op_names): Add pick and roll.
7849 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7850 cases.
7851
0feedb2c
JK
78522011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7853
7854 * aclocal.m4: Regenerated with aclocal-1.11.1.
7855
b3b9301e
PA
78562011-02-14 Pedro Alves <pedro@codesourcery.com>
7857
7858 * server.c (handle_qxfer_traceframe_info): New.
7859 (qxfer_packets): Register "traceframe-info".
7860 (handle_query): Report support for qXfer:traceframe-info:read+.
7861 * tracepoint.c (match_blocktype): New.
7862 (traceframe_find_block_type): Rename to ...
7863 (traceframe_walk_blocks): ... this. Add callback filter argument,
7864 and use it.
7865 (traceframe_find_block_type): New, reimplemented on top of
7866 traceframe_walk_blocks.
7867 (build_traceframe_info_xml): New.
7868 (traceframe_read_info): New.
7869 * server.h (traceframe_read_info): Declare.
7870
4f3e6fb7
YQ
78712011-02-11 Yao Qi <yao@codesourcery.com>
7872
7873 * configure.ac: Call AC_PROG_RANLIB.
7874 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7875 * configure: Regenerate.
7876
764880b7
PA
78772011-02-07 Pedro Alves <pedro@codesourcery.com>
7878
7879 * server.c (gdb_read_memory): Change return semantics to allow
7880 partial transfers.
7881 (handle_search_memory_1): Adjust.
7882 (process_serial_event) <'m' packet>: Handle partial transfers.
7883 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7884
1c79eb8a
PA
78852011-01-28 Pedro Alves <pedro@codesourcery.com>
7886
7887 * regcache.c (init_register_cache): Initialize
7888 regcache->register_status.
7889 (free_register_cache): Release regcache->register_status.
7890 (regcache_cpy): Copy register_status.
7891 (registers_to_string): Print 'x's for unavailable registers.
7892 (supply_register): Mark the register's status valid or
7893 unavailable, depending on whether a buffer was passed in or not.
7894 (supply_register_zeroed): New.
7895 (supply_regblock): Mark the registers' status valid or
7896 unavailable, depending on whether a buffer was passed in or not.
7897 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7898 (struct regcache): New `register_status' field.
7899 (supply_register_zeroed): Declare.
7900 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7901 supply_register_zeroed, rather than passing a NULL buffer to
7902 supply_register.
7903 * tracepoint.c (fetch_traceframe_registers): Update comment.
7904
85724a0e
PA
79052011-01-28 Pedro Alves <pedro@codesourcery.com>
7906
7907 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7908 buffer explicit.
7909
d08aafef
PA
79102011-01-25 Pedro Alves <pedro@codesourcery.com>
7911
7912 * server.h (decode_xfer_write): Change prototype.
7913 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7914 and don't extract the annex here.
7915 * server.c (decode_xfer_read): Remove `annex' parameter,
7916 and don't extract the annex here.
7917 (decode_xfer): New.
7918 (struct qxfer): New.
7919 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7920 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7921 (handle_qxfer_statictrace): New functions, abstracted out from
7922 handle_query, and made to use the struct qxfer interface.
7923 (handle_threads_qxfer_proper): Rename to ...
7924 (handle_qxfer_threads_proper): ... this.
7925 (handle_threads_qxfer): Rename to ...
7926 (handle_qxfer_threads): ... this. Adjust.
7927 (qxfer_packets): New array.
7928 (handle_qxfer): New function.
7929 (handle_query): Use handle_qxfer.
7930
493e2a69
MS
79312011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7932
7933 * gdbreplay.c: Shorten lines of >= 80 columns.
7934 * linux-low.c: Ditto.
7935 * linux-ppc-low.c: Ditto.
7936 * linux-s390-low.c: Ditto.
7937 * linux-sparc-low.c: Ditto.
7938 * linux-x86-low.c: Ditto.
7939 * linux-xtensa-low.c: Ditto.
7940 * mem-break.c: Ditto.
7941 * nto-low.c: Ditto.
7942 * regcache.h: Ditto.
7943 * remote-utils.c: Ditto.
7944 * server.c: Ditto.
7945 * server.h: Ditto.
7946 * thread-db.c: Ditto.
7947 * tracepoint.c: Ditto.
7948 * utils.c: Ditto.
7949 * win32-low.h: Ditto.
7950
44944448
JB
79512011-01-05 Joel Brobecker <brobecker@adacore.com>
7952
7953 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7954 update.
7955
71ce852c
JB
79562011-01-01 Joel Brobecker <brobecker@adacore.com>
7957
7958 * server.c (gdbserver_version): Update copyright year in version
7959 output.
7960 * gdbreplay.c (gdbreplay_version): Ditto.
7961
eb826dc6
MF
79622010-12-29 Jie Zhang <jie.zhang@analog.com>
7963
7964 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7965 * linux-bfin-low.c: New file.
7966 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7967 PT_DATA_ADDR for BFIN targets.
7968 * Makefile.in (SFILES): Add linux-bfin-low.c.
7969 (clean): Remove reg-bfin.c.
7970 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7971 * README: Mention supported Blackfin targets.
7972
39ab222a
MF
79732010-12-23 Mike Frysinger <vapier@gentoo.org>
7974
7975 * .gitignore: New file.
7976
a1f2ce7d
MF
79772010-11-16 Mike Frysinger <vapier@gentoo.org>
7978
7979 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7980
f474844c
JZ
79812010-10-22 Jie Zhang <jie@codesourcery.com>
7982
7983 * Makefile.in: Add FLAGS_TO_PASS variable.
7984 (install): Remove dependency of install-only and recursively
7985 invoke make for install-only.
7986
f1048712
DE
79872010-10-04 Doug Evans <dje@google.com>
7988
7989 * Makefile.in (uninstall): Use $(DESTDIR).
7990
b53a1623
PA
79912010-09-24 Pedro Alves <pedro@codesourcery.com>
7992
e6ee044d
PA
7993 PR gdb/11842
7994
b53a1623
PA
7995 * linux-x86-low.c (compat_siginfo_from_siginfo)
7996 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7997 si_code is < 0. Check for si_code == SI_TIMER before checking for
7998 si_code < 0.
7999
fa1bd1e4
JB
80002010-09-13 Joel Brobecker <brobecker@adacore.com>
8001
8002 * lynx-i386-low.c: New file.
8003 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8004
47fac8f8
JB
80052010-09-13 Joel Brobecker <brobecker@adacore.com>
8006
8007 * lynx-low.c (ptrace_request_to_str): Remove handling for
8008 request values that have been removed in LynxOS 5.x.
8009
1adfc54d
JB
80102010-09-13 Joel Brobecker <brobecker@adacore.com>
8011
8012 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8013 <ptrace.h>
8014
c2a66c29
NS
80152010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8016
8017 * configure.ac: Add --enable-inprocess-agent option.
8018 * configure: Rebuilt.
8019
32fcada3
YQ
80202010-09-06 Yao Qi <yao@codesourcery.com>
8021
8022 * linux-low.c (linux_kill): Remove unused variable.
8023 (linux_stabilize_threads): Likewise.
8024 * server.c (start_inferior): Likewise.
8025 (queue_stop_reply_callback): Likewise.
8026 * tracepoint.c (do_action_at_tracepoint): Likewise.
8027
0cccb683
YQ
80282010-09-06 Yao Qi <yao@codesourcery.com>
8029
8030 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8031 on return.
8032
423ec54c
JK
80332010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8034
8035 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8036
12ac6819
PA
80372010-09-06 Pedro Alves <pedro@codesourcery.com>
8038
8039 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8040 "$(IPA_DEPFILES)".
8041
8ed54b31
JB
80422010-09-01 Joel Brobecker <brobecker@adacore.com>
8043
8044 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8045 gdbserver/lynx-ppc-low.c: New files.
8046 * Makefile.in (lynx_low_h): New variable.
8047 (lynx-low.o, lynx-ppc-low.o): New rules.
8048 * configure.ac: On LynxOS, link with -lnetinet.
8049 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8050 * configure: regenerate.
8051
bb0116a4
JB
80522010-09-01 Joel Brobecker <brobecker@adacore.com>
8053
8054 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8055 * configure.ac: Add check for vasprintf and vsnprintf.
8056 * configure, config.in: Regenerate.
8057 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8058
a778ab81 80592010-09-01 Joel Brobecker <brobecker@adacore.com>
8060
8061 * gdbreplay.c: Move include of alloca.h up, next to include of
8062 malloc.h.
8063 * server.h: Add include of malloc.h.
8064 * mem-break.c: Remove include of malloc.h.
8065 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8066
8b034a19 80672010-09-01 Joel Brobecker <brobecker@adacore.com>
8068
8069 * Makefile.in (memmem.o): Build with -Wno-error.
8070
80712010-09-01 Joel Brobecker <brobecker@adacore.com>
8072
8073 * utils.c (xsnprintf): Make non-static.
8074 * server.h: Add xsnprintf declaration.
8075 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8076 replace calls to snprintf by calls to xsnprintf throughout.
8077
80782010-09-01 Joel Brobecker <brobecker@adacore.com>
8079
8080 * configure.ac: Add configure check for alloca.
8081 * configure, config.in: Regenerate.
8082 * server.h: Include alloca.h if it exists.
8083 * gdbreplay.c: Include alloca.h if it exists.
8084
1a981360
PA
80852010-08-28 Pedro Alves <pedro@codesourcery.com>
8086
8087 * linux-low.c (__SIGRTMIN): Define if not already defined.
8088 (linux_create_inferior): Check for __ANDROID__ rather than
8089 __SIGRTMIN.
8090 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8091 are already deferred.
8092 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8093 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8094 stopped and already has a pending signal to report.
8095 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8096 a pending signal to report or is moving out of a jump pad.
8097 (linux_init_signals): Check for __ANDROID__ rather than
8098 __SIGRTMIN.
8099
b4d51a55
PA
81002010-08-28 Pedro Alves <pedro@codesourcery.com>
8101
8102 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8103 debug_threads check. Avoid a linear search when not doing debug
8104 output.
8105
ec48365d
PA
81062010-08-27 Pedro Alves <pedro@codesourcery.com>
8107
8108 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8109 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8110 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8111 (process_event): Change local fd's type to gdb_fildes_t.
8112 (create_file_handler): Adjust prototype.
8113 (delete_file_handler): Adjust prototype.
8114 (handle_file_event): Adjust prototype. Use pfildes.
8115 (create_file_event): Adjsut prototype.
8116 * remote-utils.c (remote_desc, listen_desc): Change type to
8117 gdb_fildes_t.
8118 * server.h: New gdb_fildes_t typedef.
8119 [USE_WIN32API]: Include winsock2.h.
8120 (delete_file_handler, add_file_handler): Adjust prototypes.
8121 (pfildes): Declare.
8122 * utils.c (pfildes): New.
8123
854d88f0
PA
81242010-08-27 Pedro Alves <pedro@codesourcery.com>
8125
8126 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8127 * configure: Regenerate.
8128
0146f85b
PA
81292010-08-27 Pedro Alves <pedro@codesourcery.com>
8130
8131 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8132 (linux_done_accessing_memory): ... this.
8133 (linux_target_ops): Adjust.
8134 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8135 * nto-low.c (nto_target_ops): Adjust comment.
8136 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8137 * spu-low.c (spu_target_ops): Adjust comment.
8138 * target.h (target_ops): Rename unprepare_to_access_memory field
8139 to done_accessing_memory.
8140 (unprepare_to_access_memory): Rename to ...
8141 (done_accessing_memory): ... this.
8142
90d74c30
PA
81432010-08-26 Pedro Alves <pedro@codesourcery.com>
8144
8145 * linux-low.c (linux_prepare_to_access_memory): New.
8146 (linux_unprepare_to_access_memory): New.
8147 (linux_target_ops): Install them.
8148 * server.c (read_memory): Rename to ...
8149 (gdb_read_memory): ... this. Use
8150 prepare_to_access_memory/prepare_to_access_memory.
8151 (write_memory): Rename to ...
8152 (gdb_write_memory): ... this. Use
8153 prepare_to_access_memory/prepare_to_access_memory.
8154 (handle_search_memory_1): Adjust.
8155 (process_serial_event): Adjust.
8156 * target.h (struct target_ops): New fields
8157 prepare_to_access_memory and unprepare_to_access_memory.
8158 (prepare_to_access_memory, unprepare_to_access_memory): New.
8159 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8160 prepare_to_access_memory/prepare_to_access_memory.
8161 * nto-low.c (nto_target_ops): Adjust.
8162 * spu-low.c (spu_target_ops): Adjust.
8163 * win32-low.c (win32_target_ops): Adjust.
8164
fd467969
PA
81652010-08-26 Pedro Alves <pedro@codesourcery.com>
8166
8167 * Makefile.in (WARN_CFLAGS): Get it from configure.
8168 (WERROR_CFLAGS): New.
8169 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8170 * configure.ac: Introduce --enable-werror, which adds -Werror to
8171 the compiler command line. Enabled by default. Disable with
8172 --disable-werror. Add -Wdeclaration-after-statement
8173 Wpointer-arith and -Wformat-nonliteral to warning flags.
8174 * configure: Regenerate.
8175
331e2f5f
PA
81762010-08-26 Pedro Alves <pedro@codesourcery.com>
8177
8178 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8179
e581f2b4
PA
81802010-08-26 Pedro Alves <pedro@codesourcery.com>
8181
8182 * gdbreplay.c (remote_error): New.
8183 (gdbchar): New.
8184 (expect): Use gdbchar. Check for error reading from GDB.
8185 Clarify sync error output.
8186 (play): Check for errors writing to GDB.
8187 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8188 * remote-utils.c (getpkt): Check for errors writing to the remote
8189 descriptor.
8190
3c11dd79
PA
81912010-08-25 Pedro Alves <pedro@codesourcery.com>
8192
8193 * linux-low.c (linux_wait_1): Move non-debugging code out of
8194 `debug_threads' control.
8195
d20a8ad9
PA
81962010-08-25 Pedro Alves <pedro@codesourcery.com>
8197
8198 * linux-low.c (linux_wait_1): Don't set last_status here.
8199 * server.c (push_event, queue_stop_reply_callback): Assert we're
8200 not pushing a TARGET_WAITKIND_IGNORE event.
8201 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8202 (myresume, handle_target_event): Set the thread's last_resume_kind
8203 and last_status from the target returned status.
8204
964e4306
PA
82052010-08-25 Pedro Alves <pedro@codesourcery.com>
8206
8207 PR threads/10729
8208
8209 * linux-x86-low.c (update_debug_registers_callback): New.
8210 (i386_dr_low_set_addr): Use it.
8211 (i386_dr_low_get_addr): New.
8212 (i386_dr_low_set_control): Use update_debug_registers_callback.
8213 (i386_dr_low_get_control): New.
8214 (i386_dr_low_get_status): Adjust.
8215 * linux-low.c (linux_stop_lwp): New.
8216 * linux-low.h (linux_stop_lwp): Declare.
8217
8218 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8219 argument instead of a i386_debug_reg_state.
8220 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8221 a i386_debug_reg_state.
8222 (i386_insert_aligned_watchpoint): Adjust.
8223 (i386_remove_aligned_watchpoint): Adjust.
8224 (i386_low_stopped_data_address): Read the debug registers from the
8225 inferior instead of from the mirrors.
8226 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8227 (i386_dr_low_get_addr): Declare.
8228 (i386_dr_low_get_control): Declare.
8229 (i386_dr_low_get_status): Change prototype.
8230
8231 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8232 (i386_dr_low_get_addr): New.
8233 (i386_dr_low_get_control): New.
8234 (i386_dr_low_get_status): Adjust prototype. Return
8235 dr_status_mirror.
8236 (i386_initial_stuff): Clear dr_status_mirror and
8237 dr_control_mirror.
8238 (i386_get_thread_context): Adjust.
8239 (i386_set_thread_context): Adjust.
8240 (i386_thread_added): Adjust.
8241
5f21a75b
PA
82422010-08-24 Pedro Alves <pedro@codesourcery.com>
8243
8244 * linux-low.h (linux_thread_area): Delete declaration.
8245
3e4c1235
TS
82462010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8247
8248 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8249 after its termination.
8250
1971b033
PA
82512010-08-09 Pedro Alves <pedro@codesourcery.com>
8252
8253 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8254 (gdb_wants_all_stopped): Delete.
8255 (linux_wait_1): Don't call them.
8256 * server.c (handle_v_cont): Tag all threads as want-stopped.
8257 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8258 stopped as "client-wants-stopped".
8259
310444ac
PA
82602010-07-31 Pedro Alves <pedro@codesourcery.com>
8261
8262 * Makefile.in (signals_h): New.
8263 (server_h): Depend on it.
8264 (server.o): Don't depend on $(signals_def).
8265 (signals.o): Depend on $(signals_def).
8266
a19cae16
JK
82672010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8268
8269 * Makefile.in (signals_def): New.
8270 (server_h): Append include/gdb/signals.h and signals_def.
8271 (server.o): Append signals_def.
8272
30d50328
JK
82732010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8274
8275 * server.c (handle_target_event): Use target_signal_to_host for
8276 resume_info.sig initialization.
8277 * target.h (struct thread_resume) <sig>: New comment.
8278
5c3216e2
OS
82792010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8280
c6f46ca0
OS
8281 * server.c (handle_query): strcpy() the returned string from paddress()
8282 instead of sprintf().
5c3216e2
OS
8283 * utils.c (paddress): Return phex_nz().
8284
6bd31874
JB
82852010-07-07 Joel Brobecker <brobecker@adacore.com>
8286
8287 * server.c (handle_v_cont): Call mourn_inferior if process
8288 just exited.
8289 (myresume): Likewise.
8290
0fb4aa4b
PA
82912010-07-01 Pedro Alves <pedro@codesourcery.com>
8292
8293 Static tracepoints, and integration with UST.
8294
8295 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8296 * mem-break.c (uninsert_all_breakpoints)
8297 (reinsert_all_breakpoints): New.
8298 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8299 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8300 (gdb_agent_ust_loaded, helper_thread_id)
8301 (gdb_agent_helper_thread_id): New macros.
8302 (struct ipa_sym_addresses): Add addr_ust_loaded,
8303 addr_helper_thread_id, addr_cmd_buf.
8304 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8305 (in_process_agent_loaded_ust): New.
8306 (write_e_ust_not_loaded): New.
8307 (maybe_write_ipa_ust_not_loaded): New.
8308 (struct collect_static_trace_data_action): New.
8309 (enum tracepoint_type) <static_tracepoint>: New.
8310 (struct tracepoint) <handle>: Mention static tracepoints.
8311 (struct static_tracepoint_ctx): New.
8312 (CMD_BUF_SIZE): New.
8313 (add_tracepoint_action): Handle static tracepoint actions.
8314 (unprobe_marker_at): New.
8315 (clear_installed_tracepoints): Handle static tracepoints.
8316 (cmd_qtdp): Handle static tracepoints.
8317 (probe_marker_at): New.
8318 (cmd_qtstart): Handle static tracepoints.
8319 (response_tracepoint): Handle static tracepoints.
8320 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8321 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8322 (get_context_regcache): Handle static tracepoints.
8323 (do_action_at_tracepoint): Handle static tracepoint actions.
8324 (traceframe_find_block_type): Handle static trace data blocks.
8325 (traceframe_read_sdata): New.
8326 (download_tracepoints): Download static tracepoint actions.
8327 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8328 (GDB_PROBE_NAME): New.
8329 (ust_ops): New.
8330 (GET_UST_SYM): New.
8331 (USTF): New.
8332 (dlsym_ust): New.
8333 (ust_marker_to_static_tracepoint): New.
8334 (gdb_probe): New.
8335 (collect_ust_data_at_tracepoint): New.
8336 (gdb_ust_probe): New.
8337 (UNIX_PATH_MAX, SOCK_DIR): New.
8338 (gdb_ust_connect_sync_socket): New.
8339 (resume_thread, stop_thread): New.
8340 (run_inferior_command): New.
8341 (init_named_socket): New.
8342 (gdb_ust_socket_init): New.
8343 (cstr_to_hexstr): New.
8344 (next_st): New.
8345 (first_marker, next_marker): New.
8346 (response_ust_marker): New.
8347 (cmd_qtfstm, cmd_qtsstm): New.
8348 (unprobe_marker_at, probe_marker_at): New.
8349 (cmd_qtstmat, gdb_ust_thread): New.
8350 (gdb_ust_init): New.
8351 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8352 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8353 (ST_REGENTRY): New.
8354 (x86_64_st_collect_regmap): New.
8355 (X86_64_NUM_ST_COLLECT_GREGS): New.
8356 (AMD64_RIP_REGNUM): New.
8357 (supply_static_tracepoint_registers): New.
8358 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8359 (ST_REGENTRY): New.
8360 (i386_st_collect_regmap): New.
8361 (i386_NUM_ST_COLLECT_GREGS): New.
8362 (supply_static_tracepoint_registers): New.
8363 * server.c (handle_query): Handle qXfer:statictrace:read.
8364 <qSupported>: Report support for StaticTracepoints, and
8365 qXfer:statictrace:read features.
8366 * server.h (traceframe_read_sdata)
8367 (supply_static_tracepoint_registers): Declare.
8368 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8369 (unpack_varlen_hex): Include in IPA build.
8370 * Makefile.in (ustlibs, ustinc): New.
8371 (IPA_OBJS): Add remote-utils-ipa.o.
8372 ($(IPA_LIB)): Link -ldl and -lpthread.
8373 (UST_CFLAGS): New.
8374 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8375 * config.in, configure: Regenerate.
8376
9e4344e5
PA
83772010-06-20 Ian Lance Taylor <iant@google.com>
8378 Pedro Alves <pedro@codesourcery.com>
8379
8380 * linux-x86-low.c (always_true): Delete.
8381 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8382 trying to fool the compiler with always_true.
8383
c6beb2cb
PA
83842010-06-20 Pedro Alves <pedro@codesourcery.com>
8385
8386 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8387 conditions in gdbserver.
8388
d2ed6730
UW
83892010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8390
8391 * spu-low.c (spu_read_memory): Wrap around local store limit.
8392 (spu_write_memory): Likewise.
8393
4e29fb54
PA
83942010-06-15 Pedro Alves <pedro@codesourcery.com>
8395
8396 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8397 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8398 LONGEST uses.
8399 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8400 uses.
8401 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8402 uses with LONGEST uses.
8403
6a271cae
PA
84042010-06-14 Stan Shebs <stan@codesourcery.com>
8405 Pedro Alves <pedro@codesourcery.com>
8406
8407 Bytecode compiler.
8408
8409 * linux-x86-low.c: Include limits.h.
8410 (add_insns): New.
8411 (always_true): New.
8412 (EMIT_ASM): New.
8413 (EMIT_ASM32): New.
8414 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8415 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8416 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8417 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8418 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8419 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8420 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8421 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8422 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8423 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8424 (amd64_emit_void_call_2): New.
8425 (amd64_emit_ops): New.
8426 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8427 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8428 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8429 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8430 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8431 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8432 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8433 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8434 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8435 (i386_emit_stack_adjust, i386_emit_int_call_1)
8436 (i386_emit_void_call_2): New.
8437 (i386_emit_ops): New.
8438 (x86_emit_ops): New.
8439 (the_low_target): Install x86_emit_ops.
8440 * server.h (struct emit_ops): New.
8441 (get_raw_reg_func_addr): Declare.
8442 (current_insn_ptr, emit_error): Declare.
8443 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8444 (set_trace_state_variable_value): New defines.
8445 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8446 addr_get_trace_state_variable_value and
8447 addr_set_trace_state_variable_value.
8448 (symbol_list): New fields for get_raw_reg,
8449 get_trace_state_variable_value and set_trace_state_variable_value.
8450 (condfn): New typedef.
8451 (struct tracepoint): New field `compiled_cond'.
8452 (do_action_at_tracepoint): Clear compiled_cond.
8453 (get_trace_state_variable_value, set_trace_state_variable_value):
8454 Export in the IPA.
8455 (condition_true_at_tracepoint): If there's a compiled condition,
8456 run that.
8457 (current_insn_ptr, emit_error): New globals.
8458 (struct bytecode_address): New.
8459 (get_raw_reg_func_addr): New.
8460 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8461 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8462 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8463 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8464 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8465 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8466 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8467 (compile_tracepoint_condition, compile_bytecodes): New.
8468 * target.h (emit_ops): Forward declare.
8469 (struct target_ops): New field emit_ops.
8470 (target_emit_ops): New.
8471 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8472 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8473 * linux-low.c (linux_emit_ops): New.
8474 (linux_target_ops): Install it.
8475 * linux-low.h (struct linux_target_ops): New field emit_ops.
8476
92b72907
UW
84772010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8478
8479 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8480 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8481
fa593d66
PA
84822010-06-01 Pedro Alves <pedro@codesourcery.com>
8483 Stan Shebs <stan@codesourcery.com>
8484
8485 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8486 (all): Depend on $(extra_libraries).
8487 (install-only): Install the IPA.
8488 (IPA_OBJS, IPA_LIB): New.
8489 (clean): Remove the IPA lib.
8490 (IPAGENT_CFLAGS): New.
8491 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8492 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8493 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8494 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8495 * configure.ac: Check for atomic builtins support in the compiler.
8496 (IPA_DEPFILES, extra_libraries): Define.
8497 * configure.srv (ipa_obj): Add description.
8498 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8499 (i[34567]86-*-linux*): Set ipa_obj.
8500 (x86_64-*-linux*): Set ipa_obj.
8501 * linux-low.c (stabilizing_threads): New.
8502 (supports_fast_tracepoints): New.
8503 (linux_detach): Stabilize threads before detaching.
8504 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8505 the lwp is either not stabilizing, or is moving out of a jump pad.
8506 (linux_fast_tracepoint_collecting): New.
8507 (maybe_move_out_of_jump_pad): New.
8508 (enqueue_one_deferred_signal): New.
8509 (dequeue_one_deferred_signal): New.
8510 (linux_wait_for_event_1): If moving out of a jump pad, defer
8511 pending signals to later.
8512 (linux_stabilize_threads): New.
8513 (linux_wait_1): Check if threads need moving out of jump pads, and
8514 do it if so.
8515 (stuck_in_jump_pad_callback): New.
8516 (move_out_of_jump_pad_callback): New.
8517 (lwp_running): New.
8518 (linux_resume_one_lwp): Handle moving out of jump pads.
8519 (linux_set_resume_request): Dequeue deferred signals.
8520 (need_step_over_p): Also step over fast tracepoint jumps.
8521 (start_step_over): Also uninsert fast tracepoint jumps.
8522 (finish_step_over): Also reinsert fast tracepoint jumps.
8523 (linux_install_fast_tracepoint_jump): New.
8524 (linux_target_ops): Install linux_stabilize_threads and
8525 linux_install_fast_tracepoint_jump_pad.
8526 * linux-low.h (linux_target_ops) <get_thread_area,
8527 install_fast_tracepoint_jump_pad>: New fields.
8528 (struct lwp_info) <collecting_fast_tracepoint,
8529 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8530 (linux_get_thread_area): Declare.
8531 * linux-x86-low.c (jump_insn): New.
8532 (x86_get_thread_area): New.
8533 (append_insns): New.
8534 (push_opcode): New.
8535 (amd64_install_fast_tracepoint_jump_pad): New.
8536 (i386_install_fast_tracepoint_jump_pad): New.
8537 (x86_install_fast_tracepoint_jump_pad): New.
8538 (the_low_target): Install x86_get_thread_area and
8539 x86_install_fast_tracepoint_jump_pad.
8540 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8541 (struct fast_tracepoint_jump): New.
8542 (fast_tracepoint_jump_insn): New.
8543 (fast_tracepoint_jump_shadow): New.
8544 (find_fast_tracepoint_jump_at): New.
8545 (fast_tracepoint_jump_here): New.
8546 (delete_fast_tracepoint_jump): New.
8547 (set_fast_tracepoint_jump): New.
8548 (uninsert_fast_tracepoint_jumps_at): New.
8549 (reinsert_fast_tracepoint_jumps_at): New.
8550 (set_breakpoint_at): Use write_inferior_memory.
8551 (uninsert_raw_breakpoint): Use write_inferior_memory.
8552 (check_mem_read): Mask out fast tracepoint jumps.
8553 (check_mem_write): Mask out fast tracepoint jumps.
8554 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8555 (set_fast_tracepoint_jump): Declare.
8556 (delete_fast_tracepoint_jump)
8557 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8558 (reinsert_fast_tracepoint_jumps_at): Declare.
8559 * regcache.c: Don't compile many functions when building the
8560 in-process agent library.
8561 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8562 the register buffer in the heap.
8563 (free_register_cache): If the register buffer isn't owned by the
8564 regcache, don't free it.
8565 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8566 pre-existing register caches.
8567 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8568 type.
8569 (convert_ascii_to_int): : Constify `from' parameter type.
8570 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8571 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8572 the needed buffer in-place.
8573 (relocate_instruction): New.
8574 * server.c (handle_query) <qSymbols>: If the target supports
8575 tracepoints, give it a chance of looking up symbols. Report
8576 support for fast tracepoints.
8577 (handle_status): Stabilize threads.
8578 (process_serial_event): Adjust.
8579 * server.h (struct fast_tracepoint_jump): Forward declare.
8580 (struct process_info) <fast_tracepoint_jumps>: New field.
8581 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8582 (decode_X_packet, decode_M_packet): Adjust.
8583 (relocate_instruction): Declare.
8584 (in_process_agent_loaded): Declare.
8585 (tracepoint_look_up_symbols): Declare.
8586 (struct fast_tpoint_collect_status): Declare.
8587 (fast_tracepoint_collecting): Declare.
8588 (force_unlock_trace_buffer): Declare.
8589 (handle_tracepoint_bkpts): Declare.
8590 (initialize_low_tracepoint)
8591 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8592 * target.h (struct target_ops) <stabilize_threads,
8593 install_fast_tracepoint_jump_pad>: New fields.
8594 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8595 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8596 [HAVE_STDINT_H]: Include stdint.h.
8597 (trace_debug_1): Rename to ...
8598 (trace_vdebug): ... this.
8599 (trace_debug): Rename to ...
8600 (trace_debug_1): ... this. Add `level' parameter.
8601 (trace_debug): New.
8602 (ATTR_USED, ATTR_NOINLINE): New.
8603 (IP_AGENT_EXPORT): New.
8604 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8605 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8606 (about_to_request_buffer_space, trace_buffer_is_full)
8607 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8608 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8609 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8610 (traceframe_write_count, traceframes_created)
8611 (trace_state_variables)
8612 New renaming defines.
8613 (struct ipa_sym_addresses): New.
8614 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8615 (symbol_list): New.
8616 (ipa_sym_addrs): New.
8617 (all_tracepoint_symbols_looked_up): New.
8618 (in_process_agent_loaded): New.
8619 (write_e_ipa_not_loaded): New.
8620 (maybe_write_ipa_not_loaded): New.
8621 (tracepoint_look_up_symbols): New.
8622 (debug_threads) [IN_PROCESS_AGENT]: New.
8623 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8624 (UNKNOWN_SIDE_EFFECTS): New.
8625 (stop_tracing): New.
8626 (flush_trace_buffer): New.
8627 (stop_tracing_bkpt): New.
8628 (flush_trace_buffer_bkpt): New.
8629 (read_inferior_integer): New.
8630 (read_inferior_uinteger): New.
8631 (read_inferior_data_pointer): New.
8632 (write_inferior_data_pointer): New.
8633 (write_inferior_integer): New.
8634 (write_inferior_uinteger): New.
8635 (struct collect_static_trace_data_action): Delete.
8636 (enum tracepoint_type): New.
8637 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8638 <actions_str, step_actions, step_actions_str>: Only include in
8639 GDBserver.
fa593d66
PA
8640 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8641 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8642 (tracepoints): Use IP_AGENT_EXPORT.
8643 (last_tracepoint): Don't include in the IPA.
8644 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8645 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8646 (alloced_trace_state_variables): New.
8647 (trace_state_variables): Use IP_AGENT_EXPORT.
8648 (traceframe_t): Delete unused variable.
8649 (circular_trace_buffer): Don't include in the IPA.
8650 (trace_buffer_start): Delete.
8651 (struct trace_buffer_control): New.
8652 (trace_buffer_free): Delete.
8653 (struct ipa_trace_buffer_control): New.
8654 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8655 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8656 New.
8657 (trace_buffer_ctrl): New.
8658 (TRACE_BUFFER_CTRL_CURR): New.
8659 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8660 Reimplement as macros.
8661 (trace_buffer_wrap): Delete.
8662 (traceframe_write_count, traceframe_read_count)
8663 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8664 (struct tracepoint_hit_ctx) <type>: New field.
8665 (struct fast_tracepoint_ctx): New.
8666 (memory_barrier): New.
8667 (cmpxchg): New.
8668 (record_tracepoint_error): Update atomically in the IPA.
8669 (clear_inferior_trace_buffer): New.
8670 (about_to_request_buffer_space): New.
8671 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8672 updating the same buffer.
8673 (add_tracepoint): Default the tracepoint's type to trap
8674 tracepoint, and orig_size to -1.
8675 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8676 internal variables.
8677 (create_trace_state_variable): New parameter `gdb'. Handle it.
8678 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8679 (cmd_qtdp): Handle fast tracepoints.
8680 (cmd_qtdv): Adjust.
8681 (max_jump_pad_size): New.
8682 (gdb_jump_pad_head): New.
8683 (get_jump_space_head): New.
8684 (claim_jump_space): New.
8685 (sort_tracepoints): New.
8686 (MAX_JUMP_SIZE): New.
8687 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8688 IPA.
8689 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8690 support. Upload fast traceframes, and delete internal IPA
8691 breakpoints.
8692 (stop_tracing_handler): New.
8693 (flush_trace_buffer_handler): New.
8694 (cmd_qtstop): Upload fast tracepoints.
8695 (response_tracepoint): Handle fast tracepoints.
8696 (tracepoint_finished_step): Upload fast traceframes. Set the
8697 tracepoint hit context's tracepoint type.
8698 (handle_tracepoint_bkpts): New.
8699 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8700 type. Add comment about fast tracepoints.
8701 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8702 non-existing action_str field.
8703 (get_context_regcache): Handle fast tracepoints.
8704 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8705 to the regcache.
8706 (fast_tracepoint_from_jump_pad_address): New.
8707 (fast_tracepoint_from_ipa_tpoint_address): New.
8708 (collecting_t): New.
8709 (force_unlock_trace_buffer): New.
8710 (fast_tracepoint_collecting): New.
8711 (collecting): New.
8712 (gdb_collect): New.
8713 (write_inferior_data_ptr): New.
8714 (target_tp_heap): New.
8715 (target_malloc): New.
8716 (download_agent_expr): New.
8717 (UALIGN): New.
8718 (download_tracepoints): New.
8719 (download_trace_state_variables): New.
8720 (upload_fast_traceframes): New.
8721 (IPA_FIRST_TRACEFRAME): New.
8722 (IPA_NEXT_TRACEFRAME_1): New.
8723 (IPA_NEXT_TRACEFRAME): New.
8724 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8725 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8726 (gdb_jump_pad_buffer_end): New.
8727 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8728 (initialize_tracepoint): Adjust.
8729 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8730 buffer. Initialize the low module.
8731 * utils.c (PREFIX, TOOLNAME): New.
8732 (malloc_failure): Use PREFIX.
8733 (error): In the IPA, an error causes an exit.
8734 (fatal, warning): Use PREFIX.
8735 (internal_error): Use TOOLNAME.
8736 (NUMCELLS): Increase to 10.
8737 * configure, config.in: Regenerate.
8738
d149dd1d
PA
87392010-06-01 Pedro Alves <pedro@codesourcery.com>
8740
8741 * server.c (handle_query) <qSupported>: Do two passes over the
8742 qSupported string to avoid nesting strtok.
8743
f6528abd
JK
87442010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8745
8746 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8747 (CDEPS): New.
8748 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8749 -Wl,--dynamic-list.
8750 * configure: Regenerate.
8751 * proc-service.list: New.
8752
ca2a87a0
JK
87532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8754
8755 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8756 New comment.
8757
363a6e9f
OS
87582010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8759
8760 * gdbreplay.c (remote_open): Check error return from socket() call by
8761 its equality to -1 not by it being negative.
8762 * remote-utils.c (remote_open): Likewise.
8763
d23b6cb1
PA
87642010-05-23 Pedro Alves <pedro@codesourcery.com>
8765
8766 * config.h: Regenerate.
8767
28d3cf85
MK
87682010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8769
8770 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8771 doesn't provide PTRACE_GET_THREAD_AREA.
8772
fea36a59
MK
87732010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8774
8775 * linux-m68k-low.c: Include <asm/ptrace.h>
8776 (ps_get_thread_area): Implement.
8777
24b066ba
DE
87782010-05-03 Doug Evans <dje@google.com>
8779
8780 * event-loop.c (struct callback_event): New struct.
8781 (callback_list): New global.
8782 (append_callback_event, delete_callback_event): New functions.
8783 (process_callback): New function.
8784 (start_event_loop): Call it.
8785 * remote-utils.c (NOT_SCHEDULED): Define.
8786 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8787 moved out of readchar.
8788 (readchar): Rewrite. Call reschedule before returning.
8789 (reset_readchar): New function.
8790 (remote_close): Call it.
8791 (process_remaining, reschedule): New functions.
8792 * server.h (callback_handler_func): New typedef.
8793 (append_callback_event, delete_callback_event): Declare.
8794
9836d6ea
PA
87952010-05-03 Pedro Alves <pedro@codesourcery.com>
8796
8797 * proc-service.c (ps_pglobal_lookup): Use
8798 thread_db_look_up_one_symbol.
8799 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8800 parameter. Use it instead of all_symbols_looked_up.
8801 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8802 field.
8803 (all_symbols_looked_up): Don't declare.
8804 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8805 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8806 field.
8807 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8808 Set all_symbols_looked_up here.
8809 (thread_db_look_up_one_symbol): New.
8810 (thread_db_get_tls_address): Adjust.
8811 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8812 thread_db object on the heap, and tentatively set it in the
8813 process structure.
8814 (thread_db_init): Don't set all_symbols_looked_up here.
8815 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8816
7984d532
PA
88172010-05-03 Pedro Alves <pedro@codesourcery.com>
8818
8819 * linux-low.c (linux_kill, linux_detach): Adjust.
8820 (status_pending_p_callback): Remove redundant statement. Check
8821 for !TARGET_WAITIKIND_IGNORE, instead of
8822 TARGET_WAITKIND_STOPPED.
8823 (handle_tracepoints): Make sure LWP is locked. Adjust.
8824 (linux_wait_for_event_1): Adjust.
8825 (linux_cancel_breakpoints): New.
8826 (unsuspend_one_lwp): New.
8827 (unsuspend_all_lwps): New.
8828 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8829 (send_sigstop_callback): Change return type to int, add new
8830 `except' parameter and handle it.
8831 (suspend_and_send_sigstop_callback): New.
8832 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8833 pass them down. If SUSPEND, also increment the lwp's suspend
8834 count.
8835 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8836 (need_step_over_p): Don't consider suspended LWPs.
8837 (start_step_over): Adjust.
8838 (proceed_one_lwp): Change return type to int, add new `except'
8839 parameter and handle it.
8840 (unsuspend_and_proceed_one_lwp): New.
8841 (proceed_all_lwps): Use find_inferior instead of
8842 for_each_inferior.
8843 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8844 also decrement the suspend count of LWPs. Pass `except' down,
8845 instead of hacking its suspend count.
8846 (linux_pause_all): Add `freeze' parameter. Adjust.
8847 (linux_unpause_all): New.
8848 (linux_target_ops): Install linux_unpause_all.
8849 * server.c (handle_status): Adjust.
8850 * target.h (struct target_ops): New fields `unpause_all' and
8851 `cancel_breakpoints'. Add new parameter to `pause_all'.
8852 (pause_all): Add new `freeze' parameter.
8853 (unpause_all): New.
8854 (cancel_breakpoints): New.
8855 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8856 cancel breakpoints.
8857 (cmd_qtstart): Pause threads.
8858 (stop_tracing): Pause threads, and cancel breakpoints.
8859 * win32-low.c (win32_target_ops): Adjust.
8860
e471f25b
PA
88612010-05-03 Pedro Alves <pedro@codesourcery.com>
8862
8863 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8864 the inferior right away from here...
8865 (linux_wait_1): ... to here, and adjust to check the thread's
8866 last_resume_kind instead of the lwp's step or stop_expected flags.
8867
1915ef4f
PA
88682010-05-02 Pedro Alves <pedro@codesourcery.com>
8869
8870 * README: Use consistent `GDB' and `GDBserver' spellings.
8871
f9e39928
PA
88722010-05-02 Pedro Alves <pedro@codesourcery.com>
8873
8874 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8875 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8876 (linux_detach_one_lwp): Assume the lwp is stopped.
8877 (any_thread_of): Delete.
8878 (linux_detach): Stop all lwps here. Don't blindly delete all
8879 breakpoints.
8880 (delete_lwp_callback): New.
8881 (linux_mourn): Delete all lwps of the process that is gone.
8882 (linux_wait_1): Don't delete the last lwp of the process here.
8883 * mem-break.h (mark_breakpoints_out): Declare.
8884 * mem-break.c (mark_breakpoints_out): New.
8885 (free_all_breakpoints): Use it.
8886 * server.c (handle_target_event): If the process is gone, mark
8887 breakpoints out.
8888 * thread-db.c (struct thread_db) <create_bp>: New field.
8889 (thread_db_enable_reporting): Fix prototype. Store a thread event
8890 breakpoint reference in the thread_db struct.
8891 (thread_db_load_search): Clear the thread_db object.
8892 (try_thread_db_load_1): Ditto.
8893 (switch_to_process): New.
8894 (disable_thread_event_reporting): Use it.
8895 (remove_thread_event_breakpoints): New.
8896 (thread_db_detach, thread_db_mourn): Use it.
8897
1e7fc18c
PA
88982010-05-01 Pedro Alves <pedro@codesourcery.com>
8899
8900 * linux-low.c (linux_enable_event_reporting): New.
8901 (linux_wait_for_event_1, handle_extended_wait): Use it.
8902
02fc4de7
PA
89032010-04-30 Pedro Alves <pedro@codesourcery.com>
8904
8905 * linux-low.c (linux_kill_one_lwp, linux_kill)
8906 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8907 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8908 SIGSTOP even if the LWP is stopped.
8909 (send_sigstop_callback): New.
8910 (stop_all_lwps): Use send_sigstop_callback instead.
8911 (linux_resume_one_thread): Adjust.
8912 (proceed_one_lwp): Still proceed an LWP that the client has
8913 requested to stop, if we haven't reported it as stopped yet. Make
8914 sure that LWPs the client want stopped, have a pending SIGSTOP.
8915
bc3b5632
DE
89162010-04-26 Doug Evans <dje@google.com>
8917
ae1ada35
DE
8918 * server.c (handle_general_set): Make static.
8919
bc3b5632
DE
8920 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8921 Print received char after testing for error/eof instead of before.
8922 (input_interrupt): Tweak comment.
8923
65730243
DE
89242010-04-23 Doug Evans <dje@google.com>
8925
8926 * server.c (start_inferior): Print inferior argv if --debug.
8927
a8ae7dc0
AR
89282010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8929
8930 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8931 * nto-x86-low.c: Include server.h
8932
1c07cc19
PM
89332010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8934
8935 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8936 be consistent with other sources of this directory.
8937 (init_registers_amd64): Correct name of source file of this function
8938 in the comment.
8939
e0a61e09
PM
89402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8941
8942 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8943 64-bit executables.
8944
54709339
PM
89452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8946
8947 * win32-i386-low.c: Add 64-bit support.
8948 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8949 (init_registers_amd64): Declare.
8950 (mappings): Add 64-bit version of array.
8951 (init_windows_x86): New function.
8952 (the_low_target): Change init_arch field to init_windows_x86.
8953
e8f0053d
PM
89542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8955
8956 * win32-low.c: Adapt to support also 64-bit architecture.
8957 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8958 (get_image_name): Use SIZE_T type for local variable `done'.
8959 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8960 (toolhelp_get_dll_name): Idem.
8961 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8962 Use uintptr_t typecast to avoid warning.
8963 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8964 (handle_exception): Use phex_nz to avoid warning.
8965 (win32_wait): Remove unused local variable `process'.
8966
c481e77e
PM
89672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8968
8969 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8970 `amd64-avx.o'.
8971
12ea4b69
PM
89722010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8973
8974 * configure.ac: Use `ws2_32' library for srv_mingw.
8975 * configure: Regenerate.
8976 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8977 * remote-utils.c: Likewise.
8978
f6d1620c
L
89792010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8980
8981 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8982 if __x86_64__ is defined.
8983
8e642873
PM
89842010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8985
8986 * configure: Regenerate.
8987
711e434b
PM
89882010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8989
8990 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8991 * target.h (target_ops): New get_tib_address field.
8992 * win32-low.h (win32_thread_info): Add thread_local_base field.
8993 * win32-low.c (child_add_thread): Add tlb argument.
8994 Set thread_local_base field to TLB.
8995 (get_child_debug_event): Adapt to child_add_thread change.
8996 (win32_get_tib_address): New function.
8997 (win32_target_ops): Set get_tib_address field to
8998 win32_get_tib_address.
8999 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9000
505106cd
PA
90012010-04-12 Pedro Alves <pedro@codesourcery.com>
9002
505106cd
PA
9003 * linux-low.c (linux_mourn): Also remove the process.
9004 * server.c (handle_target_event): Don't remove the process here.
9005 * nto-low.c (nto_mourn): New.
9006 (nto_target_ops): Install it.
9007 * spu-low.c (spu_mourn): New.
9008 (spu_target_ops): Install it.
9009 * win32-low.c (win32_mourn): New.
9010 (win32_target_ops): Install it.
9011
e8470a06
PA
90122010-04-12 Pedro Alves <pedro@codesourcery.com>
9013
9014 * server.h (buffer_xml_printf): Remove redundant `;'.
9015
45ba0d02
PA
90162010-04-12 Pedro Alves <pedro@codesourcery.com>
9017
9018 * regcache.c (set_register_cache): Invalidate regcaches before
9019 changing the register cache layout.
9020 (regcache_invalidate_one): Allow a NULL regcache.
9021 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9022 regcaches before changing the register cache layout or the target
9023 regsets.
9024
59e04013
L
90252010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9026
9027 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9028 variable warning on Linux/x86-64.
9029
8336d594
PA
90302010-04-11 Pedro Alves <pedro@codesourcery.com>
9031
9032 GDBserver disconnected tracing support.
9033
9034 * linux-low.c (linux_remove_process): Delete.
9035 (add_lwp): Don't set last_resume_kind here.
9036 (linux_kill): Use `mourn'.
9037 (linux_detach): Use `thread_db_detach', and `mourn'.
9038 (linux_mourn): New.
9039 (linux_attach_lwp_1): Adjust comment.
9040 (linux_attach): last_resume_kind moved the thread_info; adjust.
9041 (status_pending_p_callback): Adjust.
9042 (linux_wait_for_event_1): Adjust.
9043 (count_events_callback, select_singlestep_lwp_callback)
9044 (select_event_lwp_callback, cancel_breakpoints_callback)
9045 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9046 (proceed_one_lwp): Adjust.
9047 (linux_async): Add debug output.
9048 (linux_thread_stopped): New.
9049 (linux_pause_all): New.
9050 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9051 linux_pause_all.
9052 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9053 (thread_db_free): Delete declaration.
9054 (thread_db_detach, thread_db_mourn): Declare.
9055 * thread-db.c (thread_db_init): Use thread_db_mourn.
9056 (thread_db_free): Delete, split in two.
9057 (disable_thread_event_reporting): New.
9058 (thread_db_detach): New.
9059 (thread_db_mourn): New.
9060
9061 * server.h (struct thread_info) <last_resume_kind>: New field.
9062 <attached>: Add comment.
9063 <gdb_detached>: New field.
9064 (handler_func): Change return type to int.
9065 (handle_serial_event, handle_target_event): Ditto.
9066 (gdb_connected): Declare.
9067 (tracing): Delete.
9068 (disconnected_tracing): Declare.
9069 (stop_tracing): Declare.
9070
9071 * server.c (handle_query) <qSupported>: Report support for
9072 disconnected tracing.
9073 (queue_stop_reply_callback): Account for running threads.
9074 (gdb_wants_thread_stopped): New.
9075 (gdb_wants_all_threads_stopped): New.
9076 (gdb_reattached_process): New.
9077 (handle_status): Clear the `gdb_detached' flag of all processes.
9078 In all-stop, stop all threads.
9079 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9080 (process_serial_event): If the remote connection breaks, or if an
9081 exit was forced with "monitor exit", force an event loop exit.
9082 Handle disconnected tracing on detach.
9083 (handle_serial_event): Adjust.
9084 (handle_target_event): If GDB isn't connected, forward events back
9085 to the inferior, unless the last process exited, in which case,
9086 exit gdbserver. Adjust interface.
9087
9088 * remote-utils.c (remote_open): Don't block in accept. Instead
9089 register an event loop source on the listen socket file
9090 descriptor. Refactor bits into ...
9091 (listen_desc): ... this new global.
9092 (gdb_connected): ... this new function.
9093 (enable_async_notification): ... this new function.
9094 (handle_accept_event): ... this new function.
9095 (remote_close): Clear remote_desc.
9096
9097 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9098
9099 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9100 New fields.
9101 (mourn_inferior): Define.
9102 (target_process_qsupported): Avoid the dangling else problem.
9103 (thread_stopped): Define.
9104 (pause_all): Define.
9105 (target_waitstatus_to_string): Declare.
9106 * target.c (target_waitstatus_to_string): New.
9107
9108 * tracepoint.c (tracing): Make extern.
9109 (disconnected_tracing): New.
9110 (stop_tracing): Make extern. Handle tracing stops due to GDB
9111 disconnecting.
9112 (cmd_qtdisconnected): New.
9113 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9114 (handle_tracepoint_general_set): Handle QTDisconnected.
9115
9116 * event-loop.c (event_handler_func): Change return type to int.
9117 (process_event): Bail out if the event handler wants the event
9118 loop to stop.
9119 (handle_file_event): Ditto.
9120 (start_event_loop): Bail out if the event handler wants the event
9121 loop to stop.
9122
9123 * nto-low.c (nto_target_ops): Adjust.
9124 * spu-low.c (spu_wait): Don't remove the process here.
9125 (spu_target_ops): Adjust.
9126 * win32-low.c (win32_wait): Don't remove the process here.
9127 (win32_target_ops): Adjust.
9128
5d267c4c
PA
91292010-04-11 Pedro Alves <pedro@codesourcery.com>
9130
9131 * regcache.c (realloc_register_cache): Invalidate inferior's
9132 regcache before recreating it.
9133
623ccd72
PA
91342010-04-09 Pedro Alves <pedro@codesourcery.com>
9135
9136 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9137
219f2f23
PA
91382010-04-09 Stan Shebs <stan@codesourcery.com>
9139 Pedro Alves <pedro@codesourcery.com>
9140
9141 * server.h (LONGEST): New.
9142 (struct thread_info) <while_stepping>: New field.
9143 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9144 Declare.
9145 (initialize_tracepoint, handle_tracepoint_general_set)
9146 (handle_tracepoint_query, tracepoint_finished_step)
9147 (tracepoint_was_hit, release_while_stepping_state_list):
9148 (current_traceframe): Declare.
9149 * server.c (handle_general_set): Handle tracepoint packets.
9150 (read_memory): New.
9151 (write_memory): New.
9152 (handle_search_memory_1): Use read_memory.
9153 (handle_query): Report support for conditional tracepoints, trace
9154 state variables, and tracepoint sources. Handle tracepoint
9155 queries.
9156 (main): Initialize the tracepoints module.
9157 (process_serial_event): Handle traceframe reads/writes.
9158
9159 * linux-low.c (handle_tracepoints): New.
9160 (linux_wait_1): Call it.
9161 (linux_resume_one_lwp): Handle while-stepping.
9162 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9163 (linux_target_ops): Install them.
9164 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9165 New field.
9166 * linux-x86-low.c (x86_supports_tracepoints): New.
9167 (the_low_target). Install it.
9168
9169 * mem-break.h (delete_breakpoint): Declare.
9170 * mem-break.c (delete_breakpoint): Make external.
9171
9172 * target.h (struct target_ops): Add `supports_tracepoints',
9173 `read_pc', and `write_pc' fields.
9174 (target_supports_tracepoints): Define.
9175 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9176 (phex_nz): New.
9177
9178 * regcache.h (struct regcache) <registers_owned>: New field.
9179 (init_register_cache, regcache_cpy): Declare.
9180 (regcache_read_pc, regcache_write_pc): Declare.
9181 (register_cache_size): Declare.
9182 (supply_regblock): Declare.
9183 * regcache.c (init_register_cache): New.
9184 (new_register_cache): Use it.
9185 (regcache_cpy): New.
9186 (register_cache_size): New.
9187 (supply_regblock): New.
9188 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9189
219f2f23
PA
9190 * tracepoint.c: New.
9191
9192 * Makefile.in (OBS): Add tracepoint.o.
9193 (tracepoint.o): New rule.
9194
3a13a53b
L
91952010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9196
9197 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9198 (i386-mmx.o): New.
9199 (i386-mmx.c): Likewise.
9200 (i386-mmx-linux.o): Likewise.
9201 (i386-mmx-linux.c): Likewise.
9202
9203 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9204 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9205 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9206 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9207
9208 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9209 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9210 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9211
1570b33e
L
92122010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9213
9214 * Makefile.in (clean): Updated.
9215 (i386-avx.o): New.
9216 (i386-avx.c): Likewise.
9217 (i386-avx-linux.o): Likewise.
9218 (i386-avx-linux.c): Likewise.
9219 (amd64-avx.o): Likewise.
9220 (amd64-avx.c): Likewise.
9221 (amd64-avx-linux.o): Likewise.
9222 (amd64-avx-linux.c): Likewise.
9223
9224 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9225 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9226 (srv_amd64_regobj): Add amd64-avx.o.
9227 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9228 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9229 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9230 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9231 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9232 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9233 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9234
9235 * i387-fp.c: Include "i386-xstate.h".
9236 (i387_xsave): New.
9237 (i387_cache_to_xsave): Likewise.
9238 (i387_xsave_to_cache): Likewise.
9239 (x86_xcr0): Likewise.
9240
9241 * i387-fp.h (i387_cache_to_xsave): Likewise.
9242 (i387_xsave_to_cache): Likewise.
9243 (x86_xcr0): Likewise.
9244
9245 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9246 * linux-crisv32-low.c (target_regsets): Likewise.
9247 * linux-m68k-low.c (target_regsets): Likewise.
9248 * linux-mips-low.c (target_regsets): Likewise.
9249 * linux-ppc-low.c (target_regsets): Likewise.
9250 * linux-s390-low.c (target_regsets): Likewise.
9251 * linux-sh-low.c (target_regsets): Likewise.
9252 * linux-sparc-low.c (target_regsets): Likewise.
9253 * linux-xtensa-low.c (target_regsets): Likewise.
9254
9255 * linux-low.c: Include <sys/uio.h>.
9256 (regsets_fetch_inferior_registers): Support nt_type.
9257 (regsets_store_inferior_registers): Likewise.
9258 (linux_process_qsupported): New.
9259 (linux_target_ops): Add linux_process_qsupported.
9260
9261 * linux-low.h (regset_info): Add nt_type.
9262 (linux_target_ops): Add process_qsupported.
9263
9264 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9265 and <sys/uio.h>.
9266 (init_registers_i386_avx_linux): New.
9267 (init_registers_amd64_avx_linux): Likewise.
9268 (xmltarget_i386_linux_no_xml): Likewise.
9269 (xmltarget_amd64_linux_no_xml): Likewise.
9270 (PTRACE_GETREGSET): Likewise.
9271 (PTRACE_SETREGSET): Likewise.
9272 (x86_fill_xstateregset): Likewise.
9273 (x86_store_xstateregset): Likewise.
9274 (use_xml): Likewise.
9275 (x86_linux_update_xmltarget): Likewise.
9276 (x86_linux_process_qsupported): Likewise.
9277 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9278 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9279 init_registers_i386_linux here. Call
9280 x86_linux_update_xmltarget.
9281 (the_low_target): Add x86_linux_process_qsupported.
9282
9283 * server.c (handle_query): Call target_process_qsupported.
9284
9285 * target.h (target_ops): Add process_qsupported.
9286 (target_process_qsupported): New.
9287
fc7238bb
PA
92882010-04-03 Pedro Alves <pedro@codesourcery.com>
9289
9290 * inferiors.c (add_thread): Set last_status kind to
9291 TARGET_WAITKIND_IGNORE.
9292 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9293 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9294 (linux_wait_1): Move `thread' local definition to block that uses
9295 it. Don't NULL initialize `event_child'.
9296 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9297 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9298 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9299
bdabb078
PA
93002010-04-01 Pedro Alves <pedro@codesourcery.com>
9301
9302 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9303 an extended waitstatus, or by a watchpoint.
9304 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9305 thread was stepping or has been stopped by a watchpoint.
9306
d3bbe7a0
PA
93072010-04-01 Pedro Alves <pedro@codesourcery.com>
9308
9309 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9310 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9311 of another, then delete the previous, and validate all
9312 breakpoints.
9313 (validate_inserted_breakpoint): New.
9314 (delete_disabled_breakpoints): New.
9315 (validate_breakpoints): New.
9316 (check_mem_read): Validate breakpoints before trusting their
9317 shadow. Delete disabled breakpoints.
9318 (check_mem_write): Validate breakpoints before trusting they
9319 should be inserted. Delete disabled breakpoints.
9320 * mem-break.h (validate_breakpoints):
9321 * server.c (handle_query): Validate breakpoints when we see a
9322 qSymbol query.
9323
8b07ae33
PA
93242010-04-01 Pedro Alves <pedro@codesourcery.com>
9325
9326 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9327 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9328 if we could tell there's a GDB breakpoint at stop_pc.
9329 (need_step_over_p): Don't do a step over if we find a GDB
9330 breakpoint at the resume PC.
9331
9332 * mem-break.c (struct raw_breakpoint): New.
9333 (enum bkpt_type): New type `gdb_breakpoint'.
9334 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9335 fields. New field `raw'.
9336 (find_raw_breakpoint_at): New.
9337 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9338 breakpoint instead.
9339 (set_breakpoint_at): Adjust.
9340 (delete_raw_breakpoint): New.
9341 (release_breakpoint): New.
9342 (delete_breakpoint): Rename to...
9343 (delete_breakpoint_1): ... this. Add proc parameter. Use
9344 release_breakpoint. Return ENOENT.
9345 (delete_breakpoint): Reimplement.
9346 (find_breakpoint_at): Delete.
9347 (find_gdb_breakpoint_at): New.
9348 (delete_breakpoint_at): Delete.
9349 (set_gdb_breakpoint_at): New.
9350 (delete_gdb_breakpoint_at): New.
9351 (gdb_breakpoint_here): New.
9352 (set_reinsert_breakpoint): Use release_breakpoint.
9353 (uninsert_breakpoint): Rename to ...
9354 (uninsert_raw_breakpoint): ... this.
9355 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9356 (reinsert_raw_breakpoint): Change parameter type to
9357 raw_breakpoint.
9358 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9359 instead.
9360 (check_breakpoints): Adjust. Use release_breakpoint.
9361 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9362 (breakpoint_inserted_here): Ditto.
9363 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9364 Don't trust the breakpoint's shadow if it is not inserted.
9365 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9366 (delete_all_breakpoints): Adjust.
9367 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9368 use delete_breakpoint_1.
9369
9370 * mem-break.h (breakpoints_supported): Delete declaration.
9371 (set_gdb_breakpoint_at): Declare.
9372 (gdb_breakpoint_here): Declare.
9373 (delete_breakpoint_at): Delete.
9374 (delete_gdb_breakpoint_at): Declare.
9375
9376 * server.h (struct raw_breakpoint): Forward declare.
9377 (struct process_info): New field `raw_breakpoints'.
9378
9379 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9380 breakpoints.
9381
6bf5e0ba
PA
93822010-03-24 Pedro Alves <pedro@codesourcery.com>
9383
9384 * linux-low.c (status_pending_p_callback): Fix comment.
9385 (linux_wait_for_event_1): Move most of the internal breakpoint
9386 handling from here...
9387 (linux_wait_1): ... to here.
9388 (count_events_callback): New.
9389 (select_singlestep_lwp_callback): New.
9390 (select_event_lwp_callback): New.
9391 (cancel_breakpoints_callback): New.
9392 (select_event_lwp): New.
9393 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9394 priority to all LWPs that have had events that should be reported
9395 to the client. Cancel breakpoints when about to reporting the
9396 event to the client, not while stopping lwps. No longer cancel
9397 finished single-steps here.
9398 (cancel_finished_single_step): Delete.
9399 (cancel_finished_single_steps): Delete.
9400
414a389f
PA
94012010-03-24 Pedro Alves <pedro@codesourcery.com>
9402
9403 * mem-break.c (enum bkpt_type): New.
9404 (struct breakpoint): New field `type'.
9405 (set_breakpoint_at): Change return type to struct breakpoint
9406 pointer. Set type to `other_breakpoint' by default.
9407 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9408 in the breakpoint list.
9409 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9410 (reinsert_breakpoint): Rename to ...
9411 (reinsert_raw_breakpoint): ... this.
9412 (reinsert_breakpoints_at): Adjust.
9413 * mem-break.h (struct breakpoint): Declare.
9414 (set_breakpoint_at): Change return type to struct breakpoint
9415 pointer.
9416
2280c721
PA
94172010-03-24 Pedro Alves <pedro@codesourcery.com>
9418
9419 * server.c (handle_query): Assign, not compare.
9420
d50171e4
PA
94212010-03-24 Pedro Alves <pedro@codesourcery.com>
9422
9423 Teach linux gdbserver to step-over-breakpoints.
9424
9425 * linux-low.c (can_hardware_single_step): New.
9426 (supports_breakpoints): New.
9427 (handle_extended_wait): If stopping threads, read the stop pc of
9428 the new cloned LWP.
9429 (get_pc): New.
9430 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9431 low target doesn't support retrieving the PC.
9432 (add_lwp): Set last_resume_kind to resume_continue.
9433 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9434 (linux_attach): Don't clear stop_expected. Set the lwp's
9435 last_resume_kind to resume_stop.
9436 (linux_detach_one_lwp): Don't check for removed breakpoints.
9437 (check_removed_breakpoint): Delete.
9438 (status_pending_p): Rename to ...
9439 (status_pending_p_callback): ... this. Don't check for removed
9440 breakpoints. Don't consider threads that are stopped from GDB's
9441 perspective.
9442 (linux_wait_for_lwp): Always read the stop_pc here.
9443 (cancel_breakpoint): New.
9444 (step_over_bkpt): New global.
9445 (linux_wait_for_event_1): Implement stepping over breakpoints.
9446 (gdb_wants_lwp_stopped): New.
9447 (gdb_wants_all_stopped): New.
9448 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9449 single-step traps here. Store the thread's last reported target
9450 wait status.
9451 (send_sigstop): Don't clear stop_expected. Always set it,
9452 instead.
9453 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9454 (cancel_finished_single_step): New.
9455 (cancel_finished_single_steps): New.
9456 (wait_for_sigstop): Don't cancel finished single-step traps here.
9457 (linux_resume_one_lwp): Don't check for removed breakpoints.
9458 Don't set `step' on non-hardware step archs.
9459 (linux_set_resume_request): Ignore resume_stop requests if already
9460 stopping or stopped. Set the lwp's last_resume_kind.
9461 (resume_status_pending_p): Don't check for removed breakpoints.
9462 (need_step_over_p): New.
9463 (start_step_over): New.
9464 (finish_step_over): New.
9465 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9466 requests. Clear the thread's last reported target waitstatus.
9467 Don't use the `suspended' flag. Don't consider pending breakpoints.
9468 (linux_resume): Start a step-over if necessary.
9469 (proceed_one_lwp): New.
9470 (proceed_all_lwps): New.
9471 (unstop_all_lwps): New.
9472 * linux-low.h (struct lwp_info): Rewrite comment for the
9473 `suspended' flag. Add the `stop_pc' field. Delete the
9474 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9475 Add `'last_resume_kind' and `need_step_over' fields.
9476 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9477 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9478 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9479 (set_raw_breakpoint_at): New.
9480 (set_breakpoint_at): Rewrite to use it.
9481 (reinsert_breakpoint_handler): Delete.
9482 (set_reinsert_breakpoint): New.
9483 (reinsert_breakpoint_by_bp): Delete.
9484 (delete_reinsert_breakpoints): New.
9485 (uninsert_breakpoint): Rewrite.
9486 (uninsert_breakpoints_at): New.
9487 (reinsert_breakpoint): Rewrite.
9488 (reinsert_breakpoints_at): New.
9489 (check_breakpoints): Rewrite.
9490 (breakpoint_here): New.
9491 (breakpoint_inserted_here): New.
9492 (check_mem_read): Adjust.
9493 * mem-break.h (breakpoints_supported, breakpoint_here)
9494 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9495 (reinsert_breakpoint_by_bp): Delete declaration.
9496 (delete_reinsert_breakpoints): Declare.
9497 (reinsert_breakpoint): Delete declaration.
9498 (reinsert_breakpoints_at): Declare.
9499 (uninsert_breakpoint): Delete declaration.
9500 (uninsert_breakpoints_at): Declare.
9501 (check_breakpoints): Adjust prototype.
9502 * server.h: Adjust include order.
9503 (struct thread_info): Declare here. Add a `last_status' field.
9504
30ba68cb
MS
95052010-03-23 Michael Snyder <msnyder@vmware.com>
9506
9507 * server.c (crc32): New function.
9508 (handle_query): Add handling for 'qCRC:' request.
9509
b9a881c2
PA
95102010-03-23 Pedro Alves <pedro@codesourcery.com>
9511
9512 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9513 lwp had been stopped by a watchpoint.
9514
e92d13d5
PA
95152010-03-16 Pedro Alves <pedro@codesourcery.com>
9516
9517 * server.h (internal_error): Declare.
9518 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9519 * utils.c (internal_error): New function.
9520
64daa791
AS
95212010-03-15 Andreas Schwab <schwab@redhat.com>
9522
9523 * configure.srv: Fix typo setting srv_regobj.
9524
f52cd8cd
PA
95252010-03-15 Pedro Alves <pedro@codesourcery.com>
9526
9527 * linux-low.c (fetch_register): Avoid passing a non string literal
9528 format to `error'.
9529 (usr_store_inferior_registers): Ditto.
9530
93ae6fdc
PA
95312010-03-14 Pedro Alves <pedro@codesourcery.com>
9532
9533 * linux-low.c (linux_write_memory): Bail out early if peeking
9534 memory failed.
9535
c3adc08c
PA
95362010-03-14 Pedro Alves <pedro@codesourcery.com>
9537
9538 * linux-low.h (struct lwp_info): New fields
9539 `stopped_by_watchpoint' and `stopped_data_address'.
9540 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9541 here, and cache them in the lwp object.
9542 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9543 directly.
9544 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9545 field.
9546 (linux_stopped_by_watchpoint): Rewrite.
9547 (linux_stopped_data_address): Rewrite.
9548
bce522a2
PA
95492010-03-06 Simo Melenius <simo.melenius@iki.fi>
9550
9551 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9552 switching the current inferior, not before.
9553
90884b2b
L
95542010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9555
9556 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9557 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9558 i386-linux.c and amd64-linux.c.
9559 (reg-i386.o): Removed.
9560 (reg-i386.c): Likewise.
9561 (reg-i386-linux.o): Likewise.
9562 (reg-i386-linux.c): Likewise.
9563 (reg-x86-64.o): Likewise.
9564 (reg-x86-64.c): Likewise.
9565 (reg-x86-64-linux.o): Likewise.
9566 (reg-x86-64-linux.c): Likewise.
9567 (i386.o): New.
9568 (i386.c): Likewise.
9569 (i386-linux.o): Likewise.
9570 (i386-linux.c): Likewise.
9571 (amd64.o): Likewise.
9572 (amd64.c): Likewise.
9573 (amd64-linux.o): Likewise.
9574 (amd64-linux.c): Likewise.
9575
9576 * configure.srv (srv_i386_regobj): New.
9577 (srv_i386_linux_regobj): Likewise.
9578 (srv_amd64_regobj): Likewise.
9579 (srv_amd64_linux_regobj): Likewise.
9580 (srv_i386_32bit_xmlfiles): Likewise.
9581 (srv_i386_64bit_xmlfiles): Likewise.
9582 (srv_i386_xmlfiles): Likewise.
9583 (srv_amd64_xmlfiles): Likewise.
9584 (srv_i386_linux_xmlfiles): Likewise.
9585 (srv_amd64_linux_xmlfiles): Likewise.
9586 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9587 srv_xmlfiles to $srv_i386_xmlfiles.
9588 (i[34567]86-*-mingw32ce*): Likewise.
9589 (i[34567]86-*-mingw*): Likewise.
9590 (i[34567]86-*-nto*): Likewise.
9591 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9592 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9593 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9594 (x86_64-*-linux*): Likewise.
9595
9596 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9597 (init_registers_amd64_linux): New.
9598 (x86_arch_setup): Replace init_registers_x86_64_linux with
9599 init_registers_amd64_linux.
9600
193f13e6
MK
96012010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9602
9603 * configure.ac: Check for libdl. If it is not available link against
9604 static libthread_db.
9605 * configure: Regenerate.
9606
85d721b8
PA
96072010-02-22 Pedro Alves <pedro@codesourcery.com>
9608
9609 PR9605
9610
9611 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9612 handing a read watchpoint.
9613 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9614
6076632b
DE
96152010-02-12 Doug Evans <dje@google.com>
9616
9617 * linux-low.c (linux_supports_tracefork_flag): Document.
9618 (linux_look_up_symbols): Add comment.
9619
3327ccf7
L
96202010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9621
9622 * regcache.c (supply_register): Clear regcache if buf is NULL.
9623
0718675c 96242010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9625 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9626
9627 * inferiors.c (find_inferior): Add function documentation.
9628 (unloaded_dll): Handle the case where the unloaded dll has not
9629 been previously registered in the dll list.
9630
177321bd
DJ
96312010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9632
9633 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9634 (thumb2_breakpoint): New.
9635 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9636
2b009048
DJ
96372010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9638
9639 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9640 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9641 breakpoints.
9642
3be029c7
PA
96432010-01-21 Pedro Alves <pedro@codesourcery.com>
9644
9645 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9646
18f5de3b
JK
96472010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9648
9649 * linux-s390-low.c (s390_collect_ptrace_register)
9650 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9651
3743bb4f
DE
96522010-01-21 Doug Evans <dje@google.com>
9653
14ce3065
DE
9654 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9655 (PTRACE_ARG4_TYPE): New macro.
9656 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9657 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9658 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9659 (usr_store_inferior_registers): Ditto.
9660 (linux_read_memory, linux_write_memory): Ditto.
9661 (linux_test_for_tracefork): Ditto.
9662
3743bb4f
DE
9663 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9664 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9665
8b315be5
PA
96662010-01-21 Pedro Alves <pedro@codesourcery.com>
9667
9668 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9669 target.
9670
85492558
PA
96712010-01-21 Pedro Alves <pedro@codesourcery.com>
9672
9673 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9674 prototype to take a regcache. Adjust.
9675
442ea881
PA
96762010-01-20 Pedro Alves <pedro@codesourcery.com>
9677
9678 * regcache.h (struct thread_info): Forward declare.
9679 (struct regcache): New.
9680 (new_register_cache): Adjust prototype.
9681 (get_thread_regcache): Declare.
9682 (free_register_cache): Adjust prototype.
9683 (registers_to_string, registers_from_string): Ditto.
9684 (supply_register, supply_register_by_name, collect_register)
9685 (collect_register_as_string, collect_register_by_name): Ditto.
9686 * regcache.c (struct inferior_regcache_data): Delete.
9687 (get_regcache): Rename to ...
9688 (get_thread_regcache): ... this. Adjust. Switch inferior before
9689 fetching registers.
9690 (regcache_invalidate_one): Adjust.
9691 (regcache_invalidate): Fix prototype.
9692 (new_register_cache): Return the new register cache.
9693 (free_register_cache): Change prototype.
9694 (realloc_register_cache): Adjust.
9695 (registers_to_string): Change prototype to take a regcache. Adjust.
9696 (registers_from_string): Ditto.
9697 (register_data): Ditto.
9698 (supply_register): Ditto.
9699 (supply_register_by_name): Ditto.
9700 (collect_register): Ditto.
9701 (collect_register_as_string): Ditto.
9702 (collect_register_by_name): Ditto.
9703 * server.c (process_serial_event): Adjust.
9704 * linux-low.h (regset_fill_func, regset_store_func): Change
9705 prototype.
9706 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9707 Change prototype.
9708 * linux-low.c (get_stop_pc): Adjust.
9709 (check_removed_breakpoint): Adjust.
9710 (linux_wait_for_event): Adjust.
9711 (linux_resume_one_lwp): Adjust.
9712 (fetch_register): Add regcache parameter. Adjust.
9713 (usr_store_inferior_registers): Ditto.
9714 (regsets_fetch_inferior_registers): Ditto.
9715 (regsets_store_inferior_registers): Ditto.
9716 (linux_fetch_registers, linux_store_registers): Ditto.
9717 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9718 regcache. Adjust.
43aaf8b6
PA
9719 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9720 Ditto.
442ea881
PA
9721 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9722 prototype to take a regcache.
9723 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9724 * remote-utils.c (convert_ascii_to_int, outreg)
9725 (prepare_resume_reply): Change prototype to take a regcache.
9726 Adjust.
9727 * target.h (struct target_ops) <fetch_registers, store_registers>:
9728 Change prototype to take a regcache.
9729 (fetch_inferior_registers, store_inferior_registers): Change
9730 prototype to take a regcache. Adjust.
9731 * proc-service.c (ps_lgetregs): Adjust.
9732 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9733 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9734 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9735 take a regcache. Adjust.
9736 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9737 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9738 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9739 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9740 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9741 (cris_cannot_fetch_register):
9742 (cris_breakpoint_at): Change prototype to take a regcache.
9743 Adjust.
9744 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9745 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9746 to take a regcache. Adjust.
9747 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9748 Adjust.
9749 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9750 take a regcache. Adjust.
9751 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9752 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9753 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9754 * linux-mips-low.c (mips_get_pc):
9755 (mips_set_pc): Change prototype to take a regcache. Adjust.
9756 (mips_reinsert_addr): Adjust.
9757 (mips_collect_register): Change prototype to take a regcache.
9758 Adjust.
9759 (mips_supply_register):
9760 (mips_collect_register_32bit, mips_supply_register_32bit)
9761 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9762 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9763 * linux-ppc-low.c (ppc_supply_ptrace_register)
9764 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9765 (parse_spufs_run): Adjust.
9766 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9767 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9768 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9769 take a regcache. Adjust.
9770 * linux-s390-low.c (s390_collect_ptrace_register)
9771 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9772 (s390_set_pc): Change prototype to take a regcache. Adjust.
9773 (s390_arch_setup): Adjust.
9774 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9775 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9776 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9777 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9778 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9779 regcache. Adjust.
9780 (sparc_breakpoint_at): Adjust.
9781 * linux-xtensa-low.c (xtensa_fill_gregset):
9782 (xtensa_store_gregset):
9783 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9784 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9785 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9786 prototype to take a regcache. Adjust.
9787 * win32-arm-low.c (arm_fetch_inferior_register)
9788 (arm_store_inferior_register): Change prototype to take a
9789 regcache. Adjust.
9790 * win32-i386-low.c (i386_fetch_inferior_register)
9791 (i386_store_inferior_register): Change prototype to take a
9792 regcache. Adjust.
9793 * win32-low.c (child_fetch_inferior_registers)
9794 (child_store_inferior_registers): Change prototype to take a
9795 regcache. Adjust.
9796 (win32_wait): Adjust.
9797 (win32_fetch_inferior_registers): Change prototype to take a
9798 regcache. Adjust.
9799 (win32_store_inferior_registers): Adjust.
9800 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9801 store_inferior_register>: Change prototype to take a regcache.
9802
60c3d7b0
DE
98032010-01-20 Doug Evans <dje@google.com>
9804
9805 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9806 #ifdef.
9807 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9808 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9809
dc146f7c
VP
98102010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9811
9812 * linux-low.c (linux_core_of_thread): New.
9813 (compare_ints, show_process, list_threads): New.
9814 (linux_qxfer_osdata): Report threads and cores.
9815 (linux_target_op): Register linux_core_of_thread.
9816 * remote-utils.c (prepare_resume_reply): Report the core.
9817 (buffer_xml_printf): Support %d specifier.
9818 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9819 New.
9820 (handle_query): Handle qXfer:threads. Announce availability
9821 thereof.
9822 * target.h (struct target_ops): New field core_of_thread.
9823
7803799a
UW
98242010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9825
9826 * Makefile.in (clean): Remove new generated files.
9827 (reg-s390.o, reg-s390.c): Remove rules.
9828 (reg-s390x.o, reg-s390x.c): Likewise.
9829 (s390-linux32.o, s390-linux32.c): Add rules.
9830 (s390-linux64.o, s390-linux64.c): Likewise.
9831 (s390x-linux64.o, s390x-linux64.c): Likewise.
9832 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9833 * linux-s390-low.c: Include <elf.h>.
9834 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9835 (init_registers_s390): Remove prototype.
9836 (init_registers_s390x): Likewise.
9837 (init_registers_s390_linux32): Add prototype.
9838 (init_registers_s390_linux64): Likewise.
9839 (init_registers_s390x_linux64): Likewise.
9840 (s390_num_regs_3264): New define.
9841 (s390_regmap_3264): New global variable.
9842 (s390_cannot_fetch_register): Remove obsolete check.
9843 (s390_cannot_store_register): Likewise.
9844 (s390_collect_ptrace_register): Handle upper/lower register halves.
9845 (s390_supply_ptrace_register): Likewise.
9846 (s390_fill_gregset): Update to register number changes.
9847 (s390_get_hwcap): New routine.
9848 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9849 Install appropriate regmap and register set.
9850
6e7ffa39
JB
98512010-01-01 Joel Brobecker <brobecker@adacore.com>
9852
9853 * server.c (gdbserver_version): Update copyright year to 2010.
9854 * gdbreplay.c (gdbreplay_version): Likewise.
9855
957f3f49
DE
98562009-12-28 Doug Evans <dje@google.com>
9857
9858 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9859 elf/external.h. Include <elf.h> instead but only if necessary.
9860
ca5c370d
PA
98612009-12-28 Pedro Alves <pedro@codesourcery.com>
9862
9863 * linux-low.c (linux_remove_process): Remove `detaching'
9864 parameter. Don't release/detach from thread_db here.
9865 (linux_kill): Release/detach from thread_db here, ...
9866 (linux_detach): ... and here, before actually detaching.
9867 (linux_wait_1): ... and here, when a process exits.
9868 * thread-db.c (any_thread_of): New.
9869 (thread_db_free): Switch the current inferior to a thread of the
9870 passed in process.
9871
4ee62156
DE
98722009-12-21 Doug Evans <dje@google.com>
9873
d90e6a88
DE
9874 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9875
c5f62d5f
DE
9876 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9877 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9878 warning ifndef __NR_tkill. Move setting of errno there too.
9879 Delete unnecessary resetting of errno after syscall.
9880 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9881
10e86dd7
DE
9882 * configure.ac: Check for dladdr.
9883 * config.in: Regenerate.
9884 * configure: Regenerate.
9885 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9886 (try_thread_db_load): Update.
9887
4ee62156
DE
9888 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9889
00f515da
DE
98902009-12-18 Doug Evans <dje@google.com>
9891
e9464885
DE
9892 * event-loop.c: Include unistd.h if it exists.
9893
07d4f67e
DE
9894 * linux-low.c (my_waitpid): Move definition away from being in
9895 between linux_tracefork_child/linux_test_for_tracefork.
9896
00f515da
DE
9897 * gdb_proc_service.h (psaddr_t): Fix type.
9898 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9899 signature to match glibc.
9900
1de1badb
DE
99012009-12-16 Doug Evans <dje@google.com>
9902
9903 * linux-low.c (linux_read_memory): Fix argument to read.
9904
aeeb81d1
PA
99052009-11-26 Pedro Alves <pedro@codesourcery.com>
9906
9907 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9908 events, don't leave current_inferior pointing at null.
9909
10357975
PA
99102009-11-26 Pedro Alves <pedro@codesourcery.com>
9911
9912 * win32-low.c (LOG): Delete.
9913 (OUTMSG): Output to stderr.
9914 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9915 on compile time LOG macro.
9916 (win32_wait): Fix debug output.
9917
cf6e3471
PA
99182009-11-26 Pedro Alves <pedro@codesourcery.com>
9919
9920 * win32-low.c (win32_add_one_solib): If the dll name is
9921 "ntdll.dll", prepend the system directory to the dll path.
9922
0c85e18e
MK
99232009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9924
9925 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9926
9ac544ce 99272009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9928 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9929
9930 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9931 * configure.ac: Check for __mcoldfire__ and set
9932 gdb_cv_m68k_is_coldfire.
9933 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9934 reg-cf.o and reg-m68k.o.
9935 * configure: Regenerated.
9936
fd7dd3e6
PA
99372009-11-16 Pedro Alves <pedro@codesourcery.com>
9938
9939 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9940 Pass it to thread_db_free.
9941 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9942 proper `detaching' argument to linux_remove_process.
9943 * linux-low.h (thread_db_free): Add `detaching' parameter.
9944 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9945 to thread_db_free.
9946 (thread_db_free): Add `detaching' parameter. Only
9947 call td_ta_clear_event if detaching from process.
9948
75aa492e
MK
99492009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9950
9951 * thread-db.c (thread_db_free): Fix typo.
9952
21e1bee4
PP
99532009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9954
9955 PR gdb/10838
9956 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9957
8838b45e
NS
99582009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9959
9960 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9961 with an i686 compiler.
9962 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9963 needed.
9964 * configure: Rebuilt.
9965
8a35fb51
SL
99662009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9967
9968 PR gdb/10783
9969
9970 * server.c (handle_search_memory_1): Correct read_addr initialization
9971 in loop for searching subsequent chunks.
9972
96f15937
PP
99732009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9974
9975 * configure.ac: New --with-libthread-db option.
9976 * thread-db.c: Allow direct dependence on libthread_db.
9977 (thread_db_free): Adjust.
9978 * config.in: Regenerate.
9979 * configure: Likewise.
889bf7c5 9980
5f7d1694
PP
99812009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9982
9983 PR gdb/10757
9984 * thread-db.c (attach_thread): New function.
9985 (maybe_attach_thread): Return success/failure.
9986 (find_new_threads_callback): Adjust.
889bf7c5
PA
9987 (thread_db_find_new_threads): Loop until no new threads.
9988
88e3b899
PA
99892009-10-13 Pedro Alves <pedro@codesourcery.com>
9990
9991 * proc-service.c (ps_lgetregs): Formatting.
9992
cdbfd419
PP
99932009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9994
9995 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9996 * configure.ac: Adjust.
9997 * linux-low.h (struct process_info_private): Move members to struct
9998 thread_db.
9999 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10000 * linux-low.c (linux_remove_process): Adjust.
10001 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10002 * server.c (handle_query): Move code ...
10003 (handle_monitor_command): ... here. New function.
10004 * target.h (struct target_ops): New member.
10005 * thread-db.c (struct thread_db): New.
10006 (libthread_db_search_path): New variable.
10007 (thread_db_create_event, thread_db_enable_reporting)
10008 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10009 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10010 (try_thread_db_load_1, dladdr_to_soname): New functions.
10011 (try_thread_db_load, thread_db_load_search): New functions.
10012 (thread_db_init): Search for libthread_db.
10013 (thread_db_free): New function.
10014 (thread_db_handle_monitor_command): Likewise.
10015 * config.in: Regenerate.
10016 * configure: Regenerate.
889bf7c5 10017
4168d2d6
UW
100182009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10019
10020 * spu-low.c (spu_kill): Wait for inferior to terminate.
10021 Call clear_inferiors.
10022 (spu_detach): Call clear_inferiors.
10023
81ecdfbb
RW
100242009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10025
10026 * aclocal.m4: Regenerate.
10027 * config.in: Likewise.
10028 * configure: Likewise.
10029
0b9ff2c0
UW
100302009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10031
10032 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10033 (parse_spufs_run): New function.
10034 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10035 (ppc_breakpoint_at): Handle SPU breakpoints.
10036
efcbbd14
UW
100372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10038
10039 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10040 (SPUFS_MAGIC): Define.
10041 (spu_enumerate_spu_ids): New function.
10042 (linux_qxfer_spu): New function.
10043 (linux_target_ops): Install linux_qxfer_spu.
10044
f4d9bade
UW
100452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10046
10047 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10048 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10049 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10050 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10051 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10052 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10053 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10054 (init_registers_powerpc_cell32l): Add prototype.
10055 (init_registers_powerpc_cell64l): Likewise.
10056 (ppc_arch_setup): Detect Cell/B.E. architecture.
10057
96e946ca
RW
100582009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10059
10060 * Makefile.in (datarootdir): New variable.
10061
58d6951d
DJ
100622009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10063
10064 * linux-low.c (linux_write_memory): Update debugging output.
10065 * Makefile.in (clean): Add new descriptions.
10066 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10067 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10068 * configure.srv: Add new files for arm*-*-linux*.
10069 * linux-arm-low.c: Add new declarations.
10070 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10071 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10072 (HWCAP_VFPv3D16): New.
10073 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10074 instead of __IWMMXT__.
10075 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10076 (arm_arch_setup): New.
10077 (target_regsets): Remove #ifdef. Add VFP regset.
10078 (the_low_target): Use arm_arch_setup.
10079
12b42a12
DJ
100802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10081
10082 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10083 the main thread again.
10084
ac8c974e
AR
100852009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10086
10087 Adding Neutrino gdbserver.
10088 * configure: Regenerated.
10089 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10090 * configure.srv (i[34567]86-*-nto*): New target.
10091 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10092 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10093 (nto_comctrl) [__QNX__]: New function.
10094 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10095
4424e0c3 100962009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10097
10098 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10099 srv_tgtobj.
10100
912cf4ba
PA
101012009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10102 Pedro Alves <pedro@codesourcery.com>
10103
10104 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10105 don't support CONTEXT_EXTENDED_REGISTERS.
10106 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10107 (the_low_target): Install them.
10108 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10109 failing with ERROR_PIPE_NOT_CONNECTED.
10110
aa5ca48f
DE
101112009-06-30 Doug Evans <dje@google.com>
10112 Pierre Muller <muller@ics.u-strasbg.fr>
10113
10114 Add h/w watchpoint support to x86-linux, win32-i386.
10115 * Makefile.in (SFILES): Add i386-low.c
10116 (i386_low_h): Define.
10117 (i386-low.o): Add dependencies.
10118 (linux-x86-low.o): Add i386-low.h dependency.
10119 (win32-i386-low.o): Ditto.
10120 * i386-low.c: New file.
10121 * i386-low.h: New file.
10122 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10123 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10124 * linux-low.c (linux_add_process): Initialize arch_private.
10125 (linux_remove_process): Free arch_private.
10126 (add_lwp): Initialize arch_private.
10127 (delete_lwp): Free arch_private.
10128 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10129 provided.
10130 * linux-low.h (process_info_private): New member arch_private.
10131 (lwp_info): New member arch_private.
10132 (linux_target_ops): New members new_process, new_thread,
10133 prepare_to_resume.
10134 (ptid_of): New macro.
10135 * linux-x86-low.c: Include stddef.h, i386-low.h.
10136 (arch_process_info): New struct.
10137 (arch_lwp_info): New struct.
10138 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10139 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10140 (i386_dr_low_get_status): New function.
10141 (x86_insert_point, x86_remove_point): New functions.
10142 (x86_stopped_by_watchpoint): New function.
10143 (x86_stopped_data_address): New function.
10144 (x86_linux_new_process, x86_linux_new_thread): New functions.
10145 (x86_linux_prepare_to_resume): New function.
10146 (the_low_target): Add entries for insert_point, remove_point,
10147 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10148 prepare_to_resume.
10149 * server.c (debug_hw_points): New global.
10150 (monitor_show_help): Document set debug-hw-points.
10151 (handle_query): Process "set debug-hw-points".
10152 * server.h (debug_hw_points): Declare.
10153 (paddress): Declare.
10154 * utils.c (NUMCELLS, CELLSIZE): New macros.
10155 (get_sell, xsnprintf, paddress): New functions.
10156 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10157 remove_point, stopped_by_watchpoint, stopped_data_address.
10158 * win32-i386-low.c: Include i386-low.h.
10159 (debug_reg_state): Replaces dr.
10160 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10161 (i386_dr_low_get_status): New function.
10162 (i386_insert_point, i386_remove_point): New functions.
10163 (i386_stopped_by_watchpoint): New function.
10164 (i386_stopped_data_address): New function.
10165 (i386_initial_stuff): Update.
10166 (get_thread_context,set_thread_context,i386_thread_added): Update.
10167 (the_low_target): Add entries for insert_point,
10168 remove_point, stopped_by_watchpoint, stopped_data_address.
10169 * win32-low.c (win32_insert_watchpoint): New function.
10170 (win32_remove_watchpoint): New function.
10171 (win32_stopped_by_watchpoint): New function.
10172 (win32_stopped_data_address): New function.
10173 (win32_target_ops): Add entries for insert_watchpoint,
10174 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10175 * win32-low.h (win32_target_ops): New members insert_point,
10176 remove_point, stopped_by_watchpoint, stopped_data_address.
10177
d993e290
PA
101782009-06-25 Pedro Alves <pedro@codesourcery.com>
10179
10180 * server.c (process_serial_event): Re-return unsupported, not
10181 error, if the type isn't recognized. Re-allow supporting only
10182 insert or remove packets. Also call require_running for
10183 breakpoints. Add missing break statement to default case. Tidy.
10184 * target.h (struct target_ops): Rename insert_watchpoint to
10185 insert_point, and remove_watchpoint to remove_point.
10186
10187 * linux-low.h (struct linux_target_ops): Likewise.
10188 * linux-low.c (linux_insert_watchpoint): Rename to ...
10189 (linux_insert_point): ... this. Adjust.
10190 (linux_remove_watchpoint): Rename to ...
10191 (linux_remove_point): ... this. Adjust.
10192 (linux_target_ops): Adjust.
10193 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10194 (cris_insert_point): ... this.
10195 (cris_remove_watchpoint): Rename to ...
10196 (cris_remove_point): ... this.
10197 (the_low_target): Adjust.
10198
0f54c268
PM
101992009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10200
10201 * server.c (handle_v_kill): Pass signal_pid to
10202 kill_inferior if multi_process is zero.
10203
c6314022
AR
102042009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10205
10206 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10207 * target.h (target_ops): Comment for *_watchpoint to make it clear
10208 the functions can get types '0' and '1'.
10209
4463ce24
AR
102102009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10211
10212 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10213 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10214 * regcache.c (get_regcache): Likewise.
10215 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10216 * win32-low.c (child_fetch_inferior_registers): Remove check for
10217 regno 0.
10218
cf8fd78b
PA
102192009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10220 Pedro Alves <pedro@codesourcery.com>
10221
10222 * target.h (struct target_ops) <supports_multi_process>: New
10223 callback.
10224 (target_supports_multi_process): New.
10225 * server.c (handle_query): Even if GDB reports support, only
10226 enable multi-process if the target also supports it. Report
10227 multi-process support only if the target backend supports it.
10228 * linux-low.c (linux_supports_multi_process): New function.
10229 (linux_target_ops): Install it as target_supports_multi_process
10230 callback.
10231
47c0c975
DE
102322009-05-24 Doug Evans <dje@google.com>
10233
e09875d4
DE
10234 Global renaming of find_thread_pid to find_thread_ptid.
10235 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10236 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10237 All callers updated.
10238
e27d73f6
DE
10239 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10240 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10241 directly.
10242
47c0c975
DE
10243 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10244 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10245 (linux_resume_one_lwp): Ditto.
10246
2acc282a
DE
102472009-05-23 Doug Evans <dje@google.com>
10248
10249 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10250 from struct inferior_list_entry * to struct lwp_info *.
10251 All callers updated.
10252
9f1036c1
DE
102532009-05-13 Doug Evans <dje@google.com>
10254
10255 * linux-x86-low.c: Don't include assert.h.
10256 (x86_siginfo_fixup): Use fatal, not assert.
10257 (x86_arch_setup): Fix comment.
10258
d0722149
DE
102592009-05-12 Doug Evans <dje@google.com>
10260
10261 Biarch support for i386/amd64 gdbserver.
10262 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10263 Add linux-x86-low.c.
10264 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10265 (linux-x86-low.o): Add.
10266 * linux-x86-64-low.c: Delete.
10267 * linux-i386-low.c: Delete.
10268 * linux-x86-low.c: New file.
10269 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10270 linux-x86-low.o.
10271 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10272 linux-x86-low.o.
10273 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10274 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10275 (linux_child_pid_to_exec_file): New function.
10276 (elf_64_header_p, elf_64_file_p): New functions.
10277 (siginfo_fixup): New function.
10278 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10279 give target a chance to convert layout.
10280 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10281 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10282
fdeb2a12
DE
102832009-05-07 Doug Evans <dje@google.com>
10284
10285 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10286 (regsets_store_inferior_registers): Ditto.
10287
a6dbe5df
PA
102882009-05-06 Pedro Alves <pedro@codesourcery.com>
10289
10290 PR server/10048
10291
10292 * linux-low.c (must_set_ptrace_flags): Delete.
10293 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10294 of the global.
10295 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10296 `lwp->must_set_ptrace_flags' instead.
ba42693b 10297 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10298 (linux_wait_1): ... not here.
10299
5091eb23
DE
103002009-04-30 Doug Evans <dje@google.com>
10301
9f767825
DE
10302 * inferiors.c (started_inferior_callback): New function.
10303 (attached_inferior_callback): New function.
10304 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10305 * server.c (print_started_pid, print_attached_pid): New functions.
10306 (detach_or_kill_for_exit): New function.
10307 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10308 * server.h (have_started_inferiors_p): Declare.
10309 (have_attached_inferiors_p): Declare.
10310
5091eb23
DE
10311 * inferiors.c (remove_process): Fix memory leak, free process.
10312 * linux-low.c (linux_remove_process): New function.
10313 (linux_kill): Call it instead of remove_process.
10314 (linux_detach, linux_wait_1): Ditto.
10315
155c8968
PA
103162009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10317
10318 * configure.srv: Add x86 Windows CE target.
10319
7fe519cb
UW
103202009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10321
10322 * inferiors.c (get_thread_process): Make global.
10323 * server.h (get_thread_process): Add prototype.
10324 * thread-db.c (find_one_thread): Use get_thread_process
10325 instead of current_process.
10326 (thread_db_get_tls_address): Do not crash if called when
10327 thread layer is not yet initialized.
10328
5472f405
UW
103292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10330
10331 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10332 * spu-low.c (current_tid): Rename to ...
10333 (current_ptid): ... this.
10334 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10335 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10336 ptid_get_lwp (current_ptid) instead of current_tid.
10337 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10338 instead of current_tid. Use find_process_pid to verify pid
10339 argument is valid. Pass proper argument to remove_process.
10340 (spu_thread_alive): Compare current_ptid instead of current_tid.
10341 (spu_resume): Likewise.
10342
55ac2b99
PA
103432009-04-02 Pedro Alves <pedro@codesourcery.com>
10344
10345 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10346 variable.
10347
95954743
PA
103482009-04-01 Pedro Alves <pedro@codesourcery.com>
10349
10350 Implement the multiprocess extensions, and add linux multiprocess
10351 support.
10352
10353 * server.h (ULONGEST): Declare.
10354 (struct ptid, ptid_t): New.
10355 (minus_one_ptid, null_ptid): Declare.
10356 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10357 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10358 (struct inferior_list_entry): Change `id' type from unsigned from
10359 to ptid_t.
10360 (struct sym_cache, struct breakpoint, struct
10361 process_info_private): Forward declare.
10362 (struct process_info): Declare.
10363 (current_process): Declare.
10364 (all_processes): Declare.
10365 (initialize_inferiors): Declare.
10366 (add_thread): Adjust to use ptid_t.
10367 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10368 (add_process, remove_process, find_thread_pid): Declare.
10369 (find_inferior_id): Adjust to use ptid_t.
10370 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10371 (multi_process): Declare.
10372 (push_event): Adjust to use ptid_t.
10373 (read_ptid, write_ptid): Declare.
10374 (prepare_resume_reply): Adjust to use ptid_t.
10375 (clear_symbol_cache): Declare.
10376 * inferiors.c (all_processes): New.
10377 (null_ptid, minus_one_ptid): New.
10378 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10379 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10380 (add_thread): Change unsigned long to ptid. Remove gdb_id
10381 parameter. Adjust.
10382 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10383 (gdb_id_to_thread): Rename to ...
10384 (find_thread_pid): ... this. Change unsigned long to ptid.
10385 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10386 (loaded_dll, pull_pid_from_list): Adjust.
10387 (add_process, remove_process, find_process_pid)
10388 (get_thread_process, current_process, initialize_inferiors): New.
10389 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10390 (struct target_waitstatus) <related_pid>: Ditto.
10391 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10392 return type to int.
10393 (struct target_ops) <join>: Add `pid' argument.
10394 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10395 (struct target_ops) <wait>: Add `ptid' field. Change return type
10396 to ptid.
10397 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10398 (mywait): Add `ptid' argument. Change return type to ptid_t.
10399 (target_pid_to_str): Declare.
10400 * target.c (set_desired_inferior): Adjust to use ptids.
10401 (mywait): Add new `ptid' argument. Adjust.
10402 (target_pid_to_str): New.
10403 * mem-break.h (free_all_breakpoints): Declare.
10404 * mem-break.c (breakpoints): Delelete.
10405 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10406 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10407 to use per-process breakpoint list.
10408 (free_all_breakpoints): New.
10409 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10410 (symbol_cache, all_symbols_looked_up): Delete.
10411 (hexchars): New.
10412 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10413 read_ptid): New.
10414 (prepare_resume_reply): Change ptid argument's type from unsigned
10415 long to ptid_t. Adjust. Implement W;process and X;process.
10416 (free_sym_cache, clear_symbol_cache): New.
10417 (look_up_one_symbol): Adjust to per-process symbol cache. *
10418 * server.c (cont_thread, general_thread, step_thread): Change type
10419 to ptid_t.
10420 (attached): Delete.
10421 (multi_process): New.
10422 (last_ptid): Change type to ptid_t.
10423 (struct vstop_notif) <ptid>: Change type to ptid_t.
10424 (queue_stop_reply, push_event): Change `ptid' argument's type to
10425 ptid_t.
10426 (discard_queued_stop_replies): Add `pid' argument.
10427 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10428 changes. Don't reference the `attached' global.
10429 (attach_inferior): Adjust to mywait interface changes.
10430 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10431 features. Handle and report "multiprocess+". Handle
10432 "qAttached:PID".
10433 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10434 changes.
10435 (handle_v_kill): New.
10436 (handle_v_stopped): Adjust to use target_pid_to_str.
10437 (handle_v_requests): Allow multiple attaches and runs when
10438 multiprocess extensions are in effect. Handle "vKill".
10439 (myresume): Adjust to use ptids.
10440 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10441 (handle_status): Adjust to discard_queued_stop_replies interface
10442 change.
10443 (first_thread_of, kill_inferior_callback)
10444 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10445 (main): Call initialize_inferiors. Adjust to use ptids, killing
10446 and detaching from all inferiors. Handle multiprocess packet
10447 variants.
10448 * linux-low.h: Include gdb_proc_service.h.
10449 (struct process_info_private): New.
10450 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10451 <lwpid_of>: Use ptid_get_lwp.
10452 (get_lwp_thread): Adjust.
10453 (struct lwp_info): Add `dead' member.
10454 (find_lwp_pid): Declare.
10455 * linux-low.c (thread_db_active): Delete.
10456 (new_inferior): Adjust comment.
10457 (inferior_pid): Delete.
10458 (linux_add_process): New.
10459 (handle_extended_wait): Adjust.
10460 (add_lwp): Change unsigned long to ptid.
10461 (linux_create_inferior): Add process to processes table. Adjust
10462 to use ptids. Don't set new_inferior here.
10463 (linux_attach_lwp): Rename to ...
10464 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10465 it. Adjust to use ptids.
10466 (linux_attach_lwp): New.
10467 (linux_attach): Add process to processes table. Don't set
10468 new_inferior here.
10469 (struct counter): New.
10470 (second_thread_of_pid_p, last_thread_of_process_p): New.
10471 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10472 multiple processes.
10473 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10474 processes. Remove process from process table.
10475 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10476 to multiple processes.
10477 (any_thread_of): New.
10478 (linux_detach): Add `pid' argument, and handle it. Remove process
10479 from processes table.
10480 (linux_join): Add `pid' argument. Handle it.
10481 (linux_thread_alive): Change unsighed long argument to ptid_t.
10482 Consider dead lwps as not being alive.
10483 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10484 threads we're not interested in.
10485 (same_lwp, find_lwp_pid): New.
10486 (linux_wait_for_lwp): Change `pid' argument's type from int to
10487 ptid_t. Adjust.
10488 (linux_wait_for_event): Rename to ...
10489 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10490 from int to ptid_t. Adjust.
10491 (linux_wait_for_event): New.
10492 (linux_wait_1): Add `ptid' argument. Change return type to
10493 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10494 that exit from the process table.
10495 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10496 Adjust.
10497 (mark_lwp_dead): New.
10498 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10499 stopping all threads, mark its main lwp as dead.
10500 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10501 ptids.
10502 (fetch_register, usr_store_inferior_registers)
10503 (regsets_fetch_inferior_registers)
10504 (regsets_store_inferior_registers, linux_read_memory)
10505 (linux_write_memory): Inline `inferior_pid'.
10506 (linux_look_up_symbols): Adjust to use per-process
10507 `thread_db_active'.
10508 (linux_request_interrupt): Adjust to use ptids.
10509 (linux_read_auxv): Inline `inferior_pid'.
10510 (initialize_low): Don't reference thread_db_active.
10511 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10512 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10513 (ps_getpid): Return the pid of the current inferior.
10514 * thread-db.c (proc_handle, thread_agent): Delete.
10515 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10516 per-process data.
10517 (find_one_thread): Change argument type to ptid_t. Adjust to
10518 per-process data.
10519 (maybe_attach_thread): Adjust to per-process data and ptids.
10520 (thread_db_find_new_threads): Ditto.
10521 (thread_db_init): Ditto.
10522 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10523 processes table. Adjust to use ptids.
10524 (spu_kill, spu_detach): Adjust interface. Remove process from
10525 processes table.
10526 (spu_join, spu_thread_alive): Adjust interface.
10527 (spu_wait): Adjust interface. Remove process from processes
10528 table. Adjust to use ptids.
10529 * win32-low.c (current_inferior_tid): Delete.
10530 (current_inferior_ptid): New.
10531 (debug_event_ptid): New.
10532 (thread_rec): Take a ptid. Adjust.
10533 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10534 (child_delete_thread): Ditto.
10535 (do_initial_child_stuff): Add `attached' argument. Add process to
10536 processes table.
10537 (child_fetch_inferior_registers, child_store_inferior_registers):
10538 Adjust.
10539 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10540 (win32_attach): Pass 1 to do_initial_child_stuff.
10541 (win32_kill): Adjust interface. Remove process from processes
10542 table.
10543 (win32_detach): Ditto.
10544 (win32_join): Adjust interface.
10545 (win32_thread_alive): Take a ptid.
10546 (win32_resume): Adjust to use ptids.
10547 (get_child_debug_event): Ditto.
10548 (win32_wait): Adjust interface. Remove exiting process from
10549 processes table.
10550
bd99dc85
PA
105512009-04-01 Pedro Alves <pedro@codesourcery.com>
10552
10553 Non-stop mode support.
10554
10555 * server.h (non_stop): Declare.
10556 (gdb_client_data, handler_func): Declare.
10557 (delete_file_handler, add_file_handler, start_event_loop):
10558 Declare.
10559 (handle_serial_event, handle_target_event, push_event)
10560 (putpkt_notif): Declare.
10561 * target.h (enum resume_kind): New.
10562 (struct thread_resume): Replace `step' field by `kind' field.
10563 (TARGET_WNOHANG): Define.
10564 (struct target_ops) <wait>: Add `options' argument.
10565 <supports_non_stop, async, start_non_stop>: New fields.
10566 (target_supports_non_stop, target_async): New.
10567 (start_non_stop): Declare.
10568 (mywait): Add `options' argument.
10569 * target.c (mywait): Add `options' argument. Print child exit
10570 notifications here.
10571 (start_non_stop): New.
10572 * server.c (non_stop, own_buf, mem_buf): New globals.
10573 (struct vstop_notif): New.
10574 (notif_queue): New global.
10575 (queue_stop_reply, push_event, discard_queued_stop_replies)
10576 (send_next_stop_reply): New.
10577 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10578 interface changes.
10579 (attach_inferior): In non-stop mode, don't wait for the target
10580 here.
10581 (handle_general_set): Handle QNonStop.
10582 (handle_query): When handling qC, return the current general
10583 thread, instead of the first thread of the list.
10584 (handle_query): If the backend supports non-stop mode, include
10585 QNonStop+ in the qSupported query response.
10586 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10587 and non-stop mode.
10588 (handle_v_attach, handle_v_run): Handle non-stop mode.
10589 (handle_v_stopped): New.
10590 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10591 (myresume): Adjust to use resume_kind. Handle non-stop.
10592 (queue_stop_reply_callback): New.
10593 (handle_status): Handle non-stop mode.
10594 (main): Clear non_stop flag on reconnection. Use the event-loop.
10595 Refactor serial protocol handling from here ...
10596 (process_serial_event): ... to this new function. When GDB
10597 selects any thread, select one here. In non-stop mode, wait until
10598 GDB acks all pending events before exiting.
10599 (handle_serial_event, handle_target_event): New.
10600 * remote-utils.c (remote_open): Install remote_desc in the event
10601 loop.
10602 (remote_close): Remove remote_desc from the event loop.
10603 (putpkt_binary): Rename to...
10604 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10605 (putpkt_binary): New as wrapper around putpkt_binary_1.
10606 (putpkt_notif): New.
10607 (prepare_resume_reply): In non-stop mode, don't change the
10608 general_thread.
10609 * event-loop.c: New.
10610 * Makefile.in (OBJ): Add event-loop.o.
10611 (event-loop.o): New rule.
10612
10613 * linux-low.h (pid_of): Moved here.
10614 (lwpid_of): New.
10615 (get_lwp_thread): Use lwpid_of.
10616 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10617 * linux-low.c (pid_of): Delete.
10618 (inferior_pid): Use lwpid_of.
10619 (linux_event_pipe): New.
10620 (target_is_async_p): New.
10621 (delete_lwp): New.
10622 (handle_extended_wait): Use lwpid_of.
10623 (add_lwp): Don't set lwpid field.
10624 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10625 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10626 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10627 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10628 first. Adjust to linux_wait_for_event interface changes. Use
10629 lwpid_of.
10630 (linux_detach): Don't delete the main lwp here.
10631 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10632 (status_pending_p): Don't consider explicitly suspended lwps.
10633 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10634 pointer. Add OPTIONS argument. Change return type to int. Use
10635 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10636 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10637 pointer. Add status pointer argument. Return a pid instead of a
10638 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10639 changes. In non-stop mode, don't switch to a random thread.
10640 (linux_wait): Rename to...
10641 (linux_wait_1): ... this. Add target_options argument, and handle
10642 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10643 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10644 clean exit and signal exit code. Don't stop all threads in
10645 non-stop mode. In all-stop mode, only stop all threads when
10646 reporting a stop to GDB. Handle explicit thread stop requests.
10647 (async_file_flush, async_file_mark): New.
10648 (linux_wait): New.
10649 (send_sigstop): Use lwpid_of.
10650 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10651 interface changes. In non-stop mode, don't switch to a random
10652 thread.
10653 (linux_resume_one_lwp): Use lwpid_of.
10654 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10655 (linux_resume_one_thread): ... this. Handle resume_stop. In
10656 non-stop mode, don't look for pending flag in all threads.
10657 (resume_status_pending_p): Don't consider explicitly suspended
10658 threads.
10659 (my_waitpid): Reimplement. Emulate __WALL.
10660 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10661 Use lwpid_of.
10662 (sigchld_handler, linux_supports_non_stop, linux_async)
10663 (linux_start_non_stop): New.
10664 (linux_target_ops): Register linux_supports_non_stop, linux_async
10665 and linux_start_non_stop.
10666 (initialize_low): Install SIGCHLD handler.
10667 * thread-db.c (thread_db_create_event, find_one_thread)
10668 (thread_db_get_tls_address): Use lwpid_of.
10669 * win32-low.c (win32_detach): Adjust to use resume_kind.
10670 (win32_wait): Add `options' argument.
10671 * spu-low.c (spu_resume): Adjust to use resume_kind.
10672 (spu_wait): Add `options' argument.
10673
5b1c542e
PA
106742009-04-01 Pedro Alves <pedro@codesourcery.com>
10675
10676 Decouple target code from remote protocol.
10677
10678 * target.h (enum target_waitkind): New.
10679 (struct target_waitstatus): New.
10680 (struct target_ops) <wait>: Return an unsigned long. Take a
10681 target_waitstatus pointer instead of a char pointer.
10682 (mywait): Likewise.
10683 * target.c (mywait): Change prototype to return an unsigned long.
10684 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10685 * server.h (thread_from_wait, old_thread_from_wait): Delete
10686 declarations.
10687 (prepare_resume_reply): Change prototype to take a
10688 target_waitstatus.
10689 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10690 (last_status, last_ptid): New.
10691 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10692 pid instead of a signal.
10693 (attach_inferior): Remove "status" and "signal" parameters.
10694 Adjust.
10695 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10696 not as an address.
10697 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10698 (handle_v_requests, myresume): Remove "status" and "signal"
10699 parameters. Adjust.
10700 (handle_status): New.
10701 (main): Delete local `status'. Adjust.
10702 * remote-utils.c: Include target.h.
10703 (prepare_resume_reply): Change prototype to take a
10704 target_waitstatus. Adjust.
10705
10706 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10707 interface.
10708 * spu-low.c (spu_wait): Adjust.
10709 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10710 Delete.
10711 (win32_wait): Adjust.
10712
2bd7c093
PA
107132009-04-01 Pedro Alves <pedro@codesourcery.com>
10714
10715 * target.h (struct thread_resume): Delete leave_stopped member.
10716 (struct target_ops): Add a `n' argument to the `resume' callback.
10717 * server.c (start_inferior): Adjust.
10718 (handle_v_cont, myresume): Adjust.
10719 * linux-low.c (check_removed_breakpoint): Adjust to resume
10720 interface change, and to removed leave_stopped field.
10721 (resume_ptr): Delete.
10722 (struct thread_resume_array): New.
10723 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10724 resume interface change.
10725 (linux_continue_one_thread, linux_queue_one_thread)
10726 (resume_status_pending_p): Check if the resume field is NULL
10727 instead of checking the leave_stopped member.
10728 (linux_resume): Adjust to the target resume interface change.
10729 * spu-low.c (spu_resume): Adjust to the target resume interface
10730 change.
10731 * win32-low.c (win32_detach, win32_resume): Ditto.
10732
c35fafde
PA
107332009-04-01 Pedro Alves <pedro@codesourcery.com>
10734
10735 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10736 flag.
10737 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10738 pending.
10739 (linux_continue_one_thread): Only preserve the stepping flag if
10740 there's a pending breakpoint.
10741
0a59d50b
PA
107422009-03-31 Pedro Alves <pedro@codesourcery.com>
10743
10744 * server.c (main): After the inferior having exited, call
10745 remote_close before exiting gdbserver.
10746
f04c6d38
TJB
107472009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10748
10749 Fix size of FPSCR in Power 7 processors.
10750 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10751 (PPC_FEATURE_HAS_DFP): New #define.
10752 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10753 size of the FPSCR.
10754
78e5cee6
PA
107552009-03-23 Pedro Alves <pedro@codesourcery.com>
10756
10757 * server.c (handle_query) Whitespace and formatting.
10758
1b3f6016
PA
107592009-03-22 Pedro Alves <pedro@codesourcery.com>
10760
10761 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10762 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10763 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10764 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10765 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10766 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10767 Makefile.in, configure.ac: Fix whitespace throughout.
10768 * configure: Regenerate.
10769
a07b2135
PA
107702009-03-22 Pedro Alves <pedro@codesourcery.com>
10771
10772 * inferiors.c (find_inferior): Make it safe for the callback
10773 function to delete the currently iterated inferior.
10774
67cc2626
PA
107752009-03-22 Pedro Alves <pedro@codesourcery.com>
10776
10777 * Makefile.in (linuw_low_h): Move higher.
10778 (thread-db.o): Depend on $(linux_low_h).
10779
54a0b537
PA
107802009-03-17 Pedro Alves <pedro@codesourcery.com>
10781
10782 Rename "process" to "lwp" throughout.
10783
10784 * linux-low.c (all_processes): Rename to...
10785 (all_lwps): ... this.
10786 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10787 (add_process): Rename to ...
10788 (add_lwp): ... this. Adjust.
10789 (linux_create_inferior): Adjust.
10790 (linux_attach_lwp): Adjust.
10791 (linux_attach): Adjust.
10792 (linux_kill_one_process): Rename to ...
10793 (linux_kill_one_lwp): ... this. Adjust.
10794 (linux_kill): Adjust.
10795 (linux_detach_one_process): Rename to ...
10796 (linux_detach_one_lwp): ... this. Adjust.
10797 (linux_detach): Adjust.
10798 (check_removed_breakpoint): Adjust.
10799 (status_pending_p): Adjust.
10800 (linux_wait_for_process): Rename to ...
10801 (linux_wait_for_lwp): ... this. Adjust.
10802 (linux_wait_for_event): Adjust.
10803 (send_sigstop): Adjust.
10804 (wait_for_sigstop): Adjust.
10805 (stop_all_processes): Rename to ...
10806 (stop_all_lwps): ... this.
10807 (linux_resume_one_process): Rename to ...
10808 (linux_resume_one_lwp): ... this. Adjust.
10809 (linux_set_resume_request, linux_continue_one_thread)
10810 (linux_queue_one_thread, resume_status_pending_p)
10811 (usr_store_inferior_registers, regsets_store_inferior_registers)
10812 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10813 Adjust.
10814 * linux-low.h (get_process): Rename to ...
10815 (get_lwp): ... this. Adjust.
10816 (get_thread_process): Rename to ...
10817 (get_thread_lwp): ... this. Adjust.
10818 (get_process_thread): Rename to ...
10819 (get_lwp_thread): ... this. Adjust.
10820 (struct process_info): Rename to ...
10821 (struct lwp_info): ... this.
10822 (all_processes): Rename to ...
10823 (all_lwps): ... this.
10824 * proc-service.c (ps_lgetregs): Adjust.
10825 * thread-db.c (thread_db_create_event, find_one_thread)
10826 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10827
0b16c5cf
PA
108282009-03-14 Pedro Alves <pedro@codesourcery.com>
10829
10830 * server.c (handle_query): Handle "qAttached".
10831
32de4b9d
NS
108322009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10833
10834 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10835 GPLv3, update license URL.
10836
2aecd87f
DE
108372009-03-01 Doug Evans <dje@google.com>
10838
93efd302 10839 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10840 (server_h): Add gdb_signals.h.
10841 (signals.o): Update.
10842 * server.h (target_signal_from_host,target_signal_to_host_p)
10843 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10844
86b1f9c5
PM
108452009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10846
10847 * remote-utils.c (getpkt): Also generate remote-debug
10848 information if noack_mode is set.
10849
4aa995e1
PA
108502009-02-06 Pedro Alves <pedro@codesourcery.com>
10851
10852 * server.c (handle_query): Report qXfer:siginfo:read and
10853 qXfer:siginfo:write as supported and handle them.
10854 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10855 * linux-low.c (linux_xfer_siginfo): New.
10856 (linux_target_ops): Set it.
10857
62709adf
PA
108582009-01-26 Pedro Alves <pedro@codesourcery.com>
10859
10860 * server.c (gdbserver_usage): Mention --remote-debug.
10861 (main): Accept '--remote-debug' switch.
10862
aef93bd7
DE
108632009-01-18 Doug Evans <dje@google.com>
10864
10865 * regcache.c (new_register_cache): No need to check result of xcalloc.
10866 * server.c (handle_search_memory): Back out calls to xmalloc,
10867 result is checked and error is returned to user upon failure.
10868 (handle_query): Ditto. Add more checks for result of malloc.
10869 (handle_v_cont): Check result of malloc, report error back to
10870 user upon failure.
10871 (handle_v_run): Ditto. Call freeargv.
10872 * server.h (freeargv): Declare.
10873 * utils.c (freeargv): New fn.
10874
54363045
DE
108752009-01-15 Doug Evans <dje@google.com>
10876
f626972c
DE
10877 * gdbreplay.c (perror_with_name): Make arg const char *.
10878 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10879 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10880 * utils.c (perror_with_name): Make arg const char *.
54363045 10881
18aae699
PA
108822009-01-14 Pedro Alves <pedro@codesourcery.com>
10883
10884 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10885 when handling a EXIT_PROCESS_DEBUG_EVENT.
10886
ff703abe
JB
108872009-01-06 Joel Brobecker <brobecker@adacore.com>
10888
10889 * gdbreplay.c (gdbreplay_version): Update copyright year.
10890 * server.c (gdbserver_version): Likewise.
10891
f21cc1a2 108922009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10893
10894 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10895 (handle_extended_wait): Improve comment.
0e21c1ec 10896
bca929d3
DE
108972008-12-13 Doug Evans <dje@google.com>
10898
10899 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10900 * server.h (ATTR_MALLOC): New macro.
10901 (xmalloc,xcalloc,xstrdup): Declare.
10902 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10903 * inferiors.c: Ditto.
10904 * linux-low.c: Ditto.
10905 * mem-break.c: Ditto.
10906 * regcache.c: Ditto.
10907 * remote-utils.c: Ditto.
10908 * server.c: Ditto.
10909 * target.c: Ditto.
10910 * win32-low.c: Ditto.
10911
97438e3f
DE
109122008-12-12 Doug Evans <dje@google.com>
10913
896c7fbb
DE
10914 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10915 in debugging printf.
10916
97438e3f
DE
10917 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10918
e3b886f8
DE
109192008-12-09 Doug Evans <dje@google.com>
10920
10921 * linux-low.h (struct process_info): Delete member tid, unused.
10922 * thread-db.c (find_one_thread): Update.
10923 (maybe_attach_thread): Update.
10924
07e059b5
VP
109252008-12-02 Pedro Alves <pedro@codesourcery.com>
10926
889bf7c5
PA
10927 * target.h (struct target_ops): Add qxfer_osdata member.
10928 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10929 and dirent.h.
10930 (linux_qxfer_osdata): New functions.
10931 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10932 callback.
10933 * server.c (handle_query): Handle "qXfer:osdata:read:".
10934 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10935 (buffer_xml_printf): New functions.
10936 * server.h (struct buffer): New.
10937 (buffer_grow_str, buffer_grow_str0): New macros.
10938 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10939 (buffer_xml_printf): Declare.
07e059b5 10940
4cab47ab
DE
109412008-11-24 Doug Evans <dje@google.com>
10942
10943 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10944
f142445f
DJ
109452008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10946
10947 * server.c (handle_v_run): Always use the supplied argument list.
10948
d0107bb6 109492008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10950
d0107bb6
BW
10951 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10952 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10953
2c4ad781
TJB
109542008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10955
10956 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10957 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10958 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10959 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10960 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10961 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10962 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10963 XML target descriptions.
10964 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10965 when inferior is running on an ISA 2.05 or later processor. Add
10966 special case to return offset for full 64-bit slot of FPSCR when
10967 in 32-bits.
10968
dfb64f85
DJ
109692008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10970
10971 * Makefile.in (SFILES, clean): Added sparc64 files.
10972 (reg-sparc64.o, reg-sparc64.c): New.
10973 * configure.srv (sparc*-*-linux*): New configuration.
10974 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10975 syscall arguments for SPARC.
10976 (regsets_store_inferior_registers): Likewise.
10977 * linux-sparc-low.c: New file.
10978
66b6e1dd
DE
109792008-10-21 Doug Evans <dje@google.com>
10980
10981 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10982 (READLINE_DIR,READLINE_DEP): Delete.
10983 (INTERNAL_CFLAGS): Update.
10984 (LINTFLAGS): Update.
10985
9b710a42
PA
109862008-10-10 Pedro Alves <pedro@codesourcery.com>
10987
10988 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10989 whole argv from the last run, not just argv[0].
10990
5822d809
PA
109912008-09-08 Pedro Alves <pedro@codesourcery.com>
10992
10993 * regcache.c (new_register_cache): Return NULL if the register
10994 cache size isn't known yet.
10995 (free_register_cache): Avoid dereferencing a NULL regcache.
10996
74aac56f
DJ
109972008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10998
10999 * configure.srv: Merge MIPS and MIPS64.
11000
400b20f5
MR
110012008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11002
11003 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11004
677c5bb1
LM
110052008-08-18 Luis Machado <luisgpm@br.ibm.com>
11006
11007 * Makefile.in: Add required vsx dependencies.
11008
11009 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11010 Declare init_registers_powerpc_vsx32l.
11011 Declare init_registers_powerpc_vsx64l.
11012 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11013 (ppc_arch_setup): Check for VSX in hwcap.
11014 (ppc_fill_vsxregset): New function.
11015 (ppc_store_vsxregset): New function.
11016 Add new VSX entry in regset_info target_regsets.
11017
11018 * configure.srv: Add new VSX dependencies.
11019
a6f3e723
SL
110202008-08-12 Pedro Alves <pedro@codesourcery.com>
11021
11022 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11023 (remote_open): Set or clear transport_is_reliable.
11024 (putpkt_binary): Don't expect acks in noack mode.
11025 (getpkt): Don't send ack/nac in noack mode.
11026 * server.c (handle_general_set): Handle QStartNoAckMode.
11027 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11028 qSupported.
11029 (main): Reset noack_mode on every connection.
11030 * server.h (noack_mode): Declare.
11031
a417dc56
RW
110322008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11033
11034 * Makefile.in (GDBREPLAY_OBS): New variable.
11035 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11036
3221518c
UW
110372008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11038 Daniel Jacobowitz <dan@codesourcery.com>
11039
11040 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11041 (usr_store_inferior_registers): Likewise.
11042 (regsets_store_inferior_registers): Likewise.
11043
ec56be1b
PA
110442008-07-31 Rolf Jansen <rj@surtec.com>
11045 Pedro Alves <pedro@codesourcery.com>
11046
11047 * configure.ac: Check for memmem declaration.
11048 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11049 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11050 (disable_packet_qfThreadInfo): Unconditionally compile.
11051 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11052 * configure, config.in: Regenerate.
11053
2fe5e3ff
DE
110542008-07-28 Doug Kwan <dougkwan@google.com>
11055
11056 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11057 (linux_write_memory): Remove declaration of errno.
11058
836acd6d
UW
110592008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11060
11061 * linux-low.c (handle_extended_wait): Do not use "status"
11062 variable uninitialized.
11063
aeba519e
PA
110642008-07-07 Pedro Alves <pedro@codesourcery.com>
11065
11066 * server.c (handle_v_attach): Inhibit reporting dll changes.
11067
db42f210
PA
110682008-06-27 Pedro Alves <pedro@codesourcery.com>
11069
11070 * remote-utils.c (prepare_resume_reply): If requested, don't
11071 output "thread:TID" in the T stop reply.
11072
11073 * server.c (disable_packet_vCont, disable_packet_Tthread)
11074 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11075 (handle_query): If requested, disable support for qC, qfThreadInfo
11076 and qsThreadInfo.
11077 (handle_v_requests): If requested, disable support for vCont.
11078 (gdbserver_show_disableable): New.
11079 (main): Handle --disable-packet and --disable-packet=LIST.
11080
11081 * server.h (disable_packet_vCont, disable_packet_Tthread)
11082 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11083
8e4c5421
CD
110842008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11085
11086 * server.c (gdbserver_usage): Mention --version.
11087
6e23a804
DJ
110882008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11089
11090 * Makefile.in (gdbreplay.o): New rule.
11091
90aa6a40
JM
110922008-06-06 Joseph Myers <joseph@codesourcery.com>
11093
11094 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11095 message, not gdbserver.
11096
c16158bc 110972008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11098 Nathan Sidwell <nathan@codesourcery.com>
11099 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11100
11101 * acinclude.m4: Include ../../config/acx.m4.
11102 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11103 * configure, config.in: Regenerate.
11104 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11105 * server.c (gdbserver_version): Print PKGVERSION.
11106 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11107 (main): Adjust gdbserver_usage calls.
11108 * gdbreplay.c (version, host_name): Add declarations.
11109 (gdbreplay_version, gdbreplay_usage): New.
11110 (main): Accept --version and --help options.
11111
aeb75bf5
DJ
111122008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11113
11114 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11115 (arm_breakpoint_at): Handle Thumb.
11116 (the_low_target): Add comment.
11117
76b233dd
UW
111182008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11119
11120 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11121
08388c79
DE
111222008-05-09 Doug Evans <dje@google.com>
11123
a3c83fae
DE
11124 * server.h (decode_search_memory_packet): Declare.
11125 * remote-utils.c (decode_search_memory_packet): New fn.
11126 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11127 (handle_search_memory): New fn.
11128 (handle_query): Process qSearch:memory packets.
11129
bb9c3d36
UW
111302008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11131
11132 * regcache.c (registers_length): Remove.
11133 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11134 full register packet.
11135 * regcache.h (registers_length): Remove prototype.
11136 * server.h (PBUFSIZ): Define to 16384.
11137
7284e1be
UW
111382008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11139
11140 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11141 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11142 powerpc-64l.o, and powerpc-altivec64l.o.
11143 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11144 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11145 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11146 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11147 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11148 to srv_xmlfiles.
11149
11150 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11151 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11152 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11153 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11154 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11155 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11156 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11157 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11158 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11159 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11160 (clean): Update.
11161
11162 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11163 (init_registers_powerpc_32l): ... this new prototype.
11164 (init_registers_powerpc_32): Remove, replace by ...
11165 (init_registers_powerpc_altivec32l): ... this new prototype.
11166 (init_registers_powerpc_e500): Remove, replace by ...
11167 (init_registers_powerpc_e500l): ... this new prototype.
11168 (init_registers_ppc64): Remove, replace by ...
11169 (init_registers_powerpc_64l): ... this new prototype.
11170 (init_registers_powerpc_64): Remove, replace by ...
11171 (init_registers_powerpc_altivec64l): ... this new prototype.
11172 (ppc_num_regs): Set to 73.
11173 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11174 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11175 (ppc_cannot_store_register): Handle orig_r3 and trap.
11176 (ppc_arch_setup): Update init_registers_... calls.
11177 (ppc_fill_gregset): Handle orig_r3 and trap.
11178
11179 * inferiors.c (clear_inferiors): Reset current_inferior.
11180
fdc59709
PB
111812008-04-23 Paolo Bonzini <bonzini@gnu.org>
11182
889bf7c5
PA
11183 * acinclude.m4: Add override.m4.
11184 * configure: Regenerate.
fdc59709 11185
c9b2f845
UW
111862008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11187
11188 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11189 initial call to init_register_ppc64.
11190
550512b8
UW
111912008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11192
43aaf8b6
PA
11193 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11194 single powerpc*-*-linux* case.
550512b8
UW
11195 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11196
b6430ec3
UW
111972008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11198
11199 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11200 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11201 from reg_xmlfiles.
11202 * linux-ppc-low.c: Include <elf.h>.
11203 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11204 (ppc_hwcap): New global variable.
11205 (ppc_regmap): Remove __SPE__ #ifdef sections.
11206 (ppc_regmap_e500): New global variable.
11207 (ppc_cannot_store_register): Update __SPE__ special case.
11208 (ppc_get_hwcap): New function.
11209 (ppc_arch_setup): Use it to determine whether inferior supports
11210 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11211 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11212 Do not access registers if target does not support AltiVec.
11213 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11214 Do not access registers if target does not support SPE.
11215 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11216
52fa2412
UW
112172008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11218
11219 * linux-low.c (disabled_regsets, num_regsets): New.
11220 (use_regsets_p): Delete.
11221 (linux_wait_for_process): Clear disabled_regsets.
11222 (regsets_fetch_inferior_registers): Check and set it.
11223 (regsets_store_inferior_registers): Likewise.
11224 (linux_fetch_registers, linux_store_registers): Do not use
11225 use_regsets_p.
11226 (initialize_low): Allocate disabled_regsets.
11227
e28b3332
DJ
112282008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11229
11230 * Makefile.in (LIBOBJS): New.
11231 (OBS): Use LIBOBJS.
11232 (memmem.o): New rule.
11233 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11234 * configure: Regenerated.
11235
4536995d
UW
112362008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11237
11238 * server.c (handle_query): Never return "unsupported" for
11239 qXfer:features:read queries.
11240
221c031f
UW
112412008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11242
11243 * server.c (get_features_xml): Fix inverted condition.
11244 (handle_query): Always support qXfer:feature:read.
11245
ccd213ac
DJ
112462008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11247
11248 * server.c (wrapper_argv): New.
11249 (start_inferior): Handle wrapper_argv. If set, expect an extra
11250 trap.
11251 (gdbserver_usage): Document --wrapper.
11252 (main): Parse --wrapper.
11253
6fe305f7
UW
112542008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11255
11256 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11257 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11258 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11259 (ppc_set_pc): Likewise.
11260 (ppc_arch_setup): New function.
11261 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11262 of collect_register.
889bf7c5 11263 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11264
5b0a002e
UW
112652008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11266
11267 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11268 instead of linux-ppc64-low.o.
11269 * linux-ppc64-low.c: Remove file.
11270 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11271 (linux-ppc64-low.o): Remove rule.
11272
11273 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11274 (init_registers_powerpc_64): Likewise.
11275 (ppc_regmap): Conditionally define depending on __powerpc64__.
11276 (ppc_cannot_store_register): Do not special-case "fpscr" when
11277 compiled on __powerpc64__.
11278 (ppc_collect_ptrace_register): New function.
11279 (ppc_supply_ptrace_register): New function.
11280 (ppc_breakpoint): Change type to "unsigned int".
11281 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11282 (the_low_target): Conditionally provide initializers for the
889bf7c5 11283 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11284 collect_ptrace_register and supply_ptrace_register members.
11285
9b4b61c8
UW
112862008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11287
11288 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11289 * server.c (gdbserver_xmltarget): Define.
11290 (get_features_xml): Use it to replace "target.xml" and arch_string.
11291
11292 * configure.srv: Remove srv_xmltarget. Add XML files that were
11293 mentioned there to srv_xmlfiles instead. Remove conditional tests
11294 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11295 srv_xmlfiles and srv_regobj to include all possible choices.
11296 * configure.ac (srv_xmltarget): Remove.
11297 (srv_xmlfiles): Do not add "target.xml".
11298 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11299 checks for supplementary target information.
11300 * configure: Regenerate.
11301 * Makefile.in (XML_TARGET): Remove.
11302 (target.xml): Remove rule.
11303 (clean): Do not clean up target.xml.
11304 (.PRECIOUS): Do not mention target.xml.
11305
11306 * target.h (struct target_ops): Remove arch_string member.
11307 * linux-low.c (linux_arch_string): Remove.
11308 (linux_target_ops): Remove arch_string initializer.
11309 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11310 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11311 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11312 * spu-low.c (spu_arch_string): Remove.
11313 (spu_target_ops): Remove arch_string initializer.
11314 * win32-low.c (win32_arch_string): Remove.
11315 (win32_target_ops): Remove arch_string initializer.
11316 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11317 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11318 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11319
ee1a7ae4
UW
113202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11321
11322 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11323 by collect_ptrace_register and supply_ptrace_register hooks.
11324 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11325 instead of checking for the_low_target.left_pad_xfer.
11326 (usr_store_inferior_registers): Use collect_ptrace_register callback
11327 instead of checking for the_low_target.left_pad_xfer.
11328
11329 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11330 (s390_supply_ptrace_register): Likewise.
11331 (s390_fill_gregset): Call s390_collect_ptrace_register.
11332 (the_low_target): Update.
11333
11334 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11335 (ppc_supply_ptrace_register): Likewise.
11336 (the_low_target): Update.
11337
11338 * linux-i386-low.c (the_low_target): Update.
11339 * linux-x86-64-low.c (the_low_target): Update.
11340
d61ddec4
UW
113412008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11342
11343 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11344 reg-s390.o and reg-s390x.o.
11345
11346 * linux-low.c (new_inferior): New global variable.
11347 (linux_create_inferior, linux_attach): Set it.
11348 (linux_wait_for_process): Call the_low_target.arch_setup after the
11349 target has stopped for the first time.
11350 (initialize_low): Do not call the_low_target.arch_setup.
11351
11352 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11353 (s390_set_pc): Likewise.
11354 (s390_arch_setup): New function.
11355 (the_low_target): Use s390_arch_setup as arch_setup routine.
11356
11357 * regcache.c (realloc_register_cache): New function.
11358 (set_register_cache): Call it for each existing regcache.
11359
d05b4ac3
UW
113602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11361
11362 * server.h (init_registers): Remove prototype.
11363
11364 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11365 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11366 instead of init_registers ().
11367 * linux-arm-low.c (init_registers_arm): Add prototype.
11368 (init_registers_arm_with_iwmmxt): Likewise.
11369 (the_low_target): Add initializer for arch_setup field.
11370 * linux-cris-low.c (init_registers_cris): Add prototype.
11371 (the_low_target): Add initializer for arch_setup field.
11372 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11373 (the_low_target): Add initializer for arch_setup field.
11374 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11375 (the_low_target): Add initializer for arch_setup field.
11376 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11377 (the_low_target): Add initializer for arch_setup field.
11378 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11379 (the_low_target): Add initializer for arch_setup field.
11380 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11381 (the_low_target): Add initializer for arch_setup field.
11382 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11383 (init_registers_mips64_linux): Likewise.
11384 (the_low_target): Add initializer for arch_setup field.
11385 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11386 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11387 (the_low_target): Add initializer for arch_setup field.
11388 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11389 (init_registers_powerpc_64): Likewise.
11390 (the_low_target): Add initializer for arch_setup field.
11391 * linux-s390-low.c (init_registers_s390): Add prototype.
11392 (init_registers_s390x): Likewise.
11393 (the_low_target): Add initializer for arch_setup field.
11394 * linux-sh-low.c (init_registers_sh): Add prototype.
11395 (the_low_target): Add initializer for arch_setup field.
11396 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11397 (the_low_target): Add initializer for arch_setup field.
11398 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11399 (the_low_target): Add initializer for arch_setup field.
11400
11401 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11402 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11403 instead of init_registers ().
11404 * win32-arm-low.c (init_registers_arm): Add prototype.
11405 (the_low_target): Add initializer for arch_setup field.
11406 * win32-i386-low.c (init_registers_i386): Add prototype.
11407 (the_low_target): Add initializer for arch_setup field.
11408
11409 * spu-low.c (init_registers_spu): Add prototype.
11410 (initialize_low): Call initialie_registers_spu () instead of
11411 initialize_registers ().
11412
fd96d250
PA
114132008-02-19 Pedro Alves <pedro@codesourcery.com>
11414
11415 * server.c (handle_v_requests): When handling the vRun and vAttach
11416 packets, if already debugging a process, don't kill it. Return an
11417 error instead.
11418
d41b6bb4
DJ
114192008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11420
11421 * server.c (handle_query): Correct length check.
11422
5ac588cf
PA
114232008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11424
11425 * win32-low.c (do_initial_child_stuff): Add process handle
11426 parameter. Set current_process_handle and current_process_id from the
11427 parameters. Clear globals.
11428 (win32_create_inferior): Don't set current_process_handle and
11429 current_process_id here. Instead pass them on the call to
11430 do_initial_child_stuff.
11431 (win32_attach): Likewise.
11432 (win32_clear_inferiors): New.
11433 (win32_kill): Don't close the current process handle or the
11434 current thread handle here. Instead call win32_clear_inferiors.
11435 (win32_detach): Don't open a new handle to the process. Call
11436 win32_clear_inferiors.
11437 (win32_join): Don't rely on current_process_handle; open a new
11438 handle using the process id.
11439 (win32_wait): Call win32_clear_inferiors when the inferior process
11440 has exited.
11441
ecd7ecbc
DJ
114422008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11443
11444 * server.c (monitor_show_help): Add "exit".
11445
1525d545
MG
114462008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11447
ecd7ecbc 11448 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11449 (clean): Add reg-xtensa.c.
11450 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11451 * configure.srv (xtensa*-*-linux*) New target.
11452 * linux-xtensa-low.c: New.
11453 * xtensa-xtregs.c: New.
1525d545 11454
59a016f0
PA
114552008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11456
11457 * hostio.c: Don't include errno.h.
11458 (errno_to_fileio_errno): Move to hostio-errno.
11459 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11460 error number outputting to the target->hostio_last_error callback.
11461 (hostio_packet_error): Use FILEIO_EINVAL directly.
11462 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11463 calls to hostio_error.
11464 * hostio-errno.c: New.
11465 * server.h (hostio_last_error_from_errno): Declare.
11466 * target.h (target_ops): Add hostio_last_error member.
11467 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11468 as hostio_last_error handler.
889bf7c5 11469 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11470 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11471 (wince_hostio_last_error): New functions.
11472 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11473 as hostio_last_error handler.
11474 (win32_target_ops) [!_WIN32_WCE]: Register
11475 hostio_last_error_from_errno as hostio_last_error handler.
11476 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11477 (hostio-errno.o): New rule.
11478 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11479 * configure.srv (srv_hostio_err_objs): New variable. Default to
11480 hostio-errno.o.
11481 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11482 * configure: Regenerate.
11483
2d717e4f
DJ
114842008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11485
11486 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11487 (linux_kill, linux_detach): Clean up the process list.
11488 * remote-utils.c (remote_open): Improve port number parsing.
11489 (putpkt_binary, input_interrupt): Only send interrupts if the target
11490 is running.
11491 * server.c (extended_protocol): Make static.
11492 (attached): Define earlier.
11493 (exit_requested, response_needed, program_argv): New variables.
11494 (target_running): New.
11495 (start_inferior): Clear attached here.
11496 (attach_inferior): Set attached here.
11497 (require_running): Define.
11498 (handle_query): Use require_running and target_running. Implement
11499 "monitor exit".
11500 (handle_v_attach, handle_v_run): New.
11501 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11502 (gdbserver_usage): Update.
11503 (main): Redo argument parsing. Handle --debug and --multi. Handle
11504 --attach along with other options or after the port. Save
11505 program_argv. Support no initial program. Resynchronize
11506 communication with GDB after an error. Handle "monitor exit".
11507 Use require_running and target_running. Always allow the extended
11508 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11509 restart in extended mode.
11510 * README: Refer to the GDB manual. Update --attach usage.
11511
7407e2de
AS
115122007-12-20 Andreas Schwab <schwab@suse.de>
11513
11514 * linux-low.c (STACK_SIZE): Define.
11515 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11516 (linux_test_for_tracefork): Likewise.
11517
b65d95c5
DJ
115182007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11519
11520 * linux-low.c (linux_wait_for_event): Update messages. Do not
11521 reinsert auto-delete breakpoints.
11522 * mem-break.c (struct breakpoint): Change return type of handler to
11523 int.
11524 (set_breakpoint_at): Update handler type.
11525 (reinsert_breakpoint_handler): Return 1 instead of calling
11526 delete_breakpoint.
11527 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11528 setting a new one.
11529 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11530 * mem-break.h (set_breakpoint_at): Update handler type.
11531 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11532 * win32-low.c (auto_delete_breakpoint): New.
11533 (get_child_debug_event): Use it.
11534
4e799345
DJ
115352007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11536
11537 * configure.ac: Check for pread and pwrite.
11538 * hostio.c (handle_pread): Fall back to lseek and read.
11539 (handle_pwrite): Fall back to lseek and write.
11540 * config.in, configure: Regenerated.
11541
27524b67
DJ
115422007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11543
11544 * server.c (myresume): Add own_buf argument.
11545 (main): Update calls.
11546
a20d5e98
DJ
115472007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11548
11549 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11550 * remote-utils.c (remote_open): Do not call disable_async_io.
11551 (block_async_io): Delete.
11552 (unblock_async_io): Make static.
11553 (initialize_async_io): New.
11554 * server.c (handle_v_cont): Handle async I/O here.
11555 (myresume): Likewise. Move other common resume tasks here...
11556 (main): ... from here. Call initialize_async_io. Disable async
11557 I/O before the main loop.
11558 * server.h (initialize_async_io): Declare.
11559 (block_async_io, unblock_async_io): Delete prototypes.
11560 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11561
b79d787e
DJ
115622007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11563
11564 * remote-utils.c (readchar): Allow binary data in received messages.
11565
d97903b2
PA
115662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11567
11568 * win32-low.c (attaching): New global.
11569 (win32_create_inferior): Clear the `attaching' global.
11570 (win32_attach): Set the `attaching' global.
11571 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11572 attaching. Only set a breakpoint at the entry point if not
11573 attaching.
11574
311de423
PA
115752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11576
11577 * server.c (main): Don't report dll events on the initial
11578 connection on attaches.
11579
6c2d16d2
PA
115802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11581
11582 * server.c (main): Relax numerical bases supported for the pid of
11583 the --attach command line argument.
11584
5ca906e6
PA
115852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11586
11587 * win32-low.c (win32_attach): Call OpenProcess before
11588 DebugActiveProcess, not after. Add last error output to error
11589 call.
11590
9c6c8194
PA
115912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11592
11593 * win32-low.c (win32_get_thread_context)
11594 (win32_set_thread_context): New functions.
11595 (thread_rec): Use win32_get_thread_context.
11596 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11597 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11598 field.
11599
4d5d1aaa
PA
116002007-12-03 Leo Zayas
11601 Pedro Alves <pedro_alves@portugalmail.pt>
11602
11603 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11604 global variables.
11605 (child_add_thread): Minor cleanup.
11606 (child_continue): Resume artificially suspended threads before
11607 calling ContinueDebugEvent.
11608 (suspend_one_thread): New.
11609 (fake_breakpoint_event): New.
11610 (get_child_debug_event): Change return type to int. Check here if
11611 gdb sent an interrupt request. If a soft interrupt was requested,
11612 fake a breakpoint event. Return 0 if there is no event to handle,
11613 and 1 otherwise.
11614 (win32_wait): Don't check here if gdb sent an interrupt request.
11615 Ensure there is a valid event to handle.
11616 (win32_request_interrupt): Add soft interruption method as last
11617 resort.
11618
c436e841
PA
116192007-12-03 Leo Zayas
11620 Pedro Alves <pedro_alves@portugalmail.pt>
11621
11622 * win32-low.h (win32_thread_info): Add descriptions to the
11623 structure members. Replace `suspend_count' counter by a
11624 `suspended' flag.
11625 * win32-low.c (thread_rec): Update condition of when to get the
11626 context from the inferior. Rely on ContextFlags being set if it
11627 has already been retrieved. Only suspend the inferior thread if
11628 we haven't already. Warn if that fails.
11629 (continue_one_thread): s/suspend_count/suspended/. Only call
11630 ResumeThread once. Warn if that fails.
11631
e7b5fa67
PA
116322007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11633
11634 * win32-low.c (win32_wait): Don't read from the inferior when it
11635 has already exited.
11636
a385171d
PA
116372007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11638
11639 * Makefile.in (win32_low_h): New variable.
11640 (win32-low.o): Add dependency on $(win32_low_h).
11641 (win32-arm-low.o, win32-i386-low.o): New rules.
11642
f80c84b3
DJ
116432007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11644
11645 * hostio.c: Correct copyright year.
11646
a6b151f1
DJ
116472007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11648
11649 * Makefile.in (OBS): Add hostio.o.
11650 (hostio.o): New rule.
11651 * server.h (handle_vFile): Declare.
11652 * hostio.c: New file.
11653 * server.c (handle_v_requests): Take packet_len and new_packet_len
11654 for binary packets. Call handle_vFile.
11655 (main): Update call to handle_v_requests.
11656
f9387fc3
DJ
116572007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11658
11659 * linux-low.c: Include <sched.h>.
11660
51c2684e
DJ
116612007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11662
11663 * linux-low.c (linux_tracefork_grandchild): New.
11664 (linux_tracefork_child): Use clone.
11665 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11666
75f83163
JB
116672007-10-31 Joel Brobecker <brobecker@adacore.com>
11668
11669 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11670
da5898ce
DJ
116712007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11672
11673 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11674
24a09b5f
DJ
116752007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11676
11677 * inferiors.c (change_inferior_id): Delete.
11678 (add_pid_to_list, pull_pid_from_list): New.
11679 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11680 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11681 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11682 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11683 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11684 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11685 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11686 (using_threads): Always set to 1.
11687 (handle_extended_wait): New.
11688 (add_process): Do not set TID.
11689 (linux_create_inferior): Set must_set_ptrace_flags.
11690 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11691 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11692 (linux_thread_alive): Rename TID argument to LWPID.
11693 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11694 (linux_wait_for_event): Do not use TID or check using_threads. Update
11695 call to dead_thread_notify. Call handle_extended_wait.
11696 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11697 (send_sigstop): Delete sigstop_sent.
11698 (wait_for_sigstop): Avoid TID.
11699 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11700 (linux_test_for_tracefork): New.
11701 (linux_lookup_signals): Use thread_db_active and
11702 linux_supports_tracefork_flag.
11703 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11704 * linux-low.h (get_process_thread): Avoid TID.
11705 (struct process_ifo): Move thread_known and tid to the end. Remove
11706 sigstop_sent.
11707 (linux_attach_lwp, thread_db_init): Update prototypes.
11708 * server.h (change_inferior_id): Delete prototype.
11709 (add_pid_to_list, pull_pid_from_list): New prototypes.
11710 * thread-db.c (thread_db_use_events): New.
11711 (find_first_thread): Rename to...
11712 (find_one_thread): ...this. Update callers and messages. Do not
11713 call fatal. Check thread_db_use_events. Do not call
11714 change_inferior_id or new_thread_notify.
11715 (maybe_attach_thread): Update. Do not call new_thread_notify.
11716 (thread_db_init): Set thread_db_use_events. Check use_events.
11717 * utils.c (fatal, warning): Correct message prefix.
11718
30ed0a8f
DJ
117192007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11720
11721 * Makefile.in (clean): Remove new files.
11722 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11723 (powerpc-64.o, powerpc-64.c): New rules.
11724 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11725 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11726 with SPE.
11727 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11728 SPE targets.
11729 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11730 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11731 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11732 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11733 (target_regsets): Add AltiVec and SPE register sets.
11734 * configure.ac: Check for AltiVec and SPE.
11735 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11736 (ppc_fill_vrregset, ppc_store_vrregset): New.
11737 (target_regsets): Add AltiVec register set.
11738 * configure: Regenerated.
11739
fd462a61
DJ
117402007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11741
11742 * linux-low.c (O_LARGEFILE): Define.
11743 (linux_read_memory): Use /proc/PID/mem.
11744 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11745 * configure, config.in: Regenerated.
11746
69f223ed
DJ
117472007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11748
11749 * linux-low.c (linux_wait_for_event): Do not pass signals while
11750 single-stepping.
11751
aec18585
PA
117522007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11753
11754 * win32-low.c (create_process): New.
11755 (win32_create_inferior): Use create_process instead of
11756 CreateProcess. If create_process failed retry appending an ".exe"
11757 suffix. Store the GetLastError result immediatelly after
11758 create_process calls and use it on the call to error.
11759
34d86ddd
PA
117602007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11761
11762 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11763
5a0e3bd0
JB
117642007-08-23 Joel Brobecker <brobecker@adacore.com>
11765
11766 * configure.ac: Switch license to GPLv3.
11767
f88c79e6
MS
117682007-08-01 Michael Snyder <msnyder@access-company.com>
11769
11770 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11771
6b3d9b83
PA
117722007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11773
11774 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11775 typedef.
11776 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11777 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11778 CloseToolhelp32Snapshot.
11779 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11780 CloseToolhelp32Snapshot.
11781
c588c53c
MS
117822007-07-27 Michael Snyder <michael.snyder@access-company.com>
11783
11784 * server.c (main): Check for inferior exit before main loop.
11785
aa0403d9
PA
117862007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11787
11788 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11789 instead of on tmp_desc.
11790
255e7678
DJ
117912007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11792 Daniel Jacobowitz <dan@codesourcery.com>
11793
11794 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11795 (add_thread): Minor cleanups.
11796 (clear_inferiors): Move lower in the file. Clear the DLL
11797 list.
11798 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11799 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11800 (xml_escape_text): New.
11801 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11802 for qSupported.
11803 (handle_v_cont): Report errors.
11804 (gdbserver_version): Update.
11805 (main): Correct size of own_buf. Do not report initial DLL events.
11806 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11807 (unloaded_dll, xml_escape_text): New.
11808 * win32-low.c (enum target_waitkind): Update comments.
11809 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11810 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11811 (win32_EnumProcessModules, win32_GetModuleInformation)
11812 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11813 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11814 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11815 (win32_Module32First, win32_Module32Next, load_toolhelp)
11816 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11817 (get_child_debug_event): Handle DLL events.
11818 (win32_wait): Likewise.
11819
0d37add9
DJ
118202007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11821
11822 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11823 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11824
45e2715e
PA
118252007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11826
11827 * win32-low.c (handle_output_debug_string): Ignore event if not
11828 waiting.
11829
c5674cf1
PA
118302007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11831
11832 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11833
2bbe3cc1
DJ
118342007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11835
11836 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11837
ae13219e
DJ
118382007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11839
11840 * inferiors.c (change_inferior_id): Add comment.
11841 * linux-low.c (check_removed_breakpoint): Add an early
11842 prototype. Improve debug output.
11843 (linux_attach): Doc update.
11844 (linux_detach_one_process, linux_detach): Clean up before releasing
11845 each process.
11846 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11847 * linux-low.h (struct process_info): Doc improvement.
11848 * mem-break.c (delete_all_breakpoints): New.
11849 * mem-break.h (delete_all_breakpoints): New prototype.
11850 * thread-db.c (find_first_thread): New.
11851 (thread_db_create_event): Call it instead of
11852 thread_db_find_new_threads. Clean up unused variables.
11853 (maybe_attach_thread): Remove first thread handling.
11854 (thread_db_find_new_threads): Use find_first_thread.
11855 (thread_db_get_tls_address): Likewise.
11856
4105de34
DJ
118572007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11858
11859 * thread-db.c (thread_db_find_new_threads): Add prototype.
11860 (thread_db_create_event): Check for the main thread before adding
11861 a new thread.
11862 (maybe_attach_thread): Only enable event reporting if TID == 0.
11863 (thread_db_get_tls_address): Check for new threads.
11864
2b876972
DJ
118652007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11866
11867 * linux-low.c (linux_create_inferior): Try execv before execvp.
11868 * spu-low.c (spu_create_inferior): Likewise.
11869
7a245884
DJ
118702007-06-13 Mike Frysinger <vapier@gentoo.org>
11871
11872 * linux-low.c (linux_create_inferior): Change execv to execvp.
11873 * spu-low.c (spu_create_inferior): Likewies.
11874
117ce543
DJ
118752007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11876
11877 * Makefile.in (clean): Clean new files instead of deleted ones.
11878 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11879 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11880 rules.
11881 * configure.srv: Specify XML files and new regformats for MIPS and
11882 MIPS64 GNU/Linux.
11883 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11884 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11885 an entry for the restart register.
11886 (mips_cannot_fetch_register, mips_cannot_store_register)
11887 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11888 register names to match the XML descriptions.
11889 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11890 restart register instead of $0.
11891
0e7f50da
UW
118922007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11893 Markus Deuling <deuling@de.ibm.com>
11894
11895 * remote-utils.c (decode_xfer_write): New function.
11896 * server.h (decode_xfer_write): Add prototype.
11897 * server.c (handle_query): Add PACKET_LEN argument. Support
11898 qXfer:spu:read and qXfer:spu:write packets.
11899 (main): Pass packet_len to handle_query.
11900 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11901 * target.h (target_ops): Add qxfer_spu.
11902
374c1d38
UW
119032007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11904
11905 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11906 accessing non-seekable spufs files.
11907
bb63802a
UW
119082007-05-16 Markus Deuling <deuling@de.ibm.com>
11909
889bf7c5 11910 * server.c (handle_query): Add reply for qC packet.
bb63802a 11911
7390519e
PA
119122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11913 Leo Zayas <lerele@champenstudios@com>
11914
11915 * server.h (check_remote_input_interrupt_request): New function.
11916 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11917 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11918 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11919 (check_remote_input_interrupt_request): New function.
11920 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11921 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11922 winapi_GenerateConsoleCtrlEvent): New typedefs.
11923 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11924 to 250 ms.
11925 (win32_wait): Check for remote interrupt request
11926 with check_remote_input_interrupt_request.
11927 (win32_request_interrupt): New function.
11928 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11929
34b34921
PA
119302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11931
11932 * win32-low.c (debug_registers_changed,
11933 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11934 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11935 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11936 (thread_rec): Get context using the low target.
11937 (child_add_thread): Call thread_added on the low target,
11938 which does the same thing.
11939 (regptr): Delete.
11940 (do_initial_child_stuff): Remove debug registers references.
11941 Set context using the low target. Resume threads after
11942 setting the contexts.
11943 (child_continue): Remove dead variable. Remove debug
11944 registers references.
11945 (child_fetch_inferior_registers): Go through the low target.
11946 (do_child_store_inferior_registers): Remove.
11947 (child_store_inferior_registers): Go through the low target.
11948 (win32_resume): Remove debug registers references.
11949 Set context using the low target.
11950 (handle_exception): Change return type to void. Don't record
11951 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11952 first chance exception.
889bf7c5 11953 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11954 goto loop. Always return after waiting for debug event.
11955 (win32_wait): Convert to switch statement. Handle spurious
11956 events.
11957
11958 * win32-i386-low.c (debug_registers_changed,
11959 debug_registers_used): New.
11960 (initial_stuff): Rename to ...
11961 (i386_initial_stuff): ... this. Clear debug registers
11962 state variables.
11963 (store_debug_registers): Delete.
11964 (i386_get_thread_context): New.
11965 (load_debug_registers): Delete.
11966 (i386_set_thread_context): New.
11967 (i386_thread_added): New.
11968 (single_step): Rename to ...
11969 (i386_single_step): ... this.
11970 (do_fetch_inferior_registers): Rename to ...
11971 (i386_fetch_inferior_register): ... this.
11972 (i386_store_inferior_register): New.
11973 (the_low_target): Adapt to new interface.
11974
11975 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11976 (arm_get_thread_context): New.
11977 (arm_set_thread_context): New.
11978 (regptr): New.
11979 (do_fetch_inferior_registers): Rename to ...
11980 (arm_fetch_inferior_register): ... this.
11981 (arm_store_inferior_register): New.
11982 (arm_wince_breakpoint): Reimplement as unsigned long.
11983 (arm_wince_breakpoint_len): Define.
11984 (the_low_target): Adapt to new interface.
11985
11986 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11987 load_debug_registers. Add get_thread_context, set_thread_context,
11988 thread_added and store_inferior_register. Rename
11989 fetch_inferior_registers to fetch_inferior_register.
11990 (regptr): Remove declaration.
11991
dd6953e1
PA
119922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11993
11994 * linux-low.c (linux_detach): Change return type to int. Return 0.
11995 * spu-low.c (spu_detach): Likewise.
11996
444d6139
PA
119972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11998
11999 * target.h (target_ops): Change return type of detach to int.
12000 Add join.
12001 (join_inferior): New.
12002 * server.c (main): Don't skip detach support on mingw32.
12003 If the inferior doesn't support detaching return error.
12004 Call join_inferior instead of using waitpid.
12005 * linux-low.c (linux_join): New.
12006 (linux_target_op): Add linux_join.
12007 * spu-low.c (spu_join): New.
12008 (spu_target_ops): Add spu_join.
12009 * win32-low.c (win32_detach): Adapt to new interface.
12010 Reopen current_process_handle before detaching. Issue a child
12011 resume before detaching.
12012 (win32_join): New.
12013 (win32_target_op): Add win32_join.
12014
1d5315fe
PA
120152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12016
12017 * win32-low.c (win32-attach): Fix return value.
12018 * target.h (target_ops): Describe ATTACH return values.
12019
bf914831
PA
120202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12021
12022 * win32-low.c (GETPROCADDRESS): Define.
12023 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12024 (winapi_DebugSetProcessKillOnExit): Likewise.
12025 (win32_create_inferior): Force usage of ansi CreateProcessA.
12026 (win32_attach): Use GETPROCADDRESS.
12027 (win32_detach): Likewise.
12028
f72f3e60
PA
120292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12030
12031 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12032
ed50f18f
PA
120332007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12034
12035 * win32-low.c: Commit leftover changes from 2007-03-29.
12036
0c2ead7e
DJ
120372007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12038
12039 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12040 fields short instead of int. Add explicit padding.
12041 (i387_cache_to_fsave): Remove unnecessary casts.
12042 (i387_fsave_to_cache): Doc fix.
12043 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12044
73725ff3
DJ
120452007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12046
12047 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12048 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12049
d99f33d8
PA
120502007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12051
12052 * configure.srv (arm*-*-mingw32ce*): Move near the other
12053 arm targets.
12054
68070c10
PA
120552007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12056
2482afc6 12057 * configure.ac: Add errno checking.
68070c10
PA
12058 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12059 sys/file.h and malloc.h.
12060 (AC_CHECK_DECLS): Add perror.
12061 (srv_mingwce): Handle.
2482afc6 12062 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12063 win32-i386-low.o to srv_tgtobj.
12064 (i[34567]86-*-mingw*): Likewise.
12065 (arm*-*-mingw32ce*): Add case.
12066 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12067 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12068 [__MINGW32CE__] (strerror): New function.
12069 [__MINGW32CE__] (errno): Define to GetLastError.
12070 [__MINGW32CE__] (COUNTOF): New macro.
12071 (remote_open): Remove extra close call.
12072 * mem-break.c (delete_breakpoint_at): New function.
12073 * mem-break.h (delete_breakpoint_at): Declare.
12074 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12075 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12076 [USE_WIN32API] (read, write): Add char* casts.
12077 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12078 * server.h: Include wincecompat.h on Windows CE.
12079 [HAVE_ERRNO_H]: Check.
12080 (perror): Declare if not declared.
12081 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12082 (perror_with_name): Remove errno declaration.
12083 * wincecompat.h: New.
12084 * wincecompat.c: New.
12085 * win32-low.h: New.
12086 * win32-arm-low.c: New.
12087 * win32-i386-low.c: New.
12088 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12089 (OUTMSG2): Make it safe.
12090 (_T): New macro.
12091 (COUNTOF): New macro.
12092 (NUM_REGS): Get it from the low target.
12093 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12094 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12095 (thread_rec): Let low target handle debug registers.
12096 (child_add_thread): Likewise.
12097 (child_init_thread_list): Likewise.
12098 (continue_one_thread): Likewise.
12099 (regptr): New.
12100 (do_child_fetch_inferior_registers): Move to ...
12101 * win32-i386-low.c: ... here, and rename to ...
12102 (do_fetch_inferior_registers): ... this.
889bf7c5 12103 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12104 Go through the low target.
12105 (do_child_store_inferior_registers): Use regptr.
12106 (strwinerror): New function.
12107 (win32_create_inferior): Handle Windows CE.
12108 Use strwinerror instead of strerror on Windows error
12109 codes. Add program to the error output.
12110 Don't close the main thread handle on Windows CE.
12111 (win32_attach): Use coredll.dll on Windows CE.
12112 (win32_kill): Close current process and current
12113 thread handles.
12114 (win32_detach): Use coredll.dll on Windows CE.
12115 (win32_resume): Let low target handle debug registers, and
12116 step request.
12117 (handle_exception): Add/Remove initial breakpoint. Avoid
12118 non-existant WSTOPSIG on Windows CE.
12119 (win32_read_inferior_memory): Cast to remove warning.
12120 (win32_arch_string): Go through the low target.
12121 (initialize_low): Call set_breakpoint_data with the low
12122 target's breakpoint.
12123 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12124 FOP_REGNUM, mappings): Move to ...
12125 * win32-i386-low.c: ... here.
12126 * win32-low.c (win32_thread_info): Move to ...
12127 * win32-low.h: ... here.
12128 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12129 win32-arm-low.c and wincecompat.c.
12130 (all:): Add $EXEEXT.
12131 (install-only:): Likewise.
12132 (gdbserver:): Likewise.
12133 (gdbreplay:): Likewise.
12134 * config.in: Regenerate.
12135 * configure: Regenerate.
12136
41093d81
PA
121372007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12138
12139 * win32-low.c: Rename typedef thread_info to
12140 win32_thread_info throughout.
12141
544afa54
PA
121422007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12143
12144 * win32-i386-low.c: Rename to ...
12145 * win32-low.c: ... this.
12146 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12147 * Makefile.in: Likewise.
12148
bce7165d
PA
121492007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12150
12151 * remote-utils.c (monitor_output): Constify msg parameter.
12152 * server.h (monitor_output): Likewise.
12153 * win32-i386-low.c (handle_output_debug_string): New.
12154 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12155 handle_output_debug_string.
12156 (get_child_debug_event): Likewise.
12157
506c7aa0
DJ
121582007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12159
12160 * server.c (main): Correct strtoul check.
12161
42c81e2a
DJ
121622007-03-27 Jon Ringle <jon@ringle.org>
12163
12164 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12165
9453113a
DJ
121662007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12167
12168 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12169
64a69107
DJ
121702007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12171
12172 * terminal.h: Check HAVE_SGTTY_H.
12173
121742007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12175
12176 * remote-utils.c (remote_open): Print out the assigned port number.
12177
c74d0ad8
DJ
121782007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12179
12180 * remote-utils.c (monitor_output): New function.
12181 * server.c (debug_threads): Define here.
12182 (monitor_show_help): New function.
12183 (handle_query): Handle qRcmd.
12184 (main): Do not handle 'd' packet.
12185 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12186 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12187 of debug_threads.
12188
de7c3b4a
PA
121892007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12190
12191 * Makefile.in (EXEEXT): New.
12192 (clean): Use $(EXEEXT).
12193
ef57601b
PA
121942007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12195
12196 * target.h (target_ops): Rename send_signal to request_interrupt,
12197 and remove enum target_signal parameter.
12198 * linux-low.c (linux_request_interrupt): Rename from
12199 linux_send_signal, and always send SIGINT.
12200 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12201 and always send SIGINT.
12202 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12203 of send_signal.
12204 (input_interrupt): Likewise.
12205
820f2bda
PA
122062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12207
12208 * server.c (get_features_xml): Check if target implemented
12209 arch_string.
12210 * win32-i386-low.c (win32_arch_string): New.
12211 (win32_target_ops): Add win32_arch_string as arch_string member.
12212
ab39bf24
UW
122132007-02-22 Markus Deuling <deuling@de.ibm.com>
12214
12215 * spu-low.c (spu_arch_string): New.
12216 (spu_target_ops): Add spu_arch_string.
12217
61ff6e04
DJ
122182007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12219
12220 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12221 * configure.ac: Do not check for terminal.h.
12222 * configure, config.in: Regenerated.
12223
fb1e4ffc
DJ
122242007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12225
12226 * Makefile.in (OBS): Add $(XML_BUILTIN).
12227 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12228 (clean): Update.
12229 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12230 (arm-with-iwmmxt.c): New.
12231 * config.in, configure: Regenerate.
12232 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12233 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12234 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12235 (arm*-*-linux*): Add iWMMXt and regset support.
12236 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12237 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12238 (arm_store_wmmxregset, target_regsets): New.
12239 * server.c (get_features_xml): Take annex argument. Check builtin
12240 XML documents.
12241 (handle_query): Handle multiple annexes.
12242
0f48aa01
DJ
122432007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12244
12245 * remote-utils.c [USE_WIN32API] (read, write): Define.
12246 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12247 write.
12248
23181151
DJ
122492007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12250
12251 * linux-i386-low.c (the_low_target): Set arch_string.
12252 * linux-x86-64-low.c (the_low_target): Likewise.
12253 * linux-low.c (linux_arch_string): New.
12254 (linux_target_ops): Add it.
12255 * linux-low.h (struct linux_target_ops): Add arch_string.
12256 * server.c (write_qxfer_response): Use const void * for DATA.
12257 (get_features_xml): New.
12258 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12259 * target.h (struct target_ops): Add arch_string method.
12260
9d606399
DJ
122612007-01-03 Denis Pilat <denis.pilat@st.com>
12262 Daniel Jacobowitz <dan@codesourcery.com>
12263
12264 * linux-low.c (linux_kill): Handle being called with no threads.
12265 * win32-i386-low.c (win32_kill): Likewise.
12266 (get_child_debug_event): Clear current_process_handle.
12267
122682006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12269 Daniel Jacobowitz <dan@codesourcery.com>
12270
12271 * remote-utils.c (remote_open): Check the type of specified
12272 serial port devices before opening them.
12273 * server.c (main): Kill the inferior if an error occurs during
12274 the first remote_open.
12275
a5e13d24
DJ
122762006-12-05 Markus Deuling <deuling@de.ibm.com>
12277
12278 * README: Update supported targets.
12279
186947f7
DJ
122802006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12281
12282 * Makefile.in (clean): Remove reg-mips64.c.
12283 (reg-mips64.c, reg-mips64.o): New rules.
12284 * configure.srv: Handle mips64. Include regset support for mips.
12285 * linux-mips-low.c (union mips_register): New.
12286 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12287 (mips_breakpoint, mips_breakpoint_at): Use int.
12288 (mips_collect_register, mips_supply_register)
12289 (mips_collect_register_32bit, mips_supply_register_32bit)
12290 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12291 (mips_store_fpregset, target_regsets): New.
12292 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12293
a13e2c95
UW
122942006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12295
12296 * configure.srv: Add target "spu*-*-*".
12297 * Makefile.in (clean): Remove reg-spu.c.
12298 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12299 * spu-low.c: New file.
12300
cb7283db
DJ
123012006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12302
12303 * configure.ac: Correct td_thr_tls_get_addr test.
12304 * configure: Regenerated.
12305
89be2091
DJ
123062006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12307
12308 * linux-low.c (linux_wait_for_event): Reformat. Use the
12309 pass_signals array.
12310 * remote-utils.c (decode_address_to_semicolon): New.
12311 * server.c (pass_signals, handle_general_set): New.
12312 (handle_query): Mention QPassSignals for qSupported.
12313 (main): Call handle_general_set.
12314 * server.h (pass_signals, decode_address_to_semicolon): New.
12315
000ef4f0
DJ
123162006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12317
12318 * server.c (handle_query): Correct error handling for read_auxv.
12319
b7149293
UW
123202005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12321
12322 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12323 and srv_linux_thread_db to yes.
12324 * linux-s390-low.c (s390_fill_gregset): New function.
12325 (target_regsets): Define data structure.
12326
dae5f5cf
DJ
123272006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12328
12329 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12330 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12331 * config.in, configure: Regenerated.
12332 * inferiors.c (gdb_id_to_thread): New function.
12333 (gdb_id_to_thread_id): Use it.
12334 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12335 * linux-low.h (struct process_info): Add th member.
12336 (thread_db_get_tls_address): New prototype.
12337 * remote-utils.c (decode_address): Make non-static.
12338 * server.c (handle_query): Handle qGetTLSAddr.
12339 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12340 * target.h (struct target_ops): Add get_tls_address.
12341 * thread-db.c (maybe_attach_thread): Save the thread handle.
12342 (thread_db_get_tls_address): New.
12343
32ca6d61
DJ
123442006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12345
12346 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12347 (linux_resume_one_process): Take a siginfo_t *. Update all
12348 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12349 (struct pending_signals): Add a siginfo_t.
12350 (linux_wait_for_process): Always set last_status.
12351 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12352 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12353 * linux-low.h (struct process_info): Add last_status.
12354
5ffff7c1
DJ
123552006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12356
12357 * remote-utils.c (try_rle): New function.
12358 (putpkt_binary): Use it.
12359
8695c747
DJ
123602006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12361
12362 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12363 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12364 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12365 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12366 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12367 point registers.
12368
290fadea
RS
123692006-08-08 Richard Sandiford <richard@codesourcery.com>
12370
12371 * server.c (terminal_fd): New variable.
12372 (old_foreground_pgrp): Likewise.
12373 (restore_old_foreground_pgrp): New function.
12374 (start_inferior): Record the terminal file descriptor in terminal_fd
12375 and its original foreground group in old_foreground_pgrp. Register
12376 restore_old_foreground_pgrp with atexit().
12377
9f2e1e63
DJ
123782006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12379
12380 * server.c (handle_query): Correct qPart to qXfer.
12381
b80864fb
DJ
123822006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12383
12384 * configure.ac: Check for more headers which are missing on
12385 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12386 * configure.srv: Add Cygwin and mingw32.
12387 * remote-utils.c: Don't include headers unconditionally which
12388 are missing on mingw32. Include <winsock.h> for mingw32.
12389 (remote_open): Adjust for mingw32 support. Flush
12390 standard error after writing to it.
12391 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12392 (unblock_async_io, enable_async_io, disable_async_io)
12393 (readchar, getpkt): Update for Winsock support.
12394 (prepare_resume_reply): Expect a protocol signal number.
12395 * server.c: Disable <sys/wait.h> on mingw32.
12396 (start_inferior): Adjust for mingw32 support. Flush
12397 standard error after writing to it.
12398 (attach_inferior): Likewise. Use protocol signal
12399 numbers.
12400 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12401 and names.
12402 * win32-i386-low.c: New file.
12403 * Makefile.in (XM_CLIBS): Set.
12404 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12405 (win32-i386-low.o): New dependency rule.
12406 * linux-low.c (linux_wait): Use target signal numbers.
12407 * target.h (struct target_ops): Doc fix.
12408 * server.h (target_signal_to_name): New prototype.
12409 * gdbreplay.c: Don't include headers unconditionally which
12410 are missing on mingw32. Include <winsock.h> for mingw32.
12411 (remote_close, remote_open): Adjust for Winsock support.
12412 * configure, config.in: Regenerated.
12413
0876f84a
DJ
124142006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12415
12416 * server.c (decode_xfer_read, write_qxfer_response): New.
12417 (handle_query): Take a packet length argument. Handle
12418 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12419 the qSupported response.
12420 (main): Update call to handle_query.
12421
01f9e8fa
DJ
124222006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12423
12424 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12425 (putpkt_binary): Renamed from putpkt and adjusted for binary
12426 data.
12427 (putpkt): New wrapper for putpkt_binary.
12428 (readchar): Don't mask off the high bit.
12429 (decode_X_packet): New function.
12430 * server.c (main): Call putpkt_binary if a handler sets the packet
12431 length. Save the length of the incoming packet. Handle 'X'.
12432 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12433
be2a5f71
DJ
124342006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12435
12436 * server.c (handle_query): Handle qSupported.
12437
ea025f5f
DJ
124382006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12439
12440 * remote-utils.c (all_symbols_looked_up): New variable.
12441 (look_up_one_symbol): Check it.
12442 * server.h (look_up_one_symbol): New declaration.
12443 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12444
9308fc88
DJ
124452006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12446
12447 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12448 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12449 (PTRACE_GET_THREAD_AREA): Define.
12450 (ps_get_thread_area): New function.
12451
52fb6437
NS
124522006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12453
12454 * configure.srv (m68k*-*-uclinux*): New target.
12455 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12456 (linux_resume_one_process): Remove extraneous cast.
12457 (linux_read_offsets): New.
12458 (linux_target_op): Add linux_read_offsets on mmuless systems.
12459 * server.c (handle_query): Add qOffsets logic.
12460 * target.h (struct target_ops): Add read_offsets.
12461
21b0f40c
DJ
124622006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12463
12464 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12465 (PTRACE_GET_THREAD_AREA): Define.
12466 (ps_get_thread_area): New function.
12467 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12468 (linux-x86-64-low.o): Update.
12469
0050a760
DJ
124702006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12471
12472 * configure.ac: Remove checks for prfpregset_t.
12473 * gdb_proc_service.h: New file.
12474 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12475 new "gdb_proc_service.h".
12476 * proc-service.c: Likewise.
12477 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12478 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12479 * Makefile.in (gdb_proc_service_h): Updated.
12480 * configure, config.in: Regenerated.
12481
b92a518e
DJ
124822006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12483
12484 * remote-utils.c (prepare_resume_reply): Move declaration
12485 of gdb_id_from_wait to the top of the block.
12486
545587ee
DJ
124872006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12488
12489 * linux-low.c (regsets_store_inferior_registers): Read the regset
12490 from the target before filling it.
12491
9db87ebd
DJ
124922006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12493
12494 * server.c (attach_inferior): Return SIGTRAP for a successful
12495 attach.
12496
dd24457d
DJ
124972006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12498
12499 * Makefile.in (OBS): Add version.o.
12500 (STAGESTUFF): Delete.
12501 (version.o): Add dependencies.
12502 (version.c): Replace rule.
12503 (clean): Remove version.c.
12504 * server.c (gdbserver_version): New.
12505 (gdbserver_usage): Use printf.
12506 (main): Handle --version and --help.
12507 * server.h (version, host_name): Add declarations.
12508
6f0f660e
EZ
125092005-12-23 Eli Zaretskii <eliz@gnu.org>
12510
889bf7c5
PA
12511 * linux-arm-low.c:
12512 * linux-arm-low.c:
12513 * inferiors.c:
12514 * i387-fp.h:
12515 * i387-fp.c:
12516 * gdbreplay.c:
12517 * regcache.c:
12518 * proc-service.c:
12519 * mem-break.h:
12520 * mem-break.c:
12521 * linux-x86-64-low.c:
12522 * linux-sh-low.c:
12523 * linux-s390-low.c:
12524 * linux-ppc64-low.c:
12525 * linux-ppc-low.c:
12526 * linux-mips-low.c:
12527 * linux-m68k-low.c:
12528 * linux-m32r-low.c:
12529 * linux-low.h:
12530 * linux-low.c:
12531 * linux-ia64-low.c:
12532 * linux-i386-low.c:
12533 * linux-crisv32-low.c:
12534 * thread-db.c:
12535 * terminal.h:
12536 * target.h:
12537 * target.c:
12538 * server.h:
12539 * server.c:
12540 * remote-utils.c:
12541 * regcache.h:
12542 * utils.c:
12543 * Makefile.in:
12544 * configure.ac:
6f0f660e
EZ
12545 * gdbserver.1: Add (C) after Copyright. Update the FSF
12546 address.
12547
9d1fb177
DJ
125482005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12549
12550 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12551 (arm_breakpoint_at): Recognize both breakpoints.
12552 (the_low_target): Use the correct breakpoint instruction.
12553
011a70c2
DJ
125542005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12555
12556 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12557 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12558 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12559 (the_low_target): Update.
12560
7fb85e41
AS
125612005-10-25 Andreas Schwab <schwab@suse.de>
12562
12563 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12564
12565 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12566 (ia64_num_regs): Reduce to 462.
12567
3db0444b
DJ
125682005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12569
12570 * acinclude.m4: Correct quoting.
12571 * aclocal.m4: Regenerated.
12572
12573 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12574 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12575 (thread_db_init): Call thread_db_err_str.
12576 * configure.ac: Check for TD_VERSION.
12577 * config.in, configure: Regenerated.
12578
bee0189a
DJ
125792005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12580
12581 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12582
e9d25b98
DJ
125832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12584
12585 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12586 is not available. Define HAVE_PTRACE_GETREGS if it is.
12587 * config.in, configure: Regenerated.
12588 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12589 * linux-i386-low.c, linux-m68k-low.c: Update to use
12590 HAVE_PTRACE_GETREGS.
12591 * linux-low.c (regsets_fetch_inferior_registers)
12592 (regsets_store_inferior_registers): Only return 0 if we processed
12593 GENERAL_REGS.
12594 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12595 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12596
a06660f7
DJ
125972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12598
12599 * inferiors.c (struct thread_info): Add gdb_id.
12600 (add_thread): Add gdb_id argument.
12601 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12602 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12603 calls to add_thread.
12604 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12605 * server.c (handle_query): Use thread_to_gdb_id.
12606 (handle_v_cont, main): Use gdb_id_to_thread_id.
12607 * server.h (add_thread): Update prototype.
12608 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12609 prototypes.
12610
5a1f5858
DJ
126112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12612
12613 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12614 left-padded registers.
12615 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12616 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12617
e122f1f5
SE
126182005-07-01 Steve Ellcey <sje@cup.hp.com>
12619
12620 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12621 * configure: Regenerate.
12622 * config.in: Regenerate.
12623 * server.h (NEED_DECLARATION_STRERROR):
12624 Replace with !HAVE_DECL_STRERROR.
12625
d592fa2f
DJ
126262005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12627
12628 * linux-low.c (linux_wait, linux_send_signal): Don't test
12629 an unsigned long variable for > 0 if it could be MAX_ULONG.
12630 * server.c (myresume): Likewise.
12631 * target.c (set_desired_inferior): Likewise.
12632
ccbd4912
MK
126332005-06-13 Mark Kettenis <kettenis@gnu.org>
12634
12635 * configure.ac: Simplify and improve check for socklen_t.
12636 * configure, config.in: Regenerate.
12637
f450004a
DJ
126382005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12639
12640 * acconfig.h: Remove.
12641 * configure.ac: Add a test for socklen_t. Use three-argument
12642 AC_DEFINE throughout.
12643 * config.in: Regenerated using autoheader 2.59.
12644 * configure: Regenerated.
12645
12646 * gdbreplay.c (socklen_t): Provide a default.
12647 (remote_open): Use socklen_t.
12648 * remote-utils.c (socklen_t): Provide a default.
12649 (remote_open): Use socklen_t.
12650 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12651 unsigned char.
12652
12653 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12654 char for buffers.
12655 * linux-low.c (linux_read_memory, linux_write_memory)
12656 (linux_read_auxv): Likewise.
12657 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12658 (check_mem_write): Likewise.
12659 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12660 Likewise.
12661 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12662 (registers_from_string, register_data): Likewise.
12663 * server.c (handle_query, main): Likewise.
12664 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12665 (decode_M_packet): Likewise.
12666 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12667 * target.h (struct target_ops): Update read_memory, write_memory,
12668 and read_auxv.
12669 (read_inferior_memory, write_inferior_memory): Update.
12670 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12671 to unsigned char *.
12672 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12673 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12674 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12675 linux-s390-low.c, linux-sh-low.c: Update for changes in
12676 read_inferior_memory and the_low_target->breakpoint.
12677
eee84df1
DJ
126782005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12679
12680 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12681 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12682 * configure.srv: Add powerpc64-*-linux*.
12683 * linux-ppc64-low.c: New file.
12684
45b134e5
OF
126852005-05-23 Orjan Friberg <orjanf@axis.com>
12686
12687 * linux-cris-low.c: New file with support for CRIS.
12688 * linux-crisv32-low.c: Ditto for CRISv32.
12689 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12690 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12691 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12692 reg-crisv32.o, and reg-crisv32.c to make rules.
12693 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12694 recognized targets.
12695
48d93c75
UW
126962005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12697
12698 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12699 of sizeof (PTRACE_XFER_TYPE).
12700 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12701
e013ee27
OF
127022005-05-12 Orjan Friberg <orjanf@axis.com>
12703
889bf7c5 12704 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12705 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12706 pointers for hardware watchpoint support.
12707 * linux-low.h (struct linux_target_ops): Ditto.
12708 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12709 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12710 to linux_target_ops.
12711 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12712 reply packet.
12713 * server.c (main): Recognize 'Z' and 'z' packets.
12714
b0ded00b
UW
127152005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12716
12717 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12718 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12719 (the_low_target): Add new members.
12720
8643e2ad
DJ
127212005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12722
12723 * proc-service.c (ps_lgetregs): Search all_processes instead of
12724 all_threads.
12725
fc620387
DJ
127262005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12727
12728 * server.c (start_inferior): Change return type to int.
12729 (attach_inferior): Change sigptr to int *.
12730 (handle_v_cont, handle_v_requests): Change signal to int *.
12731 (main): Change signal to int.
12732
127332005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12734
12735 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12736 * configure.srv: Add m32r*-*-linux*.
12737 * linux-m32r-low.c: New file.
12738
e0e76420
DJ
127392005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12740
12741 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12742
a1928bad
DJ
127432005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12744
12745 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12746 Take unsigned long arguments for PIDs.
12747 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12748 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12749 (wait_for_sigstop, linux_resume_one_process)
12750 (regsets_fetch_inferior_registers, linux_send_signal)
12751 (linux_read_auxv): Likewise. Update the types of variables holding
12752 PIDs. Update format string specifiers.
12753 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12754 * remote-utils.c (prepare_resume_reply): Likewise.
12755 * server.c (cont_thread, general_thread, step_thread)
12756 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12757 unsigned long.
12758 (handle_query): Update format specifiers.
12759 (handle_v_cont, main): Use strtoul for thread IDs.
12760 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12761 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12762 (general_thread, step_thread, thread_from_wait)
12763 (old_thread_from_wait): Update.
12764 * target.h (struct thread_resume): Use unsigned long for THREAD.
12765 (struct target_ops): Use unsigned long for arguments to attach and
12766 thread_alive.
12767
dcdb98d2
DJ
127682005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12769
12770 * acinclude.m4: Include bfd/bfd.m4 directly.
12771 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12772 <agriffis@toolchain.org>.
12773 * aclocal.m4, configure: Regenerated.
12774
bec39cab
AC
127752005-01-07 Andrew Cagney <cagney@gnu.org>
12776
12777 * configure.ac: Rename configure.in, require autoconf 2.59.
12778 * configure: Re-generate.
12779
434c4c77
DJ
127802004-12-08 Daniel Jacobowitz <dan@debian.org>
12781
12782 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12783 LIBS when finished.
12784 * aclocal.m4: Regenerated.
12785 * configure: Regenerated.
12786
db1d3e1b
AS
127872004-11-21 Andreas Schwab <schwab@suse.de>
12788
12789 * linux-m68k-low.c (m68k_num_gregs): Define.
12790 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12791 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12792 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12793 (m68k_breakpoint_at): New. Add to the_low_target.
12794
12795 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12796 srv_linux_thread_db to yes.
12797
43360365
JB
127982004-10-20 Joel Brobecker <brobecker@gnat.com>
12799
12800 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12801 (ARCH_SET_FS): Likewise.
12802 (ARCH_GET_FS): Likewise.
12803 (ARCH_GET_GS): Likewise.
12804
fd500816
DJ
128052004-10-16 Daniel Jacobowitz <dan@debian.org>
12806
12807 * linux-i386-low.c (ps_get_thread_area): New.
12808 * linux-x86-64-low.c (ps_get_thread_area): New.
12809 * linux-low.c: Include <sys/syscall.h>.
12810 (linux_kill_one_process): Don't kill the first thread here.
12811 (linux_kill): Kill the first thread here.
12812 (kill_lwp): New function.
12813 (send_sigstop, linux_send_signal): Use it.
12814 * proc-service.c: Clean up #ifdefs.
12815 (fpregset_info): Delete.
12816 (ps_lgetregs): Update and enable implementation.
12817 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12818 implementations.
12819 * remote-utils.c (struct sym_cache, symbol_cache): New.
12820 (input_interrupt): Print a clearer message.
12821 (async_io_enabled): New variable.
12822 (enable_async_io, disable_async_io): Use it. Update comments.
12823 (look_up_one_symbol): Use the symbol cache.
12824 * thread-db.c (thread_db_look_up_symbols): New function.
12825 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12826
f6de3c42
DJ
128272004-10-16 Daniel Jacobowitz <dan@debian.org>
12828
12829 * configure.in: Test for -rdynamic.
12830 * configure: Regenerated.
12831 * Makefile (INTERNAL_LDFLAGS): New.
12832 (gdbserver, gdbreplay): Use it.
12833
2c0fc042
AC
128342004-09-02 Andrew Cagney <cagney@gnu.org>
12835
12836 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12837
075b3282
DJ
128382004-03-23 Daniel Jacobowitz <drow@mvista.com>
12839
12840 * linux-low.c (linux_wait): Clear all_processes list also.
12841
fa6a77dc
DJ
128422004-03-12 Daniel Jacobowitz <drow@mvista.com>
12843
12844 * linux-low.c: Include <errno.h>. Remove extern declaration of
12845 errno.
12846
6d782a97
DJ
128472004-03-12 Daniel Jacobowitz <drow@mvista.com>
12848
12849 * gdbreplay.c, server.h, utils.c: Update copyright years.
12850
3a7fb99b
DJ
128512004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12852
12853 * server.c (main): Print child status or termination signal from
12854 variable 'signal', not 'sig'.
12855
c3e735a6
DJ
128562004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12857
12858 * linux-low.c (linux_read_memory): Change return type to
12859 int. Check for and return error from ptrace().
12860 * target.c (read_inferior_memory): Change return type to int. Pass
12861 back return status from the_target->read_memory().
12862 * target.h (struct target_ops): Adapt *read_memory() prototype.
12863 Update comment.
12864 (read_inferior_memory): Adapt prototype.
12865 * server.c (main): Return an error packet if
12866 read_inferior_memory() returns an error.
12867
a59d1c82
DJ
128682004-03-04 Daniel Jacobowitz <drow@mvista.com>
12869
12870 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12871 Unify with other clean targets.
12872
dc3f8883
DJ
128732004-02-29 Daniel Jacobowitz <drow@mvista.com>
12874
12875 * server.c (handle_v_cont): Call set_desired_inferior.
12876
89a208da
DJ
128772004-02-29 Daniel Jacobowitz <drow@mvista.com>
12878
12879 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12880
62ea82f5
DJ
128812004-02-29 Daniel Jacobowitz <drow@mvista.com>
12882
12883 * linux-low.c (linux_wait): Unblock async I/O.
12884 (linux_resume): Block and enable async I/O.
12885 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12886 * server.h (block_async_io, unblock_async_io): Add prototypes.
12887
6910d122
DJ
128882004-02-29 Daniel Jacobowitz <drow@mvista.com>
12889
12890 * remote-utils.c (remote_open): Print a status notice after
12891 opening a TCP port.
12892 * server.c (attach_inferior): Print a status notice after
12893 attaching.
12894
128952004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12896
12897 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12898
c89dc5d4
DJ
128992004-02-26 Daniel Jacobowitz <drow@mvista.com>
12900
12901 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12902 error packet.
12903 * server.c, target.h: Update copyright years.
12904
4b8dad4a
RM
129052004-02-25 Roland McGrath <roland@redhat.com>
12906
12907 * target.h (struct target_ops): New member `read_auxv'.
12908 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12909 * linux-low.c (linux_read_auxv): New function.
12910 (linux_target_ops): Initialize `read_auxv' member to that.
12911
d7446758
JB
129122004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12913
12914 Committed by Jim Blandy <jimb@redhat.com>.
12915
12916 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12917 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12918 instead of GPR_SIZE to distiguish s390 and s390x targets.
12919
5544ad89
DJ
129202004-01-31 Daniel Jacobowitz <drow@mvista.com>
12921
12922 * linux-low.c: Update copyright year.
12923 (check_removed_breakpoint): Clear pending_is_breakpoint.
12924 (linux_set_resume_request, linux_queue_one_thread)
12925 (resume_status_pending_p): New functions.
12926 (linux_continue_one_thread): Use process->resume.
12927 (linux_resume): Only resume threads if there are no pending events.
12928 * linux-low.h (struct process_info): Add resume request
12929 pointer.
12930
2a68b70e
DJ
129312004-01-30 Daniel Jacobowitz <drow@mvista.com>
12932
12933 * regcache.c (new_register_cache): Clear the allocated register
12934 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12935
64386c31
DJ
129362003-10-13 Daniel Jacobowitz <drow@mvista.com>
12937
12938 * linux-low.c (linux_resume): Take a struct thread_resume *
12939 argument.
12940 (linux_wait): Update call.
12941 (resume_ptr): New static variable.
12942 (linux_continue_one_thread): Renamed from
12943 linux_continue_one_process. Use resume_ptr.
12944 (linux_resume): Use linux_continue_one_thread.
12945 * server.c (handle_v_cont, handle_v_requests): New functions.
12946 (myresume): New function.
12947 (main): Handle 'v' case.
12948 * target.h (struct thread_resume): New type.
12949 (struct target_ops): Change argument of "resume" to struct
12950 thread_resume *.
12951 (myresume): Delete macro.
12952
c938e9b0
L
129532003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12954
12955 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12956 (uninstall): Support DESTDIR.
12957
7f313d07
BC
12958Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12959
12960 * configure.srv: Add xscale*linux copy of arm*linux entry.
12961
3b2fc2ea
DJ
129622003-07-24 Daniel Jacobowitz <drow@mvista.com>
12963
12964 * linux-arm-low.c (arm_reinsert_addr): New function.
12965 (the_low_target): Add arm_reinsert_addr.
12966
1c0a559e
MK
129672003-07-08 Mark Kettenis <kettenis@gnu.org>
12968
12969 * mem-break.c: Remove whitespace at end of file.
12970
43d5792c
DJ
129712003-06-28 Daniel Jacobowitz <drow@mvista.com>
12972
12973 * configure.in: Check whether we need to prototype strerror.
12974 * server.h: Optionally prototype strerror.
12975 * gdbreplay.c (perror_with_name): Use strerror.
12976 * linux-low.c (linux_attach_lwp): Use strerror.
12977 * utils.c (perror_with_name): Use strerror.
12978 * config.in, configure: Regenerated.
12979
c8a86edf
DJ
129802003-06-28 Daniel Jacobowitz <drow@mvista.com>
12981
12982 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12983 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12984
73d37363
DJ
129852003-06-20 Daniel Jacobowitz <drow@mvista.com>
12986
12987 * Makefile.in (SFILES): Update.
12988 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12989 low-sun3.c: Remove files.
12990
6ad8ae5c
DJ
129912003-06-17 Daniel Jacobowitz <drow@mvista.com>
12992
12993 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12994 (linux_detach_one_process, linux_detach): New functions.
12995 (linux_target_ops): Add linux_detach.
12996 * server.c (main): Handle 'D' packet.
12997 * target.h (struct target_ops): Add "detach" member.
12998 (detach_inferior): Define.
12999
1581182a
MK
130002003-06-13 Mark Kettenis <kettenis@gnu.org>
13001
13002 From Kelley Cook <kelleycook@wideopenwest.com>:
13003 * configure.srv: Accept i[34567]86 variants.
13004
e5379b03
DJ
130052003-06-05 Daniel Jacobowitz <drow@mvista.com>
13006
13007 * linux-low.c (linux_wait_for_event): Correct comment typos.
13008 (linux_resume_one_process): Call check_removed_breakpoint.
13009 (linux_send_signal): New function.
13010 (linux_target_ops): Add linux_send_signal.
13011 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13012 of kill.
13013 * target.h (struct target_ops): Add send_signal.
13014
2ff29de4
JB
130152003-05-29 Jim Blandy <jimb@redhat.com>
13016
13017 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13018 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13019 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13020 away part of the register's value.
13021
254787d4
DJ
130222003-03-26 Daniel Jacobowitz <drow@mvista.com>
13023
13024 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13025 (linux_wait_for_event, linux_init_signals): Likewise.
13026
94e10508
DJ
130272003-03-17 Daniel Jacobowitz <drow@mvista.com>
13028
13029 * configure.in: Check for stdlib.h.
13030 * configure: Regenerated.
13031 * config.in: Regenerated.
13032
4c0711e0
DJ
130332003-01-04 Andreas Schwab <schwab@suse.de>
13034
13035 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13036
ef66e766
AC
130372003-01-02 Andrew Cagney <ac131313@redhat.com>
13038
13039 * Makefile.in: Remove obsolete code.
13040
a1358604
DJ
130412002-11-20 Daniel Jacobowitz <drow@mvista.com>
13042
13043 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13044 defined(PT_FPR0_HI).
13045
23ce3b1c
DJ
130462002-11-17 Stuart Hughes <seh@zee2.com>
13047
13048 * linux-arm-low.c (arm_num_regs): Increase.
13049 (arm_regmap): Include status register.
13050
130512002-11-17 Daniel Jacobowitz <drow@mvista.com>
13052
13053 * linux-low.c (register_addr): Remove incorrect -1 check.
13054
a9fa9f7d
DJ
130552002-08-29 Daniel Jacobowitz <drow@mvista.com>
13056
13057 * linux-low.c (linux_create_inferior): Call setpgid. Return
13058 the new PID.
13059 (unstopped_p, linux_signal_pid): Remove.
13060 (linux_target_ops): Remove linux_signal_pid.
13061 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13062 global instead of target method.
13063 * target.h (struct target_ops): Remove signal_pid. Update comment
13064 for create_inferior.
13065 * server.c (signal_pid): New variable.
13066 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13067 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13068 (attach_inferior): Set signal_pid.
13069
17574093
DJ
130702002-08-23 Daniel Jacobowitz <drow@mvista.com>
13071
13072 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13073
130742002-08-20 Jim Blandy <jimb@redhat.com>
13075
13076 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13077 default for this.
13078
130792002-08-01 Andrew Cagney <cagney@redhat.com>
13080
13081 * Makefile.in: Make chill references obsolete.
13082
130832002-07-24 Kevin Buettner <kevinb@redhat.com>
13084
13085 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13086 * configure: Regenerate.
13087 * config.in: Regenerate.
13088
130892002-07-09 David O'Brien <obrien@FreeBSD.org>
13090
13091 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13092 (perror_with_name, remote_close, remote_open, expect, play): Static.
13093
130942002-07-04 Michal Ludvig <mludvig@suse.cz>
13095
4b8dad4a 13096 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13097 byte offsets instead of an array of indexes.
13098 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13099
131002002-06-13 Daniel Jacobowitz <drow@mvista.com>
13101
13102 * regcache.c: Add comment.
13103
131042002-06-11 Daniel Jacobowitz <drow@mvista.com>
13105
13106 * thread-db.c: New file.
13107 * proc-service.c: New file.
13108 * acinclude.m4: New file.
13109 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13110 proc-service.o, and thread-db.o.
13111 (linux-low.o): Add USE_THREAD_DB.
13112 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13113 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13114 * aclocal.m4: Regenerated.
13115 * config.in: Regenerated.
13116 * configure: Regenerated.
13117 * configure.in: Check for proc_service.h, sys/procfs.h,
13118 thread_db.h, and linux/elf.h headrs.
13119 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13120 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13121 Check for -lthread_db and thread support.
13122 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13123 PowerPC, and SuperH.
13124 * i387-fp.c: Constify arguments.
13125 * i387-fp.h: Likewise.
13126 * inferiors.c: (struct thread_info): Renamed from
13127 `struct inferior_info'. Remove PID member. Use generic inferior
13128 list header. All uses updated.
13129 (inferiors, signal_pid): Removed.
13130 (all_threads): New variable.
13131 (get_thread): Define.
13132 (add_inferior_to_list): New function.
13133 (for_each_inferior): New function.
13134 (change_inferior_id): New function.
13135 (add_inferior): Removed.
13136 (remove_inferior): New function.
13137 (add_thread): New function.
13138 (free_one_thread): New function.
13139 (remove_thread): New function.
13140 (clear_inferiors): Use for_each_inferior and free_one_thread.
13141 (find_inferior): New function.
13142 (find_inferior_id): New function.
13143 (inferior_target_data): Update argument type.
13144 (set_inferior_target_data): Likewise.
13145 (inferior_regcache_data): Likewise.
13146 (set_inferior_regcache_data): Likewise.
13147 * linux-low.c (linux_bp_reinsert): Remove.
13148 (all_processes, stopping_threads, using_thrads)
13149 (struct pending_signals, debug_threads, pid_of): New.
13150 (inferior_pid): Replace with macro.
13151 (struct inferior_linux_data): Remove.
13152 (get_stop_pc, add_process): New functions.
13153 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13154 Use add_process and add_thread.
13155 (linux_attach_lwp): New function, based on old linux_attach. Use
13156 add_process and add_thread. Set stop_expected for new threads.
13157 (linux_attach): New function.
13158 (linux_kill_one_process): New function.
13159 (linux_kill): Kill all LWPs.
13160 (linux_thread_alive): Use find_inferior_id.
13161 (check_removed_breakpoints, status_pending_p): New functions.
13162 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13163 Update. Use WNOHANG. Wait for cloned processes also. Update process
13164 struct for the found process.
13165 (linux_wait_for_event): New function.
13166 (linux_wait): Use it. Support LWPs.
13167 (send_sigstop, wait_for_sigstop, stop_all_processes)
13168 (linux_resume_one_process, linux_continue_one_process): New functions.
13169 (linux_resume): Support LWPs.
13170 (REGISTER_RAW_SIZE): Remove.
13171 (fetch_register): Use register_size instead. Call supply_register.
13172 (usr_store_inferior_registers): Likewise. Call collect_register.
13173 Fix recursive case.
13174 (regsets_fetch_inferior_registers): Improve error message.
13175 (regsets_store_inferior_registers): Add debugging.
13176 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13177 (unstopped_p, linux_signal_pid): New functions.
13178 (linux_target_ops): Add linux_signal_pid.
13179 (linux_init_signals): New function.
13180 (initialize_low): Call it. Initialize using_threads.
13181 * regcache.c (inferior_regcache_data): Add valid
13182 flag.
13183 (get_regcache): Fetch registers lazily. Add fetch argument
13184 and update all callers.
13185 (regcache_invalidate_one, regcache_invalidate): New
13186 functions.
13187 (new_register_cache): Renamed from create_register_cache.
13188 Return the new regcache.
13189 (free_register_cache): Change argument to a void *.
13190 (registers_to_string, registers_from_string): Call get_regcache
13191 with fetch flag set.
13192 (register_data): Make static. Pass fetch flag to get_regcache.
13193 (supply_register): Call get_regcache with fetch flag clear.
13194 (collect_register): Call get_regcache with fetch flag set.
13195 (collect_register_as_string): New function.
13196 * regcache.h: Update.
13197 * remote-utils.c (putpkt): Flush after debug output and use
13198 stderr.
13199 Handle input interrupts while waiting for an ACK.
13200 (input_interrupt): Use signal_pid method.
13201 (getpkt): Flush after debug output and use stderr.
13202 (outreg): Use collect_register_as_string.
13203 (new_thread_notify, dead_thread_notify): New functions.
13204 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13205 and general_thread.
13206 (look_up_one_symbol): Flush after debug output.
13207 * server.c (step_thread, server_waiting): New variables.
13208 (start_inferior): Don't use signal_pid. Update call to mywait.
13209 (attach_inferior): Update call to mywait.
13210 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13211 (main): Don't fetch/store registers explicitly. Use
13212 set_desired_inferior. Support proposed ``Hs'' packet. Update
13213 calls to mywait.
13214 * server.h: Update.
13215 (struct inferior_list, struct_inferior_list_entry): New.
13216 * target.c (set_desired_inferior): New.
13217 (write_inferior_memory): Constify.
13218 (mywait): New function.
13219 * target.h: Update.
13220 (struct target_ops): New signal_pid method.
13221 (mywait): Removed macro, added prototype.
13222
13223 * linux-low.h (regset_func): Removed.
13224 (regset_fill_func, regset_store_func): New.
13225 (enum regset_type): New.
13226 (struct regset_info): Add type field. Use new operation types.
13227 (struct linux_target_ops): stop_pc renamed to get_pc.
13228 Add decr_pc_after_break and breakpoint_at.
13229 (get_process, get_thread_proess, get_process_thread)
13230 (strut process_info, all_processes, linux_attach_lwp)
13231 (thread_db_init): New.
13232
13233 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13234 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13235 (the_low_target): Add new members.
13236 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13237 (i386_store_fpxregset): Constify.
13238 (target_regsets): Add new kind identifier.
13239 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13240 (i386_set_pc): Add debugging.
13241 (i386_breakpoint_at): New function.
13242 (the_low_target): Add new members.
13243 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13244 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13245 (mips_breakpoint_at): New.
13246 (the_low_target): Add new members.
13247 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13248 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13249 (the_low_target): Add new members.
13250 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13251 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13252 (the_low_target): Add new members.
13253 * linux-x86-64-low.c (target_regsets): Add new kind
13254 identifier.
13255
132562002-05-15 Daniel Jacobowitz <drow@mvista.com>
13257
13258 From Martin Pool <mbp@samba.org>:
13259 * server.c (gdbserver_usage): New function.
13260 (main): Call it.
13261
132622002-05-14 Daniel Jacobowitz <drow@mvista.com>
13263
13264 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13265 stop_at -> stop_pc.
13266
132672002-05-04 Andrew Cagney <ac131313@redhat.com>
13268
13269 * Makefile.in: Remove obsolete code.
13270
132712002-04-24 Michal Ludvig <mludvig@suse.cz>
13272
13273 * linux-low.c (regsets_fetch_inferior_registers),
13274 (regsets_store_inferior_registers): Removed cast to int from
13275 ptrace() calls.
13276 * regcache.h: Added declaration of struct inferior_info.
13277
132782002-04-20 Daniel Jacobowitz <drow@mvista.com>
13279
13280 * inferiors.c (struct inferior_info): Add regcache_data.
13281 (add_inferior): Call create_register_cache.
13282 (clear_inferiors): Call free_register_cache.
13283 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13284 * regcache.c (struct inferior_regcache_data): New.
13285 (registers): Remove.
13286 (get_regcache): New function.
13287 (create_register_cache, free_register_cache): New functions.
13288 (set_register_cache): Don't initialize the register cache here.
13289 (registers_to_string, registers_from_string, register_data): Call
13290 get_regcache.
13291 * regcache.h: Add prototypes.
13292 * server.h: Likewise.
13293
132942002-04-20 Daniel Jacobowitz <drow@mvista.com>
13295
13296 * mem-break.c: New file.
13297 * mem-break.h: New file.
13298 * Makefile.in: Add mem-break.o rule; update server.h
13299 dependencies.
13300 * inferiors.c (struct inferior_info): Add target_data
13301 member.
13302 (clear_inferiors): Free target_data member if set.
13303 (inferior_target_data, set_inferior_target_data): New functions.
13304 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13305 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13306 * linux-low.c (linux_bp_reinsert): New variable.
13307 (struct inferior_linux_data): New.
13308 (linux_create_inferior): Use set_inferior_target_data.
13309 (linux_attach): Likewise. Call add_inferior.
13310 (linux_wait_for_one_inferior): New function.
13311 (linux_wait): Call it.
13312 (linux_write_memory): Add const.
13313 (initialize_low): Call set_breakpoint_data.
13314 * linux-low.h (struct linux_target_ops): Add breakpoint
13315 handling members.
13316 * server.c (attach_inferior): Remove extra add_inferior
13317 call.
13318 * server.h: Include mem-break.h. Update inferior.c
13319 prototypes.
13320 * target.c (read_inferior_memory)
13321 (write_inferior_memory): New functions.
13322 * target.h (read_inferior_memory)
13323 (write_inferior_memory): Change macros to prototypes.
13324 (struct target_ops): Update comments. Add const to write_memory
13325 definition.
13326
133272002-04-11 Daniel Jacobowitz <drow@mvista.com>
13328
13329 * linux-low.c (usr_store_inferior_registers): Support
13330 registers which are allowed to fail to store.
13331 * linux-low.h (linux_target_ops): Likewise.
13332 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13333 (ppc_cannot_store_register): FPSCR may not be storable.
13334
133352002-04-09 Daniel Jacobowitz <drow@mvista.com>
13336
13337 * server.h: Include <string.h> if HAVE_STRING_H.
13338 * ChangeLog: Correct paths in last ChangeLog entry.
13339
133402002-04-09 Daniel Jacobowitz <drow@mvista.com>
13341
13342 * linux-low.h: Remove obsolete prototypes.
13343 (struct linux_target_ops): New.
13344 (extern the_low_target): New.
13345 * linux-low.c (num_regs, regmap): Remove declarations.
13346 (register_addr): Use the_low_target explicitly.
13347 (fetch_register): Likewise.
13348 (usr_fetch_inferior_registers): Likewise.
13349 (usr_store_inferior_registers): Likewise.
13350 * linux-arm-low.c (num_regs): Remove.
13351 (arm_num_regs): Define.
13352 (arm_regmap): Renamed from regmap, made static.
13353 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13354 made static.
13355 (arm_cannot_store_register): Renamed from cannot_store_register,
13356 made static.
13357 (the_low_target): New.
13358 * linux-i386-low.c (num_regs): Remove.
13359 (i386_num_regs): Define.
13360 (i386_regmap): Renamed from regmap, made static.
13361 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13362 made static.
13363 (i386_cannot_store_register): Renamed from cannot_store_register,
13364 made static.
13365 (the_low_target): New.
13366 * linux-ia64-low.c (num_regs): Remove.
13367 (ia64_num_regs): Define.
13368 (ia64_regmap): Renamed from regmap, made static.
13369 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13370 made static.
13371 (ia64_cannot_store_register): Renamed from cannot_store_register,
13372 made static.
13373 (the_low_target): New.
13374 * linux-m68k-low.c (num_regs): Remove.
13375 (m68k_num_regs): Define.
13376 (m68k_regmap): Renamed from regmap, made static.
13377 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13378 made static.
13379 (m68k_cannot_store_register): Renamed from cannot_store_register,
13380 made static.
13381 (the_low_target): New.
13382 * linux-mips-low.c (num_regs): Remove.
13383 (mips_num_regs): Define.
13384 (mips_regmap): Renamed from regmap, made static.
13385 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13386 made static.
13387 (mips_cannot_store_register): Renamed from cannot_store_register,
13388 made static.
13389 (the_low_target): New.
13390 * linux-ppc-low.c (num_regs): Remove.
13391 (ppc_num_regs): Define.
13392 (ppc_regmap): Renamed from regmap, made static.
13393 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13394 made static.
13395 (ppc_cannot_store_register): Renamed from cannot_store_register,
13396 made static.
13397 (the_low_target): New.
13398 * linux-s390-low.c (num_regs): Remove.
13399 (s390_num_regs): Define.
13400 (s390_regmap): Renamed from regmap, made static.
13401 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13402 made static.
13403 (s390_cannot_store_register): Renamed from cannot_store_register,
13404 made static.
13405 (the_low_target): New.
13406 * linux-sh-low.c (num_regs): Remove.
13407 (sh_num_regs): Define.
13408 (sh_regmap): Renamed from regmap, made static.
13409 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13410 made static.
13411 (sh_cannot_store_register): Renamed from cannot_store_register,
13412 made static.
13413 (the_low_target): New.
13414 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13415 (the_low_target): New.
13416
134172002-04-09 Daniel Jacobowitz <drow@mvista.com>
13418
13419 * Makefile.in: Add stamp-h target.
13420 * configure.in: Create stamp-h.
13421 * configure: Regenerated.
13422
134232002-04-09 Daniel Jacobowitz <drow@mvista.com>
13424
13425 * inferiors.c: New file.
13426 * target.c: New file.
13427 * target.h: New file.
13428 * Makefile.in: Add target.o and inferiors.o. Update
13429 dependencies.
13430 * linux-low.c (inferior_pid): New static variable,
13431 moved from server.c.
13432 (linux_create_inferior): Renamed from create_inferior.
13433 Call add_inferior. Return 0 on success instead of a PID.
13434 (linux_attach): Renamed from myattach.
13435 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13436 (linux_thread_alive): Renamed from mythread_alive.
13437 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13438 child dies.
13439 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13440 (regsets_store_inferior_registers): Correct error message.
13441 Add missing ``return 0''.
13442 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13443 (linux_store_registers): Renamed from store_inferior_registers.
13444 (linux_read_memory): Renamed from read_inferior_memory.
13445 (linux_write_memory): Renamed from write_inferior_memory.
13446 (linux_target_ops): New structure.
13447 (initialize_low): Call set_target_ops ().
13448 * remote-utils.c (unhexify): New function.
13449 (hexify): New function.
13450 (input_interrupt): Send signals to ``signal_pid''.
13451 * server.c (inferior_pid): Remove.
13452 (start_inferior): Update create_inferior call.
13453 (attach_inferior): Call add_inferior.
13454 (handle_query): New function.
13455 (main): Call handle_query for `q' packets.
13456 * server.h: Include "target.h". Remove obsolete prototypes.
13457 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13458
134592002-04-09 Daniel Jacobowitz <drow@mvista.com>
13460
13461 * Makefile.in: Add WARN_CFLAGS. Update configury
13462 dependencies.
13463 * configure.in: Check for <string.h>
13464 * configure: Regenerate.
13465 * config.in: Regenerate.
13466 * gdbreplay.c: Include needed system headers.
13467 (remote_open): Remove strchr prototype.
13468 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13469 * regcache.c (supply_register): Change buf argument to const void *.
13470 (supply_register_by_name): Likewise.
13471 (collect_register): Change buf argument to void *.
13472 (collect_register_by_name): Likewise.
13473 * regcache.h: Add missing prototypes.
13474 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13475 * server.c (handle_query): New function.
13476 (attached): New static variable, moved out of main.
13477 (main): Quiet longjmp clobber warnings.
13478 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13479 * utils.c (error): Remove NORETURN.
13480 (fatal): Likewise.
This page took 1.567978 seconds and 4 git commands to generate.