]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[OBV] gdb/rs6000: Fix maybe-uninitialized warning.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
657f9cde
WW
12016-02-24 Wei-cheng Wang <cole945@gmail.com>
2
3 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6 ppc_insert_point, ppc_remove_point.
7
b00b61e1
MK
82016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
9
10 * linux-s390-low.c (s390_supports_z_point_type): New function.
11 (struct linux_target_ops): Wire s390_supports_z_point_type in.
12
553cb527
YQ
132016-02-16 Yao Qi <yao.qi@linaro.org>
14
15 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
16 PC. Get pc from regcache_read_pc.
17
a5652c21
YQ
182016-02-12 Yao Qi <yao.qi@linaro.org>
19
20 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
21 or linux_get_pc_32bit.
22 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
23
ed443b61
YQ
242016-02-12 Yao Qi <yao.qi@linaro.org>
25
26 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
27 arm_linux_get_next_pcs_fixup.
28
020ecd38
MK
292016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
30
31 * tracepoint.c (x_tracepoint_action_download): Change
32 write_inferior_data_ptr to write_inferior_data_pointer.
33 (cmd_qtstart): Likewise.
34 (write_inferior_data_ptr): Remove.
35 (download_agent_expr): Change write_inferior_data_ptr to
36 write_inferior_data_pointer.
37 (download_tracepoint_1): Likewise.
38 (download_tracepoint): Likewise.
39 (download_trace_state_variables): Likewise.
40
7cae9051
WW
412016-02-11 Wei-cheng Wang <cole945@gmail.com>
42 Marcin Kościelnicki <koriakin@0x04.net>
43
44 * tracepoint.c (struct tracepoint_action_ops): Remove.
45 (struct tracepoint_action): Remove ops.
46 (m_tracepoint_action_download, r_tracepoint_action_download)
47 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
48 size and offset accordingly.
49 (m_tracepoint_action_ops, r_tracepoint_action_ops)
50 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
51 (tracepoint_action_send, tracepoint_action_download): New functions.
52 Helpers for trace action handlers.
53 (add_tracepoint_action): Remove setup actions ops.
54 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
55
9f6a71b4
YQ
562016-02-10 Yao Qi <yao.qi@linaro.org>
57
58 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
59
1e94266c
SM
602016-02-09 Simon Marchi <simon.marchi@ericsson.com>
61
62 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
63 to AC_OUTPUT.
64 * configure: Regenerate.
65
8adce034
SM
662016-02-09 Simon Marchi <simon.marchi@ericsson.com>
67
68 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
69 void * to gdb_byte *.
70 * linux-low.c (siginfo_fixup): Likewise.
71 (linux_xfer_siginfo): Likewise.
72 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
73 Likewise.
74 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
75
93813b37
WT
762016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
77
78 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
79 to srv_tgtobj.
80 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
81 to srv_tgtobj.
82 * linux-x86-low.c [__x86_64__]: Include
83 "nat/amd64-linux-siginfo.h".
84 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
85 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
86 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
87 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
88 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
89 (cpt_si_fd, si_timerid, si_overrun): Move from
90 nat/amd64-linux-siginfo.c.
91 * Makefile.in (amd64-linux-siginfo.o:): New rule.
92
8424cc97
SM
932016-01-28 Simon Marchi <simon.marchi@ericsson.com>
94
95 * server.c (skip_to_semicolon): Remove.
96 (process_point_options): Use strchrnul instead of
97 skip_to_semicolon.
98
4d18591b
YQ
992016-01-26 Yao Qi <yao.qi@linaro.org>
100
101 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
102 * linux-low.c (install_software_single_step_breakpoints): Don't
103 call regcache_read_pc.
104 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
105 argument pc.
106
d8020970
YQ
1072016-01-26 Yao Qi <yao.qi@linaro.org>
108
109 * linux-low.c (install_software_single_step_breakpoints): Call
110 regcache_read_pc instead of get_pc.
111
8b207339
YQ
1122016-01-26 Yao Qi <yao.qi@linaro.org>
113
114 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
115 (unblock_async_io): Rename to ...
116 (block_unblock_async_io): ... it. New function.
117 (enable_async_io): Don't install SIGIO handler. Unblock it
118 instead.
119 (disable_async_io): Don't ignore SIGIO. Block it instead.
120 (initialize_async_io): Install SIGIO handler. Don't call
121 unblock_async_io.
122
18879fef
YQ
1232016-01-26 Yao Qi <yao.qi@linaro.org>
124
125 * remote-utils.c (getpkt): If the buffer isn't empty, and the
126 first character is '\003', call *the_target->request_interrupt.
127
a0f8e08a
YQ
1282016-01-25 Yao Qi <yao.qi@linaro.org>
129
130 * remote-utils.c (new_thread_notify): Remove.
131 (dead_thread_notify): Likewise.
132 * remote-utils.h (new_thread_notify): Remove declaration.
133 (dead_thread_notify): Likewise.
134
cc5fd9ab
MK
1352016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
136
137 * gdb.trace/pending.exp: Fix expected message on continue.
138
99e8eb11
MK
1392016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
140
141 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
142 it works properly on big-endian machines where sizeof (CORE_ADDR)
143 != sizeof (void *).
144
a994041d
PA
1452016-01-21 Pedro Alves <palves@redhat.com>
146
147 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
148 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
149 * configure: Regenerate.
150
f7a6a40d
YQ
1512016-01-21 Yao Qi <yao.qi@linaro.org>
152
153 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
154 is_thumb and set it according to CPSR saved on the stack.
155 (get_next_pcs_syscall_next_pc): Pass is_thumb to
156 arm_sigreturn_next_pc.
157
6f69e520
YQ
1582016-01-18 Yao Qi <yao.qi@linaro.org>
159
160 * linux-low.c (linux_set_pc_64bit): New function.
161 (linux_get_pc_64bit): New function.
162 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
163 Declare.
164 * linux-sparc-low.c (debug_threads): Remove declaration.
165 (sparc_get_pc): Remove.
166 (the_low_target): Use linux_get_pc_64bit instead of
167 sparc_get_pc.
168 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
169 (the_low_target): Use linux_get_pc_64bit and
170 linux_set_pc_64bit.
171
276d4552
YQ
1722016-01-18 Yao Qi <yao.qi@linaro.org>
173
174 * linux-arm-low.c (debug_threads): Remove declaration.
175 (arm_get_pc, arm_set_pc): Remove.
176 (the_low_target): Use linux_get_pc_32bit and
177 linux_set_pc_32bit.
178 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
179 (the_low_target): Use linux_get_pc_32bit and
180 linux_set_pc_32bit.
181 * linux-cris-low.c (debug_threads): Remove declaration.
182 (cris_get_pc, cris_set_pc,): Remove.
183 (the_low_target): Use linux_get_pc_32bit and
184 linux_set_pc_32bit.
185 * linux-crisv32-low.c (debug_threads): Remove declaration.
186 (cris_get_pc, cris_set_pc): Remove.
187 (the_low_target): Use linux_get_pc_32bit and
188 linux_set_pc_32bit.
189 * linux-low.c: Include inttypes.h.
190 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
191 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
192 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
193 (the_low_target): Use linux_get_pc_32bit and
194 linux_set_pc_32bit.
195 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
196 (the_low_target): Use linux_get_pc_32bit and
197 linux_set_pc_32bit.
198 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
199 (the_low_target): Use linux_get_pc_32bit and
200 linux_set_pc_32bit.
201 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
202 (the_low_target): Use linux_get_pc_32bit and
203 linux_set_pc_32bit.
204 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
205 (the_low_target): Use linux_get_pc_32bit and
206 linux_set_pc_32bit.
207
eb0edac8
GB
2082016-01-18 Gary Benson <gbenson@redhat.com>
209
210 * configure.ac (AC_FUNC_FORK): New check.
211 * config.in: Regenerate.
212 * configure: Likewise.
213
1b451dda
YQ
2142016-01-14 Yao Qi <yao.qi@linaro.org>
215
216 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
217 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
218 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
219 arm_get_next_pcs_ctor.
220
82075af2
JS
2212016-01-12 Josh Stone <jistone@redhat.com>
222 Philippe Waroquiers <philippe.waroquiers@skynet.be>
223
224 * inferiors.h: Include "gdb_vecs.h".
225 (struct process_info): Add syscalls_to_catch.
226 * inferiors.c (remove_process): Free syscalls_to_catch.
227 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
228 syscall_return stops.
229 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
230 * server.c (handle_general_set): Handle QCatchSyscalls.
231 (handle_query): Report support for QCatchSyscalls.
232 * target.h (struct target_ops): Add supports_catch_syscall.
233 (target_supports_catch_syscall): New macro.
234 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
235 (struct lwp_info): Add syscall_state.
236 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
237 Maintain syscall_state and syscalls_to_catch across exec.
238 (get_syscall_trapinfo): New function, proxy to the_low_target.
239 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
240 (linux_low_filter_event): Toggle syscall_state entry/return for
241 syscall traps, and set it ignored for all others.
242 (gdb_catching_syscalls_p): New function.
243 (gdb_catch_this_syscall_p): New function.
244 (linux_wait_1): Handle SYSCALL_SIGTRAP.
245 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
246 (linux_supports_catch_syscall): New function.
247 (linux_target_ops): Install it.
248 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
249 (the_low_target): Install it.
250
8f13a3ce
MF
2512016-01-12 Mike Frysinger <vapier@gentoo.org>
252
253 * acinclude.m4: Include new ../warning.m4 file.
254 * configure: Regenerated.
255 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
256
5b3da067
MF
2572016-01-12 Mike Frysinger <vapier@gentoo.org>
258
259 * ax.c (is_goto_target): Mark static.
260 * linux-low.c (register_addr): Likewise.
261 (linux_fetch_registers, linux_store_registers): Likewise.
262 * mem-break.c (any_persistent_commands): Fix old prototype.
263 (add_commands_to_breakpoint): Mark static.
264 * regcache.c (find_register_by_name): Delete unused func.
265 * remote-utils.c (hex_or_minus_one): Mark static.
266 * server.c (monitor_show_help): Mark static.
267 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
268 handle_v_requests): Likewise.
269
bc504a31
PA
2702016-01-12 Pedro Alves <palves@redhat.com>
271
272 Remove use of the registered trademark symbol throughout.
273
5a0dd67a
YQ
2742016-01-08 Yao Qi <yao.qi@linaro.org>
275
276 * remote-utils.c (getpkt): If c is '\003', call target hook
277 request_interrupt.
278
b2ca446f
YQ
2792016-01-06 Yao Qi <yao.qi@linaro.org>
280
281 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
282 linux-aarch32-low.c.
283 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
284 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
285 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
286 (thumb2_breakpoint): Declare.
287 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
288 linux-aarch32-low.h.
289 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
290 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
291 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
292
edd88788
JB
2932016-01-01 Joel Brobecker <brobecker@adacore.com>
294
295 * gdbreplay.c (gdbreplay_version): Change copyright year in
296 version message.
297 * server.c (gdbserver_version): Likewise.
298
65da7f14
PP
2992015-12-28 Patrick Palka <patrick@parcs.ath.cx>
300
301 * server.c (crc32_table): Delete.
302 (crc32): Use libiberty's xcrc32 function.
303
4abd5ed2
JB
3042015-12-22 Joel Brobecker <brobecker@adacore.com>
305
306 * lynx-low.c (lynx_delete_thread_callback): New function.
307 (lynx_mourn): Properly delete our process and all of its
308 threads. Remove call to clear_inferiors.
309
0e50fe5c
JB
3102015-12-22 Joel Brobecker <brobecker@adacore.com>
311
312 * target.c (thread_search_callback): Add check that
313 the thread_stopped target callback is not NULL before
314 calling it.
315
35adc03f
YQ
3162015-12-21 Yao Qi <yao.qi@linaro.org>
317
318 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
319 arm breakpoint.
320
bd2b2909
AT
3212015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
322
323 * server.c (handle_query): Call target_supports_software_single_step.
324
7fe5e27e
AT
3252015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
326
327 * linux-low.c (single_step): New function.
328 (linux_resume_one_lwp_throw): Call single_step.
329 (start_step_over): Likewise.
330
d9311bfa
AT
3312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
332
333 * Makefile.in (SFILES): Append arch/arm-linux.c,
334 arch/arm-get-next-pcs.c.
335 (arm-linux.o): New rule.
336 (arm-get-next-pcs.o): New rule.
337 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
338 arm-linux.o.
339 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
340 to 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): Make non-static.
346 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
347 from linux-aarch32-low.c.
348 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
349 (arm_breakpoint_len, thumb_breakpoint): Likewise.
350 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
351 (thumb2_breakpoint_len): Likewise.
352 (arm_is_thumb_mode): New declaration.
353 * linux-arm-low.c: Include arch/arm-linux.h
354 aarch/arm-get-next-pcs.h, sys/syscall.h.
355 (get_next_pcs_ops): New struct.
356 (get_next_pcs_addr_bits_remove): New function.
357 (get_next_pcs_is_thumb): New function.
358 (get_next_pcs_read_memory_unsigned_integer): Likewise.
359 (arm_sigreturn_next_pc): Likewise.
360 (get_next_pcs_syscall_next_pc): Likewise.
361 (arm_gdbserver_get_next_pcs): Likewise.
362 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
363 Initialize.
364 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
365 * server.h: Include gdb_vecs.h.
366
68ce2059
AT
3672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
368
369 * Makefile.in (SFILES): Append common/common-regcache.c.
370 (OBS): Append common-regcache.o.
371 (common-regcache.o): New rule.
372 * regcache.c (init_register_cache): Initialize cache to
373 REG_UNAVAILABLE.
374 (regcache_raw_read_unsigned): New function.
375 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
376 register_status enum.
377
fa5308bd
AT
3782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
379
380 * linux-aarch64-low.c (the_low_targets): Rename
381 breakpoint_reinsert_addr to get_next_pcs.
382 * linux-arm-low.c (the_low_targets): Likewise.
383 * linux-bfin-low.c (the_low_targets): Likewise.
384 * linux-cris-low.c (the_low_targets): Likewise.
385 * linux-crisv32-low.c (the_low_targets): Likewise.
386 * linux-low.c (can_software_single_step): Likewise.
387 (install_software_single_step_breakpoints): New function.
388 (start_step_over): Use install_software_single_step_breakpoints.
389 * linux-low.h: New CORE_ADDR vector.
390 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
391 get_next_pcs.
392 * linux-mips-low.c (the_low_targets): Likewise.
393 * linux-nios2-low.c (the_low_targets): Likewise.
394 * linux-sparc-low.c (the_low_targets): Likewise.
395
4a6ed09b
PA
3962015-12-17 Pedro Alves <palves@redhat.com>
397
398 * linux-low.c (linux_kill_one_lwp): Remove references to
399 LinuxThreads.
400 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
401 to 'kill'.
402 (linux_init_signals): Delete.
403 (initialize_low): Adjust.
404 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
405
7544db95
PA
4062015-12-16 Pedro Alves <palves@redhat.com>
407
408 * configure.ac (compiler warning flags): When testing a
409 -Wno-foo option, check whether -Wfoo works instead.
410 * configure: Regenerate.
411
8020350c
DB
4122015-12-11 Don Breazeal <donb@codesourcery.com>
413
414 * server.c (process_serial_event): Don't exit from gdbserver
415 in remote mode if there are still active inferiors.
416
db91f502
YQ
4172015-12-11 Yao Qi <yao.qi@linaro.org>
418
419 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
420 arm_breakpoint_at if the process is 32-bit.
421
b37a6290
YQ
4222015-12-11 Yao Qi <yao.qi@linaro.org>
423
424 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
425 arm breakpoint.
426
17b1509a
YQ
4272015-12-07 Yao Qi <yao.qi@linaro.org>
428
429 * configure.srv: Append arm.o to srv_tgtobj for
430 aarch64*-*-linux* target.
431 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
432 from linux-arm-low.c.
433 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
434 (arm_breakpoint_len, thumb_breakpoint): Likewise.
435 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
436 (thumb2_breakpoint_len): Likewise.
437 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
438 (arm_breakpoint_kinds): Likewise.
439 (arm_breakpoint_kind_from_pc): Likewise.
440 (arm_sw_breakpoint_from_kind): Likewise.
441 (arm_breakpoint_kind_from_current_state): Likewise.
442 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
443 (arm_sw_breakpoint_from_kind): Declare.
444 (arm_breakpoint_kind_from_current_state): Declare.
445 (arm_breakpoint_at): Declare.
446 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
447 arm_sw_breakpoint_from_kind if process is 32-bit.
448 (aarch64_breakpoint_kind_from_pc): New function.
449 (aarch64_breakpoint_kind_from_current_state): New function.
450 (the_low_target): Initialize fields breakpoint_kind_from_pc
451 and breakpoint_kind_from_current_state.
452 * linux-arm-low.c (arm_breakpoint_kinds): Move to
453 linux-aarch32-low.c.
454 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
455 (arm_breakpoint, arm_breakpoint_len): Likewise.
456 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
457 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
458 (arm_is_thumb_mode): Likewise.
459 (arm_breakpoint_at): Likewise.
460 (arm_breakpoint_kind_from_pc): Likewise.
461 (arm_sw_breakpoint_from_kind): Likewise.
462 (arm_breakpoint_kind_from_current_state): Likewise.
463
464 Revert:
465 2015-08-04 Yao Qi <yao.qi@linaro.org>
466
467 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
468 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
469 * server.c (extended_protocol): Remove "static".
470 * server.h (extended_protocol): Declare it.
471
ece66d65
JS
4722015-12-04 Josh Stone <jistone@redhat.com>
473
474 * target.h (struct target_ops) <arch_setup>: Rename to ...
475 (struct target_ops) <post_create_inferior>: ... this.
476 (target_arch_setup): Rename to ...
477 (target_post_create_inferior): ... this, calling post_create_inferior.
478 * server.c (start_inferior): Update target_arch_setup calls to
479 target_post_create_inferior.
480 * linux-low.c (linux_low_ptrace_options): Forward declare.
481 (linux_arch_setup): Update its comment for general use.
482 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
483 (struct linux_target_ops): Use linux_post_create_inferior.
484 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
485 to post_create_inferior.
486 * nto-low.c (struct nto_target_ops): Likewise.
487 * spu-low.c (struct spu_target_ops): Likewise.
488 * win32-low.c (struct win32_target_ops): Likewise.
489
e58c48b4
AT
4902015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
491
492 * linux-arm-low.c: Remove duplicate arch/arm.h include.
493
fbec8956
AT
4942015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
495
496 * linux-arm-low.c (arm_reinsert_addr): Remove function.
497 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
498 * linux-cris-low.c (cris_reinsert_addr> Remove function.
499 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
500 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
501 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
502 * linux-mips-low.c (mips_reinsert_addr): Remove function.
503 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
504 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
505 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
506 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
507 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
508
9b4c5f87
AT
5092015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
510
511 * linux-low.c (linux_look_up_symbols): Don't call
512 linux_supports_traceclone.
513 * linux-low.h (thread_db_init): Remove use_events argument.
514 * thread-db.c (thread_db_use_event): Remove global variable.
515 (struct thread_db) <td_thr_event_enable_p>: Remove field.
516 (struct thread_db) <td_create_bp>: Remove field.
517 (thread_db_create_event): Remove function.
518 (thread_db_enable_reporting): Likewise.
519 (find_one_thread): Don't check for thread_db_use_events.
520 (attach_thread): Likewise.
521 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
522 (try_thread_db_load_1): Don't check for thread_db_use_events.
523 (thread_db_init): Remove use_events argument and thread events
524 handling.
525 (remove_thread_event_breakpoints): Remove function.
526 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
527
7d00775e
AT
5282015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
529
530 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
531 New function.
532 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
533 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
534 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
535 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
536 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
537 Initialize.
538 * linux-crisv32-low.c (cris_supports_hardware_single_step):
539 New function.
540 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
541 * linux-low.c (can_hardware_single_step): Use
542 supports_hardware_single_step.
543 (can_software_single_step): New function.
544 (start_step_over): Call can_software_single_step.
545 (linux_supports_hardware_single_step): New function.
546 (struct target_ops) <supports_software_single_step>: Initialize.
547 * linux-low.h (struct linux_target_ops)
548 <supports_hardware_single_step>: Initialize.
549 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
550 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
551 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
552 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
553 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
554 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
555 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
556 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
557 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
558 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
559 Initialize.
560 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
561 (struct linux_target_ops) <tile_supports_hardware_single_step>:
562 Initialize.
563 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
564 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
565 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
566 New function.
567 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
568 * target.h (struct target_ops): <supports_software_single_step>:
569 New field.
570 (target_supports_software_single_step): New macro.
571
2d97cd35
AT
5722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
573
574 * linux-low.c (linux_wait_1): Fix pc advance condition.
575 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
576 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
577
769ef81f
AT
5782015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
579
580 * linux-arm-low.c (arm_is_thumb_mode): New function.
581 (arm_breakpoint_at): Use arm_is_thumb_mode.
582 (arm_breakpoint_kind_from_current_state): New function.
583 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
584 Initialize.
585 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
586 (linux_breakpoint_kind_from_current_state): New function.
587 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
588 * linux-low.h (struct linux_target_ops)
589 <breakpoint_kind_from_current_state>: New field.
590 * target.h (struct target_ops): Likewise.
591 (target_breakpoint_kind_from_current_state): New macro.
592
1bebeeca
PA
5932015-11-30 Pedro Alves <palves@redhat.com>
594
595 * linux-low.c (linux_resume): Wake up the event loop before
596 returning.
597
a67a9fae
PA
5982015-11-30 Pedro Alves <palves@redhat.com>
599
600 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
601 check.
602 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
603 to -1.
604 * target.c (struct thread_search): New structure.
605 (thread_search_callback): New function.
606 (prev_general_thread): New global.
607 (prepare_to_access_memory, done_accessing_memory): New functions.
608 * target.h (prepare_to_access_memory, done_accessing_memory):
609 Replace macros with function declarations.
610
f2faf941
PA
6112015-11-30 Pedro Alves <palves@redhat.com>
612
613 PR 14618
614 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
615 report TARGET_WAITKIND_NO_RESUMED.
616 * remote-utils.c (prepare_resume_reply): Handle
617 TARGET_WAITKIND_NO_RESUMED.
618 * server.c (report_no_resumed): New global.
619 (handle_query) <qSupported>: Handle "no-resumed+". Report
620 "no-resumed+" support.
621 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
622 return error if the client doesn't support no-resumed events.
623 (push_stop_notification): New function.
624 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
625 events if the client supports them.
626
a681f9c9
PA
6272015-11-30 Pedro Alves <palves@redhat.com>
628
629 * linux-low.c (thread_still_has_status_pending_p): Don't check
630 vCont;t here.
631 (lwp_resumed): New function.
632 (status_pending_p_callback): Return early if the LWP is not
633 supposed to be resumed.
634
65706a29
PA
6352015-11-30 Pedro Alves <palves@redhat.com>
636
637 * linux-low.c (handle_extended_wait): Assert that the LWP's
638 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
639 thread create events, leave the new child's status pending.
640 (linux_low_filter_event): If GDB wants to hear about thread exit
641 events, leave the LWP marked dead and don't delete it.
642 (linux_wait_for_event_filtered): Don't check for thread exit.
643 (filter_exit_event): New function.
644 (linux_wait_1): Use it, when returning an exit event.
645 (linux_resume_one_lwp_throw): Assert that the LWP's
646 waitstatus is TARGET_WAITKIND_IGNORE.
647 * remote-utils.c (prepare_resume_reply): Handle
648 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
649 * server.c (report_thread_events): New global.
650 (handle_general_set): Handle QThreadEvents.
651 (handle_query) <qSupported>: Handle and report QThreadEvents+;
652 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
653 TARGET_WAITKIND_THREAD_EXITED.
654 * server.h (report_thread_events): Declare.
655
56cf4bed
PA
6562015-11-30 Pedro Alves <palves@redhat.com>
657
658 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
659 the thread's last_resume_kind was resume_stop.
660
500c1d85
PA
6612015-11-30 Pedro Alves <palves@redhat.com>
662
663 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
664 before returning.
665
de979965
PA
6662015-11-30 Pedro Alves <palves@redhat.com>
667
668 * server.c (handle_v_requests): Handle vCtrlC.
669
34c65914
PA
6702015-11-30 Pedro Alves <palves@redhat.com>
671
672 * gdbthread.h (find_any_thread_of_pid): Declare.
673 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
674 functions.
675 * server.c (handle_query): If current_thread is NULL, look for
676 another thread of the selected process.
677
79efa585 6782015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 679 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
680
681 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
682 * server.c (handle_qxfer_threads_worker): Refactor to include thread
683 name in reply.
684 * target.h (struct target_ops) <thread_name>: New field.
685 (target_thread_name): New macro.
686
80d82c19
JB
6872015-11-23 Joel Brobecker <brobecker@adacore.com>
688
689 * regcache.h (regcache_invalidate_pid): Add declaration.
690 * regcache.c (regcache_invalidate_pid): New function, extracted
691 from regcache_invalidate.
692 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
693 Add trivial documentation comment.
694 * lynx-low.c: Use regcache_invalidate_pid instead of
695 regcache_invalidate.
696
64da5dd5
JB
6972015-11-23 Joel Brobecker <brobecker@adacore.com>
698
699 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
700 and Elf64_auxv_t if the target is Android.
701
37ce4055
DE
7022015-11-22 Doug Evans <xdje42@gmail.com>
703
704 * target.h: #include <sys/types.h>.
705
06e03fff
PA
7062015-11-19 Pedro Alves <palves@redhat.com>
707
708 * linux-low.c (linux_process_qsupported): Change prototype.
709 Adjust.
710 * linux-low.h (struct linux_target_ops) <process_qsupported>:
711 Change prototype.
712 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
713 and adjust to loop over all features.
714 * server.c (handle_query) <qSupported>: Adjust to call
715 target_process_qsupported once, passing it a vector of unprocessed
716 features.
717 * target.h (struct target_ops) <process_qsupported>: Change
718 prototype.
719 (target_process_qsupported): Adjust.
720
9a084706
PA
7212015-11-19 Pedro Alves <palves@redhat.com>
722
723 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
724 mode.
725 * configure: Regenerate.
726
dad44a1f
PA
7272015-11-19 Pedro Alves <palves@redhat.com>
728
729 * configure: Regenerate.
730
231c0592
YQ
7312015-11-19 Yao Qi <yao.qi@linaro.org>
732
733 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
734 type to uint32_t.
735
6c1c9a8b
YQ
7362015-11-19 Yao Qi <yao.qi@linaro.org>
737
738 * linux-aarch64-low.c (enum aarch64_operand_type): New.
739 (struct aarch64_operand): Move enum out.
740
9caa3311
YQ
7412015-11-19 Yao Qi <yao.qi@linaro.org>
742
743 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
744 struct user_fpsimd_state *.
745 (aarch64_store_fpregset): Likewise.
746
6a69a054
YQ
7472015-11-19 Yao Qi <yao.qi@linaro.org>
748
749 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
750 struct user_pt_regs *.
751 (aarch64_store_gregset): Likewise.
752
1798301e
PA
7532015-11-18 Pedro Alves <palves@redhat.com>
754
755 * Makefile.in (all_object_files): Add $IPA_OBJS.
756
ce7715e2
PA
7572015-11-17 Pedro Alves <palves@redhat.com>
758
759 * win32-low.c (win32_resume): Use gdb_signal_from_host,
760 GDB_SIGNAL_0 and gdb_signal_to_string.
761
c0879059
PA
7622015-11-17 Pedro Alves <palves@redhat.com>
763
764 * win32-low.c (handle_output_debug_string): Remove parameter.
765 (win32_kill): Remove our_status local and adjust call to
766 handle_output_debug_string.
767 (get_child_debug_event): Adjust call to
768 handle_output_debug_string.
769
1996e237
SM
7702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
771
772 * linux-mips-low.c (mips_fill_gregset): Add cast.
773 (mips_store_gregset): Likewise.
774 (mips_fill_fpregset): Likewise.
775 (mips_store_fpregset): Likewise.
776
cbec665b
SM
7772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
778
779 * linux-mips-low.c (mips_add_watchpoint): Rename private to
780 priv.
781
eb3e3c67
SM
7822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
783
784 * linux-mips-low.c (mips_linux_new_thread): Change type of
785 watch_type to enum target_hw_bp_type.
786
171de4b8
SM
7872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
788
789 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
790 Change return type to arm_hwbp_type.
791
04248ead
SM
7922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
793
794 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
795 (arm_store_gregset): Likewise.
796 * linux-arm-low.c (arm_get_hwcap): Likewise.
797 (arm_read_description): Likewise.
798
04b3479c
SM
7992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
800
801 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
802
2bc84e8a
SM
8032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
804
805 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
806 (ppc_fill_vsxregset): Likewise.
807 (ppc_store_vsxregset): Likewise.
808 (ppc_fill_vrregset): Likewise.
809 (ppc_store_vrregset): Likewise.
810 (ppc_fill_evrregset): Likewise.
811 (ppc_store_evrregset): Likewise.
812
e6c5bb05
SM
8132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
814
815 * linux-ppc-low.c (ppc_usrregs_info): Remove
816 forward-declaration.
817 (ppc_arch_setup): Move lower in file.
818
7ea45d72
SM
8192015-10-30 Simon Marchi <simon.marchi@ericsson.com>
820
821 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
822 (ps_pdwrite): Likewise.
823
69291610
HW
8242015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
825
826 * linux-arm-low.c (arm_new_thread): Move pointer dereference
827 to after assert checks.
828
b42945fd
SM
8292015-10-29 Simon Marchi <simon.marchi@ericsson.com>
830
831 * proc-service.c (ps_pdread): Add/adjust casts.
832 (ps_pdwrite): Add/adjust casts.
833
d6f85c84
SM
8342015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
835
836 * server.c (handle_search_memory_1): Cast return value of
837 memmem.
838
f98cd059
SM
8392015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
840
841 * server.c (write_qxfer_response): Change type of data to
842 gdb_byte *.
843
d2412fa5
PA
8442015-10-29 Pedro Alves <palves@redhat.com>
845
846 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
847
c17414a2
PA
8482015-10-29 Pedro Alves <palves@redhat.com>
849
850 * tracepoint.c (clear_installed_tracepoints): Add casts.
851
e053fbc4
PA
8522015-10-29 Pedro Alves <palves@redhat.com>
853
854 * server.c (handle_v_cont, process_serial_event): Add enum
855 gdb_signal casts to signal parsing code.
856
add67df8
PA
8572015-10-29 Pedro Alves <palves@redhat.com>
858
859 * linux-low.h (NULL_REGSET): Define.
860 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
861 * linux-arm-low.c (arm_regsets): Likewise.
862 * linux-crisv32-low.c (cris_regsets): Likewise.
863 * linux-m68k-low.c (m68k_regsets): Likewise.
864 * linux-mips-low.c (mips_regsets): Likewise.
865 * linux-nios2-low.c (nios2_regsets): Likewise.
866 * linux-ppc-low.c (ppc_regsets): Likewise.
867 * linux-s390-low.c (s390_regsets): Likewise.
868 * linux-sh-low.c (sh_regsets): Likewise.
869 * linux-sparc-low.c (sparc_regsets): Likewise.
870 * linux-tic6x-low.c (tic6x_regsets): Likewise.
871 * linux-tile-low.c (tile_regsets): Likewise.
872 * linux-x86-low.c (x86_regsets): Likewise.
873 * linux-xtensa-low.c (xtensa_regsets): Likewise.
874
50bc912a
PA
8752015-10-29 Pedro Alves <palves@redhat.com>
876
877 * linux-low.h (NULL_REGSET): Define.
878 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
879 * linux-arm-low.c (arm_regsets): Likewise.
880 * linux-crisv32-low.c (cris_regsets): Likewise.
881 * linux-m68k-low.c (m68k_regsets): Likewise.
882 * linux-mips-low.c (mips_regsets): Likewise.
883 * linux-nios2-low.c (nios2_regsets): Likewise.
884 * linux-ppc-low.c (ppc_regsets): Likewise.
885 * linux-s390-low.c (s390_regsets): Likewise.
886 * linux-sh-low.c (sh_regsets): Likewise.
887 * linux-sparc-low.c (sparc_regsets): Likewise.
888 * linux-tic6x-low.c (tic6x_regsets): Likewise.
889 * linux-tile-low.c (tile_regsets): Likewise.
890 * linux-x86-low.c (x86_regsets): Likewise.
891 * linux-xtensa-low.c (xtensa_regsets): Likewise.
892
682b2546
DE
8932015-10-26 Doug Evans <dje@google.com>
894
895 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
896
963843d4
DE
8972015-10-26 Doug Evans <dje@google.com>
898
899 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
900
d41401ac
DE
9012015-10-26 Doug Evans <dje@google.com>
902
903 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
904 for debug_printf.
905 (attach_thread, find_new_threads_callback): Ditto.
906
3db28855
AT
9072015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
908
909 * mem-break.h (set_breakpoint_data): Remove.
910
fb78e89c
AT
9112015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
912
913 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
914 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
915 (initialize_low): Remove set_breakpoint_data call.
916 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
917 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
918 (initialize_low): Remove set_breakpoint_data call.
919 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
920 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
921 (initialize_low): Remove set_breakpoint_data call.
922
2e6ee069
AT
9232015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
924
925 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
926 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
927 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
928 * target.h (target_breakpoint_kind_from_pc): New macro.
929
1652a986
AT
9302015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
931
932 * linux-low.c (default_breakpoint_kind_from_pc): New function.
933 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
934 the default breakpoint kind.
935
abeead09
AT
9362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
937
938 * linux-arm-low.c (arm_supports_z_point_type): Add software
939 breakpoint support.
940
b0b4b501
AT
9412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
942
943 * linux-arm-low.c: Refactor breakpoint definitions.
944 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
945 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
946
8689682c
AT
9472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
948
949 * Makefile.in: Add arm.c/o.
950 * configure.srv: Likewise.
951 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
952 (arm_breakpoint_kind_from_pc): New function.
953 (arm_sw_breakpoint_from_kind): Return proper kind.
954 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
955
27165294
AT
9562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
957
958 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
959 removal.
960 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
961 (struct raw_breakpoint) <size>: Remove.
962 (struct raw_breakpoint) <kind>: Add.
963 (bp_size): New function.
964 (bp_opcode): Likewise.
965 (find_raw_breakpoint_at): Adjust for kind.
966 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
967 (remove_memory_breakpoint): Adjust for kind call bp_size.
968 (set_raw_breakpoint_at): Adjust for kind.
969 (set_breakpoint): Likewise.
970 (set_breakpoint_at): Call breakpoint_kind_from_pc.
971 (delete_raw_breakpoint): Adjust for kind.
972 (delete_breakpoint): Likewise.
973 (find_gdb_breakpoint): Likewise.
974 (set_gdb_breakpoint_1): Likewise.
975 (set_gdb_breakpoint): Likewise.
976 (delete_gdb_breakpoint_1): Likewise.
977 (delete_gdb_breakpoint): Likewise.
978 (uninsert_raw_breakpoint): Likewise.
979 (reinsert_raw_breakpoint): Likewise.
980 (set_breakpoint_data): Remove.
981 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
982 (check_mem_read): Adjust for kind call bp_size.
983 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
984 (clone_one_breakpoint): Adjust for kind.
985 * mem-break.h (set_gdb_breakpoint): Likewise.
986 (delete_gdb_breakpoint): Likewise.
987 * server.c (process_serial_event): Likewise.
988
dd373349
AT
9892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
990
991 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
997 (arm_sw_breakpoint_from_kind): New function.
998 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
999 (struct linux_target_ops) <breakpoint>: Remove.
1000 (struct linux_target_ops) <breakpoint_len>: Remove.
1001 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1002 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1003 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1004 (struct linux_target_ops) <breakpoint>: Remove.
1005 (struct linux_target_ops) <breakpoint_len>: Remove.
1006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1007 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1008 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1009 (struct linux_target_ops) <breakpoint>: Remove.
1010 (struct linux_target_ops) <breakpoint_len>: Remove.
1011 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1012 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1013 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1014 and sw_breakpoint_from_kind to increment the pc.
1015 (linux_breakpoint_kind_from_pc): New function.
1016 (linux_sw_breakpoint_from_kind): New function.
1017 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1018 (initialize_low): Call breakpoint_kind_from_pc and
1019 sw_breakpoint_from_kind to replace breakpoint_data/len.
1020 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1021 New field.
1022 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1023 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1024 (struct linux_target_ops) <breakpoint>: Remove.
1025 (struct linux_target_ops) <breakpoint_len>: Remove.
1026 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1027 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1028 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1029 (struct linux_target_ops) <breakpoint>: Remove.
1030 (struct linux_target_ops) <breakpoint_len>: Remove.
1031 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1032 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1033 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1034 (struct linux_target_ops) <breakpoint>: Remove.
1035 (struct linux_target_ops) <breakpoint_len>: Remove.
1036 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1037 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1038 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1039 (struct linux_target_ops) <breakpoint>: Remove.
1040 (struct linux_target_ops) <breakpoint_len>: Remove.
1041 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1042 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1043 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1044 (struct linux_target_ops) <breakpoint>: Remove.
1045 (struct linux_target_ops) <breakpoint_len>: Remove.
1046 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1047 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1048 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1049 (struct linux_target_ops) <breakpoint>: Remove.
1050 (struct linux_target_ops) <breakpoint_len>: Remove.
1051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1053 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1054 (struct linux_target_ops) <breakpoint>: Remove.
1055 (struct linux_target_ops) <breakpoint_len>: Remove.
1056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1058 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1059 (struct linux_target_ops) <breakpoint>: Remove.
1060 (struct linux_target_ops) <breakpoint_len>: Remove.
1061 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1062 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1063 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1064 (struct linux_target_ops) <breakpoint>: Remove.
1065 (struct linux_target_ops) <breakpoint_len>: Remove.
1066 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1067 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1068 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1069 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1070 (struct linux_target_ops) <breakpoint>: Remove.
1071 (struct linux_target_ops) <breakpoint_len>: Remove.
1072 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1073 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1074 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1075 (struct linux_target_ops) <breakpoint>: Remove.
1076 (struct linux_target_ops) <breakpoint_len>: Remove.
1077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1079
4cd98a19
AT
10802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1081
1082 * linux-cris-low.c (cris_get_pc): Remove void arg.
1083
774ee6d2
AR
10842015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1085
1086 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1087 variable name.
1088
833dcd29
AR
10892015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1090
1091 * inferiors.c (thread_pid_matches_callback): New function.
1092 (find_thread_process): New function.
1093 (remove_thread): Reset current_thread.
1094 (remove_process): Assert threads have been removed first.
1095
8d689ee5
YQ
10962015-10-15 Yao Qi <yao.qi@linaro.org>
1097
1098 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1099 if it is 3.
1100 (aarch64_remove_point): Likewise.
1101 * regcache.c (regcache_register_size): New function.
1102
1c2e1515
YQ
11032015-10-12 Yao Qi <yao.qi@linaro.org>
1104
1105 * linux-aarch64-low.c: Update all callers as emit_load_store
1106 is renamed to aarch64_emit_load_store.
1107
e1c587c3
YQ
11082015-10-12 Yao Qi <yao.qi@linaro.org>
1109
1110 * linux-aarch64-low.c: Update all callers of function renaming
1111 from emit_insn to aarch64_emit_insn.
1112
b6542f81
YQ
11132015-10-12 Yao Qi <yao.qi@linaro.org>
1114
1115 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1116 arch/aarch64-insn.h.
1117 (struct aarch64_memory_operand): Likewise.
1118 (ENCODE): Likewise.
1119 (emit_insn): Move to arch/aarch64-insn.c.
1120 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1121 (emit_load_store): Move to arch/aarch64-insn.c.
1122 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1123 (can_encode_int32): Remove.
1124
246994ce
YQ
11252015-10-12 Yao Qi <yao.qi@linaro.org>
1126
1127 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1128 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1129 (aarch64_relocate_instruction): Likewise.
1130 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1131 (struct aarch64_insn_visitor): Likewise.
1132
0badd99f
YQ
11332015-10-12 Yao Qi <yao.qi@linaro.org>
1134
1135 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1136 (struct aarch64_insn_visitor): New.
1137 (struct aarch64_insn_relocation_data): New.
1138 (aarch64_ftrace_insn_reloc_b): New function.
1139 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1140 (aarch64_ftrace_insn_reloc_cb): Likewise.
1141 (aarch64_ftrace_insn_reloc_tb): Likewise.
1142 (aarch64_ftrace_insn_reloc_adr): Likewise.
1143 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1144 (aarch64_ftrace_insn_reloc_others): Likewise.
1145 (visitor): New.
1146 (aarch64_relocate_instruction): Use visitor.
1147
dfaffe9d
YQ
11482015-10-12 Yao Qi <yao.qi@linaro.org>
1149
1150 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1151 int. Add argument buf.
1152 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1153 aarch64_relocate_instruction.
1154
70b439f0
YQ
11552015-10-12 Yao Qi <yao.qi@linaro.org>
1156
1157 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1158 argument insn. Remove local variable insn. Don't call
1159 target_read_uint32.
1160 (aarch64_install_fast_tracepoint_jump_pad): Call
1161 target_read_uint32.
1162
7781c06f
YQ
11632015-09-30 Yao Qi <yao.qi@linaro.org>
1164
1165 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1166 (emit_load_store_pair): Likewise.
1167
9a3c8263
SM
11682015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1169
1170 * dll.c (match_dll): Add cast(s).
1171 (unloaded_dll): Likewise.
1172 * linux-low.c (second_thread_of_pid_p): Likewise.
1173 (delete_lwp_callback): Likewise.
1174 (count_events_callback): Likewise.
1175 (select_event_lwp_callback): Likewise.
1176 (linux_set_resume_request): Likewise.
1177 * server.c (accumulate_file_name_length): Likewise.
1178 (emit_dll_description): Likewise.
1179 (handle_qxfer_threads_worker): Likewise.
1180 (visit_actioned_threads): Likewise.
1181 * thread-db.c (any_thread_of): Likewise.
1182 * tracepoint.c (same_process_p): Likewise.
1183 (match_blocktype): Likewise.
1184 (build_traceframe_info_xml): Likewise.
1185
224c3ddb
SM
11862015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1187
1188 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1189 assignment.
1190 (gdb_unparse_agent_expr): Likewise.
1191 * hostio.c (require_data): Likewise.
1192 (handle_pread): Likewise.
1193 * linux-low.c (disable_regset): Likewise.
1194 (fetch_register): Likewise.
1195 (store_register): Likewise.
1196 (get_dynamic): Likewise.
1197 (linux_qxfer_libraries_svr4): Likewise.
1198 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1199 (set_fast_tracepoint_jump): Likewise.
1200 (uninsert_fast_tracepoint_jumps_at): Likewise.
1201 (reinsert_fast_tracepoint_jumps_at): Likewise.
1202 (validate_inserted_breakpoint): Likewise.
1203 (clone_agent_expr): Likewise.
1204 * regcache.c (init_register_cache): Likewise.
1205 * remote-utils.c (putpkt_binary_1): Likewise.
1206 (decode_M_packet): Likewise.
1207 (decode_X_packet): Likewise.
1208 (look_up_one_symbol): Likewise.
1209 (relocate_instruction): Likewise.
1210 (monitor_output): Likewise.
1211 * server.c (handle_search_memory): Likewise.
1212 (handle_qxfer_exec_file): Likewise.
1213 (handle_qxfer_libraries): Likewise.
1214 (handle_qxfer): Likewise.
1215 (handle_query): Likewise.
1216 (handle_v_cont): Likewise.
1217 (handle_v_run): Likewise.
1218 (captured_main): Likewise.
1219 * target.c (write_inferior_memory): Likewise.
1220 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1221 * tracepoint.c (init_trace_buffer): Likewise.
1222 (add_tracepoint_action): Likewise.
1223 (add_traceframe): Likewise.
1224 (add_traceframe_block): Likewise.
1225 (cmd_qtdpsrc): Likewise.
1226 (cmd_qtdv): Likewise.
1227 (cmd_qtstatus): Likewise.
1228 (response_source): Likewise.
1229 (response_tsv): Likewise.
1230 (cmd_qtnotes): Likewise.
1231 (gdb_collect): Likewise.
1232 (initialize_tracepoint): Likewise.
1233
afbe19f8
PL
12342015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1235
1236 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1237 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1238 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1239 <NOP>: New.
1240 (enum aarch64_condition_codes): New enum.
1241 (w0): New static global.
1242 (fp): Likewise.
1243 (lr): Likewise.
1244 (struct aarch64_memory_operand) <type>: New
1245 MEMORY_OPERAND_POSTINDEX type.
1246 (postindex_memory_operand): New helper function.
1247 (emit_ret): New function.
1248 (emit_load_store_pair): New function, factored out of emit_stp
1249 with support for MEMORY_OPERAND_POSTINDEX.
1250 (emit_stp): Rewrite using emit_load_store_pair.
1251 (emit_ldp): New function.
1252 (emit_load_store): Likewise.
1253 (emit_ldr): Mention post-index instruction in comment.
1254 (emit_ldrh): New function.
1255 (emit_ldrb): New function.
1256 (emit_ldrsw): Mention post-index instruction in comment.
1257 (emit_str): Likewise.
1258 (emit_subs): New function.
1259 (emit_cmp): Likewise.
1260 (emit_and): Likewise.
1261 (emit_orr): Likewise.
1262 (emit_orn): Likewise.
1263 (emit_eor): Likewise.
1264 (emit_mvn): Likewise.
1265 (emit_lslv): Likewise.
1266 (emit_lsrv): Likewise.
1267 (emit_asrv): Likewise.
1268 (emit_mul): Likewise.
1269 (emit_sbfm): Likewise.
1270 (emit_sbfx): Likewise.
1271 (emit_ubfm): Likewise.
1272 (emit_ubfx): Likewise.
1273 (emit_csinc): Likewise.
1274 (emit_cset): Likewise.
1275 (emit_nop): Likewise.
1276 (emit_ops_insns): New helper function.
1277 (emit_pop): Likewise.
1278 (emit_push): Likewise.
1279 (aarch64_emit_prologue): New function.
1280 (aarch64_emit_epilogue): Likewise.
1281 (aarch64_emit_add): Likewise.
1282 (aarch64_emit_sub): Likewise.
1283 (aarch64_emit_mul): Likewise.
1284 (aarch64_emit_lsh): Likewise.
1285 (aarch64_emit_rsh_signed): Likewise.
1286 (aarch64_emit_rsh_unsigned): Likewise.
1287 (aarch64_emit_ext): Likewise.
1288 (aarch64_emit_log_not): Likewise.
1289 (aarch64_emit_bit_and): Likewise.
1290 (aarch64_emit_bit_or): Likewise.
1291 (aarch64_emit_bit_xor): Likewise.
1292 (aarch64_emit_bit_not): Likewise.
1293 (aarch64_emit_equal): Likewise.
1294 (aarch64_emit_less_signed): Likewise.
1295 (aarch64_emit_less_unsigned): Likewise.
1296 (aarch64_emit_ref): Likewise.
1297 (aarch64_emit_if_goto): Likewise.
1298 (aarch64_emit_goto): Likewise.
1299 (aarch64_write_goto_address): Likewise.
1300 (aarch64_emit_const): Likewise.
1301 (aarch64_emit_call): Likewise.
1302 (aarch64_emit_reg): Likewise.
1303 (aarch64_emit_pop): Likewise.
1304 (aarch64_emit_stack_flush): Likewise.
1305 (aarch64_emit_zero_ext): Likewise.
1306 (aarch64_emit_swap): Likewise.
1307 (aarch64_emit_stack_adjust): Likewise.
1308 (aarch64_emit_int_call_1): Likewise.
1309 (aarch64_emit_void_call_2): Likewise.
1310 (aarch64_emit_eq_goto): Likewise.
1311 (aarch64_emit_ne_goto): Likewise.
1312 (aarch64_emit_lt_goto): Likewise.
1313 (aarch64_emit_le_goto): Likewise.
1314 (aarch64_emit_gt_goto): Likewise.
1315 (aarch64_emit_ge_got): Likewise.
1316 (aarch64_emit_ops_impl): New static global variable.
1317 (aarch64_emit_ops): New target function, return
1318 &aarch64_emit_ops_impl.
1319 (struct linux_target_ops): Install it.
1320
bb903df0
PL
13212015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1322
1323 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1324 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1325 aarch64-ipa.o.
1326 * linux-aarch64-ipa.c: New file.
1327 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1328 and endian.h.
1329 (aarch64_get_thread_area): New target method.
1330 (extract_signed_bitfield): New helper function.
1331 (aarch64_decode_ldr_literal): New function.
1332 (enum aarch64_opcodes): New enum.
1333 (struct aarch64_register): New struct.
1334 (struct aarch64_operand): New struct.
1335 (x0): New static global.
1336 (x1): Likewise.
1337 (x2): Likewise.
1338 (x3): Likewise.
1339 (x4): Likewise.
1340 (w2): Likewise.
1341 (ip0): Likewise.
1342 (sp): Likewise.
1343 (xzr): Likewise.
1344 (aarch64_register): New helper function.
1345 (register_operand): Likewise.
1346 (immediate_operand): Likewise.
1347 (struct aarch64_memory_operand): New struct.
1348 (offset_memory_operand): New helper function.
1349 (preindex_memory_operand): Likewise.
1350 (enum aarch64_system_control_registers): New enum.
1351 (ENCODE): New macro.
1352 (emit_insn): New helper function.
1353 (emit_b): New function.
1354 (emit_bcond): Likewise.
1355 (emit_cb): Likewise.
1356 (emit_tb): Likewise.
1357 (emit_blr): Likewise.
1358 (emit_stp): Likewise.
1359 (emit_ldp_q_offset): Likewise.
1360 (emit_stp_q_offset): Likewise.
1361 (emit_load_store): Likewise.
1362 (emit_ldr): Likewise.
1363 (emit_ldrsw): Likewise.
1364 (emit_str): Likewise.
1365 (emit_ldaxr): Likewise.
1366 (emit_stxr): Likewise.
1367 (emit_stlr): Likewise.
1368 (emit_data_processing_reg): Likewise.
1369 (emit_data_processing): Likewise.
1370 (emit_add): Likewise.
1371 (emit_sub): Likewise.
1372 (emit_mov): Likewise.
1373 (emit_movk): Likewise.
1374 (emit_mov_addr): Likewise.
1375 (emit_mrs): Likewise.
1376 (emit_msr): Likewise.
1377 (emit_sevl): Likewise.
1378 (emit_wfe): Likewise.
1379 (append_insns): Likewise.
1380 (can_encode_int32_in): New helper function.
1381 (aarch64_relocate_instruction): New function.
1382 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1383 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1384 (struct linux_target_ops): Install aarch64_get_thread_area,
1385 aarch64_install_fast_tracepoint_jump_pad and
1386 aarch64_get_min_fast_tracepoint_insn_len.
1387
787749ea
PL
13882015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1389
1390 * Makefile.in (aarch64-insn.o): New rule.
1391 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1392
9812b2e6
YQ
13932015-09-21 Yao Qi <yao.qi@linaro.org>
1394
1395 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1396
18fe412b
YQ
13972015-09-21 Yao Qi <yao.qi@linaro.org>
1398
1399 * tracepoint.c (max_jump_pad_size): Remove.
1400
a0cc84cd
YQ
14012015-09-18 Yao Qi <yao.qi@linaro.org>
1402
1403 * linux-aarch64-low.c: Don't include sys/uio.h.
1404 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1405
d78908cf
WW
14062015-09-16 Wei-cheng Wang <cole945@gmail.com>
1407
1408 * tracepoint.c (eval_result_type): Change prototype.
1409 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1410
d57e0d50
PA
14112015-09-15 Pedro Alves <palves@redhat.com>
1412
1413 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1414 Check whether to report exec events instead of checking whether
1415 multiprocess is enabled.
1416
5a676acc
PA
14172015-09-15 Pedro Alves <palves@redhat.com>
1418
1419 PR remote/18965
1420 * remote-utils.c (prepare_resume_reply): Merge
1421 TARGET_WAITKIND_VFORK_DONE switch case with the
1422 TARGET_WAITKIND_FORKED case.
1423
7c5d0fad
YQ
14242015-09-15 Yao Qi <yao.qi@linaro.org>
1425
1426 * server.c (handle_query): Check string comparison using
1427 "else if" instead of "if".
1428
750ce8d1
YQ
14292015-09-15 Yao Qi <yao.qi@linaro.org>
1430
1431 * server.c (vCont_supported): New global variable.
1432 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1433 matches. Append ";vContSupported+" to own_buf.
1434 (handle_v_requests): Append ";s;S" to own_buf if target supports
1435 hardware single step or vCont_supported is false.
1436 (capture_main): Set vCont_supported to zero.
1437
70b90b91
YQ
14382015-09-15 Yao Qi <yao.qi@linaro.org>
1439
1440 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1441 it to ...
1442 (linux_supports_hardware_single_step): ... New function.
1443 (linux_target_ops): Update.
1444 * lynx-low.c (lynx_target_ops): Set field
1445 supports_hardware_single_step to target_can_do_hardware_single_step.
1446 * nto-low.c (nto_target_ops): Likewise.
1447 * spu-low.c (spu_target_ops): Likewise.
1448 * win32-low.c (win32_target_ops): Likewise.
1449 * target.c (target_can_do_hardware_single_step): New function.
1450 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1451 Remove. <supports_hardware_single_step>: New field.
1452 (target_supports_conditional_breakpoints): Remove.
1453 (target_supports_hardware_single_step): New macro.
1454 (target_can_do_hardware_single_step): Declare.
1455 * server.c (handle_query): Use target_supports_hardware_single_step
1456 instead of target_supports_conditional_breakpoints.
1457
ade90bde
YQ
14582015-09-15 Yao Qi <yao.qi@linaro.org>
1459
1460 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1461 function.
1462 (struct linux_target_ops the_low_target): Install
1463 aarch64_linux_siginfo_fixup.
1464
94585166
DB
14652015-09-11 Don Breazeal <donb@codesourcery.com>
1466 Luis Machado <lgustavo@codesourcery.com>
1467
1468 * linux-low.c (linux_mourn): Static declaration.
1469 (linux_arch_setup): Move in front of
1470 handle_extended_wait.
1471 (linux_arch_setup_thread): New function.
1472 (handle_extended_wait): Handle exec events. Call
1473 linux_arch_setup_thread. Make event_lwp argument a
1474 pointer-to-a-pointer.
1475 (check_zombie_leaders): Do not check stopped threads.
1476 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1477 (linux_low_filter_event): Add lwp and thread for exec'ing
1478 non-leader thread if leader thread has been deleted.
1479 Refactor code into linux_arch_setup_thread and call it.
1480 Pass child lwp pointer by reference to handle_extended_wait.
1481 (linux_wait_for_event_filtered): Update comment.
1482 (linux_wait_1): Prevent clobbering exec event status.
1483 (linux_supports_exec_events): New function.
1484 (linux_target_ops) <supports_exec_events>: Initialize new member.
1485 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1486 new member.
1487 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1488 * server.c (report_exec_events): New global variable.
1489 (handle_query): Handle qSupported query for exec-events feature.
1490 (captured_main): Initialize report_exec_events.
1491 * server.h (report_exec_events): Declare new global variable.
1492 * target.h (struct target_ops) <supports_exec_events>: New
1493 member.
1494 (target_supports_exec_events): New macro.
1495 * win32-low.c (win32_target_ops) <supports_exec_events>:
1496 Initialize new member.
1497
0568462b
MM
14982015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1499
1500 * linux-low.c (linux_low_enable_btrace): Remove.
1501 (linux_target_ops): Replace linux_low_enable_btrace with
1502 linux_enable_btrace.
1503
39edd165
YQ
15042015-09-03 Yao Qi <yao.qi@linaro.org>
1505
1506 * linux-aarch64-low.c (aarch64_insert_point): Call
1507 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1508 returns true.
1509
1db33b5a
UW
15102015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1511
1512 * linux-low.c (check_stopped_by_breakpoint): Use
1513 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1514
ab290430
PA
15152015-08-27 Pedro Alves <palves@redhat.com>
1516
1517 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1518
8d749320
SM
15192015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1520
6711b7f8
SM
1521 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1522 the XNEW-family equivalent.
8d749320
SM
1523 (compile_bytecodes): Likewise.
1524 * dll.c (loaded_dll): Likewise.
1525 * event-loop.c (append_callback_event): Likewise.
1526 (create_file_handler): Likewise.
1527 (create_file_event): Likewise.
1528 * hostio.c (handle_open): Likewise.
1529 * inferiors.c (add_thread): Likewise.
1530 (add_process): Likewise.
1531 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1532 * linux-arm-low.c (arm_new_process): Likewise.
1533 (arm_new_thread): Likewise.
1534 * linux-low.c (add_to_pid_list): Likewise.
1535 (linux_add_process): Likewise.
1536 (handle_extended_wait): Likewise.
1537 (add_lwp): Likewise.
1538 (enqueue_one_deferred_signal): Likewise.
1539 (enqueue_pending_signal): Likewise.
1540 (linux_resume_one_lwp_throw): Likewise.
1541 (linux_resume_one_thread): Likewise.
1542 (linux_read_memory): Likewise.
1543 (linux_write_memory): Likewise.
1544 * linux-mips-low.c (mips_linux_new_process): Likewise.
1545 (mips_linux_new_thread): Likewise.
1546 (mips_add_watchpoint): Likewise.
1547 * linux-x86-low.c (initialize_low_arch): Likewise.
1548 * lynx-low.c (lynx_add_process): Likewise.
1549 * mem-break.c (set_raw_breakpoint_at): Likewise.
1550 (set_breakpoint): Likewise.
1551 (add_condition_to_breakpoint): Likewise.
1552 (add_commands_to_breakpoint): Likewise.
1553 (clone_agent_expr): Likewise.
1554 (clone_one_breakpoint): Likewise.
1555 * regcache.c (new_register_cache): Likewise.
1556 * remote-utils.c (look_up_one_symbol): Likewise.
1557 * server.c (queue_stop_reply): Likewise.
1558 (start_inferior): Likewise.
1559 (queue_stop_reply_callback): Likewise.
1560 (handle_target_event): Likewise.
1561 * spu-low.c (fetch_ppc_memory): Likewise.
1562 (store_ppc_memory): Likewise.
1563 * target.c (set_target_ops): Likewise.
1564 * thread-db.c (thread_db_load_search): Likewise.
1565 (try_thread_db_load_1): Likewise.
1566 * tracepoint.c (add_tracepoint): Likewise.
1567 (add_tracepoint_action): Likewise.
1568 (create_trace_state_variable): Likewise.
1569 (cmd_qtdpsrc): Likewise.
1570 (cmd_qtro): Likewise.
1571 (add_while_stepping_state): Likewise.
1572 * win32-low.c (child_add_thread): Likewise.
1573 (get_image_name): Likewise.
1574
ed8b7b42
YQ
15752015-08-25 Yao Qi <yao.qi@linaro.org>
1576
1577 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1578
db3cb7cb
YQ
15792015-08-25 Yao Qi <yao.qi@linaro.org>
1580
1581 * Makefile.in (aarch64-linux.o): New rule.
1582 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1583 srv_tgtobj.
1584 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1585 (aarch64_init_debug_reg_state): Make it extern.
1586 (aarch64_linux_prepare_to_resume): Remove.
1587
f6011a1c
YQ
15882015-08-25 Yao Qi <yao.qi@linaro.org>
1589
1590 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1591 lwp_arch_private_info and ptid_of_lwp.
1592
88e2cf7e
YQ
15932015-08-25 Yao Qi <yao.qi@linaro.org>
1594
1595 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1596 Find proc_info by find_process_pid. All callers updated.
1597
5e35436e
YQ
15982015-08-25 Yao Qi <yao.qi@linaro.org>
1599
1600 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1601 Remove.
1602 (debug_reg_change_callback): Remove.
1603 (aarch64_notify_debug_reg_change): Remove.
1604
4a8a7965
YQ
16052015-08-25 Yao Qi <yao.qi@linaro.org>
1606
1607 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1608 Call current_lwp_ptid.
1609
32a271ee
YQ
16102015-08-25 Yao Qi <yao.qi@linaro.org>
1611
1612 * linux-aarch64-low.c (debug_reg_change_callback): Use
1613 debug_printf.
1614
0d51c8d7
YQ
16152015-08-25 Yao Qi <yao.qi@linaro.org>
1616
1617 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1618
31a43dd5
YQ
16192015-08-25 Yao Qi <yao.qi@linaro.org>
1620
1621 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1622
8ee52567
YQ
16232015-08-25 Yao Qi <yao.qi@linaro.org>
1624
1625 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1626 the code.
1627
ff3f0f45
YQ
16282015-08-25 Yao Qi <yao.qi@linaro.org>
1629
1630 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1631 Remove.
1632 (debug_reg_change_callback): Remove argument entry and add argument
1633 lwp. Remove local variable thread. Don't print thread id in the
1634 debugging output. Don't check whether pid of thread equals to pid.
1635 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1636 iterate_over_lwps instead find_inferior.
1637
3d40fbb5
PA
16382015-08-24 Pedro Alves <palves@redhat.com>
1639
1640 * inferiors.c (get_first_process): New function.
1641 * inferiors.h (get_first_process): New declaration.
1642 * remote-utils.c (read_ptid): Default to the first process in the
1643 list, instead of to the current thread's process.
1644
438e1e42
PA
16452015-08-24 Pedro Alves <palves@redhat.com>
1646
1647 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1648 * event-loop.c: Likewise.
1649 * remote-utils.c: Likewise.
1650 * tracepoint.c: Likewise.
1651
a8c6d4fc
PA
16522015-08-24 Pedro Alves <palves@redhat.com>
1653
1654 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1655 ptid_get_lwp.
1656
99b0bb12
PA
16572015-08-21 Pedro Alves <palves@redhat.com>
1658
1659 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1660 instead of literal 1.
1661
f8904751
PA
16622015-08-21 Pedro Alves <palves@redhat.com>
1663
1664 * tdesc.c (default_description): Explicitly zero-initialize.
1665
465a859e
PA
16662015-08-21 Pedro Alves <palves@redhat.com>
1667
1668 PR gdb/18749
1669 * inferiors.c (remove_thread): Discard any pending stop reply for
1670 this thread.
1671 * server.c (remove_all_on_match_pid): Rename to ...
1672 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1673 instead of a pid.
1674 (discard_queued_stop_replies): Change parameter to a ptid. Now
1675 extern.
1676 (handle_v_kill, kill_inferior_callback, captured_main)
1677 (process_serial_event): Adjust.
1678 * server.h (discard_queued_stop_replies): Declare.
1679
f0db101d
PA
16802015-08-21 Pedro Alves <palves@redhat.com>
1681
1682 * linux-low.c (wait_for_sigstop): Always switch to no thread
1683 selected if the previously current thread dies.
1684 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1685 process instead of the current thread's.
1686 * remote-utils.c (input_interrupt): Don't check if there's no
1687 current thread.
1688 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1689 current thread to the general thread fails, error out.
1690 (handle_qxfer_auxv, handle_qxfer_libraries)
1691 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1692 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1693 (handle_query): Check if there's a thread selected instead of
1694 checking whether there's any thread in the thread list.
1695 (handle_qxfer_threads, handle_qxfer_btrace)
1696 (handle_qxfer_btrace_conf): Don't error out early if there's no
1697 thread in the thread list.
1698 (handle_v_cont, myresume): Don't set the current thread to the
1699 continue thread.
1700 (process_serial_event) <Hg handling>: Also set thread_id if the
1701 previous general thread is still alive.
1702 (process_serial_event) <g/G handling>: If setting the current
1703 thread to the general thread fails, error out.
1704 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1705 thread's lwp instead of the current thread's.
1706 * target.c (set_desired_thread): If the desired thread was not
1707 found, leave the current thread pointing to NULL. Return an int
1708 (boolean) indicating success.
1709 * target.h (set_desired_thread): Change return type to int.
1710
40045d91
MF
17112015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1712
1713 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1714 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1715 #includes.
1716 (ps_get_thread_area): New function.
1717
45face3b
GB
17182015-08-19 Gary Benson <gbenson@redhat.com>
1719
1720 * hostio.c (handle_pread): Do not attempt to read more data
1721 than hostio_reply_with_data can fit in a packet.
1722
16d5f642
JB
17232015-08-18 Joel Brobecker <brobecker@adacore.com>
1724
1725 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1726
a738da3a
MF
17272015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1728
1729 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1730
33ebda9d
PA
17312015-08-06 Pedro Alves <palves@redhat.com>
1732
1733 * tracepoint.c (expr_eval_result): Now an int.
1734
a44892be
PA
17352015-08-06 Pedro Alves <palves@redhat.com>
1736
1737 * gdbthread.h (struct regcache): Forward declare.
1738 (struct thread_info) <regcache_data>: Now a struct regcache
1739 pointer.
1740 * inferiors.c (inferior_regcache_data)
1741 (set_inferior_regcache_data): Now work with struct regcache
1742 pointers.
1743 * inferiors.h (struct regcache): Forward declare.
1744 (inferior_regcache_data, set_inferior_regcache_data): Now work
1745 with struct regcache pointers.
1746 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1747 (free_register_cache_thread): Remove struct regcache pointer
1748 casts.
1749
608a1e46
PA
17502015-08-06 Pedro Alves <palves@redhat.com>
1751
1752 * server.c (captured_main): On error, print the exception message
1753 to stderr, and if run_once is set, throw a quit.
1754
f0ce0d3a
PA
17552015-08-06 Pedro Alves <palves@redhat.com>
1756
1757 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1758 the current thread.
1759
bf47e248
PA
17602015-08-06 Pedro Alves <palves@redhat.com>
1761
1762 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1763 reading beyond the passed in buffer length.
1764
b6b9ffcc
PL
17652015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1766
1767 * tracepoint.c (symbol_list) <required>: Remove.
1768
863d01bd
PA
17692015-08-06 Pedro Alves <palves@redhat.com>
1770
1771 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1772 count if stopping and suspending threads.
1773 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1774 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1775 (linux_detach): Complete an ongoing step-over.
1776 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1777 throughout.
1778 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1779 (linux_wait_1): If passing a signal to the inferior after
1780 finishing a step-over, unsuspend and re-resume all lwps. If we
1781 see a single-step event but the thread should be continuing, don't
1782 pass the trap to gdb.
1783 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1784 internal_error instead of gdb_assert.
1785 (enqueue_pending_signal): New function.
1786 (check_ptrace_stopped_lwp_gone): Add debug output.
1787 (start_step_over): Use internal_error instead of gdb_assert.
1788 (complete_ongoing_step_over): New function.
1789 (linux_resume_one_thread): Don't resume a suspended thread.
1790 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1791 it stepping.
1792
00db26fa
PA
17932015-08-06 Pedro Alves <palves@redhat.com>
1794
1795 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1796 (linux_thread_alive): Use lwp_is_marked_dead.
1797 (extended_event_reported): Delete.
1798 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1799 instead of extended_event_reported.
1800 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1801 as well.
1802 (lwp_is_marked_dead): New function.
1803 (lwp_running): Use lwp_is_marked_dead.
1804 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1805 comment.
1806
ad071a30
PA
18072015-08-06 Pedro Alves <palves@redhat.com>
1808
1809 * linux-low.c (linux_wait_1): Move fork event output out of the
1810 !report_to_gdb check. Pass event_child->waitstatus to
1811 target_waitstatus_to_string instead of ourstatus.
1812
524b57e6
YQ
18132015-08-04 Yao Qi <yao.qi@linaro.org>
1814
1815 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1816 if current_thread is 32 bit.
1817
6085d6f6
YQ
18182015-08-04 Yao Qi <yao.qi@linaro.org>
1819
1820 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1821 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1822 * server.c (extended_protocol): Remove "static".
1823 * server.h (extended_protocol): Declare it.
1824
8a7e4587
YQ
18252015-08-04 Yao Qi <yao.qi@linaro.org>
1826
1827 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1828 both aarch64 and aarch32.
1829 (aarch64_set_pc): Likewise.
1830
3b53ae99
YQ
18312015-08-04 Yao Qi <yao.qi@linaro.org>
1832
1833 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1834 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1835 arm-with-neon.xml to srv_xmlfiles.
1836 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1837 (is_64bit_tdesc): New function.
1838 (aarch64_linux_read_description): New function.
1839 (aarch64_arch_setup): Call aarch64_linux_read_description.
1840 (regs_info): Rename to regs_info_aarch64.
1841 (aarch64_regs_info): Return right regs_info.
1842 (initialize_low_arch): Call initialize_low_arch_aarch32.
1843
bd9e6534
YQ
18442015-08-04 Yao Qi <yao.qi@linaro.org>
1845
1846 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1847 * linux-aarch32-low.c: New file.
1848 * linux-aarch32-low.h: New file.
1849 * linux-arm-low.c (arm_fill_gregset): Move it to
1850 linux-aarch32-low.c.
1851 (arm_store_gregset): Likewise.
1852 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1853 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1854 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1855 (regs_info): Rename to regs_info_arm.
1856 (arm_regs_info): Return regs_info_aarch32 if
1857 have_ptrace_getregset is 1 and target description is
1858 arm_with_neon or arm_with_vfpv3.
1859 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1860 Call initialize_low_arch_aarch32 instead.
1861
ded48a5e
YQ
18622015-08-04 Yao Qi <yao.qi@linaro.org>
1863
1864 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1865 * linux-low.c: ... here.
1866 * linux-low.h (have_ptrace_getregset): Declare it.
1867
96e9210f
PA
18682015-08-04 Pedro Alves <palves@redhat.com>
1869
1870 * thread-db.c (struct thread_db): Use new typedefs.
1871 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1872 CHK calls.
1873 (disable_thread_event_reporting): Cast result of dlsym to
1874 destination function pointer type.
1875 (thread_db_mourn): Use td_ta_delete_ftype.
1876
af60a1ef
SL
18772015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1878
1879 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1880 arch variant.
1881 (CDX_BREAKPOINT): Define for R2.
1882 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1883 (the_low_target): Add comments.
1884
e8b41681
YQ
18852015-07-30 Yao Qi <yao.qi@linaro.org>
1886
1887 * linux-arm-low.c (arm_hwcap): Remove it.
1888 (arm_read_description): New local variable arm_hwcap. Don't
1889 set arm_hwcap to zero.
1890
89abb039
YQ
18912015-07-30 Yao Qi <yao.qi@linaro.org>
1892
1893 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1894 Use regcache->tdesc instead.
1895 (arm_store_wmmxregset): Likewise.
1896 (arm_fill_vfpregset): Likewise.
1897 (arm_store_vfpregset): Likewise.
1898
deca266c
YQ
18992015-07-30 Yao Qi <yao.qi@linaro.org>
1900
1901 * linux-arm-low.c: Include arch/arm.h.
1902 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1903 (arm_store_gregset): Likewise.
1904
aa58a496
SM
19052015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1906
1907 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1908 ptrace's 4th parameter.
1909
50904b25
YQ
19102015-07-27 Yao Qi <yao.qi@linaro.org>
1911
1912 * configure.srv (case aarch64*-*-linux*): Don't set
1913 srv_linux_usrregs.
1914
5826e159
PA
19152015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1916
1917 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1918 sys/ptrace.h.
1919 * linux-arm-low.c: Likewise.
1920 * linux-cris-low.c: Likewise.
1921 * linux-crisv32-low.c: Likewise.
1922 * linux-low.c: Likewise.
1923 * linux-m68k-low.c: Likewise.
1924 * linux-mips-low.c: Likewise.
1925 * linux-nios2-low.c: Likewise.
1926 * linux-s390-low.c: Likewise.
1927 * linux-sparc-low.c: Likewise.
1928 * linux-tic6x-low.c: Likewise.
1929 * linux-tile-low.c: Likewise.
1930 * linux-x86-low.c: Likewise.
1931
54019719
PA
19322015-07-24 Pedro Alves <palves@redhat.com>
1933
1934 * config.in: Regenerate.
1935 * configure: Regenerate.
1936
eb7aa561
PA
19372015-07-24 Pedro Alves <palves@redhat.com>
1938
1939 * acinclude.m4: Include ../ptrace.m4.
1940 * configure.ac: Call GDB_AC_PTRACE.
1941 * config.in, configure: Regenerate.
1942
55d7b841
YQ
19432015-07-24 Yao Qi <yao.qi@linaro.org>
1944
1945 * linux-low.c (linux_create_inferior): Remove setting to
1946 proc->priv->new_inferior.
1947 (linux_attach): Likewise.
1948 (linux_low_filter_event): Likewise.
1949 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1950
c06cbd92
YQ
19512015-07-24 Yao Qi <yao.qi@linaro.org>
1952
1953 * linux-low.c (linux_arch_setup): New function.
1954 (linux_low_filter_event): If proc->tdesc is NULL and
1955 proc->attached is true, call the_low_target.arch_setup.
1956 Otherwise, keep status pending, and return.
1957 (linux_resume_one_lwp_throw): Don't call get_pc if
1958 thread->while_stepping isn't NULL. Don't call
1959 get_thread_regcache if proc->tdesc is NULL.
1960 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1961 (linux_target_ops): Install arch_setup.
1962 * server.c (start_inferior): Call the_target->arch_setup.
1963 * target.h (struct target_ops) <arch_setup>: New field.
1964 (target_arch_setup): New marco.
1965 * lynx-low.c (lynx_target_ops): Update.
1966 * nto-low.c (nto_target_ops): Update.
1967 * spu-low.c (spu_target_ops): Update.
1968 * win32-low.c (win32_target_ops): Update.
1969
5ae3ebba
YQ
19702015-07-24 Yao Qi <yao.qi@linaro.org>
1971
1972 * linux-low.c (linux_add_process): Don't set
1973 proc->priv->new_inferior.
1974 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1975 (linux_attach): Likewise.
1976
eb97750b
YQ
19772015-07-24 Yao Qi <yao.qi@linaro.org>
1978
1979 * server.c (start_inferior): Code refactor.
1980
51aee833
YQ
19812015-07-24 Yao Qi <yao.qi@linaro.org>
1982
1983 * server.c (process_serial_event): Set general_thread.
1984
af1b22f3
YQ
19852015-07-21 Yao Qi <yao.qi@linaro.org>
1986
1987 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1988 aarch64_linux_get_debug_reg_capacity.
1989
554717a3
YQ
19902015-07-17 Yao Qi <yao.qi@linaro.org>
1991
1992 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1993 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1994 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1995 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1996 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1997 (AARCH64_HWP_ALIGNMENT): Likewise.
1998 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1999 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2000 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2001 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2002 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2003 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2004 (struct aarch64_debug_reg_state): Likewise.
2005 (struct arch_lwp_info): Likewise.
2006 (aarch64_align_watchpoint): Likewise.
2007 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2008 (aarch64_watchpoint_length): Likewise.
2009 (aarch64_point_encode_ctrl_reg): Likewise
2010 (aarch64_point_is_aligned): Likewise.
2011 (aarch64_align_watchpoint): Likewise.
2012 (aarch64_linux_set_debug_regs):
2013 (aarch64_dr_state_insert_one_point): Likewise.
2014 (aarch64_dr_state_remove_one_point): Likewise.
2015 (aarch64_handle_breakpoint): Likewise.
2016 (aarch64_handle_aligned_watchpoint): Likewise.
2017 (aarch64_handle_unaligned_watchpoint): Likewise.
2018 (aarch64_handle_watchpoint): Likewise.
2019
c67ca4de
YQ
20202015-07-17 Yao Qi <yao.qi@linaro.org>
2021
2022 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2023 and don't aarch64_get_debug_reg_state. All callers update.
2024 (aarch64_handle_aligned_watchpoint): Likewise.
2025 (aarch64_handle_unaligned_watchpoint): Likewise.
2026 (aarch64_handle_watchpoint): Likewise.
2027 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2028 (aarch64_remove_point): Likewise.
2029
25abf979
YQ
20302015-07-17 Yao Qi <yao.qi@linaro.org>
2031
2032 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2033 debug_printf.
2034 (aarch64_handle_unaligned_watchpoint): Likewise.
2035
db1ff28b
JK
20362015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2037
2038 Revert the previous 3 commits:
2039 Move gdb_regex* to common/
2040 Move linux_find_memory_regions_full & co.
2041 gdbserver build-id attribute generator
2042
700ca40f
JK
20432015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2044 Jan Kratochvil <jan.kratochvil@redhat.com>
2045
2046 gdbserver build-id attribute generator.
2047 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2048 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2049 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2050 (find_phdr): New.
2051 (get_dynamic): Use find_pdhr to traverse program headers.
2052 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2053 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2054 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2055 (get_hex_build_id): New.
2056 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2057 to reply XML document.
2058
9904185c
JK
20592015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2060 Jan Kratochvil <jan.kratochvil@redhat.com>
2061
2062 * target.c: Include target/target-utils.h and fcntl.h.
2063 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2064 (target_fileio_read_stralloc): New functions.
2065
6e5b4429
JK
20662015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2067
2068 * Makefile.in (OBS): Add gdb_regex.o.
2069 (gdb_regex.o): New.
2070 * config.in: Rebuilt.
2071 * configure: Rebuilt.
2072
ddc98fbf
JK
20732015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2074 Jan Kratochvil <jan.kratochvil@redhat.com>
2075
2076 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2077 * Makefile.in (OBS): Add target-utils.o.
2078 (linux-maps.o, target-utils.o): New.
2079 * configure.srv (srv_linux_obj): Add linux-maps.o.
2080
e57bb7a0
PL
20812015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2082
2083 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2084 function, return 1.
2085 (the_low_target): Install it.
2086
586b02a9
PA
20872015-07-14 Pedro Alves <palves@redhat.com>
2088
2089 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2090 Instead, ignore ECHILD, and throw an error for other errnos.
2091
58c1b36c
PA
20922015-07-10 Pedro Alves <palves@redhat.com>
2093
2094 * event-loop.c (struct callback_event) <data>: Change type to
2095 gdb_client_data instance instead of gdb_client_data pointer.
2096 (append_callback_event): Adjust.
2097
421530db
PL
20982015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2099
2100 * linux-aarch64-low.c: Add comments for each linux_target_ops
2101 method. Remove comments already covered in target_ops and
2102 linux_target_ops definitions.
2103 (the_low_target): Add comments for each unimplemented method.
2104
c2d65f38
YQ
21052015-07-09 Yao Qi <yao.qi@linaro.org>
2106
2107 * linux-aarch64-low.c (aarch64_regmap): Remove.
2108 (aarch64_usrregs_info): Remove.
2109 (regs_info): Set field usrregs to NULL.
2110
b20a6524
MM
21112015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2112
2113 * linux-low.c: Include "rsp-low.h"
2114 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2115 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2116 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2117 (handle_btrace_enable_pt): New.
2118 (handle_btrace_general_set): Support "pt".
2119 (handle_btrace_conf_general_set): Support "pt:size".
2120
96c97461
PL
21212015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2122
2123 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2124 Z_PACKET_SW_BP.
2125
37d66942
PL
21262015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2127
2128 * linux-aarch64-low.c: Remove comment about endianness.
2129 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2130 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2131 memcmp.
2132
dc06243f
GB
21332015-06-24 Gary Benson <gbenson@redhat.com>
2134
2135 * linux-i386-ipa.c (stdint.h): Do not include.
2136 * lynx-i386-low.c (stdint.h): Likewise.
2137 * lynx-ppc-low.c (stdint.h): Likewise.
2138 * mem-break.c (stdint.h): Likewise.
2139 * thread-db.c (stdint.h): Likewise.
2140 * tracepoint.c (stdint.h): Likewise.
2141 * win32-low.c (stdint.h): Likewise.
2142
124e13d9
SM
21432015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2144
2145 * server.c (write_qxfer_response): Update call to
2146 remote_escape_output.
2147
909c2cda
JK
21482015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2149 Jan Kratochvil <jan.kratochvil@redhat.com>
2150
2151 Merge multiple hex conversions.
2152 * gdbreplay.c (tohex): Rename to 'fromhex'.
2153 (logchar): Use fromhex.
2154
24c05f46
JK
21552015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2156
2157 * server.c (handle_qxfer_libraries): Set `version' attribute for
2158 <library-list>.
2159
14d2069a
GB
21602015-06-10 Gary Benson <gbenson@redhat.com>
2161
2162 * target.h (struct target_ops) <multifs_open>: New field.
2163 <multifs_unlink>: Likewise.
2164 <multifs_readlink>: Likewise.
2165 * linux-low.c (nat/linux-namespaces.h): New include.
2166 (linux_target_ops): Initialize the_target->multifs_open,
2167 the_target->multifs_unlink and the_target->multifs_readlink.
2168 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2169 * hostio.c (hostio_fs_pid): New static variable.
2170 (hostio_handle_new_gdb_connection): New function.
2171 (handle_setfs): Likewise.
2172 (handle_open): Use the_target->multifs_open as appropriate.
2173 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2174 (handle_readlink): Use the_target->multifs_readlink as
2175 appropriate.
2176 (handle_vFile): Handle vFile:setfs packets.
2177 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2178 after target_handle_new_gdb_connection.
2179
4b8b5e72
GB
21802015-06-10 Gary Benson <gbenson@redhat.com>
2181
2182 * configure.ac (AC_CHECK_FUNCS): Add setns.
2183 * config.in: Regenerate.
2184 * configure: Likewise.
2185 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2186 (linux-namespaces.o): New rule.
2187 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2188
3ac2e371
GB
21892015-06-09 Gary Benson <gbenson@redhat.com>
2190
2191 * hostio.c (handle_open): Process mode argument with
2192 fileio_to_host_mode.
2193
ca9b78ce
YQ
21942015-06-01 Yao Qi <yao.qi@linaro.org>
2195
2196 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2197 * linux-x86-low.c: Likewise.
2198
bfacd19d
DB
21992015-05-28 Don Breazeal <donb@codesourcery.com>
2200
2201 * linux-low.c (handle_extended_wait): Initialize
2202 thread_info.last_resume_kind for new fork children.
2203
452003ef
PA
22042015-05-15 Pedro Alves <palves@redhat.com>
2205
2206 * target.h (target_handle_new_gdb_connection): Rewrite using if
2207 wrapped in do/while.
2208
1041a03c
JB
22092015-05-14 Joel Brobecker <brobecker@adacore.com>
2210
2211 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2212 * configure, config.in: Regenerate.
2213 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2214 Declare typedef.
2215
c269dbdb
DB
22162015-05-12 Don Breazeal <donb@codesourcery.com>
2217
2218 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2219 PTRACE_EVENT_VFORK_DONE.
2220 (linux_low_ptrace_options, extended_event_reported): Add vfork
2221 events.
2222 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2223 and "vforkdone" for RSP 'T' Stop Reply Packet.
2224 * server.h (report_vfork_events): Declare
2225 global variable.
2226
3a8a0396
DB
22272015-05-12 Don Breazeal <donb@codesourcery.com>
2228
2229 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2230 (the_low_target) <new_fork>: Initialize new member.
2231 * linux-arm-low.c (arm_new_fork): New function.
2232 (the_low_target) <new_fork>: Initialize new member.
2233 * linux-low.c (handle_extended_wait): Call new target function
2234 new_fork.
2235 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2236 * linux-mips-low.c (mips_add_watchpoint): New function
2237 extracted from mips_insert_point.
2238 (the_low_target) <new_fork>: Initialize new member.
2239 (mips_linux_new_fork): New function.
2240 (mips_insert_point): Call mips_add_watchpoint.
2241 * linux-x86-low.c (x86_linux_new_fork): New function.
2242 (the_low_target) <new_fork>: Initialize new member.
2243
de0d863e
DB
22442015-05-12 Don Breazeal <donb@codesourcery.com>
2245
2246 * linux-low.c (handle_extended_wait): Implement return value,
2247 rename argument 'event_child' to 'event_lwp', handle
2248 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2249 (linux_low_ptrace_options): New function.
2250 (linux_low_filter_event): Call linux_low_ptrace_options,
2251 use different argument fo linux_enable_event_reporting,
2252 use return value from handle_extended_wait.
2253 (extended_event_reported): New function.
2254 (linux_wait_1): Call extended_event_reported and set
2255 status to report fork events.
2256 (linux_write_memory): Add pid to debug message.
2257 (reset_lwp_ptrace_options_callback): New function.
2258 (linux_handle_new_gdb_connection): New function.
2259 (linux_target_ops): Initialize new structure member.
2260 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2261 * lynx-low.c: Initialize new structure member.
2262 * remote-utils.c (prepare_resume_reply): Implement stop reason
2263 "fork" for "T" stop message.
2264 * server.c (handle_query): Call handle_new_gdb_connection.
2265 * server.h (report_fork_events): Declare global flag.
2266 * target.h (struct target_ops) <handle_new_gdb_connection>:
2267 New member.
2268 (target_handle_new_gdb_connection): New macro.
2269 * win32-low.c: Initialize new structure member.
2270
ddcbc397
DB
22712015-05-12 Don Breazeal <donb@codesourcery.com>
2272
2273 * mem-break.c (APPEND_TO_LIST): Define macro.
2274 (clone_agent_expr): New function.
2275 (clone_one_breakpoint): New function.
2276 (clone_all_breakpoints): New function.
2277 * mem-break.h: Declare new functions.
2278
89245bc0
DB
22792015-05-12 Don Breazeal <donb@codesourcery.com>
2280
2281 * linux-low.c (linux_supports_fork_events): New function.
2282 (linux_supports_vfork_events): New function.
2283 (linux_target_ops): Initialize new structure members.
2284 (initialize_low): Call linux_check_ptrace_features.
2285 * lynx-low.c (lynx_target_ops): Initialize new structure
2286 members.
2287 * server.c (report_fork_events, report_vfork_events):
2288 New global flags.
2289 (handle_query): Add new features to qSupported packet and
2290 response.
2291 (captured_main): Initialize new global variables.
2292 * target.h (struct target_ops) <supports_fork_events>:
2293 New member.
2294 <supports_vfork_events>: New member.
2295 (target_supports_fork_events): New macro.
2296 (target_supports_vfork_events): New macro.
2297 * win32-low.c (win32_target_ops): Initialize new structure
2298 members.
2299
835205d0
GB
23002015-05-12 Gary Benson <gbenson@redhat.com>
2301
2302 * server.c (handle_qxfer_exec_file): Use current process
2303 if annex is empty.
2304
21e94bd9
SL
23052015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2306
2307 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2308 Remove HAVE_PTRACE_GETREGS conditionals.
2309 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2310 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2311
45614f15
YQ
23122015-05-08 Yao Qi <yao.qi@linaro.org>
2313
2314 * linux-low.c (linux_supports_conditional_breakpoints): New
2315 function.
2316 (linux_target_ops): Install new target method.
2317 * lynx-low.c (lynx_target_ops): Install NULL hook for
2318 supports_conditional_breakpoints.
2319 * nto-low.c (nto_target_ops): Likewise.
2320 * spu-low.c (spu_target_ops): Likewise.
2321 * win32-low.c (win32_target_ops): Likewise.
2322 * server.c (handle_query): Check
2323 target_supports_conditional_breakpoints.
2324 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2325 New field.
2326 (target_supports_conditional_breakpoints): New macro.
2327
80ad801e
PA
23282015-05-06 Pedro Alves <palves@redhat.com>
2329
2330 PR server/18081
2331 * server.c (start_inferior): If the process exits, mourn it.
2332
819843c7
GB
23332015-04-21 Gary Benson <gbenson@redhat.com>
2334
2335 * hostio.c (fileio_open_flags_to_host): Factored out to
2336 fileio_to_host_openflags in common/fileio.c. Single use
2337 updated.
2338
a2d5a9d7
MF
23392015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2340
2341 * linux-xtensa-low.c (xtensa_fill_gregset)
2342 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2343 XCHAL_HAVE_LOOP.
2344
deb44829
MF
23452015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2346
2347 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2348 (regs_info): Replace usrregs pointer with NULL.
2349
e57f1de3
GB
23502015-04-17 Gary Benson <gbenson@redhat.com>
2351
2352 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2353 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2354 * server.c (handle_qxfer_exec_file): New function.
2355 (qxfer_packets): Add exec-file entry.
2356 (handle_query): Report qXfer:exec-file:read as supported packet.
2357
62828379
RN
23582015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2359
2360 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2361
b88bb450
GB
23622015-04-09 Gary Benson <gbenson@redhat.com>
2363
2364 * hostio-errno.c (errno_to_fileio_error): Remove function.
2365 Update caller to use remote_fileio_to_fio_error.
2366
c8f4bfdd
YQ
23672015-04-09 Yao Qi <yao.qi@linaro.org>
2368
2369 * linux-low.c (linux_insert_point): Call
2370 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2371 (linux_remove_point): Call remove_memory_breakpoint if type is
2372 raw_bkpt_type_sw.
2373 * linux-x86-low.c (x86_insert_point): Don't call
2374 insert_memory_breakpoint.
2375 (x86_remove_point): Don't call remove_memory_breakpoint.
2376
41f98f02
PA
23772015-04-01 Pedro Alves <palves@redhat.com>
2378 Cleber Rosa <crosa@redhat.com>
2379
2380 * server.c (gdbserver_usage): Reorganize and extend the usage
2381 message.
2382
2bf6fb9d
PA
23832015-03-24 Pedro Alves <palves@redhat.com>
2384
2385 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2386 output. Also dump TRAP_TRACE.
2387 (linux_low_filter_event): In debug output, distinguish a
2388 resume_stop SIGSTOP from a delayed SIGSTOP.
2389
369f6daa
GB
23902015-03-24 Gary Benson <gbenson@redhat.com>
2391
2392 * linux-x86-low.c (x86_linux_new_thread): Moved to
2393 nat/x86-linux.c.
2394 (x86_linux_prepare_to_resume): Likewise.
2395
8e5d4070
GB
23962015-03-24 Gary Benson <gbenson@redhat.com>
2397
2398 * Makefile.in (x86-linux-dregs.o): New rule.
2399 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2400 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2401 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2402 (x86_linux_dr_get): Likewise.
2403 (x86_linux_dr_set): Likewise.
2404 (update_debug_registers_callback): Likewise.
2405 (x86_linux_dr_set_addr): Likewise.
2406 (x86_linux_dr_get_addr): Likewise.
2407 (x86_linux_dr_set_control): Likewise.
2408 (x86_linux_dr_get_control): Likewise.
2409 (x86_linux_dr_get_status): Likewise.
2410 (x86_linux_update_debug_registers): Likewise.
2411
2b95d440
GB
24122015-03-24 Gary Benson <gbenson@redhat.com>
2413
2414 * linux-x86-low.c (x86_linux_update_debug_registers):
2415 New function, factored out from...
2416 (x86_linux_prepare_to_resume): ...this.
2417
14b0bc68
GB
24182015-03-24 Gary Benson <gbenson@redhat.com>
2419
2420 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2421 (x86_linux_dr_set): Likewise.
2422 (update_debug_registers_callback): Likewise.
2423 (x86_linux_dr_set_addr): Likewise.
2424 (x86_linux_dr_get_addr): Likewise.
2425 (x86_linux_dr_set_control): Likewise.
2426 (x86_linux_dr_get_control): Likewise.
2427 (x86_linux_dr_get_status): Likewise.
2428 (x86_linux_prepare_to_resume): Likewise.
2429
5dfe6ca8
GB
24302015-03-24 Gary Benson <gbenson@redhat.com>
2431
2432 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2433 Use perror_with_name. Pass string through gettext.
2434 (x86_linux_dr_set): Likewise.
2435
d33472ad
GB
24362015-03-24 Gary Benson <gbenson@redhat.com>
2437
2438 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2439 (x86_linux_dr_set_addr): ...this.
2440 (x86_dr_low_get_addr): Rename to...
2441 (x86_linux_dr_get_addr): ...this.
2442 (x86_dr_low_set_control): Rename to...
2443 (x86_linux_dr_set_control): ...this.
2444 (x86_dr_low_get_control): Rename to...
2445 (x86_linux_dr_get_control): ...this.
2446 (x86_dr_low_get_status): Rename to...
2447 (x86_linux_dr_get_status): ...this.
2448 (x86_dr_low): Update with new function names.
2449
4b134ca1
GB
24502015-03-24 Gary Benson <gbenson@redhat.com>
2451
2452 * Makefile.in (x86-linux.o): New rule.
2453 * configure.srv: Add x86-linux.o to relevant targets.
2454 * linux-low.c (lwp_set_arch_private_info): New function.
2455 (lwp_arch_private_info): Likewise.
2456 * linux-x86-low.c: Include nat/x86-linux.h.
2457 (arch_lwp_info): Removed structure.
2458 (update_debug_registers_callback):
2459 Use lwp_set_debug_registers_changed.
2460 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2461 and lwp_set_debug_registers_changed.
2462 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2463
34c703da
GB
24642015-03-24 Gary Benson <gbenson@redhat.com>
2465
2466 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2467 * linux-arm-low.c (arm_new_thread): Likewise.
2468 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2469 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2470 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2471 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2472
cff068da
GB
24732015-03-24 Gary Benson <gbenson@redhat.com>
2474
2475 * linux-low.c (ptid_of_lwp): New function.
2476 (lwp_is_stopped): Likewise.
2477 (lwp_stop_reason): Likewise.
2478 * linux-x86-low.c (update_debug_registers_callback):
2479 Use lwp_is_stopped.
2480 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2481 lwp_stop_reason.
2482
b2f7c7e8
GB
24832015-03-24 Gary Benson <gbenson@redhat.com>
2484
2485 * linux-low.h (linux_stop_lwp): Remove declaration.
2486
6d4ee8c6
GB
24872015-03-24 Gary Benson <gbenson@redhat.com>
2488
2489 * linux-low.h: Include nat/linux-nat.h.
2490 * linux-low.c (iterate_over_lwps_args): New structure.
2491 (iterate_over_lwps_filter): New function.
2492 (iterate_over_lwps): Likewise.
2493 * linux-x86-low.c (update_debug_registers_callback):
2494 Update signature to what iterate_over_lwps expects.
2495 Remove PID check that iterate_over_lwps now performs.
2496 (x86_dr_low_set_addr): Use iterate_over_lwps.
2497 (x86_dr_low_set_control): Likewise.
2498
70a0bb6b
GB
24992015-03-24 Gary Benson <gbenson@redhat.com>
2500
2501 * linux-x86-low.c (x86_debug_reg_state): New function.
2502 (x86_linux_prepare_to_resume): Use the above.
2503
7b669087
GB
25042015-03-24 Gary Benson <gbenson@redhat.com>
2505
2506 * linux-low.c (current_lwp_ptid): New function.
2507 * linux-x86-low.c: Include nat/linux-nat.h.
2508 (x86_dr_low_get_addr): Use current_lwp_ptid.
2509 (x86_dr_low_get_control): Likewise.
2510 (x86_dr_low_get_status): Likewise.
2511
eef49a3d
PA
25122015-03-20 Pedro Alves <palves@redhat.com>
2513
2514 * tracepoint.c (cmd_qtstatus): Make "str" const.
2515
b2333d22
PA
25162015-03-20 Pedro Alves <palves@redhat.com>
2517
2518 * server.c (handle_general_set): Make "req_str" const.
2519
23f238d3
PA
25202015-03-19 Pedro Alves <palves@redhat.com>
2521
2522 * linux-low.c (linux_resume_one_lwp): Rename to ...
2523 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2524 instead call perror_with_name.
2525 (check_ptrace_stopped_lwp_gone): New function.
2526 (linux_resume_one_lwp): Reimplement as wrapper around
2527 linux_resume_one_lwp_throw that swallows errors if the LWP is
2528 gone.
2529
91baf43f
PA
25302015-03-19 Pedro Alves <palves@redhat.com>
2531
2532 * linux-low.c (count_events_callback, select_event_lwp_callback):
2533 No longer check whether the thread has resume_stop as last resume
2534 kind.
2535
8bf3b159
PA
25362015-03-19 Pedro Alves <palves@redhat.com>
2537
2538 * linux-low.c (count_events_callback, select_event_lwp_callback):
2539 Use the lwp's status_pending_p field, not the thread's.
2540
b90fc188
PA
25412015-03-19 Pedro Alves <palves@redhat.com>
2542
2543 * linux-low.c (select_event_lwp_callback): Update comments to
2544 no longer mention SIGTRAP.
2545
464b0089
GB
25462015-03-18 Gary Benson <gbenson@redhat.com>
2547
2548 * server.c (handle_query): Do not report vFile:fstat as supported.
2549
aa9e327f
GB
25502015-03-11 Gary Benson <gbenson@redhat.com>
2551
2552 * hostio.c (sys/types.h): New include.
2553 (sys/stat.h): Likewise.
2554 (common-remote-fileio.h): Likewise.
2555 (handle_fstat): New function.
2556 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2557
791c0056
GB
25582015-03-11 Gary Benson <gbenson@redhat.com>
2559
2560 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2561 struct stat.st_blocks and struct stat.st_blksize.
2562 * configure: Regenerate.
2563 * config.in: Likewise.
2564 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2565 (OBS): Add common-remote-fileio.o.
2566 (common-remote-fileio.o): New rule.
2567
9a9df970
PA
25682015-03-09 Pedro Alves <palves@redhat.com>
2569
2570 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2571 'struct sockaddr' pointer in 'accept' call.
2572
9eb1356e
PA
25732015-03-09 Pedro Alves <palves@redhat.com>
2574
2575 Revert:
2576 2015-03-07 Pedro Alves <palves@redhat.com>
2577 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2578 or <winsock2.h> here. Instead include "gdb_socket.h".
2579 (remote_open): Use union gdb_sockaddr_u.
2580 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2581 or <winsock2.h> here. Instead include "gdb_socket.h".
2582 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2583 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2584 or <sys/un.h>.
2585 (init_named_socket, gdb_agent_helper_thread): Use union
2586 gdb_sockaddr_u.
2587
aac331e4
PA
25882015-03-07 Pedro Alves <palves@redhat.com>
2589
2590 * configure.ac (build_warnings): Move
2591 -Wdeclaration-after-statement to the C-specific set.
2592 * configure: Regenerate.
2593
366c75fc
PA
25942015-03-07 Pedro Alves <palves@redhat.com>
2595
2596 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2597 or <winsock2.h> here. Instead include "gdb_socket.h".
2598 (remote_open): Use union gdb_sockaddr_u.
2599 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2600 or <winsock2.h> here. Instead include "gdb_socket.h".
2601 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2602 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2603 or <sys/un.h>.
2604 (init_named_socket, gdb_agent_helper_thread): Use union
2605 gdb_sockaddr_u.
2606
492d29ea
PA
26072015-03-07 Pedro Alves <palves@redhat.com>
2608
2609 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2610 instead.
2611
60a191ed
YQ
26122015-03-06 Yao Qi <yao.qi@linaro.org>
2613
2614 * linux-aarch64-low.c (aarch64_insert_point): Use
2615 show_debug_regs as a boolean.
2616 (aarch64_remove_point): Likewise.
2617
f5771b1d
PA
26182015-03-05 Pedro Alves <palves@redhat.com>
2619
2620 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2621 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2622 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2623 * nto-low.c (nto_target_ops): Likewise.
2624 * spu-low.c (spu_target_ops): Likewise.
2625 * win32-low.c (win32_target_ops): Likewise.
2626
3e572f71
PA
26272015-03-04 Pedro Alves <palves@redhat.com>
2628
72f4393d 2629 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2630 Decide whether a breakpoint triggered based on the SIGTRAP's
2631 siginfo.si_code.
72f4393d
L
2632 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2633 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2634 (linux_low_filter_event): Check for breakpoints before checking
2635 watchpoints.
2636 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2637 siginfo.si_code.
72f4393d
L
2638 (linux_stopped_by_sw_breakpoint)
2639 (linux_supports_stopped_by_sw_breakpoint)
2640 (linux_stopped_by_hw_breakpoint)
2641 (linux_supports_stopped_by_hw_breakpoint): New functions.
2642 (linux_target_ops): Install new target methods.
3e572f71 2643
1ec68e26
PA
26442015-03-04 Pedro Alves <palves@redhat.com>
2645
2646 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2647 * server.c (swbreak_feature, hwbreak_feature): New globals.
2648 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2649 (captured_main): Clear swbreak_feature and hwbreak_feature.
2650 * server.h (swbreak_feature, hwbreak_feature): Declare.
2651 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2652 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2653 supports_stopped_by_hw_breakpoint>: New fields.
2654 (target_supports_stopped_by_sw_breakpoint)
2655 (target_stopped_by_sw_breakpoint)
2656 (target_supports_stopped_by_hw_breakpoint)
2657 (target_stopped_by_hw_breakpoint): Declare.
2658
15c66dd6
PA
26592015-03-04 Pedro Alves <palves@redhat.com>
2660
2661 enum lwp_stop_reason -> enum target_stop_reason
2662 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2663 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2664 (linux_wait_1, stuck_in_jump_pad_callback)
2665 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2666 (linux_stopped_by_watchpoint):
2667 * linux-low.h (enum lwp_stop_reason): Delete.
2668 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2669 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2670
98fc70d6
YQ
26712015-03-04 Yao Qi <yao.qi@linaro.org>
2672
2673 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2674
dd2ac174
GB
26752015-03-03 Gary Benson <gbenson@redhat.com>
2676
2677 * hostio.c (handle_vFile): Fix prefix lengths.
2678
d68e53f4
MM
26792015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2680
2681 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2682 ptr_bits.
2683
bf2d68ab
AA
26842015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2685
2686 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2687 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2688 (clean): Add "rm -f" for above C files.
2689 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2690 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2691 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2692 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2693 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2694 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2695 (init_registers_s390x_vx_linux64)
2696 (init_registers_s390x_tevx_linux64)
2697 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2698 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2699 declarations.
2700 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2701 (s390_store_vxrs_high): New functions.
2702 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2703 NT_S390_VXRS_HIGH.
2704 (s390_arch_setup): Add logic for selecting one of the new target
2705 descriptions. Activate the new vector regsets if applicable.
2706 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2707 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2708 and init_registers_s390x_tevx_linux64.
2709
c966a859
PA
27102015-03-01 Pedro Alves <palves@redhat.com>
2711
2712 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2713 parameter.
2714
4180215b
PA
27152015-02-27 Pedro Alves <palves@redhat.com>
2716
2717 * linux-x86-low.c (u_debugreg_offset): New function.
2718 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2719
749bab01
PA
27202015-02-27 Pedro Alves <palves@redhat.com>
2721
2722 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2723 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2724 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2725 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2726 (ps_lsetfpregs, ps_getpid)
2727 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2728 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2729 (ps_lsetxregs, ps_plog): Declare.
2730
3c14e5a3
PA
27312015-02-27 Pedro Alves <palves@redhat.com>
2732
2733 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2734 IP_AGENT_EXPORT_FUNC.
2735 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2736 IP_AGENT_EXPORT_FUNC.
2737 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2738 (IP_AGENT_EXPORT): Delete.
2739 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2740 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2741 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2742 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2743 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2744 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2745 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2746 (traceframe_read_count, traceframe_write_count)
2747 (traceframes_created, trace_state_variables, get_raw_reg)
2748 (get_trace_state_variable_value, set_trace_state_variable_value)
2749 (ust_loaded, helper_thread_id, cmd_buf): Use
2750 IPA_SYM_EXPORTED_NAME.
2751 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2752 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2753 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2754 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2755 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2756 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2757 EXTERN_C_PUSH/EXTERN_C_POP.
2758 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2759 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2760 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2761 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2762 (traceframe_write_count, traceframe_read_count)
2763 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2764 (about_to_request_buffer_space, get_trace_state_variable_value)
2765 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2766 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2767 EXTERN_C_PUSH/EXTERN_C_POP.
2768 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2769 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2770 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2771 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2772 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2773 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2774 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2775 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2776 Define.
2777 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2778 (IP_AGENT_EXPORT_VAR_DECL): Define.
2779 (tracing): Declare.
2780 (gdb_agent_get_raw_reg): Declare.
2781
fe978cb0
PA
27822015-02-27 Tom Tromey <tromey@redhat.com>
2783 Pedro Alves <palves@redhat.com>
2784
2785 Rename symbols whose names are reserved C++ keywords throughout.
2786
3bc3d82a
PA
27872015-02-27 Pedro Alves <palves@redhat.com>
2788
2789 * Makefile.in (COMPILER): New, get it from autoconf.
2790 (CXX): Get from autoconf instead.
2791 (COMPILE.pre): Use COMPILER.
2792 (CC-LD): Rename to ...
2793 (CC_LD): ... this. Use COMPILER.
2794 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2795 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2796 * acinclude.m4: Include build-with-cxx.m4.
2797 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2798 Disable -Werror by default if building in C++ mode.
2799 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2800 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2801 the C++ compiler. Save/restore CXXFLAGS too.
2802 * configure: Regenerate.
2803
07697489
PA
28042015-02-27 Pedro Alves <palves@redhat.com>
2805
2806 * acinclude.m4: Include libiberty.m4.
2807 * configure.ac: Call libiberty_INIT.
2808 * config.in, configure: Regenerate.
2809
9beb7c4e
PA
28102015-02-26 Pedro Alves <palves@redhat.com>
2811
2812 * linux-low.c (linux_wait_1): When incrementing the PC past a
2813 program breakpoint always use the_low_target.breakpoint_len as
2814 increment, rather than the maximum between that and
2815 the_low_target.decr_pc_after_break.
2816
8090aef2
PA
28172015-02-23 Pedro Alves <palves@redhat.com>
2818
2819 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2820 thread was doing a step-over; always adjust the PC if
2821 we stepped over a permanent breakpoint.
2822 (linux_wait_1): If we stepped over breakpoint that was on top of a
2823 permanent breakpoint, manually advance the PC past it.
2824
bc9540e8
PA
28252015-02-23 Pedro Alves <palves@redhat.com>
2826
2827 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2828 modes.
2829 (x86_fill_gregset, x86_store_gregset): Use it when handling
2830 $orig_eax.
2831
2db9a427
PA
28322015-02-20 Pedro Alves <palves@redhat.com>
2833
2834 * thread-db.c: Include "nat/linux-procfs.h".
2835 (thread_db_init): Skip listing new threads if the kernel supports
2836 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2837
afa8d396
PA
28382015-02-20 Pedro Alves <palves@redhat.com>
2839
2840 * linux-low.c (status_pending_p_callback): Use ptid_match.
2841
c9587f88
AT
28422015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2843
2844 PR breakpoints/16812
2845 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2846 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2847 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2848
b05ec7a5
AT
28492015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2850
2851 PR breakpoints/15956
2852 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2853
d33501a5
MM
28542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2855
2856 * linux-low.c (linux_low_btrace_conf): Print size.
2857 * server.c (handle_btrace_conf_general_set): New.
2858 (hanle_general_set): Call handle_btrace_conf_general_set.
2859 (handle_query): Report Qbtrace-conf:bts:size as supported.
2860
f4abbc16
MM
28612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2862
2863 * linux-low.c (linux_low_enable_btrace): Update parameters.
2864 (linux_low_btrace_conf): New.
2865 (linux_target_ops)<to_btrace_conf>: Initialize.
2866 * server.c (current_btrace_conf): New.
2867 (handle_btrace_enable): Rename to ...
2868 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2869 to target_enable_btrace. Update comment. Update users.
2870 (handle_qxfer_btrace_conf): New.
2871 (qxfer_packets): Add btrace-conf entry.
2872 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2873 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2874 (target_ops)<read_btrace_conf>: New.
2875 (target_enable_btrace): Update parameters.
2876 (target_read_btrace_conf): New.
2877
043c3577
MM
28782015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2879
2880 * server.c (handle_btrace_general_set): Remove call to
2881 target_supports_btrace.
2882 (supported_btrace_packets): New.
2883 (handle_query): Call supported_btrace_packets.
2884 * target.h: include btrace-common.h.
2885 (btrace_target_info): Removed.
2886 (supports_btrace, target_supports_btrace): Update parameters.
2887
734b0e4b
MM
28882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2889
2890 * Makefile.in (SFILES): Add common/btrace-common.c.
2891 (OBS): Add common/btrace-common.o.
2892 (btrace-common.o): Add build rules.
2893 * linux-low: Include btrace-common.h.
2894 (linux_low_read_btrace): Use struct btrace_data. Call
2895 btrace_data_init and btrace_data_fini.
2896
d6c146e9
PA
28972015-02-06 Pedro Alves <palves@redhat.com>
2898
2899 * thread-db.c (find_new_threads_callback): Add debug output.
2900
20ba1ce6
PA
29012015-02-04 Pedro Alves <palves@redhat.com>
2902
2903 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2904 (resume_stopped_resumed_lwps): New function.
2905 (linux_wait_for_event_filtered): Use it.
2906
8cc73a39
SDJ
29072015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2908
2909 * Makefile.in (SFILES): Add linux-personality.c.
2910 (linux-personality.o): New rule.
2911 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2912 list of objects to be built.
2913 * linux-low.c: Include nat/linux-personality.h.
2914 (linux_create_inferior): Remove code to disable address space
2915 randomization (moved to ../nat/linux-personality.c). Create
2916 cleanup to disable address space randomization.
2917
fb23d554
SDJ
29182015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2919
2920 * Makefile.in (posix-strerror.o): New rule.
2921 (mingw-strerror.o): Likewise.
2922 * configure: Regenerated.
2923 * configure.ac: Source file ../common/common.host. Initialize new
2924 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2925
cdf43629
YQ
29262015-01-14 Yao Qi <yao@codesourcery.com>
2927
2928 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2929 (ppc-linux.o): New rule.
2930 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2931 * configure.ac: AC_CHECK_FUNCS(getauxval).
2932 * config.in: Re-generated.
2933 * configure: Re-generated.
2934 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2935 ppc64_64bit_inferior_p
2936
514c5338
YQ
29372015-01-14 Yao Qi <yao@codesourcery.com>
2938
2939 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2940 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2941 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2942 (PT_ORIG_R3, PT_TRAP): Likewise.
2943 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2944 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2945 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2946
3368c1e5
JB
29472015-01-10 Joel Brobecker <brobecker@adacore.com>
2948
2949 * i387-fp.c (i387_cache_to_xsave): In look over
2950 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2951 zmmh_low_space field by use of zmmh_high_space.
2952
582511be
PA
29532015-01-09 Pedro Alves <palves@redhat.com>
2954
2955 * linux-low.c (step_over_bkpt): Move higher up in the file.
2956 (handle_extended_wait): Don't store the stop_pc here.
2957 (get_stop_pc): Adjust comments and rename to ...
2958 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2959 stopped for a software breakpoint or hardware breakpoint.
2960 (thread_still_has_status_pending_p): New function.
2961 (status_pending_p_callback): Use
2962 thread_still_has_status_pending_p. If the event is no longer
2963 interesting, resume the LWP.
2964 (handle_tracepoints): Add assert.
2965 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2966 (wstatus_maybe_breakpoint): New function.
2967 (cancel_breakpoint): Delete function.
2968 (check_stopped_by_watchpoint): New function, factored out from
2969 linux_low_filter_event.
2970 (lp_status_maybe_breakpoint): Delete function.
2971 (linux_low_filter_event): Remove filter_ptid argument.
2972 Leave thread group exits pending here. Store the LWP's stop PC.
2973 Always leave events pending.
2974 (linux_wait_for_event_filtered): Pull all events out of the
2975 kernel, and leave them all pending.
2976 (count_events_callback, select_event_lwp_callback): Consider all
2977 events.
2978 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2979 (select_event_lwp): Only give preference to the stepping LWP in
2980 all-stop mode. Adjust comments.
2981 (ignore_event): New function.
2982 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2983 references to cancel_breakpoints. Adjust to renames. Also give
2984 equal priority to all LWPs that have had events in non-stop mode.
2985 If reporting a software breakpoint event, unadjust the LWP's PC.
2986 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2987 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2988 Adjust.
2989 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2990 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2991 (linux_stopped_by_watchpoint): Adjust.
2992 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2993 * linux-low.h (enum lwp_stop_reason): New.
2994 (struct lwp_info) <stop_pc>: Adjust comment.
2995 <stopped_by_watchpoint>: Delete field.
2996 <stop_reason>: New field.
2997 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2998 * mem-break.c (software_breakpoint_inserted_here)
2999 (hardware_breakpoint_inserted_here): New function.
3000 * mem-break.h (software_breakpoint_inserted_here)
3001 (hardware_breakpoint_inserted_here): Declare.
3002 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3003 (cancel_breakpoints): Delete.
3004 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3005 (upload_fast_traceframes): Remove references to
3006 cancel_breakpoints.
3007
a33e3959
PA
30082015-01-09 Pedro Alves <palves@redhat.com>
3009
3010 * thread-db.c (find_new_threads_callback): Ignore thread if the
3011 kernel thread ID is -1.
3012
8784d563
PA
30132015-01-09 Pedro Alves <palves@redhat.com>
3014
3015 * linux-low.c (linux_attach_fail_reason_string): Move to
3016 nat/linux-ptrace.c, and rename.
3017 (linux_attach_lwp): Update comment.
3018 (attach_proc_task_lwp_callback): New function.
3019 (linux_attach): Adjust to rename and use
3020 linux_proc_attach_tgid_threads.
3021 (linux_attach_fail_reason_string): Delete declaration.
3022
76f2b779
JB
30232015-01-01 Joel Brobecker <brobecker@adacore.com>
3024
3025 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3026 * server.c (gdbserver_version): Likewise.
3027
fafcc06a
SDJ
30282014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3029
3030 * remote-utils.c: Include ctype.h.
3031 (input_interrupt): Explicitly handle the case when the char
3032 received is the NUL byte. Improve the printing of non-ASCII
3033 characters.
3034
beed38b8
JB
30352014-12-16 Joel Brobecker <brobecker@adacore.com>
3036
3037 * linux-low.c (linux_low_filter_event): Update call to
3038 linux_enable_event_reporting following the addition of
3039 a new parameter to that function.
3040
bf330350
CU
30412014-12-16 Catalin Udma <catalin.udma@freescale.com>
3042
3043 PR server/17457
3044 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3045 (AARCH64_FPCR_REGNO): Likewise.
3046 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3047 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3048 (aarch64_store_fpregset): Likewise.
3049
5227d625
JB
30502014-12-15 Joel Brobecker <brobecker@adacore.com>
3051
3052 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3053 Remove FIXME comment about assumption about N.
3054
f93b65a0
JB
30552014-12-13 Joel Brobecker <brobecker@adacore.com>
3056
3057 * configure.ac: If large-file support is disabled in GDBserver,
3058 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3059 * configure: Regenerate.
3060
e5a9158d
AA
30612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3062
3063 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3064 warning upon ENODATA from ptrace.
3065 * linux-s390-low.c (s390_store_tdb): New.
3066 (s390_regsets): Add regset for NT_S390_TDB.
3067
feea5f36
AA
30682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3069
3070 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3071 without a fill_function.
3072 * linux-s390-low.c (s390_fill_last_break): Remove.
3073 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3074 (s390_arch_setup): Use regset's size instead of fill_function for
3075 loop end condition.
3076
098dbe61
AA
30772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3078
3079 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3080 the regset's store function when ptrace returned an error.
3081 * regcache.c (get_thread_regcache): Invalidate register cache
3082 before fetching inferior's registers.
3083
28eef672
AA
30842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3085
3086 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3087 while-loop as for-loop.
3088 (regsets_store_inferior_registers): Likewise.
3089
bdca27a2
YQ
30902014-11-28 Yao Qi <yao@codesourcery.com>
3091
3092 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3093 * config.in, configure: Re-generate.
3094 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3095 is defined.
3096
9c232dda
YQ
30972014-11-21 Yao Qi <yao@codesourcery.com>
3098
3099 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3100 (AC_CHECK_HEADERS): Remove malloc.h.
3101 * configure: Re-generated.
3102 * config.in: Re-generated.
3103 * server.h: Don't include alloca.h and malloc.h.
3104 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3105 Don't include malloc.h.
3106
43968415
JB
31072014-11-17 Joel Brobecker <brobecker@adacore.com>
3108
3109 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3110 corresponding ERRNO check in same block.
3111
40e91bc7
PA
31122014-11-12 Pedro Alves <palves@redhat.com>
3113
3114 * server.c (cont_thread): Update comment.
3115 (start_inferior, attach_inferior): No longer clear cont_thread.
3116 (handle_v_cont): No longer set cont_thread.
3117 (captured_main): Clear cont_thread each time a GDB connects.
3118
c2c118cf
PA
31192014-11-12 Pedro Alves <palves@redhat.com>
3120
3121 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3122 thread, and don't resume all threads if the Hc thread has exited.
3123
78708b7c
PA
31242014-11-12 Pedro Alves <palves@redhat.com>
3125
3126 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3127 the process group instead of to a specific LWP.
3128
a2abc7de
PA
31292014-10-15 Pedro Alves <palves@redhat.com>
3130
3131 PR server/17487
3132 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3133 parameter.
3134 (arm_set_thread_context): Delete.
3135 (the_low_target): Adjust.
3136 * win32-i386-low.c (debug_registers_changed)
3137 (debug_registers_used): Delete.
3138 (update_debug_registers_callback): New function.
3139 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3140 needing to update their debug registers.
3141 (win32_get_current_dr): New function.
3142 (x86_dr_low_get_addr, x86_dr_low_get_control)
3143 (x86_dr_low_get_status): Fetch the debug register from the thread
3144 record's context.
3145 (i386_initial_stuff): Adjust.
3146 (i386_get_thread_context): Remove current_event parameter. Don't
3147 clear debug_registers_changed nor copy DR values to
3148 debug_reg_state.
3149 (i386_set_thread_context): Delete.
3150 (i386_prepare_to_resume): New function.
3151 (i386_thread_added): Mark the thread as needing to update irs
3152 debug registers.
3153 (the_low_target): Remove i386_set_thread_context and install
3154 i386_prepare_to_resume.
3155 * win32-low.c (win32_get_thread_context): Adjust.
3156 (win32_set_thread_context): Use SetThreadContext
3157 directly.
3158 (win32_prepare_to_resume): New function.
3159 (win32_require_context): New function, factored out from ...
3160 (thread_rec): ... this.
3161 (continue_one_thread): Call win32_prepare_to_resume on each thread
3162 we're about to continue.
3163 (win32_resume): Call win32_prepare_to_resume on the event thread.
3164 * win32-low.h (struct win32_thread_info)
3165 <debug_registers_changed>: New field.
3166 (struct win32_target_ops): Change prototype of set_thread_context,
3167 delete set_thread_context and add prepare_to_resume.
3168 (win32_require_context): New declaration.
3169
a442d071
GB
31702014-10-08 Gary Benson <gbenson@redhat.com>
3171
3172 * server.h: Do not include common-exceptions.h.
3173
6f1947e8
GB
31742014-10-08 Gary Benson <gbenson@redhat.com>
3175
3176 * server.h: Do not include cleanups.h.
3177
63b434a4
JH
31782014-09-30 James Hogan <james.hogan@imgtec.com>
3179
3180 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3181 mips64-dsp-linux.c.
3182
c4d9ceb6
YQ
31832014-09-23 Yao Qi <yao@codesourcery.com>
3184
3185 * linux-low.c (lp_status_maybe_breakpoint): New function.
3186 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3187 (count_events_callback): Likewise.
3188 (select_event_lwp_callback): Likewise.
3189 (cancel_breakpoints_callback): Likewise.
3190
89a5711c
DB
31912014-09-19 Don Breazeal <donb@codesourcery.com>
3192
3193 * linux-low.c (handle_extended_wait): Call
3194 linux_ptrace_get_extended_event.
3195 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3196 linux_is_extended_waitstatus.
3197
bffc0964
JB
31982014-09-16 Joel Brobecker <brobecker@adacore.com>
3199
3200 * Makefile.in (CPPFLAGS): Define.
3201 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3202 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3203
0bfdf32f
GB
32042014-09-16 Gary Benson <gbenson@redhat.com>
3205
3206 * inferiors.h (current_inferior): Renamed as...
3207 (current_thread): New variable. All uses updated.
3208 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3209 (maybe_move_out_of_jump_pad): Likewise.
3210 (cancel_breakpoint): Likewise.
3211 (linux_low_filter_event): Likewise.
3212 (wait_for_sigstop): Likewise.
3213 (linux_resume_one_lwp): Likewise.
3214 (need_step_over_p): Likewise.
3215 (start_step_over): Likewise.
3216 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3217 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3218 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3219 and save_inferior as saved_thread.
3220 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3221 saved_thread.
3222 (regcache_invalidate_thread): Likewise.
3223 * remote-utils.c (prepare_resume_reply): Likewise.
3224 * thread-db.c (thread_db_get_tls_address): Likewise.
3225 (disable_thread_event_reporting): Likewise.
3226 (remove_thread_event_breakpoints): Likewise.
3227 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3228 as saved_thread.
3229 * target.h (set_desired_inferior): Renamed as...
3230 (set_desired_thread): New declaration. All uses updated.
3231 * server.c (myresume): Updated comment to reference thread instead
3232 of inferior.
3233 (handle_serial_event): Likewise.
3234 (handle_target_event): Likewise.
3235
361c8ade
GB
32362014-09-12 Tom Tromey <tromey@redhat.com>
3237 Gary Benson <gbenson@redhat.com>
3238
3239 * regcache.h: Include common-regcache.h.
3240 (regcache_read_pc): Don't declare.
3241 * regcache.c (get_thread_regcache_for_ptid): New function.
3242
bd9269f7
GB
32432014-09-11 Tom Tromey <tromey@redhat.com>
3244 Gary Benson <gbenson@redhat.com>
3245
3246 * symbol.c: New file.
3247 * Makefile.in (SFILES): Add symbol.c.
3248 (OBS): Add symbol.o.
3249
f8c1d06b
GB
32502014-09-11 Gary Benson <gbenson@redhat.com>
3251
3252 * target.c (target_stop_ptid, target_continue_ptid): New
3253 functions.
3254
721ec300
GB
32552014-09-11 Tom Tromey <tromey@redhat.com>
3256 Gary Benson <gbenson@redhat.com>
3257
3258 * target.h: Include target/target.h.
3259 * target.c (target_read_memory, target_read_uint32)
3260 (target_write_memory): New functions.
3261
c5e92cca
GB
32622014-09-11 Gary Benson <gbenson@redhat.com>
3263
3264 * server.h (debug_hw_points): Don't declare.
3265 * server.c (debug_hw_points): Don't define. Replace all uses
3266 with show_debug_regs.
3267 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3268 all uses with show_debug_regs.
3269
2e4bb98a
EBM
32702014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3271
3272 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3273 endianness into account.
3274 (ppc_supply_ptrace_register): Likewise.
3275
ac740bc7
JH
32762014-09-03 James Hogan <james.hogan@imgtec.com>
3277
3278 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3279 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3280
97ea6506
GB
32812014-09-03 Gary Benson <gbenson@redhat.com>
3282
3283 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3284 ALL_DEBUG_ADDRESS_REGISTERS.
3285
df7e5265
GB
32862014-09-02 Gary Benson <gbenson@redhat.com>
3287
3288 * i386-low.h: Renamed as...
3289 * x86-low.h: New file. All type, function and variable name
3290 prefixes changed from "i386_" to "x86_". All references updated.
3291 * i386-low.c: Renamed as...
3292 * x86-low.c: New file. All type, function and variable name
3293 prefixes changed from "i386_" to "x86_". All references updated.
3294
ed859da7
GB
32952014-09-02 Gary Benson <gbenson@redhat.com>
3296
3297 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3298 (x86_linux_new_thread): Likewise.
3299
860789c7
GB
33002014-08-29 Gary Benson <gbenson@redhat.com>
3301
3302 * server.h (setjmp.h): Do not include.
3303 (toplevel): Do not declare.
3304 (common-exceptions.h): Include.
3305 (cleanups.h): Likewise.
3306 * server.c (toplevel): Do not define.
3307 (exit_code): New static global.
3308 (detach_or_kill_for_exit_cleanup): New function.
3309 (main): New function. Original main renamed to...
3310 (captured_main): New function.
3311 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3312
ff55e1b5
GB
33132014-08-29 Gary Benson <gbenson@redhat.com>
3314
3315 * Makefile.in (SFILES): Add common/common-exceptions.c.
3316 (OBS): Add common-exceptions.o.
3317 (common-exceptions.o): New rule.
3318 * utils.c (prepare_to_throw_exception): New function.
3319
e9bcb658
GB
33202014-08-29 Gary Benson <gbenson@redhat.com>
3321
3322 * config.in: Regenerate.
3323 * configure: Likewise.
3324
e3180625
GB
33252014-08-29 Gary Benson <gbenson@redhat.com>
3326
3327 * Makefile.in (SFILES): Add common/cleanups.c.
3328 (OBS): cleanups.o.
3329 (cleanups.o): New rule.
3330
e3d6ba5d
GB
33312014-08-29 Gary Benson <gbenson@redhat.com>
3332
3333 * utils.c (internal_vwarning): New function.
3334
7096e886
GB
33352014-08-28 Gary Benson <gbenson@redhat.com>
3336
3337 * utils.h (fatal): Remove declaration.
3338 * utils.c (fatal): Remove function.
3339
14ce3192
GB
33402014-08-28 Gary Benson <gbenson@redhat.com>
3341
3342 * tracepoint.c (gdb_agent_init): Replace fatal with
3343 perror_with_name.
3344 (initialize_tracepoint): Likewise.
3345
50278d59
GB
33462014-08-28 Gary Benson <gbenson@redhat.com>
3347
3348 * remote-utils.c (remote_prepare): Replace fatal with error.
3349
aa96c426
GB
33502014-08-28 Gary Benson <gbenson@redhat.com>
3351
3352 * linux-low.c (linux_async): Replace fatal with warning.
3353 Tidy up and return.
3354 (linux_start_non_stop): Return -1 if linux_async failed.
3355
f7160e97
GB
33562014-08-28 Gary Benson <gbenson@redhat.com>
3357
3358 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3359 gdb_assert.
3360 (i386_dr_low_get_addr): Remove vague comment.
3361 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3362 gdb_assert.
3363
38e08fca
GB
33642014-08-28 Gary Benson <gbenson@redhat.com>
3365
3366 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3367 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3368 internal_error.
3369 (linux_resume_one_lwp): Likewise.
3370 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3371 gdb_assert.
3372 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3373 with internal_error.
3374 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3375 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3376 (find_register_by_name): Replace fatal with internal_error.
3377 (find_regno): Likewise.
3378 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3379 * thread-db.c (thread_db_create_event): Likewise.
3380 (thread_db_load_search): Likewise.
3381 (try_thread_db_load_1): Likewise.
3382 * tracepoint.c (get_jump_space_head): Replace fatal with
3383 internal_error.
3384 (claim_trampoline_space): Likewise.
3385 (have_fast_tracepoint_trampoline_buffer): Likewise.
3386 (cmd_qtstart): Likewise.
3387 (stop_tracing): Likewise.
3388 (fast_tracepoint_collecting): Likewise.
3389 (target_malloc): Likewise.
3390 (download_tracepoint): Likewise.
3391 (download_trace_state_variables): Replace check with gdb_assert.
3392 (upload_fast_traceframes): Replace fatal with internal_error.
3393
34abf635
GB
33942014-08-19 Tom Tromey <tromey@redhat.com>
3395 Gary Benson <gbenson@redhat.com>
3396
3397 * Makefile.in (SFILES): Add common/common-debug.c.
3398 (OBS): Add common-debug.o.
3399 (common-debug.o): New rule.
3400 * debug.h (debug_printf): Don't declare.
3401 * debug.c (debug_printf): Renamed and rewritten as...
3402 (debug_vprintf): New function.
3403
f6e94d78
GB
34042014-08-19 Gary Benson <gbenson@redhat.com>
3405
3406 * utils.h: Do not include print-utils.h.
3407
9239eeab
GB
34082014-08-19 Tom Tromey <tromey@redhat.com>
3409 Gary Benson <gbenson@redhat.com>
3410
3411 * server.h: Add static assertion.
3412 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3413
ef87c8bb
GB
34142014-08-19 Tom Tromey <tromey@redhat.com>
3415 Gary Benson <gbenson@redhat.com>
3416
3417 * Makefile.in (SFILES): Add common/errors.c.
3418 (OBS): Add errors.o.
3419 (IPA_OBS): Add errors-ipa.o.
3420 (errors.o): New rule.
3421 (errors-ipa.o): Likewise.
3422 * utils.h (perror_with_name, error, warning): Don't declare.
3423 * utils.c (warning): Renamed and rewritten as...
3424 (vwarning): New function.
3425 (error): Renamed and rewritten as...
3426 (verror): New function.
3427 (internal_error): Renamed and rewritten as...
3428 (internal_verror): New function.
3429
bb974a24
GB
34302014-08-07 Gary Benson <gbenson@redhat.com>
3431
3432 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3433 * configure: Regenerate.
3434 * config.in: Likewise.
3435 * server.h: Do not include errno.h.
3436 * event-loop.c: Likewise.
3437 * hostio-errno.c: Likewise.
3438 * linux-low.c: Likewise.
3439 * remote-utils.c: Likewise.
3440 * spu-low.c: Likewise.
3441 * utils.c: Likewise.
3442 * gdbreplay.c: Unconditionally include errno.h.
3443
6d3d12eb
GB
34442014-08-07 Gary Benson <gbenson@redhat.com>
3445
3446 * server.h: Do not include string.h.
3447 * event-loop.c: Likewise.
3448 * linux-low.c: Likewise.
3449 * regcache.c: Likewise.
3450 * remote-utils.c: Likewise.
3451 * spu-low.c: Likewise.
3452 * utils.c: Likewise.
3453
dccbb609
GB
34542014-08-07 Gary Benson <gbenson@redhat.com>
3455
3456 * server.h: Do not include gdb_assert.h.
3457
e76df0d0
GB
34582014-08-07 Gary Benson <gbenson@redhat.com>
3459
3460 * server.h: Do not include common-utils.h.
3461
4cb9c816
GB
34622014-08-07 Gary Benson <gbenson@redhat.com>
3463
3464 * server.h: Do not include ptid.h.
3465 * notif.h: Likewise.
3466
3995eeee
GB
34672014-08-07 Gary Benson <gbenson@redhat.com>
3468
3469 * server.h: Do not include gdb_locale.h.
3470
cb9f1a9b
GB
34712014-08-07 Gary Benson <gbenson@redhat.com>
3472
3473 * server.h: Do not include gdb/signals.h.
3474 * win32-low.c: Likewise.
3475
a5fceff8
GB
34762014-08-07 Gary Benson <gbenson@redhat.com>
3477
3478 * server.h: Do not include pathmax.h.
3479
b9391142
GB
34802014-08-07 Gary Benson <gbenson@redhat.com>
3481
3482 * server.h: Do not include libiberty.h.
3483 * linux-bfin-low.c: Likewise.
3484
0e443c87
GB
34852014-08-07 Gary Benson <gbenson@redhat.com>
3486
3487 * server.h: Do not include ansidecl.h.
3488
8ebb3f56
GB
34892014-08-07 Gary Benson <gbenson@redhat.com>
3490
3491 * linux-x86-low.c: Do not include stddef.h.
3492 * lynx-ppc-low.c: Likewise.
3493 * tracepoint.c: Likewise.
3494
8980bdf6
GB
34952014-08-07 Gary Benson <gbenson@redhat.com>
3496
3497 * server.h: Do not include stdarg.h.
3498 * nto-low.c: Likewise.
3499
d7096f71
GB
35002014-08-07 Gary Benson <gbenson@redhat.com>
3501
3502 * server.h: Do not include stdlib.h.
3503 * inferiors.c: Likewise.
3504 * linux-low.c: Likewise.
3505 * regcache.c: Likewise.
3506 * spu-low.c: Likewise.
3507 * tracepoint.c: Likewise.
3508 * utils.c: Likewise.
3509
d02f550d
GB
35102014-08-07 Gary Benson <gbenson@redhat.com>
3511
3512 * server.h: Do not include stdio.h.
3513 * linux-low.c: Likewise.
3514 * remote-utils.c: Likewise.
3515 * spu-low.c: Likewise.
3516 * utils.c: Likewise.
3517 * wincecompat.c: Likewise.
3518
87f6c4e3
GB
35192014-08-06 Gary Benson <gbenson@redhat.com>
3520
3521 * regcache.c (init_register_cache): Move conditionals inside if.
3522
7089dca4
GB
35232014-08-06 Gary Benson <gbenson@redhat.com>
3524
3525 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3526
462f517e
GB
35272014-07-31 Gary Benson <gbenson@redhat.com>
3528
3529 * ax.h: Do not include server.h.
3530 * gdbthread.h: Likewise.
3531 * lynx-low.h: Likewise.
3532 * notif.h: Likewise.
3533
976411d6
GB
35342014-07-30 Gary Benson <gbenson@redhat.com>
3535
3536 * server.h: Include common-defs.h.
3537 Do not include config.h or build-gnulib-gdbserver/config.h.
3538
d41f6d8e
GB
35392014-07-30 Gary Benson <gbenson@redhat.com>
3540
3541 * hostio-errno.c: Move server.h to top of includes list.
3542 * inferiors.c: Likewise.
3543 * linux-x86-low.c: Likewise.
3544 * notif.c: Include server.h.
3545
314c6a35
TT
35462014-07-24 Tom Tromey <tromey@redhat.com>
3547 Gary Benson <gbenson@redhat.com>
3548
3549 * server.h (CORE_ADDR): Now unsigned.
3550
69ff6be5
PA
35512014-07-16 Pedro Alves <palves@redhat.com>
3552
3553 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3554
ce9e3fe7
PA
35552014-07-15 Pedro Alves <palves@redhat.com>
3556
3557 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3558 copy.
3559
e76126e8
PA
35602014-07-11 Pedro Alves <palves@redhat.com>
3561
3562 * linux-low.c (kill_wait_lwp): New function, based on
3563 kill_one_lwp_callback, but use my_waitpid directly.
3564 (kill_one_lwp_callback, linux_kill): Use it.
3565
8e9db26e
PA
35662014-06-23 Pedro Alves <palves@redhat.com>
3567
3568 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3569 before setting DR0..DR3.
3570
698b3e08
GB
35712014-06-20 Gary Benson <gbenson@redhat.com>
3572
3573 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3574 * configure: Regenerated.
3575 * config.in: Likewise.
3576
125f8a3d
GB
35772014-06-20 Gary Benson <gbenson@redhat.com>
3578
3579 * Makefile.in (SFILES): Update locations for files moved
3580 from common to nat.
3581 (object file files): Reordered.
3582
42995dbd
GB
35832014-06-20 Gary Benson <gbenson@redhat.com>
3584
3585 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3586 (i386_dr_low_set_addr): Likewise.
3587 (i386_dr_low_get_addr): Likewise.
3588 (i386_dr_low_can_set_control): Likewise.
3589 (i386_dr_low_set_control): Likewise.
3590 (i386_dr_low_get_control): Likewise.
3591 (i386_dr_low_get_status): Likewise.
3592 (i386_get_debug_register_length): Likewise.
3593 * linux-x86-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 * win32-i386-low.c (i386_dr_low_set_addr):
3601 Changed signature. Made static.
3602 (i386_dr_low_get_addr): Likewise.
3603 (i386_dr_low_set_control): Likewise.
3604 (i386_dr_low_get_control): Likewise.
3605 (i386_dr_low_get_status): Likewise.
3606 (i386_dr_low): New global variable.
3607
e1d2394b
MS
36082014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3609
3610 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3611 * Makefile.in (AR, AR_FLAGS): Define.
3612 * configure: Regenerate.
3613
3a8ee006
GB
36142014-06-19 Gary Benson <gbenson@redhat.com>
3615
3616 * Makefile.in (i386-dregs.o): New rule.
3617 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3618 * i386-low.c (target.h): Remove include.
3619 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3620 (DR_CONTROL_SHIFT): Likewise.
3621 (DR_CONTROL_SIZE): Likewise.
3622 (DR_RW_EXECUTE): Likewise.
3623 (DR_RW_WRITE): Likewise.
3624 (DR_RW_READ): Likewise.
3625 (DR_RW_IORW): Likewise.
3626 (DR_LEN_1): Likewise.
3627 (DR_LEN_2): Likewise.
3628 (DR_LEN_4): Likewise.
3629 (DR_LEN_8): Likewise.
3630 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3631 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3632 (DR_ENABLE_SIZE): Likewise.
3633 (DR_LOCAL_SLOWDOWN): Likewise.
3634 (DR_GLOBAL_SLOWDOWN): Likewise.
3635 (DR_CONTROL_RESERVED): Likewise.
3636 (I386_DR_CONTROL_MASK): Likewise.
3637 (I386_DR_VACANT): Likewise.
3638 (I386_DR_LOCAL_ENABLE): Likewise.
3639 (I386_DR_GLOBAL_ENABLE): Likewise.
3640 (I386_DR_DISABLE): Likewise.
3641 (I386_DR_SET_RW_LEN): Likewise.
3642 (I386_DR_GET_RW_LEN): Likewise.
3643 (I386_DR_WATCH_HIT): Likewise.
3644 (i386_wp_op_t): Likewise.
3645 (i386_show_dr): Likewise.
3646 (i386_length_and_rw_bits): Likewise.
3647 (i386_insert_aligned_watchpoint): Likewise.
3648 (i386_remove_aligned_watchpoint): Likewise.
3649 (i386_handle_nonaligned_watchpoint): Likewise.
3650 i386_update_inferior_debug_regs(): Likewise.
3651 (i386_dr_insert_watchpoint): Likewise.
3652 (i386_dr_remove_watchpoint): Likewise.
3653 (i386_dr_region_ok_for_watchpoint): Likewise.
3654 (i386_dr_stopped_data_address): Likewise.
3655 (i386_dr_stopped_by_watchpoint): Likewise.
3656
8f26655c
GB
36572014-06-19 Gary Benson <gbenson@redhat.com>
3658
3659 * i386-low.c (i386_dr_show): Renamed to
3660 i386_show_dr and made static. All uses updated.
3661 (i386_dr_length_and_rw_bits): Renamed to
3662 i386_length_and_rw_bits and made static.
3663 All uses updated.
3664 (i386_dr_insert_aligned_watchpoint): Renamed to
3665 i386_insert_aligned_watchpoint and made static.
3666 All uses updated.
3667 (i386_dr_remove_aligned_watchpoint): Renamed to
3668 i386_remove_aligned_watchpoint and made static.
3669 All uses updated.
3670 (i386_dr_update_inferior_debug_regs): Renamed to
3671 i386_update_inferior_debug_regs and made static.
3672 All uses updated.
3673
b9228891
GB
36742014-06-18 Gary Benson <gbenson@redhat.com>
3675
5171def3
GB
3676 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3677 (i386_dr_low_can_set_control): Likewise.
3678 (i386_get_debug_register_length): Likewise.
3679 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3680 (i386_dr_low_can_set_control): Likewise.
3681 (i386_get_debug_register_length): Likewise.
3682
36832014-06-17 Gary Benson <gbenson@redhat.com>
3684
b9228891
GB
3685 * i386-low.h (i386-dregs.h): New include.
3686 (DR_FIRSTADDR): Now in i386-dregs.h.
3687 (DR_LASTADDR): Likewise.
3688 (DR_NADDR): Likewise.
3689 (DR_STATUS): Likewise.
3690 (DR_CONTROL): Likewise.
3691 (i386_debug_reg_state): Likewise.
3692 (i386_dr_insert_watchpoint): Likewise.
3693 (i386_dr_remove_watchpoint): Likewise.
3694 (i386_dr_region_ok_for_watchpoint): Likewise.
3695 (i386_dr_stopped_data_address): Likewise.
3696 (i386_dr_stopped_by_watchpoint): Likewise.
3697 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3698
4be83cc2
GB
36992014-06-18 Gary Benson <gbenson@redhat.com>
3700
3701 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3702 i386_dr_insert_watchpoint.
3703 (i386_low_remove_watchpoint): Renamed to
3704 i386_dr_remove_watchpoint.
3705 (i386_low_region_ok_for_watchpoint): Renamed to
3706 i386_dr_region_ok_for_watchpoint.
3707 (i386_low_stopped_data_address): Renamed to
3708 i386_dr_stopped_data_address.
3709 (i386_low_stopped_by_watchpoint): Renamed to
3710 i386_dr_stopped_by_watchpoint.
3711 * i386-low.c (i386_show_dr): Renamed to
3712 i386_dr_show and made nonstatic. All uses updated.
3713 (i386_length_and_rw_bits): Renamed to
3714 i386_dr_length_and_rw_bits and made nonstatic.
3715 All uses updated.
3716 (i386_insert_aligned_watchpoint): Renamed to
3717 i386_dr_insert_aligned_watchpoint and made nonstatic.
3718 All uses updated.
3719 (i386_remove_aligned_watchpoint): Renamed to
3720 i386_dr_remove_aligned_watchpoint and made nonstatic.
3721 All uses updated.
3722 (i386_update_inferior_debug_regs): Renamed to
3723 i386_dr_update_inferior_debug_regs and made nonstatic.
3724 All uses updated.
3725 (i386_low_insert_watchpoint): Renamed to
3726 i386_dr_insert_watchpoint. All uses updated.
3727 (i386_low_remove_watchpoint): Renamed to
3728 i386_dr_remove_watchpoint. All uses updated.
3729 (i386_low_region_ok_for_watchpoint): Renamed to
3730 i386_dr_region_ok_for_watchpoint. All uses updated.
3731 (i386_low_stopped_data_address): Renamed to
3732 i386_dr_stopped_data_address. All uses updated.
3733 (i386_low_stopped_by_watchpoint): Renamed to
3734 i386_dr_stopped_by_watchpoint. All uses updated.
3735
131aa0d4
GB
37362014-06-18 Gary Benson <gbenson@redhat.com>
3737
3738 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3739 (i386_dr_low_can_set_control): Likewise.
3740 (i386_insert_aligned_watchpoint): New check.
3741
d9305f7f
GB
37422014-06-18 Gary Benson <gbenson@redhat.com>
3743
3744 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3745 Renamed to state.
3746
e927c9fc
GB
37472014-06-18 Gary Benson <gbenson@redhat.com>
3748
3749 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3750 instead of fatal and error.
3751 (i386_handle_nonaligned_watchpoint): Likewise.
3752
1b6d4134
GB
37532014-06-18 Gary Benson <gbenson@redhat.com>
3754
3755 * i386-low.c (i386_get_debug_register_length): New macro.
3756 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3757 (i386_show_dr): Use debug_printf instead of fprintf. Use
3758 phex to format values.
3759
6e62758f
GB
37602014-06-18 Gary Benson <gbenson@redhat.com>
3761
3762 * i386-low.h: Comment changes.
3763 * i386-low.c: Likewise.
3764
fc6e2f03
GB
37652014-06-18 Gary Benson <gbenson@redhat.com>
3766
3767 * i386-low.c: Whitespace changes.
3768
f9d1eeed
TT
37692014-06-12 Tom Tromey <tromey@redhat.com>
3770
3771 * utils.c (freeargv): Remove.
3772
0b04e523
TT
37732014-06-12 Tom Tromey <tromey@redhat.com>
3774
3775 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3776 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3777 (parse_debug_format_options): Likewise.
3778 (gdbserver_usage): Likewise.
3779 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3780 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3781 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3782 against libiberty.
3783 ($(LIBGNU)): Depend on libiberty.
3784 (all-lib): Recurse into all subdirs.
3785 (install-only): Invoke "install" target in subdirs.
3786 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3787 targets.
3788 * configure: Rebuild.
3789 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3790 for vasprintf, vsnprintf, or gettimeofday.
3791 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3792 srv_tgtobj.
3793
270c9937
JB
37942014-06-05 Joel Brobecker <brobecker@adacore.com>
3795
3796 * development.sh: Delete.
3797 * Makefile.in (config.status): Adjust dependency on development.sh.
3798 * configure.ac: Adjust development.sh source call.
3799 * configure: Regenerate.
3800
0a261ed8
PA
38012014-06-02 Pedro Alves <palves@redhat.com>
3802
3803 * ax.c (gdb_free_agent_expr): New function.
3804 * ax.h (gdb_free_agent_expr): New declaration.
3805 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3806 list.
3807 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3808 static.
3809 (clear_breakpoint_conditions_and_commands): New function.
3810 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3811 (clear_breakpoint_conditions_and_commands): New declaration.
3812
e9dae05e
RR
38132014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3814
3815 * linux-aarch64-low.c (asm/ptrace.h): Include.
3816
5876f503
JK
38172014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3818
3819 Fix TLS access for -static -pthread.
3820 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3821 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3822 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3823
802e8e6d
PA
38242014-05-20 Pedro Alves <palves@redhat.com>
3825
3826 * linux-aarch64-low.c (aarch64_insert_point)
3827 (aarch64_remove_point): No longer check whether the type is
3828 supported here. Adjust to new interface.
3829 (the_low_target): Install aarch64_supports_z_point_type as
3830 supports_z_point_type method.
3831 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3832 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3833 instead of a Z packet char. Adjust.
3834 (arm_supports_z_point_type): New function.
3835 (arm_insert_point, arm_remove_point): Adjust to new interface.
3836 (the_low_target): Install arm_supports_z_point_type.
3837 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3838 (cris_insert_point, cris_remove_point): Adjust to new interface.
3839 Don't check whether the type is supported here.
3840 (the_low_target): Install cris_supports_z_point_type.
3841 * linux-low.c (linux_supports_z_point_type): New function.
3842 (linux_insert_point, linux_remove_point): Adjust to new interface.
3843 * linux-low.h (struct linux_target_ops) <insert_point,
3844 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3845 raw_breakpoint pointer parameter.
3846 <supports_z_point_type>: New method.
3847 * linux-mips-low.c (mips_supports_z_point_type): New function.
3848 (mips_insert_point, mips_remove_point): Adjust to new interface.
3849 Use mips_supports_z_point_type.
3850 (the_low_target): Install mips_supports_z_point_type.
3851 * linux-ppc-low.c (the_low_target): Install NULL as
3852 supports_z_point_type method.
3853 * linux-s390-low.c (the_low_target): Install NULL as
3854 supports_z_point_type method.
3855 * linux-sparc-low.c (the_low_target): Install NULL as
3856 supports_z_point_type method.
3857 * linux-x86-low.c (x86_supports_z_point_type): New function.
3858 (x86_insert_point): Adjust to new insert_point interface. Use
3859 insert_memory_breakpoint. Adjust to new
3860 i386_low_insert_watchpoint interface.
3861 (x86_remove_point): Adjust to remove_point interface. Use
3862 remove_memory_breakpoint. Adjust to new
3863 i386_low_remove_watchpoint interface.
3864 (the_low_target): Install x86_supports_z_point_type.
3865 * lynx-low.c (lynx_target_ops): Install NULL as
3866 supports_z_point_type callback.
3867 * nto-low.c (nto_supports_z_point_type): New.
3868 (nto_insert_point, nto_remove_point): Adjust to new interface.
3869 (nto_target_ops): Install nto_supports_z_point_type.
3870 * mem-break.c: Adjust intro comment.
3871 (struct raw_breakpoint) <raw_type, size>: New fields.
3872 <inserted>: Update comment.
3873 <shlib_disabled>: Delete field.
3874 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3875 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3876 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3877 (raw_bkpt_type_to_target_hw_bp_type): New function.
3878 (find_enabled_raw_code_breakpoint_at): New function.
3879 (find_raw_breakpoint_at): New type and size parameters. Use them.
3880 (insert_memory_breakpoint): New function, based off
3881 set_raw_breakpoint_at.
3882 (remove_memory_breakpoint): New function.
3883 (set_raw_breakpoint_at): Reimplement.
3884 (set_breakpoint): New, based on set_breakpoint_at.
3885 (set_breakpoint_at): Reimplement.
3886 (delete_raw_breakpoint): Go through the_target->remove_point
3887 instead of assuming memory breakpoints.
3888 (find_gdb_breakpoint_at): Delete.
3889 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3890 (find_gdb_breakpoint): New function.
3891 (set_gdb_breakpoint_at): Delete.
3892 (z_type_supported): New function.
3893 (set_gdb_breakpoint_1): New function, loosely based off
3894 set_gdb_breakpoint_at.
3895 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3896 (delete_gdb_breakpoint_at): Delete.
3897 (delete_gdb_breakpoint_1): New function, loosely based off
3898 delete_gdb_breakpoint_at.
3899 (delete_gdb_breakpoint): New function.
3900 (clear_gdb_breakpoint_conditions): Rename to ...
3901 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3902 breakpoint.
3903 (add_condition_to_breakpoint): Make static.
3904 (add_breakpoint_condition): Take a struct breakpoint pointer
3905 instead of an address. Adjust.
3906 (gdb_condition_true_at_breakpoint): Rename to ...
3907 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3908 z_type parameter.
3909 (gdb_condition_true_at_breakpoint): Reimplement.
3910 (add_breakpoint_commands): Take a struct breakpoint pointer
3911 instead of an address. Adjust.
3912 (gdb_no_commands_at_breakpoint): Rename to ...
3913 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3914 parameter. Return true if no breakpoint was found. Change debug
3915 output.
3916 (gdb_no_commands_at_breakpoint): Reimplement.
3917 (run_breakpoint_commands): Rename to ...
3918 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3919 and change return type to boolean.
3920 (run_breakpoint_commands): New function.
3921 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3922 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3923 breakpoint. Go through the_target->remove_point instead of
3924 assuming memory breakpoint.
3925 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3926 software and hardware breakpoints.
3927 (reinsert_raw_breakpoint): Go through the_target->insert_point
3928 instead of assuming memory breakpoint.
3929 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3930 software and hardware breakpoints.
3931 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3932 Check both software and hardware breakpoints.
3933 (validate_inserted_breakpoint): Assert the breakpoint is a
3934 software breakpoint. Set the inserted flag to -1 instead of
3935 setting shlib_disabled.
3936 (delete_disabled_breakpoints): Adjust.
3937 (validate_breakpoints): Only validate software breakpoints.
3938 Adjust to inserted flag change.
3939 (check_mem_read, check_mem_write): Skip breakpoint types other
3940 than software breakpoints. Adjust to inserted flag change.
3941 * mem-break.h (enum raw_bkpt_type): New enum.
3942 (raw_breakpoint, struct process_info): Forward declare.
3943 (Z_packet_to_target_hw_bp_type): Delete declaration.
3944 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3945 (set_gdb_breakpoint, delete_gdb_breakpoint)
3946 (clear_breakpoint_conditions): New declarations.
3947 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3948 (breakpoint_inserted_here): Update comment.
3949 (add_breakpoint_condition, add_breakpoint_commands): Replace
3950 address parameter with a breakpoint pointer parameter.
3951 (gdb_breakpoint_here): Update comment.
3952 (delete_gdb_breakpoint_at): Delete.
3953 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3954 * server.c (process_point_options): Take a struct breakpoint
3955 pointer instead of an address. Adjust.
3956 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3957 delete_gdb_breakpoint.
3958 * spu-low.c (spu_target_ops): Install NULL as
3959 supports_z_point_type method.
3960 * target.h: Include mem-break.h.
3961 (struct target_ops) <prepare_to_access_memory>: Update comment.
3962 <supports_z_point_type>: New field.
3963 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3964 instead of a char. Also take a raw breakpoint pointer.
3965 * win32-arm-low.c (the_low_target): Install NULL as
3966 supports_z_point_type.
3967 * win32-i386-low.c (i386_supports_z_point_type): New function.
3968 (i386_insert_point, i386_remove_point): Adjust to new interface.
3969 (the_low_target): Install i386_supports_z_point_type.
3970 * win32-low.c (win32_supports_z_point_type): New function.
3971 (win32_insert_point, win32_remove_point): Adjust to new interface.
3972 (win32_target_ops): Install win32_supports_z_point_type.
3973 * win32-low.h (struct win32_target_ops):
3974 <supports_z_point_type>: New method.
3975 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3976 instead of a char. Also take a raw breakpoint pointer.
3977
932539e3
PA
39782014-05-20 Pedro Alves <palves@redhat.com>
3979
3980 * mem-break.h: Include break-common.h.
3981 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3982 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3983 (Z_packet_to_target_hw_bp_type): New declaration.
3984 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3985 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3986 (Z_PACKET_ACCESS_WP): Delete macros.
3987 (Z_packet_to_hw_type): Delete function.
3988 * i386-low.h: Don't include break-common.h here.
3989 (Z_packet_to_hw_type): Delete declaration.
3990 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3991 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3992 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3993 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3994 * linux-aarch64-low.c: Don't include break-common.h here.
3995 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3996 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3997 (Z_packet_to_target_hw_bp_type): Delete function.
3998 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3999 function.
4000 (mips_insert_point, mips_remove_point): Use
4001 Z_packet_to_target_hw_bp_type.
4002
4ff0d3d8
PA
40032014-05-20 Pedro Alves <palves@redhat.com>
4004
4005 * linux-aarch64-low.c: Include break-common.h.
4006 (enum target_point_type): Delete.
4007 (Z_packet_to_point_type): Rename to ...
4008 (Z_packet_to_target_hw_bp_type): ... this, and return a
4009 target_hw_bp_type instead.
4010 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4011 instead of an enum target_point_type.
4012 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4013 breakpoint type.
4014 (aarch64_dr_state_insert_one_point)
4015 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4016 (aarch64_handle_aligned_watchpoint)
4017 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4018 Take an enum target_hw_bp_type instead of an enum
4019 target_point_type.
4020 (aarch64_supports_z_point_type): New function.
4021 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4022 use Z_packet_to_target_hw_bp_type.
4023
786dc519
JB
40242014-05-20 Joel Brobecker <brobecker@adacore.com>
4025
4026 * configure.ac: Only use -Werror by default when DEVELOPMENT
4027 is true.
4028 * configure: Regenerate.
4029
9e0aa64f
JK
40302014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4031
4032 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4033 * linux-x86-low.c (X86_64_USER_REGS): New.
4034 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4035
2b577b92
YQ
40362014-04-28 Yao Qi <yao@codesourcery.com>
4037
4038 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4039 name.
4040
94611da2
PA
40412014-04-25 Pedro Alves <palves@redhat.com>
4042
4043 PR server/16255
4044 * linux-low.c (linux_attach_fail_reason_string): New function.
4045 (linux_attach_lwp): Delete.
4046 (linux_attach_lwp_1): Rename to ...
4047 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4048 argument. Remove "initial" parameter. Return int instead of
4049 void. Don't error or warn here.
4050 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4051 failure to attach to the tgid. Call warning when failing to
4052 attach to an lwp.
4053 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4054 argument. Remove "initial" parameter. Return int instead of
4055 void. Don't error or warn here.
4056 (linux_attach_fail_reason_string): New declaration.
4057 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4058 interface change. Use linux_attach_fail_reason_string.
4059
01f9f808
MS
40602014-04-24 Michael Sturm <michael.sturm@mintel.com>
4061 Walfred Tedeschi <walfred.tedeschi@intel.com>
4062
4063 * Makefile.in: Added rules to handle new files
4064 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4065 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4066 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4067 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4068 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4069 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4070 x32-avx512-linux.o.
4071 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4072 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4073 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4074 i386/x32-avx512.xml.
4075 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4076 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4077 i386/x32-avx512-linux.xml.
4078 * i387-fp.c (num_avx512_k_registers): New constant for number
4079 of K registers.
4080 (num_avx512_zmmh_low_registers): New constant for number of
4081 lower ZMM registers (0-15).
4082 (num_avx512_zmmh_high_registers): New constant for number of
4083 higher ZMM registers (16-31).
4084 (num_avx512_ymmh_registers): New contant for number of higher
4085 YMM registers (ymm16-31 added by avx521 on x86_64).
4086 (num_avx512_xmm_registers): New constant for number of higher
4087 XMM registers (xmm16-31 added by AVX512 on x86_64).
4088 (struct i387_xsave): Add space for AVX512 registers.
4089 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4090 Add code to handle AVX512 registers.
4091 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4092 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4093 prototypei from generated file.
4094 (tdesc_amd64_avx512_linux): Likewise.
4095 (init_registers_x32_avx512_linux): Likewise.
4096 (tdesc_x32_avx512_linux): Likewise.
4097 (init_registers_i386_avx512_linux): Likewise.
4098 (tdesc_i386_avx512_linux): Likewise.
4099 (x86_64_regmap): Add AVX512 registers.
4100 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4101 mask.
4102 (initialize_low_arch): Add code to initialize AVX512 registers.
4103
51aa91f9
PA
41042014-04-23 Pedro Alves <palves@redhat.com>
4105
4106 * mem-break.c (find_gdb_breakpoint_at): Make static.
4107 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4108
a4165e94
PA
41092014-04-23 Pedro Alves <palves@redhat.com>
4110
4111 * i386-low.c: Don't include break-common.h here.
4112 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4113 prototype to take target_hw_bp_type as argument instead of a Z
4114 packet char.
4115 * i386-low.h: Include break-common.h here.
4116 (Z_packet_to_hw_type): Declare.
4117 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4118 prototypes.
4119 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4120 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4121 (x86_remove_point): Convert the packet number to a
4122 target_hw_bp_type before calling i386_low_remove_watchpoint.
4123 * win32-i386-low.c (i386_insert_point): Convert the packet number
4124 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4125 (i386_remove_point): Convert the packet number to a
4126 target_hw_bp_type before calling i386_low_remove_watchpoint.
4127
b8acf843
PA
41282014-04-23 Pedro Alves <palves@redhat.com>
4129
4130 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4131
d708bcd1
PA
41322014-04-10 Pedro Alves <palves@redhat.com>
4133
4134 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4135 Check if the condition or command is NULL before checking if the
4136 breakpoint is known. On success, return true.
4137 * mem-break.h (add_breakpoint_condition): Document return.
4138 (add_breakpoint_commands): Add describing comment.
4139 * server.c (skip_to_semicolon): New function.
4140 (process_point_options): Use it.
4141
2eec7d5b
PA
41422014-04-09 Pedro Alves <palves@redhat.com>
4143
4144 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4145 to lwpid_of.
4146
fa96cb38
PA
41472014-02-27 Pedro Alves <palves@redhat.com>
4148
4149 PR 12702
4150 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4151 macros.
4152 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4153 output.
4154 (last_thread_of_process_p): Take a PID argument instead of a
4155 thread pointer.
4156 (linux_wait_for_lwp): Delete.
4157 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4158 functions.
4159 (linux_low_filter_event): New function, party factored out from
4160 linux_wait_for_event.
4161 (linux_wait_for_event): Rename to ...
4162 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4163 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4164 sigsuspend. Check for zombie leaders.
4165 (linux_wait_for_event): Reimplement as wrapper around
4166 linux_wait_for_event_filtered.
4167 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4168 a normal or signal exit is seen, it's the whole process exiting.
4169 (wait_for_sigstop): No longer a for_each_inferior callback.
4170 Rewrite on top of linux_wait_for_event_filtered.
4171 (stop_all_lwps): Call wait_for_sigstop directly.
4172 * server.c (resume, handle_target_event): Handle
4173 TARGET_WAITKIND_NO_RESUMED.
4174
d763de10
JB
41752014-02-26 Joel Brobecker <brobecker@adacore.com>
4176
4177 * win32-low.c (psapi_get_dll_name,
4178 * win32_CreateToolhelp32Snapshot): Delete.
4179 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4180 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4181 Delete.
4182 (handle_load_dll): Add function description.
4183 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4184
850a0f76
JB
41852014-02-26 Joel Brobecker <brobecker@adacore.com>
4186
4187 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4188 Add comment.
4189 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4190 base address when calling win32_add_one_solib.
4191 (handle_load_dll): Delete local variable load_addr.
4192 Remove 0x1000 offset applied to DLL base address when calling
4193 win32_add_one_solib.
4194 (handle_unload_dll): Add comment.
4195
f25b3fc3
JB
41962014-02-26 Joel Brobecker <brobecker@adacore.com>
4197
4198 * win32-low.c (win32_add_all_dlls): Renames
4199 win32_ensure_ntdll_loaded. Rewrite function documentation.
4200 Adjust implementation to always load all DLLs.
4201 Add 0x1000 offset to DLL base address when calling
4202 win32_add_one_solib.
4203 (child_initialization_done): New static global.
4204 (do_initial_child_stuff): Set child_initialization_done to
4205 zero during child initialization, and 1 after. Replace call
4206 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4207 Add comment.
4208 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4209 (handle_unload_dll): Add function documentation.
4210 (get_child_debug_event): Ignore load and unload DLL events
4211 during child initialization.
4212
d86d4aaf
DE
42132014-02-20 Doug Evans <dje@google.com>
4214
3bc32da3 4215 Remove global all_lwps.
d86d4aaf
DE
4216 * inferiors.h (ptid_of): Move here from linux-low.h.
4217 (pid_of, lwpid_of): Ditto.
4218 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4219 parameter is a struct thread_info * now.
4220 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4221 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4222 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4223 directly.
4224 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4225 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4226 * linux-arm-low.c (update_registers_callback): Update, "entry"
4227 parameter is a struct thread_info * now.
4228 Fetch lwpid from current_inferior directly.
4229 (arm_insert_point): Pass &all_threads to find_inferior instead of
4230 &all_lwps.
4231 (arm_remove_point): Ditto.
4232 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4233 (arm_prepare_to_resume): Fetch pid from thread.
4234 (arm_read_description): Fetch lwpid from current_inferior directly.
4235 * linux-low.c (all_lwps): Delete.
4236 (delete_lwp): Delete call to remove_inferior.
4237 (handle_extended_wait): Fetch lwpid from thread.
4238 (add_lwp): Don't set lwp->entry.id. Remove call to
4239 add_inferior_to_list.
4240 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4241 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4242 (kill_one_lwp_callback): Ditto.
4243 (linux_kill): Don't dereference NULL pointer.
4244 Fetch ptid,lwpid from thread.
4245 (get_detach_signal): Fetch ptid from thread.
4246 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4247 Simplify call to regcache_invalidate_thread.
4248 (delete_lwp_callback): Update, "entry" parameter is a
4249 struct thread_info * now. Fetch pid from thread.
4250 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4251 (status_pending_p_callback): Update, "entry" parameter is a
4252 struct thread_info * now. Fetch ptid from thread.
4253 (find_lwp_pid): Update, "entry" parameter is a
4254 struct thread_info * now.
4255 (linux_wait_for_lwp): Fetch pid from thread.
4256 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4257 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4258 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4259 (dequeue_one_deferred_signal): Ditto.
4260 (cancel_breakpoint): Fetch ptid from current_inferior.
4261 (linux_wait_for_event): Pass &all_threads to find_inferior,
4262 not &all_lwps. Fetch ptid, lwpid from thread.
4263 (count_events_callback): Update, "entry" parameter is a
4264 struct thread_info * now.
4265 (select_singlestep_lwp_callback): Ditto.
4266 (select_event_lwp_callback): Ditto.
4267 (cancel_breakpoints_callback): Ditto.
4268 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4269 not &all_lwps.
4270 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4271 (unsuspend_one_lwp): Update, "entry" parameter is a
4272 struct thread_info * now.
4273 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4274 not &all_lwps.
4275 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4276 Fetch lwpid from thread, not lwp.
4277 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4278 Pass &all_threads to find_inferior, not &all_lwps.
4279 (send_sigstop): Fetch lwpid from thread, not lwp.
4280 (send_sigstop_callback): Update, "entry" parameter is a
4281 struct thread_info * now.
4282 (suspend_and_send_sigstop_callback): Ditto.
4283 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4284 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4285 struct thread_info * now.
4286 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4287 from thread, lwp.
4288 (lwp_running): Update, "entry" parameter is a
4289 struct thread_info * now.
4290 (stop_all_lwps): Fetch ptid from thread.
4291 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4292 (linux_resume_one_lwp): Fetch lwpid from thread.
4293 (linux_set_resume_request): Update, "entry" parameter is a
4294 struct thread_info * now. Fetch pid, lwpid from thread.
4295 (resume_status_pending_p): Update, "entry" parameter is a
4296 struct thread_info * now.
4297 (need_step_over_p): Ditto. Fetch lwpid from thread.
4298 (start_step_over): Fetch lwpid from thread.
4299 (linux_resume_one_thread): Update, "entry" parameter is a
4300 struct thread_info * now. Fetch lwpid from thread.
4301 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4302 (proceed_one_lwp): Update, "entry" parameter is a
4303 struct thread_info * now. Fetch lwpid from thread.
4304 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4305 struct thread_info * now.
4306 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4307 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4308 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4309 directly.
4310 (regsets_store_inferior_registers): Ditto.
4311 (fetch_register, store_register): Ditto.
4312 (linux_read_memory, linux_write_memory): Ditto.
4313 (linux_request_interrupt): Ditto.
4314 (linux_read_auxv): Ditto.
4315 (linux_xfer_siginfo): Ditto.
4316 (linux_qxfer_spu): Ditto.
4317 (linux_qxfer_libraries_svr4): Ditto.
4318 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4319 moved to inferiors.h.
4320 (get_lwp): Delete.
4321 (get_thread_lwp): Update.
4322 (struct lwp_info): Delete member "entry". Simplify comment for
4323 member "thread".
4324 (all_lwps): Delete.
4325 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4326 current_inferior directly.
4327 (update_watch_registers_callback): Update, "entry" parameter is a
4328 struct thread_info * now. Fetch pid from thread.
4329 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4330 (mips_insert_point): Fetch lwpid from current_inferior.
4331 Pass &all_threads to find_inferior, not &all_lwps.
4332 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4333 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4334 directly.
4335 (mips_stopped_data_address): Ditto.
4336 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4337 directly.
4338 * linux-tile-low.c (tile_arch_setup): Ditto.
4339 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4340 (update_debug_registers_callback): Update, "entry" parameter is a
4341 struct thread_info * now. Fetch pid from thread.
4342 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4343 Pass &all_threads to find_inferior, not &all_lwps.
4344 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4345 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4346 Pass &all_threads to find_inferior, not &all_lwps.
4347 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4348 (i386_dr_low_get_status): Ditto.
4349 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4350 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4351 (x86_linux_read_description): Ditto.
4352 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4353
3b8361aa
DE
43542014-02-20 Doug Evans <dje@google.com>
4355
4356 * inferiors.c (get_first_inferior): Fix buglet.
4357
f7667f0d
DE
43582014-02-19 Doug Evans <dje@google.com>
4359
4360 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4361 * inferiors.c (add_thread): Change result type to struct thread_info *.
4362 All callers updated.
4363 (add_lwp): Call add_thread here instead of in callers.
4364 All callers updated.
4365 * linux-low.h (get_lwp_thread): Rewrite.
4366 (struct lwp_info): New member "thread".
4367
b3312d80
DE
43682014-02-19 Doug Evans <dje@google.com>
4369
4370 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4371 All callers updated.
4372
ecc6f45c
DE
43732014-02-19 Doug Evans <dje@google.com>
4374
4375 * inferiors.c (add_thread): Fix whitespace.
4376
649ebbca
DE
43772014-02-19 Doug Evans <dje@google.com>
4378
4379 * dll.c (clear_dlls): Replace accessing list implemention details
4380 with API function.
4381 * gdbthread.h (get_first_thread): Declare.
4382 * inferiors.c (for_each_inferior_with_data): New function.
4383 (get_first_thread): New function.
4384 (find_thread_ptid): Simplify.
4385 (get_first_inferior): New function.
4386 (clear_list): Delete.
4387 (one_inferior_p): New function.
4388 (clear_inferior_list): New function.
4389 (clear_inferiors): Update.
4390 * inferiors.h (for_each_inferior_with_data): Declare.
4391 (clear_inferior_list): Declare.
4392 (one_inferior_p): Declare.
4393 (get_first_inferior): Declare.
4394 * linux-low.c (linux_wait_for_event): Replace accessing list
4395 implemention details with API function.
4396 * server.c (target_running): Ditto.
4397 (accumulate_file_name_length): New function.
4398 (emit_dll_description): New function.
4399 (handle_qxfer_libraries): Replace accessing list implemention
4400 details with API function.
4401 (handle_qxfer_threads_worker): New function.
4402 (handle_qxfer_threads_proper): Replace accessing list implemention
4403 details with API function.
4404 (handle_query): Ditto.
4405 (visit_actioned_threads_callback_ftype): New typedef.
4406 (visit_actioned_threads_data): New struct.
4407 (visit_actioned_threads): Rewrite to be find_inferior callback.
4408 (resume): Call find_inferior.
4409 (handle_status): Replace accessing list implemention
4410 details with API function.
4411 (process_serial_event): Replace accessing list implemention details
4412 with API function.
4413 * target.c (set_desired_inferior): Replace accessing list implemention
4414 details with API function.
4415 * tracepoint.c (same_process_p): New function.
4416 (gdb_agent_about_to_close): Replace accessing list implemention
4417 details with API function.
4418 * win32-low.c (child_delete_thread): Replace accessing list
4419 implemention details with API function.
4420 (match_dll_by_basename): New function.
4421 (dll_is_loaded_by_basename): New function.
4422 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4423 details call to dll_is_loaded_by_basename.
4424
80894984
DE
44252014-02-19 Doug Evans <dje@google.com>
4426
4427 * dll.h (struct dll_info): Add comment.
4428 * gdbthread.h (struct thread_info): Add comment.
4429 (current_ptid): Simplify.
4430 * inferiors.c (add_process): Update.
4431 (remove_process): Update.
4432 * inferiors.h (struct process_info): Rename member "head" to "entry".
4433 * linux-low.c (delete_lwp): Update.
4434 (add_lwp): Update.
4435 (last_thread_of_process_p): Update.
4436 (kill_one_lwp_callback, linux_kill): Update.
4437 (status_pending_p_callback): Update.
4438 (wait_for_sigstop): Update. Simplify read of ptid.
4439 (start_step_over): Update.
4440 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4441 (get_lwp_thread): Update.
4442 (struct lwp_info): Rename member "head" to "entry".
4443 * regcache.h (inferior_list_entry): Delete.
4444 * server.c (kill_inferior_callback): Update.
4445 (detach_or_kill_inferior_callback): Update.
4446 (print_started_pid): Update.
4447 (print_attached_pid): Update.
4448 (process_serial_event): Simplify read of ptid.
4449 * thread-db.c (thread_db_create_event): Update.
4450 (thread_db_get_tls_address): Update.
4451 * win32-low.c (current_inferior_ptid): Simplify.
4452
46917d26
TT
44532014-02-19 Tom Tromey <tromey@redhat.com>
4454
4455 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4456 argument.
4457 (target_supports_btrace): Update.
4458
0759a81e
YQ
44592014-02-14 Yao Qi <yao@codesourcery.com>
4460
4461 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4462 (rsp-low-ipa.o): New target.
4463
a7191e8b
TT
44642014-02-12 Tom Tromey <tromey@redhat.com>
4465
4466 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4467 convert_ascii_to_int.
4468 * regcache.c (registers_to_string): Likewise.
4469 * remote-utils.c (decode_M_packet): Likewise.
4470 * server.c (process_serial_event): Likewise.
4471
ff0e980e
TT
44722014-02-12 Tom Tromey <tromey@redhat.com>
4473
4474 * server.c (handle_query, handle_v_run): Use hex2bin, not
4475 unhexify.
4476 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4477
e9371aff
TT
44782014-02-12 Tom Tromey <tromey@redhat.com>
4479
4480 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4481 convert_int_to_ascii.
4482 * regcache.c (registers_to_string, collect_register_as_string):
4483 Likewise.
4484 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4485 Likewise.
4486 * server.c (process_serial_event): Likewise.
4487 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4488 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4489
971dc0b8
TT
44902014-02-12 Tom Tromey <tromey@redhat.com>
4491
4492 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4493 bin2hex, not hexify.
4494 * tracepoint.c (cmd_qtstatus): Likewise.
4495
0a822afb
TT
44962014-02-12 Tom Tromey <tromey@redhat.com>
4497
4498 * remote-utils.c (monitor_output): Pass explicit length to
4499 hexify.
4500
9c3d6531
TT
45012014-02-12 Tom Tromey <tromey@redhat.com>
4502
4503 * tracepoint.c: Include rsp-low.h.
4504 * server.c: Include rsp-low.h.
4505 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4506 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4507 declare.
4508 * remote-utils.c: Include rsp-low.h.
4509 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4510 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4511 (convert_int_to_ascii, convert_ascii_to_int): Move to
4512 common/rsp-low.c.
4513 * regcache.c: Include rsp-low.h.
4514 * ax.c: Include rsp-low.h.
4515 * Makefile.in (SFILES): Add common/rsp-low.c.
4516 (OBS): Add rsp-low.o.
4517 (rsp-low.o): New target.
4518
01fd3ea5
TT
45192014-02-12 Tom Tromey <tromey@redhat.com>
4520
4521 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4522 Include print-utils.h.
4523 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4524 (plongest, thirty_two, phex_nz): Remove.
4525 * Makefile.in (SFILES): Add common/print-utils.c.
4526 (OBS): Add print-utils.o.
4527 (print-utils-ipa.o): New target.
4528 (print-utils.o): New target.
4529 (IPA_OBJS): Add print-utils-ipa.o.
4530
e99dc820
TT
45312014-02-06 Tom Tromey <tromey@redhat.com>
4532
4533 * Makefile.in (SFILES): Fix indentation.
4534
ee1e2d4f
DE
45352014-02-05 Doug Evans <dje@google.com>
4536
4537 * linux-low.c (linux_wait_for_event): Improve comment.
4538 (linux_wait_1): Keep current_inferior in sync with event_child.
4539
f5a02773
DE
45402014-01-22 Doug Evans <dje@google.com>
4541
4542 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4543
87ce2a04
DE
45442014-01-22 Doug Evans <dje@google.com>
4545
4546 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4547 * configure: Regenerate.
4548 * config.in: Regenerate.
4549 * Makefile.in (SFILES): Add debug.c.
4550 (OBS): Add debug.o.
4551 * debug.c: New file.
4552 * debug.h: New file.
4553 * linux-aarch64-low.c (*): Update all debugging printfs to use
4554 debug_printf instead of fprintf.
4555 * linux-arm-low.c (*): Ditto.
4556 * linux-cris-low.c (*): Ditto.
4557 * linux-crisv32-low.c (*): Ditto.
4558 * linux-m32r-low.c (*): Ditto.
4559 * linux-sparc-low.c (*): Ditto.
4560 * linux-x86.c (*): Ditto.
4561 * linux-low.c (*): Ditto.
4562 (linux_wait_1): Add calls to debug_enter, debug_exit.
4563 (linux_wait): Remove redundant debugging printf.
4564 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4565 (linux_resume, unstop_all_lwps): Ditto.
4566 * mem-break.c (*): Update all debugging printfs to use
4567 debug_printf instead of fprintf.
4568 * remote-utils.c (*): Ditto.
4569 * thread-db.c (*): Ditto.
4570 * server.c #include <ctype.h>, "gdb_vecs.h".
4571 (debug_threads): Moved to debug.c.
4572 (*): Update all debugging printfs to use debug_printf instead of
4573 fprintf.
4574 (start_inferior): Replace call to fflush with call to debug_flush.
4575 (monitor_show_help): Mention set debug-format.
4576 (parse_debug_format_options): New function.
4577 (handle_monitor_command): Handle "monitor set debug-format".
4578 (gdbserver_usage): Mention --debug-format.
4579 (main): Parse --debug-format.
4580 * server.h (debug_threads): Declaration moved to debug.h.
4581 #include "debug.h".
4582 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4583 trace_debug_1 that uses debug_printf.
4584 (tracepoint_look_up_symbols): Update all debugging printfs to use
4585 debug_printf instead of fprintf.
4586
e671835b
BS
45872014-01-20 Baruch Siach <baruch@tkos.co.il>
4588
4589 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4590 sys/ptrace.h.
4591
b5737fa9
PA
45922014-01-17 Pedro Alves <palves@redhat.com>
4593
ea38d2a9 4594 PR build/16445
c7faa97a
PA
4595 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4596 defined after including gdb_proc_service.h.
b5737fa9 4597
40ed484e
DE
45982014-01-16 Doug Evans <dje@google.com>
4599
4600 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4601 (match_dll): Use it.
4602
969c39fb
MM
46032014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4604
4605 * target.h (target_ops) <read_btrace>: Change parameters and
4606 return type to allow error reporting.
4607 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4608 trace reading errors on.
4609 * linux-low.c (linux_low_read_btrace): Pass trace reading
4610 errors on.
4611 (linux_low_disable_btrace): New.
4612
ab7f45ba
DE
46132014-01-15 Doug Evans <dje@google.com>
4614
4615 * inferiors.c (thread_id_to_gdb_id): Delete.
4616 * inferiors.h (thread_id_to_gdb_id): Delete.
4617
66af0f44
EZ
46182014-01-13 Eli Zaretskii <eliz@gnu.org>
4619
4620 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4621 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4622 versions.
4623
9939e131
PA
46242014-01-08 Pedro Alves <palves@redhat.com>
4625
4626 * server.c (handle_status): Don't discard previous queued stop
4627 replies or thread's pending status here.
4628 (main) <disconnection>: Do it here instead.
4629
b7ea362b
PA
46302014-01-08 Pedro Alves <palves@redhat.com>
4631
4632 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4633 * server.c (visit_actioned_threads, handle_pending_status): New
4634 function.
4635 (handle_v_cont): Factor out parts to ...
4636 (resume): ... this new function. If in all-stop, and a thread
4637 being resumed has a pending status, report it without actually
4638 resuming.
4639 (myresume): Adjust to use the new 'resume' function.
4640 (clear_pending_status_callback, set_pending_status_callback)
4641 (find_status_pending_thread_callback): New functions.
4642 (handle_status): Handle the case of multiple threads having
4643 interesting statuses to report. Report threads' real last signal
4644 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4645 with an interesting thread to report the status for, instead of
4646 always reporting the status of the first thread.
4647
28498c42
JB
46482014-01-01 Joel Brobecker <brobecker@adacore.com>
4649
4650 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4651 * gdbreplay.c (gdbreplay_version): Likewise.
4652
f45c82da
YZ
46532013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4654
4655 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4656 iov.iov_len with the real length in use.
4657
379a5e2d
JB
46582013-12-13 Joel Brobecker <brobecker@adacore.com>
4659
4660 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4661 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4662 for all targets that use win32-low.c.
4663 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4664 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4665
4210d83e
PA
46662013-12-13 Pedro Alves <palves@redhat.com>
4667
4668 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4669 if equal to TARGET_WAITKIND_LOADED.
4670 * win32-low.c (cached_status): New static global.
4671 (win32_wait): Add declaration.
4672 (do_initial_child_stuff): Flush all initial pending debug events
4673 up to the initial breakpoint.
4674 (win32_wait): If CACHED_STATUS was set, return that instead
4675 of doing a real wait. Remove the code resuming the execution
4676 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4677 during the initial phase. Also remove the code changing
4678 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4679 TARGET_WAITKIND_STOPPED.
4680
e7f0d979
YQ
46812013-12-11 Yao Qi <yao@codesourcery.com>
4682
4683 * notif.c (handle_notif_ack): Return 0 if no notification
4684 matches.
4685
ebcf782c
DE
46862013-11-20 Doug Evans <dje@google.com>
4687
4688 * linux-low.c (linux_set_resume_request): Fix comment.
4689
20ad9378
DE
46902013-11-20 Doug Evans <dje@google.com>
4691
4692 * linux-low.c (resume_status_pending_p): Tweak comment.
4693
a196ebeb
WT
46942013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4695
4696 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4697 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4698 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4699 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4700 (srv_amd64_regobj): Add amd64-mpx.o.
4701 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4702 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4703 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4704 * i387-fp.c (num_pl_bnd_register) Added constant.
4705 (num_pl_bnd_cfg_registers) Added constant.
4706 (struct i387_xsave) Added reserved area and MPX fields.
4707 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4708 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4709 function.
4710 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4711 (init_registers_amd64_mpx_linux): Declare new function.
4712 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4713 (x86_64_regmap): Add MPX registers.
4714 (x86_linux_read_description): Add MPX case.
4715 (initialize_low_arch): Initialize MPX targets.
4716
0080a2f6
TT
47172013-11-18 Tom Tromey <tromey@redhat.com>
4718
4719 * configure: Rebuild.
4720 * configure.ac: Don't check for stdlib.h.
4721 * gdbreplay.c: Unconditionally include stdlib.h.
4722
2978b111
TT
47232013-11-18 Tom Tromey <tromey@redhat.com>
4724
4725 * config.in: Rebuild.
4726 * configure: Rebuild.
4727 * configure.ac: Don't use AC_HEADER_DIRENT.
4728
a3d08894
TT
47292013-11-18 Tom Tromey <tromey@redhat.com>
4730
4731 * server.h: Don't check HAVE_STRING_H.
4732 * gdbreplay.c: Don't check HAVE_STRING_H.
4733 * configure: Rebuild.
4734
0a5dd17d
TT
47352013-11-18 Tom Tromey <tromey@redhat.com>
4736
4737 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4738 LIBGNU.
4739
1bd2f0ba
TT
47402013-11-08 Tom Tromey <tromey@redhat.com>
4741
4742 * configure, config.in: Rebuild.
4743 * configure.ac: Remove unused configury.
4744
3266f10b
TT
47452013-11-08 Tom Tromey <tromey@redhat.com>
4746
4747 * acinclude.m4: Include common.m4, codeset.m4.
4748 * configure, config.in: Rebuild.
4749 * configure.ac: Use GDB_AC_COMMON.
4750
6682d959
AA
47512013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4752
4753 * linux-s390-low.c (HWCAP_S390_TE): New define.
4754 (s390_arch_setup): Consider the TE field in the HWCAP for
4755 determining 'have_regset_tdb'.
4756
fd0a4d76
SDJ
47572013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4758
4759 PR gdb/16014
4760 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4761 call to sizeof.
4762
1a3d890b
PA
47632013-10-02 Pedro Alves <palves@redhat.com>
4764
4765 * server.c (process_serial_event): Don't output "GDBserver
4766 exiting" if GDB is connected through stdio.
4767 * target.c (mywait): Likewise, be silent if GDB is connected
4768 through stdio.
4769
97ad4581
JB
47702013-10-01 Joel Brobecker <brobecker@adacore.com>
4771
4772 * lynx-low.c (lynx_add_threads_after_attach): New function.
4773 (lynx_attach): Remove call to add_thread. Add call to
4774 lynx_add_threads_after_attach instead.
4775
5b4e221c
MF
47762013-09-28 Mike Frysinger <vapier@gentoo.org>
4777
4778 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4779 * config.in, configure: Regenerated.
4780
ee47b2f8
YQ
47812013-09-18 Yao Qi <yao@codesourcery.com>
4782
4783 PR server/15959
4784 * server.c (start_inferior): Clear 'resume_info'.
4785
d6707650 47862013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4787
d6707650
JW
4788 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4789 for each register.
4790
9243dd0e 47912013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4792
9243dd0e
JW
4793 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4794 linux-tile-low.o to srv_tgtobj.
4795
c623a6ef
WN
47962013-09-16 Will Newton <will.newton@linaro.org>
4797
4798 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4799 out regs.
4800
fb71d39e
PA
48012013-09-06 Pedro Alves <palves@redhat.com>
4802
4803 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4804 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4805 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4806 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4807 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4808 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4809
8e7e9910
PA
48102013-09-06 Pedro Alves <palves@redhat.com>
4811
4812 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4813 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4814
7c3a12ca
PA
48152013-09-06 Pedro Alves <palves@redhat.com>
4816
4817 * linux-amd64-ipa.c: Include tracepoint.h.
4818 * linux-i386-ipa.c: Include tracepoint.h.
4819
8eb3d7b6
RW
48202013-09-06 Ricard Wanderlof <ricardw@axis.com>
4821
4822 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4823 (ps_get_thread_area): New function.
4824
eddddb9d
RW
48252013-09-06 Ricard Wanderlof <ricardw@axis.com>
4826
4827 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4828 (initialize_low_arch): Call init_registers_crisv32 rather than
4829 init_register_crisv32.
4830
533b0600
PA
48312013-09-05 Pedro Alves <palves@redhat.com>
4832
4833 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4834 to ...
4835 * hostio.h: ... this new file.
4836 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4837 win32-low.c: Include hostio.h.
4838
0ce3d3b5
PA
48392013-09-05 Pedro Alves <palves@redhat.com>
4840
4841 * server.h (gdb_client_data, handler_func, callback_handler_func)
4842 (delete_file_handler, add_file_handler, append_callback_event)
4843 (delete_callback_event, start_event_loop, initialize_event_loop):
4844 Move to event-loop.h and include it.
4845 * event-loop.h: New file.
4846
799cdc37
PA
48472013-09-05 Pedro Alves <palves@redhat.com>
4848
4849 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4850 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4851 (loaded_dll, unloaded_dll): Move to ...
4852 * dll.h: ... this new file.
4853 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4854
6a6bbd9d
PA
48552013-09-05 Pedro Alves <palves@redhat.com>
4856
4857 * server.h (current_process, get_thread_process, all_processes)
4858 (add_inferior_to_list, for_each_inferior, current_inferior)
4859 (remove_inferior, add_process, remove_process, find_process_pid)
4860 (have_started_inferiors_p, have_attached_inferiors_p)
4861 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4862 (clear_inferiors, find_inferior, find_inferior_id)
4863 (inferior_target_data, set_inferior_target_data)
4864 (inferior_regcache_data, set_inferior_regcache_data): Move to
4865 inferiors.h, and include it.
4866 * inferiors.h: New file.
4867
f699aaba
PA
48682013-09-05 Pedro Alves <palves@redhat.com>
4869
4870 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4871 Move ...
72f4393d 4872 * ax.h: ... here.
f699aaba 4873
c144c7a0
PA
48742013-09-05 Pedro Alves <palves@redhat.com>
4875
4876 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4877 tracepoint.h.
4878 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4879 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4880 (handle_tracepoint_general_set, handle_tracepoint_query)
4881 (tracepoint_finished_step, tracepoint_was_hit)
4882 (release_while_stepping_state_list, current_traceframe)
4883 (in_readonly_region, traceframe_read_mem)
4884 (fetch_traceframe_registers, traceframe_read_sdata)
4885 (traceframe_read_info, struct fast_tpoint_collect_status)
4886 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4887 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4888 (supply_fast_tracepoint_registers)
4889 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4890 (ipa_tdesc, claim_trampoline_space)
4891 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4892 (agent_mem_read, agent_get_trace_state_variable_value)
4893 (agent_set_trace_state_variable_value, agent_tsv_read)
4894 (agent_mem_read_string, get_raw_reg_func_addr)
4895 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4896 * tracepoint.h: ... this new file.
4897
ff42e6ab
PA
48982013-09-05 Pedro Alves <palves@redhat.com>
4899
4900 * server.h (perror_with_name, error, fatal, warning, paddress)
4901 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4902 include it.
4903 * utils.h: New file.
4904
541af0f4
PA
49052013-09-05 Pedro Alves <palves@redhat.com>
4906
4907 * server.h (remote_debug, noack_mode, transport_is_reliable)
4908 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4909 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4910 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4911 (write_enn, initialize_async_io, enable_async_io)
4912 (disable_async_io, check_remote_input_interrupt_request)
4913 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4914 (dead_thread_notify, prepare_resume_reply)
4915 (decode_address_to_semicolon, decode_address, decode_m_packet)
4916 (decode_M_packet, decode_X_packet, decode_xfer_write)
4917 (decode_search_memory_packet, unhexify, hexify)
4918 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4919 (look_up_one_symbol, relocate_instruction)
4920 (monitor_output): Move to remote-utils.h, and include it.
4921 * remote-utils.h: New file.
4922
eebdf26b
PA
49232013-09-05 Pedro Alves <palves@redhat.com>
4924
4925 * server.h (_): Delete.
4926
3aafd2ff
PA
49272013-09-02 Pedro Alves <palves@redhat.com>
4928
4929 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4930 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4931 allocated.
4932 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4933
cee83bcb
PM
49342013-09-02 Pierre Muller <muller@sourceware.org>
4935
4936 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4937 or WriteProcessMemory complete successfully and handle
4938 ERROR_PARTIAL_COPY error.
4939
9a13b2fa
PA
49402013-09-02 Pedro Alves <palves@redhat.com>
4941
4942 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4943 error instead of EIO.
4944
602e3198
JK
49452013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4946
4947 PR server/15604
4948 * linux-low.c: Include filestuff.h.
4949 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4950 * lynx-low.c: Include filestuff.h.
4951 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4952 * server.c: Include filestuff.h.
4953 (main): Call notice_open_fds.
4954 * spu-low.c: Include filestuff.h.
4955 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4956
96d7229d
LM
49572013-08-22 Luis Machado <lgustavo@codesourcery.com>
4958
4959 * Makefile.in: Explain why ../target and ../nat are not
4960 listed as include file search paths.
4961 (linux-waitpid.o): New object file rule.
4962 * configure.srv (srv_native_linux_obj): New variable.
4963 Replace all occurrences of linux native object files with
4964 $srv_native_linux_obj.
4965 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4966 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4967 (linux_enable_event_reporting): Remove declaration.
4968 (my_waitpid): Moved to common/linux-waitpid.c.
4969 (linux_wait_for_event): Pass ptid when calling
4970 linux_enable_event_reporting.
4971 (linux_supports_tracefork_flag): Remove.
4972 (linux_enable_event_reporting): Likewise.
4973 (linux_tracefork_grandchild): Remove.
4974 (STACK_SIZE): Moved to common/linux-ptrace.c.
4975 (linux_tracefork_child): Remove.
4976 (linux_test_for_tracefork): Remove.
4977 (linux_look_up_symbols): Call linux_supports_traceclone.
4978 (initialize_low): Remove call to linux_test_for_tracefork.
4979 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4980 common/linux-ptrace.h.
4981 (PTRACE_TYPE_ARG4): Likewise.
4982 Include linux-ptrace.h.
4983
32940073
PA
49842013-08-21 Pedro Alves <palves@redhat.com>
4985
4986 * config.in: Renegerate.
4987
33b60d58 49882013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4989
33b60d58
LM
4990 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4991 (SFILES): Remove $(srcdir)/common/target-common.c and
4992 add $(srcdir)/target/waitstatus.c.
4993 (OBS): Remove target-common.o and add waitstatus.o.
4994 (server_h): Remove $(srcdir)/../common/target-common.h and
4995 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4996 and $(srcdir)/../target/waitstatus.h.
4997 (target-common.o): Remove.
4998 (waitstatus.o): New target object file.
4999 * target.h: Do not include target-common.h and
5000 include target/resume.h, target/wait.h and
5001 target/waitstatus.h.
5002
b8e1b30e
LM
50032013-08-13 Luis Machado <lgustavo@codesourcery.com>
5004
5005 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5006 to PTRACE_TYPE_ARG3.
5007 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5008 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5009 PTRACE_TYPE_ARG4.
5010 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5011 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5012
7a60ad40
YQ
50132013-07-27 Jie Zhang <jie@codesourcery.com>
5014 Daniel Jacobowitz <dan@codesourcery.com>
5015 Yao Qi <yao@codesourcery.com>
5016
5017 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5018 (mips-linux-watch.o): New rule.
5019 (mips_linux_watch_h): New variable.
5020 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5021 srv_tgtobj.
5022 * linux-mips-low.c: Include mips-linux-watch.h.
5023 (struct arch_process_info, struct arch_lwp_info): New.
5024 (update_watch_registers_callback): New function.
5025 (mips_linux_new_process, mips_linux_new_thread) New functions.
5026 (mips_linux_prepare_to_resume, mips_insert_point): New
5027 functions.
5028 (mips_remove_point, mips_stopped_by_watchpoint): New
5029 functions.
5030 (rsp_bp_type_to_target_hw_bp_type): New function.
5031 (mips_stopped_data_address): New function.
5032 (the_low_target): Add watchpoint support functions.
5033
de6f69ad
YQ
50342013-07-27 Yao Qi <yao@codesourcery.com>
5035
5036 * i386-low.c: Include break-common.h.
5037 (enum target_hw_bp_type): Remove.
5038
3360c0bf
LM
50392013-07-24 Luis Machado <lgustavo@codesourcery.com>
5040
5041 * Makefile.in (SFILES): /common/target-common.c.
5042 (OBS): Add target-common.o.
5043 (server_h): Add $(srcdir)/../common/target-common.h.
5044 (target-common.o): New target.
5045 * server.c (queue_stop_reply_callback): Free
5046 status string after use.
5047 * target.c (target_waitstatus_to_string): Remove.
5048 * target.h: Include target-common.h.
5049 (resume_kind): Likewise.
5050 (target_waitkind): Likewise.
5051 (target_waitstatus): Likewise.
5052 (TARGET_WNOHANG): Likewise.
5053
bd885420
YQ
50542013-07-04 Yao Qi <yao@codesourcery.com>
5055
5056 * Makefile.in (host_alias): Use @host_noncanonical@.
5057 (target_alias): Use @target_noncanonical@.
5058 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5059 ACX_NONCANONICAL_HOST.
5060 * configure: Regenerated.
5061
5062 Revert:
5063 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5064
5065 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5066 * configure: Rebuild.
5067 * Makefile.in (version_host, version_target): Get from configure.
5068 (version.c): Use $(version_host) and $(version_target).
5069
17ef446e
PA
50702013-07-03 Pedro Alves <palves@redhat.com>
5071
5072 * Makefile.in (config.status): Depend on development.sh.
5073 * acinclude.m4: Include libmcheck.m4.
5074 * configure: Regenerate.
5075
7a9a7487
MG
50762013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5077
5078 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5079 attribute inside the parentheses.
5080 (winapi_DebugSetProcessKillOnExit): Ditto.
5081 (winapi_DebugBreakProcess): Ditto.
5082 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5083
49b64de6
MG
50842013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5085
5086 * notif.h (notif_event): Add a dummy member to avoid compiler
5087 errors.
5088
d5749ee7
PA
50892013-07-01 Pedro Alves <palves@redhat.com>
5090
5091 * hostio.c (HOSTIO_PATH_MAX): Define.
5092 (require_filename, handle_open, handle_unlink, handle_readlink):
5093 Use it.
5094
d8d2a3ee
PA
50952013-07-01 Pedro Alves <palves@redhat.com>
5096
5097 * server.h: Include "pathmax.h".
5098 * linux-low.c: Don't include sys/param.h.
5099 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5100 MAXPATHLEN.
5101 * win32-low.c: Don't include sys/param.h.
5102 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5103
bc7dea8d
PA
51042013-07-01 Pedro Alves <palves@redhat.com>
5105
5106 * event-loop.c: Don't check HAVE_UNISTD_H before including
5107 <unistd.h>.
5108 * gdbreplay.c: Likewise.
5109 * remote-utils.c: Likewise.
5110 * server.c: Likewise.
5111 * configure.ac: Don't check for unistd.h.
5112 * configure: Regenerate.
5113
d6c2da54
TT
51142013-06-28 Tom Tromey <tromey@redhat.com>
5115
5116 * Makefile.in (version.c): Use version.in, not
5117 common/version.in.
5118
257b6bec
MG
51192013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5120
5121 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5122 * configure: Rebuild.
5123 * Makefile.in (version_host, version_target): Get from configure.
5124 (version.c): Use $(version_host) and $(version_target).
5125
86ebe149
DK
51262013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5127
5128 Fix trace-status to output user name without trailing colon.
5129 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5130
f30aa5af
DK
51312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5132
5133 Fix trace-status to output proper start-time and stop-time.
5134 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5135 output start time and stop time in hex as gdb expects.
5136
28a93511
YQ
51372013-06-26 Pedro Alves <pedro@codesourcery.com>
5138
5139 * tracepoint.c (build_traceframe_info_xml): Output trace state
5140 variables present in the trace buffer.
5141
01208463
TT
51422013-06-24 Tom Tromey <tromey@redhat.com>
5143
5144 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5145 create-version.sh.
5146 (version.o): Remove.
5147 * gdbreplay.c: Include version.h.
5148 (version, host_name): Don't declare.
5149 * server.h: Include version.h.
5150 (version, host_name): Don't declare.
5151
760256f9
PA
51522013-06-12 Pedro Alves <palves@redhat.com>
5153
5154 * linux-x86-low.c (linux_is_elf64): Delete global.
5155 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5156 with local linux_pid_exe_is_elf_64_file use.
5157
030031ee
PA
51582013-06-11 Pedro Alves <palves@redhat.com>
5159
5160 * linux-low.c (regset_disabled, disable_regset): New functions.
5161 (regsets_fetch_inferior_registers)
5162 (regsets_store_inferior_registers): Use them.
5163 (initialize_regsets_info); Don't allocate the disabled_regsets
5164 array here.
5165 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5166 comment.
5167
5da6eb0a
PA
51682013-06-11 Pedro Alves <palves@redhat.com>
5169
5170 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5171 xmalloc.
5172
7e5aaa09
PA
51732013-06-11 Pedro Alves <palves@redhat.com>
5174
5175 * linux-x86-low.c (initialize_low_arch): Call
5176 init_registers_x32_avx_linux.
5177
d878444c
JK
51782013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5179
5180 Fix compatibility with Android Bionic.
5181 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5182 it is not empty.
5183
3aee8918
PA
51842013-06-07 Pedro Alves <palves@redhat.com>
5185
5f2b57b5 5186 PR server/14823
3aee8918
PA
5187 * Makefile.in (OBS): Add tdesc.o.
5188 (IPA_OBJS): Add tdesc-ipa.o.
5189 (tdesc-ipa.o): New rule.
5190 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5191 interface.
5192 * linux-low.c (new_inferior): Delete.
5193 (disabled_regsets, num_regsets): Delete.
5194 (linux_add_process): Adjust to set the new per-process
5195 new_inferior flag.
5196 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5197 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5198 was a stop. When calling arch_setup, switch the current inferior
5199 to the thread that got an event.
5200 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5201 (regsets_fetch_inferior_registers)
5202 (regsets_store_inferior_registers): New regsets_info parameter.
5203 Adjust to use it.
5204 (linux_register_in_regsets): New regs_info parameter. Adjust to
5205 use it.
5206 (register_addr, fetch_register, store_register): New usrregs_info
5207 parameter. Adjust to use it.
5208 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5209 parameter regs_info. Adjust to use it.
5210 (linux_fetch_registers): Get the current inferior's regs_info, and
5211 adjust to use it.
5212 (linux_store_registers): Ditto.
5213 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5214 (initialize_low): Don't initialize the target_regsets here. Call
5215 initialize_low_arch.
5216 * linux-low.h (target_regsets): Delete declaration.
5217 (struct regsets_info): New.
5218 (struct usrregs_info): New.
5219 (struct regs_info): New.
5220 (struct process_info_private) <new_inferior>: New field.
5221 (struct linux_target_ops): Delete the num_regs, regmap, and
5222 regset_bitmap fields. New field regs_info.
5223 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5224 * i387-fp.c (num_xmm_registers): Delete.
5225 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5226 calls to new interface.
5227 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5228 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5229 Infer the number of xmm registers from the regcache's target
5230 description.
5231 * i387-fp.h (num_xmm_registers): Delete.
5232 * inferiors.c (add_thread): Don't install the thread's regcache
5233 here.
5234 * proc-service.c (gregset_info): Fetch the current inferior's
5235 regs_info. Adjust to use it.
5236 * regcache.c: Include tdesc.h.
5237 (register_bytes, reg_defs, num_registers)
5238 (gdbserver_expedite_regs): Delete.
5239 (get_thread_regcache): If the thread doesn't have a regcache yet,
5240 create one, instead of aborting gdbserver.
5241 (regcache_invalidate_one): Rename to ...
5242 (regcache_invalidate_thread): ... this.
5243 (regcache_invalidate_one): New.
5244 (regcache_invalidate): Only invalidate registers of the current
5245 process.
5246 (init_register_cache): Add target_desc parameter, and use it.
5247 (new_register_cache): Ditto. Assert the target description has a
5248 non zero registers_size.
5249 (regcache_cpy): Add assertions. Adjust.
5250 (realloc_register_cache, set_register_cache): Delete.
5251 (registers_to_string, registers_from_string): Adjust.
5252 (find_register_by_name, find_regno, find_register_by_number)
5253 (register_cache_size): Add target_desc parameter, and use it.
5254 (free_register_cache_thread, free_register_cache_thread_one)
5255 (regcache_release, register_cache_size): New.
5256 (register_size): Add target_desc parameter, and use it.
5257 (register_data, supply_register, supply_register_zeroed)
5258 (supply_regblock, supply_register_by_name, collect_register)
5259 (collect_register_as_string, collect_register_by_name): Adjust.
5260 * regcache.h (struct target_desc): Forward declare.
5261 (struct regcache) <tdesc>: New field.
5262 (init_register_cache, new_register_cache): Add target_desc
5263 parameter.
5264 (regcache_invalidate_thread): Declare.
5265 (regcache_invalidate_one): Delete declaration.
5266 (regcache_release): Declare.
5267 (find_register_by_number, register_cache_size, register_size)
5268 (find_regno): Add target_desc parameter.
5269 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5270 declarations.
5271 * remote-utils.c: Include tdesc.h.
5272 (outreg, prepare_resume_reply): Adjust.
5273 * server.c: Include tdesc.h.
5274 (gdbserver_xmltarget): Delete declaration.
5275 (get_features_xml, process_serial_event): Adjust.
5276 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5277 declare.
5278 (struct process_info) <tdesc>: New field.
5279 (ipa_tdesc): Declare.
5280 * tdesc.c: New file.
5281 * tdesc.h: New file.
5282 * tracepoint.c: Include tdesc.h.
5283 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5284 (get_context_regcache): Adjust to pass ipa_tdesc down.
5285 (do_action_at_tracepoint): Adjust to get the register cache size
5286 from the context regcache's description.
5287 (traceframe_walk_blocks): Adjust to get the register cache size
5288 from the current trace frame's description.
5289 (traceframe_get_pc): Adjust to get current trace frame's
5290 description and pass it down.
5291 (gdb_collect): Adjust to get the register cache size from the
5292 IPA's description.
5293 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5294 (gdbserver_xmltarget): Delete.
5295 (initialize_low_tracepoint): Set the ipa's target description.
5296 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5297 (initialize_low_tracepoint): Set the ipa's target description.
5298 * linux-x86-low.c: Include tdesc.h.
5299 [__x86_64__] (is_64bit_tdesc): New.
5300 (ps_get_thread_area, x86_get_thread_area): Use it.
5301 (i386_cannot_store_register): Rename to ...
5302 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5303 (i386_cannot_fetch_register): Rename to ...
5304 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5305 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5306 to new interface.
5307 (target_regsets): Rename to ...
5308 (x86_regsets): ... this.
5309 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5310 interface.
5311 (x86_siginfo_fixup): Use is_64bit_tdesc.
5312 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5313 (tdesc_x32_avx_linux, tdesc_x32_linux)
5314 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5315 Declare.
5316 (x86_linux_update_xmltarget): Delete.
5317 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5318 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5319 (AMD64_LINUX_USER64_CS): New.
5320 (x86_linux_read_description): New, based on
5321 x86_linux_update_xmltarget.
5322 (same_process_callback): New.
5323 (x86_arch_setup_process_callback): New.
5324 (x86_linux_update_xmltarget): New.
5325 (x86_regsets_info): New.
5326 (amd64_linux_regs_info): New.
5327 (i386_linux_usrregs_info): New.
5328 (i386_linux_regs_info): New.
5329 (x86_linux_regs_info): New.
5330 (x86_arch_setup): Reimplement.
5331 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5332 (x86_emit_ops): Ditto.
5333 (the_low_target): Adjust. Install x86_linux_regs_info,
5334 x86_cannot_fetch_register, and x86_cannot_store_register.
5335 (initialize_low_arch): New.
5336 * linux-ia64-low.c (tdesc_ia64): Declare.
5337 (ia64_fetch_register): Adjust.
5338 (ia64_usrregs_info, regs_info): New globals.
5339 (ia64_regs_info): New function.
5340 (the_low_target): Adjust.
5341 (initialize_low_arch): New function.
5342 * linux-sparc-low.c (tdesc_sparc64): Declare.
5343 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5344 Adjust.
5345 (sparc_arch_setup): New function.
5346 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5347 (the_low_target): Adjust.
5348 (initialize_low_arch): New function.
5349 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5350 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5351 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5352 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5353 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5354 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5355 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5356 (tdesc_powerpc_isa205_vsx64l): Declare.
5357 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5358 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5359 (ppc_set_pc, ppc_get_hwcap): Adjust.
5360 (ppc_usrregs_info): Forward declare.
5361 (!__powerpc64__) ppc_regmap_adjusted: New global.
5362 (ppc_arch_setup): Adjust to the current process'es target
5363 description.
5364 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5365 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5366 (ppc_store_evrregset): Adjust.
5367 (target_regsets): Rename to ...
5368 (ppc_regsets): ... this, and make static.
5369 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5370 (ppc_regs_info): New function.
5371 (the_low_target): Adjust.
5372 (initialize_low_arch): New function.
5373 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5374 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5375 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5376 (tdesc_s390x_linux64v2): Declare.
5377 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5378 (s390_fill_gregset, s390_store_last_break): Adjust.
5379 (target_regsets): Rename to ...
5380 (s390_regsets): ... this, and make static.
5381 (s390_get_pc, s390_set_pc): Adjust.
5382 (s390_get_hwcap): New target_desc parameter, and use it.
5383 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5384 (s390_arch_setup): Adjust to set the current process'es target
5385 description. Don't adjust the regmap.
5386 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5387 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5388 (regs_info_3264): New globals.
5389 (s390_regs_info): New function.
5390 (the_low_target): Adjust.
5391 (initialize_low_arch): New function.
5392 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5393 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5394 [__mips64] (init_registers_mips_linux)
5395 (init_registers_mips_dsp_linux): Delete defines.
5396 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5397 (have_dsp): New global.
5398 (mips_read_description): New, based on mips_arch_setup.
5399 (mips_arch_setup): Reimplement.
5400 (get_usrregs_info): New function.
5401 (mips_cannot_fetch_register, mips_cannot_store_register)
5402 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5403 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5404 (target_regsets): Rename to ...
5405 (mips_regsets): ... this, and make static.
5406 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5407 (dsp_regs_info, regs_info): New globals.
5408 (mips_regs_info): New function.
5409 (the_low_target): Adjust.
5410 (initialize_low_arch): New function.
5411 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5412 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5413 Declare.
5414 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5415 (arm_read_description): New, with bits factored from
5416 arm_arch_setup.
5417 (arm_arch_setup): Reimplement.
5418 (target_regsets): Rename to ...
5419 (arm_regsets): ... this, and make static.
5420 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5421 (arm_regs_info): New function.
5422 (the_low_target): Adjust.
5423 (initialize_low_arch): New function.
5424 * linux-m68k-low.c (tdesc_m68k): Declare.
5425 (target_regsets): Rename to ...
5426 (m68k_regsets): ... this, and make static.
5427 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5428 (m68k_regs_info): New function.
5429 (m68k_arch_setup): New function.
5430 (the_low_target): Adjust.
5431 (initialize_low_arch): New function.
5432 * linux-sh-low.c (tdesc_sharch): Declare.
5433 (target_regsets): Rename to ...
5434 (sh_regsets): ... this, and make static.
5435 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5436 (sh_regs_info, sh_arch_setup): New functions.
5437 (the_low_target): Adjust.
5438 (initialize_low_arch): New function.
5439 * linux-bfin-low.c (tdesc_bfin): Declare.
5440 (bfin_arch_setup): New function.
5441 (bfin_usrregs_info, regs_info): New globals.
5442 (bfin_regs_info): New function.
5443 (the_low_target): Adjust.
5444 (initialize_low_arch): New function.
5445 * linux-cris-low.c (tdesc_cris): Declare.
5446 (cris_arch_setup): New function.
5447 (cris_usrregs_info, regs_info): New globals.
5448 (cris_regs_info): New function.
5449 (the_low_target): Adjust.
5450 (initialize_low_arch): New function.
5451 * linux-cris-low.c (tdesc_crisv32): Declare.
5452 (cris_arch_setup): New function.
5453 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5454 (cris_regs_info): New function.
5455 (the_low_target): Adjust.
5456 (initialize_low_arch): New function.
5457 * linux-m32r-low.c (tdesc_m32r): Declare.
5458 (m32r_arch_setup): New function.
5459 (m32r_usrregs_info, regs_info): New globals.
5460 (m32r_regs_info): Adjust.
5461 (initialize_low_arch): New function.
5462 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5463 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5464 (tic6x_usrregs_info): Forward declare.
5465 (tic6x_read_description): New function, based on ...
5466 (tic6x_arch_setup): ... this. Reimplement.
5467 (target_regsets): Rename to ...
5468 (tic6x_regsets): ... this, and make static.
5469 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5470 (tic6x_regs_info): New function.
5471 (the_low_target): Adjust.
5472 (initialize_low_arch): New function.
5473 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5474 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5475 (target_regsets): Rename to ...
5476 (xtensa_regsets): ... this, and make static.
5477 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5478 globals.
5479 (xtensa_arch_setup, xtensa_regs_info): New functions.
5480 (the_low_target): Adjust.
5481 (initialize_low_arch): New function.
5482 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5483 (nios2_arch_setup): Set the current process'es tdesc.
5484 (target_regsets): Rename to ...
5485 (nios2_regsets): ... this.
5486 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5487 (nios2_regs_info): New function.
5488 (the_low_target): Adjust.
5489 (initialize_low_arch): New function.
a261b8f5
PA
5490 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5491 (aarch64_arch_setup): Set the current process'es tdesc.
5492 (target_regsets): Rename to ...
5493 (aarch64_regsets): ... this.
5494 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5495 (aarch64_regs_info): New function.
5496 (the_low_target): Adjust.
5497 (initialize_low_arch): New function.
3aee8918
PA
5498 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5499 globals.
5500 (target_regsets): Rename to ...
5501 (tile_regsets): ... this.
5502 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5503 (tile_regs_info): New function.
5504 (tile_arch_setup): Set the current process'es tdesc.
5505 (the_low_target): Adjust.
5506 (initialize_low_arch): New function.
5507 * spu-low.c (tdesc_spu): Declare.
5508 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5509 * win32-arm-low.c (tdesc_arm): Declare.
5510 (arm_arch_setup): New function.
5511 (the_low_target): Install arm_arch_setup instead of
5512 init_registers_arm.
5513 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5514 (init_windows_x86): Rename to ...
5515 (i386_arch_setup): ... this. Set `win32_tdesc'.
5516 (the_low_target): Adjust.
5517 * win32-low.c (win32_tdesc): New global.
5518 (child_add_thread): Don't create the thread cache here.
5519 (do_initial_child_stuff): Set the new process'es tdesc.
5520 * win32-low.h (struct target_desc): Forward declare.
5521 (win32_tdesc): Declare.
5522 * lynx-i386-low.c (tdesc_i386): Declare global.
5523 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5524 * lynx-low.c (lynx_tdesc): New global.
5525 (lynx_add_process): Set the new process'es tdesc.
5526 * lynx-low.h (struct target_desc): Forward declare.
5527 (lynx_tdesc): Declare global.
5528 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5529 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5530 * nto-low.c (nto_tdesc): New global.
5531 (do_attach): Set the new process'es tdesc.
5532 * nto-low.h (struct target_desc): Forward declare.
5533 (nto_tdesc): Declare.
5534 * nto-x86-low.c (tdesc_i386): Declare.
5535 (nto_x86_arch_setup): Set `nto_tdesc'.
5536
b1fbec62
GB
55372013-06-04 Gary Benson <gbenson@redhat.com>
5538
5539 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5540 to qSupported response when appropriate.
5541 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5542 with nonzero-length annex.
5543 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5544 arguments supplied in annex.
5545
d1ec4ce7
DE
55462013-05-31 Doug Evans <dje@google.com>
5547
ac44adcb 5548 PR server/15594
d1ec4ce7
DE
5549 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5550 64 bits in 64-cross-32 environment.
5551
9b25f2d3
PA
55522013-05-28 Pedro Alves <palves@redhat.com>
5553
5554 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5555 (aarch64-without-fpu.c): Delete rule.
5556 * configure.srv (aarch64*-*-linux*): Remove references to
5557 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5558 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5559 declaration.
5560
6740dc9c
PA
55612013-05-24 Pedro Alves <palves@redhat.com>
5562
5563 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5564 instead of strchr/decode_address. Error if the range isn't split
5565 with a ','. Don't assume there's be a ':' in the action.
5566
c2d6af84
PA
55672013-05-23 Yao Qi <yao@codesourcery.com>
5568 Pedro Alves <palves@redhat.com>
5569
5570 * linux-low.c (lwp_in_step_range): New function.
5571 (linux_wait_1): If the thread was range stepping and stopped
5572 outside the stepping range, report the stop to GDB. Otherwise,
5573 continue stepping. Add range stepping debug output.
5574 (linux_set_resume_request): Copy the step range from the resume
5575 request to the lwp.
5576 (linux_supports_range_stepping): New.
5577 (linux_target_ops) <supports_range_stepping>: Set to
5578 linux_supports_range_stepping.
5579 * linux-low.h (struct linux_target_ops)
5580 <supports_range_stepping>: New field.
5581 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5582 * linux-x86-low.c (x86_supports_range_stepping): New.
5583 (the_low_target) <supports_range_stepping>: Set to
5584 x86_supports_range_stepping.
5585 * server.c (handle_v_cont): Handle 'r' action.
5586 (handle_v_requests): Append ";r" if the target supports range
5587 stepping.
5588 * target.h (struct thread_resume) <step_range_start,
5589 step_range_end>: New fields.
5590 (struct target_ops) <supports_range_stepping>:
5591 New field.
5592 (target_supports_range_stepping): New macro.
5593
58794e1a
JB
55942013-05-17 Joel Brobecker <brobecker@adacore.com>
5595
5596 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5597 confusion in comment.
5598
d631c5a7
JB
55992013-05-17 Joel Brobecker <brobecker@adacore.com>
5600
5601 * lynx-low.c (struct process_info_private): New type.
5602 (lynx_add_process): New function.
5603 (lynx_create_inferior, lynx_attach): Replace calls to
5604 add_process by calls to lynx_add_process.
5605 (lynx_resume): If PTID is null, then try using
5606 current_process()->private->last_wait_event_ptid.
5607 Add comments.
5608 (lynx_clear_inferiors): Delete. The contents of that function
5609 has been inlined in lynx_mourn;
5610 (lynx_wait_1): Save the ptid in the process's private data.
5611 (lynx_mourn): Free the process' private data. Replace call
5612 to lynx_clear_inferiors by call to clear_inferiors.
5613
96f7a20f
YQ
56142013-05-17 Yao Qi <yao@codesourcery.com>
5615
5616 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5617 the right place.
5618
db0dfaa0
LM
56192013-05-16 Luis Machado <lgustavo@codesourcery.com>
5620
5621 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5622 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5623 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5624 PT_TEXT_END_ADDR guards. Update comments.
5625 (linux_target_op) <read_offsets>: Conditionally define to
5626 linux_read_offsets if the target is UCLIBC and if it defines
5627 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5628
68f5f838
SL
56292013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5630 Andrew Jenner <andrew@codesourcery.com>
5631
5632 * Makefile.in (SFILES): Add linux-nios2-low.c.
5633 (clean): Add action to delete nios2-linux.c.
5634 (nios2-linux.c): New rule.
5635 * configure.srv: Add nios2*-*-linux*.
5636 * linux-nios2-low.c: New.
5637
1ebff1fd
HAQ
56382013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5639
5640 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5641
f6150862
HZ
56422013-04-25 Hui Zhu <hui@codesourcery.com>
5643
5644 PR gdb/15186
f6150862
HZ
5645 * ax.c (ax_printf): Add fflush.
5646
614c279d
TT
56472013-04-22 Tom Tromey <tromey@redhat.com>
5648
5649 * Makefile.in (SFILES): Add filestuff.c.
5650 (OBS): Add filestuff.o.
5651 (filestuff.o): New target.
5652 * config.in, configure: Rebuild.
5653 * configure.ac: Check for fdwalk, pipe2.
5654
7d4e5717
PA
56552013-04-17 Pedro Alves <palves@redhat.com>
5656
5657 * configure.ac (USE_THREAD_DB): Delete variable.
5658 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5659 Don't AC_SUBST USE_THREAD_DB.
5660 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5661 * config.in, configure: Regenerate.
5662
d5c93e41
PA
56632013-04-16 Pedro Alves <palves@redhat.com>
5664
5665 * linux-low.h (struct lwp_info) <thread_known>: Move under
5666 the USE_THREAD_DB #ifdef.
5667
04f5fe89
PA
56682013-04-16 Pedro Alves <palves@redhat.com>
5669
5670 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5671 (linux-low.o): Delete rule.
5672 * linux-low.h: Always include "gdb_thread_db.h" instead of
5673 conditionally including thread_db.h.
5674 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5675 HAVE_THREAD_DB_H.
5676
480b27bf
JK
56772013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5678
5679 * Makefile.in (install-only): Fix make install regression.
5680
43662968
JK
56812013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5682
5683 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5684 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5685 installation.
5686 * gdbserver.1: Remove.
5687
3e74e146
PA
56882013-03-22 Pedro Alves <palves@redhat.com>
5689
5690 * linux-low.c (handle_extended_wait): Don't call
5691 linux_enable_event_reporting.
5692
a8347a2a
TT
56932013-03-15 Tony Theodore <tonyt@logyst.com>
5694
5695 PR build/9098:
5696 * Makefile.in (SHELL): Use @SHELL@.
5697
eeb56fa7
SDJ
56982013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5699
5700 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5701 compiler warning.
5702
4fa7e2ff
JB
57032013-03-13 Joel Brobecker <brobecker@adacore.com>
5704
5705 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5706 Remove extraneous NULL element.
5707
8ddb1965
YQ
57082013-03-13 Yao Qi <yao@codesourcery.com>
5709
5710 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5711 'V' block in trace frame.
5712
9accd112
MM
57132013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5714
5715 * target.h (struct target_ops): Add btrace ops.
5716 (target_supports_btrace): New macro.
5717 (target_enable_btrace): New macro.
5718 (target_disable_btrace): New macro.
5719 (target_read_btrace): New macro.
5720 * gdbthread.h (struct thread_info): Add btrace field.
5721 * server.c: Include btrace-common.h.
5722 (handle_btrace_general_set): New function.
5723 (handle_btrace_enable): New function.
5724 (handle_btrace_disable): New function.
5725 (handle_general_set): Call handle_btrace_general_set.
5726 (handle_qxfer_btrace): New function.
5727 (struct qxfer qxfer_packets[]): Add btrace entry.
5728 * inferiors.c (remove_thread): Disable btrace.
5729 * linux-low: Include linux-btrace.h.
5730 (linux_low_enable_btrace): New function.
5731 (linux_low_read_btrace): New function.
5732 (linux_target_ops): Add btrace ops.
5733 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5734 Add srv_linux_btrace=yes.
5735 (x86_64-*-linux*): Add linux-btrace.o.
5736 Add srv_linux_btrace=yes.
5737 * configure.ac: Define HAVE_LINUX_BTRACE.
5738 * config.in: Regenerated.
5739 * configure: Regenerated.
5740
5cc22e4c
MM
57412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5742
5743 * server.c (handle_qxfer): Preserve error message if -3 is
5744 returned.
5745 (qxfer): Document the -3 return value.
5746
7c97f91e
MM
57472013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5748
5749 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5750 (linux_btrace_h): New variable.
5751 (linux-btrace.o): New rule.
5752
be9a119c 57532013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5754 Hafiz Abid Qadeer <abidh@codesourcery.com>
5755
5756 * tracepoint.c (trace_buffer_size): New global.
5757 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5758 (init_trace_buffer): Change to one-argument function. Allocate
5759 trace buffer memory.
5760 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5761 handle QTBuffer:size packet.
5762 (cmd_bigqtbuffer_size): New function.
5763 (initialize_tracepoint): Call init_trace_buffer with
5764 DEFAULT_TRACE_BUFFER_SIZE.
5765 * server.c (handle_query): Add QTBuffer:size in the
5766 supported packets.
5767
e64f7499
YQ
57682013-03-07 Yao Qi <yao@codesourcery.com>
5769
5770 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5771 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5772 of -1.
5773 (cmd_qtsp): Adjust condition. Do post increment.
5774 Set cur_action and cur_step_action back to 0.
5775
f0ae6fc3
PA
57762013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5777
5778 PR server/15236
5779 * linux-low.c (linux_write_memory): Return early success if LEN is
5780 zero.
5781
b5b0b0af
CV
57822013-03-05 Corinna Vinschen <vinschen@redhat.de>
5783
334ad4a8 5784 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5785
589bc927
TT
57862013-02-28 Tom Tromey <tromey@redhat.com>
5787
5788 * configure.ac: Invoke AC_SYS_LARGEFILE.
5789 * configure, config.in: Rebuild.
5790
dfe07582
CV
57912013-02-28 Corinna Vinschen <vinschen@redhat.com>
5792
5793 * win32-low.c: Throughout, fix format strings and casts of
5794 printf-like functions to avoid type related warnings on all
5795 platforms.
5796 (get_child_debug_event): Print dwDebugEventCode as hex since
5797 that's how it's usually documented.
5798
736cd585
YQ
57992013-02-28 Yao Qi <yao@codesourcery.com>
5800
5801 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5802 pulongest.
5803
e1f58301
JW
58042013-02-27 Jiong Wang <jiwang@tilera.com>
5805
5806 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5807 (reg-tilegx32.c): New rule.
5808 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5809 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5810 different register info initializer according to elf class.
5811 (init_registers_tilgx32): New function. The tilegx32 register info
5812 initializer.
5813 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5814 (tile_store_gregset): Likewise.
5815
d171ca78
YQ
58162013-02-27 Yao Qi <yao@codesourcery.com>
5817
5818 * server.c (process_point_options): Print debug message when
5819 debug_threads is true.
5820
282bbdf3
YQ
58212013-02-26 Yao Qi <yao@codesourcery.com>
5822
5823 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5824
aca22551
PA
58252013-02-19 Pedro Alves <palves@redhat.com>
5826 Kai Tietz <ktietz@redhat.com>
5827
5828 PR gdb/15161
5829
5830 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5831 instead of strtoul to extract address from packet.
5832 (process_serial_event) <'z'>: Likewise.
5833
4f3cee1c
YQ
58342013-02-18 Yao Qi <yao@codesourcery.com>
5835
5836 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5837
8e1d55a3
PA
58382013-02-14 Pedro Alves <palves@redhat.com>
5839
5840 Plug memory leak.
5841
5842 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5843 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5844
458820da
PA
58452013-02-14 Pedro Alves <palves@redhat.com>
5846
5847 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5848
baea0dae
PA
58492013-02-14 Pedro Alves <palves@redhat.com>
5850
5851 * tracepoint.c (save_string): Delete.
5852 (add_tracepoint_action): Use savestring instead of save_string.
5853
0b1afbb3
PA
58542013-02-12 Pedro Alves <palves@redhat.com>
5855
5856 * linux-xtensa-low.c: Ditto.
5857 * xtensa-xtregs.c: Ditto.
5858
8a4ac37e
PA
58592013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5860
5861 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5862 thread_db.
5863
148de6bb
MS
58642013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5865
5866 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5867 aarch64_num_wp_regs and aarch64_num_bp_regs to
5868 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5869
55fac6e0
MS
58702013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5871
5872 * linux-aarch64-low.c (ps_get_thread_area): Replace
5873 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5874
176eb98c
MS
58752013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5876 Marcus Shawcroft <marcus.shawcroft@arm.com>
5877 Nigel Stephens <nigel.stephens@arm.com>
5878 Yufeng Zhang <yufeng.zhang@arm.com>
5879
5880 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5881 (aarch64.c, aarch64-without-fpu.c): New targets.
5882 * configure.srv (aarch64*-*-linux*): New.
5883 * linux-aarch64-low.c: New file.
5884
56f7af9c
MS
58852013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5886
43aaf8b6 5887 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5888 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5889 (dequeue_one_deferred_signal, linux_resume_one_thread)
5890 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5891 (linux_tracefork_grandchild, linux_test_for_tracefork)
5892 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5893 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5894 where the argument is 0.
5895
60f662b0
YQ
58962013-01-25 Yao Qi <yao@codesourcery.com>
5897
5898 * event-loop.c: Include "queue.h".
5899 (gdb_event_p): New typedef.
5900 (struct gdb_event) <next_event>: Remove.
5901 (event_queue): Change to QUEUE(gdb_event_p).
5902 (async_queue_event): Remove.
5903 (gdb_event_xfree): New.
5904 (initialize_event_loop): New.
5905 (process_event): Use API from QUEUE.
5906 (wait_for_event): Likewise.
5907 * server.c (main): Call initialize_event_loop.
5908 * server.h (initialize_event_loop): Declare.
5909
5ae4861a
YQ
59102013-01-18 Yao Qi <yao@codesourcery.com>
5911
5912 * ax.h (struct eval_agent_expr_context): New.
5913 (gdb_eval_agent_expr): Update declaration.
5914 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5915 TFRAME. Add new argument CTX.
5916 * server.h (struct eval_agent_expr_context): Declare.
5917 (agent_mem_read, agent_tsv_read): Update declaration.
5918 (agent_mem_read_string): Likewise.
5919 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5920 (add_traceframe_block): Add new argument TPOINT.
5921 Increase TPOINT->traceframe_usage.
5922 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5923 eval_tracepoint_agent_expr.
5924 (condition_true_at_tracepoint): Likewise.
5925 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5926 (agent_mem_read_string, agent_tsv_read): Likewise.
5927
85e00e85
YQ
59282013-01-16 Yao Qi <yao@codesourcery.com>
5929
5930 * linux-low.c (linux_resume_one_lwp): Don't check
5931 'lwp->bp_reinsert != 0'.
5932
4039cf45
JB
59332013-01-07 Joel Brobecker <brobecker@adacore.com>
5934 Pedro Alves <palves@redhat.com>
5935
5936 * lynx-low.c (ptrace_request_to_str): Define a temporary
5937 macro and use it to simplify this function's implementation.
5938
9044dee2
JB
59392013-01-07 Joel Brobecker <brobecker@adacore.com>
5940
5941 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5942 sets errno.
5943
e6352c8f
JB
59442013-01-07 Joel Brobecker <brobecker@adacore.com>
5945
5946 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5947
50681a27
JB
59482013-01-07 Joel Brobecker <brobecker@adacore.com>
5949
5950 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5951
3f6e77ef
JB
59522013-01-07 Joel Brobecker <brobecker@adacore.com>
5953
5954 * lynx-low.c (lynx_resume): Use the resume_info parameter
5955 to determine the ptid for the lynx_ptrace call, unless
5956 it is equal to minus_one_ptid, in which case we use the
5957 ptid of the current_inferior.
5958 (lynx_wait_1): After having received a thread create/exit
5959 event, resume the inferior's execution using the signaling
5960 thread's ptid, rather than the old ptid.
5961
7fda33ae
JB
59622013-01-07 Joel Brobecker <brobecker@adacore.com>
5963
5964 * lynx-low.c (lynx_resume): Delete variable ret.
5965
b9786c74
JB
59662013-01-01 Joel Brobecker <brobecker@adacore.com>
5967
5968 * gdbreplay.c (gdbreplay_version): Update copyright year.
5969 * server.c (gdbserver_version): Likewise.
5970
8b93d60f
JB
59712012-12-17 Joel Brobecker <brobecker@adacore.com>
5972
5973 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5974 new thread.
5975
037335a7
JB
59762012-12-17 Joel Brobecker <brobecker@adacore.com>
5977
5978 * lynx-low.c (ptrace_request_to_str): Add handling for
5979 PTRACE_GETTRACESIG.
5980
52d4cbd8
JB
59812012-12-17 Joel Brobecker <brobecker@adacore.com>
5982
5983 * lynx-low.c (lynx_attach): Delete variable new_process.
5984
ab8f6ca9
JB
59852012-12-17 Joel Brobecker <brobecker@adacore.com>
5986
5987 * lynx-low.c (lynx_create_inferior): Delete variable
5988 new_process.
5989
78cbc024
JB
59902012-12-17 Joel Brobecker <brobecker@adacore.com>
5991
5992 * lynx-low.c (ptrace_request_to_str): Do not handle
5993 PTRACE_GETTHREADLIST if this macro does not exist.
5994
14a00470
YQ
59952012-12-15 Yao Qi <yao@codesourcery.com>
5996
5997 * Makefile.in (OBS): Add notif.o.
5998 * notif.c, notif.h: New.
5999 * server.c: Include "notif.h".
6000 (struct vstop_notif) <next>: Remove.
6001 <base>: New field.
6002 (queue_stop_reply): Update.
6003 (push_event, send_next_stop_reply): Remove.
6004 (discard_queued_stop_replies): Update.
6005 (notif_stop): New variable.
6006 (handle_v_stopped): Remove.
6007 (handle_v_requests): Don't call handle_v_stopped. Call
6008 handle_ack_notif instead.
6009 (queue_stop_reply_callback): Call notif_event_enque instead
6010 of queue_stop_reply.
6011 (handle_status): Don't call send_next_stop_reply, call
6012 notif_write_event instead.
6013 (kill_inferior_callback): Likewise.
6014 (detach_or_kill_inferior_callback): Likewise.
6015 (main): Call initialize_notif.
6016 (process_serial_event): Call QUEUE_is_empty.
6017 (handle_target_event): Call notif_push instead of push event.
6018 * server.h (push_event): Remove declaration.
6019
61c125b9
TT
60202012-12-10 Tom Tromey <tromey@redhat.com>
6021
6022 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6023 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6024 macros.
6025 (.c.o): Rewrite.
6026 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6027 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6028 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6029 (amd64-linux-ipa.o, ax.o): Rewrite.
6030 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6031 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6032 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6033 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6034 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6035 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6036 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6037 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6038 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6039 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6040 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6041 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6042 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6043 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6044 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6045 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6046 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6047 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6048 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6049 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6050 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6051 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6052 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6053 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6054 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6055 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6056 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6057 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6058 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6059 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6060 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6061 (reg-tilegx.o): Remove.
6062 (all_object_files): New macro.
6063 Include .deps files.
6064 * aclocal.m4, configure: Rebuild.
6065 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6066 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6067 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6068
e90e9ad9
TT
60692012-12-05 Tom Tromey <tromey@redhat.com>
6070
6071 PR gdb/14917:
6072 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6073
02d403bf 60742012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6075
6076 * configure.ac: Check for linux/perf_event.h.
6077 * config.in: Regenerated.
6078 * configure: Regenerated.
6079
0270a750
PA
60802012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6081
6082 * hostio.c (handle_readlink): Decrease buffer size
6083 parameter passed to readlink by one byte.
6084
8c29b58e
YQ
60852012-11-26 Yao Qi <yao@codesourcery.com>
6086
6087 * configure.ac (build_warnings): Append '-Wempty-body'.
6088 * configure: Regenerated.
6089 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6090 body.
6091
8bdce1ff
PM
60922012-11-15 Pierre Muller <muller@sourceware.org>
6093
6094 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6095 * config.in: Regenerate.
6096 * configure: Regenerate.
6097 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6098 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6099 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6100 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6101 header.
6102 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6103 instead of <sys/wait.h> header.
6104 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6105
02d403bf 61062012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6107
6108 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6109 (various make rules): Remove -DGDBSERVER
6110
fbd5db48
YQ
61112012-11-09 Yao Qi <yao@codesourcery.com>
6112
6113 * spu-low.c (current_ptid): Move it to ..
6114 * gdbthread.h: ... here. New.
6115 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6116 * server.c (myresume, process_serial_event): Likewise.
6117 * thread-db.c (thread_db_find_new_threads): Likewise.
6118 * tracepoint.c (run_inferior_command): Likewise.
6119
b3dc46ff
AB
61202012-10-01 Andrew Burgess <aburgess@broadcom.com>
6121
6122 * server.c (handle_search_memory_1): Include access length in
6123 warning message.
6124
07c04788
HPN
61252012-09-05 Michael Brandt <michael.brandt@axis.com>
6126
6127 * linux-crisv32-low.c: Fix compile errors.
6128
918d227b
YQ
61292012-09-04 Yao Qi <yao@codesourcery.com>
6130
6131 * tracepoint.c (cmd_qtsv): Adjust debug message.
6132 Don't check CUR_TPOINT.
6133
18c1b81a
YQ
61342012-08-28 Yao Qi <yao@codesourcery.com>
6135
6136 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6137 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6138 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6139 Remove declarations of xmalloc, xreallloc, xstrdup and
6140 freeargv.
6141 * Makefile.in (libiberty_h): New.
6142 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6143 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6144
dc82f37b
YQ
61452012-08-23 Yao Qi <yao@codesourcery.com>
6146
6147 * server.h: Remove declaration of 'xsnprintf'.
6148
406b1477
KS
61492012-08-22 Keith Seitz <keiths@redhat.com>
6150
6151 * server.h: Include build-gnulib-gbserver/config.h.
6152 * gdbreplay.c: Likewise.
6153
e6712ff1
DE
61542012-08-08 Doug Evans <dje@google.com>
6155
6156 * Makefile.in (SFILES): Add gdb_vecs.c.
6157 (OBS): Add gdb_vecs.o.
6158 (gdb_vecs_h, host_defs_h): New variables.
6159 (thread-db.o): Add $(gdb_vecs_h) dependency.
6160 (gdb_vecs.o): New rule.
6161 * thread-db.c: #include "gdb_vecs.h".
6162 (thread_db_load_search): Use a vector to iterate over path elements.
6163 Handle text appearing after "$pdir".
6164
6165 * configure.ac: Add check for strstr.
6166 * config.in: Regenerate.
6167 * configure: Regenerate.
6168
7c3270ae
UW
61692012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6170
6171 * hostio.c (handle_pread): If pread fails, fall back to attempting
6172 lseek/read.
6173 (handle_pwrite): Likewise for pwrite.
6174
b62e2b27
UW
61752012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6176
6177 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6178 between unsupported TYPE and unimplementable ADDR/LEN combination.
6179 (arm_insert_point): Act on new return value.
6180
78a99e91
PA
61812012-07-31 Pedro Alves <palves@redhat.com>
6182
6183 * server.c (process_point_options): Only skip tokens if we find
6184 one that is unrecognized. Don't treat 'X' specially while
6185 skipping unrecognized tokens.
6186
fcf303ab
UW
61872012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6188
6189 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6190 to 4-byte-align HW breakpoint addresses for Thumb.
6191
7255706c
YQ
61922012-07-27 Yao Qi <yao@codesourcery.com>
6193
6194 PR remote/14161.
6195
6196 * server.h: Declare gdb_agent_about_to_close.
6197 * target.c (kill_inferior): Include "agent.h".
6198 New. Send command 'kill'.
6199 * target.h (kill_inferior): Removed macro.
6200 * tracepoint.c (gdb_agent_about_to_close): New.
6201 (gdb_agent_helper_thread): Handle command 'close'.
6202 Wait endlessly until the inferior stops.
6203 Install gdb_agent_remove_socket to atexit hook.
6204 (agent_socket_name): New static variable.
6205 (gdb_agent_socket_init): Replace local variable 'name' with
6206 'agent_socket_name'.
6207 (gdb_agent_remove_socket): New.
6208
5a3f286f
YQ
62092012-07-27 Yao Qi <yao@codesourcery.com>
6210
6211 * server.c (process_point_options): Stop at 'X' when parsing.
6212
961bd387
ME
62132012-07-19 Michael Eager <eager@eagercon.com>
6214
a261b8f5 6215 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6216 to hw_execute.
6217 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6218 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6219 hardware breakpoint.
6220
aa7c7447
JK
62212012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6222
6223 * gdbserver/linux-low.c (initialize_low): Call
6224 linux_ptrace_init_warnings.
6225
7f216e7c
DE
62262012-07-02 Doug Evans <dje@google.com>
6227
6228 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6229 pointer to int.
6230
d3ce09f5
SS
62312012-07-02 Stan Shebs <stan@codesourcery.com>
6232
6233 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6234 (ax.o): Add it to build rule.
6235 (ax-ipa.o): Ditto.
6236 (OBS): Add format.o.
6237 (IPA_OBS): Add format.o.
6238 * server.c (handle_query): Claim support for breakpoint commands.
6239 (process_point_options): Add command case.
6240 (process_serial_event): Leave running if there are printfs in
6241 effect.
6242 * mem-break.h (any_persistent_commands): Declare.
6243 (add_breakpoint_commands): Declare.
6244 (gdb_no_commands_at_breakpoint): Declare.
6245 (run_breakpoint_commands): Declare.
6246 * mem-break.c (struct point_command_list): New struct.
6247 (struct breakpoint): New field command_list.
6248 (any_persistent_commands): New function.
6249 (add_commands_to_breakpoint): New function.
6250 (add_breakpoint_commands): New function.
6251 (gdb_no_commands_at_breakpoint): New function.
6252 (run_breakpoint_commands): New function.
6253 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6254 locally.
6255 * ax.c: Include format.h.
6256 (ax_printf): New function.
6257 (gdb_eval_agent_expr): Add printf opcode.
6258
2f8f6aed
YQ
62592012-06-13 Yao Qi <yao@codesourcery.com>
6260
6261 * server.c (start_inferior): Remove duplicated writes to fields
6262 'last_resume_kind' and 'last_status' of 'current_inferior'.
6263
0c9070b3
YQ
62642012-06-12 Yao Qi <yao@codesourcery.com>
6265 Pedro Alves <palves@redhat.com>
6266
6267 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6268 comment.
6269 * server.c (handle_v_cont): Extend comment.
6270
c52daf70
YQ
62712012-06-11 Yao Qi <yao@codesourcery.com>
6272
6273 * linux-low.c (linux_attach): Add 'static'.
6274
d38bbb0a
YQ
62752012-06-06 Yao Qi <yao@codesourcery.com>
6276
6277 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6278
89dc0afd
JK
62792012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6280
6281 Fix gcc -flto compilation warning.
6282 * server.c (main): Make variable multi_mode and attach volatile.
6283
75f62ce7
TJB
62842012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6285
6286 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6287 if the platform doesn't know about it.
6288
65f479b6
PA
62892012-05-30 Jeff Kenton <jkenton@tilera.com>
6290
6291 * Makefile.in (SFILES): Add linux-tile-low.c.
6292 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6293 * configure.srv: Handle tilegx-*-linux*.
6294 * linux-tile-low.c: New file.
6295
0c5bf5a9
JK
62962012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6297
6298 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6299
a493e3e2
PA
63002012-05-24 Pedro Alves <palves@redhat.com>
6301
6302 PR gdb/7205
6303
43aaf8b6 6304 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6305
2ea28649
PA
63062012-05-24 Pedro Alves <palves@redhat.com>
6307
6308 PR gdb/7205
6309
6310 Replace target_signal with gdb_signal throughout.
6311
8d409d16
MR
63122012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6313
6314 * linux-low.c (linux_store_registers): Avoid the copying sequence
6315 when no data has been retrieved by ptrace.
6316
23512c01
MGD
63172012-05-22 Will Deacon <will.deacon@arm.com>
6318
6319 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6320 Include asm/ptrace.h.
6321 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6322 already defined.
6323
4934b29e
MR
63242012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6325
6326 * linux-low.c (linux_store_registers): Don't re-retrieve data
6327 with ptrace that has already been obtained from /proc. Always
6328 copy any data retrieved with ptrace to the buffer supplied.
6329
bde24c0a
PA
63302012-05-11 Yao Qi <yao@codesourcery.com>
6331 Pedro Alves <palves@redhat.com>
6332
6333 * linux-low.c (enum stopping_threads_kind): New.
6334 (stopping_threads): Change type to `enum stopping_threads_kind'.
6335 (handle_extended_wait): If stopping and suspending threads, leave
6336 the new_lwp suspended too.
6337 (linux_wait_for_event): Adjust.
6338 (stop_all_lwps): Set `stopping_threads' to
6339 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6340 whether we're suspending threads or just stopping them. Assert no
6341 recursion happens.
6342
623b6bdf
YQ
63432012-04-29 Yao Qi <yao@codesourcery.com>
6344
6345 * server.h: Move some code to ...
6346 * gdbthread.h: ... here. New.
6347 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6348 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6349 (nto-low.o, win32-low.o): Likewise.
6350 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6351 * regcache.c, remote-utils.c, server.c: Likewise.
6352 * target.c, tracepoint.c, win32-low.c: Likewise.
6353
f15f9948
TJB
63542012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6355
6356 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6357 (PTRACE_ARG4_TYPE): Likewise.
6358 (PTRACE_XFER_TYPE): Likewise.
6359 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6360 ptrace to PTRACE_ARG3_TYPE.
6361 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6362 (PTRACE_ARG4_TYPE): Likewise.
6363 (PTRACE_XFER_TYPE): Likewise.
6364 (linux_detach_one_lwp): Cast fourth argument of
6365 ptrace to long then PTRACE_ARG4_TYPE.
6366 (regsets_fetch_inferior_registers): Cast third argument of
6367 ptrace to long then PTRACE_ARG3_TYPE.
6368 (regsets_store_inferior_registers): Likewise.
6369
38ea300a
PA
63702012-04-20 Pedro Alves <palves@redhat.com>
6371
6372 * configure: Regenerate.
6373
c971b7fa
PA
63742012-04-19 Pedro Alves <palves@redhat.com>
6375
43aaf8b6 6376 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6377 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6378 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6379 (all, install-only, uninstall, clean-info, all-lib, clean): No
6380 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6381 (maintainer-clean realclean distclean): Use subdir_do.
6382 (subdir_do): New.
6383 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6384 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6385 * acinclude.m4: Include acx_configure_dir.m4.
6386 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6387 calls. Call AC_PROG_RANLIB. Configure gnulib using
6388 ACX_CONFIGURE_DIR.
6389 (GNULIB): New.
6390 (GNULIB_STDINT_H): Adjust.
6391 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6392 * gdbreplay.c: Include build-gnulib/config.h.
6393 * server.h: Likewise.
6394 * aclocal.m4: Regenerate.
6395 * config.in: Regenerate.
6396 * configure: Regenerate.
c971b7fa 6397
809277f8
PA
63982012-04-19 Pedro Alves <palves@redhat.com>
6399
6400 * Makefile.in (LIBGNU, INCGNU): Adjust.
6401 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6402 (all, install-only, uninstall, clean-info, all-lib, clean)
6403 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6404 * configure.ac: Adjust AC_OUTPUT output.
6405 * aclocal.m4: Regenerate.
6406 * configure: Regenerate.
6407
fd9bb8b8
PA
64082012-04-19 Pedro Alves <palves@redhat.com>
6409
6410 * Makefile.in (generated_files): New.
6411 (server_h): Remove the explicit dependency on config.h, and depend
6412 on $generated_files.
6413
1c298c66
PA
64142012-04-19 Pedro Alves <palves@redhat.com>
6415
6416 * Makefile.in (INCGNU): Add -Ignulib.
6417
57c4b50b
PA
64182012-04-19 Pedro Alves <palves@redhat.com>
6419
6420 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6421 (INCGNU): ... this, and spell out -I here.
6422 (GNULIB_LIB): Rename to ...
6423 (LIBGNU): ... this.
6424 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6425
1030e047
PA
64262012-04-19 Pedro Alves <palves@redhat.com>
6427
6428 * config.in: Regenerate.
6429
447d4319
PA
64302012-04-19 Pedro Alves <palves@redhat.com>
6431
6432 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6433 * server.h (memmem): Remove declaration.
6434 * config.in: Regenerate.
6435 * configure: Regenerate.
6436
aad9eab9
YQ
64372012-04-19 Yao Qi <yao@codesourcery.com>
6438
6439 * Makefile.in (SFILES): Add common/vec.c.
6440 (OBS): Add vec.o.
6441 (vec.o): New rule.
6442
3e10640f
YQ
64432012-04-19 Yao Qi <yao@codesourcery.com>
6444
6445 * remote-utils.c (prepare_resume_reply): Replace with macro
6446 target_core_of_thread.
6447 * server.c (handle_qxfer_threads_proper): Likewise.
6448 * target.h (traget_core_of_thread): New macro.
6449
71622373
PA
64502012-04-18 Pedro Alves <palves@redhat.com>
6451
6452 * aclocal.m4: Regenerate.
6453 * configure: Regenerate.
6454
80d26939
YQ
64552012-04-16 Yao Qi <yao@codesourcery.com>
6456
6457 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6458 duplicated on address.
6459
42476b70
YQ
64602012-04-16 Yao Qi <yao@codesourcery.com>
6461
6462 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6463 (struct tracepoint_action_ops) <send>: New field.
6464 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6465 (agent_expr_send, x_tracepoint_action_send): New.
6466 (l_tracepoint_action_send): New.
6467 (cmd_qtdp): Download and install tracepoint
6468 according to `use_agent'.
6469 (run_inferior_command): Add one more parameter `len'.
6470 Update callers.
6471 (tracepoint_send_agent): New.
6472 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6473
7bc83639
YQ
64742012-04-16 Yao Qi <yao@codesourcery.com>
6475
6476 * tracepoint.c (download_tracepoints): Moved to ...
6477 (cmd_qtstart): ... here.
6478
5f18041e
YQ
64792012-04-14 Yao Qi <yao@codesourcery.com>
6480
6481 * tracepoint.c: Include inttypes.h.
6482 (struct collect_memory_action): Use sized types.
6483 (struct tracepoint): Likewise.
6484 (cmd_qtdp, stop_tracing): Update print specifiers.
6485 (cmd_qtp, response_tracepoint): Likewise.
6486 (collect_data_at_tracepoint): Likewise.
6487 (collect_data_at_step): Likewise.
6488
55a8c076
YQ
64892012-04-14 Yao Qi <yao@codesourcery.com>
6490
6491 Import gnulib module inttypes.
6492 * aclocal.m4, config.in, configure: Regenerated.
6493
dc750257
YQ
64942012-04-14 Yao Qi <yao@codesourcery.com>
6495
6496 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6497 Makefile and config.status at last.
6498
0ab5faf9
YQ
64992012-04-13 Yao Qi <yao@codesourcery.com>
6500
6501 * tracepoint.c: Include stdint.h unconditionally.
6502
18f5fd81
TJB
65032012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6504
6505 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6506 on BFD_HAVE_SYS_PROCFS_TYPE.
6507 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6508 * configure: Regenerate.
6509 * config.in: Likewise.
6510
4d47af5c
L
65112012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6512
6513 * Makefile.in (clean): Also remove x32.c x32-linux.c
6514 x32-avx.c x32-avx-linux.c.
6515 (x32.o): New target.
6516 (x32.c): Likewise.
6517 (x32-linux.o): Likewise.
6518 (x32-linux.c): Likewise.
6519 (x32-avx.o): Likewise.
6520 (x32-avx.c): Likewise.
6521 (x32-avx-linux.o): Likewise.
6522 (x32-avx-linux.c): Likewise.
6523
6524 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6525 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6526 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6527 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6528 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6529 i386/x32-avx-linux.xml.
6530
6531 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6532 (init_registers_x32_avx_linux): Likwise.
6533 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6534 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6535
ecedbe58
PA
65362012-04-13 Pedro Alves <palves@redhat.com>
6537
6538 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6539 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6540 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6541 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6542 the sub-make.
6543
c92b5177
L
65442012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6545
6546 * linux-x86-low.c (compat_x32_clock_t): New.
6547 (compat_x32_siginfo_t): Likewise.
6548 (compat_x32_siginfo_from_siginfo): Likewise.
6549 (siginfo_from_compat_x32_siginfo): Likewise.
6550 (linux_is_elf64): Likewise.
6551 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6552 and siginfo_from_compat_x32_siginfo for x32.
6553 (x86_arch_setup): Set linux_is_elf64.
6554
214d508e
L
65552012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6556
6557 PR gdb/13969
6558 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6559 e_machine field.
6560 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6561 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6562 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6563 compatible with process.
6564
c9a1864a
YQ
65652012-04-12 Yao Qi <yao@codesourcery.com>
6566
6567 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6568 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6569 (install-only, install-info, clean): Handle sub dir gnulib.
6570 (all-lib, am--refresh): New targets.
6571 (memmem.o): Remove target.
6572 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6573 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6574 (AC_REPLACE_FUNCS): Remove memmem.
6575 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6576 (AC_OUTPUT): Generate Makefile in gnulib/.
6577 * aclocal.m4, config.in, configure: Regenerated.
6578
367ba2c2
MR
65792012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6580
6581 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6582
9d236627
PA
65832012-04-05 Pedro Alves <palves@redhat.com>
6584
6585 -Werror=strict-aliasing
6586
6587 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6588 pointer.
6589
111217b3
PA
65902012-04-04 Pedro Alves <palves@redhat.com>
6591
6592 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6593 (sparc_store_gregset_from_stack, sparc_store_gregset)
6594 (sparc_breakpoint_at): Fix formatting.
6595
8365dcf5
TJB
65962012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6597
6598 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6599 are available.
6600 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6601 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6602 * config.in: Regenerate.
6603 * configure: Likewise.
6604
689cc2ae
PA
66052012-03-29 Pedro Alves <palves@redhat.com>
6606
6607 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6608 Correct ptrace arguments.
6609
c14dfd32
PA
66102012-03-28 Pedro Alves <palves@redhat.com>
6611
6612 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6613 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6614 (IA64_FR1_REGNUM): New defines.
6615 (ia64_fetch_register): New.
6616 (the_low_target): Install it.
6617 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6618 field.
6619 * linux-low.c (linux_fetch_registers): Try the
6620 the_low_target.fetch_register hook first.
6621
6622 * linux-arm-low.c (the_low_target): Adjust.
6623 * linux-bfin-low.c (the_low_target): Adjust.
6624 * linux-cris-low.c (the_low_target): Adjust.
6625 * linux-crisv32-low.c (the_low_target): Adjust.
6626 * linux-m32r-low.c (the_low_target): Adjust.
6627 * linux-m68k-low.c (the_low_target): Adjust.
6628 * linux-mips-low.c (the_low_target): Adjust.
6629 * linux-ppc-low.c (the_low_target): Adjust.
6630 * linux-s390-low.c (the_low_target): Adjust.
6631 * linux-sh-low.c (the_low_target): Adjust.
6632 * linux-sparc-low.c (the_low_target): Adjust.
6633 * linux-tic6x-low.c (the_low_target): Adjust.
6634 * linux-x86-low.c (the_low_target): Adjust.
6635 * linux-xtensa-low.c (the_low_target): Adjust.
6636
63c88e13
PA
66372012-03-26 Pedro Alves <palves@redhat.com>
6638
6639 * server.c (handle_qxfer_libraries): Don't bail early if
6640 the_target->qxfer_libraries_svr4 is not NULL.
6641
fb723180
PA
66422012-03-26 Pedro Alves <palves@redhat.com>
6643
6644 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6645
0afae3cf
PA
66462012-03-23 Pedro Alves <palves@redhat.com>
6647
6648 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6649 "library-list-svr4" element's start tag when the the DSO list is
6650 empty.
6651
485f1ee4
PA
66522012-03-23 Pedro Alves <palves@redhat.com>
6653
6654 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6655 a variable whose type size is the same as the inferior's pointer
6656 size.
6657
a5362b9a
TS
66582012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6659
6660 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6661 struct siginfo.
6662 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6663 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6664 * linux-low.h: Include <signal.h>.
6665 (struct siginfo): Remove forward declaration.
6666 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6667 struct siginfo.
6668
d226c142
MF
66692012-03-21 Mike Frysinger <vapier@gentoo.org>
6670
6671 * .gitignore: Ignore more files.
6672
122f36ef
PA
66732012-03-19 Pedro Alves <palves@redhat.com>
6674 Jan Kratochvil <jan.kratochvil@redhat.com>
6675
6676 * server.c (cont_thread, general_thread): Add describing comments.
6677 (start_inferior): Clear `cont_thread'.
6678 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6679 of a process.
6680
fc3e5175
YQ
66812012-03-15 Yao Qi <yao@codesourcery.com>
6682
6683 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6684 handling to ...
6685 (cmd_qtdp): ... here.
6686
8d0d92cd
YQ
66872012-03-15 Yao Qi <yao@codesourcery.com>
6688
6689 * tracepoint.c (struct tracepoint_action_ops): New.
6690 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6691 (m_tracepoint_action_download): New.
6692 (r_tracepoint_action_download): New.
6693 (x_tracepoint_action_download): New.
6694 (l_tracepoint_action_download): New.
6695 (add_tracepoint_action): Install `action->ops' according type.
6696 (download_tracepoint_1): Move code `download' function pointer
6697 of various tracepoint_action_ops.
6698
87b0bb13
JK
66992012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6700
6701 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6702 linux_ptrace_attach_warnings.
6703
5f572dec
JK
67042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6705
6706 * Makefile.in (linux-ptrace.o): New.
6707 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6708 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6709 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6710 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6711 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6712 of these targets.
6713 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6714
f4647387
YQ
67152012-03-08 Yao Qi <yao@codesourcery.com>
6716 Pedro Alves <palves@redhat.com>
6717
6718 Fix PR server/13392.
6719 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6720 offset of JMP insn.
6721 * tracepoint.c (remove_tracepoint): New.
6722 (cmd_qtdp): Call remove_tracepoint when failed to install.
6723
9b224c5e
PA
67242012-03-07 Pedro Alves <palves@redhat.com>
6725
6726 * linux-low.c (get_detach_signal): New.
6727 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6728 Pass on pending signals to PTRACE_DETACH. Check the result of the
6729 ptrace call.
6730 * server.c (program_signals, program_signals_p): New.
6731 (handle_general_set): Handle QProgramSignals.
6732 * server.h (program_signals, program_signals_p): Declare.
6733
e237a7e2
JK
67342012-03-05 Pedro Alves <palves@redhat.com>
6735 Jan Kratochvil <jan.kratochvil@redhat.com>
6736
6737 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6738 New comment why.
6739
5808517f
YQ
67402012-03-03 Yao Qi <yao@codesourcery.com>
6741
6742 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6743 agent_look_up_symbols.
6744
58b4daa5
YQ
67452012-03-03 Yao Qi <yao@codesourcery.com>
6746
6747 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6748 (linux-x86-low.o): Likewise.
6749 * server.h: Remove in_process_agent_loaded.
6750 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6751 common/agent.c.
6752 Update callers.
6753
8ffcbaaf
YQ
67542012-03-03 Yao Qi <yao@codesourcery.com>
6755
6756 * tracepoint.c (gdb_agent_capability): New global.
6757 (in_process_agent_loaded_ust): Renamed to
6758 `in_process_agent_supports_ust'.
6759 Update callers.
6760 (in_process_agent_supports_ust): Call agent_capability_check.
6761 (clear_installed_tracepoints): Assert that agent supports
6762 agent.
6763
d1feda86
YQ
67642012-03-03 Yao Qi <yao@codesourcery.com>
6765
6766 * linux-low.c (linux_supports_agent): New.
6767 (linux_target_ops): Initialize field `supports_agent' with
6768 linux_supports_agent.
6769 * target.h (struct target_ops) <supports_agent>: New.
6770 (target_supports_agent): New macro.
6771 * server.c (handle_general_set): Handle packet 'QAgent'.
6772 (handle_query): Send `QAgent+'.
6773 * Makefile.in (server.o): Depends on agent.h.
6774
2fa291ac
YQ
67752012-03-03 Yao Qi <yao@codesourcery.com>
6776
6777 * Makefile.in (OBS): Add agent.o.
6778 Add new rule for agent.o.
6779 Track dependence of tracepoint.c on agent.h.
6780 * tracepoint.c (run_inferior_command_1):
6781 (run_inferior_command): Call agent_run_command.
6782 (gdb_ust_connect_sync_socket): Deleted. Move it to
6783 common/agent.c.
6784 (resume_thread, stop_thread): Likewise.
6785 (gdb_ust_socket_init): Renamed to ...
6786 (gdb_agent_socket_init): ... New.
6787 (gdb_ust_thread): Renamed to ...
6788 (gdb_agent_helper_thread): ... New.
6789 (gdb_ust_init): Move some code to ...
6790 (gdb_agent_init): ... here. New.
6791 [HAVE_UST]: Call gdb_ust_init.
6792 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6793 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6794 * config.in, configure: Regenerated.
6795
05044653
PA
67962012-03-02 Pedro Alves <palves@redhat.com>
6797
6798 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6799 * linux-low.c (struct simple_pid_list): New.
6800 (stopped_pids): New a struct simple_pid_list pointer.
6801 (add_to_pid_list, pull_pid_from_list): New.
6802 (handle_extended_wait): Don't assume the first signal new children
6803 report is SIGSTOP. Adjust call to pull_pid_from_list.
6804 (linux_wait_for_lwp): Adjust.
6805
8d00225b
YQ
68062012-03-02 Yao Qi <yao@codesourcery.com>
6807
6808 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6809 debug log.
6810
19560ba5
YQ
68112012-03-02 Yao Qi <yao@codesourcery.com>
6812
6813 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6814 `stop_pc' and `tpoint'. Update caller.
6815
1faeff08
MR
68162012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6817
6818 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6819 * linux-low.c (use_linux_regsets): New macro.
6820 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6821 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6822 (linux_register_in_regsets): New function.
6823 (usr_fetch_inferior_registers): Skip registers covered by
6824 regsets.
6825 (usr_store_inferior_registers): Likewise.
6826 (usr_fetch_inferior_registers): New macro.
6827 (usr_store_inferior_registers): Likewise.
6828 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6829 (linux_store_registers): Likewise.
6830 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6831 prototype.
6832 (init_registers_mips64_dsp_linux): Likewise.
6833 (init_registers_mips_linux): New macro.
6834 (init_registers_mips_dsp_linux): Likewise.
6835 (mips_dsp_num_regs): Likewise.
6836 (DSP_BASE, DSP_CONTROL): New fallback macros.
6837 (mips_base_regs): New macro.
6838 (mips_regmap): Use it. Fix the size.
6839 (mips_dsp_regmap): New variable.
6840 (mips_dsp_regset_bitmap): Likewise.
6841 (mips_arch_setup): New function.
6842 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6843 than mips_regmap.
6844 (mips_cannot_store_register): Likewise.
6845 (the_low_target): Update .arch_setup, .num_regs and .regmap
6846 initializers. Add .regset_bitmap initializer.
6847 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6848 initializer.
6849 * linux-bfin-low.c (the_low_target): Likewise.
6850 * linux-cris-low.c (the_low_target): Likewise.
6851 * linux-crisv32-low.c (the_low_target): Likewise.
6852 * linux-ia64-low.c (the_low_target): Likewise.
6853 * linux-m32r-low.c (the_low_target): Likewise.
6854 * linux-m68k-low.c (the_low_target): Likewise.
6855 * linux-ppc-low.c (the_low_target): Likewise.
6856 * linux-s390-low.c (the_low_target): Likewise.
6857 * linux-sh-low.c (the_low_target): Likewise.
6858 * linux-sparc-low.c (the_low_target): Likewise.
6859 * linux-tic6x-low.c (the_low_target): Likewise.
6860 * linux-x86-low.c (the_low_target): Likewise.
6861 * linux-xtensa-low.c (the_low_target): Likewise.
6862 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6863 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6864 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6865 srv_xmlfiles.
6866 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6867 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6868
c03e6ccc
YQ
68692012-02-29 Yao Qi <yao@codesourcery.com>
6870 Pedro Alves <palves@redhat.com>
6871
6872 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6873 `step_over_finished' is true.
6874
644cebc9
PA
68752012-02-27 Pedro Alves <palves@redhat.com>
6876
6877 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6878 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6879
c14d7ab2
PA
68802012-02-27 Pedro Alves <palves@redhat.com>
6881
6882 PR server/9684
6883 * linux-low.c (pid_is_stopped): New.
6884 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6885
412c89dd
LM
68862012-02-25 Luis Machado <lgustavo@codesourcery.com>
6887
6888 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6889 of conditions.
6890
b745defe
MR
68912012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6892
6893 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6894
9f3a5c85
LM
68952012-02-24 Luis Machado <lgustavo@codesourcery>
6896
6897 * server.c (handle_query): Advertise support for target-side
6898 breakpoint condition evaluation.
6899 (process_point_options): New function.
6900 (process_serial_event): When inserting a breakpoint, check for
6901 a target-side condition that should be evaluated.
6902
6903 * mem-break.c: Include regcache.h and ax.h.
6904 (point_cond_list_t): New data structure.
6905 (breakpoint) <cond_list>: New field.
6906 (find_gdb_breakpoint_at): Make non-static.
6907 (delete_gdb_breakpoint_at): Clear any target-side
6908 conditions.
6909 (clear_gdb_breakpoint_conditions): New function.
6910 (add_condition_to_breakpoint): Likewise.
6911 (add_breakpoint_condition): Likewise.
6912 (gdb_condition_true_at_breakpoint): Likewise.
6913 (gdb_breakpoint_here): Return result directly instead
6914 of going through a local variable.
6915
6916 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6917 (clear_gdb_breakpoint_conditions): Likewise.
6918 (add_breakpoint_condition): Likewise.
6919 (gdb_condition_true_at_breakpoint): Likewise.
6920
6921 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6922 (need_step_over_p): Take target-side breakpoint condition into
6923 consideration.
6924
5e1dc496
LM
69252012-02-24 Luis Machado <lgustavo@codesourcery>
6926
6927 * server.h: Include tracepoint.h.
6928 (agent_mem_read, agent_get_trace_state_variable_value,
6929 agent_set_trace_state_variable_value,
6930 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6931 get_set_tsv_func_addr): New prototypes.
6932
6933 * ax.h: New include file.
6934 * ax.c: New source file.
6935
6936 * tracepoint.c: Include ax.h.
6937 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6938 agent_expr, eval_result_type): Move to ax.h.
6939 (parse_agent_expr): Rename to ...
6940 (gdb_parse_agent_expr): ... this, make it non-static and move
6941 to ax.h.
6942 (unparse_agent_expr) Rename to ...
6943 (gdb_unparse_agent_expr): ... this, make it non-static and move
6944 to ax.h.
6945 (eval_agent_expr): Rename to ...
6946 (eval_tracepoint_agent_expr): ... this.
6947 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6948 forward declarations.
6949 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6950 (agent_get_trace_state_variable_value): New function.
6951 (agent_set_trace_state_variable_value): New function.
6952 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6953 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6954 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6955 (condition_true_at_tracepoint): Likewise.
6956 (parse_agent_expr): Rename to ...
6957 (gdb_parse_agent_expr): ... this and move to ax.c.
6958 (unparse_agent_expr): Rename to ...
6959 (gdb_unparse_agent_expr): ... this and move to ax.c.
6960 (gdb_agent_op_name): Move to ax.c.
6961 (eval_agent_expr): Rename to ...
6962 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6963 and move to ax.c.
6964 (eval_tracepoint_agent_expr): New function.
6965 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6966 non-static.
5e1dc496
LM
6967 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6968 ax.c.
6969 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6970 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6971 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6972 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6973 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6974 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6975 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6976 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6977 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6978 (compile_bytecodes): Remove forward declaration.
6979 (is_goto_target): Move to ax.c.
6980 (compile_bytecodes): Move to ax.c and call
6981 agent_get_trace_state_variable_value (...) and
6982 agent_set_trace_state_variable_value (...).
6983
6984 * Makefile.in: Update ax.c and IPA dependencies.
6985
277e4e52
PA
69862012-02-24 Pedro Alves <palves@redhat.com>
6987
6988 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6989 (cmd_bigqtbuffer_circular): ... this. Only handle
6990 'QTBuffer:circular:'.
6991 (handle_tracepoint_general_set): Adjust.
6992
bf4c19f7
YQ
69932012-02-16 Yao Qi <yao@codesourcery.com>
6994
6995 * inferiors.c: Move code to ...
6996 * dll.c: .... here. New.
6997 * server.h: Declare clear_dlls.
6998 * Makefile.in (SFILES): Add dll.c.
6999 (OBS): Add dll.o
7000 (dll.o): New rule.
7001
d73f2619
YQ
70022012-02-11 Yao Qi <yao@codesourcery.com>
7003
7004 * server.c: (handle_monitor_command): Add a new parameter
7005 `own_buf'.
7006 (handle_query): Update caller.
7007
f8255c2a
JB
70082012-02-09 Joel Brobecker <brobecker@adacore.com>
7009
7010 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7011 * configure, config.in: Regenerate.
7012 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7013 is not defined.
7014
da84f473
PA
70152012-02-02 Pedro Alves <palves@redhat.com>
7016
7017 Try SIGKILL first, then PTRACE_KILL.
7018 * linux-low.c (linux_kill_one_lwp): New.
7019 (linux_kill_one_lwp): Rename to ...
7020 (kill_one_lwp_callback): ... this. Use the new
7021 linux_kill_one_lwp.
7022
e886a173
PA
70232012-02-02 Pedro Alves <palves@redhat.com>
7024
7025 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7026 inferior.
7027
be07f1a2
PA
70282012-01-27 Pedro Alves <palves@redhat.com>
7029
7030 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7031 (elf_64_file_p): Make static.
7032 (linux_pid_exe_is_elf_64_file): New.
7033 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7034 Delete declarations.
7035 (linux_pid_exe_is_elf_64_file): Declare.
7036 * linux-x86-low.c (x86_arch_setup): Use
7037 linux_pid_exe_is_elf_64_file.
7038
d8301ad1
JK
70392012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7040
7041 * linux-low.c (linux_wait_for_event_1): Rename to ...
7042 (linux_wait_for_event): ... here and merge it with former
7043 linux_wait_for_event - new variable wait_ptid, use it.
7044 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7045
01b17894
PA
70462012-01-23 Pedro Alves <palves@redhat.com>
7047
7048 * server.c (main): Avoid yet another case of infinite loop while
7049 detaching/killing after a longjmp.
7050
e825046f
JK
70512012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7052
7053 Code cleanup.
7054 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7055
b9e7b9c3
UW
70562012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7057
7058 * hostio.c (handle_readlink): New function.
7059 (handle_vFile): Call it to handle "vFile:readlink" packets.
7060
901f9912
UW
70612012-01-20 Pedro Alves <palves@redhat.com>
7062 Ulrich Weigand <ulrich.weigand@linaro.org>
7063
7064 * server.c (handle_v_requests): Only support vAttach and vRun to
7065 start multiple processes when in extended protocol mode.
7066
fc1ab1a0
PA
70672012-01-17 Pedro Alves <palves@redhat.com>
7068
7069 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7070 memalign plus mprotect to allocate the scratch buffer.
7071
7d5d4e98
PA
70722012-01-13 Pedro Alves <palves@redhat.com>
7073
7074 * server.c (attach_inferior): Clear `cont_thread'.
7075
f128d5e9
PA
70762012-01-13 Pedro Alves <palves@redhat.com>
7077
7078 * server.c (main): Avoid infinite loop while detaching/killing
7079 after a longjmp.
7080
06db92f0
DE
70812012-01-09 Doug Evans <dje@google.com>
7082
7083 * server.c (start_inferior): Set last_ptid in --wrapper case.
7084
32d92999
YQ
70852012-01-06 Yao Qi <yao@codesourcery.com>
7086
7087 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7088 defined.
7089 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7090
5e0a92a9
YQ
70912012-01-04 Yao Qi <yao@codesourcery.com>
7092
7093 * tracepoint.c (cmd_qtdp): Print debug message
7094 for static tracepoint.
7095
ae639e8c
YQ
70962012-01-04 Yao Qi <yao@codesourcery.com>
7097
7098 * tracepoint.c (trace_vdebug): Differentiate debug message
7099 between gdbserver and IPA.
7100
f72429c5
YQ
71012012-01-03 Yao Qi <yao@codesourcery.com>
7102
7103 * tracepoint.c (tracepoint_was_hit): Don't collect for
7104 static tracepoint.
7105
12c3e59c
JB
71062012-01-02 Joel Brobecker <brobecker@adacore.com>
7107
7108 * terminal.h: Reformat copyright header.
7109
67827812
JB
71102012-01-02 Joel Brobecker <brobecker@adacore.com>
7111
7112 * server.c (gdbserver_version): Update copyright year.
7113 * gdbreplay.c (gdbreplay_version): Likewise.
7114
3e52c33d
JK
71152011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7116
7117 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7118
7119 Revert:
7120 2011-12-18 Hui Zhu <teawater@gmail.com>
7121 * linux-low.c (linux_create_inferior): Save return value to ret.
7122
66f1260e
HZ
71232011-12-18 Hui Zhu <teawater@gmail.com>
7124
7125 * linux-low.c (linux_create_inferior): Save return value to ret.
7126
e77616d7
DE
71272011-12-16 Doug Evans <dje@google.com>
7128
e7b06c57
DE
7129 * linux-low.c (linux_create_inferior): If stdio connection,
7130 redirect stdin from /dev/null, stdout to stderr.
7131 * remote-utils.c (remote_is_stdio): New static global.
7132 (remote_connection_is_stdio): New function.
7133 (remote_prepare): Handle stdio connection.
7134 (remote_open): Ditto.
7135 (remote_close): Don't close stdin for stdio connections.
7136 (read_prim,write_prim): New functions. Replace all calls to
7137 read/write to these.
7138 * server.c (main): Watch for "-" argument. Move call to
7139 remote_prepare before start_inferior.
7140 * server.h (STDIO_CONNECTION_NAME): New macro.
7141 (remote_connection_is_stdio): Declare.
7142
e77616d7
DE
7143 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7144 in debugging output.
7145
82067193
YQ
71462011-12-15 Yao Qi <yao@codesourcery.com>
7147
7148 * tracepoint.c: Include sys/syscall.h.
7149 (gdb_ust_thread): Remove preprocessor conditional.
7150
82bfbe7e
PA
71512011-12-14 Pedro Alves <pedro@codesourcery.com>
7152
7153 * linux-low.c (linux_detach_one_lwp): Call
7154 the_low_target.prepare_to_resume before detaching.
7155
712c6575
YQ
71562011-12-14 Yao Qi <yao@codesourcery.com>
7157
7158 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7159 of write.
7160
d54d1edf
YQ
71612011-12-14 Yao Qi <yao@codesourcery.com>
7162
7163 * i386-low.c (i386_low_stopped_data_address): Initialize local
7164 variable `control'.
7165
6210a125
PA
71662011-12-13 Pedro Alves <pedro@codesourcery.com>
7167
7168 PR remote/13492
7169
7170 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7171 DR_CONTROL unless necessary. Extend comments.
7172 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7173 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7174
2ece8244
YQ
71752011-12-13 Yao Qi <yao@codesourcery.com>
7176
7177 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7178 macros.
7179 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7180
784867a5
JK
71812011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7182
7183 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7184 Print new debug message for such case.
7185
6bf36717
JK
71862011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7187
7188 Fix overlapping memcpy.
7189 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7190 the read_inferior_memory transfer.
7191 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7192 write_inferior_memory transfer.
7193 (set_fast_tracepoint_jump): New variable buf. Use it for the
7194 read_inferior_memory and write_inferior_memory transfers.
7195 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7196 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7197 Use it for the write_inferior_memory transfer.
7198 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7199 buffers.
7200
50275556
MR
72012011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7202
7203 * linux-low.c (fetch_register, store_register): Make code
7204 consistent, fix formatting.
7205
7325beb4
MR
72062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7207
7208 * linux-low.c (usr_store_inferior_registers): Factor out code
7209 to handle individual registers into...
7210 (store_register): ... this new function.
7211
c642a434
UW
72122011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7213
7214 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7215 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7216 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7217 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7218 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7219 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7220 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7221 (srv_xmlfiles): Add new XML files.
7222
7223 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7224 and <sys/uio.h>.
7225 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7226 (init_registers_s390_linux32v1): Add prototype.
7227 (init_registers_s390_linux32v2): Likewise.
7228 (init_registers_s390_linux64v1): Likewise.
7229 (init_registers_s390_linux64v2): Likewise.
7230 (init_registers_s390x_linux64v1): Likewise.
7231 (init_registers_s390x_linux64v2): Likewise.
7232 (s390_num_regs): Increment to 52.
7233 (s390_regmap): Add orig_r2 register.
7234 (s390_num_regs_3264): Increment to 68.
7235 (s390_regmap_3264): Add orig_r2 register.
7236 (s390_collect_ptrace_register): Handle orig_r2 register.
7237 (s390_supply_ptrace_register): Likewise.
7238 (s390_fill_last_break): New function.
7239 (s390_store_last_break): Likewise.
7240 (s390_fill_system_call): New function.
7241 (s390_store_system_call): Likewise.
7242 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7243 register sets.
7244 (s390_check_regset): New function.
7245 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7246 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7247 Update target_regsets for available register sets.
7248
2268b414
JK
72492011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7250 Jan Kratochvil <jan.kratochvil@redhat.com>
7251
7252 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7253 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7254 New.
7255 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7256 * linux-low.h (struct process_info_private): New member r_debug.
7257 * server.c (handle_qxfer_libraries): Call
7258 the_target->qxfer_libraries_svr4.
7259 (handle_qxfer_libraries_svr4): New function.
7260 (qxfer_packets): New entry "libraries-svr4".
7261 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7262 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7263 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7264 PACKET_qXfer_libraries_svr4.
7265
d6db1fab
UW
72662011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7267
7268 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7269 PSW address/mask between 8-byte and 16-byte formats.
7270 (s390_supply_ptrace_register): Likewise.
7271 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7272 basic addressing mode bit.
7273
242f5f1c
SS
72742011-11-24 Stan Shebs <stan@codesourcery.com>
7275
7276 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7277
f196051f
SS
72782011-11-17 Stan Shebs <stan@codesourcery.com>
7279
7280 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7281 (tracing_start_time): New global.
7282 (tracing_stop_time): New global.
7283 (tracing_user_name): New global.
7284 (tracing_notes): New global.
7285 (tracing_stop_note): New global.
7286 (cmd_qtstart): Set traceframe_usage, start_time.
7287 (stop_tracing): Set stop_time.
7288 (cmd_qtstatus): Report additional status.
7289 (cmd_qtp): New function.
7290 (handle_tracepoint_query): Call it.
7291 (cmd_qtnotes): New function.
7292 (handle_tracepoint_general_set): Call it.
7293 (get_timestamp): Rename from tsv_get_timestamp.
7294
405f8e94
SS
72952011-11-14 Stan Shebs <stan@codesourcery.com>
7296 Kwok Cheung Yeung <kcy@codesourcery.com>
7297
7298 * linux-x86-low.c (small_jump_insn): New.
7299 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7300 trampoline and error message, build a trampoline and issue a small
7301 jump instruction to it.
7302 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7303 trampoline and error message.
7304 (x86_get_min_fast_tracepoint_insn_len): New.
7305 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7306 * linux-low.h (struct linux_target_ops): Add arguments to
7307 install_fast_tracepoint_jump_pad operation, add new operation.
7308 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7309 arguments.
7310 (linux_get_min_fast_tracepoint_insn_len): New function.
7311 (linux_target_op): Add new operation.
7312 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7313 (gdb_trampoline_buffer_end): Ditto.
7314 (gdb_trampoline_buffer_error): Ditto.
7315 (struct ipa_sym_addresses): Add fields for new IPA variables.
7316 (symbol_list): Add entries for new IPA variables.
7317 (struct tracepoint): Add fields to hold the address range of the
7318 trampoline used by the tracepoint.
7319 (trampoline_buffer_head): New static variable.
7320 (trampoline_buffer_tail): Ditto.
7321 (claim_trampoline_space): New function.
7322 (have_fast_tracepoint_trampoline_buffer): New function.
7323 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7324 structure.
7325 (install_fast_tracepoint): Ditto, also add error buffer argument.
7326 (cmd_qtminftpilen): New function.
7327 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7328 (fast_tracepoint_from_trampoline_address): New function.
7329 (fast_tracepoint_collecting): Handle trampoline as part of jump
7330 pad space.
7331 (set_trampoline_buffer_space): New function.
7332 (initialize_tracepoint): Initialize new IPA variables.
7333 * target.h (struct target_ops): Add arguments to
7334 install_fast_tracepoint_jump_pad operation, add new
7335 get_min_fast_tracepoint_insn_len operation.
7336 (target_get_min_fast_tracepoint_insn_len): New.
7337 (install_fast_tracepoint_jump_pad): Add arguments.
7338 * server.h (IPA_BUFSIZ): Define.
7339 * linux-i386-ipa.c: Include extra header files.
7340 (initialize_fast_tracepoint_trampoline_buffer): New function.
7341 (initialize_low_tracepoint): Call it.
7342 * server.h (set_trampoline_buffer_space): Declare.
7343 (claim_trampoline_space): Ditto.
7344 (have_fast_tracepoint_trampoline_buffer): Ditto.
7345
1e4d1764
YQ
73462011-11-14 Yao Qi <yao@codesourcery.com>
7347
7348 * server.c (handle_query): Handle InstallInTrace for qSupported.
7349 * tracepoint.c (add_tracepoint): Sort list.
7350 (install_tracepoint, download_tracepoint): New.
7351 (cmd_qtdp): Call them to install and download tracepoints.
7352 (sort_tracepoints): Removed.
7353 (cmd_qtstart): Update.
7354
5c73ff4e
YQ
73552011-11-14 Yao Qi <yao@codesourcery.com>
7356
7357 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7358 * mem-break.h: Declare.
7359 * tracepoint.c (cmd_qtstart): Move some code to ...
7360 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7361 New.
7362 (download_tracepoints): Move some code to ...
7363 (download_tracepoint_1): ... here. New.
7364
86a30030
YQ
73652011-11-08 Yao Qi <yao@codesourcery.com>
7366
7367 * remote-utils.c (relocate_instruction): A comment fix.
7368
8d26e50c
JB
73692011-11-07 Joel Brobecker <brobecker@adacore.com>
7370
7371 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7372 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7373 dr_status_mirror and dr_control_mirror from debug_reg_state.
7374 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7375 (i386_initial_stuff): Remove use of deleted globals.
7376 (i386_get_thread_context, i386_set_thread_context,
7377 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7378 from debug_reg_state.
7379
a59306a3
YQ
73802011-11-05 Yao Qi <yao@codesourcery.com>
7381
7382 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7383 address as TPOINT's.
7384
3065dfb6
SS
73852011-11-02 Stan Shebs <stan@codesourcery.com>
7386
7387 * tracepoint.c (agent_mem_read_string): New function.
7388 (eval_agent_expr): Call it for tracenz.
7389 * server.c (handle_query): Report support for tracenz.
7390
fd0d8c7c
YQ
73912011-11-02 Yao Qi <yao@codesourcery.com>
7392
7393 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7394
609086b1
YQ
73952011-11-02 Yao Qi <yao@codesourcery.com>
7396
7397 * target.h: Fix a typo in comment.
7398
b9fd1791
PA
73992011-10-31 Pedro Alves <pedro@codesourcery.com>
7400
7401 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7402 clobber the breakpoints' shadows with fast tracepoint jumps.
7403 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7404 * target.c (write_inferior_memory): Also pass MYADDR down to
7405 check_mem_write.
7406
03583c20
UW
74072011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7408
7409 * configure.ac: Check support for personality routine.
7410 * configure: Regenerate.
7411 * config.in: Likewise.
7412 * linux-low.c: Include <sys/personality.h>.
7413 Define ADDR_NO_RANDOMIZE if necessary.
7414 (linux_create_inferior): Disable address space randomization when
7415 forking inferior, if requested.
7416 (linux_supports_disable_randomization): New function.
7417 (linux_target_ops): Install it.
7418 * server.h (disable_randomization): Declare.
7419 * server.c (disable_randomization): New global variable.
7420 (handle_general_set): Handle QDisableRandomization.
7421 (handle_query): Likewise for qSupported.
7422 (main): Support --disable-randomization and --no-disable-randomization
7423 command line arguments.
7424 * target.h (struct target_ops): Add supports_disable_randomization.
7425 (target_supports_disable_randomization): New macro.
7426
723b724b
MF
74272011-09-29 Mike Frysinger <vapier@gentoo.org>
7428
7429 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7430 ifdef check.
7431 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7432 [!PT_GETDSBT] (target_loadmap): New definition.
7433 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7434 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7435 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7436 and PT_GETDSBT to LINUX_LOADMAP.
7437 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7438 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7439
55329a5c 74402011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7441
7442 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7443 (arm_linux_hwbp_cap): New static variable.
7444 (arm_linux_get_hwbp_cap): Replace by ...
7445 (arm_linux_init_hwbp_cap): ... this new function.
7446 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7447 (arm_linux_get_hw_watchpoint_count): Likewise.
7448 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7449 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7450 (arm_prepare_to_resume): Use perror_with_name instead of error.
7451
55329a5c 74522011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7453
7454 * linux-arm-low.c: Include <signal.h>.
7455 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7456 (struct arm_linux_hwbp_cap): New data type.
7457 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7458 (struct arm_linux_hw_breakpoint): New data type.
7459 (MAX_BPTS, MAX_WPTS): Define.
7460 (struct arch_process_info, struct arch_lwp_info): New data types.
7461 (arm_linux_get_hwbp_cap): New function.
7462 (arm_linux_get_hw_breakpoint_count): Likewise.
7463 (arm_linux_get_hw_watchpoint_count): Likewise.
7464 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7465 (arm_hwbp_control_initialize): Likewise.
7466 (arm_hwbp_control_is_enabled): Likewise.
7467 (arm_hwbp_control_is_initialized): Likewise.
7468 (arm_hwbp_control_disable): Likewise.
7469 (arm_linux_hw_breakpoint_equal): Likewise.
7470 (arm_linux_hw_point_initialize): Likewise.
7471 (struct update_registers_data): New data structure.
7472 (update_registers_callback: New function.
7473 (arm_insert_point): Likewise.
7474 (arm_remove_point): Likewise.
7475 (arm_stopped_by_watchpoint): Likewise.
7476 (arm_stopped_data_address): Likewise.
7477 (arm_new_process): Likewise.
7478 (arm_new_thread): Likewise.
7479 (arm_prepare_to_resume): Likewise.
7480 (the_low_target): Register arm_insert_point, arm_remove_point,
7481 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7482 arm_new_thread, and arm_prepare_to_resume.
7483
6b9801d4
SS
74842011-09-15 Stan Shebs <stan@codesourcery.com>
7485
7486 * server.h (struct emit_ops): Add compare-goto fields.
7487 * tracepoint.c (gdb_agent_op_sizes): New table.
7488 (emit_eq_goto): New function.
7489 (emit_ne_goto): New function.
7490 (emit_lt_goto): New function.
7491 (emit_le_goto): New function.
7492 (emit_gt_goto): New function.
7493 (emit_ge_goto): New function.
7494 (is_goto_target): New function.
7495 (compile_bytecodes): Recognize special cases of compare-goto
7496 combinations and call specialized emitters for them.
7497 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7498 (amd64_emit_ne_goto): New function.
7499 (amd64_emit_lt_goto): New function.
7500 (amd64_emit_le_goto): New function.
7501 (amd64_emit_gt_goto): New function.
7502 (amd64_emit_ge_goto): New function.
7503 (amd64_emit_ops): Add the new functions.
7504 (i386_emit_eq_goto): New function.
7505 (i386_emit_ne_goto): New function.
7506 (i386_emit_lt_goto): New function.
7507 (i386_emit_le_goto): New function.
7508 (i386_emit_gt_goto): New function.
7509 (i386_emit_ge_goto): New function.
7510 (i386_emit_ops): Add the new functions.
7511
bf15cbda
SS
75122011-09-08 Stan Shebs <stan@codesourcery.com>
7513
7514 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7515 (i386_emit_epilogue): Restore %ebx.
7516
943ca1dd
JZ
75172011-08-31 Jie Zhang <jzhang918@gmail.com>
7518
7519 * server.c (step_thread): Remove definition.
7520 (process_serial_event): Don't handle Hs.
7521 * server.h (step_thread): Remove declaration.
7522 * target.c (set_desired_inferior): Remove use of step_thread.
7523
e3deef73
LM
75242011-08-24 Luis Machado <lgustavo@codesourcery.com>
7525
7526 * linux-low.c: Include linux-procfs.h.
7527 (linux_attach_lwp_1): Update comments.
7528 (linux_attach): Scan for existing threads when attaching to a
7529 process that is the tgid.
7530 * Makefile.in: Update dependencies.
7531
13da1c97
LM
75322011-08-24 Luis Machado <lgustavo@codesourcery.com>
7533
7534 * configure.srv: Add linux-procfs.o dependencies.
7535
881127c9
YQ
75362011-08-14 Yao Qi <yao@codesourcery.com>
7537
7538 * target.h (struct target_ops): Fix indent.
7539 * win32-low.c (win32_target_ops): Fix comment.
7540
58dbd541
YQ
75412011-08-14 Andrew Jenner <andrew@codesourcery.com>
7542 Yao Qi <yao@codesourcery.com>
7543
7544 * Makefile.in (clean): Remove tic6x-*.c files.
7545 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7546 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7547 (tic6x-c64xp-linux.c): Likewise.
7548 * configure.srv: Add support for tic6x-*-uclinux.
7549 * linux-tic6x-low.c: New.
7550 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7551
78d85199
YQ
75522011-08-14 Andrew Stubbs <ams@codesourcery.com>
7553 Yao Qi <yao@codesourcery.com>
7554
7555 * target.h (struct target_ops): Add read_loadmap.
7556 * linux-low.c (struct target_loadseg): New type.
7557 (struct target_loadmap): New type.
7558 (linux_read_loadmap): New function.
7559 (linux_target_ops): Add linux_read_loadmap.
7560 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7561 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7562 to NULL.
78d85199 7563
a959a88d
EZ
75642011-08-05 Eli Zaretskii <eliz@gnu.org>
7565
7566 * win32-low.c: Include <stdint.h>.
7567
1ced966e
PA
75682011-07-22 Pedro Alves <pedro@codesourcery.com>
7569
7570 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7571 to the inferior here.
7572 (i386_remove_aligned_watchpoint): Ditto.
7573 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7574 fit part of the watchpoint in the debug registers.
7575 (i386_update_inferior_debug_regs): New.
7576 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7577 registers, and only update the inferior on success.
7578 (i386_low_remove_watchpoint): Ditto.
7579
d26e3629
KY
75802011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7581
7582 * linux-low.c (compare_ints, unique, list_threads, show_process,
7583 linux_core_of_thread): Delete.
7584 (linux_target_ops): Change linux_core_of_thread to
7585 linux_common_core_of_thread.
7586 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7587 * utils.c (malloc_failure): Change type of argument.
7588 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7589 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7590 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7591 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7592 (IPA_OBJS): Add common-utils-ipa.o.
7593 (ptid_h, linux_osdata_h): New macros.
7594 (server_h): Add common/common-utils.h, common/xml-utils.h,
7595 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7596 common/ptid.h.
7597 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7598 ptid.o, buffer.o): New rules.
7599 (linux-low.o): Add common/linux-osdata.h as a dependency.
7600 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7601 * configure.ac: Add AC_HEADER_DIRENT check.
7602 * config.in: Regenerate.
7603 * configure: Regenerate.
7604 * remote-utils.c (xml_escape_text): Delete.
7605 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7606 buffer_xml_printf): Move to common/buffer.c.
7607 * server.c (main): Remove call to initialize_inferiors.
7608 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7609 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7610 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7611 internal_error, gdb_assert, gdb_assert_fail): Delete.
7612 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7613 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7614 common/buffer.h.
7615 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7616 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7617 initialize_inferiors): Delete.
7618
2275a1a7
PA
76192011-07-20 Pedro Alves <pedro@codesourcery.com>
7620
7621 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7622 symbol error.
7623
0a5b1e09
PA
76242011-05-31 Pedro Alves <pedro@codesourcery.com>
7625
7626 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7627 assertion.
7628 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7629
6938fd34
YQ
76302011-05-26 Yao Qi <yao@codesourcery.com>
7631
7632 * Makefile.in (thread-db.o): Track dependence to
7633 common/gdb_thread_db.h.
7634 * thread-db.c: include gdb_thread_db.h from right place.
7635
b481f9e0
TT
76362011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7637
7638 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7639 __FILE__ and __LINE__ to internal_error.
7640
98a5dd13
DE
76412011-05-13 Doug Evans <dje@google.com>
7642
7643 * thread-db.c (try_thread_db_load_from_sdir): New function.
7644 (try_thread_db_load_from_dir): New function.
7645 (thread_db_load_search): Handle $sdir, ignore $pdir.
7646 Remove trying of system directories if search of
7647 libthread-db-search-path fails, that is now done via $sdir.
7648
d248b706
KY
76492011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7650
7651 * server.c (handle_query): Add EnableDisableTracepoints to the list
7652 of supported features.
43aaf8b6 7653 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7654 tracepoints.
43aaf8b6
PA
7655 (cmd_qtenable_disable): New.
7656 (cmd_qtstart): Install tracepoints even if disabled.
7657 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7658 receiving a QTEnable or QTDisable packet.
7659 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7660 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7661 tracepoints.
7662 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7663
84e578fb
DE
76642011-05-10 Doug Evans <dje@google.com>
7665
7666 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7667
71f55dd8
DE
76682011-05-04 Doug Evans <dje@google.com>
7669
7670 * linux-low.c (linux_join): Skip process lookup.
7671 * spu-low.c (spu_join): Ditto.
7672 * server.c (join_inferiors_callback): Delete.
7673 (process_serial_event): For 'D' packet (detach) call join_inferior
7674 directly.
7675
4d393d60
JM
76762011-05-04 Joseph Myers <joseph@codesourcery.com>
7677
7678 * README: Don't mention xscale*-*-linux*.
7679 * configure.srv (xscale*-*-linux*): Don't handle target.
7680
b00ad6ff
NF
76812011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7682
7683 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7684 casting pointers.
7685 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7686 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7687 (i386_emit_void_call_2): Likewise.
7688
af96c192
YQ
76892011-04-26 Yao Qi <yao@codesourcery.com>
7690
43aaf8b6
PA
7691 * linux-low.c: Move common macros to linux-ptrace.h.
7692 Include linux-ptrace.h.
af96c192
YQ
7693 * Makefile.in (linux_ptrace_h): New.
7694 (linux-low.o): Depends on linux-ptrace.h.
7695
03f2bd59
JK
76962011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7697
7698 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7699 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7700 (remote_prepare): New function with most of the TCP code from ...
7701 (remote_open): ... here. Detect PORT here unconditionally. Move also
7702 setting transport_is_reliable.
7703 * server.c (run_once): New variable.
7704 (gdbserver_usage): Document it.
7705 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7706 the first run if RUN_ONCE.
7707 * server.h (run_once, remote_prepare): New declarations.
7708
7a9dd1b2
TT
77092011-04-19 Tom Tromey <tromey@redhat.com>
7710
7711 * win32-low.c (handle_load_dll): Remove duplicate "the".
7712
81239425
PM
77132011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7714
7715 Remove support for old Cygwin 1.5 versions.
7716 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7717 function to avoid warning.
7718 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7719 warning.
7720
9e0627f1
PM
77212011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7722
7723 * gdbserver/server.h (Macro _): Define it if not available.
7724
588eebee
MS
77252011-03-14 Michael Snyder <msnyder@vmware.com>
7726
348af9f7 7727 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7728
43f70d4c
JB
77292011-03-10 Joel Brobecker <brobecker@adacore.com>
7730
7731 * Makefile.in (maintainer-clean realclean distclean): Remove
7732 "make ... subdir_do" command.
7733
348af9f7
MS
77342011-03-10 Michael Snyder <msnyder@vmware.com>
7735
7736 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7737
7738 * server.c (handle_v_run): Free alloced buffer on early return.
7739
e637a4f5
YQ
77402011-03-09 Yao Qi <yao@codesourcery.com>
7741
7742 Revert:
7743 2011-03-04 Yao Qi <yao@codesourcery.com>
7744
7745 * Makefile.in: Remove GNU make feature --directory.
7746
7747 2011-03-05 Yao Qi <yao@codesourcery.com>
7748
7749 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7750 (subdir_do): New make target. Copied from gdb/Makefile.
7751 (maintainer-clean, realclean, distclean, clean): Call corresponding
7752 make targets in common/Makefile.
7753
7754 2011-02-11 Yao Qi <yao@codesourcery.com>
7755
7756 * configure.ac: Call AC_PROG_RANLIB.
7757 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7758 * configure: Regenerate.
7759
e6edda56
JK
77602011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7761
7762 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7763
e5141119
JB
77642011-03-06 Yao Qi <yao@codesourcery.com>
7765
7766 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7767
64794aa4
JB
77682011-03-05 Yao Qi <yao@codesourcery.com>
7769
7770 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7771 (subdir_do): New make target. Copied from gdb/Makefile.
7772 (maintainer-clean, realclean, distclean, clean): Call corresponding
7773 make targets in common/Makefile.
7774
7a762829
YQ
77752011-03-04 Yao Qi <yao@codesourcery.com>
7776
7777 * Makefile.in: Remove GNU make feature --directory.
7778
348af9f7
MS
77792011-03-04 Michael Snyder <msnyder@vmware.com>
7780
7781 * server.c (queue_stop_reply): Call xmalloc not malloc.
7782
77832011-03-02 Michael Snyder <msnyder@vmware.com>
7784
7785 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7786
9f72fee2
MS
77872011-02-28 Michael Snyder <msnyder@vmware.com>
7788
588eebee
MS
7789 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7790 (cmd_qtframe): Ditto.
7791 (cmd_qtbuffer): Ditto.
7792 (cmd_bigqtbuffer): Ditto.
7793
9f72fee2
MS
7794 * utils.c (decimal2str): Initialize 'width' to nine, then
7795 don't mess with it.
7796
8040bd49
UW
77972011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7798
7799 * hostio.c (require_data): Free *data, not data.
7800
7e52cbd0
JK
78012011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7802
7803 * hostio.c (require_data): Use free, not xfree.
7804
9130f83e
MS
78052011-02-27 Michael Snyder <msnyder@vmware.com>
7806
4b812f4e
MS
7807 * server.c (handle_query): Discard unused value.
7808
9130f83e
MS
7809 * hostio.c (require_data): Free malloc memory before returning
7810 error.
7811
69d37113
MS
78122011-02-26 Michael Snyder <msnyder@vmware.com>
7813
7814 * linux-low.c (list_threads): Call closedir for dirent.
7815
35f5825a
MS
78162011-02-27 Michael Snyder <msnyder@vmware.com>
7817
2a589cef
MS
7818 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7819 a case statement falls through.
7820
0adea5f7
MS
7821 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7822
35f5825a
MS
7823 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7824 in comparison.
7825
238f1c74
MS
78262011-02-26 Michael Snyder <msnyder@vmware.com>
7827
7828 * utils.c (decimal2str): Eliminate dead code and dead param.
7829 (pulongest): Drop dead param from call to decimal2str.
7830 (plongest): Ditto.
7831
633ff500
JB
78322011-02-24 Joel Brobecker <brobecker@adacore.com>
7833
7834 Revert the following patch (not approved yet):
7835 2011-02-21 Hui Zhu <teawater@gmail.com>
7836 * tracepoint.c (tp_printf): New function.
7837 (eval_agent_expr): Handle gdb_agent_op_printf.
7838
f9c6ff72
HZ
78392011-02-21 Hui Zhu <teawater@gmail.com>
7840
7841 * tracepoint.c (tp_printf): New function.
7842 (eval_agent_expr): Handle gdb_agent_op_printf.
7843
94d5e490
TT
78442011-02-18 Tom Tromey <tromey@redhat.com>
7845
7846 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7847 (tracepoint.o): Likewise.
7848 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7849 (gdb_agent_op_names): Likewise.
7850
c7f96d2b
TT
78512011-02-18 Tom Tromey <tromey@redhat.com>
7852
7853 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7854 gdb_agent_op_rot>: New constants.
7855 (gdb_agent_op_names): Add pick and roll.
7856 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7857 cases.
7858
0feedb2c
JK
78592011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7860
7861 * aclocal.m4: Regenerated with aclocal-1.11.1.
7862
b3b9301e
PA
78632011-02-14 Pedro Alves <pedro@codesourcery.com>
7864
7865 * server.c (handle_qxfer_traceframe_info): New.
7866 (qxfer_packets): Register "traceframe-info".
7867 (handle_query): Report support for qXfer:traceframe-info:read+.
7868 * tracepoint.c (match_blocktype): New.
7869 (traceframe_find_block_type): Rename to ...
7870 (traceframe_walk_blocks): ... this. Add callback filter argument,
7871 and use it.
7872 (traceframe_find_block_type): New, reimplemented on top of
7873 traceframe_walk_blocks.
7874 (build_traceframe_info_xml): New.
7875 (traceframe_read_info): New.
7876 * server.h (traceframe_read_info): Declare.
7877
4f3e6fb7
YQ
78782011-02-11 Yao Qi <yao@codesourcery.com>
7879
7880 * configure.ac: Call AC_PROG_RANLIB.
7881 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7882 * configure: Regenerate.
7883
764880b7
PA
78842011-02-07 Pedro Alves <pedro@codesourcery.com>
7885
7886 * server.c (gdb_read_memory): Change return semantics to allow
7887 partial transfers.
7888 (handle_search_memory_1): Adjust.
7889 (process_serial_event) <'m' packet>: Handle partial transfers.
7890 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7891
1c79eb8a
PA
78922011-01-28 Pedro Alves <pedro@codesourcery.com>
7893
7894 * regcache.c (init_register_cache): Initialize
7895 regcache->register_status.
7896 (free_register_cache): Release regcache->register_status.
7897 (regcache_cpy): Copy register_status.
7898 (registers_to_string): Print 'x's for unavailable registers.
7899 (supply_register): Mark the register's status valid or
7900 unavailable, depending on whether a buffer was passed in or not.
7901 (supply_register_zeroed): New.
7902 (supply_regblock): Mark the registers' status valid or
7903 unavailable, depending on whether a buffer was passed in or not.
7904 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7905 (struct regcache): New `register_status' field.
7906 (supply_register_zeroed): Declare.
7907 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7908 supply_register_zeroed, rather than passing a NULL buffer to
7909 supply_register.
7910 * tracepoint.c (fetch_traceframe_registers): Update comment.
7911
85724a0e
PA
79122011-01-28 Pedro Alves <pedro@codesourcery.com>
7913
7914 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7915 buffer explicit.
7916
d08aafef
PA
79172011-01-25 Pedro Alves <pedro@codesourcery.com>
7918
7919 * server.h (decode_xfer_write): Change prototype.
7920 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7921 and don't extract the annex here.
7922 * server.c (decode_xfer_read): Remove `annex' parameter,
7923 and don't extract the annex here.
7924 (decode_xfer): New.
7925 (struct qxfer): New.
7926 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7927 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7928 (handle_qxfer_statictrace): New functions, abstracted out from
7929 handle_query, and made to use the struct qxfer interface.
7930 (handle_threads_qxfer_proper): Rename to ...
7931 (handle_qxfer_threads_proper): ... this.
7932 (handle_threads_qxfer): Rename to ...
7933 (handle_qxfer_threads): ... this. Adjust.
7934 (qxfer_packets): New array.
7935 (handle_qxfer): New function.
7936 (handle_query): Use handle_qxfer.
7937
493e2a69
MS
79382011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7939
7940 * gdbreplay.c: Shorten lines of >= 80 columns.
7941 * linux-low.c: Ditto.
7942 * linux-ppc-low.c: Ditto.
7943 * linux-s390-low.c: Ditto.
7944 * linux-sparc-low.c: Ditto.
7945 * linux-x86-low.c: Ditto.
7946 * linux-xtensa-low.c: Ditto.
7947 * mem-break.c: Ditto.
7948 * nto-low.c: Ditto.
7949 * regcache.h: Ditto.
7950 * remote-utils.c: Ditto.
7951 * server.c: Ditto.
7952 * server.h: Ditto.
7953 * thread-db.c: Ditto.
7954 * tracepoint.c: Ditto.
7955 * utils.c: Ditto.
7956 * win32-low.h: Ditto.
7957
44944448
JB
79582011-01-05 Joel Brobecker <brobecker@adacore.com>
7959
7960 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7961 update.
7962
71ce852c
JB
79632011-01-01 Joel Brobecker <brobecker@adacore.com>
7964
7965 * server.c (gdbserver_version): Update copyright year in version
7966 output.
7967 * gdbreplay.c (gdbreplay_version): Ditto.
7968
eb826dc6
MF
79692010-12-29 Jie Zhang <jie.zhang@analog.com>
7970
7971 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7972 * linux-bfin-low.c: New file.
7973 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7974 PT_DATA_ADDR for BFIN targets.
7975 * Makefile.in (SFILES): Add linux-bfin-low.c.
7976 (clean): Remove reg-bfin.c.
7977 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7978 * README: Mention supported Blackfin targets.
7979
39ab222a
MF
79802010-12-23 Mike Frysinger <vapier@gentoo.org>
7981
7982 * .gitignore: New file.
7983
a1f2ce7d
MF
79842010-11-16 Mike Frysinger <vapier@gentoo.org>
7985
7986 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7987
f474844c
JZ
79882010-10-22 Jie Zhang <jie@codesourcery.com>
7989
7990 * Makefile.in: Add FLAGS_TO_PASS variable.
7991 (install): Remove dependency of install-only and recursively
7992 invoke make for install-only.
7993
f1048712
DE
79942010-10-04 Doug Evans <dje@google.com>
7995
7996 * Makefile.in (uninstall): Use $(DESTDIR).
7997
b53a1623
PA
79982010-09-24 Pedro Alves <pedro@codesourcery.com>
7999
e6ee044d
PA
8000 PR gdb/11842
8001
b53a1623
PA
8002 * linux-x86-low.c (compat_siginfo_from_siginfo)
8003 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8004 si_code is < 0. Check for si_code == SI_TIMER before checking for
8005 si_code < 0.
8006
fa1bd1e4
JB
80072010-09-13 Joel Brobecker <brobecker@adacore.com>
8008
8009 * lynx-i386-low.c: New file.
8010 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8011
47fac8f8
JB
80122010-09-13 Joel Brobecker <brobecker@adacore.com>
8013
8014 * lynx-low.c (ptrace_request_to_str): Remove handling for
8015 request values that have been removed in LynxOS 5.x.
8016
1adfc54d
JB
80172010-09-13 Joel Brobecker <brobecker@adacore.com>
8018
8019 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8020 <ptrace.h>
8021
c2a66c29
NS
80222010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8023
8024 * configure.ac: Add --enable-inprocess-agent option.
8025 * configure: Rebuilt.
8026
32fcada3
YQ
80272010-09-06 Yao Qi <yao@codesourcery.com>
8028
8029 * linux-low.c (linux_kill): Remove unused variable.
8030 (linux_stabilize_threads): Likewise.
8031 * server.c (start_inferior): Likewise.
8032 (queue_stop_reply_callback): Likewise.
8033 * tracepoint.c (do_action_at_tracepoint): Likewise.
8034
0cccb683
YQ
80352010-09-06 Yao Qi <yao@codesourcery.com>
8036
8037 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8038 on return.
8039
423ec54c
JK
80402010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8041
8042 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8043
12ac6819
PA
80442010-09-06 Pedro Alves <pedro@codesourcery.com>
8045
8046 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8047 "$(IPA_DEPFILES)".
8048
8ed54b31
JB
80492010-09-01 Joel Brobecker <brobecker@adacore.com>
8050
8051 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8052 gdbserver/lynx-ppc-low.c: New files.
8053 * Makefile.in (lynx_low_h): New variable.
8054 (lynx-low.o, lynx-ppc-low.o): New rules.
8055 * configure.ac: On LynxOS, link with -lnetinet.
8056 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8057 * configure: regenerate.
8058
bb0116a4
JB
80592010-09-01 Joel Brobecker <brobecker@adacore.com>
8060
8061 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8062 * configure.ac: Add check for vasprintf and vsnprintf.
8063 * configure, config.in: Regenerate.
8064 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8065
a778ab81 80662010-09-01 Joel Brobecker <brobecker@adacore.com>
8067
8068 * gdbreplay.c: Move include of alloca.h up, next to include of
8069 malloc.h.
8070 * server.h: Add include of malloc.h.
8071 * mem-break.c: Remove include of malloc.h.
8072 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8073
8b034a19 80742010-09-01 Joel Brobecker <brobecker@adacore.com>
8075
8076 * Makefile.in (memmem.o): Build with -Wno-error.
8077
80782010-09-01 Joel Brobecker <brobecker@adacore.com>
8079
8080 * utils.c (xsnprintf): Make non-static.
8081 * server.h: Add xsnprintf declaration.
8082 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8083 replace calls to snprintf by calls to xsnprintf throughout.
8084
80852010-09-01 Joel Brobecker <brobecker@adacore.com>
8086
8087 * configure.ac: Add configure check for alloca.
8088 * configure, config.in: Regenerate.
8089 * server.h: Include alloca.h if it exists.
8090 * gdbreplay.c: Include alloca.h if it exists.
8091
1a981360
PA
80922010-08-28 Pedro Alves <pedro@codesourcery.com>
8093
8094 * linux-low.c (__SIGRTMIN): Define if not already defined.
8095 (linux_create_inferior): Check for __ANDROID__ rather than
8096 __SIGRTMIN.
8097 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8098 are already deferred.
8099 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8100 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8101 stopped and already has a pending signal to report.
8102 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8103 a pending signal to report or is moving out of a jump pad.
8104 (linux_init_signals): Check for __ANDROID__ rather than
8105 __SIGRTMIN.
8106
b4d51a55
PA
81072010-08-28 Pedro Alves <pedro@codesourcery.com>
8108
8109 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8110 debug_threads check. Avoid a linear search when not doing debug
8111 output.
8112
ec48365d
PA
81132010-08-27 Pedro Alves <pedro@codesourcery.com>
8114
8115 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8116 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8117 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8118 (process_event): Change local fd's type to gdb_fildes_t.
8119 (create_file_handler): Adjust prototype.
8120 (delete_file_handler): Adjust prototype.
8121 (handle_file_event): Adjust prototype. Use pfildes.
8122 (create_file_event): Adjsut prototype.
8123 * remote-utils.c (remote_desc, listen_desc): Change type to
8124 gdb_fildes_t.
8125 * server.h: New gdb_fildes_t typedef.
8126 [USE_WIN32API]: Include winsock2.h.
8127 (delete_file_handler, add_file_handler): Adjust prototypes.
8128 (pfildes): Declare.
8129 * utils.c (pfildes): New.
8130
854d88f0
PA
81312010-08-27 Pedro Alves <pedro@codesourcery.com>
8132
8133 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8134 * configure: Regenerate.
8135
0146f85b
PA
81362010-08-27 Pedro Alves <pedro@codesourcery.com>
8137
8138 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8139 (linux_done_accessing_memory): ... this.
8140 (linux_target_ops): Adjust.
8141 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8142 * nto-low.c (nto_target_ops): Adjust comment.
8143 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8144 * spu-low.c (spu_target_ops): Adjust comment.
8145 * target.h (target_ops): Rename unprepare_to_access_memory field
8146 to done_accessing_memory.
8147 (unprepare_to_access_memory): Rename to ...
8148 (done_accessing_memory): ... this.
8149
90d74c30
PA
81502010-08-26 Pedro Alves <pedro@codesourcery.com>
8151
8152 * linux-low.c (linux_prepare_to_access_memory): New.
8153 (linux_unprepare_to_access_memory): New.
8154 (linux_target_ops): Install them.
8155 * server.c (read_memory): Rename to ...
8156 (gdb_read_memory): ... this. Use
8157 prepare_to_access_memory/prepare_to_access_memory.
8158 (write_memory): Rename to ...
8159 (gdb_write_memory): ... this. Use
8160 prepare_to_access_memory/prepare_to_access_memory.
8161 (handle_search_memory_1): Adjust.
8162 (process_serial_event): Adjust.
8163 * target.h (struct target_ops): New fields
8164 prepare_to_access_memory and unprepare_to_access_memory.
8165 (prepare_to_access_memory, unprepare_to_access_memory): New.
8166 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8167 prepare_to_access_memory/prepare_to_access_memory.
8168 * nto-low.c (nto_target_ops): Adjust.
8169 * spu-low.c (spu_target_ops): Adjust.
8170 * win32-low.c (win32_target_ops): Adjust.
8171
fd467969
PA
81722010-08-26 Pedro Alves <pedro@codesourcery.com>
8173
8174 * Makefile.in (WARN_CFLAGS): Get it from configure.
8175 (WERROR_CFLAGS): New.
8176 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8177 * configure.ac: Introduce --enable-werror, which adds -Werror to
8178 the compiler command line. Enabled by default. Disable with
8179 --disable-werror. Add -Wdeclaration-after-statement
8180 Wpointer-arith and -Wformat-nonliteral to warning flags.
8181 * configure: Regenerate.
8182
331e2f5f
PA
81832010-08-26 Pedro Alves <pedro@codesourcery.com>
8184
8185 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8186
e581f2b4
PA
81872010-08-26 Pedro Alves <pedro@codesourcery.com>
8188
8189 * gdbreplay.c (remote_error): New.
8190 (gdbchar): New.
8191 (expect): Use gdbchar. Check for error reading from GDB.
8192 Clarify sync error output.
8193 (play): Check for errors writing to GDB.
8194 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8195 * remote-utils.c (getpkt): Check for errors writing to the remote
8196 descriptor.
8197
3c11dd79
PA
81982010-08-25 Pedro Alves <pedro@codesourcery.com>
8199
8200 * linux-low.c (linux_wait_1): Move non-debugging code out of
8201 `debug_threads' control.
8202
d20a8ad9
PA
82032010-08-25 Pedro Alves <pedro@codesourcery.com>
8204
8205 * linux-low.c (linux_wait_1): Don't set last_status here.
8206 * server.c (push_event, queue_stop_reply_callback): Assert we're
8207 not pushing a TARGET_WAITKIND_IGNORE event.
8208 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8209 (myresume, handle_target_event): Set the thread's last_resume_kind
8210 and last_status from the target returned status.
8211
964e4306
PA
82122010-08-25 Pedro Alves <pedro@codesourcery.com>
8213
8214 PR threads/10729
8215
8216 * linux-x86-low.c (update_debug_registers_callback): New.
8217 (i386_dr_low_set_addr): Use it.
8218 (i386_dr_low_get_addr): New.
8219 (i386_dr_low_set_control): Use update_debug_registers_callback.
8220 (i386_dr_low_get_control): New.
8221 (i386_dr_low_get_status): Adjust.
8222 * linux-low.c (linux_stop_lwp): New.
8223 * linux-low.h (linux_stop_lwp): Declare.
8224
8225 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8226 argument instead of a i386_debug_reg_state.
8227 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8228 a i386_debug_reg_state.
8229 (i386_insert_aligned_watchpoint): Adjust.
8230 (i386_remove_aligned_watchpoint): Adjust.
8231 (i386_low_stopped_data_address): Read the debug registers from the
8232 inferior instead of from the mirrors.
8233 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8234 (i386_dr_low_get_addr): Declare.
8235 (i386_dr_low_get_control): Declare.
8236 (i386_dr_low_get_status): Change prototype.
8237
8238 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8239 (i386_dr_low_get_addr): New.
8240 (i386_dr_low_get_control): New.
8241 (i386_dr_low_get_status): Adjust prototype. Return
8242 dr_status_mirror.
8243 (i386_initial_stuff): Clear dr_status_mirror and
8244 dr_control_mirror.
8245 (i386_get_thread_context): Adjust.
8246 (i386_set_thread_context): Adjust.
8247 (i386_thread_added): Adjust.
8248
5f21a75b
PA
82492010-08-24 Pedro Alves <pedro@codesourcery.com>
8250
8251 * linux-low.h (linux_thread_area): Delete declaration.
8252
3e4c1235
TS
82532010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8254
8255 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8256 after its termination.
8257
1971b033
PA
82582010-08-09 Pedro Alves <pedro@codesourcery.com>
8259
8260 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8261 (gdb_wants_all_stopped): Delete.
8262 (linux_wait_1): Don't call them.
8263 * server.c (handle_v_cont): Tag all threads as want-stopped.
8264 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8265 stopped as "client-wants-stopped".
8266
310444ac
PA
82672010-07-31 Pedro Alves <pedro@codesourcery.com>
8268
8269 * Makefile.in (signals_h): New.
8270 (server_h): Depend on it.
8271 (server.o): Don't depend on $(signals_def).
8272 (signals.o): Depend on $(signals_def).
8273
a19cae16
JK
82742010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8275
8276 * Makefile.in (signals_def): New.
8277 (server_h): Append include/gdb/signals.h and signals_def.
8278 (server.o): Append signals_def.
8279
30d50328
JK
82802010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8281
8282 * server.c (handle_target_event): Use target_signal_to_host for
8283 resume_info.sig initialization.
8284 * target.h (struct thread_resume) <sig>: New comment.
8285
5c3216e2
OS
82862010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8287
c6f46ca0
OS
8288 * server.c (handle_query): strcpy() the returned string from paddress()
8289 instead of sprintf().
5c3216e2
OS
8290 * utils.c (paddress): Return phex_nz().
8291
6bd31874
JB
82922010-07-07 Joel Brobecker <brobecker@adacore.com>
8293
8294 * server.c (handle_v_cont): Call mourn_inferior if process
8295 just exited.
8296 (myresume): Likewise.
8297
0fb4aa4b
PA
82982010-07-01 Pedro Alves <pedro@codesourcery.com>
8299
8300 Static tracepoints, and integration with UST.
8301
8302 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8303 * mem-break.c (uninsert_all_breakpoints)
8304 (reinsert_all_breakpoints): New.
8305 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8306 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8307 (gdb_agent_ust_loaded, helper_thread_id)
8308 (gdb_agent_helper_thread_id): New macros.
8309 (struct ipa_sym_addresses): Add addr_ust_loaded,
8310 addr_helper_thread_id, addr_cmd_buf.
8311 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8312 (in_process_agent_loaded_ust): New.
8313 (write_e_ust_not_loaded): New.
8314 (maybe_write_ipa_ust_not_loaded): New.
8315 (struct collect_static_trace_data_action): New.
8316 (enum tracepoint_type) <static_tracepoint>: New.
8317 (struct tracepoint) <handle>: Mention static tracepoints.
8318 (struct static_tracepoint_ctx): New.
8319 (CMD_BUF_SIZE): New.
8320 (add_tracepoint_action): Handle static tracepoint actions.
8321 (unprobe_marker_at): New.
8322 (clear_installed_tracepoints): Handle static tracepoints.
8323 (cmd_qtdp): Handle static tracepoints.
8324 (probe_marker_at): New.
8325 (cmd_qtstart): Handle static tracepoints.
8326 (response_tracepoint): Handle static tracepoints.
8327 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8328 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8329 (get_context_regcache): Handle static tracepoints.
8330 (do_action_at_tracepoint): Handle static tracepoint actions.
8331 (traceframe_find_block_type): Handle static trace data blocks.
8332 (traceframe_read_sdata): New.
8333 (download_tracepoints): Download static tracepoint actions.
8334 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8335 (GDB_PROBE_NAME): New.
8336 (ust_ops): New.
8337 (GET_UST_SYM): New.
8338 (USTF): New.
8339 (dlsym_ust): New.
8340 (ust_marker_to_static_tracepoint): New.
8341 (gdb_probe): New.
8342 (collect_ust_data_at_tracepoint): New.
8343 (gdb_ust_probe): New.
8344 (UNIX_PATH_MAX, SOCK_DIR): New.
8345 (gdb_ust_connect_sync_socket): New.
8346 (resume_thread, stop_thread): New.
8347 (run_inferior_command): New.
8348 (init_named_socket): New.
8349 (gdb_ust_socket_init): New.
8350 (cstr_to_hexstr): New.
8351 (next_st): New.
8352 (first_marker, next_marker): New.
8353 (response_ust_marker): New.
8354 (cmd_qtfstm, cmd_qtsstm): New.
8355 (unprobe_marker_at, probe_marker_at): New.
8356 (cmd_qtstmat, gdb_ust_thread): New.
8357 (gdb_ust_init): New.
8358 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8359 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8360 (ST_REGENTRY): New.
8361 (x86_64_st_collect_regmap): New.
8362 (X86_64_NUM_ST_COLLECT_GREGS): New.
8363 (AMD64_RIP_REGNUM): New.
8364 (supply_static_tracepoint_registers): New.
8365 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8366 (ST_REGENTRY): New.
8367 (i386_st_collect_regmap): New.
8368 (i386_NUM_ST_COLLECT_GREGS): New.
8369 (supply_static_tracepoint_registers): New.
8370 * server.c (handle_query): Handle qXfer:statictrace:read.
8371 <qSupported>: Report support for StaticTracepoints, and
8372 qXfer:statictrace:read features.
8373 * server.h (traceframe_read_sdata)
8374 (supply_static_tracepoint_registers): Declare.
8375 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8376 (unpack_varlen_hex): Include in IPA build.
8377 * Makefile.in (ustlibs, ustinc): New.
8378 (IPA_OBJS): Add remote-utils-ipa.o.
8379 ($(IPA_LIB)): Link -ldl and -lpthread.
8380 (UST_CFLAGS): New.
8381 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8382 * config.in, configure: Regenerate.
8383
9e4344e5
PA
83842010-06-20 Ian Lance Taylor <iant@google.com>
8385 Pedro Alves <pedro@codesourcery.com>
8386
8387 * linux-x86-low.c (always_true): Delete.
8388 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8389 trying to fool the compiler with always_true.
8390
c6beb2cb
PA
83912010-06-20 Pedro Alves <pedro@codesourcery.com>
8392
8393 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8394 conditions in gdbserver.
8395
d2ed6730
UW
83962010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8397
8398 * spu-low.c (spu_read_memory): Wrap around local store limit.
8399 (spu_write_memory): Likewise.
8400
4e29fb54
PA
84012010-06-15 Pedro Alves <pedro@codesourcery.com>
8402
8403 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8404 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8405 LONGEST uses.
8406 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8407 uses.
8408 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8409 uses with LONGEST uses.
8410
6a271cae
PA
84112010-06-14 Stan Shebs <stan@codesourcery.com>
8412 Pedro Alves <pedro@codesourcery.com>
8413
8414 Bytecode compiler.
8415
8416 * linux-x86-low.c: Include limits.h.
8417 (add_insns): New.
8418 (always_true): New.
8419 (EMIT_ASM): New.
8420 (EMIT_ASM32): New.
8421 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8422 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8423 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8424 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8425 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8426 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8427 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8428 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8429 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8430 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8431 (amd64_emit_void_call_2): New.
8432 (amd64_emit_ops): New.
8433 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8434 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8435 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8436 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8437 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8438 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8439 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8440 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8441 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8442 (i386_emit_stack_adjust, i386_emit_int_call_1)
8443 (i386_emit_void_call_2): New.
8444 (i386_emit_ops): New.
8445 (x86_emit_ops): New.
8446 (the_low_target): Install x86_emit_ops.
8447 * server.h (struct emit_ops): New.
8448 (get_raw_reg_func_addr): Declare.
8449 (current_insn_ptr, emit_error): Declare.
8450 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8451 (set_trace_state_variable_value): New defines.
8452 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8453 addr_get_trace_state_variable_value and
8454 addr_set_trace_state_variable_value.
8455 (symbol_list): New fields for get_raw_reg,
8456 get_trace_state_variable_value and set_trace_state_variable_value.
8457 (condfn): New typedef.
8458 (struct tracepoint): New field `compiled_cond'.
8459 (do_action_at_tracepoint): Clear compiled_cond.
8460 (get_trace_state_variable_value, set_trace_state_variable_value):
8461 Export in the IPA.
8462 (condition_true_at_tracepoint): If there's a compiled condition,
8463 run that.
8464 (current_insn_ptr, emit_error): New globals.
8465 (struct bytecode_address): New.
8466 (get_raw_reg_func_addr): New.
8467 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8468 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8469 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8470 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8471 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8472 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8473 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8474 (compile_tracepoint_condition, compile_bytecodes): New.
8475 * target.h (emit_ops): Forward declare.
8476 (struct target_ops): New field emit_ops.
8477 (target_emit_ops): New.
8478 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8479 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8480 * linux-low.c (linux_emit_ops): New.
8481 (linux_target_ops): Install it.
8482 * linux-low.h (struct linux_target_ops): New field emit_ops.
8483
92b72907
UW
84842010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8485
8486 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8487 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8488
fa593d66
PA
84892010-06-01 Pedro Alves <pedro@codesourcery.com>
8490 Stan Shebs <stan@codesourcery.com>
8491
8492 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8493 (all): Depend on $(extra_libraries).
8494 (install-only): Install the IPA.
8495 (IPA_OBJS, IPA_LIB): New.
8496 (clean): Remove the IPA lib.
8497 (IPAGENT_CFLAGS): New.
8498 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8499 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8500 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8501 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8502 * configure.ac: Check for atomic builtins support in the compiler.
8503 (IPA_DEPFILES, extra_libraries): Define.
8504 * configure.srv (ipa_obj): Add description.
8505 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8506 (i[34567]86-*-linux*): Set ipa_obj.
8507 (x86_64-*-linux*): Set ipa_obj.
8508 * linux-low.c (stabilizing_threads): New.
8509 (supports_fast_tracepoints): New.
8510 (linux_detach): Stabilize threads before detaching.
8511 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8512 the lwp is either not stabilizing, or is moving out of a jump pad.
8513 (linux_fast_tracepoint_collecting): New.
8514 (maybe_move_out_of_jump_pad): New.
8515 (enqueue_one_deferred_signal): New.
8516 (dequeue_one_deferred_signal): New.
8517 (linux_wait_for_event_1): If moving out of a jump pad, defer
8518 pending signals to later.
8519 (linux_stabilize_threads): New.
8520 (linux_wait_1): Check if threads need moving out of jump pads, and
8521 do it if so.
8522 (stuck_in_jump_pad_callback): New.
8523 (move_out_of_jump_pad_callback): New.
8524 (lwp_running): New.
8525 (linux_resume_one_lwp): Handle moving out of jump pads.
8526 (linux_set_resume_request): Dequeue deferred signals.
8527 (need_step_over_p): Also step over fast tracepoint jumps.
8528 (start_step_over): Also uninsert fast tracepoint jumps.
8529 (finish_step_over): Also reinsert fast tracepoint jumps.
8530 (linux_install_fast_tracepoint_jump): New.
8531 (linux_target_ops): Install linux_stabilize_threads and
8532 linux_install_fast_tracepoint_jump_pad.
8533 * linux-low.h (linux_target_ops) <get_thread_area,
8534 install_fast_tracepoint_jump_pad>: New fields.
8535 (struct lwp_info) <collecting_fast_tracepoint,
8536 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8537 (linux_get_thread_area): Declare.
8538 * linux-x86-low.c (jump_insn): New.
8539 (x86_get_thread_area): New.
8540 (append_insns): New.
8541 (push_opcode): New.
8542 (amd64_install_fast_tracepoint_jump_pad): New.
8543 (i386_install_fast_tracepoint_jump_pad): New.
8544 (x86_install_fast_tracepoint_jump_pad): New.
8545 (the_low_target): Install x86_get_thread_area and
8546 x86_install_fast_tracepoint_jump_pad.
8547 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8548 (struct fast_tracepoint_jump): New.
8549 (fast_tracepoint_jump_insn): New.
8550 (fast_tracepoint_jump_shadow): New.
8551 (find_fast_tracepoint_jump_at): New.
8552 (fast_tracepoint_jump_here): New.
8553 (delete_fast_tracepoint_jump): New.
8554 (set_fast_tracepoint_jump): New.
8555 (uninsert_fast_tracepoint_jumps_at): New.
8556 (reinsert_fast_tracepoint_jumps_at): New.
8557 (set_breakpoint_at): Use write_inferior_memory.
8558 (uninsert_raw_breakpoint): Use write_inferior_memory.
8559 (check_mem_read): Mask out fast tracepoint jumps.
8560 (check_mem_write): Mask out fast tracepoint jumps.
8561 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8562 (set_fast_tracepoint_jump): Declare.
8563 (delete_fast_tracepoint_jump)
8564 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8565 (reinsert_fast_tracepoint_jumps_at): Declare.
8566 * regcache.c: Don't compile many functions when building the
8567 in-process agent library.
8568 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8569 the register buffer in the heap.
8570 (free_register_cache): If the register buffer isn't owned by the
8571 regcache, don't free it.
8572 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8573 pre-existing register caches.
8574 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8575 type.
8576 (convert_ascii_to_int): : Constify `from' parameter type.
8577 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8578 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8579 the needed buffer in-place.
8580 (relocate_instruction): New.
8581 * server.c (handle_query) <qSymbols>: If the target supports
8582 tracepoints, give it a chance of looking up symbols. Report
8583 support for fast tracepoints.
8584 (handle_status): Stabilize threads.
8585 (process_serial_event): Adjust.
8586 * server.h (struct fast_tracepoint_jump): Forward declare.
8587 (struct process_info) <fast_tracepoint_jumps>: New field.
8588 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8589 (decode_X_packet, decode_M_packet): Adjust.
8590 (relocate_instruction): Declare.
8591 (in_process_agent_loaded): Declare.
8592 (tracepoint_look_up_symbols): Declare.
8593 (struct fast_tpoint_collect_status): Declare.
8594 (fast_tracepoint_collecting): Declare.
8595 (force_unlock_trace_buffer): Declare.
8596 (handle_tracepoint_bkpts): Declare.
8597 (initialize_low_tracepoint)
8598 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8599 * target.h (struct target_ops) <stabilize_threads,
8600 install_fast_tracepoint_jump_pad>: New fields.
8601 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8602 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8603 [HAVE_STDINT_H]: Include stdint.h.
8604 (trace_debug_1): Rename to ...
8605 (trace_vdebug): ... this.
8606 (trace_debug): Rename to ...
8607 (trace_debug_1): ... this. Add `level' parameter.
8608 (trace_debug): New.
8609 (ATTR_USED, ATTR_NOINLINE): New.
8610 (IP_AGENT_EXPORT): New.
8611 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8612 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8613 (about_to_request_buffer_space, trace_buffer_is_full)
8614 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8615 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8616 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8617 (traceframe_write_count, traceframes_created)
8618 (trace_state_variables)
8619 New renaming defines.
8620 (struct ipa_sym_addresses): New.
8621 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8622 (symbol_list): New.
8623 (ipa_sym_addrs): New.
8624 (all_tracepoint_symbols_looked_up): New.
8625 (in_process_agent_loaded): New.
8626 (write_e_ipa_not_loaded): New.
8627 (maybe_write_ipa_not_loaded): New.
8628 (tracepoint_look_up_symbols): New.
8629 (debug_threads) [IN_PROCESS_AGENT]: New.
8630 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8631 (UNKNOWN_SIDE_EFFECTS): New.
8632 (stop_tracing): New.
8633 (flush_trace_buffer): New.
8634 (stop_tracing_bkpt): New.
8635 (flush_trace_buffer_bkpt): New.
8636 (read_inferior_integer): New.
8637 (read_inferior_uinteger): New.
8638 (read_inferior_data_pointer): New.
8639 (write_inferior_data_pointer): New.
8640 (write_inferior_integer): New.
8641 (write_inferior_uinteger): New.
8642 (struct collect_static_trace_data_action): Delete.
8643 (enum tracepoint_type): New.
8644 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8645 <actions_str, step_actions, step_actions_str>: Only include in
8646 GDBserver.
fa593d66
PA
8647 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8648 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8649 (tracepoints): Use IP_AGENT_EXPORT.
8650 (last_tracepoint): Don't include in the IPA.
8651 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8652 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8653 (alloced_trace_state_variables): New.
8654 (trace_state_variables): Use IP_AGENT_EXPORT.
8655 (traceframe_t): Delete unused variable.
8656 (circular_trace_buffer): Don't include in the IPA.
8657 (trace_buffer_start): Delete.
8658 (struct trace_buffer_control): New.
8659 (trace_buffer_free): Delete.
8660 (struct ipa_trace_buffer_control): New.
8661 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8662 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8663 New.
8664 (trace_buffer_ctrl): New.
8665 (TRACE_BUFFER_CTRL_CURR): New.
8666 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8667 Reimplement as macros.
8668 (trace_buffer_wrap): Delete.
8669 (traceframe_write_count, traceframe_read_count)
8670 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8671 (struct tracepoint_hit_ctx) <type>: New field.
8672 (struct fast_tracepoint_ctx): New.
8673 (memory_barrier): New.
8674 (cmpxchg): New.
8675 (record_tracepoint_error): Update atomically in the IPA.
8676 (clear_inferior_trace_buffer): New.
8677 (about_to_request_buffer_space): New.
8678 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8679 updating the same buffer.
8680 (add_tracepoint): Default the tracepoint's type to trap
8681 tracepoint, and orig_size to -1.
8682 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8683 internal variables.
8684 (create_trace_state_variable): New parameter `gdb'. Handle it.
8685 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8686 (cmd_qtdp): Handle fast tracepoints.
8687 (cmd_qtdv): Adjust.
8688 (max_jump_pad_size): New.
8689 (gdb_jump_pad_head): New.
8690 (get_jump_space_head): New.
8691 (claim_jump_space): New.
8692 (sort_tracepoints): New.
8693 (MAX_JUMP_SIZE): New.
8694 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8695 IPA.
8696 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8697 support. Upload fast traceframes, and delete internal IPA
8698 breakpoints.
8699 (stop_tracing_handler): New.
8700 (flush_trace_buffer_handler): New.
8701 (cmd_qtstop): Upload fast tracepoints.
8702 (response_tracepoint): Handle fast tracepoints.
8703 (tracepoint_finished_step): Upload fast traceframes. Set the
8704 tracepoint hit context's tracepoint type.
8705 (handle_tracepoint_bkpts): New.
8706 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8707 type. Add comment about fast tracepoints.
8708 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8709 non-existing action_str field.
8710 (get_context_regcache): Handle fast tracepoints.
8711 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8712 to the regcache.
8713 (fast_tracepoint_from_jump_pad_address): New.
8714 (fast_tracepoint_from_ipa_tpoint_address): New.
8715 (collecting_t): New.
8716 (force_unlock_trace_buffer): New.
8717 (fast_tracepoint_collecting): New.
8718 (collecting): New.
8719 (gdb_collect): New.
8720 (write_inferior_data_ptr): New.
8721 (target_tp_heap): New.
8722 (target_malloc): New.
8723 (download_agent_expr): New.
8724 (UALIGN): New.
8725 (download_tracepoints): New.
8726 (download_trace_state_variables): New.
8727 (upload_fast_traceframes): New.
8728 (IPA_FIRST_TRACEFRAME): New.
8729 (IPA_NEXT_TRACEFRAME_1): New.
8730 (IPA_NEXT_TRACEFRAME): New.
8731 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8732 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8733 (gdb_jump_pad_buffer_end): New.
8734 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8735 (initialize_tracepoint): Adjust.
8736 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8737 buffer. Initialize the low module.
8738 * utils.c (PREFIX, TOOLNAME): New.
8739 (malloc_failure): Use PREFIX.
8740 (error): In the IPA, an error causes an exit.
8741 (fatal, warning): Use PREFIX.
8742 (internal_error): Use TOOLNAME.
8743 (NUMCELLS): Increase to 10.
8744 * configure, config.in: Regenerate.
8745
d149dd1d
PA
87462010-06-01 Pedro Alves <pedro@codesourcery.com>
8747
8748 * server.c (handle_query) <qSupported>: Do two passes over the
8749 qSupported string to avoid nesting strtok.
8750
f6528abd
JK
87512010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8752
8753 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8754 (CDEPS): New.
8755 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8756 -Wl,--dynamic-list.
8757 * configure: Regenerate.
8758 * proc-service.list: New.
8759
ca2a87a0
JK
87602010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8761
8762 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8763 New comment.
8764
363a6e9f
OS
87652010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8766
8767 * gdbreplay.c (remote_open): Check error return from socket() call by
8768 its equality to -1 not by it being negative.
8769 * remote-utils.c (remote_open): Likewise.
8770
d23b6cb1
PA
87712010-05-23 Pedro Alves <pedro@codesourcery.com>
8772
8773 * config.h: Regenerate.
8774
28d3cf85
MK
87752010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8776
8777 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8778 doesn't provide PTRACE_GET_THREAD_AREA.
8779
fea36a59
MK
87802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8781
8782 * linux-m68k-low.c: Include <asm/ptrace.h>
8783 (ps_get_thread_area): Implement.
8784
24b066ba
DE
87852010-05-03 Doug Evans <dje@google.com>
8786
8787 * event-loop.c (struct callback_event): New struct.
8788 (callback_list): New global.
8789 (append_callback_event, delete_callback_event): New functions.
8790 (process_callback): New function.
8791 (start_event_loop): Call it.
8792 * remote-utils.c (NOT_SCHEDULED): Define.
8793 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8794 moved out of readchar.
8795 (readchar): Rewrite. Call reschedule before returning.
8796 (reset_readchar): New function.
8797 (remote_close): Call it.
8798 (process_remaining, reschedule): New functions.
8799 * server.h (callback_handler_func): New typedef.
8800 (append_callback_event, delete_callback_event): Declare.
8801
9836d6ea
PA
88022010-05-03 Pedro Alves <pedro@codesourcery.com>
8803
8804 * proc-service.c (ps_pglobal_lookup): Use
8805 thread_db_look_up_one_symbol.
8806 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8807 parameter. Use it instead of all_symbols_looked_up.
8808 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8809 field.
8810 (all_symbols_looked_up): Don't declare.
8811 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8812 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8813 field.
8814 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8815 Set all_symbols_looked_up here.
8816 (thread_db_look_up_one_symbol): New.
8817 (thread_db_get_tls_address): Adjust.
8818 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8819 thread_db object on the heap, and tentatively set it in the
8820 process structure.
8821 (thread_db_init): Don't set all_symbols_looked_up here.
8822 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8823
7984d532
PA
88242010-05-03 Pedro Alves <pedro@codesourcery.com>
8825
8826 * linux-low.c (linux_kill, linux_detach): Adjust.
8827 (status_pending_p_callback): Remove redundant statement. Check
8828 for !TARGET_WAITIKIND_IGNORE, instead of
8829 TARGET_WAITKIND_STOPPED.
8830 (handle_tracepoints): Make sure LWP is locked. Adjust.
8831 (linux_wait_for_event_1): Adjust.
8832 (linux_cancel_breakpoints): New.
8833 (unsuspend_one_lwp): New.
8834 (unsuspend_all_lwps): New.
8835 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8836 (send_sigstop_callback): Change return type to int, add new
8837 `except' parameter and handle it.
8838 (suspend_and_send_sigstop_callback): New.
8839 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8840 pass them down. If SUSPEND, also increment the lwp's suspend
8841 count.
8842 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8843 (need_step_over_p): Don't consider suspended LWPs.
8844 (start_step_over): Adjust.
8845 (proceed_one_lwp): Change return type to int, add new `except'
8846 parameter and handle it.
8847 (unsuspend_and_proceed_one_lwp): New.
8848 (proceed_all_lwps): Use find_inferior instead of
8849 for_each_inferior.
8850 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8851 also decrement the suspend count of LWPs. Pass `except' down,
8852 instead of hacking its suspend count.
8853 (linux_pause_all): Add `freeze' parameter. Adjust.
8854 (linux_unpause_all): New.
8855 (linux_target_ops): Install linux_unpause_all.
8856 * server.c (handle_status): Adjust.
8857 * target.h (struct target_ops): New fields `unpause_all' and
8858 `cancel_breakpoints'. Add new parameter to `pause_all'.
8859 (pause_all): Add new `freeze' parameter.
8860 (unpause_all): New.
8861 (cancel_breakpoints): New.
8862 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8863 cancel breakpoints.
8864 (cmd_qtstart): Pause threads.
8865 (stop_tracing): Pause threads, and cancel breakpoints.
8866 * win32-low.c (win32_target_ops): Adjust.
8867
e471f25b
PA
88682010-05-03 Pedro Alves <pedro@codesourcery.com>
8869
8870 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8871 the inferior right away from here...
8872 (linux_wait_1): ... to here, and adjust to check the thread's
8873 last_resume_kind instead of the lwp's step or stop_expected flags.
8874
1915ef4f
PA
88752010-05-02 Pedro Alves <pedro@codesourcery.com>
8876
8877 * README: Use consistent `GDB' and `GDBserver' spellings.
8878
f9e39928
PA
88792010-05-02 Pedro Alves <pedro@codesourcery.com>
8880
8881 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8882 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8883 (linux_detach_one_lwp): Assume the lwp is stopped.
8884 (any_thread_of): Delete.
8885 (linux_detach): Stop all lwps here. Don't blindly delete all
8886 breakpoints.
8887 (delete_lwp_callback): New.
8888 (linux_mourn): Delete all lwps of the process that is gone.
8889 (linux_wait_1): Don't delete the last lwp of the process here.
8890 * mem-break.h (mark_breakpoints_out): Declare.
8891 * mem-break.c (mark_breakpoints_out): New.
8892 (free_all_breakpoints): Use it.
8893 * server.c (handle_target_event): If the process is gone, mark
8894 breakpoints out.
8895 * thread-db.c (struct thread_db) <create_bp>: New field.
8896 (thread_db_enable_reporting): Fix prototype. Store a thread event
8897 breakpoint reference in the thread_db struct.
8898 (thread_db_load_search): Clear the thread_db object.
8899 (try_thread_db_load_1): Ditto.
8900 (switch_to_process): New.
8901 (disable_thread_event_reporting): Use it.
8902 (remove_thread_event_breakpoints): New.
8903 (thread_db_detach, thread_db_mourn): Use it.
8904
1e7fc18c
PA
89052010-05-01 Pedro Alves <pedro@codesourcery.com>
8906
8907 * linux-low.c (linux_enable_event_reporting): New.
8908 (linux_wait_for_event_1, handle_extended_wait): Use it.
8909
02fc4de7
PA
89102010-04-30 Pedro Alves <pedro@codesourcery.com>
8911
8912 * linux-low.c (linux_kill_one_lwp, linux_kill)
8913 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8914 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8915 SIGSTOP even if the LWP is stopped.
8916 (send_sigstop_callback): New.
8917 (stop_all_lwps): Use send_sigstop_callback instead.
8918 (linux_resume_one_thread): Adjust.
8919 (proceed_one_lwp): Still proceed an LWP that the client has
8920 requested to stop, if we haven't reported it as stopped yet. Make
8921 sure that LWPs the client want stopped, have a pending SIGSTOP.
8922
bc3b5632
DE
89232010-04-26 Doug Evans <dje@google.com>
8924
ae1ada35
DE
8925 * server.c (handle_general_set): Make static.
8926
bc3b5632
DE
8927 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8928 Print received char after testing for error/eof instead of before.
8929 (input_interrupt): Tweak comment.
8930
65730243
DE
89312010-04-23 Doug Evans <dje@google.com>
8932
8933 * server.c (start_inferior): Print inferior argv if --debug.
8934
a8ae7dc0
AR
89352010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8936
8937 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8938 * nto-x86-low.c: Include server.h
8939
1c07cc19
PM
89402010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8941
8942 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8943 be consistent with other sources of this directory.
8944 (init_registers_amd64): Correct name of source file of this function
8945 in the comment.
8946
e0a61e09
PM
89472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8948
8949 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8950 64-bit executables.
8951
54709339
PM
89522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8953
8954 * win32-i386-low.c: Add 64-bit support.
8955 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8956 (init_registers_amd64): Declare.
8957 (mappings): Add 64-bit version of array.
8958 (init_windows_x86): New function.
8959 (the_low_target): Change init_arch field to init_windows_x86.
8960
e8f0053d
PM
89612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8962
8963 * win32-low.c: Adapt to support also 64-bit architecture.
8964 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8965 (get_image_name): Use SIZE_T type for local variable `done'.
8966 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8967 (toolhelp_get_dll_name): Idem.
8968 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8969 Use uintptr_t typecast to avoid warning.
8970 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8971 (handle_exception): Use phex_nz to avoid warning.
8972 (win32_wait): Remove unused local variable `process'.
8973
c481e77e
PM
89742010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8975
8976 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8977 `amd64-avx.o'.
8978
12ea4b69
PM
89792010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8980
8981 * configure.ac: Use `ws2_32' library for srv_mingw.
8982 * configure: Regenerate.
8983 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8984 * remote-utils.c: Likewise.
8985
f6d1620c
L
89862010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8987
8988 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8989 if __x86_64__ is defined.
8990
8e642873
PM
89912010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8992
8993 * configure: Regenerate.
8994
711e434b
PM
89952010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8996
8997 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8998 * target.h (target_ops): New get_tib_address field.
8999 * win32-low.h (win32_thread_info): Add thread_local_base field.
9000 * win32-low.c (child_add_thread): Add tlb argument.
9001 Set thread_local_base field to TLB.
9002 (get_child_debug_event): Adapt to child_add_thread change.
9003 (win32_get_tib_address): New function.
9004 (win32_target_ops): Set get_tib_address field to
9005 win32_get_tib_address.
9006 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9007
505106cd
PA
90082010-04-12 Pedro Alves <pedro@codesourcery.com>
9009
505106cd
PA
9010 * linux-low.c (linux_mourn): Also remove the process.
9011 * server.c (handle_target_event): Don't remove the process here.
9012 * nto-low.c (nto_mourn): New.
9013 (nto_target_ops): Install it.
9014 * spu-low.c (spu_mourn): New.
9015 (spu_target_ops): Install it.
9016 * win32-low.c (win32_mourn): New.
9017 (win32_target_ops): Install it.
9018
e8470a06
PA
90192010-04-12 Pedro Alves <pedro@codesourcery.com>
9020
9021 * server.h (buffer_xml_printf): Remove redundant `;'.
9022
45ba0d02
PA
90232010-04-12 Pedro Alves <pedro@codesourcery.com>
9024
9025 * regcache.c (set_register_cache): Invalidate regcaches before
9026 changing the register cache layout.
9027 (regcache_invalidate_one): Allow a NULL regcache.
9028 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9029 regcaches before changing the register cache layout or the target
9030 regsets.
9031
59e04013
L
90322010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9033
9034 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9035 variable warning on Linux/x86-64.
9036
8336d594
PA
90372010-04-11 Pedro Alves <pedro@codesourcery.com>
9038
9039 GDBserver disconnected tracing support.
9040
9041 * linux-low.c (linux_remove_process): Delete.
9042 (add_lwp): Don't set last_resume_kind here.
9043 (linux_kill): Use `mourn'.
9044 (linux_detach): Use `thread_db_detach', and `mourn'.
9045 (linux_mourn): New.
9046 (linux_attach_lwp_1): Adjust comment.
9047 (linux_attach): last_resume_kind moved the thread_info; adjust.
9048 (status_pending_p_callback): Adjust.
9049 (linux_wait_for_event_1): Adjust.
9050 (count_events_callback, select_singlestep_lwp_callback)
9051 (select_event_lwp_callback, cancel_breakpoints_callback)
9052 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9053 (proceed_one_lwp): Adjust.
9054 (linux_async): Add debug output.
9055 (linux_thread_stopped): New.
9056 (linux_pause_all): New.
9057 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9058 linux_pause_all.
9059 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9060 (thread_db_free): Delete declaration.
9061 (thread_db_detach, thread_db_mourn): Declare.
9062 * thread-db.c (thread_db_init): Use thread_db_mourn.
9063 (thread_db_free): Delete, split in two.
9064 (disable_thread_event_reporting): New.
9065 (thread_db_detach): New.
9066 (thread_db_mourn): New.
9067
9068 * server.h (struct thread_info) <last_resume_kind>: New field.
9069 <attached>: Add comment.
9070 <gdb_detached>: New field.
9071 (handler_func): Change return type to int.
9072 (handle_serial_event, handle_target_event): Ditto.
9073 (gdb_connected): Declare.
9074 (tracing): Delete.
9075 (disconnected_tracing): Declare.
9076 (stop_tracing): Declare.
9077
9078 * server.c (handle_query) <qSupported>: Report support for
9079 disconnected tracing.
9080 (queue_stop_reply_callback): Account for running threads.
9081 (gdb_wants_thread_stopped): New.
9082 (gdb_wants_all_threads_stopped): New.
9083 (gdb_reattached_process): New.
9084 (handle_status): Clear the `gdb_detached' flag of all processes.
9085 In all-stop, stop all threads.
9086 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9087 (process_serial_event): If the remote connection breaks, or if an
9088 exit was forced with "monitor exit", force an event loop exit.
9089 Handle disconnected tracing on detach.
9090 (handle_serial_event): Adjust.
9091 (handle_target_event): If GDB isn't connected, forward events back
9092 to the inferior, unless the last process exited, in which case,
9093 exit gdbserver. Adjust interface.
9094
9095 * remote-utils.c (remote_open): Don't block in accept. Instead
9096 register an event loop source on the listen socket file
9097 descriptor. Refactor bits into ...
9098 (listen_desc): ... this new global.
9099 (gdb_connected): ... this new function.
9100 (enable_async_notification): ... this new function.
9101 (handle_accept_event): ... this new function.
9102 (remote_close): Clear remote_desc.
9103
9104 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9105
9106 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9107 New fields.
9108 (mourn_inferior): Define.
9109 (target_process_qsupported): Avoid the dangling else problem.
9110 (thread_stopped): Define.
9111 (pause_all): Define.
9112 (target_waitstatus_to_string): Declare.
9113 * target.c (target_waitstatus_to_string): New.
9114
9115 * tracepoint.c (tracing): Make extern.
9116 (disconnected_tracing): New.
9117 (stop_tracing): Make extern. Handle tracing stops due to GDB
9118 disconnecting.
9119 (cmd_qtdisconnected): New.
9120 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9121 (handle_tracepoint_general_set): Handle QTDisconnected.
9122
9123 * event-loop.c (event_handler_func): Change return type to int.
9124 (process_event): Bail out if the event handler wants the event
9125 loop to stop.
9126 (handle_file_event): Ditto.
9127 (start_event_loop): Bail out if the event handler wants the event
9128 loop to stop.
9129
9130 * nto-low.c (nto_target_ops): Adjust.
9131 * spu-low.c (spu_wait): Don't remove the process here.
9132 (spu_target_ops): Adjust.
9133 * win32-low.c (win32_wait): Don't remove the process here.
9134 (win32_target_ops): Adjust.
9135
5d267c4c
PA
91362010-04-11 Pedro Alves <pedro@codesourcery.com>
9137
9138 * regcache.c (realloc_register_cache): Invalidate inferior's
9139 regcache before recreating it.
9140
623ccd72
PA
91412010-04-09 Pedro Alves <pedro@codesourcery.com>
9142
9143 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9144
219f2f23
PA
91452010-04-09 Stan Shebs <stan@codesourcery.com>
9146 Pedro Alves <pedro@codesourcery.com>
9147
9148 * server.h (LONGEST): New.
9149 (struct thread_info) <while_stepping>: New field.
9150 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9151 Declare.
9152 (initialize_tracepoint, handle_tracepoint_general_set)
9153 (handle_tracepoint_query, tracepoint_finished_step)
9154 (tracepoint_was_hit, release_while_stepping_state_list):
9155 (current_traceframe): Declare.
9156 * server.c (handle_general_set): Handle tracepoint packets.
9157 (read_memory): New.
9158 (write_memory): New.
9159 (handle_search_memory_1): Use read_memory.
9160 (handle_query): Report support for conditional tracepoints, trace
9161 state variables, and tracepoint sources. Handle tracepoint
9162 queries.
9163 (main): Initialize the tracepoints module.
9164 (process_serial_event): Handle traceframe reads/writes.
9165
9166 * linux-low.c (handle_tracepoints): New.
9167 (linux_wait_1): Call it.
9168 (linux_resume_one_lwp): Handle while-stepping.
9169 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9170 (linux_target_ops): Install them.
9171 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9172 New field.
9173 * linux-x86-low.c (x86_supports_tracepoints): New.
9174 (the_low_target). Install it.
9175
9176 * mem-break.h (delete_breakpoint): Declare.
9177 * mem-break.c (delete_breakpoint): Make external.
9178
9179 * target.h (struct target_ops): Add `supports_tracepoints',
9180 `read_pc', and `write_pc' fields.
9181 (target_supports_tracepoints): Define.
9182 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9183 (phex_nz): New.
9184
9185 * regcache.h (struct regcache) <registers_owned>: New field.
9186 (init_register_cache, regcache_cpy): Declare.
9187 (regcache_read_pc, regcache_write_pc): Declare.
9188 (register_cache_size): Declare.
9189 (supply_regblock): Declare.
9190 * regcache.c (init_register_cache): New.
9191 (new_register_cache): Use it.
9192 (regcache_cpy): New.
9193 (register_cache_size): New.
9194 (supply_regblock): New.
9195 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9196
219f2f23
PA
9197 * tracepoint.c: New.
9198
9199 * Makefile.in (OBS): Add tracepoint.o.
9200 (tracepoint.o): New rule.
9201
3a13a53b
L
92022010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9203
9204 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9205 (i386-mmx.o): New.
9206 (i386-mmx.c): Likewise.
9207 (i386-mmx-linux.o): Likewise.
9208 (i386-mmx-linux.c): Likewise.
9209
9210 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9211 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9212 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9213 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9214
9215 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9216 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9217 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9218
1570b33e
L
92192010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9220
9221 * Makefile.in (clean): Updated.
9222 (i386-avx.o): New.
9223 (i386-avx.c): Likewise.
9224 (i386-avx-linux.o): Likewise.
9225 (i386-avx-linux.c): Likewise.
9226 (amd64-avx.o): Likewise.
9227 (amd64-avx.c): Likewise.
9228 (amd64-avx-linux.o): Likewise.
9229 (amd64-avx-linux.c): Likewise.
9230
9231 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9232 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9233 (srv_amd64_regobj): Add amd64-avx.o.
9234 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9235 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9236 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9237 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9238 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9239 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9240 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9241
9242 * i387-fp.c: Include "i386-xstate.h".
9243 (i387_xsave): New.
9244 (i387_cache_to_xsave): Likewise.
9245 (i387_xsave_to_cache): Likewise.
9246 (x86_xcr0): Likewise.
9247
9248 * i387-fp.h (i387_cache_to_xsave): Likewise.
9249 (i387_xsave_to_cache): Likewise.
9250 (x86_xcr0): Likewise.
9251
9252 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9253 * linux-crisv32-low.c (target_regsets): Likewise.
9254 * linux-m68k-low.c (target_regsets): Likewise.
9255 * linux-mips-low.c (target_regsets): Likewise.
9256 * linux-ppc-low.c (target_regsets): Likewise.
9257 * linux-s390-low.c (target_regsets): Likewise.
9258 * linux-sh-low.c (target_regsets): Likewise.
9259 * linux-sparc-low.c (target_regsets): Likewise.
9260 * linux-xtensa-low.c (target_regsets): Likewise.
9261
9262 * linux-low.c: Include <sys/uio.h>.
9263 (regsets_fetch_inferior_registers): Support nt_type.
9264 (regsets_store_inferior_registers): Likewise.
9265 (linux_process_qsupported): New.
9266 (linux_target_ops): Add linux_process_qsupported.
9267
9268 * linux-low.h (regset_info): Add nt_type.
9269 (linux_target_ops): Add process_qsupported.
9270
9271 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9272 and <sys/uio.h>.
9273 (init_registers_i386_avx_linux): New.
9274 (init_registers_amd64_avx_linux): Likewise.
9275 (xmltarget_i386_linux_no_xml): Likewise.
9276 (xmltarget_amd64_linux_no_xml): Likewise.
9277 (PTRACE_GETREGSET): Likewise.
9278 (PTRACE_SETREGSET): Likewise.
9279 (x86_fill_xstateregset): Likewise.
9280 (x86_store_xstateregset): Likewise.
9281 (use_xml): Likewise.
9282 (x86_linux_update_xmltarget): Likewise.
9283 (x86_linux_process_qsupported): Likewise.
9284 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9285 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9286 init_registers_i386_linux here. Call
9287 x86_linux_update_xmltarget.
9288 (the_low_target): Add x86_linux_process_qsupported.
9289
9290 * server.c (handle_query): Call target_process_qsupported.
9291
9292 * target.h (target_ops): Add process_qsupported.
9293 (target_process_qsupported): New.
9294
fc7238bb
PA
92952010-04-03 Pedro Alves <pedro@codesourcery.com>
9296
9297 * inferiors.c (add_thread): Set last_status kind to
9298 TARGET_WAITKIND_IGNORE.
9299 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9300 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9301 (linux_wait_1): Move `thread' local definition to block that uses
9302 it. Don't NULL initialize `event_child'.
9303 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9304 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9305 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9306
bdabb078
PA
93072010-04-01 Pedro Alves <pedro@codesourcery.com>
9308
9309 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9310 an extended waitstatus, or by a watchpoint.
9311 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9312 thread was stepping or has been stopped by a watchpoint.
9313
d3bbe7a0
PA
93142010-04-01 Pedro Alves <pedro@codesourcery.com>
9315
9316 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9317 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9318 of another, then delete the previous, and validate all
9319 breakpoints.
9320 (validate_inserted_breakpoint): New.
9321 (delete_disabled_breakpoints): New.
9322 (validate_breakpoints): New.
9323 (check_mem_read): Validate breakpoints before trusting their
9324 shadow. Delete disabled breakpoints.
9325 (check_mem_write): Validate breakpoints before trusting they
9326 should be inserted. Delete disabled breakpoints.
9327 * mem-break.h (validate_breakpoints):
9328 * server.c (handle_query): Validate breakpoints when we see a
9329 qSymbol query.
9330
8b07ae33
PA
93312010-04-01 Pedro Alves <pedro@codesourcery.com>
9332
9333 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9334 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9335 if we could tell there's a GDB breakpoint at stop_pc.
9336 (need_step_over_p): Don't do a step over if we find a GDB
9337 breakpoint at the resume PC.
9338
9339 * mem-break.c (struct raw_breakpoint): New.
9340 (enum bkpt_type): New type `gdb_breakpoint'.
9341 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9342 fields. New field `raw'.
9343 (find_raw_breakpoint_at): New.
9344 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9345 breakpoint instead.
9346 (set_breakpoint_at): Adjust.
9347 (delete_raw_breakpoint): New.
9348 (release_breakpoint): New.
9349 (delete_breakpoint): Rename to...
9350 (delete_breakpoint_1): ... this. Add proc parameter. Use
9351 release_breakpoint. Return ENOENT.
9352 (delete_breakpoint): Reimplement.
9353 (find_breakpoint_at): Delete.
9354 (find_gdb_breakpoint_at): New.
9355 (delete_breakpoint_at): Delete.
9356 (set_gdb_breakpoint_at): New.
9357 (delete_gdb_breakpoint_at): New.
9358 (gdb_breakpoint_here): New.
9359 (set_reinsert_breakpoint): Use release_breakpoint.
9360 (uninsert_breakpoint): Rename to ...
9361 (uninsert_raw_breakpoint): ... this.
9362 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9363 (reinsert_raw_breakpoint): Change parameter type to
9364 raw_breakpoint.
9365 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9366 instead.
9367 (check_breakpoints): Adjust. Use release_breakpoint.
9368 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9369 (breakpoint_inserted_here): Ditto.
9370 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9371 Don't trust the breakpoint's shadow if it is not inserted.
9372 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9373 (delete_all_breakpoints): Adjust.
9374 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9375 use delete_breakpoint_1.
9376
9377 * mem-break.h (breakpoints_supported): Delete declaration.
9378 (set_gdb_breakpoint_at): Declare.
9379 (gdb_breakpoint_here): Declare.
9380 (delete_breakpoint_at): Delete.
9381 (delete_gdb_breakpoint_at): Declare.
9382
9383 * server.h (struct raw_breakpoint): Forward declare.
9384 (struct process_info): New field `raw_breakpoints'.
9385
9386 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9387 breakpoints.
9388
6bf5e0ba
PA
93892010-03-24 Pedro Alves <pedro@codesourcery.com>
9390
9391 * linux-low.c (status_pending_p_callback): Fix comment.
9392 (linux_wait_for_event_1): Move most of the internal breakpoint
9393 handling from here...
9394 (linux_wait_1): ... to here.
9395 (count_events_callback): New.
9396 (select_singlestep_lwp_callback): New.
9397 (select_event_lwp_callback): New.
9398 (cancel_breakpoints_callback): New.
9399 (select_event_lwp): New.
9400 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9401 priority to all LWPs that have had events that should be reported
9402 to the client. Cancel breakpoints when about to reporting the
9403 event to the client, not while stopping lwps. No longer cancel
9404 finished single-steps here.
9405 (cancel_finished_single_step): Delete.
9406 (cancel_finished_single_steps): Delete.
9407
414a389f
PA
94082010-03-24 Pedro Alves <pedro@codesourcery.com>
9409
9410 * mem-break.c (enum bkpt_type): New.
9411 (struct breakpoint): New field `type'.
9412 (set_breakpoint_at): Change return type to struct breakpoint
9413 pointer. Set type to `other_breakpoint' by default.
9414 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9415 in the breakpoint list.
9416 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9417 (reinsert_breakpoint): Rename to ...
9418 (reinsert_raw_breakpoint): ... this.
9419 (reinsert_breakpoints_at): Adjust.
9420 * mem-break.h (struct breakpoint): Declare.
9421 (set_breakpoint_at): Change return type to struct breakpoint
9422 pointer.
9423
2280c721
PA
94242010-03-24 Pedro Alves <pedro@codesourcery.com>
9425
9426 * server.c (handle_query): Assign, not compare.
9427
d50171e4
PA
94282010-03-24 Pedro Alves <pedro@codesourcery.com>
9429
9430 Teach linux gdbserver to step-over-breakpoints.
9431
9432 * linux-low.c (can_hardware_single_step): New.
9433 (supports_breakpoints): New.
9434 (handle_extended_wait): If stopping threads, read the stop pc of
9435 the new cloned LWP.
9436 (get_pc): New.
9437 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9438 low target doesn't support retrieving the PC.
9439 (add_lwp): Set last_resume_kind to resume_continue.
9440 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9441 (linux_attach): Don't clear stop_expected. Set the lwp's
9442 last_resume_kind to resume_stop.
9443 (linux_detach_one_lwp): Don't check for removed breakpoints.
9444 (check_removed_breakpoint): Delete.
9445 (status_pending_p): Rename to ...
9446 (status_pending_p_callback): ... this. Don't check for removed
9447 breakpoints. Don't consider threads that are stopped from GDB's
9448 perspective.
9449 (linux_wait_for_lwp): Always read the stop_pc here.
9450 (cancel_breakpoint): New.
9451 (step_over_bkpt): New global.
9452 (linux_wait_for_event_1): Implement stepping over breakpoints.
9453 (gdb_wants_lwp_stopped): New.
9454 (gdb_wants_all_stopped): New.
9455 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9456 single-step traps here. Store the thread's last reported target
9457 wait status.
9458 (send_sigstop): Don't clear stop_expected. Always set it,
9459 instead.
9460 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9461 (cancel_finished_single_step): New.
9462 (cancel_finished_single_steps): New.
9463 (wait_for_sigstop): Don't cancel finished single-step traps here.
9464 (linux_resume_one_lwp): Don't check for removed breakpoints.
9465 Don't set `step' on non-hardware step archs.
9466 (linux_set_resume_request): Ignore resume_stop requests if already
9467 stopping or stopped. Set the lwp's last_resume_kind.
9468 (resume_status_pending_p): Don't check for removed breakpoints.
9469 (need_step_over_p): New.
9470 (start_step_over): New.
9471 (finish_step_over): New.
9472 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9473 requests. Clear the thread's last reported target waitstatus.
9474 Don't use the `suspended' flag. Don't consider pending breakpoints.
9475 (linux_resume): Start a step-over if necessary.
9476 (proceed_one_lwp): New.
9477 (proceed_all_lwps): New.
9478 (unstop_all_lwps): New.
9479 * linux-low.h (struct lwp_info): Rewrite comment for the
9480 `suspended' flag. Add the `stop_pc' field. Delete the
9481 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9482 Add `'last_resume_kind' and `need_step_over' fields.
9483 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9484 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9485 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9486 (set_raw_breakpoint_at): New.
9487 (set_breakpoint_at): Rewrite to use it.
9488 (reinsert_breakpoint_handler): Delete.
9489 (set_reinsert_breakpoint): New.
9490 (reinsert_breakpoint_by_bp): Delete.
9491 (delete_reinsert_breakpoints): New.
9492 (uninsert_breakpoint): Rewrite.
9493 (uninsert_breakpoints_at): New.
9494 (reinsert_breakpoint): Rewrite.
9495 (reinsert_breakpoints_at): New.
9496 (check_breakpoints): Rewrite.
9497 (breakpoint_here): New.
9498 (breakpoint_inserted_here): New.
9499 (check_mem_read): Adjust.
9500 * mem-break.h (breakpoints_supported, breakpoint_here)
9501 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9502 (reinsert_breakpoint_by_bp): Delete declaration.
9503 (delete_reinsert_breakpoints): Declare.
9504 (reinsert_breakpoint): Delete declaration.
9505 (reinsert_breakpoints_at): Declare.
9506 (uninsert_breakpoint): Delete declaration.
9507 (uninsert_breakpoints_at): Declare.
9508 (check_breakpoints): Adjust prototype.
9509 * server.h: Adjust include order.
9510 (struct thread_info): Declare here. Add a `last_status' field.
9511
30ba68cb
MS
95122010-03-23 Michael Snyder <msnyder@vmware.com>
9513
9514 * server.c (crc32): New function.
9515 (handle_query): Add handling for 'qCRC:' request.
9516
b9a881c2
PA
95172010-03-23 Pedro Alves <pedro@codesourcery.com>
9518
9519 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9520 lwp had been stopped by a watchpoint.
9521
e92d13d5
PA
95222010-03-16 Pedro Alves <pedro@codesourcery.com>
9523
9524 * server.h (internal_error): Declare.
9525 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9526 * utils.c (internal_error): New function.
9527
64daa791
AS
95282010-03-15 Andreas Schwab <schwab@redhat.com>
9529
9530 * configure.srv: Fix typo setting srv_regobj.
9531
f52cd8cd
PA
95322010-03-15 Pedro Alves <pedro@codesourcery.com>
9533
9534 * linux-low.c (fetch_register): Avoid passing a non string literal
9535 format to `error'.
9536 (usr_store_inferior_registers): Ditto.
9537
93ae6fdc
PA
95382010-03-14 Pedro Alves <pedro@codesourcery.com>
9539
9540 * linux-low.c (linux_write_memory): Bail out early if peeking
9541 memory failed.
9542
c3adc08c
PA
95432010-03-14 Pedro Alves <pedro@codesourcery.com>
9544
9545 * linux-low.h (struct lwp_info): New fields
9546 `stopped_by_watchpoint' and `stopped_data_address'.
9547 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9548 here, and cache them in the lwp object.
9549 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9550 directly.
9551 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9552 field.
9553 (linux_stopped_by_watchpoint): Rewrite.
9554 (linux_stopped_data_address): Rewrite.
9555
bce522a2
PA
95562010-03-06 Simo Melenius <simo.melenius@iki.fi>
9557
9558 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9559 switching the current inferior, not before.
9560
90884b2b
L
95612010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9562
9563 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9564 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9565 i386-linux.c and amd64-linux.c.
9566 (reg-i386.o): Removed.
9567 (reg-i386.c): Likewise.
9568 (reg-i386-linux.o): Likewise.
9569 (reg-i386-linux.c): Likewise.
9570 (reg-x86-64.o): Likewise.
9571 (reg-x86-64.c): Likewise.
9572 (reg-x86-64-linux.o): Likewise.
9573 (reg-x86-64-linux.c): Likewise.
9574 (i386.o): New.
9575 (i386.c): Likewise.
9576 (i386-linux.o): Likewise.
9577 (i386-linux.c): Likewise.
9578 (amd64.o): Likewise.
9579 (amd64.c): Likewise.
9580 (amd64-linux.o): Likewise.
9581 (amd64-linux.c): Likewise.
9582
9583 * configure.srv (srv_i386_regobj): New.
9584 (srv_i386_linux_regobj): Likewise.
9585 (srv_amd64_regobj): Likewise.
9586 (srv_amd64_linux_regobj): Likewise.
9587 (srv_i386_32bit_xmlfiles): Likewise.
9588 (srv_i386_64bit_xmlfiles): Likewise.
9589 (srv_i386_xmlfiles): Likewise.
9590 (srv_amd64_xmlfiles): Likewise.
9591 (srv_i386_linux_xmlfiles): Likewise.
9592 (srv_amd64_linux_xmlfiles): Likewise.
9593 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9594 srv_xmlfiles to $srv_i386_xmlfiles.
9595 (i[34567]86-*-mingw32ce*): Likewise.
9596 (i[34567]86-*-mingw*): Likewise.
9597 (i[34567]86-*-nto*): Likewise.
9598 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9599 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9600 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9601 (x86_64-*-linux*): Likewise.
9602
9603 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9604 (init_registers_amd64_linux): New.
9605 (x86_arch_setup): Replace init_registers_x86_64_linux with
9606 init_registers_amd64_linux.
9607
193f13e6
MK
96082010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9609
9610 * configure.ac: Check for libdl. If it is not available link against
9611 static libthread_db.
9612 * configure: Regenerate.
9613
85d721b8
PA
96142010-02-22 Pedro Alves <pedro@codesourcery.com>
9615
9616 PR9605
9617
9618 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9619 handing a read watchpoint.
9620 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9621
6076632b
DE
96222010-02-12 Doug Evans <dje@google.com>
9623
9624 * linux-low.c (linux_supports_tracefork_flag): Document.
9625 (linux_look_up_symbols): Add comment.
9626
3327ccf7
L
96272010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9628
9629 * regcache.c (supply_register): Clear regcache if buf is NULL.
9630
0718675c 96312010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9632 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9633
9634 * inferiors.c (find_inferior): Add function documentation.
9635 (unloaded_dll): Handle the case where the unloaded dll has not
9636 been previously registered in the dll list.
9637
177321bd
DJ
96382010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9639
9640 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9641 (thumb2_breakpoint): New.
9642 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9643
2b009048
DJ
96442010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9645
9646 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9647 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9648 breakpoints.
9649
3be029c7
PA
96502010-01-21 Pedro Alves <pedro@codesourcery.com>
9651
9652 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9653
18f5de3b
JK
96542010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9655
9656 * linux-s390-low.c (s390_collect_ptrace_register)
9657 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9658
3743bb4f
DE
96592010-01-21 Doug Evans <dje@google.com>
9660
14ce3065
DE
9661 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9662 (PTRACE_ARG4_TYPE): New macro.
9663 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9664 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9665 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9666 (usr_store_inferior_registers): Ditto.
9667 (linux_read_memory, linux_write_memory): Ditto.
9668 (linux_test_for_tracefork): Ditto.
9669
3743bb4f
DE
9670 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9671 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9672
8b315be5
PA
96732010-01-21 Pedro Alves <pedro@codesourcery.com>
9674
9675 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9676 target.
9677
85492558
PA
96782010-01-21 Pedro Alves <pedro@codesourcery.com>
9679
9680 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9681 prototype to take a regcache. Adjust.
9682
442ea881
PA
96832010-01-20 Pedro Alves <pedro@codesourcery.com>
9684
9685 * regcache.h (struct thread_info): Forward declare.
9686 (struct regcache): New.
9687 (new_register_cache): Adjust prototype.
9688 (get_thread_regcache): Declare.
9689 (free_register_cache): Adjust prototype.
9690 (registers_to_string, registers_from_string): Ditto.
9691 (supply_register, supply_register_by_name, collect_register)
9692 (collect_register_as_string, collect_register_by_name): Ditto.
9693 * regcache.c (struct inferior_regcache_data): Delete.
9694 (get_regcache): Rename to ...
9695 (get_thread_regcache): ... this. Adjust. Switch inferior before
9696 fetching registers.
9697 (regcache_invalidate_one): Adjust.
9698 (regcache_invalidate): Fix prototype.
9699 (new_register_cache): Return the new register cache.
9700 (free_register_cache): Change prototype.
9701 (realloc_register_cache): Adjust.
9702 (registers_to_string): Change prototype to take a regcache. Adjust.
9703 (registers_from_string): Ditto.
9704 (register_data): Ditto.
9705 (supply_register): Ditto.
9706 (supply_register_by_name): Ditto.
9707 (collect_register): Ditto.
9708 (collect_register_as_string): Ditto.
9709 (collect_register_by_name): Ditto.
9710 * server.c (process_serial_event): Adjust.
9711 * linux-low.h (regset_fill_func, regset_store_func): Change
9712 prototype.
9713 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9714 Change prototype.
9715 * linux-low.c (get_stop_pc): Adjust.
9716 (check_removed_breakpoint): Adjust.
9717 (linux_wait_for_event): Adjust.
9718 (linux_resume_one_lwp): Adjust.
9719 (fetch_register): Add regcache parameter. Adjust.
9720 (usr_store_inferior_registers): Ditto.
9721 (regsets_fetch_inferior_registers): Ditto.
9722 (regsets_store_inferior_registers): Ditto.
9723 (linux_fetch_registers, linux_store_registers): Ditto.
9724 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9725 regcache. Adjust.
43aaf8b6
PA
9726 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9727 Ditto.
442ea881
PA
9728 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9729 prototype to take a regcache.
9730 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9731 * remote-utils.c (convert_ascii_to_int, outreg)
9732 (prepare_resume_reply): Change prototype to take a regcache.
9733 Adjust.
9734 * target.h (struct target_ops) <fetch_registers, store_registers>:
9735 Change prototype to take a regcache.
9736 (fetch_inferior_registers, store_inferior_registers): Change
9737 prototype to take a regcache. Adjust.
9738 * proc-service.c (ps_lgetregs): Adjust.
9739 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9740 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9741 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9742 take a regcache. Adjust.
9743 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9744 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9745 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9746 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9747 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9748 (cris_cannot_fetch_register):
9749 (cris_breakpoint_at): Change prototype to take a regcache.
9750 Adjust.
9751 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9752 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9753 to take a regcache. Adjust.
9754 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9755 Adjust.
9756 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9757 take a regcache. Adjust.
9758 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9759 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9760 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9761 * linux-mips-low.c (mips_get_pc):
9762 (mips_set_pc): Change prototype to take a regcache. Adjust.
9763 (mips_reinsert_addr): Adjust.
9764 (mips_collect_register): Change prototype to take a regcache.
9765 Adjust.
9766 (mips_supply_register):
9767 (mips_collect_register_32bit, mips_supply_register_32bit)
9768 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9769 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9770 * linux-ppc-low.c (ppc_supply_ptrace_register)
9771 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9772 (parse_spufs_run): Adjust.
9773 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9774 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9775 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9776 take a regcache. Adjust.
9777 * linux-s390-low.c (s390_collect_ptrace_register)
9778 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9779 (s390_set_pc): Change prototype to take a regcache. Adjust.
9780 (s390_arch_setup): Adjust.
9781 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9782 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9783 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9784 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9785 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9786 regcache. Adjust.
9787 (sparc_breakpoint_at): Adjust.
9788 * linux-xtensa-low.c (xtensa_fill_gregset):
9789 (xtensa_store_gregset):
9790 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9791 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9792 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9793 prototype to take a regcache. Adjust.
9794 * win32-arm-low.c (arm_fetch_inferior_register)
9795 (arm_store_inferior_register): Change prototype to take a
9796 regcache. Adjust.
9797 * win32-i386-low.c (i386_fetch_inferior_register)
9798 (i386_store_inferior_register): Change prototype to take a
9799 regcache. Adjust.
9800 * win32-low.c (child_fetch_inferior_registers)
9801 (child_store_inferior_registers): Change prototype to take a
9802 regcache. Adjust.
9803 (win32_wait): Adjust.
9804 (win32_fetch_inferior_registers): Change prototype to take a
9805 regcache. Adjust.
9806 (win32_store_inferior_registers): Adjust.
9807 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9808 store_inferior_register>: Change prototype to take a regcache.
9809
60c3d7b0
DE
98102010-01-20 Doug Evans <dje@google.com>
9811
9812 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9813 #ifdef.
9814 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9815 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9816
dc146f7c
VP
98172010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9818
9819 * linux-low.c (linux_core_of_thread): New.
9820 (compare_ints, show_process, list_threads): New.
9821 (linux_qxfer_osdata): Report threads and cores.
9822 (linux_target_op): Register linux_core_of_thread.
9823 * remote-utils.c (prepare_resume_reply): Report the core.
9824 (buffer_xml_printf): Support %d specifier.
9825 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9826 New.
9827 (handle_query): Handle qXfer:threads. Announce availability
9828 thereof.
9829 * target.h (struct target_ops): New field core_of_thread.
9830
7803799a
UW
98312010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9832
9833 * Makefile.in (clean): Remove new generated files.
9834 (reg-s390.o, reg-s390.c): Remove rules.
9835 (reg-s390x.o, reg-s390x.c): Likewise.
9836 (s390-linux32.o, s390-linux32.c): Add rules.
9837 (s390-linux64.o, s390-linux64.c): Likewise.
9838 (s390x-linux64.o, s390x-linux64.c): Likewise.
9839 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9840 * linux-s390-low.c: Include <elf.h>.
9841 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9842 (init_registers_s390): Remove prototype.
9843 (init_registers_s390x): Likewise.
9844 (init_registers_s390_linux32): Add prototype.
9845 (init_registers_s390_linux64): Likewise.
9846 (init_registers_s390x_linux64): Likewise.
9847 (s390_num_regs_3264): New define.
9848 (s390_regmap_3264): New global variable.
9849 (s390_cannot_fetch_register): Remove obsolete check.
9850 (s390_cannot_store_register): Likewise.
9851 (s390_collect_ptrace_register): Handle upper/lower register halves.
9852 (s390_supply_ptrace_register): Likewise.
9853 (s390_fill_gregset): Update to register number changes.
9854 (s390_get_hwcap): New routine.
9855 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9856 Install appropriate regmap and register set.
9857
6e7ffa39
JB
98582010-01-01 Joel Brobecker <brobecker@adacore.com>
9859
9860 * server.c (gdbserver_version): Update copyright year to 2010.
9861 * gdbreplay.c (gdbreplay_version): Likewise.
9862
957f3f49
DE
98632009-12-28 Doug Evans <dje@google.com>
9864
9865 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9866 elf/external.h. Include <elf.h> instead but only if necessary.
9867
ca5c370d
PA
98682009-12-28 Pedro Alves <pedro@codesourcery.com>
9869
9870 * linux-low.c (linux_remove_process): Remove `detaching'
9871 parameter. Don't release/detach from thread_db here.
9872 (linux_kill): Release/detach from thread_db here, ...
9873 (linux_detach): ... and here, before actually detaching.
9874 (linux_wait_1): ... and here, when a process exits.
9875 * thread-db.c (any_thread_of): New.
9876 (thread_db_free): Switch the current inferior to a thread of the
9877 passed in process.
9878
4ee62156
DE
98792009-12-21 Doug Evans <dje@google.com>
9880
d90e6a88
DE
9881 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9882
c5f62d5f
DE
9883 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9884 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9885 warning ifndef __NR_tkill. Move setting of errno there too.
9886 Delete unnecessary resetting of errno after syscall.
9887 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9888
10e86dd7
DE
9889 * configure.ac: Check for dladdr.
9890 * config.in: Regenerate.
9891 * configure: Regenerate.
9892 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9893 (try_thread_db_load): Update.
9894
4ee62156
DE
9895 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9896
00f515da
DE
98972009-12-18 Doug Evans <dje@google.com>
9898
e9464885
DE
9899 * event-loop.c: Include unistd.h if it exists.
9900
07d4f67e
DE
9901 * linux-low.c (my_waitpid): Move definition away from being in
9902 between linux_tracefork_child/linux_test_for_tracefork.
9903
00f515da
DE
9904 * gdb_proc_service.h (psaddr_t): Fix type.
9905 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9906 signature to match glibc.
9907
1de1badb
DE
99082009-12-16 Doug Evans <dje@google.com>
9909
9910 * linux-low.c (linux_read_memory): Fix argument to read.
9911
aeeb81d1
PA
99122009-11-26 Pedro Alves <pedro@codesourcery.com>
9913
9914 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9915 events, don't leave current_inferior pointing at null.
9916
10357975
PA
99172009-11-26 Pedro Alves <pedro@codesourcery.com>
9918
9919 * win32-low.c (LOG): Delete.
9920 (OUTMSG): Output to stderr.
9921 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9922 on compile time LOG macro.
9923 (win32_wait): Fix debug output.
9924
cf6e3471
PA
99252009-11-26 Pedro Alves <pedro@codesourcery.com>
9926
9927 * win32-low.c (win32_add_one_solib): If the dll name is
9928 "ntdll.dll", prepend the system directory to the dll path.
9929
0c85e18e
MK
99302009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9931
9932 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9933
9ac544ce 99342009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9935 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9936
9937 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9938 * configure.ac: Check for __mcoldfire__ and set
9939 gdb_cv_m68k_is_coldfire.
9940 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9941 reg-cf.o and reg-m68k.o.
9942 * configure: Regenerated.
9943
fd7dd3e6
PA
99442009-11-16 Pedro Alves <pedro@codesourcery.com>
9945
9946 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9947 Pass it to thread_db_free.
9948 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9949 proper `detaching' argument to linux_remove_process.
9950 * linux-low.h (thread_db_free): Add `detaching' parameter.
9951 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9952 to thread_db_free.
9953 (thread_db_free): Add `detaching' parameter. Only
9954 call td_ta_clear_event if detaching from process.
9955
75aa492e
MK
99562009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9957
9958 * thread-db.c (thread_db_free): Fix typo.
9959
21e1bee4
PP
99602009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9961
9962 PR gdb/10838
9963 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9964
8838b45e
NS
99652009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9966
9967 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9968 with an i686 compiler.
9969 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9970 needed.
9971 * configure: Rebuilt.
9972
8a35fb51
SL
99732009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9974
9975 PR gdb/10783
9976
9977 * server.c (handle_search_memory_1): Correct read_addr initialization
9978 in loop for searching subsequent chunks.
9979
96f15937
PP
99802009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9981
9982 * configure.ac: New --with-libthread-db option.
9983 * thread-db.c: Allow direct dependence on libthread_db.
9984 (thread_db_free): Adjust.
9985 * config.in: Regenerate.
9986 * configure: Likewise.
889bf7c5 9987
5f7d1694
PP
99882009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9989
9990 PR gdb/10757
9991 * thread-db.c (attach_thread): New function.
9992 (maybe_attach_thread): Return success/failure.
9993 (find_new_threads_callback): Adjust.
889bf7c5
PA
9994 (thread_db_find_new_threads): Loop until no new threads.
9995
88e3b899
PA
99962009-10-13 Pedro Alves <pedro@codesourcery.com>
9997
9998 * proc-service.c (ps_lgetregs): Formatting.
9999
cdbfd419
PP
100002009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10001
10002 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10003 * configure.ac: Adjust.
10004 * linux-low.h (struct process_info_private): Move members to struct
10005 thread_db.
10006 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10007 * linux-low.c (linux_remove_process): Adjust.
10008 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10009 * server.c (handle_query): Move code ...
10010 (handle_monitor_command): ... here. New function.
10011 * target.h (struct target_ops): New member.
10012 * thread-db.c (struct thread_db): New.
10013 (libthread_db_search_path): New variable.
10014 (thread_db_create_event, thread_db_enable_reporting)
10015 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10016 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10017 (try_thread_db_load_1, dladdr_to_soname): New functions.
10018 (try_thread_db_load, thread_db_load_search): New functions.
10019 (thread_db_init): Search for libthread_db.
10020 (thread_db_free): New function.
10021 (thread_db_handle_monitor_command): Likewise.
10022 * config.in: Regenerate.
10023 * configure: Regenerate.
889bf7c5 10024
4168d2d6
UW
100252009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10026
10027 * spu-low.c (spu_kill): Wait for inferior to terminate.
10028 Call clear_inferiors.
10029 (spu_detach): Call clear_inferiors.
10030
81ecdfbb
RW
100312009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10032
10033 * aclocal.m4: Regenerate.
10034 * config.in: Likewise.
10035 * configure: Likewise.
10036
0b9ff2c0
UW
100372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10038
10039 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10040 (parse_spufs_run): New function.
10041 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10042 (ppc_breakpoint_at): Handle SPU breakpoints.
10043
efcbbd14
UW
100442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10045
10046 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10047 (SPUFS_MAGIC): Define.
10048 (spu_enumerate_spu_ids): New function.
10049 (linux_qxfer_spu): New function.
10050 (linux_target_ops): Install linux_qxfer_spu.
10051
f4d9bade
UW
100522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10053
10054 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10055 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10056 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10057 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10058 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10059 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10060 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10061 (init_registers_powerpc_cell32l): Add prototype.
10062 (init_registers_powerpc_cell64l): Likewise.
10063 (ppc_arch_setup): Detect Cell/B.E. architecture.
10064
96e946ca
RW
100652009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10066
10067 * Makefile.in (datarootdir): New variable.
10068
58d6951d
DJ
100692009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10070
10071 * linux-low.c (linux_write_memory): Update debugging output.
10072 * Makefile.in (clean): Add new descriptions.
10073 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10074 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10075 * configure.srv: Add new files for arm*-*-linux*.
10076 * linux-arm-low.c: Add new declarations.
10077 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10078 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10079 (HWCAP_VFPv3D16): New.
10080 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10081 instead of __IWMMXT__.
10082 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10083 (arm_arch_setup): New.
10084 (target_regsets): Remove #ifdef. Add VFP regset.
10085 (the_low_target): Use arm_arch_setup.
10086
12b42a12
DJ
100872009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10088
10089 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10090 the main thread again.
10091
ac8c974e
AR
100922009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10093
10094 Adding Neutrino gdbserver.
10095 * configure: Regenerated.
10096 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10097 * configure.srv (i[34567]86-*-nto*): New target.
10098 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10099 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10100 (nto_comctrl) [__QNX__]: New function.
10101 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10102
4424e0c3 101032009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10104
10105 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10106 srv_tgtobj.
10107
912cf4ba
PA
101082009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10109 Pedro Alves <pedro@codesourcery.com>
10110
10111 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10112 don't support CONTEXT_EXTENDED_REGISTERS.
10113 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10114 (the_low_target): Install them.
10115 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10116 failing with ERROR_PIPE_NOT_CONNECTED.
10117
aa5ca48f
DE
101182009-06-30 Doug Evans <dje@google.com>
10119 Pierre Muller <muller@ics.u-strasbg.fr>
10120
10121 Add h/w watchpoint support to x86-linux, win32-i386.
10122 * Makefile.in (SFILES): Add i386-low.c
10123 (i386_low_h): Define.
10124 (i386-low.o): Add dependencies.
10125 (linux-x86-low.o): Add i386-low.h dependency.
10126 (win32-i386-low.o): Ditto.
10127 * i386-low.c: New file.
10128 * i386-low.h: New file.
10129 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10130 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10131 * linux-low.c (linux_add_process): Initialize arch_private.
10132 (linux_remove_process): Free arch_private.
10133 (add_lwp): Initialize arch_private.
10134 (delete_lwp): Free arch_private.
10135 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10136 provided.
10137 * linux-low.h (process_info_private): New member arch_private.
10138 (lwp_info): New member arch_private.
10139 (linux_target_ops): New members new_process, new_thread,
10140 prepare_to_resume.
10141 (ptid_of): New macro.
10142 * linux-x86-low.c: Include stddef.h, i386-low.h.
10143 (arch_process_info): New struct.
10144 (arch_lwp_info): New struct.
10145 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10146 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10147 (i386_dr_low_get_status): New function.
10148 (x86_insert_point, x86_remove_point): New functions.
10149 (x86_stopped_by_watchpoint): New function.
10150 (x86_stopped_data_address): New function.
10151 (x86_linux_new_process, x86_linux_new_thread): New functions.
10152 (x86_linux_prepare_to_resume): New function.
10153 (the_low_target): Add entries for insert_point, remove_point,
10154 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10155 prepare_to_resume.
10156 * server.c (debug_hw_points): New global.
10157 (monitor_show_help): Document set debug-hw-points.
10158 (handle_query): Process "set debug-hw-points".
10159 * server.h (debug_hw_points): Declare.
10160 (paddress): Declare.
10161 * utils.c (NUMCELLS, CELLSIZE): New macros.
10162 (get_sell, xsnprintf, paddress): New functions.
10163 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10164 remove_point, stopped_by_watchpoint, stopped_data_address.
10165 * win32-i386-low.c: Include i386-low.h.
10166 (debug_reg_state): Replaces dr.
10167 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10168 (i386_dr_low_get_status): New function.
10169 (i386_insert_point, i386_remove_point): New functions.
10170 (i386_stopped_by_watchpoint): New function.
10171 (i386_stopped_data_address): New function.
10172 (i386_initial_stuff): Update.
10173 (get_thread_context,set_thread_context,i386_thread_added): Update.
10174 (the_low_target): Add entries for insert_point,
10175 remove_point, stopped_by_watchpoint, stopped_data_address.
10176 * win32-low.c (win32_insert_watchpoint): New function.
10177 (win32_remove_watchpoint): New function.
10178 (win32_stopped_by_watchpoint): New function.
10179 (win32_stopped_data_address): New function.
10180 (win32_target_ops): Add entries for insert_watchpoint,
10181 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10182 * win32-low.h (win32_target_ops): New members insert_point,
10183 remove_point, stopped_by_watchpoint, stopped_data_address.
10184
d993e290
PA
101852009-06-25 Pedro Alves <pedro@codesourcery.com>
10186
10187 * server.c (process_serial_event): Re-return unsupported, not
10188 error, if the type isn't recognized. Re-allow supporting only
10189 insert or remove packets. Also call require_running for
10190 breakpoints. Add missing break statement to default case. Tidy.
10191 * target.h (struct target_ops): Rename insert_watchpoint to
10192 insert_point, and remove_watchpoint to remove_point.
10193
10194 * linux-low.h (struct linux_target_ops): Likewise.
10195 * linux-low.c (linux_insert_watchpoint): Rename to ...
10196 (linux_insert_point): ... this. Adjust.
10197 (linux_remove_watchpoint): Rename to ...
10198 (linux_remove_point): ... this. Adjust.
10199 (linux_target_ops): Adjust.
10200 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10201 (cris_insert_point): ... this.
10202 (cris_remove_watchpoint): Rename to ...
10203 (cris_remove_point): ... this.
10204 (the_low_target): Adjust.
10205
0f54c268
PM
102062009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10207
10208 * server.c (handle_v_kill): Pass signal_pid to
10209 kill_inferior if multi_process is zero.
10210
c6314022
AR
102112009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10212
10213 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10214 * target.h (target_ops): Comment for *_watchpoint to make it clear
10215 the functions can get types '0' and '1'.
10216
4463ce24
AR
102172009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10218
10219 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10220 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10221 * regcache.c (get_regcache): Likewise.
10222 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10223 * win32-low.c (child_fetch_inferior_registers): Remove check for
10224 regno 0.
10225
cf8fd78b
PA
102262009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10227 Pedro Alves <pedro@codesourcery.com>
10228
10229 * target.h (struct target_ops) <supports_multi_process>: New
10230 callback.
10231 (target_supports_multi_process): New.
10232 * server.c (handle_query): Even if GDB reports support, only
10233 enable multi-process if the target also supports it. Report
10234 multi-process support only if the target backend supports it.
10235 * linux-low.c (linux_supports_multi_process): New function.
10236 (linux_target_ops): Install it as target_supports_multi_process
10237 callback.
10238
47c0c975
DE
102392009-05-24 Doug Evans <dje@google.com>
10240
e09875d4
DE
10241 Global renaming of find_thread_pid to find_thread_ptid.
10242 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10243 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10244 All callers updated.
10245
e27d73f6
DE
10246 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10247 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10248 directly.
10249
47c0c975
DE
10250 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10251 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10252 (linux_resume_one_lwp): Ditto.
10253
2acc282a
DE
102542009-05-23 Doug Evans <dje@google.com>
10255
10256 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10257 from struct inferior_list_entry * to struct lwp_info *.
10258 All callers updated.
10259
9f1036c1
DE
102602009-05-13 Doug Evans <dje@google.com>
10261
10262 * linux-x86-low.c: Don't include assert.h.
10263 (x86_siginfo_fixup): Use fatal, not assert.
10264 (x86_arch_setup): Fix comment.
10265
d0722149
DE
102662009-05-12 Doug Evans <dje@google.com>
10267
10268 Biarch support for i386/amd64 gdbserver.
10269 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10270 Add linux-x86-low.c.
10271 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10272 (linux-x86-low.o): Add.
10273 * linux-x86-64-low.c: Delete.
10274 * linux-i386-low.c: Delete.
10275 * linux-x86-low.c: New file.
10276 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10277 linux-x86-low.o.
10278 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10279 linux-x86-low.o.
10280 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10281 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10282 (linux_child_pid_to_exec_file): New function.
10283 (elf_64_header_p, elf_64_file_p): New functions.
10284 (siginfo_fixup): New function.
10285 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10286 give target a chance to convert layout.
10287 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10288 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10289
fdeb2a12
DE
102902009-05-07 Doug Evans <dje@google.com>
10291
10292 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10293 (regsets_store_inferior_registers): Ditto.
10294
a6dbe5df
PA
102952009-05-06 Pedro Alves <pedro@codesourcery.com>
10296
10297 PR server/10048
10298
10299 * linux-low.c (must_set_ptrace_flags): Delete.
10300 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10301 of the global.
10302 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10303 `lwp->must_set_ptrace_flags' instead.
ba42693b 10304 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10305 (linux_wait_1): ... not here.
10306
5091eb23
DE
103072009-04-30 Doug Evans <dje@google.com>
10308
9f767825
DE
10309 * inferiors.c (started_inferior_callback): New function.
10310 (attached_inferior_callback): New function.
10311 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10312 * server.c (print_started_pid, print_attached_pid): New functions.
10313 (detach_or_kill_for_exit): New function.
10314 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10315 * server.h (have_started_inferiors_p): Declare.
10316 (have_attached_inferiors_p): Declare.
10317
5091eb23
DE
10318 * inferiors.c (remove_process): Fix memory leak, free process.
10319 * linux-low.c (linux_remove_process): New function.
10320 (linux_kill): Call it instead of remove_process.
10321 (linux_detach, linux_wait_1): Ditto.
10322
155c8968
PA
103232009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10324
10325 * configure.srv: Add x86 Windows CE target.
10326
7fe519cb
UW
103272009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10328
10329 * inferiors.c (get_thread_process): Make global.
10330 * server.h (get_thread_process): Add prototype.
10331 * thread-db.c (find_one_thread): Use get_thread_process
10332 instead of current_process.
10333 (thread_db_get_tls_address): Do not crash if called when
10334 thread layer is not yet initialized.
10335
5472f405
UW
103362009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10337
10338 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10339 * spu-low.c (current_tid): Rename to ...
10340 (current_ptid): ... this.
10341 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10342 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10343 ptid_get_lwp (current_ptid) instead of current_tid.
10344 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10345 instead of current_tid. Use find_process_pid to verify pid
10346 argument is valid. Pass proper argument to remove_process.
10347 (spu_thread_alive): Compare current_ptid instead of current_tid.
10348 (spu_resume): Likewise.
10349
55ac2b99
PA
103502009-04-02 Pedro Alves <pedro@codesourcery.com>
10351
10352 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10353 variable.
10354
95954743
PA
103552009-04-01 Pedro Alves <pedro@codesourcery.com>
10356
10357 Implement the multiprocess extensions, and add linux multiprocess
10358 support.
10359
10360 * server.h (ULONGEST): Declare.
10361 (struct ptid, ptid_t): New.
10362 (minus_one_ptid, null_ptid): Declare.
10363 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10364 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10365 (struct inferior_list_entry): Change `id' type from unsigned from
10366 to ptid_t.
10367 (struct sym_cache, struct breakpoint, struct
10368 process_info_private): Forward declare.
10369 (struct process_info): Declare.
10370 (current_process): Declare.
10371 (all_processes): Declare.
10372 (initialize_inferiors): Declare.
10373 (add_thread): Adjust to use ptid_t.
10374 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10375 (add_process, remove_process, find_thread_pid): Declare.
10376 (find_inferior_id): Adjust to use ptid_t.
10377 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10378 (multi_process): Declare.
10379 (push_event): Adjust to use ptid_t.
10380 (read_ptid, write_ptid): Declare.
10381 (prepare_resume_reply): Adjust to use ptid_t.
10382 (clear_symbol_cache): Declare.
10383 * inferiors.c (all_processes): New.
10384 (null_ptid, minus_one_ptid): New.
10385 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10386 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10387 (add_thread): Change unsigned long to ptid. Remove gdb_id
10388 parameter. Adjust.
10389 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10390 (gdb_id_to_thread): Rename to ...
10391 (find_thread_pid): ... this. Change unsigned long to ptid.
10392 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10393 (loaded_dll, pull_pid_from_list): Adjust.
10394 (add_process, remove_process, find_process_pid)
10395 (get_thread_process, current_process, initialize_inferiors): New.
10396 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10397 (struct target_waitstatus) <related_pid>: Ditto.
10398 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10399 return type to int.
10400 (struct target_ops) <join>: Add `pid' argument.
10401 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10402 (struct target_ops) <wait>: Add `ptid' field. Change return type
10403 to ptid.
10404 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10405 (mywait): Add `ptid' argument. Change return type to ptid_t.
10406 (target_pid_to_str): Declare.
10407 * target.c (set_desired_inferior): Adjust to use ptids.
10408 (mywait): Add new `ptid' argument. Adjust.
10409 (target_pid_to_str): New.
10410 * mem-break.h (free_all_breakpoints): Declare.
10411 * mem-break.c (breakpoints): Delelete.
10412 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10413 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10414 to use per-process breakpoint list.
10415 (free_all_breakpoints): New.
10416 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10417 (symbol_cache, all_symbols_looked_up): Delete.
10418 (hexchars): New.
10419 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10420 read_ptid): New.
10421 (prepare_resume_reply): Change ptid argument's type from unsigned
10422 long to ptid_t. Adjust. Implement W;process and X;process.
10423 (free_sym_cache, clear_symbol_cache): New.
10424 (look_up_one_symbol): Adjust to per-process symbol cache. *
10425 * server.c (cont_thread, general_thread, step_thread): Change type
10426 to ptid_t.
10427 (attached): Delete.
10428 (multi_process): New.
10429 (last_ptid): Change type to ptid_t.
10430 (struct vstop_notif) <ptid>: Change type to ptid_t.
10431 (queue_stop_reply, push_event): Change `ptid' argument's type to
10432 ptid_t.
10433 (discard_queued_stop_replies): Add `pid' argument.
10434 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10435 changes. Don't reference the `attached' global.
10436 (attach_inferior): Adjust to mywait interface changes.
10437 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10438 features. Handle and report "multiprocess+". Handle
10439 "qAttached:PID".
10440 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10441 changes.
10442 (handle_v_kill): New.
10443 (handle_v_stopped): Adjust to use target_pid_to_str.
10444 (handle_v_requests): Allow multiple attaches and runs when
10445 multiprocess extensions are in effect. Handle "vKill".
10446 (myresume): Adjust to use ptids.
10447 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10448 (handle_status): Adjust to discard_queued_stop_replies interface
10449 change.
10450 (first_thread_of, kill_inferior_callback)
10451 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10452 (main): Call initialize_inferiors. Adjust to use ptids, killing
10453 and detaching from all inferiors. Handle multiprocess packet
10454 variants.
10455 * linux-low.h: Include gdb_proc_service.h.
10456 (struct process_info_private): New.
10457 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10458 <lwpid_of>: Use ptid_get_lwp.
10459 (get_lwp_thread): Adjust.
10460 (struct lwp_info): Add `dead' member.
10461 (find_lwp_pid): Declare.
10462 * linux-low.c (thread_db_active): Delete.
10463 (new_inferior): Adjust comment.
10464 (inferior_pid): Delete.
10465 (linux_add_process): New.
10466 (handle_extended_wait): Adjust.
10467 (add_lwp): Change unsigned long to ptid.
10468 (linux_create_inferior): Add process to processes table. Adjust
10469 to use ptids. Don't set new_inferior here.
10470 (linux_attach_lwp): Rename to ...
10471 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10472 it. Adjust to use ptids.
10473 (linux_attach_lwp): New.
10474 (linux_attach): Add process to processes table. Don't set
10475 new_inferior here.
10476 (struct counter): New.
10477 (second_thread_of_pid_p, last_thread_of_process_p): New.
10478 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10479 multiple processes.
10480 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10481 processes. Remove process from process table.
10482 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10483 to multiple processes.
10484 (any_thread_of): New.
10485 (linux_detach): Add `pid' argument, and handle it. Remove process
10486 from processes table.
10487 (linux_join): Add `pid' argument. Handle it.
10488 (linux_thread_alive): Change unsighed long argument to ptid_t.
10489 Consider dead lwps as not being alive.
10490 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10491 threads we're not interested in.
10492 (same_lwp, find_lwp_pid): New.
10493 (linux_wait_for_lwp): Change `pid' argument's type from int to
10494 ptid_t. Adjust.
10495 (linux_wait_for_event): Rename to ...
10496 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10497 from int to ptid_t. Adjust.
10498 (linux_wait_for_event): New.
10499 (linux_wait_1): Add `ptid' argument. Change return type to
10500 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10501 that exit from the process table.
10502 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10503 Adjust.
10504 (mark_lwp_dead): New.
10505 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10506 stopping all threads, mark its main lwp as dead.
10507 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10508 ptids.
10509 (fetch_register, usr_store_inferior_registers)
10510 (regsets_fetch_inferior_registers)
10511 (regsets_store_inferior_registers, linux_read_memory)
10512 (linux_write_memory): Inline `inferior_pid'.
10513 (linux_look_up_symbols): Adjust to use per-process
10514 `thread_db_active'.
10515 (linux_request_interrupt): Adjust to use ptids.
10516 (linux_read_auxv): Inline `inferior_pid'.
10517 (initialize_low): Don't reference thread_db_active.
10518 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10519 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10520 (ps_getpid): Return the pid of the current inferior.
10521 * thread-db.c (proc_handle, thread_agent): Delete.
10522 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10523 per-process data.
10524 (find_one_thread): Change argument type to ptid_t. Adjust to
10525 per-process data.
10526 (maybe_attach_thread): Adjust to per-process data and ptids.
10527 (thread_db_find_new_threads): Ditto.
10528 (thread_db_init): Ditto.
10529 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10530 processes table. Adjust to use ptids.
10531 (spu_kill, spu_detach): Adjust interface. Remove process from
10532 processes table.
10533 (spu_join, spu_thread_alive): Adjust interface.
10534 (spu_wait): Adjust interface. Remove process from processes
10535 table. Adjust to use ptids.
10536 * win32-low.c (current_inferior_tid): Delete.
10537 (current_inferior_ptid): New.
10538 (debug_event_ptid): New.
10539 (thread_rec): Take a ptid. Adjust.
10540 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10541 (child_delete_thread): Ditto.
10542 (do_initial_child_stuff): Add `attached' argument. Add process to
10543 processes table.
10544 (child_fetch_inferior_registers, child_store_inferior_registers):
10545 Adjust.
10546 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10547 (win32_attach): Pass 1 to do_initial_child_stuff.
10548 (win32_kill): Adjust interface. Remove process from processes
10549 table.
10550 (win32_detach): Ditto.
10551 (win32_join): Adjust interface.
10552 (win32_thread_alive): Take a ptid.
10553 (win32_resume): Adjust to use ptids.
10554 (get_child_debug_event): Ditto.
10555 (win32_wait): Adjust interface. Remove exiting process from
10556 processes table.
10557
bd99dc85
PA
105582009-04-01 Pedro Alves <pedro@codesourcery.com>
10559
10560 Non-stop mode support.
10561
10562 * server.h (non_stop): Declare.
10563 (gdb_client_data, handler_func): Declare.
10564 (delete_file_handler, add_file_handler, start_event_loop):
10565 Declare.
10566 (handle_serial_event, handle_target_event, push_event)
10567 (putpkt_notif): Declare.
10568 * target.h (enum resume_kind): New.
10569 (struct thread_resume): Replace `step' field by `kind' field.
10570 (TARGET_WNOHANG): Define.
10571 (struct target_ops) <wait>: Add `options' argument.
10572 <supports_non_stop, async, start_non_stop>: New fields.
10573 (target_supports_non_stop, target_async): New.
10574 (start_non_stop): Declare.
10575 (mywait): Add `options' argument.
10576 * target.c (mywait): Add `options' argument. Print child exit
10577 notifications here.
10578 (start_non_stop): New.
10579 * server.c (non_stop, own_buf, mem_buf): New globals.
10580 (struct vstop_notif): New.
10581 (notif_queue): New global.
10582 (queue_stop_reply, push_event, discard_queued_stop_replies)
10583 (send_next_stop_reply): New.
10584 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10585 interface changes.
10586 (attach_inferior): In non-stop mode, don't wait for the target
10587 here.
10588 (handle_general_set): Handle QNonStop.
10589 (handle_query): When handling qC, return the current general
10590 thread, instead of the first thread of the list.
10591 (handle_query): If the backend supports non-stop mode, include
10592 QNonStop+ in the qSupported query response.
10593 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10594 and non-stop mode.
10595 (handle_v_attach, handle_v_run): Handle non-stop mode.
10596 (handle_v_stopped): New.
10597 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10598 (myresume): Adjust to use resume_kind. Handle non-stop.
10599 (queue_stop_reply_callback): New.
10600 (handle_status): Handle non-stop mode.
10601 (main): Clear non_stop flag on reconnection. Use the event-loop.
10602 Refactor serial protocol handling from here ...
10603 (process_serial_event): ... to this new function. When GDB
10604 selects any thread, select one here. In non-stop mode, wait until
10605 GDB acks all pending events before exiting.
10606 (handle_serial_event, handle_target_event): New.
10607 * remote-utils.c (remote_open): Install remote_desc in the event
10608 loop.
10609 (remote_close): Remove remote_desc from the event loop.
10610 (putpkt_binary): Rename to...
10611 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10612 (putpkt_binary): New as wrapper around putpkt_binary_1.
10613 (putpkt_notif): New.
10614 (prepare_resume_reply): In non-stop mode, don't change the
10615 general_thread.
10616 * event-loop.c: New.
10617 * Makefile.in (OBJ): Add event-loop.o.
10618 (event-loop.o): New rule.
10619
10620 * linux-low.h (pid_of): Moved here.
10621 (lwpid_of): New.
10622 (get_lwp_thread): Use lwpid_of.
10623 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10624 * linux-low.c (pid_of): Delete.
10625 (inferior_pid): Use lwpid_of.
10626 (linux_event_pipe): New.
10627 (target_is_async_p): New.
10628 (delete_lwp): New.
10629 (handle_extended_wait): Use lwpid_of.
10630 (add_lwp): Don't set lwpid field.
10631 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10632 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10633 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10634 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10635 first. Adjust to linux_wait_for_event interface changes. Use
10636 lwpid_of.
10637 (linux_detach): Don't delete the main lwp here.
10638 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10639 (status_pending_p): Don't consider explicitly suspended lwps.
10640 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10641 pointer. Add OPTIONS argument. Change return type to int. Use
10642 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10643 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10644 pointer. Add status pointer argument. Return a pid instead of a
10645 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10646 changes. In non-stop mode, don't switch to a random thread.
10647 (linux_wait): Rename to...
10648 (linux_wait_1): ... this. Add target_options argument, and handle
10649 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10650 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10651 clean exit and signal exit code. Don't stop all threads in
10652 non-stop mode. In all-stop mode, only stop all threads when
10653 reporting a stop to GDB. Handle explicit thread stop requests.
10654 (async_file_flush, async_file_mark): New.
10655 (linux_wait): New.
10656 (send_sigstop): Use lwpid_of.
10657 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10658 interface changes. In non-stop mode, don't switch to a random
10659 thread.
10660 (linux_resume_one_lwp): Use lwpid_of.
10661 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10662 (linux_resume_one_thread): ... this. Handle resume_stop. In
10663 non-stop mode, don't look for pending flag in all threads.
10664 (resume_status_pending_p): Don't consider explicitly suspended
10665 threads.
10666 (my_waitpid): Reimplement. Emulate __WALL.
10667 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10668 Use lwpid_of.
10669 (sigchld_handler, linux_supports_non_stop, linux_async)
10670 (linux_start_non_stop): New.
10671 (linux_target_ops): Register linux_supports_non_stop, linux_async
10672 and linux_start_non_stop.
10673 (initialize_low): Install SIGCHLD handler.
10674 * thread-db.c (thread_db_create_event, find_one_thread)
10675 (thread_db_get_tls_address): Use lwpid_of.
10676 * win32-low.c (win32_detach): Adjust to use resume_kind.
10677 (win32_wait): Add `options' argument.
10678 * spu-low.c (spu_resume): Adjust to use resume_kind.
10679 (spu_wait): Add `options' argument.
10680
5b1c542e
PA
106812009-04-01 Pedro Alves <pedro@codesourcery.com>
10682
10683 Decouple target code from remote protocol.
10684
10685 * target.h (enum target_waitkind): New.
10686 (struct target_waitstatus): New.
10687 (struct target_ops) <wait>: Return an unsigned long. Take a
10688 target_waitstatus pointer instead of a char pointer.
10689 (mywait): Likewise.
10690 * target.c (mywait): Change prototype to return an unsigned long.
10691 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10692 * server.h (thread_from_wait, old_thread_from_wait): Delete
10693 declarations.
10694 (prepare_resume_reply): Change prototype to take a
10695 target_waitstatus.
10696 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10697 (last_status, last_ptid): New.
10698 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10699 pid instead of a signal.
10700 (attach_inferior): Remove "status" and "signal" parameters.
10701 Adjust.
10702 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10703 not as an address.
10704 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10705 (handle_v_requests, myresume): Remove "status" and "signal"
10706 parameters. Adjust.
10707 (handle_status): New.
10708 (main): Delete local `status'. Adjust.
10709 * remote-utils.c: Include target.h.
10710 (prepare_resume_reply): Change prototype to take a
10711 target_waitstatus. Adjust.
10712
10713 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10714 interface.
10715 * spu-low.c (spu_wait): Adjust.
10716 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10717 Delete.
10718 (win32_wait): Adjust.
10719
2bd7c093
PA
107202009-04-01 Pedro Alves <pedro@codesourcery.com>
10721
10722 * target.h (struct thread_resume): Delete leave_stopped member.
10723 (struct target_ops): Add a `n' argument to the `resume' callback.
10724 * server.c (start_inferior): Adjust.
10725 (handle_v_cont, myresume): Adjust.
10726 * linux-low.c (check_removed_breakpoint): Adjust to resume
10727 interface change, and to removed leave_stopped field.
10728 (resume_ptr): Delete.
10729 (struct thread_resume_array): New.
10730 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10731 resume interface change.
10732 (linux_continue_one_thread, linux_queue_one_thread)
10733 (resume_status_pending_p): Check if the resume field is NULL
10734 instead of checking the leave_stopped member.
10735 (linux_resume): Adjust to the target resume interface change.
10736 * spu-low.c (spu_resume): Adjust to the target resume interface
10737 change.
10738 * win32-low.c (win32_detach, win32_resume): Ditto.
10739
c35fafde
PA
107402009-04-01 Pedro Alves <pedro@codesourcery.com>
10741
10742 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10743 flag.
10744 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10745 pending.
10746 (linux_continue_one_thread): Only preserve the stepping flag if
10747 there's a pending breakpoint.
10748
0a59d50b
PA
107492009-03-31 Pedro Alves <pedro@codesourcery.com>
10750
10751 * server.c (main): After the inferior having exited, call
10752 remote_close before exiting gdbserver.
10753
f04c6d38
TJB
107542009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10755
10756 Fix size of FPSCR in Power 7 processors.
10757 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10758 (PPC_FEATURE_HAS_DFP): New #define.
10759 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10760 size of the FPSCR.
10761
78e5cee6
PA
107622009-03-23 Pedro Alves <pedro@codesourcery.com>
10763
10764 * server.c (handle_query) Whitespace and formatting.
10765
1b3f6016
PA
107662009-03-22 Pedro Alves <pedro@codesourcery.com>
10767
10768 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10769 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10770 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10771 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10772 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10773 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10774 Makefile.in, configure.ac: Fix whitespace throughout.
10775 * configure: Regenerate.
10776
a07b2135
PA
107772009-03-22 Pedro Alves <pedro@codesourcery.com>
10778
10779 * inferiors.c (find_inferior): Make it safe for the callback
10780 function to delete the currently iterated inferior.
10781
67cc2626
PA
107822009-03-22 Pedro Alves <pedro@codesourcery.com>
10783
10784 * Makefile.in (linuw_low_h): Move higher.
10785 (thread-db.o): Depend on $(linux_low_h).
10786
54a0b537
PA
107872009-03-17 Pedro Alves <pedro@codesourcery.com>
10788
10789 Rename "process" to "lwp" throughout.
10790
10791 * linux-low.c (all_processes): Rename to...
10792 (all_lwps): ... this.
10793 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10794 (add_process): Rename to ...
10795 (add_lwp): ... this. Adjust.
10796 (linux_create_inferior): Adjust.
10797 (linux_attach_lwp): Adjust.
10798 (linux_attach): Adjust.
10799 (linux_kill_one_process): Rename to ...
10800 (linux_kill_one_lwp): ... this. Adjust.
10801 (linux_kill): Adjust.
10802 (linux_detach_one_process): Rename to ...
10803 (linux_detach_one_lwp): ... this. Adjust.
10804 (linux_detach): Adjust.
10805 (check_removed_breakpoint): Adjust.
10806 (status_pending_p): Adjust.
10807 (linux_wait_for_process): Rename to ...
10808 (linux_wait_for_lwp): ... this. Adjust.
10809 (linux_wait_for_event): Adjust.
10810 (send_sigstop): Adjust.
10811 (wait_for_sigstop): Adjust.
10812 (stop_all_processes): Rename to ...
10813 (stop_all_lwps): ... this.
10814 (linux_resume_one_process): Rename to ...
10815 (linux_resume_one_lwp): ... this. Adjust.
10816 (linux_set_resume_request, linux_continue_one_thread)
10817 (linux_queue_one_thread, resume_status_pending_p)
10818 (usr_store_inferior_registers, regsets_store_inferior_registers)
10819 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10820 Adjust.
10821 * linux-low.h (get_process): Rename to ...
10822 (get_lwp): ... this. Adjust.
10823 (get_thread_process): Rename to ...
10824 (get_thread_lwp): ... this. Adjust.
10825 (get_process_thread): Rename to ...
10826 (get_lwp_thread): ... this. Adjust.
10827 (struct process_info): Rename to ...
10828 (struct lwp_info): ... this.
10829 (all_processes): Rename to ...
10830 (all_lwps): ... this.
10831 * proc-service.c (ps_lgetregs): Adjust.
10832 * thread-db.c (thread_db_create_event, find_one_thread)
10833 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10834
0b16c5cf
PA
108352009-03-14 Pedro Alves <pedro@codesourcery.com>
10836
10837 * server.c (handle_query): Handle "qAttached".
10838
32de4b9d
NS
108392009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10840
10841 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10842 GPLv3, update license URL.
10843
2aecd87f
DE
108442009-03-01 Doug Evans <dje@google.com>
10845
93efd302 10846 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10847 (server_h): Add gdb_signals.h.
10848 (signals.o): Update.
10849 * server.h (target_signal_from_host,target_signal_to_host_p)
10850 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10851
86b1f9c5
PM
108522009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10853
10854 * remote-utils.c (getpkt): Also generate remote-debug
10855 information if noack_mode is set.
10856
4aa995e1
PA
108572009-02-06 Pedro Alves <pedro@codesourcery.com>
10858
10859 * server.c (handle_query): Report qXfer:siginfo:read and
10860 qXfer:siginfo:write as supported and handle them.
10861 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10862 * linux-low.c (linux_xfer_siginfo): New.
10863 (linux_target_ops): Set it.
10864
62709adf
PA
108652009-01-26 Pedro Alves <pedro@codesourcery.com>
10866
10867 * server.c (gdbserver_usage): Mention --remote-debug.
10868 (main): Accept '--remote-debug' switch.
10869
aef93bd7
DE
108702009-01-18 Doug Evans <dje@google.com>
10871
10872 * regcache.c (new_register_cache): No need to check result of xcalloc.
10873 * server.c (handle_search_memory): Back out calls to xmalloc,
10874 result is checked and error is returned to user upon failure.
10875 (handle_query): Ditto. Add more checks for result of malloc.
10876 (handle_v_cont): Check result of malloc, report error back to
10877 user upon failure.
10878 (handle_v_run): Ditto. Call freeargv.
10879 * server.h (freeargv): Declare.
10880 * utils.c (freeargv): New fn.
10881
54363045
DE
108822009-01-15 Doug Evans <dje@google.com>
10883
f626972c
DE
10884 * gdbreplay.c (perror_with_name): Make arg const char *.
10885 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10886 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10887 * utils.c (perror_with_name): Make arg const char *.
54363045 10888
18aae699
PA
108892009-01-14 Pedro Alves <pedro@codesourcery.com>
10890
10891 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10892 when handling a EXIT_PROCESS_DEBUG_EVENT.
10893
ff703abe
JB
108942009-01-06 Joel Brobecker <brobecker@adacore.com>
10895
10896 * gdbreplay.c (gdbreplay_version): Update copyright year.
10897 * server.c (gdbserver_version): Likewise.
10898
f21cc1a2 108992009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10900
10901 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10902 (handle_extended_wait): Improve comment.
0e21c1ec 10903
bca929d3
DE
109042008-12-13 Doug Evans <dje@google.com>
10905
10906 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10907 * server.h (ATTR_MALLOC): New macro.
10908 (xmalloc,xcalloc,xstrdup): Declare.
10909 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10910 * inferiors.c: Ditto.
10911 * linux-low.c: Ditto.
10912 * mem-break.c: Ditto.
10913 * regcache.c: Ditto.
10914 * remote-utils.c: Ditto.
10915 * server.c: Ditto.
10916 * target.c: Ditto.
10917 * win32-low.c: Ditto.
10918
97438e3f
DE
109192008-12-12 Doug Evans <dje@google.com>
10920
896c7fbb
DE
10921 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10922 in debugging printf.
10923
97438e3f
DE
10924 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10925
e3b886f8
DE
109262008-12-09 Doug Evans <dje@google.com>
10927
10928 * linux-low.h (struct process_info): Delete member tid, unused.
10929 * thread-db.c (find_one_thread): Update.
10930 (maybe_attach_thread): Update.
10931
07e059b5
VP
109322008-12-02 Pedro Alves <pedro@codesourcery.com>
10933
889bf7c5
PA
10934 * target.h (struct target_ops): Add qxfer_osdata member.
10935 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10936 and dirent.h.
10937 (linux_qxfer_osdata): New functions.
10938 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10939 callback.
10940 * server.c (handle_query): Handle "qXfer:osdata:read:".
10941 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10942 (buffer_xml_printf): New functions.
10943 * server.h (struct buffer): New.
10944 (buffer_grow_str, buffer_grow_str0): New macros.
10945 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10946 (buffer_xml_printf): Declare.
07e059b5 10947
4cab47ab
DE
109482008-11-24 Doug Evans <dje@google.com>
10949
10950 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10951
f142445f
DJ
109522008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10953
10954 * server.c (handle_v_run): Always use the supplied argument list.
10955
d0107bb6 109562008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10957
d0107bb6
BW
10958 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10959 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10960
2c4ad781
TJB
109612008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10962
10963 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10964 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10965 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10966 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10967 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10968 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10969 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10970 XML target descriptions.
10971 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10972 when inferior is running on an ISA 2.05 or later processor. Add
10973 special case to return offset for full 64-bit slot of FPSCR when
10974 in 32-bits.
10975
dfb64f85
DJ
109762008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10977
10978 * Makefile.in (SFILES, clean): Added sparc64 files.
10979 (reg-sparc64.o, reg-sparc64.c): New.
10980 * configure.srv (sparc*-*-linux*): New configuration.
10981 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10982 syscall arguments for SPARC.
10983 (regsets_store_inferior_registers): Likewise.
10984 * linux-sparc-low.c: New file.
10985
66b6e1dd
DE
109862008-10-21 Doug Evans <dje@google.com>
10987
10988 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10989 (READLINE_DIR,READLINE_DEP): Delete.
10990 (INTERNAL_CFLAGS): Update.
10991 (LINTFLAGS): Update.
10992
9b710a42
PA
109932008-10-10 Pedro Alves <pedro@codesourcery.com>
10994
10995 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10996 whole argv from the last run, not just argv[0].
10997
5822d809
PA
109982008-09-08 Pedro Alves <pedro@codesourcery.com>
10999
11000 * regcache.c (new_register_cache): Return NULL if the register
11001 cache size isn't known yet.
11002 (free_register_cache): Avoid dereferencing a NULL regcache.
11003
74aac56f
DJ
110042008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11005
11006 * configure.srv: Merge MIPS and MIPS64.
11007
400b20f5
MR
110082008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11009
11010 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11011
677c5bb1
LM
110122008-08-18 Luis Machado <luisgpm@br.ibm.com>
11013
11014 * Makefile.in: Add required vsx dependencies.
11015
11016 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11017 Declare init_registers_powerpc_vsx32l.
11018 Declare init_registers_powerpc_vsx64l.
11019 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11020 (ppc_arch_setup): Check for VSX in hwcap.
11021 (ppc_fill_vsxregset): New function.
11022 (ppc_store_vsxregset): New function.
11023 Add new VSX entry in regset_info target_regsets.
11024
11025 * configure.srv: Add new VSX dependencies.
11026
a6f3e723
SL
110272008-08-12 Pedro Alves <pedro@codesourcery.com>
11028
11029 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11030 (remote_open): Set or clear transport_is_reliable.
11031 (putpkt_binary): Don't expect acks in noack mode.
11032 (getpkt): Don't send ack/nac in noack mode.
11033 * server.c (handle_general_set): Handle QStartNoAckMode.
11034 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11035 qSupported.
11036 (main): Reset noack_mode on every connection.
11037 * server.h (noack_mode): Declare.
11038
a417dc56
RW
110392008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11040
11041 * Makefile.in (GDBREPLAY_OBS): New variable.
11042 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11043
3221518c
UW
110442008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11045 Daniel Jacobowitz <dan@codesourcery.com>
11046
11047 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11048 (usr_store_inferior_registers): Likewise.
11049 (regsets_store_inferior_registers): Likewise.
11050
ec56be1b
PA
110512008-07-31 Rolf Jansen <rj@surtec.com>
11052 Pedro Alves <pedro@codesourcery.com>
11053
11054 * configure.ac: Check for memmem declaration.
11055 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11056 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11057 (disable_packet_qfThreadInfo): Unconditionally compile.
11058 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11059 * configure, config.in: Regenerate.
11060
2fe5e3ff
DE
110612008-07-28 Doug Kwan <dougkwan@google.com>
11062
11063 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11064 (linux_write_memory): Remove declaration of errno.
11065
836acd6d
UW
110662008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11067
11068 * linux-low.c (handle_extended_wait): Do not use "status"
11069 variable uninitialized.
11070
aeba519e
PA
110712008-07-07 Pedro Alves <pedro@codesourcery.com>
11072
11073 * server.c (handle_v_attach): Inhibit reporting dll changes.
11074
db42f210
PA
110752008-06-27 Pedro Alves <pedro@codesourcery.com>
11076
11077 * remote-utils.c (prepare_resume_reply): If requested, don't
11078 output "thread:TID" in the T stop reply.
11079
11080 * server.c (disable_packet_vCont, disable_packet_Tthread)
11081 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11082 (handle_query): If requested, disable support for qC, qfThreadInfo
11083 and qsThreadInfo.
11084 (handle_v_requests): If requested, disable support for vCont.
11085 (gdbserver_show_disableable): New.
11086 (main): Handle --disable-packet and --disable-packet=LIST.
11087
11088 * server.h (disable_packet_vCont, disable_packet_Tthread)
11089 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11090
8e4c5421
CD
110912008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11092
11093 * server.c (gdbserver_usage): Mention --version.
11094
6e23a804
DJ
110952008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11096
11097 * Makefile.in (gdbreplay.o): New rule.
11098
90aa6a40
JM
110992008-06-06 Joseph Myers <joseph@codesourcery.com>
11100
11101 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11102 message, not gdbserver.
11103
c16158bc 111042008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11105 Nathan Sidwell <nathan@codesourcery.com>
11106 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11107
11108 * acinclude.m4: Include ../../config/acx.m4.
11109 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11110 * configure, config.in: Regenerate.
11111 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11112 * server.c (gdbserver_version): Print PKGVERSION.
11113 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11114 (main): Adjust gdbserver_usage calls.
11115 * gdbreplay.c (version, host_name): Add declarations.
11116 (gdbreplay_version, gdbreplay_usage): New.
11117 (main): Accept --version and --help options.
11118
aeb75bf5
DJ
111192008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11120
11121 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11122 (arm_breakpoint_at): Handle Thumb.
11123 (the_low_target): Add comment.
11124
76b233dd
UW
111252008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11126
11127 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11128
08388c79
DE
111292008-05-09 Doug Evans <dje@google.com>
11130
a3c83fae
DE
11131 * server.h (decode_search_memory_packet): Declare.
11132 * remote-utils.c (decode_search_memory_packet): New fn.
11133 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11134 (handle_search_memory): New fn.
11135 (handle_query): Process qSearch:memory packets.
11136
bb9c3d36
UW
111372008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11138
11139 * regcache.c (registers_length): Remove.
11140 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11141 full register packet.
11142 * regcache.h (registers_length): Remove prototype.
11143 * server.h (PBUFSIZ): Define to 16384.
11144
7284e1be
UW
111452008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11146
11147 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11148 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11149 powerpc-64l.o, and powerpc-altivec64l.o.
11150 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11151 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11152 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11153 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11154 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11155 to srv_xmlfiles.
11156
11157 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11158 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11159 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11160 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11161 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11162 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11163 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11164 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11165 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11166 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11167 (clean): Update.
11168
11169 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11170 (init_registers_powerpc_32l): ... this new prototype.
11171 (init_registers_powerpc_32): Remove, replace by ...
11172 (init_registers_powerpc_altivec32l): ... this new prototype.
11173 (init_registers_powerpc_e500): Remove, replace by ...
11174 (init_registers_powerpc_e500l): ... this new prototype.
11175 (init_registers_ppc64): Remove, replace by ...
11176 (init_registers_powerpc_64l): ... this new prototype.
11177 (init_registers_powerpc_64): Remove, replace by ...
11178 (init_registers_powerpc_altivec64l): ... this new prototype.
11179 (ppc_num_regs): Set to 73.
11180 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11181 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11182 (ppc_cannot_store_register): Handle orig_r3 and trap.
11183 (ppc_arch_setup): Update init_registers_... calls.
11184 (ppc_fill_gregset): Handle orig_r3 and trap.
11185
11186 * inferiors.c (clear_inferiors): Reset current_inferior.
11187
fdc59709
PB
111882008-04-23 Paolo Bonzini <bonzini@gnu.org>
11189
889bf7c5
PA
11190 * acinclude.m4: Add override.m4.
11191 * configure: Regenerate.
fdc59709 11192
c9b2f845
UW
111932008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11194
11195 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11196 initial call to init_register_ppc64.
11197
550512b8
UW
111982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11199
43aaf8b6
PA
11200 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11201 single powerpc*-*-linux* case.
550512b8
UW
11202 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11203
b6430ec3
UW
112042008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11205
11206 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11207 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11208 from reg_xmlfiles.
11209 * linux-ppc-low.c: Include <elf.h>.
11210 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11211 (ppc_hwcap): New global variable.
11212 (ppc_regmap): Remove __SPE__ #ifdef sections.
11213 (ppc_regmap_e500): New global variable.
11214 (ppc_cannot_store_register): Update __SPE__ special case.
11215 (ppc_get_hwcap): New function.
11216 (ppc_arch_setup): Use it to determine whether inferior supports
11217 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11218 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11219 Do not access registers if target does not support AltiVec.
11220 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11221 Do not access registers if target does not support SPE.
11222 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11223
52fa2412
UW
112242008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11225
11226 * linux-low.c (disabled_regsets, num_regsets): New.
11227 (use_regsets_p): Delete.
11228 (linux_wait_for_process): Clear disabled_regsets.
11229 (regsets_fetch_inferior_registers): Check and set it.
11230 (regsets_store_inferior_registers): Likewise.
11231 (linux_fetch_registers, linux_store_registers): Do not use
11232 use_regsets_p.
11233 (initialize_low): Allocate disabled_regsets.
11234
e28b3332
DJ
112352008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11236
11237 * Makefile.in (LIBOBJS): New.
11238 (OBS): Use LIBOBJS.
11239 (memmem.o): New rule.
11240 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11241 * configure: Regenerated.
11242
4536995d
UW
112432008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11244
11245 * server.c (handle_query): Never return "unsupported" for
11246 qXfer:features:read queries.
11247
221c031f
UW
112482008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11249
11250 * server.c (get_features_xml): Fix inverted condition.
11251 (handle_query): Always support qXfer:feature:read.
11252
ccd213ac
DJ
112532008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11254
11255 * server.c (wrapper_argv): New.
11256 (start_inferior): Handle wrapper_argv. If set, expect an extra
11257 trap.
11258 (gdbserver_usage): Document --wrapper.
11259 (main): Parse --wrapper.
11260
6fe305f7
UW
112612008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11262
11263 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11264 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11265 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11266 (ppc_set_pc): Likewise.
11267 (ppc_arch_setup): New function.
11268 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11269 of collect_register.
889bf7c5 11270 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11271
5b0a002e
UW
112722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11273
11274 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11275 instead of linux-ppc64-low.o.
11276 * linux-ppc64-low.c: Remove file.
11277 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11278 (linux-ppc64-low.o): Remove rule.
11279
11280 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11281 (init_registers_powerpc_64): Likewise.
11282 (ppc_regmap): Conditionally define depending on __powerpc64__.
11283 (ppc_cannot_store_register): Do not special-case "fpscr" when
11284 compiled on __powerpc64__.
11285 (ppc_collect_ptrace_register): New function.
11286 (ppc_supply_ptrace_register): New function.
11287 (ppc_breakpoint): Change type to "unsigned int".
11288 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11289 (the_low_target): Conditionally provide initializers for the
889bf7c5 11290 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11291 collect_ptrace_register and supply_ptrace_register members.
11292
9b4b61c8
UW
112932008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11294
11295 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11296 * server.c (gdbserver_xmltarget): Define.
11297 (get_features_xml): Use it to replace "target.xml" and arch_string.
11298
11299 * configure.srv: Remove srv_xmltarget. Add XML files that were
11300 mentioned there to srv_xmlfiles instead. Remove conditional tests
11301 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11302 srv_xmlfiles and srv_regobj to include all possible choices.
11303 * configure.ac (srv_xmltarget): Remove.
11304 (srv_xmlfiles): Do not add "target.xml".
11305 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11306 checks for supplementary target information.
11307 * configure: Regenerate.
11308 * Makefile.in (XML_TARGET): Remove.
11309 (target.xml): Remove rule.
11310 (clean): Do not clean up target.xml.
11311 (.PRECIOUS): Do not mention target.xml.
11312
11313 * target.h (struct target_ops): Remove arch_string member.
11314 * linux-low.c (linux_arch_string): Remove.
11315 (linux_target_ops): Remove arch_string initializer.
11316 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11317 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11318 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11319 * spu-low.c (spu_arch_string): Remove.
11320 (spu_target_ops): Remove arch_string initializer.
11321 * win32-low.c (win32_arch_string): Remove.
11322 (win32_target_ops): Remove arch_string initializer.
11323 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11324 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11325 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11326
ee1a7ae4
UW
113272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11328
11329 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11330 by collect_ptrace_register and supply_ptrace_register hooks.
11331 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11332 instead of checking for the_low_target.left_pad_xfer.
11333 (usr_store_inferior_registers): Use collect_ptrace_register callback
11334 instead of checking for the_low_target.left_pad_xfer.
11335
11336 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11337 (s390_supply_ptrace_register): Likewise.
11338 (s390_fill_gregset): Call s390_collect_ptrace_register.
11339 (the_low_target): Update.
11340
11341 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11342 (ppc_supply_ptrace_register): Likewise.
11343 (the_low_target): Update.
11344
11345 * linux-i386-low.c (the_low_target): Update.
11346 * linux-x86-64-low.c (the_low_target): Update.
11347
d61ddec4
UW
113482008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11349
11350 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11351 reg-s390.o and reg-s390x.o.
11352
11353 * linux-low.c (new_inferior): New global variable.
11354 (linux_create_inferior, linux_attach): Set it.
11355 (linux_wait_for_process): Call the_low_target.arch_setup after the
11356 target has stopped for the first time.
11357 (initialize_low): Do not call the_low_target.arch_setup.
11358
11359 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11360 (s390_set_pc): Likewise.
11361 (s390_arch_setup): New function.
11362 (the_low_target): Use s390_arch_setup as arch_setup routine.
11363
11364 * regcache.c (realloc_register_cache): New function.
11365 (set_register_cache): Call it for each existing regcache.
11366
d05b4ac3
UW
113672008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11368
11369 * server.h (init_registers): Remove prototype.
11370
11371 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11372 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11373 instead of init_registers ().
11374 * linux-arm-low.c (init_registers_arm): Add prototype.
11375 (init_registers_arm_with_iwmmxt): Likewise.
11376 (the_low_target): Add initializer for arch_setup field.
11377 * linux-cris-low.c (init_registers_cris): Add prototype.
11378 (the_low_target): Add initializer for arch_setup field.
11379 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11380 (the_low_target): Add initializer for arch_setup field.
11381 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11382 (the_low_target): Add initializer for arch_setup field.
11383 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11384 (the_low_target): Add initializer for arch_setup field.
11385 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11386 (the_low_target): Add initializer for arch_setup field.
11387 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11388 (the_low_target): Add initializer for arch_setup field.
11389 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11390 (init_registers_mips64_linux): Likewise.
11391 (the_low_target): Add initializer for arch_setup field.
11392 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11393 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11394 (the_low_target): Add initializer for arch_setup field.
11395 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11396 (init_registers_powerpc_64): Likewise.
11397 (the_low_target): Add initializer for arch_setup field.
11398 * linux-s390-low.c (init_registers_s390): Add prototype.
11399 (init_registers_s390x): Likewise.
11400 (the_low_target): Add initializer for arch_setup field.
11401 * linux-sh-low.c (init_registers_sh): Add prototype.
11402 (the_low_target): Add initializer for arch_setup field.
11403 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11404 (the_low_target): Add initializer for arch_setup field.
11405 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11406 (the_low_target): Add initializer for arch_setup field.
11407
11408 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11409 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11410 instead of init_registers ().
11411 * win32-arm-low.c (init_registers_arm): Add prototype.
11412 (the_low_target): Add initializer for arch_setup field.
11413 * win32-i386-low.c (init_registers_i386): Add prototype.
11414 (the_low_target): Add initializer for arch_setup field.
11415
11416 * spu-low.c (init_registers_spu): Add prototype.
11417 (initialize_low): Call initialie_registers_spu () instead of
11418 initialize_registers ().
11419
fd96d250
PA
114202008-02-19 Pedro Alves <pedro@codesourcery.com>
11421
11422 * server.c (handle_v_requests): When handling the vRun and vAttach
11423 packets, if already debugging a process, don't kill it. Return an
11424 error instead.
11425
d41b6bb4
DJ
114262008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11427
11428 * server.c (handle_query): Correct length check.
11429
5ac588cf
PA
114302008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11431
11432 * win32-low.c (do_initial_child_stuff): Add process handle
11433 parameter. Set current_process_handle and current_process_id from the
11434 parameters. Clear globals.
11435 (win32_create_inferior): Don't set current_process_handle and
11436 current_process_id here. Instead pass them on the call to
11437 do_initial_child_stuff.
11438 (win32_attach): Likewise.
11439 (win32_clear_inferiors): New.
11440 (win32_kill): Don't close the current process handle or the
11441 current thread handle here. Instead call win32_clear_inferiors.
11442 (win32_detach): Don't open a new handle to the process. Call
11443 win32_clear_inferiors.
11444 (win32_join): Don't rely on current_process_handle; open a new
11445 handle using the process id.
11446 (win32_wait): Call win32_clear_inferiors when the inferior process
11447 has exited.
11448
ecd7ecbc
DJ
114492008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11450
11451 * server.c (monitor_show_help): Add "exit".
11452
1525d545
MG
114532008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11454
ecd7ecbc 11455 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11456 (clean): Add reg-xtensa.c.
11457 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11458 * configure.srv (xtensa*-*-linux*) New target.
11459 * linux-xtensa-low.c: New.
11460 * xtensa-xtregs.c: New.
1525d545 11461
59a016f0
PA
114622008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11463
11464 * hostio.c: Don't include errno.h.
11465 (errno_to_fileio_errno): Move to hostio-errno.
11466 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11467 error number outputting to the target->hostio_last_error callback.
11468 (hostio_packet_error): Use FILEIO_EINVAL directly.
11469 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11470 calls to hostio_error.
11471 * hostio-errno.c: New.
11472 * server.h (hostio_last_error_from_errno): Declare.
11473 * target.h (target_ops): Add hostio_last_error member.
11474 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11475 as hostio_last_error handler.
889bf7c5 11476 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11477 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11478 (wince_hostio_last_error): New functions.
11479 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11480 as hostio_last_error handler.
11481 (win32_target_ops) [!_WIN32_WCE]: Register
11482 hostio_last_error_from_errno as hostio_last_error handler.
11483 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11484 (hostio-errno.o): New rule.
11485 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11486 * configure.srv (srv_hostio_err_objs): New variable. Default to
11487 hostio-errno.o.
11488 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11489 * configure: Regenerate.
11490
2d717e4f
DJ
114912008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11492
11493 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11494 (linux_kill, linux_detach): Clean up the process list.
11495 * remote-utils.c (remote_open): Improve port number parsing.
11496 (putpkt_binary, input_interrupt): Only send interrupts if the target
11497 is running.
11498 * server.c (extended_protocol): Make static.
11499 (attached): Define earlier.
11500 (exit_requested, response_needed, program_argv): New variables.
11501 (target_running): New.
11502 (start_inferior): Clear attached here.
11503 (attach_inferior): Set attached here.
11504 (require_running): Define.
11505 (handle_query): Use require_running and target_running. Implement
11506 "monitor exit".
11507 (handle_v_attach, handle_v_run): New.
11508 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11509 (gdbserver_usage): Update.
11510 (main): Redo argument parsing. Handle --debug and --multi. Handle
11511 --attach along with other options or after the port. Save
11512 program_argv. Support no initial program. Resynchronize
11513 communication with GDB after an error. Handle "monitor exit".
11514 Use require_running and target_running. Always allow the extended
11515 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11516 restart in extended mode.
11517 * README: Refer to the GDB manual. Update --attach usage.
11518
7407e2de
AS
115192007-12-20 Andreas Schwab <schwab@suse.de>
11520
11521 * linux-low.c (STACK_SIZE): Define.
11522 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11523 (linux_test_for_tracefork): Likewise.
11524
b65d95c5
DJ
115252007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11526
11527 * linux-low.c (linux_wait_for_event): Update messages. Do not
11528 reinsert auto-delete breakpoints.
11529 * mem-break.c (struct breakpoint): Change return type of handler to
11530 int.
11531 (set_breakpoint_at): Update handler type.
11532 (reinsert_breakpoint_handler): Return 1 instead of calling
11533 delete_breakpoint.
11534 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11535 setting a new one.
11536 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11537 * mem-break.h (set_breakpoint_at): Update handler type.
11538 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11539 * win32-low.c (auto_delete_breakpoint): New.
11540 (get_child_debug_event): Use it.
11541
4e799345
DJ
115422007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11543
11544 * configure.ac: Check for pread and pwrite.
11545 * hostio.c (handle_pread): Fall back to lseek and read.
11546 (handle_pwrite): Fall back to lseek and write.
11547 * config.in, configure: Regenerated.
11548
27524b67
DJ
115492007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11550
11551 * server.c (myresume): Add own_buf argument.
11552 (main): Update calls.
11553
a20d5e98
DJ
115542007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11555
11556 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11557 * remote-utils.c (remote_open): Do not call disable_async_io.
11558 (block_async_io): Delete.
11559 (unblock_async_io): Make static.
11560 (initialize_async_io): New.
11561 * server.c (handle_v_cont): Handle async I/O here.
11562 (myresume): Likewise. Move other common resume tasks here...
11563 (main): ... from here. Call initialize_async_io. Disable async
11564 I/O before the main loop.
11565 * server.h (initialize_async_io): Declare.
11566 (block_async_io, unblock_async_io): Delete prototypes.
11567 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11568
b79d787e
DJ
115692007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11570
11571 * remote-utils.c (readchar): Allow binary data in received messages.
11572
d97903b2
PA
115732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11574
11575 * win32-low.c (attaching): New global.
11576 (win32_create_inferior): Clear the `attaching' global.
11577 (win32_attach): Set the `attaching' global.
11578 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11579 attaching. Only set a breakpoint at the entry point if not
11580 attaching.
11581
311de423
PA
115822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11583
11584 * server.c (main): Don't report dll events on the initial
11585 connection on attaches.
11586
6c2d16d2
PA
115872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11588
11589 * server.c (main): Relax numerical bases supported for the pid of
11590 the --attach command line argument.
11591
5ca906e6
PA
115922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11593
11594 * win32-low.c (win32_attach): Call OpenProcess before
11595 DebugActiveProcess, not after. Add last error output to error
11596 call.
11597
9c6c8194
PA
115982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11599
11600 * win32-low.c (win32_get_thread_context)
11601 (win32_set_thread_context): New functions.
11602 (thread_rec): Use win32_get_thread_context.
11603 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11604 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11605 field.
11606
4d5d1aaa
PA
116072007-12-03 Leo Zayas
11608 Pedro Alves <pedro_alves@portugalmail.pt>
11609
11610 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11611 global variables.
11612 (child_add_thread): Minor cleanup.
11613 (child_continue): Resume artificially suspended threads before
11614 calling ContinueDebugEvent.
11615 (suspend_one_thread): New.
11616 (fake_breakpoint_event): New.
11617 (get_child_debug_event): Change return type to int. Check here if
11618 gdb sent an interrupt request. If a soft interrupt was requested,
11619 fake a breakpoint event. Return 0 if there is no event to handle,
11620 and 1 otherwise.
11621 (win32_wait): Don't check here if gdb sent an interrupt request.
11622 Ensure there is a valid event to handle.
11623 (win32_request_interrupt): Add soft interruption method as last
11624 resort.
11625
c436e841
PA
116262007-12-03 Leo Zayas
11627 Pedro Alves <pedro_alves@portugalmail.pt>
11628
11629 * win32-low.h (win32_thread_info): Add descriptions to the
11630 structure members. Replace `suspend_count' counter by a
11631 `suspended' flag.
11632 * win32-low.c (thread_rec): Update condition of when to get the
11633 context from the inferior. Rely on ContextFlags being set if it
11634 has already been retrieved. Only suspend the inferior thread if
11635 we haven't already. Warn if that fails.
11636 (continue_one_thread): s/suspend_count/suspended/. Only call
11637 ResumeThread once. Warn if that fails.
11638
e7b5fa67
PA
116392007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11640
11641 * win32-low.c (win32_wait): Don't read from the inferior when it
11642 has already exited.
11643
a385171d
PA
116442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11645
11646 * Makefile.in (win32_low_h): New variable.
11647 (win32-low.o): Add dependency on $(win32_low_h).
11648 (win32-arm-low.o, win32-i386-low.o): New rules.
11649
f80c84b3
DJ
116502007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11651
11652 * hostio.c: Correct copyright year.
11653
a6b151f1
DJ
116542007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11655
11656 * Makefile.in (OBS): Add hostio.o.
11657 (hostio.o): New rule.
11658 * server.h (handle_vFile): Declare.
11659 * hostio.c: New file.
11660 * server.c (handle_v_requests): Take packet_len and new_packet_len
11661 for binary packets. Call handle_vFile.
11662 (main): Update call to handle_v_requests.
11663
f9387fc3
DJ
116642007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11665
11666 * linux-low.c: Include <sched.h>.
11667
51c2684e
DJ
116682007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11669
11670 * linux-low.c (linux_tracefork_grandchild): New.
11671 (linux_tracefork_child): Use clone.
11672 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11673
75f83163
JB
116742007-10-31 Joel Brobecker <brobecker@adacore.com>
11675
11676 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11677
da5898ce
DJ
116782007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11679
11680 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11681
24a09b5f
DJ
116822007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11683
11684 * inferiors.c (change_inferior_id): Delete.
11685 (add_pid_to_list, pull_pid_from_list): New.
11686 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11687 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11688 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11689 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11690 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11691 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11692 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11693 (using_threads): Always set to 1.
11694 (handle_extended_wait): New.
11695 (add_process): Do not set TID.
11696 (linux_create_inferior): Set must_set_ptrace_flags.
11697 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11698 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11699 (linux_thread_alive): Rename TID argument to LWPID.
11700 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11701 (linux_wait_for_event): Do not use TID or check using_threads. Update
11702 call to dead_thread_notify. Call handle_extended_wait.
11703 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11704 (send_sigstop): Delete sigstop_sent.
11705 (wait_for_sigstop): Avoid TID.
11706 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11707 (linux_test_for_tracefork): New.
11708 (linux_lookup_signals): Use thread_db_active and
11709 linux_supports_tracefork_flag.
11710 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11711 * linux-low.h (get_process_thread): Avoid TID.
11712 (struct process_ifo): Move thread_known and tid to the end. Remove
11713 sigstop_sent.
11714 (linux_attach_lwp, thread_db_init): Update prototypes.
11715 * server.h (change_inferior_id): Delete prototype.
11716 (add_pid_to_list, pull_pid_from_list): New prototypes.
11717 * thread-db.c (thread_db_use_events): New.
11718 (find_first_thread): Rename to...
11719 (find_one_thread): ...this. Update callers and messages. Do not
11720 call fatal. Check thread_db_use_events. Do not call
11721 change_inferior_id or new_thread_notify.
11722 (maybe_attach_thread): Update. Do not call new_thread_notify.
11723 (thread_db_init): Set thread_db_use_events. Check use_events.
11724 * utils.c (fatal, warning): Correct message prefix.
11725
30ed0a8f
DJ
117262007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11727
11728 * Makefile.in (clean): Remove new files.
11729 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11730 (powerpc-64.o, powerpc-64.c): New rules.
11731 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11732 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11733 with SPE.
11734 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11735 SPE targets.
11736 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11737 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11738 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11739 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11740 (target_regsets): Add AltiVec and SPE register sets.
11741 * configure.ac: Check for AltiVec and SPE.
11742 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11743 (ppc_fill_vrregset, ppc_store_vrregset): New.
11744 (target_regsets): Add AltiVec register set.
11745 * configure: Regenerated.
11746
fd462a61
DJ
117472007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11748
11749 * linux-low.c (O_LARGEFILE): Define.
11750 (linux_read_memory): Use /proc/PID/mem.
11751 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11752 * configure, config.in: Regenerated.
11753
69f223ed
DJ
117542007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11755
11756 * linux-low.c (linux_wait_for_event): Do not pass signals while
11757 single-stepping.
11758
aec18585
PA
117592007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11760
11761 * win32-low.c (create_process): New.
11762 (win32_create_inferior): Use create_process instead of
11763 CreateProcess. If create_process failed retry appending an ".exe"
11764 suffix. Store the GetLastError result immediatelly after
11765 create_process calls and use it on the call to error.
11766
34d86ddd
PA
117672007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11768
11769 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11770
5a0e3bd0
JB
117712007-08-23 Joel Brobecker <brobecker@adacore.com>
11772
11773 * configure.ac: Switch license to GPLv3.
11774
f88c79e6
MS
117752007-08-01 Michael Snyder <msnyder@access-company.com>
11776
11777 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11778
6b3d9b83
PA
117792007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11780
11781 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11782 typedef.
11783 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11784 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11785 CloseToolhelp32Snapshot.
11786 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11787 CloseToolhelp32Snapshot.
11788
c588c53c
MS
117892007-07-27 Michael Snyder <michael.snyder@access-company.com>
11790
11791 * server.c (main): Check for inferior exit before main loop.
11792
aa0403d9
PA
117932007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11794
11795 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11796 instead of on tmp_desc.
11797
255e7678
DJ
117982007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11799 Daniel Jacobowitz <dan@codesourcery.com>
11800
11801 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11802 (add_thread): Minor cleanups.
11803 (clear_inferiors): Move lower in the file. Clear the DLL
11804 list.
11805 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11806 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11807 (xml_escape_text): New.
11808 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11809 for qSupported.
11810 (handle_v_cont): Report errors.
11811 (gdbserver_version): Update.
11812 (main): Correct size of own_buf. Do not report initial DLL events.
11813 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11814 (unloaded_dll, xml_escape_text): New.
11815 * win32-low.c (enum target_waitkind): Update comments.
11816 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11817 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11818 (win32_EnumProcessModules, win32_GetModuleInformation)
11819 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11820 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11821 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11822 (win32_Module32First, win32_Module32Next, load_toolhelp)
11823 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11824 (get_child_debug_event): Handle DLL events.
11825 (win32_wait): Likewise.
11826
0d37add9
DJ
118272007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11828
11829 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11830 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11831
45e2715e
PA
118322007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11833
11834 * win32-low.c (handle_output_debug_string): Ignore event if not
11835 waiting.
11836
c5674cf1
PA
118372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11838
11839 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11840
2bbe3cc1
DJ
118412007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11842
11843 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11844
ae13219e
DJ
118452007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11846
11847 * inferiors.c (change_inferior_id): Add comment.
11848 * linux-low.c (check_removed_breakpoint): Add an early
11849 prototype. Improve debug output.
11850 (linux_attach): Doc update.
11851 (linux_detach_one_process, linux_detach): Clean up before releasing
11852 each process.
11853 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11854 * linux-low.h (struct process_info): Doc improvement.
11855 * mem-break.c (delete_all_breakpoints): New.
11856 * mem-break.h (delete_all_breakpoints): New prototype.
11857 * thread-db.c (find_first_thread): New.
11858 (thread_db_create_event): Call it instead of
11859 thread_db_find_new_threads. Clean up unused variables.
11860 (maybe_attach_thread): Remove first thread handling.
11861 (thread_db_find_new_threads): Use find_first_thread.
11862 (thread_db_get_tls_address): Likewise.
11863
4105de34
DJ
118642007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11865
11866 * thread-db.c (thread_db_find_new_threads): Add prototype.
11867 (thread_db_create_event): Check for the main thread before adding
11868 a new thread.
11869 (maybe_attach_thread): Only enable event reporting if TID == 0.
11870 (thread_db_get_tls_address): Check for new threads.
11871
2b876972
DJ
118722007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11873
11874 * linux-low.c (linux_create_inferior): Try execv before execvp.
11875 * spu-low.c (spu_create_inferior): Likewise.
11876
7a245884
DJ
118772007-06-13 Mike Frysinger <vapier@gentoo.org>
11878
11879 * linux-low.c (linux_create_inferior): Change execv to execvp.
11880 * spu-low.c (spu_create_inferior): Likewies.
11881
117ce543
DJ
118822007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11883
11884 * Makefile.in (clean): Clean new files instead of deleted ones.
11885 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11886 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11887 rules.
11888 * configure.srv: Specify XML files and new regformats for MIPS and
11889 MIPS64 GNU/Linux.
11890 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11891 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11892 an entry for the restart register.
11893 (mips_cannot_fetch_register, mips_cannot_store_register)
11894 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11895 register names to match the XML descriptions.
11896 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11897 restart register instead of $0.
11898
0e7f50da
UW
118992007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11900 Markus Deuling <deuling@de.ibm.com>
11901
11902 * remote-utils.c (decode_xfer_write): New function.
11903 * server.h (decode_xfer_write): Add prototype.
11904 * server.c (handle_query): Add PACKET_LEN argument. Support
11905 qXfer:spu:read and qXfer:spu:write packets.
11906 (main): Pass packet_len to handle_query.
11907 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11908 * target.h (target_ops): Add qxfer_spu.
11909
374c1d38
UW
119102007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11911
11912 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11913 accessing non-seekable spufs files.
11914
bb63802a
UW
119152007-05-16 Markus Deuling <deuling@de.ibm.com>
11916
889bf7c5 11917 * server.c (handle_query): Add reply for qC packet.
bb63802a 11918
7390519e
PA
119192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11920 Leo Zayas <lerele@champenstudios@com>
11921
11922 * server.h (check_remote_input_interrupt_request): New function.
11923 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11924 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11925 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11926 (check_remote_input_interrupt_request): New function.
11927 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11928 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11929 winapi_GenerateConsoleCtrlEvent): New typedefs.
11930 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11931 to 250 ms.
11932 (win32_wait): Check for remote interrupt request
11933 with check_remote_input_interrupt_request.
11934 (win32_request_interrupt): New function.
11935 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11936
34b34921
PA
119372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11938
11939 * win32-low.c (debug_registers_changed,
11940 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11941 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11942 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11943 (thread_rec): Get context using the low target.
11944 (child_add_thread): Call thread_added on the low target,
11945 which does the same thing.
11946 (regptr): Delete.
11947 (do_initial_child_stuff): Remove debug registers references.
11948 Set context using the low target. Resume threads after
11949 setting the contexts.
11950 (child_continue): Remove dead variable. Remove debug
11951 registers references.
11952 (child_fetch_inferior_registers): Go through the low target.
11953 (do_child_store_inferior_registers): Remove.
11954 (child_store_inferior_registers): Go through the low target.
11955 (win32_resume): Remove debug registers references.
11956 Set context using the low target.
11957 (handle_exception): Change return type to void. Don't record
11958 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11959 first chance exception.
889bf7c5 11960 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11961 goto loop. Always return after waiting for debug event.
11962 (win32_wait): Convert to switch statement. Handle spurious
11963 events.
11964
11965 * win32-i386-low.c (debug_registers_changed,
11966 debug_registers_used): New.
11967 (initial_stuff): Rename to ...
11968 (i386_initial_stuff): ... this. Clear debug registers
11969 state variables.
11970 (store_debug_registers): Delete.
11971 (i386_get_thread_context): New.
11972 (load_debug_registers): Delete.
11973 (i386_set_thread_context): New.
11974 (i386_thread_added): New.
11975 (single_step): Rename to ...
11976 (i386_single_step): ... this.
11977 (do_fetch_inferior_registers): Rename to ...
11978 (i386_fetch_inferior_register): ... this.
11979 (i386_store_inferior_register): New.
11980 (the_low_target): Adapt to new interface.
11981
11982 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11983 (arm_get_thread_context): New.
11984 (arm_set_thread_context): New.
11985 (regptr): New.
11986 (do_fetch_inferior_registers): Rename to ...
11987 (arm_fetch_inferior_register): ... this.
11988 (arm_store_inferior_register): New.
11989 (arm_wince_breakpoint): Reimplement as unsigned long.
11990 (arm_wince_breakpoint_len): Define.
11991 (the_low_target): Adapt to new interface.
11992
11993 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11994 load_debug_registers. Add get_thread_context, set_thread_context,
11995 thread_added and store_inferior_register. Rename
11996 fetch_inferior_registers to fetch_inferior_register.
11997 (regptr): Remove declaration.
11998
dd6953e1
PA
119992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12000
12001 * linux-low.c (linux_detach): Change return type to int. Return 0.
12002 * spu-low.c (spu_detach): Likewise.
12003
444d6139
PA
120042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12005
12006 * target.h (target_ops): Change return type of detach to int.
12007 Add join.
12008 (join_inferior): New.
12009 * server.c (main): Don't skip detach support on mingw32.
12010 If the inferior doesn't support detaching return error.
12011 Call join_inferior instead of using waitpid.
12012 * linux-low.c (linux_join): New.
12013 (linux_target_op): Add linux_join.
12014 * spu-low.c (spu_join): New.
12015 (spu_target_ops): Add spu_join.
12016 * win32-low.c (win32_detach): Adapt to new interface.
12017 Reopen current_process_handle before detaching. Issue a child
12018 resume before detaching.
12019 (win32_join): New.
12020 (win32_target_op): Add win32_join.
12021
1d5315fe
PA
120222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12023
12024 * win32-low.c (win32-attach): Fix return value.
12025 * target.h (target_ops): Describe ATTACH return values.
12026
bf914831
PA
120272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12028
12029 * win32-low.c (GETPROCADDRESS): Define.
12030 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12031 (winapi_DebugSetProcessKillOnExit): Likewise.
12032 (win32_create_inferior): Force usage of ansi CreateProcessA.
12033 (win32_attach): Use GETPROCADDRESS.
12034 (win32_detach): Likewise.
12035
f72f3e60
PA
120362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12037
12038 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12039
ed50f18f
PA
120402007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12041
12042 * win32-low.c: Commit leftover changes from 2007-03-29.
12043
0c2ead7e
DJ
120442007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12045
12046 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12047 fields short instead of int. Add explicit padding.
12048 (i387_cache_to_fsave): Remove unnecessary casts.
12049 (i387_fsave_to_cache): Doc fix.
12050 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12051
73725ff3
DJ
120522007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12053
12054 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12055 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12056
d99f33d8
PA
120572007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12058
12059 * configure.srv (arm*-*-mingw32ce*): Move near the other
12060 arm targets.
12061
68070c10
PA
120622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12063
2482afc6 12064 * configure.ac: Add errno checking.
68070c10
PA
12065 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12066 sys/file.h and malloc.h.
12067 (AC_CHECK_DECLS): Add perror.
12068 (srv_mingwce): Handle.
2482afc6 12069 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12070 win32-i386-low.o to srv_tgtobj.
12071 (i[34567]86-*-mingw*): Likewise.
12072 (arm*-*-mingw32ce*): Add case.
12073 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12074 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12075 [__MINGW32CE__] (strerror): New function.
12076 [__MINGW32CE__] (errno): Define to GetLastError.
12077 [__MINGW32CE__] (COUNTOF): New macro.
12078 (remote_open): Remove extra close call.
12079 * mem-break.c (delete_breakpoint_at): New function.
12080 * mem-break.h (delete_breakpoint_at): Declare.
12081 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12082 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12083 [USE_WIN32API] (read, write): Add char* casts.
12084 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12085 * server.h: Include wincecompat.h on Windows CE.
12086 [HAVE_ERRNO_H]: Check.
12087 (perror): Declare if not declared.
12088 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12089 (perror_with_name): Remove errno declaration.
12090 * wincecompat.h: New.
12091 * wincecompat.c: New.
12092 * win32-low.h: New.
12093 * win32-arm-low.c: New.
12094 * win32-i386-low.c: New.
12095 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12096 (OUTMSG2): Make it safe.
12097 (_T): New macro.
12098 (COUNTOF): New macro.
12099 (NUM_REGS): Get it from the low target.
12100 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12101 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12102 (thread_rec): Let low target handle debug registers.
12103 (child_add_thread): Likewise.
12104 (child_init_thread_list): Likewise.
12105 (continue_one_thread): Likewise.
12106 (regptr): New.
12107 (do_child_fetch_inferior_registers): Move to ...
12108 * win32-i386-low.c: ... here, and rename to ...
12109 (do_fetch_inferior_registers): ... this.
889bf7c5 12110 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12111 Go through the low target.
12112 (do_child_store_inferior_registers): Use regptr.
12113 (strwinerror): New function.
12114 (win32_create_inferior): Handle Windows CE.
12115 Use strwinerror instead of strerror on Windows error
12116 codes. Add program to the error output.
12117 Don't close the main thread handle on Windows CE.
12118 (win32_attach): Use coredll.dll on Windows CE.
12119 (win32_kill): Close current process and current
12120 thread handles.
12121 (win32_detach): Use coredll.dll on Windows CE.
12122 (win32_resume): Let low target handle debug registers, and
12123 step request.
12124 (handle_exception): Add/Remove initial breakpoint. Avoid
12125 non-existant WSTOPSIG on Windows CE.
12126 (win32_read_inferior_memory): Cast to remove warning.
12127 (win32_arch_string): Go through the low target.
12128 (initialize_low): Call set_breakpoint_data with the low
12129 target's breakpoint.
12130 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12131 FOP_REGNUM, mappings): Move to ...
12132 * win32-i386-low.c: ... here.
12133 * win32-low.c (win32_thread_info): Move to ...
12134 * win32-low.h: ... here.
12135 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12136 win32-arm-low.c and wincecompat.c.
12137 (all:): Add $EXEEXT.
12138 (install-only:): Likewise.
12139 (gdbserver:): Likewise.
12140 (gdbreplay:): Likewise.
12141 * config.in: Regenerate.
12142 * configure: Regenerate.
12143
41093d81
PA
121442007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12145
12146 * win32-low.c: Rename typedef thread_info to
12147 win32_thread_info throughout.
12148
544afa54
PA
121492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12150
12151 * win32-i386-low.c: Rename to ...
12152 * win32-low.c: ... this.
12153 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12154 * Makefile.in: Likewise.
12155
bce7165d
PA
121562007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12157
12158 * remote-utils.c (monitor_output): Constify msg parameter.
12159 * server.h (monitor_output): Likewise.
12160 * win32-i386-low.c (handle_output_debug_string): New.
12161 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12162 handle_output_debug_string.
12163 (get_child_debug_event): Likewise.
12164
506c7aa0
DJ
121652007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12166
12167 * server.c (main): Correct strtoul check.
12168
42c81e2a
DJ
121692007-03-27 Jon Ringle <jon@ringle.org>
12170
12171 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12172
9453113a
DJ
121732007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12174
12175 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12176
64a69107
DJ
121772007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12178
12179 * terminal.h: Check HAVE_SGTTY_H.
12180
121812007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12182
12183 * remote-utils.c (remote_open): Print out the assigned port number.
12184
c74d0ad8
DJ
121852007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12186
12187 * remote-utils.c (monitor_output): New function.
12188 * server.c (debug_threads): Define here.
12189 (monitor_show_help): New function.
12190 (handle_query): Handle qRcmd.
12191 (main): Do not handle 'd' packet.
12192 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12193 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12194 of debug_threads.
12195
de7c3b4a
PA
121962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12197
12198 * Makefile.in (EXEEXT): New.
12199 (clean): Use $(EXEEXT).
12200
ef57601b
PA
122012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12202
12203 * target.h (target_ops): Rename send_signal to request_interrupt,
12204 and remove enum target_signal parameter.
12205 * linux-low.c (linux_request_interrupt): Rename from
12206 linux_send_signal, and always send SIGINT.
12207 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12208 and always send SIGINT.
12209 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12210 of send_signal.
12211 (input_interrupt): Likewise.
12212
820f2bda
PA
122132007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12214
12215 * server.c (get_features_xml): Check if target implemented
12216 arch_string.
12217 * win32-i386-low.c (win32_arch_string): New.
12218 (win32_target_ops): Add win32_arch_string as arch_string member.
12219
ab39bf24
UW
122202007-02-22 Markus Deuling <deuling@de.ibm.com>
12221
12222 * spu-low.c (spu_arch_string): New.
12223 (spu_target_ops): Add spu_arch_string.
12224
61ff6e04
DJ
122252007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12226
12227 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12228 * configure.ac: Do not check for terminal.h.
12229 * configure, config.in: Regenerated.
12230
fb1e4ffc
DJ
122312007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12232
12233 * Makefile.in (OBS): Add $(XML_BUILTIN).
12234 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12235 (clean): Update.
12236 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12237 (arm-with-iwmmxt.c): New.
12238 * config.in, configure: Regenerate.
12239 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12240 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12241 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12242 (arm*-*-linux*): Add iWMMXt and regset support.
12243 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12244 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12245 (arm_store_wmmxregset, target_regsets): New.
12246 * server.c (get_features_xml): Take annex argument. Check builtin
12247 XML documents.
12248 (handle_query): Handle multiple annexes.
12249
0f48aa01
DJ
122502007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12251
12252 * remote-utils.c [USE_WIN32API] (read, write): Define.
12253 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12254 write.
12255
23181151
DJ
122562007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12257
12258 * linux-i386-low.c (the_low_target): Set arch_string.
12259 * linux-x86-64-low.c (the_low_target): Likewise.
12260 * linux-low.c (linux_arch_string): New.
12261 (linux_target_ops): Add it.
12262 * linux-low.h (struct linux_target_ops): Add arch_string.
12263 * server.c (write_qxfer_response): Use const void * for DATA.
12264 (get_features_xml): New.
12265 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12266 * target.h (struct target_ops): Add arch_string method.
12267
9d606399
DJ
122682007-01-03 Denis Pilat <denis.pilat@st.com>
12269 Daniel Jacobowitz <dan@codesourcery.com>
12270
12271 * linux-low.c (linux_kill): Handle being called with no threads.
12272 * win32-i386-low.c (win32_kill): Likewise.
12273 (get_child_debug_event): Clear current_process_handle.
12274
122752006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12276 Daniel Jacobowitz <dan@codesourcery.com>
12277
12278 * remote-utils.c (remote_open): Check the type of specified
12279 serial port devices before opening them.
12280 * server.c (main): Kill the inferior if an error occurs during
12281 the first remote_open.
12282
a5e13d24
DJ
122832006-12-05 Markus Deuling <deuling@de.ibm.com>
12284
12285 * README: Update supported targets.
12286
186947f7
DJ
122872006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12288
12289 * Makefile.in (clean): Remove reg-mips64.c.
12290 (reg-mips64.c, reg-mips64.o): New rules.
12291 * configure.srv: Handle mips64. Include regset support for mips.
12292 * linux-mips-low.c (union mips_register): New.
12293 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12294 (mips_breakpoint, mips_breakpoint_at): Use int.
12295 (mips_collect_register, mips_supply_register)
12296 (mips_collect_register_32bit, mips_supply_register_32bit)
12297 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12298 (mips_store_fpregset, target_regsets): New.
12299 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12300
a13e2c95
UW
123012006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12302
12303 * configure.srv: Add target "spu*-*-*".
12304 * Makefile.in (clean): Remove reg-spu.c.
12305 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12306 * spu-low.c: New file.
12307
cb7283db
DJ
123082006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12309
12310 * configure.ac: Correct td_thr_tls_get_addr test.
12311 * configure: Regenerated.
12312
89be2091
DJ
123132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12314
12315 * linux-low.c (linux_wait_for_event): Reformat. Use the
12316 pass_signals array.
12317 * remote-utils.c (decode_address_to_semicolon): New.
12318 * server.c (pass_signals, handle_general_set): New.
12319 (handle_query): Mention QPassSignals for qSupported.
12320 (main): Call handle_general_set.
12321 * server.h (pass_signals, decode_address_to_semicolon): New.
12322
000ef4f0
DJ
123232006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12324
12325 * server.c (handle_query): Correct error handling for read_auxv.
12326
b7149293
UW
123272005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12328
12329 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12330 and srv_linux_thread_db to yes.
12331 * linux-s390-low.c (s390_fill_gregset): New function.
12332 (target_regsets): Define data structure.
12333
dae5f5cf
DJ
123342006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12335
12336 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12337 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12338 * config.in, configure: Regenerated.
12339 * inferiors.c (gdb_id_to_thread): New function.
12340 (gdb_id_to_thread_id): Use it.
12341 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12342 * linux-low.h (struct process_info): Add th member.
12343 (thread_db_get_tls_address): New prototype.
12344 * remote-utils.c (decode_address): Make non-static.
12345 * server.c (handle_query): Handle qGetTLSAddr.
12346 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12347 * target.h (struct target_ops): Add get_tls_address.
12348 * thread-db.c (maybe_attach_thread): Save the thread handle.
12349 (thread_db_get_tls_address): New.
12350
32ca6d61
DJ
123512006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12352
12353 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12354 (linux_resume_one_process): Take a siginfo_t *. Update all
12355 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12356 (struct pending_signals): Add a siginfo_t.
12357 (linux_wait_for_process): Always set last_status.
12358 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12359 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12360 * linux-low.h (struct process_info): Add last_status.
12361
5ffff7c1
DJ
123622006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12363
12364 * remote-utils.c (try_rle): New function.
12365 (putpkt_binary): Use it.
12366
8695c747
DJ
123672006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12368
12369 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12370 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12371 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12372 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12373 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12374 point registers.
12375
290fadea
RS
123762006-08-08 Richard Sandiford <richard@codesourcery.com>
12377
12378 * server.c (terminal_fd): New variable.
12379 (old_foreground_pgrp): Likewise.
12380 (restore_old_foreground_pgrp): New function.
12381 (start_inferior): Record the terminal file descriptor in terminal_fd
12382 and its original foreground group in old_foreground_pgrp. Register
12383 restore_old_foreground_pgrp with atexit().
12384
9f2e1e63
DJ
123852006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12386
12387 * server.c (handle_query): Correct qPart to qXfer.
12388
b80864fb
DJ
123892006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12390
12391 * configure.ac: Check for more headers which are missing on
12392 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12393 * configure.srv: Add Cygwin and mingw32.
12394 * remote-utils.c: Don't include headers unconditionally which
12395 are missing on mingw32. Include <winsock.h> for mingw32.
12396 (remote_open): Adjust for mingw32 support. Flush
12397 standard error after writing to it.
12398 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12399 (unblock_async_io, enable_async_io, disable_async_io)
12400 (readchar, getpkt): Update for Winsock support.
12401 (prepare_resume_reply): Expect a protocol signal number.
12402 * server.c: Disable <sys/wait.h> on mingw32.
12403 (start_inferior): Adjust for mingw32 support. Flush
12404 standard error after writing to it.
12405 (attach_inferior): Likewise. Use protocol signal
12406 numbers.
12407 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12408 and names.
12409 * win32-i386-low.c: New file.
12410 * Makefile.in (XM_CLIBS): Set.
12411 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12412 (win32-i386-low.o): New dependency rule.
12413 * linux-low.c (linux_wait): Use target signal numbers.
12414 * target.h (struct target_ops): Doc fix.
12415 * server.h (target_signal_to_name): New prototype.
12416 * gdbreplay.c: Don't include headers unconditionally which
12417 are missing on mingw32. Include <winsock.h> for mingw32.
12418 (remote_close, remote_open): Adjust for Winsock support.
12419 * configure, config.in: Regenerated.
12420
0876f84a
DJ
124212006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12422
12423 * server.c (decode_xfer_read, write_qxfer_response): New.
12424 (handle_query): Take a packet length argument. Handle
12425 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12426 the qSupported response.
12427 (main): Update call to handle_query.
12428
01f9e8fa
DJ
124292006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12430
12431 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12432 (putpkt_binary): Renamed from putpkt and adjusted for binary
12433 data.
12434 (putpkt): New wrapper for putpkt_binary.
12435 (readchar): Don't mask off the high bit.
12436 (decode_X_packet): New function.
12437 * server.c (main): Call putpkt_binary if a handler sets the packet
12438 length. Save the length of the incoming packet. Handle 'X'.
12439 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12440
be2a5f71
DJ
124412006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12442
12443 * server.c (handle_query): Handle qSupported.
12444
ea025f5f
DJ
124452006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12446
12447 * remote-utils.c (all_symbols_looked_up): New variable.
12448 (look_up_one_symbol): Check it.
12449 * server.h (look_up_one_symbol): New declaration.
12450 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12451
9308fc88
DJ
124522006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12453
12454 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12455 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12456 (PTRACE_GET_THREAD_AREA): Define.
12457 (ps_get_thread_area): New function.
12458
52fb6437
NS
124592006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12460
12461 * configure.srv (m68k*-*-uclinux*): New target.
12462 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12463 (linux_resume_one_process): Remove extraneous cast.
12464 (linux_read_offsets): New.
12465 (linux_target_op): Add linux_read_offsets on mmuless systems.
12466 * server.c (handle_query): Add qOffsets logic.
12467 * target.h (struct target_ops): Add read_offsets.
12468
21b0f40c
DJ
124692006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12470
12471 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12472 (PTRACE_GET_THREAD_AREA): Define.
12473 (ps_get_thread_area): New function.
12474 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12475 (linux-x86-64-low.o): Update.
12476
0050a760
DJ
124772006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12478
12479 * configure.ac: Remove checks for prfpregset_t.
12480 * gdb_proc_service.h: New file.
12481 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12482 new "gdb_proc_service.h".
12483 * proc-service.c: Likewise.
12484 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12485 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12486 * Makefile.in (gdb_proc_service_h): Updated.
12487 * configure, config.in: Regenerated.
12488
b92a518e
DJ
124892006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12490
12491 * remote-utils.c (prepare_resume_reply): Move declaration
12492 of gdb_id_from_wait to the top of the block.
12493
545587ee
DJ
124942006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12495
12496 * linux-low.c (regsets_store_inferior_registers): Read the regset
12497 from the target before filling it.
12498
9db87ebd
DJ
124992006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12500
12501 * server.c (attach_inferior): Return SIGTRAP for a successful
12502 attach.
12503
dd24457d
DJ
125042006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12505
12506 * Makefile.in (OBS): Add version.o.
12507 (STAGESTUFF): Delete.
12508 (version.o): Add dependencies.
12509 (version.c): Replace rule.
12510 (clean): Remove version.c.
12511 * server.c (gdbserver_version): New.
12512 (gdbserver_usage): Use printf.
12513 (main): Handle --version and --help.
12514 * server.h (version, host_name): Add declarations.
12515
6f0f660e
EZ
125162005-12-23 Eli Zaretskii <eliz@gnu.org>
12517
889bf7c5
PA
12518 * linux-arm-low.c:
12519 * linux-arm-low.c:
12520 * inferiors.c:
12521 * i387-fp.h:
12522 * i387-fp.c:
12523 * gdbreplay.c:
12524 * regcache.c:
12525 * proc-service.c:
12526 * mem-break.h:
12527 * mem-break.c:
12528 * linux-x86-64-low.c:
12529 * linux-sh-low.c:
12530 * linux-s390-low.c:
12531 * linux-ppc64-low.c:
12532 * linux-ppc-low.c:
12533 * linux-mips-low.c:
12534 * linux-m68k-low.c:
12535 * linux-m32r-low.c:
12536 * linux-low.h:
12537 * linux-low.c:
12538 * linux-ia64-low.c:
12539 * linux-i386-low.c:
12540 * linux-crisv32-low.c:
12541 * thread-db.c:
12542 * terminal.h:
12543 * target.h:
12544 * target.c:
12545 * server.h:
12546 * server.c:
12547 * remote-utils.c:
12548 * regcache.h:
12549 * utils.c:
12550 * Makefile.in:
12551 * configure.ac:
6f0f660e
EZ
12552 * gdbserver.1: Add (C) after Copyright. Update the FSF
12553 address.
12554
9d1fb177
DJ
125552005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12556
12557 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12558 (arm_breakpoint_at): Recognize both breakpoints.
12559 (the_low_target): Use the correct breakpoint instruction.
12560
011a70c2
DJ
125612005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12562
12563 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12564 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12565 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12566 (the_low_target): Update.
12567
7fb85e41
AS
125682005-10-25 Andreas Schwab <schwab@suse.de>
12569
12570 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12571
12572 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12573 (ia64_num_regs): Reduce to 462.
12574
3db0444b
DJ
125752005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12576
12577 * acinclude.m4: Correct quoting.
12578 * aclocal.m4: Regenerated.
12579
12580 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12581 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12582 (thread_db_init): Call thread_db_err_str.
12583 * configure.ac: Check for TD_VERSION.
12584 * config.in, configure: Regenerated.
12585
bee0189a
DJ
125862005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12587
12588 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12589
e9d25b98
DJ
125902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12591
12592 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12593 is not available. Define HAVE_PTRACE_GETREGS if it is.
12594 * config.in, configure: Regenerated.
12595 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12596 * linux-i386-low.c, linux-m68k-low.c: Update to use
12597 HAVE_PTRACE_GETREGS.
12598 * linux-low.c (regsets_fetch_inferior_registers)
12599 (regsets_store_inferior_registers): Only return 0 if we processed
12600 GENERAL_REGS.
12601 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12602 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12603
a06660f7
DJ
126042005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12605
12606 * inferiors.c (struct thread_info): Add gdb_id.
12607 (add_thread): Add gdb_id argument.
12608 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12609 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12610 calls to add_thread.
12611 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12612 * server.c (handle_query): Use thread_to_gdb_id.
12613 (handle_v_cont, main): Use gdb_id_to_thread_id.
12614 * server.h (add_thread): Update prototype.
12615 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12616 prototypes.
12617
5a1f5858
DJ
126182005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12619
12620 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12621 left-padded registers.
12622 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12623 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12624
e122f1f5
SE
126252005-07-01 Steve Ellcey <sje@cup.hp.com>
12626
12627 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12628 * configure: Regenerate.
12629 * config.in: Regenerate.
12630 * server.h (NEED_DECLARATION_STRERROR):
12631 Replace with !HAVE_DECL_STRERROR.
12632
d592fa2f
DJ
126332005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12634
12635 * linux-low.c (linux_wait, linux_send_signal): Don't test
12636 an unsigned long variable for > 0 if it could be MAX_ULONG.
12637 * server.c (myresume): Likewise.
12638 * target.c (set_desired_inferior): Likewise.
12639
ccbd4912
MK
126402005-06-13 Mark Kettenis <kettenis@gnu.org>
12641
12642 * configure.ac: Simplify and improve check for socklen_t.
12643 * configure, config.in: Regenerate.
12644
f450004a
DJ
126452005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12646
12647 * acconfig.h: Remove.
12648 * configure.ac: Add a test for socklen_t. Use three-argument
12649 AC_DEFINE throughout.
12650 * config.in: Regenerated using autoheader 2.59.
12651 * configure: Regenerated.
12652
12653 * gdbreplay.c (socklen_t): Provide a default.
12654 (remote_open): Use socklen_t.
12655 * remote-utils.c (socklen_t): Provide a default.
12656 (remote_open): Use socklen_t.
12657 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12658 unsigned char.
12659
12660 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12661 char for buffers.
12662 * linux-low.c (linux_read_memory, linux_write_memory)
12663 (linux_read_auxv): Likewise.
12664 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12665 (check_mem_write): Likewise.
12666 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12667 Likewise.
12668 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12669 (registers_from_string, register_data): Likewise.
12670 * server.c (handle_query, main): Likewise.
12671 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12672 (decode_M_packet): Likewise.
12673 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12674 * target.h (struct target_ops): Update read_memory, write_memory,
12675 and read_auxv.
12676 (read_inferior_memory, write_inferior_memory): Update.
12677 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12678 to unsigned char *.
12679 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12680 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12681 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12682 linux-s390-low.c, linux-sh-low.c: Update for changes in
12683 read_inferior_memory and the_low_target->breakpoint.
12684
eee84df1
DJ
126852005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12686
12687 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12688 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12689 * configure.srv: Add powerpc64-*-linux*.
12690 * linux-ppc64-low.c: New file.
12691
45b134e5
OF
126922005-05-23 Orjan Friberg <orjanf@axis.com>
12693
12694 * linux-cris-low.c: New file with support for CRIS.
12695 * linux-crisv32-low.c: Ditto for CRISv32.
12696 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12697 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12698 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12699 reg-crisv32.o, and reg-crisv32.c to make rules.
12700 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12701 recognized targets.
12702
48d93c75
UW
127032005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12704
12705 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12706 of sizeof (PTRACE_XFER_TYPE).
12707 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12708
e013ee27
OF
127092005-05-12 Orjan Friberg <orjanf@axis.com>
12710
889bf7c5 12711 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12712 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12713 pointers for hardware watchpoint support.
12714 * linux-low.h (struct linux_target_ops): Ditto.
12715 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12716 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12717 to linux_target_ops.
12718 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12719 reply packet.
12720 * server.c (main): Recognize 'Z' and 'z' packets.
12721
b0ded00b
UW
127222005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12723
12724 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12725 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12726 (the_low_target): Add new members.
12727
8643e2ad
DJ
127282005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12729
12730 * proc-service.c (ps_lgetregs): Search all_processes instead of
12731 all_threads.
12732
fc620387
DJ
127332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12734
12735 * server.c (start_inferior): Change return type to int.
12736 (attach_inferior): Change sigptr to int *.
12737 (handle_v_cont, handle_v_requests): Change signal to int *.
12738 (main): Change signal to int.
12739
127402005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12741
12742 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12743 * configure.srv: Add m32r*-*-linux*.
12744 * linux-m32r-low.c: New file.
12745
e0e76420
DJ
127462005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12747
12748 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12749
a1928bad
DJ
127502005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12751
12752 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12753 Take unsigned long arguments for PIDs.
12754 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12755 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12756 (wait_for_sigstop, linux_resume_one_process)
12757 (regsets_fetch_inferior_registers, linux_send_signal)
12758 (linux_read_auxv): Likewise. Update the types of variables holding
12759 PIDs. Update format string specifiers.
12760 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12761 * remote-utils.c (prepare_resume_reply): Likewise.
12762 * server.c (cont_thread, general_thread, step_thread)
12763 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12764 unsigned long.
12765 (handle_query): Update format specifiers.
12766 (handle_v_cont, main): Use strtoul for thread IDs.
12767 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12768 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12769 (general_thread, step_thread, thread_from_wait)
12770 (old_thread_from_wait): Update.
12771 * target.h (struct thread_resume): Use unsigned long for THREAD.
12772 (struct target_ops): Use unsigned long for arguments to attach and
12773 thread_alive.
12774
dcdb98d2
DJ
127752005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12776
12777 * acinclude.m4: Include bfd/bfd.m4 directly.
12778 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12779 <agriffis@toolchain.org>.
12780 * aclocal.m4, configure: Regenerated.
12781
bec39cab
AC
127822005-01-07 Andrew Cagney <cagney@gnu.org>
12783
12784 * configure.ac: Rename configure.in, require autoconf 2.59.
12785 * configure: Re-generate.
12786
434c4c77
DJ
127872004-12-08 Daniel Jacobowitz <dan@debian.org>
12788
12789 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12790 LIBS when finished.
12791 * aclocal.m4: Regenerated.
12792 * configure: Regenerated.
12793
db1d3e1b
AS
127942004-11-21 Andreas Schwab <schwab@suse.de>
12795
12796 * linux-m68k-low.c (m68k_num_gregs): Define.
12797 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12798 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12799 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12800 (m68k_breakpoint_at): New. Add to the_low_target.
12801
12802 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12803 srv_linux_thread_db to yes.
12804
43360365
JB
128052004-10-20 Joel Brobecker <brobecker@gnat.com>
12806
12807 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12808 (ARCH_SET_FS): Likewise.
12809 (ARCH_GET_FS): Likewise.
12810 (ARCH_GET_GS): Likewise.
12811
fd500816
DJ
128122004-10-16 Daniel Jacobowitz <dan@debian.org>
12813
12814 * linux-i386-low.c (ps_get_thread_area): New.
12815 * linux-x86-64-low.c (ps_get_thread_area): New.
12816 * linux-low.c: Include <sys/syscall.h>.
12817 (linux_kill_one_process): Don't kill the first thread here.
12818 (linux_kill): Kill the first thread here.
12819 (kill_lwp): New function.
12820 (send_sigstop, linux_send_signal): Use it.
12821 * proc-service.c: Clean up #ifdefs.
12822 (fpregset_info): Delete.
12823 (ps_lgetregs): Update and enable implementation.
12824 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12825 implementations.
12826 * remote-utils.c (struct sym_cache, symbol_cache): New.
12827 (input_interrupt): Print a clearer message.
12828 (async_io_enabled): New variable.
12829 (enable_async_io, disable_async_io): Use it. Update comments.
12830 (look_up_one_symbol): Use the symbol cache.
12831 * thread-db.c (thread_db_look_up_symbols): New function.
12832 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12833
f6de3c42
DJ
128342004-10-16 Daniel Jacobowitz <dan@debian.org>
12835
12836 * configure.in: Test for -rdynamic.
12837 * configure: Regenerated.
12838 * Makefile (INTERNAL_LDFLAGS): New.
12839 (gdbserver, gdbreplay): Use it.
12840
2c0fc042
AC
128412004-09-02 Andrew Cagney <cagney@gnu.org>
12842
12843 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12844
075b3282
DJ
128452004-03-23 Daniel Jacobowitz <drow@mvista.com>
12846
12847 * linux-low.c (linux_wait): Clear all_processes list also.
12848
fa6a77dc
DJ
128492004-03-12 Daniel Jacobowitz <drow@mvista.com>
12850
12851 * linux-low.c: Include <errno.h>. Remove extern declaration of
12852 errno.
12853
6d782a97
DJ
128542004-03-12 Daniel Jacobowitz <drow@mvista.com>
12855
12856 * gdbreplay.c, server.h, utils.c: Update copyright years.
12857
3a7fb99b
DJ
128582004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12859
12860 * server.c (main): Print child status or termination signal from
12861 variable 'signal', not 'sig'.
12862
c3e735a6
DJ
128632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12864
12865 * linux-low.c (linux_read_memory): Change return type to
12866 int. Check for and return error from ptrace().
12867 * target.c (read_inferior_memory): Change return type to int. Pass
12868 back return status from the_target->read_memory().
12869 * target.h (struct target_ops): Adapt *read_memory() prototype.
12870 Update comment.
12871 (read_inferior_memory): Adapt prototype.
12872 * server.c (main): Return an error packet if
12873 read_inferior_memory() returns an error.
12874
a59d1c82
DJ
128752004-03-04 Daniel Jacobowitz <drow@mvista.com>
12876
12877 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12878 Unify with other clean targets.
12879
dc3f8883
DJ
128802004-02-29 Daniel Jacobowitz <drow@mvista.com>
12881
12882 * server.c (handle_v_cont): Call set_desired_inferior.
12883
89a208da
DJ
128842004-02-29 Daniel Jacobowitz <drow@mvista.com>
12885
12886 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12887
62ea82f5
DJ
128882004-02-29 Daniel Jacobowitz <drow@mvista.com>
12889
12890 * linux-low.c (linux_wait): Unblock async I/O.
12891 (linux_resume): Block and enable async I/O.
12892 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12893 * server.h (block_async_io, unblock_async_io): Add prototypes.
12894
6910d122
DJ
128952004-02-29 Daniel Jacobowitz <drow@mvista.com>
12896
12897 * remote-utils.c (remote_open): Print a status notice after
12898 opening a TCP port.
12899 * server.c (attach_inferior): Print a status notice after
12900 attaching.
12901
129022004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12903
12904 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12905
c89dc5d4
DJ
129062004-02-26 Daniel Jacobowitz <drow@mvista.com>
12907
12908 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12909 error packet.
12910 * server.c, target.h: Update copyright years.
12911
4b8dad4a
RM
129122004-02-25 Roland McGrath <roland@redhat.com>
12913
12914 * target.h (struct target_ops): New member `read_auxv'.
12915 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12916 * linux-low.c (linux_read_auxv): New function.
12917 (linux_target_ops): Initialize `read_auxv' member to that.
12918
d7446758
JB
129192004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12920
12921 Committed by Jim Blandy <jimb@redhat.com>.
12922
12923 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12924 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12925 instead of GPR_SIZE to distiguish s390 and s390x targets.
12926
5544ad89
DJ
129272004-01-31 Daniel Jacobowitz <drow@mvista.com>
12928
12929 * linux-low.c: Update copyright year.
12930 (check_removed_breakpoint): Clear pending_is_breakpoint.
12931 (linux_set_resume_request, linux_queue_one_thread)
12932 (resume_status_pending_p): New functions.
12933 (linux_continue_one_thread): Use process->resume.
12934 (linux_resume): Only resume threads if there are no pending events.
12935 * linux-low.h (struct process_info): Add resume request
12936 pointer.
12937
2a68b70e
DJ
129382004-01-30 Daniel Jacobowitz <drow@mvista.com>
12939
12940 * regcache.c (new_register_cache): Clear the allocated register
12941 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12942
64386c31
DJ
129432003-10-13 Daniel Jacobowitz <drow@mvista.com>
12944
12945 * linux-low.c (linux_resume): Take a struct thread_resume *
12946 argument.
12947 (linux_wait): Update call.
12948 (resume_ptr): New static variable.
12949 (linux_continue_one_thread): Renamed from
12950 linux_continue_one_process. Use resume_ptr.
12951 (linux_resume): Use linux_continue_one_thread.
12952 * server.c (handle_v_cont, handle_v_requests): New functions.
12953 (myresume): New function.
12954 (main): Handle 'v' case.
12955 * target.h (struct thread_resume): New type.
12956 (struct target_ops): Change argument of "resume" to struct
12957 thread_resume *.
12958 (myresume): Delete macro.
12959
c938e9b0
L
129602003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12961
12962 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12963 (uninstall): Support DESTDIR.
12964
7f313d07
BC
12965Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12966
12967 * configure.srv: Add xscale*linux copy of arm*linux entry.
12968
3b2fc2ea
DJ
129692003-07-24 Daniel Jacobowitz <drow@mvista.com>
12970
12971 * linux-arm-low.c (arm_reinsert_addr): New function.
12972 (the_low_target): Add arm_reinsert_addr.
12973
1c0a559e
MK
129742003-07-08 Mark Kettenis <kettenis@gnu.org>
12975
12976 * mem-break.c: Remove whitespace at end of file.
12977
43d5792c
DJ
129782003-06-28 Daniel Jacobowitz <drow@mvista.com>
12979
12980 * configure.in: Check whether we need to prototype strerror.
12981 * server.h: Optionally prototype strerror.
12982 * gdbreplay.c (perror_with_name): Use strerror.
12983 * linux-low.c (linux_attach_lwp): Use strerror.
12984 * utils.c (perror_with_name): Use strerror.
12985 * config.in, configure: Regenerated.
12986
c8a86edf
DJ
129872003-06-28 Daniel Jacobowitz <drow@mvista.com>
12988
12989 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12990 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12991
73d37363
DJ
129922003-06-20 Daniel Jacobowitz <drow@mvista.com>
12993
12994 * Makefile.in (SFILES): Update.
12995 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12996 low-sun3.c: Remove files.
12997
6ad8ae5c
DJ
129982003-06-17 Daniel Jacobowitz <drow@mvista.com>
12999
13000 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13001 (linux_detach_one_process, linux_detach): New functions.
13002 (linux_target_ops): Add linux_detach.
13003 * server.c (main): Handle 'D' packet.
13004 * target.h (struct target_ops): Add "detach" member.
13005 (detach_inferior): Define.
13006
1581182a
MK
130072003-06-13 Mark Kettenis <kettenis@gnu.org>
13008
13009 From Kelley Cook <kelleycook@wideopenwest.com>:
13010 * configure.srv: Accept i[34567]86 variants.
13011
e5379b03
DJ
130122003-06-05 Daniel Jacobowitz <drow@mvista.com>
13013
13014 * linux-low.c (linux_wait_for_event): Correct comment typos.
13015 (linux_resume_one_process): Call check_removed_breakpoint.
13016 (linux_send_signal): New function.
13017 (linux_target_ops): Add linux_send_signal.
13018 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13019 of kill.
13020 * target.h (struct target_ops): Add send_signal.
13021
2ff29de4
JB
130222003-05-29 Jim Blandy <jimb@redhat.com>
13023
13024 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13025 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13026 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13027 away part of the register's value.
13028
254787d4
DJ
130292003-03-26 Daniel Jacobowitz <drow@mvista.com>
13030
13031 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13032 (linux_wait_for_event, linux_init_signals): Likewise.
13033
94e10508
DJ
130342003-03-17 Daniel Jacobowitz <drow@mvista.com>
13035
13036 * configure.in: Check for stdlib.h.
13037 * configure: Regenerated.
13038 * config.in: Regenerated.
13039
4c0711e0
DJ
130402003-01-04 Andreas Schwab <schwab@suse.de>
13041
13042 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13043
ef66e766
AC
130442003-01-02 Andrew Cagney <ac131313@redhat.com>
13045
13046 * Makefile.in: Remove obsolete code.
13047
a1358604
DJ
130482002-11-20 Daniel Jacobowitz <drow@mvista.com>
13049
13050 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13051 defined(PT_FPR0_HI).
13052
23ce3b1c
DJ
130532002-11-17 Stuart Hughes <seh@zee2.com>
13054
13055 * linux-arm-low.c (arm_num_regs): Increase.
13056 (arm_regmap): Include status register.
13057
130582002-11-17 Daniel Jacobowitz <drow@mvista.com>
13059
13060 * linux-low.c (register_addr): Remove incorrect -1 check.
13061
a9fa9f7d
DJ
130622002-08-29 Daniel Jacobowitz <drow@mvista.com>
13063
13064 * linux-low.c (linux_create_inferior): Call setpgid. Return
13065 the new PID.
13066 (unstopped_p, linux_signal_pid): Remove.
13067 (linux_target_ops): Remove linux_signal_pid.
13068 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13069 global instead of target method.
13070 * target.h (struct target_ops): Remove signal_pid. Update comment
13071 for create_inferior.
13072 * server.c (signal_pid): New variable.
13073 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13074 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13075 (attach_inferior): Set signal_pid.
13076
17574093
DJ
130772002-08-23 Daniel Jacobowitz <drow@mvista.com>
13078
13079 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13080
130812002-08-20 Jim Blandy <jimb@redhat.com>
13082
13083 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13084 default for this.
13085
130862002-08-01 Andrew Cagney <cagney@redhat.com>
13087
13088 * Makefile.in: Make chill references obsolete.
13089
130902002-07-24 Kevin Buettner <kevinb@redhat.com>
13091
13092 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13093 * configure: Regenerate.
13094 * config.in: Regenerate.
13095
130962002-07-09 David O'Brien <obrien@FreeBSD.org>
13097
13098 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13099 (perror_with_name, remote_close, remote_open, expect, play): Static.
13100
131012002-07-04 Michal Ludvig <mludvig@suse.cz>
13102
4b8dad4a 13103 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13104 byte offsets instead of an array of indexes.
13105 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13106
131072002-06-13 Daniel Jacobowitz <drow@mvista.com>
13108
13109 * regcache.c: Add comment.
13110
131112002-06-11 Daniel Jacobowitz <drow@mvista.com>
13112
13113 * thread-db.c: New file.
13114 * proc-service.c: New file.
13115 * acinclude.m4: New file.
13116 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13117 proc-service.o, and thread-db.o.
13118 (linux-low.o): Add USE_THREAD_DB.
13119 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13120 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13121 * aclocal.m4: Regenerated.
13122 * config.in: Regenerated.
13123 * configure: Regenerated.
13124 * configure.in: Check for proc_service.h, sys/procfs.h,
13125 thread_db.h, and linux/elf.h headrs.
13126 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13127 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13128 Check for -lthread_db and thread support.
13129 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13130 PowerPC, and SuperH.
13131 * i387-fp.c: Constify arguments.
13132 * i387-fp.h: Likewise.
13133 * inferiors.c: (struct thread_info): Renamed from
13134 `struct inferior_info'. Remove PID member. Use generic inferior
13135 list header. All uses updated.
13136 (inferiors, signal_pid): Removed.
13137 (all_threads): New variable.
13138 (get_thread): Define.
13139 (add_inferior_to_list): New function.
13140 (for_each_inferior): New function.
13141 (change_inferior_id): New function.
13142 (add_inferior): Removed.
13143 (remove_inferior): New function.
13144 (add_thread): New function.
13145 (free_one_thread): New function.
13146 (remove_thread): New function.
13147 (clear_inferiors): Use for_each_inferior and free_one_thread.
13148 (find_inferior): New function.
13149 (find_inferior_id): New function.
13150 (inferior_target_data): Update argument type.
13151 (set_inferior_target_data): Likewise.
13152 (inferior_regcache_data): Likewise.
13153 (set_inferior_regcache_data): Likewise.
13154 * linux-low.c (linux_bp_reinsert): Remove.
13155 (all_processes, stopping_threads, using_thrads)
13156 (struct pending_signals, debug_threads, pid_of): New.
13157 (inferior_pid): Replace with macro.
13158 (struct inferior_linux_data): Remove.
13159 (get_stop_pc, add_process): New functions.
13160 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13161 Use add_process and add_thread.
13162 (linux_attach_lwp): New function, based on old linux_attach. Use
13163 add_process and add_thread. Set stop_expected for new threads.
13164 (linux_attach): New function.
13165 (linux_kill_one_process): New function.
13166 (linux_kill): Kill all LWPs.
13167 (linux_thread_alive): Use find_inferior_id.
13168 (check_removed_breakpoints, status_pending_p): New functions.
13169 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13170 Update. Use WNOHANG. Wait for cloned processes also. Update process
13171 struct for the found process.
13172 (linux_wait_for_event): New function.
13173 (linux_wait): Use it. Support LWPs.
13174 (send_sigstop, wait_for_sigstop, stop_all_processes)
13175 (linux_resume_one_process, linux_continue_one_process): New functions.
13176 (linux_resume): Support LWPs.
13177 (REGISTER_RAW_SIZE): Remove.
13178 (fetch_register): Use register_size instead. Call supply_register.
13179 (usr_store_inferior_registers): Likewise. Call collect_register.
13180 Fix recursive case.
13181 (regsets_fetch_inferior_registers): Improve error message.
13182 (regsets_store_inferior_registers): Add debugging.
13183 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13184 (unstopped_p, linux_signal_pid): New functions.
13185 (linux_target_ops): Add linux_signal_pid.
13186 (linux_init_signals): New function.
13187 (initialize_low): Call it. Initialize using_threads.
13188 * regcache.c (inferior_regcache_data): Add valid
13189 flag.
13190 (get_regcache): Fetch registers lazily. Add fetch argument
13191 and update all callers.
13192 (regcache_invalidate_one, regcache_invalidate): New
13193 functions.
13194 (new_register_cache): Renamed from create_register_cache.
13195 Return the new regcache.
13196 (free_register_cache): Change argument to a void *.
13197 (registers_to_string, registers_from_string): Call get_regcache
13198 with fetch flag set.
13199 (register_data): Make static. Pass fetch flag to get_regcache.
13200 (supply_register): Call get_regcache with fetch flag clear.
13201 (collect_register): Call get_regcache with fetch flag set.
13202 (collect_register_as_string): New function.
13203 * regcache.h: Update.
13204 * remote-utils.c (putpkt): Flush after debug output and use
13205 stderr.
13206 Handle input interrupts while waiting for an ACK.
13207 (input_interrupt): Use signal_pid method.
13208 (getpkt): Flush after debug output and use stderr.
13209 (outreg): Use collect_register_as_string.
13210 (new_thread_notify, dead_thread_notify): New functions.
13211 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13212 and general_thread.
13213 (look_up_one_symbol): Flush after debug output.
13214 * server.c (step_thread, server_waiting): New variables.
13215 (start_inferior): Don't use signal_pid. Update call to mywait.
13216 (attach_inferior): Update call to mywait.
13217 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13218 (main): Don't fetch/store registers explicitly. Use
13219 set_desired_inferior. Support proposed ``Hs'' packet. Update
13220 calls to mywait.
13221 * server.h: Update.
13222 (struct inferior_list, struct_inferior_list_entry): New.
13223 * target.c (set_desired_inferior): New.
13224 (write_inferior_memory): Constify.
13225 (mywait): New function.
13226 * target.h: Update.
13227 (struct target_ops): New signal_pid method.
13228 (mywait): Removed macro, added prototype.
13229
13230 * linux-low.h (regset_func): Removed.
13231 (regset_fill_func, regset_store_func): New.
13232 (enum regset_type): New.
13233 (struct regset_info): Add type field. Use new operation types.
13234 (struct linux_target_ops): stop_pc renamed to get_pc.
13235 Add decr_pc_after_break and breakpoint_at.
13236 (get_process, get_thread_proess, get_process_thread)
13237 (strut process_info, all_processes, linux_attach_lwp)
13238 (thread_db_init): New.
13239
13240 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13241 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13242 (the_low_target): Add new members.
13243 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13244 (i386_store_fpxregset): Constify.
13245 (target_regsets): Add new kind identifier.
13246 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13247 (i386_set_pc): Add debugging.
13248 (i386_breakpoint_at): New function.
13249 (the_low_target): Add new members.
13250 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13251 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13252 (mips_breakpoint_at): New.
13253 (the_low_target): Add new members.
13254 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13255 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13256 (the_low_target): Add new members.
13257 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13258 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13259 (the_low_target): Add new members.
13260 * linux-x86-64-low.c (target_regsets): Add new kind
13261 identifier.
13262
132632002-05-15 Daniel Jacobowitz <drow@mvista.com>
13264
13265 From Martin Pool <mbp@samba.org>:
13266 * server.c (gdbserver_usage): New function.
13267 (main): Call it.
13268
132692002-05-14 Daniel Jacobowitz <drow@mvista.com>
13270
13271 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13272 stop_at -> stop_pc.
13273
132742002-05-04 Andrew Cagney <ac131313@redhat.com>
13275
13276 * Makefile.in: Remove obsolete code.
13277
132782002-04-24 Michal Ludvig <mludvig@suse.cz>
13279
13280 * linux-low.c (regsets_fetch_inferior_registers),
13281 (regsets_store_inferior_registers): Removed cast to int from
13282 ptrace() calls.
13283 * regcache.h: Added declaration of struct inferior_info.
13284
132852002-04-20 Daniel Jacobowitz <drow@mvista.com>
13286
13287 * inferiors.c (struct inferior_info): Add regcache_data.
13288 (add_inferior): Call create_register_cache.
13289 (clear_inferiors): Call free_register_cache.
13290 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13291 * regcache.c (struct inferior_regcache_data): New.
13292 (registers): Remove.
13293 (get_regcache): New function.
13294 (create_register_cache, free_register_cache): New functions.
13295 (set_register_cache): Don't initialize the register cache here.
13296 (registers_to_string, registers_from_string, register_data): Call
13297 get_regcache.
13298 * regcache.h: Add prototypes.
13299 * server.h: Likewise.
13300
133012002-04-20 Daniel Jacobowitz <drow@mvista.com>
13302
13303 * mem-break.c: New file.
13304 * mem-break.h: New file.
13305 * Makefile.in: Add mem-break.o rule; update server.h
13306 dependencies.
13307 * inferiors.c (struct inferior_info): Add target_data
13308 member.
13309 (clear_inferiors): Free target_data member if set.
13310 (inferior_target_data, set_inferior_target_data): New functions.
13311 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13312 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13313 * linux-low.c (linux_bp_reinsert): New variable.
13314 (struct inferior_linux_data): New.
13315 (linux_create_inferior): Use set_inferior_target_data.
13316 (linux_attach): Likewise. Call add_inferior.
13317 (linux_wait_for_one_inferior): New function.
13318 (linux_wait): Call it.
13319 (linux_write_memory): Add const.
13320 (initialize_low): Call set_breakpoint_data.
13321 * linux-low.h (struct linux_target_ops): Add breakpoint
13322 handling members.
13323 * server.c (attach_inferior): Remove extra add_inferior
13324 call.
13325 * server.h: Include mem-break.h. Update inferior.c
13326 prototypes.
13327 * target.c (read_inferior_memory)
13328 (write_inferior_memory): New functions.
13329 * target.h (read_inferior_memory)
13330 (write_inferior_memory): Change macros to prototypes.
13331 (struct target_ops): Update comments. Add const to write_memory
13332 definition.
13333
133342002-04-11 Daniel Jacobowitz <drow@mvista.com>
13335
13336 * linux-low.c (usr_store_inferior_registers): Support
13337 registers which are allowed to fail to store.
13338 * linux-low.h (linux_target_ops): Likewise.
13339 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13340 (ppc_cannot_store_register): FPSCR may not be storable.
13341
133422002-04-09 Daniel Jacobowitz <drow@mvista.com>
13343
13344 * server.h: Include <string.h> if HAVE_STRING_H.
13345 * ChangeLog: Correct paths in last ChangeLog entry.
13346
133472002-04-09 Daniel Jacobowitz <drow@mvista.com>
13348
13349 * linux-low.h: Remove obsolete prototypes.
13350 (struct linux_target_ops): New.
13351 (extern the_low_target): New.
13352 * linux-low.c (num_regs, regmap): Remove declarations.
13353 (register_addr): Use the_low_target explicitly.
13354 (fetch_register): Likewise.
13355 (usr_fetch_inferior_registers): Likewise.
13356 (usr_store_inferior_registers): Likewise.
13357 * linux-arm-low.c (num_regs): Remove.
13358 (arm_num_regs): Define.
13359 (arm_regmap): Renamed from regmap, made static.
13360 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13361 made static.
13362 (arm_cannot_store_register): Renamed from cannot_store_register,
13363 made static.
13364 (the_low_target): New.
13365 * linux-i386-low.c (num_regs): Remove.
13366 (i386_num_regs): Define.
13367 (i386_regmap): Renamed from regmap, made static.
13368 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13369 made static.
13370 (i386_cannot_store_register): Renamed from cannot_store_register,
13371 made static.
13372 (the_low_target): New.
13373 * linux-ia64-low.c (num_regs): Remove.
13374 (ia64_num_regs): Define.
13375 (ia64_regmap): Renamed from regmap, made static.
13376 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13377 made static.
13378 (ia64_cannot_store_register): Renamed from cannot_store_register,
13379 made static.
13380 (the_low_target): New.
13381 * linux-m68k-low.c (num_regs): Remove.
13382 (m68k_num_regs): Define.
13383 (m68k_regmap): Renamed from regmap, made static.
13384 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13385 made static.
13386 (m68k_cannot_store_register): Renamed from cannot_store_register,
13387 made static.
13388 (the_low_target): New.
13389 * linux-mips-low.c (num_regs): Remove.
13390 (mips_num_regs): Define.
13391 (mips_regmap): Renamed from regmap, made static.
13392 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13393 made static.
13394 (mips_cannot_store_register): Renamed from cannot_store_register,
13395 made static.
13396 (the_low_target): New.
13397 * linux-ppc-low.c (num_regs): Remove.
13398 (ppc_num_regs): Define.
13399 (ppc_regmap): Renamed from regmap, made static.
13400 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13401 made static.
13402 (ppc_cannot_store_register): Renamed from cannot_store_register,
13403 made static.
13404 (the_low_target): New.
13405 * linux-s390-low.c (num_regs): Remove.
13406 (s390_num_regs): Define.
13407 (s390_regmap): Renamed from regmap, made static.
13408 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13409 made static.
13410 (s390_cannot_store_register): Renamed from cannot_store_register,
13411 made static.
13412 (the_low_target): New.
13413 * linux-sh-low.c (num_regs): Remove.
13414 (sh_num_regs): Define.
13415 (sh_regmap): Renamed from regmap, made static.
13416 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13417 made static.
13418 (sh_cannot_store_register): Renamed from cannot_store_register,
13419 made static.
13420 (the_low_target): New.
13421 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13422 (the_low_target): New.
13423
134242002-04-09 Daniel Jacobowitz <drow@mvista.com>
13425
13426 * Makefile.in: Add stamp-h target.
13427 * configure.in: Create stamp-h.
13428 * configure: Regenerated.
13429
134302002-04-09 Daniel Jacobowitz <drow@mvista.com>
13431
13432 * inferiors.c: New file.
13433 * target.c: New file.
13434 * target.h: New file.
13435 * Makefile.in: Add target.o and inferiors.o. Update
13436 dependencies.
13437 * linux-low.c (inferior_pid): New static variable,
13438 moved from server.c.
13439 (linux_create_inferior): Renamed from create_inferior.
13440 Call add_inferior. Return 0 on success instead of a PID.
13441 (linux_attach): Renamed from myattach.
13442 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13443 (linux_thread_alive): Renamed from mythread_alive.
13444 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13445 child dies.
13446 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13447 (regsets_store_inferior_registers): Correct error message.
13448 Add missing ``return 0''.
13449 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13450 (linux_store_registers): Renamed from store_inferior_registers.
13451 (linux_read_memory): Renamed from read_inferior_memory.
13452 (linux_write_memory): Renamed from write_inferior_memory.
13453 (linux_target_ops): New structure.
13454 (initialize_low): Call set_target_ops ().
13455 * remote-utils.c (unhexify): New function.
13456 (hexify): New function.
13457 (input_interrupt): Send signals to ``signal_pid''.
13458 * server.c (inferior_pid): Remove.
13459 (start_inferior): Update create_inferior call.
13460 (attach_inferior): Call add_inferior.
13461 (handle_query): New function.
13462 (main): Call handle_query for `q' packets.
13463 * server.h: Include "target.h". Remove obsolete prototypes.
13464 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13465
134662002-04-09 Daniel Jacobowitz <drow@mvista.com>
13467
13468 * Makefile.in: Add WARN_CFLAGS. Update configury
13469 dependencies.
13470 * configure.in: Check for <string.h>
13471 * configure: Regenerate.
13472 * config.in: Regenerate.
13473 * gdbreplay.c: Include needed system headers.
13474 (remote_open): Remove strchr prototype.
13475 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13476 * regcache.c (supply_register): Change buf argument to const void *.
13477 (supply_register_by_name): Likewise.
13478 (collect_register): Change buf argument to void *.
13479 (collect_register_by_name): Likewise.
13480 * regcache.h: Add missing prototypes.
13481 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13482 * server.c (handle_query): New function.
13483 (attached): New static variable, moved out of main.
13484 (main): Quiet longjmp clobber warnings.
13485 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13486 * utils.c (error): Remove NORETURN.
13487 (fatal): Likewise.