]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
ARC/BFD: Fix a build error from `index' shadowing a global declaration
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
cc5fd9ab
MK
12016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2
3 * gdb.trace/pending.exp: Fix expected message on continue.
4
99e8eb11
MK
52016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6
7 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8 it works properly on big-endian machines where sizeof (CORE_ADDR)
9 != sizeof (void *).
10
a994041d
PA
112016-01-21 Pedro Alves <palves@redhat.com>
12
13 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
14 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
15 * configure: Regenerate.
16
f7a6a40d
YQ
172016-01-21 Yao Qi <yao.qi@linaro.org>
18
19 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
20 is_thumb and set it according to CPSR saved on the stack.
21 (get_next_pcs_syscall_next_pc): Pass is_thumb to
22 arm_sigreturn_next_pc.
23
6f69e520
YQ
242016-01-18 Yao Qi <yao.qi@linaro.org>
25
26 * linux-low.c (linux_set_pc_64bit): New function.
27 (linux_get_pc_64bit): New function.
28 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
29 Declare.
30 * linux-sparc-low.c (debug_threads): Remove declaration.
31 (sparc_get_pc): Remove.
32 (the_low_target): Use linux_get_pc_64bit instead of
33 sparc_get_pc.
34 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
35 (the_low_target): Use linux_get_pc_64bit and
36 linux_set_pc_64bit.
37
276d4552
YQ
382016-01-18 Yao Qi <yao.qi@linaro.org>
39
40 * linux-arm-low.c (debug_threads): Remove declaration.
41 (arm_get_pc, arm_set_pc): Remove.
42 (the_low_target): Use linux_get_pc_32bit and
43 linux_set_pc_32bit.
44 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
45 (the_low_target): Use linux_get_pc_32bit and
46 linux_set_pc_32bit.
47 * linux-cris-low.c (debug_threads): Remove declaration.
48 (cris_get_pc, cris_set_pc,): Remove.
49 (the_low_target): Use linux_get_pc_32bit and
50 linux_set_pc_32bit.
51 * linux-crisv32-low.c (debug_threads): Remove declaration.
52 (cris_get_pc, cris_set_pc): Remove.
53 (the_low_target): Use linux_get_pc_32bit and
54 linux_set_pc_32bit.
55 * linux-low.c: Include inttypes.h.
56 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
57 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
58 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
59 (the_low_target): Use linux_get_pc_32bit and
60 linux_set_pc_32bit.
61 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
62 (the_low_target): Use linux_get_pc_32bit and
63 linux_set_pc_32bit.
64 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
65 (the_low_target): Use linux_get_pc_32bit and
66 linux_set_pc_32bit.
67 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
68 (the_low_target): Use linux_get_pc_32bit and
69 linux_set_pc_32bit.
70 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
71 (the_low_target): Use linux_get_pc_32bit and
72 linux_set_pc_32bit.
73
eb0edac8
GB
742016-01-18 Gary Benson <gbenson@redhat.com>
75
76 * configure.ac (AC_FUNC_FORK): New check.
77 * config.in: Regenerate.
78 * configure: Likewise.
79
1b451dda
YQ
802016-01-14 Yao Qi <yao.qi@linaro.org>
81
82 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
83 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
84 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
85 arm_get_next_pcs_ctor.
86
82075af2
JS
872016-01-12 Josh Stone <jistone@redhat.com>
88 Philippe Waroquiers <philippe.waroquiers@skynet.be>
89
90 * inferiors.h: Include "gdb_vecs.h".
91 (struct process_info): Add syscalls_to_catch.
92 * inferiors.c (remove_process): Free syscalls_to_catch.
93 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
94 syscall_return stops.
95 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
96 * server.c (handle_general_set): Handle QCatchSyscalls.
97 (handle_query): Report support for QCatchSyscalls.
98 * target.h (struct target_ops): Add supports_catch_syscall.
99 (target_supports_catch_syscall): New macro.
100 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
101 (struct lwp_info): Add syscall_state.
102 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
103 Maintain syscall_state and syscalls_to_catch across exec.
104 (get_syscall_trapinfo): New function, proxy to the_low_target.
105 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
106 (linux_low_filter_event): Toggle syscall_state entry/return for
107 syscall traps, and set it ignored for all others.
108 (gdb_catching_syscalls_p): New function.
109 (gdb_catch_this_syscall_p): New function.
110 (linux_wait_1): Handle SYSCALL_SIGTRAP.
111 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
112 (linux_supports_catch_syscall): New function.
113 (linux_target_ops): Install it.
114 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
115 (the_low_target): Install it.
116
8f13a3ce
MF
1172016-01-12 Mike Frysinger <vapier@gentoo.org>
118
119 * acinclude.m4: Include new ../warning.m4 file.
120 * configure: Regenerated.
121 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
122
5b3da067
MF
1232016-01-12 Mike Frysinger <vapier@gentoo.org>
124
125 * ax.c (is_goto_target): Mark static.
126 * linux-low.c (register_addr): Likewise.
127 (linux_fetch_registers, linux_store_registers): Likewise.
128 * mem-break.c (any_persistent_commands): Fix old prototype.
129 (add_commands_to_breakpoint): Mark static.
130 * regcache.c (find_register_by_name): Delete unused func.
131 * remote-utils.c (hex_or_minus_one): Mark static.
132 * server.c (monitor_show_help): Mark static.
133 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
134 handle_v_requests): Likewise.
135
bc504a31
PA
1362016-01-12 Pedro Alves <palves@redhat.com>
137
138 Remove use of the registered trademark symbol throughout.
139
5a0dd67a
YQ
1402016-01-08 Yao Qi <yao.qi@linaro.org>
141
142 * remote-utils.c (getpkt): If c is '\003', call target hook
143 request_interrupt.
144
b2ca446f
YQ
1452016-01-06 Yao Qi <yao.qi@linaro.org>
146
147 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
148 linux-aarch32-low.c.
149 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
150 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
151 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
152 (thumb2_breakpoint): Declare.
153 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
154 linux-aarch32-low.h.
155 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
156 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
157 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
158
edd88788
JB
1592016-01-01 Joel Brobecker <brobecker@adacore.com>
160
161 * gdbreplay.c (gdbreplay_version): Change copyright year in
162 version message.
163 * server.c (gdbserver_version): Likewise.
164
65da7f14
PP
1652015-12-28 Patrick Palka <patrick@parcs.ath.cx>
166
167 * server.c (crc32_table): Delete.
168 (crc32): Use libiberty's xcrc32 function.
169
4abd5ed2
JB
1702015-12-22 Joel Brobecker <brobecker@adacore.com>
171
172 * lynx-low.c (lynx_delete_thread_callback): New function.
173 (lynx_mourn): Properly delete our process and all of its
174 threads. Remove call to clear_inferiors.
175
0e50fe5c
JB
1762015-12-22 Joel Brobecker <brobecker@adacore.com>
177
178 * target.c (thread_search_callback): Add check that
179 the thread_stopped target callback is not NULL before
180 calling it.
181
35adc03f
YQ
1822015-12-21 Yao Qi <yao.qi@linaro.org>
183
184 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
185 arm breakpoint.
186
bd2b2909
AT
1872015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
188
189 * server.c (handle_query): Call target_supports_software_single_step.
190
7fe5e27e
AT
1912015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
192
193 * linux-low.c (single_step): New function.
194 (linux_resume_one_lwp_throw): Call single_step.
195 (start_step_over): Likewise.
196
d9311bfa
AT
1972015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
198
199 * Makefile.in (SFILES): Append arch/arm-linux.c,
200 arch/arm-get-next-pcs.c.
201 (arm-linux.o): New rule.
202 (arm-get-next-pcs.o): New rule.
203 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
204 arm-linux.o.
205 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
206 to linux-aarch32-low.c.
207 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
208 (arm_breakpoint_len, thumb_breakpoint): Likewise.
209 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
210 (thumb2_breakpoint_len): Likewise.
211 (arm_is_thumb_mode): Make non-static.
212 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
213 from linux-aarch32-low.c.
214 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
215 (arm_breakpoint_len, thumb_breakpoint): Likewise.
216 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
217 (thumb2_breakpoint_len): Likewise.
218 (arm_is_thumb_mode): New declaration.
219 * linux-arm-low.c: Include arch/arm-linux.h
220 aarch/arm-get-next-pcs.h, sys/syscall.h.
221 (get_next_pcs_ops): New struct.
222 (get_next_pcs_addr_bits_remove): New function.
223 (get_next_pcs_is_thumb): New function.
224 (get_next_pcs_read_memory_unsigned_integer): Likewise.
225 (arm_sigreturn_next_pc): Likewise.
226 (get_next_pcs_syscall_next_pc): Likewise.
227 (arm_gdbserver_get_next_pcs): Likewise.
228 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
229 Initialize.
230 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
231 * server.h: Include gdb_vecs.h.
232
68ce2059
AT
2332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
234
235 * Makefile.in (SFILES): Append common/common-regcache.c.
236 (OBS): Append common-regcache.o.
237 (common-regcache.o): New rule.
238 * regcache.c (init_register_cache): Initialize cache to
239 REG_UNAVAILABLE.
240 (regcache_raw_read_unsigned): New function.
241 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
242 register_status enum.
243
fa5308bd
AT
2442015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
245
246 * linux-aarch64-low.c (the_low_targets): Rename
247 breakpoint_reinsert_addr to get_next_pcs.
248 * linux-arm-low.c (the_low_targets): Likewise.
249 * linux-bfin-low.c (the_low_targets): Likewise.
250 * linux-cris-low.c (the_low_targets): Likewise.
251 * linux-crisv32-low.c (the_low_targets): Likewise.
252 * linux-low.c (can_software_single_step): Likewise.
253 (install_software_single_step_breakpoints): New function.
254 (start_step_over): Use install_software_single_step_breakpoints.
255 * linux-low.h: New CORE_ADDR vector.
256 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
257 get_next_pcs.
258 * linux-mips-low.c (the_low_targets): Likewise.
259 * linux-nios2-low.c (the_low_targets): Likewise.
260 * linux-sparc-low.c (the_low_targets): Likewise.
261
4a6ed09b
PA
2622015-12-17 Pedro Alves <palves@redhat.com>
263
264 * linux-low.c (linux_kill_one_lwp): Remove references to
265 LinuxThreads.
266 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
267 to 'kill'.
268 (linux_init_signals): Delete.
269 (initialize_low): Adjust.
270 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
271
7544db95
PA
2722015-12-16 Pedro Alves <palves@redhat.com>
273
274 * configure.ac (compiler warning flags): When testing a
275 -Wno-foo option, check whether -Wfoo works instead.
276 * configure: Regenerate.
277
8020350c
DB
2782015-12-11 Don Breazeal <donb@codesourcery.com>
279
280 * server.c (process_serial_event): Don't exit from gdbserver
281 in remote mode if there are still active inferiors.
282
db91f502
YQ
2832015-12-11 Yao Qi <yao.qi@linaro.org>
284
285 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
286 arm_breakpoint_at if the process is 32-bit.
287
b37a6290
YQ
2882015-12-11 Yao Qi <yao.qi@linaro.org>
289
290 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
291 arm breakpoint.
292
17b1509a
YQ
2932015-12-07 Yao Qi <yao.qi@linaro.org>
294
295 * configure.srv: Append arm.o to srv_tgtobj for
296 aarch64*-*-linux* target.
297 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
298 from linux-arm-low.c.
299 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
300 (arm_breakpoint_len, thumb_breakpoint): Likewise.
301 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
302 (thumb2_breakpoint_len): Likewise.
303 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
304 (arm_breakpoint_kinds): Likewise.
305 (arm_breakpoint_kind_from_pc): Likewise.
306 (arm_sw_breakpoint_from_kind): Likewise.
307 (arm_breakpoint_kind_from_current_state): Likewise.
308 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
309 (arm_sw_breakpoint_from_kind): Declare.
310 (arm_breakpoint_kind_from_current_state): Declare.
311 (arm_breakpoint_at): Declare.
312 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
313 arm_sw_breakpoint_from_kind if process is 32-bit.
314 (aarch64_breakpoint_kind_from_pc): New function.
315 (aarch64_breakpoint_kind_from_current_state): New function.
316 (the_low_target): Initialize fields breakpoint_kind_from_pc
317 and breakpoint_kind_from_current_state.
318 * linux-arm-low.c (arm_breakpoint_kinds): Move to
319 linux-aarch32-low.c.
320 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
321 (arm_breakpoint, arm_breakpoint_len): Likewise.
322 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
323 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
324 (arm_is_thumb_mode): Likewise.
325 (arm_breakpoint_at): Likewise.
326 (arm_breakpoint_kind_from_pc): Likewise.
327 (arm_sw_breakpoint_from_kind): Likewise.
328 (arm_breakpoint_kind_from_current_state): Likewise.
329
330 Revert:
331 2015-08-04 Yao Qi <yao.qi@linaro.org>
332
333 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
334 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
335 * server.c (extended_protocol): Remove "static".
336 * server.h (extended_protocol): Declare it.
337
ece66d65
JS
3382015-12-04 Josh Stone <jistone@redhat.com>
339
340 * target.h (struct target_ops) <arch_setup>: Rename to ...
341 (struct target_ops) <post_create_inferior>: ... this.
342 (target_arch_setup): Rename to ...
343 (target_post_create_inferior): ... this, calling post_create_inferior.
344 * server.c (start_inferior): Update target_arch_setup calls to
345 target_post_create_inferior.
346 * linux-low.c (linux_low_ptrace_options): Forward declare.
347 (linux_arch_setup): Update its comment for general use.
348 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
349 (struct linux_target_ops): Use linux_post_create_inferior.
350 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
351 to post_create_inferior.
352 * nto-low.c (struct nto_target_ops): Likewise.
353 * spu-low.c (struct spu_target_ops): Likewise.
354 * win32-low.c (struct win32_target_ops): Likewise.
355
e58c48b4
AT
3562015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
357
358 * linux-arm-low.c: Remove duplicate arch/arm.h include.
359
fbec8956
AT
3602015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
361
362 * linux-arm-low.c (arm_reinsert_addr): Remove function.
363 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
364 * linux-cris-low.c (cris_reinsert_addr> Remove function.
365 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
366 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
367 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
368 * linux-mips-low.c (mips_reinsert_addr): Remove function.
369 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
370 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
371 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
372 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
373 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
374
9b4c5f87
AT
3752015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
376
377 * linux-low.c (linux_look_up_symbols): Don't call
378 linux_supports_traceclone.
379 * linux-low.h (thread_db_init): Remove use_events argument.
380 * thread-db.c (thread_db_use_event): Remove global variable.
381 (struct thread_db) <td_thr_event_enable_p>: Remove field.
382 (struct thread_db) <td_create_bp>: Remove field.
383 (thread_db_create_event): Remove function.
384 (thread_db_enable_reporting): Likewise.
385 (find_one_thread): Don't check for thread_db_use_events.
386 (attach_thread): Likewise.
387 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
388 (try_thread_db_load_1): Don't check for thread_db_use_events.
389 (thread_db_init): Remove use_events argument and thread events
390 handling.
391 (remove_thread_event_breakpoints): Remove function.
392 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
393
7d00775e
AT
3942015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
395
396 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
397 New function.
398 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
399 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
400 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
401 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
402 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
403 Initialize.
404 * linux-crisv32-low.c (cris_supports_hardware_single_step):
405 New function.
406 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
407 * linux-low.c (can_hardware_single_step): Use
408 supports_hardware_single_step.
409 (can_software_single_step): New function.
410 (start_step_over): Call can_software_single_step.
411 (linux_supports_hardware_single_step): New function.
412 (struct target_ops) <supports_software_single_step>: Initialize.
413 * linux-low.h (struct linux_target_ops)
414 <supports_hardware_single_step>: Initialize.
415 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
416 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
417 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
418 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
419 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
420 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
421 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
422 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
423 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
424 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
425 Initialize.
426 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
427 (struct linux_target_ops) <tile_supports_hardware_single_step>:
428 Initialize.
429 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
430 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
431 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
432 New function.
433 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
434 * target.h (struct target_ops): <supports_software_single_step>:
435 New field.
436 (target_supports_software_single_step): New macro.
437
2d97cd35
AT
4382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
439
440 * linux-low.c (linux_wait_1): Fix pc advance condition.
441 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
442 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
443
769ef81f
AT
4442015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
445
446 * linux-arm-low.c (arm_is_thumb_mode): New function.
447 (arm_breakpoint_at): Use arm_is_thumb_mode.
448 (arm_breakpoint_kind_from_current_state): New function.
449 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
450 Initialize.
451 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
452 (linux_breakpoint_kind_from_current_state): New function.
453 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
454 * linux-low.h (struct linux_target_ops)
455 <breakpoint_kind_from_current_state>: New field.
456 * target.h (struct target_ops): Likewise.
457 (target_breakpoint_kind_from_current_state): New macro.
458
1bebeeca
PA
4592015-11-30 Pedro Alves <palves@redhat.com>
460
461 * linux-low.c (linux_resume): Wake up the event loop before
462 returning.
463
a67a9fae
PA
4642015-11-30 Pedro Alves <palves@redhat.com>
465
466 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
467 check.
468 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
469 to -1.
470 * target.c (struct thread_search): New structure.
471 (thread_search_callback): New function.
472 (prev_general_thread): New global.
473 (prepare_to_access_memory, done_accessing_memory): New functions.
474 * target.h (prepare_to_access_memory, done_accessing_memory):
475 Replace macros with function declarations.
476
f2faf941
PA
4772015-11-30 Pedro Alves <palves@redhat.com>
478
479 PR 14618
480 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
481 report TARGET_WAITKIND_NO_RESUMED.
482 * remote-utils.c (prepare_resume_reply): Handle
483 TARGET_WAITKIND_NO_RESUMED.
484 * server.c (report_no_resumed): New global.
485 (handle_query) <qSupported>: Handle "no-resumed+". Report
486 "no-resumed+" support.
487 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
488 return error if the client doesn't support no-resumed events.
489 (push_stop_notification): New function.
490 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
491 events if the client supports them.
492
a681f9c9
PA
4932015-11-30 Pedro Alves <palves@redhat.com>
494
495 * linux-low.c (thread_still_has_status_pending_p): Don't check
496 vCont;t here.
497 (lwp_resumed): New function.
498 (status_pending_p_callback): Return early if the LWP is not
499 supposed to be resumed.
500
65706a29
PA
5012015-11-30 Pedro Alves <palves@redhat.com>
502
503 * linux-low.c (handle_extended_wait): Assert that the LWP's
504 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
505 thread create events, leave the new child's status pending.
506 (linux_low_filter_event): If GDB wants to hear about thread exit
507 events, leave the LWP marked dead and don't delete it.
508 (linux_wait_for_event_filtered): Don't check for thread exit.
509 (filter_exit_event): New function.
510 (linux_wait_1): Use it, when returning an exit event.
511 (linux_resume_one_lwp_throw): Assert that the LWP's
512 waitstatus is TARGET_WAITKIND_IGNORE.
513 * remote-utils.c (prepare_resume_reply): Handle
514 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
515 * server.c (report_thread_events): New global.
516 (handle_general_set): Handle QThreadEvents.
517 (handle_query) <qSupported>: Handle and report QThreadEvents+;
518 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
519 TARGET_WAITKIND_THREAD_EXITED.
520 * server.h (report_thread_events): Declare.
521
56cf4bed
PA
5222015-11-30 Pedro Alves <palves@redhat.com>
523
524 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
525 the thread's last_resume_kind was resume_stop.
526
500c1d85
PA
5272015-11-30 Pedro Alves <palves@redhat.com>
528
529 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
530 before returning.
531
de979965
PA
5322015-11-30 Pedro Alves <palves@redhat.com>
533
534 * server.c (handle_v_requests): Handle vCtrlC.
535
34c65914
PA
5362015-11-30 Pedro Alves <palves@redhat.com>
537
538 * gdbthread.h (find_any_thread_of_pid): Declare.
539 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
540 functions.
541 * server.c (handle_query): If current_thread is NULL, look for
542 another thread of the selected process.
543
79efa585 5442015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 545 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
546
547 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
548 * server.c (handle_qxfer_threads_worker): Refactor to include thread
549 name in reply.
550 * target.h (struct target_ops) <thread_name>: New field.
551 (target_thread_name): New macro.
552
80d82c19
JB
5532015-11-23 Joel Brobecker <brobecker@adacore.com>
554
555 * regcache.h (regcache_invalidate_pid): Add declaration.
556 * regcache.c (regcache_invalidate_pid): New function, extracted
557 from regcache_invalidate.
558 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
559 Add trivial documentation comment.
560 * lynx-low.c: Use regcache_invalidate_pid instead of
561 regcache_invalidate.
562
64da5dd5
JB
5632015-11-23 Joel Brobecker <brobecker@adacore.com>
564
565 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
566 and Elf64_auxv_t if the target is Android.
567
37ce4055
DE
5682015-11-22 Doug Evans <xdje42@gmail.com>
569
570 * target.h: #include <sys/types.h>.
571
06e03fff
PA
5722015-11-19 Pedro Alves <palves@redhat.com>
573
574 * linux-low.c (linux_process_qsupported): Change prototype.
575 Adjust.
576 * linux-low.h (struct linux_target_ops) <process_qsupported>:
577 Change prototype.
578 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
579 and adjust to loop over all features.
580 * server.c (handle_query) <qSupported>: Adjust to call
581 target_process_qsupported once, passing it a vector of unprocessed
582 features.
583 * target.h (struct target_ops) <process_qsupported>: Change
584 prototype.
585 (target_process_qsupported): Adjust.
586
9a084706
PA
5872015-11-19 Pedro Alves <palves@redhat.com>
588
589 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
590 mode.
591 * configure: Regenerate.
592
dad44a1f
PA
5932015-11-19 Pedro Alves <palves@redhat.com>
594
595 * configure: Regenerate.
596
231c0592
YQ
5972015-11-19 Yao Qi <yao.qi@linaro.org>
598
599 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
600 type to uint32_t.
601
6c1c9a8b
YQ
6022015-11-19 Yao Qi <yao.qi@linaro.org>
603
604 * linux-aarch64-low.c (enum aarch64_operand_type): New.
605 (struct aarch64_operand): Move enum out.
606
9caa3311
YQ
6072015-11-19 Yao Qi <yao.qi@linaro.org>
608
609 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
610 struct user_fpsimd_state *.
611 (aarch64_store_fpregset): Likewise.
612
6a69a054
YQ
6132015-11-19 Yao Qi <yao.qi@linaro.org>
614
615 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
616 struct user_pt_regs *.
617 (aarch64_store_gregset): Likewise.
618
1798301e
PA
6192015-11-18 Pedro Alves <palves@redhat.com>
620
621 * Makefile.in (all_object_files): Add $IPA_OBJS.
622
ce7715e2
PA
6232015-11-17 Pedro Alves <palves@redhat.com>
624
625 * win32-low.c (win32_resume): Use gdb_signal_from_host,
626 GDB_SIGNAL_0 and gdb_signal_to_string.
627
c0879059
PA
6282015-11-17 Pedro Alves <palves@redhat.com>
629
630 * win32-low.c (handle_output_debug_string): Remove parameter.
631 (win32_kill): Remove our_status local and adjust call to
632 handle_output_debug_string.
633 (get_child_debug_event): Adjust call to
634 handle_output_debug_string.
635
1996e237
SM
6362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
637
638 * linux-mips-low.c (mips_fill_gregset): Add cast.
639 (mips_store_gregset): Likewise.
640 (mips_fill_fpregset): Likewise.
641 (mips_store_fpregset): Likewise.
642
cbec665b
SM
6432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
644
645 * linux-mips-low.c (mips_add_watchpoint): Rename private to
646 priv.
647
eb3e3c67
SM
6482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
649
650 * linux-mips-low.c (mips_linux_new_thread): Change type of
651 watch_type to enum target_hw_bp_type.
652
171de4b8
SM
6532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
654
655 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
656 Change return type to arm_hwbp_type.
657
04248ead
SM
6582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
659
660 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
661 (arm_store_gregset): Likewise.
662 * linux-arm-low.c (arm_get_hwcap): Likewise.
663 (arm_read_description): Likewise.
664
04b3479c
SM
6652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
666
667 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
668
2bc84e8a
SM
6692015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
670
671 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
672 (ppc_fill_vsxregset): Likewise.
673 (ppc_store_vsxregset): Likewise.
674 (ppc_fill_vrregset): Likewise.
675 (ppc_store_vrregset): Likewise.
676 (ppc_fill_evrregset): Likewise.
677 (ppc_store_evrregset): Likewise.
678
e6c5bb05
SM
6792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
680
681 * linux-ppc-low.c (ppc_usrregs_info): Remove
682 forward-declaration.
683 (ppc_arch_setup): Move lower in file.
684
7ea45d72
SM
6852015-10-30 Simon Marchi <simon.marchi@ericsson.com>
686
687 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
688 (ps_pdwrite): Likewise.
689
69291610
HW
6902015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
691
692 * linux-arm-low.c (arm_new_thread): Move pointer dereference
693 to after assert checks.
694
b42945fd
SM
6952015-10-29 Simon Marchi <simon.marchi@ericsson.com>
696
697 * proc-service.c (ps_pdread): Add/adjust casts.
698 (ps_pdwrite): Add/adjust casts.
699
d6f85c84
SM
7002015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
701
702 * server.c (handle_search_memory_1): Cast return value of
703 memmem.
704
f98cd059
SM
7052015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
706
707 * server.c (write_qxfer_response): Change type of data to
708 gdb_byte *.
709
d2412fa5
PA
7102015-10-29 Pedro Alves <palves@redhat.com>
711
712 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
713
c17414a2
PA
7142015-10-29 Pedro Alves <palves@redhat.com>
715
716 * tracepoint.c (clear_installed_tracepoints): Add casts.
717
e053fbc4
PA
7182015-10-29 Pedro Alves <palves@redhat.com>
719
720 * server.c (handle_v_cont, process_serial_event): Add enum
721 gdb_signal casts to signal parsing code.
722
add67df8
PA
7232015-10-29 Pedro Alves <palves@redhat.com>
724
725 * linux-low.h (NULL_REGSET): Define.
726 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
727 * linux-arm-low.c (arm_regsets): Likewise.
728 * linux-crisv32-low.c (cris_regsets): Likewise.
729 * linux-m68k-low.c (m68k_regsets): Likewise.
730 * linux-mips-low.c (mips_regsets): Likewise.
731 * linux-nios2-low.c (nios2_regsets): Likewise.
732 * linux-ppc-low.c (ppc_regsets): Likewise.
733 * linux-s390-low.c (s390_regsets): Likewise.
734 * linux-sh-low.c (sh_regsets): Likewise.
735 * linux-sparc-low.c (sparc_regsets): Likewise.
736 * linux-tic6x-low.c (tic6x_regsets): Likewise.
737 * linux-tile-low.c (tile_regsets): Likewise.
738 * linux-x86-low.c (x86_regsets): Likewise.
739 * linux-xtensa-low.c (xtensa_regsets): Likewise.
740
50bc912a
PA
7412015-10-29 Pedro Alves <palves@redhat.com>
742
743 * linux-low.h (NULL_REGSET): Define.
744 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
745 * linux-arm-low.c (arm_regsets): Likewise.
746 * linux-crisv32-low.c (cris_regsets): Likewise.
747 * linux-m68k-low.c (m68k_regsets): Likewise.
748 * linux-mips-low.c (mips_regsets): Likewise.
749 * linux-nios2-low.c (nios2_regsets): Likewise.
750 * linux-ppc-low.c (ppc_regsets): Likewise.
751 * linux-s390-low.c (s390_regsets): Likewise.
752 * linux-sh-low.c (sh_regsets): Likewise.
753 * linux-sparc-low.c (sparc_regsets): Likewise.
754 * linux-tic6x-low.c (tic6x_regsets): Likewise.
755 * linux-tile-low.c (tile_regsets): Likewise.
756 * linux-x86-low.c (x86_regsets): Likewise.
757 * linux-xtensa-low.c (xtensa_regsets): Likewise.
758
682b2546
DE
7592015-10-26 Doug Evans <dje@google.com>
760
761 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
762
963843d4
DE
7632015-10-26 Doug Evans <dje@google.com>
764
765 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
766
d41401ac
DE
7672015-10-26 Doug Evans <dje@google.com>
768
769 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
770 for debug_printf.
771 (attach_thread, find_new_threads_callback): Ditto.
772
3db28855
AT
7732015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
774
775 * mem-break.h (set_breakpoint_data): Remove.
776
fb78e89c
AT
7772015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
778
779 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
780 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
781 (initialize_low): Remove set_breakpoint_data call.
782 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
783 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
784 (initialize_low): Remove set_breakpoint_data call.
785 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
786 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
787 (initialize_low): Remove set_breakpoint_data call.
788
2e6ee069
AT
7892015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
790
791 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
792 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
793 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
794 * target.h (target_breakpoint_kind_from_pc): New macro.
795
1652a986
AT
7962015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
797
798 * linux-low.c (default_breakpoint_kind_from_pc): New function.
799 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
800 the default breakpoint kind.
801
abeead09
AT
8022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
803
804 * linux-arm-low.c (arm_supports_z_point_type): Add software
805 breakpoint support.
806
b0b4b501
AT
8072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
808
809 * linux-arm-low.c: Refactor breakpoint definitions.
810 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
811 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
812
8689682c
AT
8132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
814
815 * Makefile.in: Add arm.c/o.
816 * configure.srv: Likewise.
817 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
818 (arm_breakpoint_kind_from_pc): New function.
819 (arm_sw_breakpoint_from_kind): Return proper kind.
820 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
821
27165294
AT
8222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
823
824 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
825 removal.
826 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
827 (struct raw_breakpoint) <size>: Remove.
828 (struct raw_breakpoint) <kind>: Add.
829 (bp_size): New function.
830 (bp_opcode): Likewise.
831 (find_raw_breakpoint_at): Adjust for kind.
832 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
833 (remove_memory_breakpoint): Adjust for kind call bp_size.
834 (set_raw_breakpoint_at): Adjust for kind.
835 (set_breakpoint): Likewise.
836 (set_breakpoint_at): Call breakpoint_kind_from_pc.
837 (delete_raw_breakpoint): Adjust for kind.
838 (delete_breakpoint): Likewise.
839 (find_gdb_breakpoint): Likewise.
840 (set_gdb_breakpoint_1): Likewise.
841 (set_gdb_breakpoint): Likewise.
842 (delete_gdb_breakpoint_1): Likewise.
843 (delete_gdb_breakpoint): Likewise.
844 (uninsert_raw_breakpoint): Likewise.
845 (reinsert_raw_breakpoint): Likewise.
846 (set_breakpoint_data): Remove.
847 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
848 (check_mem_read): Adjust for kind call bp_size.
849 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
850 (clone_one_breakpoint): Adjust for kind.
851 * mem-break.h (set_gdb_breakpoint): Likewise.
852 (delete_gdb_breakpoint): Likewise.
853 * server.c (process_serial_event): Likewise.
854
dd373349
AT
8552015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
856
857 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
858 (struct linux_target_ops) <breakpoint>: Remove.
859 (struct linux_target_ops) <breakpoint_len>: Remove.
860 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
861 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
862 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
863 (arm_sw_breakpoint_from_kind): New function.
864 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
865 (struct linux_target_ops) <breakpoint>: Remove.
866 (struct linux_target_ops) <breakpoint_len>: Remove.
867 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
868 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
869 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
870 (struct linux_target_ops) <breakpoint>: Remove.
871 (struct linux_target_ops) <breakpoint_len>: Remove.
872 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
873 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
874 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
875 (struct linux_target_ops) <breakpoint>: Remove.
876 (struct linux_target_ops) <breakpoint_len>: Remove.
877 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
878 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
879 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
880 and sw_breakpoint_from_kind to increment the pc.
881 (linux_breakpoint_kind_from_pc): New function.
882 (linux_sw_breakpoint_from_kind): New function.
883 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
884 (initialize_low): Call breakpoint_kind_from_pc and
885 sw_breakpoint_from_kind to replace breakpoint_data/len.
886 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
887 New field.
888 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
889 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
890 (struct linux_target_ops) <breakpoint>: Remove.
891 (struct linux_target_ops) <breakpoint_len>: Remove.
892 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
893 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
894 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
895 (struct linux_target_ops) <breakpoint>: Remove.
896 (struct linux_target_ops) <breakpoint_len>: Remove.
897 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
898 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
899 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
900 (struct linux_target_ops) <breakpoint>: Remove.
901 (struct linux_target_ops) <breakpoint_len>: Remove.
902 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
903 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
904 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
905 (struct linux_target_ops) <breakpoint>: Remove.
906 (struct linux_target_ops) <breakpoint_len>: Remove.
907 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
908 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
909 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
910 (struct linux_target_ops) <breakpoint>: Remove.
911 (struct linux_target_ops) <breakpoint_len>: Remove.
912 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
913 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
914 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
915 (struct linux_target_ops) <breakpoint>: Remove.
916 (struct linux_target_ops) <breakpoint_len>: Remove.
917 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
918 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
919 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
920 (struct linux_target_ops) <breakpoint>: Remove.
921 (struct linux_target_ops) <breakpoint_len>: Remove.
922 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
923 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
924 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
925 (struct linux_target_ops) <breakpoint>: Remove.
926 (struct linux_target_ops) <breakpoint_len>: Remove.
927 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
928 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
929 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
930 (struct linux_target_ops) <breakpoint>: Remove.
931 (struct linux_target_ops) <breakpoint_len>: Remove.
932 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
933 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
934 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
935 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
936 (struct linux_target_ops) <breakpoint>: Remove.
937 (struct linux_target_ops) <breakpoint_len>: Remove.
938 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
939 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
940 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
941 (struct linux_target_ops) <breakpoint>: Remove.
942 (struct linux_target_ops) <breakpoint_len>: Remove.
943 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
944 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
945
4cd98a19
AT
9462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
947
948 * linux-cris-low.c (cris_get_pc): Remove void arg.
949
774ee6d2
AR
9502015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
951
952 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
953 variable name.
954
833dcd29
AR
9552015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
956
957 * inferiors.c (thread_pid_matches_callback): New function.
958 (find_thread_process): New function.
959 (remove_thread): Reset current_thread.
960 (remove_process): Assert threads have been removed first.
961
8d689ee5
YQ
9622015-10-15 Yao Qi <yao.qi@linaro.org>
963
964 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
965 if it is 3.
966 (aarch64_remove_point): Likewise.
967 * regcache.c (regcache_register_size): New function.
968
1c2e1515
YQ
9692015-10-12 Yao Qi <yao.qi@linaro.org>
970
971 * linux-aarch64-low.c: Update all callers as emit_load_store
972 is renamed to aarch64_emit_load_store.
973
e1c587c3
YQ
9742015-10-12 Yao Qi <yao.qi@linaro.org>
975
976 * linux-aarch64-low.c: Update all callers of function renaming
977 from emit_insn to aarch64_emit_insn.
978
b6542f81
YQ
9792015-10-12 Yao Qi <yao.qi@linaro.org>
980
981 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
982 arch/aarch64-insn.h.
983 (struct aarch64_memory_operand): Likewise.
984 (ENCODE): Likewise.
985 (emit_insn): Move to arch/aarch64-insn.c.
986 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
987 (emit_load_store): Move to arch/aarch64-insn.c.
988 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
989 (can_encode_int32): Remove.
990
246994ce
YQ
9912015-10-12 Yao Qi <yao.qi@linaro.org>
992
993 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
994 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
995 (aarch64_relocate_instruction): Likewise.
996 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
997 (struct aarch64_insn_visitor): Likewise.
998
0badd99f
YQ
9992015-10-12 Yao Qi <yao.qi@linaro.org>
1000
1001 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1002 (struct aarch64_insn_visitor): New.
1003 (struct aarch64_insn_relocation_data): New.
1004 (aarch64_ftrace_insn_reloc_b): New function.
1005 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1006 (aarch64_ftrace_insn_reloc_cb): Likewise.
1007 (aarch64_ftrace_insn_reloc_tb): Likewise.
1008 (aarch64_ftrace_insn_reloc_adr): Likewise.
1009 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1010 (aarch64_ftrace_insn_reloc_others): Likewise.
1011 (visitor): New.
1012 (aarch64_relocate_instruction): Use visitor.
1013
dfaffe9d
YQ
10142015-10-12 Yao Qi <yao.qi@linaro.org>
1015
1016 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1017 int. Add argument buf.
1018 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1019 aarch64_relocate_instruction.
1020
70b439f0
YQ
10212015-10-12 Yao Qi <yao.qi@linaro.org>
1022
1023 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1024 argument insn. Remove local variable insn. Don't call
1025 target_read_uint32.
1026 (aarch64_install_fast_tracepoint_jump_pad): Call
1027 target_read_uint32.
1028
7781c06f
YQ
10292015-09-30 Yao Qi <yao.qi@linaro.org>
1030
1031 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1032 (emit_load_store_pair): Likewise.
1033
9a3c8263
SM
10342015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1035
1036 * dll.c (match_dll): Add cast(s).
1037 (unloaded_dll): Likewise.
1038 * linux-low.c (second_thread_of_pid_p): Likewise.
1039 (delete_lwp_callback): Likewise.
1040 (count_events_callback): Likewise.
1041 (select_event_lwp_callback): Likewise.
1042 (linux_set_resume_request): Likewise.
1043 * server.c (accumulate_file_name_length): Likewise.
1044 (emit_dll_description): Likewise.
1045 (handle_qxfer_threads_worker): Likewise.
1046 (visit_actioned_threads): Likewise.
1047 * thread-db.c (any_thread_of): Likewise.
1048 * tracepoint.c (same_process_p): Likewise.
1049 (match_blocktype): Likewise.
1050 (build_traceframe_info_xml): Likewise.
1051
224c3ddb
SM
10522015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1053
1054 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1055 assignment.
1056 (gdb_unparse_agent_expr): Likewise.
1057 * hostio.c (require_data): Likewise.
1058 (handle_pread): Likewise.
1059 * linux-low.c (disable_regset): Likewise.
1060 (fetch_register): Likewise.
1061 (store_register): Likewise.
1062 (get_dynamic): Likewise.
1063 (linux_qxfer_libraries_svr4): Likewise.
1064 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1065 (set_fast_tracepoint_jump): Likewise.
1066 (uninsert_fast_tracepoint_jumps_at): Likewise.
1067 (reinsert_fast_tracepoint_jumps_at): Likewise.
1068 (validate_inserted_breakpoint): Likewise.
1069 (clone_agent_expr): Likewise.
1070 * regcache.c (init_register_cache): Likewise.
1071 * remote-utils.c (putpkt_binary_1): Likewise.
1072 (decode_M_packet): Likewise.
1073 (decode_X_packet): Likewise.
1074 (look_up_one_symbol): Likewise.
1075 (relocate_instruction): Likewise.
1076 (monitor_output): Likewise.
1077 * server.c (handle_search_memory): Likewise.
1078 (handle_qxfer_exec_file): Likewise.
1079 (handle_qxfer_libraries): Likewise.
1080 (handle_qxfer): Likewise.
1081 (handle_query): Likewise.
1082 (handle_v_cont): Likewise.
1083 (handle_v_run): Likewise.
1084 (captured_main): Likewise.
1085 * target.c (write_inferior_memory): Likewise.
1086 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1087 * tracepoint.c (init_trace_buffer): Likewise.
1088 (add_tracepoint_action): Likewise.
1089 (add_traceframe): Likewise.
1090 (add_traceframe_block): Likewise.
1091 (cmd_qtdpsrc): Likewise.
1092 (cmd_qtdv): Likewise.
1093 (cmd_qtstatus): Likewise.
1094 (response_source): Likewise.
1095 (response_tsv): Likewise.
1096 (cmd_qtnotes): Likewise.
1097 (gdb_collect): Likewise.
1098 (initialize_tracepoint): Likewise.
1099
afbe19f8
PL
11002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1101
1102 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1103 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1104 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1105 <NOP>: New.
1106 (enum aarch64_condition_codes): New enum.
1107 (w0): New static global.
1108 (fp): Likewise.
1109 (lr): Likewise.
1110 (struct aarch64_memory_operand) <type>: New
1111 MEMORY_OPERAND_POSTINDEX type.
1112 (postindex_memory_operand): New helper function.
1113 (emit_ret): New function.
1114 (emit_load_store_pair): New function, factored out of emit_stp
1115 with support for MEMORY_OPERAND_POSTINDEX.
1116 (emit_stp): Rewrite using emit_load_store_pair.
1117 (emit_ldp): New function.
1118 (emit_load_store): Likewise.
1119 (emit_ldr): Mention post-index instruction in comment.
1120 (emit_ldrh): New function.
1121 (emit_ldrb): New function.
1122 (emit_ldrsw): Mention post-index instruction in comment.
1123 (emit_str): Likewise.
1124 (emit_subs): New function.
1125 (emit_cmp): Likewise.
1126 (emit_and): Likewise.
1127 (emit_orr): Likewise.
1128 (emit_orn): Likewise.
1129 (emit_eor): Likewise.
1130 (emit_mvn): Likewise.
1131 (emit_lslv): Likewise.
1132 (emit_lsrv): Likewise.
1133 (emit_asrv): Likewise.
1134 (emit_mul): Likewise.
1135 (emit_sbfm): Likewise.
1136 (emit_sbfx): Likewise.
1137 (emit_ubfm): Likewise.
1138 (emit_ubfx): Likewise.
1139 (emit_csinc): Likewise.
1140 (emit_cset): Likewise.
1141 (emit_nop): Likewise.
1142 (emit_ops_insns): New helper function.
1143 (emit_pop): Likewise.
1144 (emit_push): Likewise.
1145 (aarch64_emit_prologue): New function.
1146 (aarch64_emit_epilogue): Likewise.
1147 (aarch64_emit_add): Likewise.
1148 (aarch64_emit_sub): Likewise.
1149 (aarch64_emit_mul): Likewise.
1150 (aarch64_emit_lsh): Likewise.
1151 (aarch64_emit_rsh_signed): Likewise.
1152 (aarch64_emit_rsh_unsigned): Likewise.
1153 (aarch64_emit_ext): Likewise.
1154 (aarch64_emit_log_not): Likewise.
1155 (aarch64_emit_bit_and): Likewise.
1156 (aarch64_emit_bit_or): Likewise.
1157 (aarch64_emit_bit_xor): Likewise.
1158 (aarch64_emit_bit_not): Likewise.
1159 (aarch64_emit_equal): Likewise.
1160 (aarch64_emit_less_signed): Likewise.
1161 (aarch64_emit_less_unsigned): Likewise.
1162 (aarch64_emit_ref): Likewise.
1163 (aarch64_emit_if_goto): Likewise.
1164 (aarch64_emit_goto): Likewise.
1165 (aarch64_write_goto_address): Likewise.
1166 (aarch64_emit_const): Likewise.
1167 (aarch64_emit_call): Likewise.
1168 (aarch64_emit_reg): Likewise.
1169 (aarch64_emit_pop): Likewise.
1170 (aarch64_emit_stack_flush): Likewise.
1171 (aarch64_emit_zero_ext): Likewise.
1172 (aarch64_emit_swap): Likewise.
1173 (aarch64_emit_stack_adjust): Likewise.
1174 (aarch64_emit_int_call_1): Likewise.
1175 (aarch64_emit_void_call_2): Likewise.
1176 (aarch64_emit_eq_goto): Likewise.
1177 (aarch64_emit_ne_goto): Likewise.
1178 (aarch64_emit_lt_goto): Likewise.
1179 (aarch64_emit_le_goto): Likewise.
1180 (aarch64_emit_gt_goto): Likewise.
1181 (aarch64_emit_ge_got): Likewise.
1182 (aarch64_emit_ops_impl): New static global variable.
1183 (aarch64_emit_ops): New target function, return
1184 &aarch64_emit_ops_impl.
1185 (struct linux_target_ops): Install it.
1186
bb903df0
PL
11872015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1188
1189 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1190 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1191 aarch64-ipa.o.
1192 * linux-aarch64-ipa.c: New file.
1193 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1194 and endian.h.
1195 (aarch64_get_thread_area): New target method.
1196 (extract_signed_bitfield): New helper function.
1197 (aarch64_decode_ldr_literal): New function.
1198 (enum aarch64_opcodes): New enum.
1199 (struct aarch64_register): New struct.
1200 (struct aarch64_operand): New struct.
1201 (x0): New static global.
1202 (x1): Likewise.
1203 (x2): Likewise.
1204 (x3): Likewise.
1205 (x4): Likewise.
1206 (w2): Likewise.
1207 (ip0): Likewise.
1208 (sp): Likewise.
1209 (xzr): Likewise.
1210 (aarch64_register): New helper function.
1211 (register_operand): Likewise.
1212 (immediate_operand): Likewise.
1213 (struct aarch64_memory_operand): New struct.
1214 (offset_memory_operand): New helper function.
1215 (preindex_memory_operand): Likewise.
1216 (enum aarch64_system_control_registers): New enum.
1217 (ENCODE): New macro.
1218 (emit_insn): New helper function.
1219 (emit_b): New function.
1220 (emit_bcond): Likewise.
1221 (emit_cb): Likewise.
1222 (emit_tb): Likewise.
1223 (emit_blr): Likewise.
1224 (emit_stp): Likewise.
1225 (emit_ldp_q_offset): Likewise.
1226 (emit_stp_q_offset): Likewise.
1227 (emit_load_store): Likewise.
1228 (emit_ldr): Likewise.
1229 (emit_ldrsw): Likewise.
1230 (emit_str): Likewise.
1231 (emit_ldaxr): Likewise.
1232 (emit_stxr): Likewise.
1233 (emit_stlr): Likewise.
1234 (emit_data_processing_reg): Likewise.
1235 (emit_data_processing): Likewise.
1236 (emit_add): Likewise.
1237 (emit_sub): Likewise.
1238 (emit_mov): Likewise.
1239 (emit_movk): Likewise.
1240 (emit_mov_addr): Likewise.
1241 (emit_mrs): Likewise.
1242 (emit_msr): Likewise.
1243 (emit_sevl): Likewise.
1244 (emit_wfe): Likewise.
1245 (append_insns): Likewise.
1246 (can_encode_int32_in): New helper function.
1247 (aarch64_relocate_instruction): New function.
1248 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1249 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1250 (struct linux_target_ops): Install aarch64_get_thread_area,
1251 aarch64_install_fast_tracepoint_jump_pad and
1252 aarch64_get_min_fast_tracepoint_insn_len.
1253
787749ea
PL
12542015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1255
1256 * Makefile.in (aarch64-insn.o): New rule.
1257 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1258
9812b2e6
YQ
12592015-09-21 Yao Qi <yao.qi@linaro.org>
1260
1261 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1262
18fe412b
YQ
12632015-09-21 Yao Qi <yao.qi@linaro.org>
1264
1265 * tracepoint.c (max_jump_pad_size): Remove.
1266
a0cc84cd
YQ
12672015-09-18 Yao Qi <yao.qi@linaro.org>
1268
1269 * linux-aarch64-low.c: Don't include sys/uio.h.
1270 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1271
d78908cf
WW
12722015-09-16 Wei-cheng Wang <cole945@gmail.com>
1273
1274 * tracepoint.c (eval_result_type): Change prototype.
1275 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1276
d57e0d50
PA
12772015-09-15 Pedro Alves <palves@redhat.com>
1278
1279 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1280 Check whether to report exec events instead of checking whether
1281 multiprocess is enabled.
1282
5a676acc
PA
12832015-09-15 Pedro Alves <palves@redhat.com>
1284
1285 PR remote/18965
1286 * remote-utils.c (prepare_resume_reply): Merge
1287 TARGET_WAITKIND_VFORK_DONE switch case with the
1288 TARGET_WAITKIND_FORKED case.
1289
7c5d0fad
YQ
12902015-09-15 Yao Qi <yao.qi@linaro.org>
1291
1292 * server.c (handle_query): Check string comparison using
1293 "else if" instead of "if".
1294
750ce8d1
YQ
12952015-09-15 Yao Qi <yao.qi@linaro.org>
1296
1297 * server.c (vCont_supported): New global variable.
1298 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1299 matches. Append ";vContSupported+" to own_buf.
1300 (handle_v_requests): Append ";s;S" to own_buf if target supports
1301 hardware single step or vCont_supported is false.
1302 (capture_main): Set vCont_supported to zero.
1303
70b90b91
YQ
13042015-09-15 Yao Qi <yao.qi@linaro.org>
1305
1306 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1307 it to ...
1308 (linux_supports_hardware_single_step): ... New function.
1309 (linux_target_ops): Update.
1310 * lynx-low.c (lynx_target_ops): Set field
1311 supports_hardware_single_step to target_can_do_hardware_single_step.
1312 * nto-low.c (nto_target_ops): Likewise.
1313 * spu-low.c (spu_target_ops): Likewise.
1314 * win32-low.c (win32_target_ops): Likewise.
1315 * target.c (target_can_do_hardware_single_step): New function.
1316 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1317 Remove. <supports_hardware_single_step>: New field.
1318 (target_supports_conditional_breakpoints): Remove.
1319 (target_supports_hardware_single_step): New macro.
1320 (target_can_do_hardware_single_step): Declare.
1321 * server.c (handle_query): Use target_supports_hardware_single_step
1322 instead of target_supports_conditional_breakpoints.
1323
ade90bde
YQ
13242015-09-15 Yao Qi <yao.qi@linaro.org>
1325
1326 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1327 function.
1328 (struct linux_target_ops the_low_target): Install
1329 aarch64_linux_siginfo_fixup.
1330
94585166
DB
13312015-09-11 Don Breazeal <donb@codesourcery.com>
1332 Luis Machado <lgustavo@codesourcery.com>
1333
1334 * linux-low.c (linux_mourn): Static declaration.
1335 (linux_arch_setup): Move in front of
1336 handle_extended_wait.
1337 (linux_arch_setup_thread): New function.
1338 (handle_extended_wait): Handle exec events. Call
1339 linux_arch_setup_thread. Make event_lwp argument a
1340 pointer-to-a-pointer.
1341 (check_zombie_leaders): Do not check stopped threads.
1342 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1343 (linux_low_filter_event): Add lwp and thread for exec'ing
1344 non-leader thread if leader thread has been deleted.
1345 Refactor code into linux_arch_setup_thread and call it.
1346 Pass child lwp pointer by reference to handle_extended_wait.
1347 (linux_wait_for_event_filtered): Update comment.
1348 (linux_wait_1): Prevent clobbering exec event status.
1349 (linux_supports_exec_events): New function.
1350 (linux_target_ops) <supports_exec_events>: Initialize new member.
1351 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1352 new member.
1353 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1354 * server.c (report_exec_events): New global variable.
1355 (handle_query): Handle qSupported query for exec-events feature.
1356 (captured_main): Initialize report_exec_events.
1357 * server.h (report_exec_events): Declare new global variable.
1358 * target.h (struct target_ops) <supports_exec_events>: New
1359 member.
1360 (target_supports_exec_events): New macro.
1361 * win32-low.c (win32_target_ops) <supports_exec_events>:
1362 Initialize new member.
1363
0568462b
MM
13642015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1365
1366 * linux-low.c (linux_low_enable_btrace): Remove.
1367 (linux_target_ops): Replace linux_low_enable_btrace with
1368 linux_enable_btrace.
1369
39edd165
YQ
13702015-09-03 Yao Qi <yao.qi@linaro.org>
1371
1372 * linux-aarch64-low.c (aarch64_insert_point): Call
1373 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1374 returns true.
1375
1db33b5a
UW
13762015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1377
1378 * linux-low.c (check_stopped_by_breakpoint): Use
1379 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1380
ab290430
PA
13812015-08-27 Pedro Alves <palves@redhat.com>
1382
1383 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1384
8d749320
SM
13852015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1386
6711b7f8
SM
1387 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1388 the XNEW-family equivalent.
8d749320
SM
1389 (compile_bytecodes): Likewise.
1390 * dll.c (loaded_dll): Likewise.
1391 * event-loop.c (append_callback_event): Likewise.
1392 (create_file_handler): Likewise.
1393 (create_file_event): Likewise.
1394 * hostio.c (handle_open): Likewise.
1395 * inferiors.c (add_thread): Likewise.
1396 (add_process): Likewise.
1397 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1398 * linux-arm-low.c (arm_new_process): Likewise.
1399 (arm_new_thread): Likewise.
1400 * linux-low.c (add_to_pid_list): Likewise.
1401 (linux_add_process): Likewise.
1402 (handle_extended_wait): Likewise.
1403 (add_lwp): Likewise.
1404 (enqueue_one_deferred_signal): Likewise.
1405 (enqueue_pending_signal): Likewise.
1406 (linux_resume_one_lwp_throw): Likewise.
1407 (linux_resume_one_thread): Likewise.
1408 (linux_read_memory): Likewise.
1409 (linux_write_memory): Likewise.
1410 * linux-mips-low.c (mips_linux_new_process): Likewise.
1411 (mips_linux_new_thread): Likewise.
1412 (mips_add_watchpoint): Likewise.
1413 * linux-x86-low.c (initialize_low_arch): Likewise.
1414 * lynx-low.c (lynx_add_process): Likewise.
1415 * mem-break.c (set_raw_breakpoint_at): Likewise.
1416 (set_breakpoint): Likewise.
1417 (add_condition_to_breakpoint): Likewise.
1418 (add_commands_to_breakpoint): Likewise.
1419 (clone_agent_expr): Likewise.
1420 (clone_one_breakpoint): Likewise.
1421 * regcache.c (new_register_cache): Likewise.
1422 * remote-utils.c (look_up_one_symbol): Likewise.
1423 * server.c (queue_stop_reply): Likewise.
1424 (start_inferior): Likewise.
1425 (queue_stop_reply_callback): Likewise.
1426 (handle_target_event): Likewise.
1427 * spu-low.c (fetch_ppc_memory): Likewise.
1428 (store_ppc_memory): Likewise.
1429 * target.c (set_target_ops): Likewise.
1430 * thread-db.c (thread_db_load_search): Likewise.
1431 (try_thread_db_load_1): Likewise.
1432 * tracepoint.c (add_tracepoint): Likewise.
1433 (add_tracepoint_action): Likewise.
1434 (create_trace_state_variable): Likewise.
1435 (cmd_qtdpsrc): Likewise.
1436 (cmd_qtro): Likewise.
1437 (add_while_stepping_state): Likewise.
1438 * win32-low.c (child_add_thread): Likewise.
1439 (get_image_name): Likewise.
1440
ed8b7b42
YQ
14412015-08-25 Yao Qi <yao.qi@linaro.org>
1442
1443 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1444
db3cb7cb
YQ
14452015-08-25 Yao Qi <yao.qi@linaro.org>
1446
1447 * Makefile.in (aarch64-linux.o): New rule.
1448 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1449 srv_tgtobj.
1450 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1451 (aarch64_init_debug_reg_state): Make it extern.
1452 (aarch64_linux_prepare_to_resume): Remove.
1453
f6011a1c
YQ
14542015-08-25 Yao Qi <yao.qi@linaro.org>
1455
1456 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1457 lwp_arch_private_info and ptid_of_lwp.
1458
88e2cf7e
YQ
14592015-08-25 Yao Qi <yao.qi@linaro.org>
1460
1461 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1462 Find proc_info by find_process_pid. All callers updated.
1463
5e35436e
YQ
14642015-08-25 Yao Qi <yao.qi@linaro.org>
1465
1466 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1467 Remove.
1468 (debug_reg_change_callback): Remove.
1469 (aarch64_notify_debug_reg_change): Remove.
1470
4a8a7965
YQ
14712015-08-25 Yao Qi <yao.qi@linaro.org>
1472
1473 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1474 Call current_lwp_ptid.
1475
32a271ee
YQ
14762015-08-25 Yao Qi <yao.qi@linaro.org>
1477
1478 * linux-aarch64-low.c (debug_reg_change_callback): Use
1479 debug_printf.
1480
0d51c8d7
YQ
14812015-08-25 Yao Qi <yao.qi@linaro.org>
1482
1483 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1484
31a43dd5
YQ
14852015-08-25 Yao Qi <yao.qi@linaro.org>
1486
1487 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1488
8ee52567
YQ
14892015-08-25 Yao Qi <yao.qi@linaro.org>
1490
1491 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1492 the code.
1493
ff3f0f45
YQ
14942015-08-25 Yao Qi <yao.qi@linaro.org>
1495
1496 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1497 Remove.
1498 (debug_reg_change_callback): Remove argument entry and add argument
1499 lwp. Remove local variable thread. Don't print thread id in the
1500 debugging output. Don't check whether pid of thread equals to pid.
1501 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1502 iterate_over_lwps instead find_inferior.
1503
3d40fbb5
PA
15042015-08-24 Pedro Alves <palves@redhat.com>
1505
1506 * inferiors.c (get_first_process): New function.
1507 * inferiors.h (get_first_process): New declaration.
1508 * remote-utils.c (read_ptid): Default to the first process in the
1509 list, instead of to the current thread's process.
1510
438e1e42
PA
15112015-08-24 Pedro Alves <palves@redhat.com>
1512
1513 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1514 * event-loop.c: Likewise.
1515 * remote-utils.c: Likewise.
1516 * tracepoint.c: Likewise.
1517
a8c6d4fc
PA
15182015-08-24 Pedro Alves <palves@redhat.com>
1519
1520 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1521 ptid_get_lwp.
1522
99b0bb12
PA
15232015-08-21 Pedro Alves <palves@redhat.com>
1524
1525 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1526 instead of literal 1.
1527
f8904751
PA
15282015-08-21 Pedro Alves <palves@redhat.com>
1529
1530 * tdesc.c (default_description): Explicitly zero-initialize.
1531
465a859e
PA
15322015-08-21 Pedro Alves <palves@redhat.com>
1533
1534 PR gdb/18749
1535 * inferiors.c (remove_thread): Discard any pending stop reply for
1536 this thread.
1537 * server.c (remove_all_on_match_pid): Rename to ...
1538 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1539 instead of a pid.
1540 (discard_queued_stop_replies): Change parameter to a ptid. Now
1541 extern.
1542 (handle_v_kill, kill_inferior_callback, captured_main)
1543 (process_serial_event): Adjust.
1544 * server.h (discard_queued_stop_replies): Declare.
1545
f0db101d
PA
15462015-08-21 Pedro Alves <palves@redhat.com>
1547
1548 * linux-low.c (wait_for_sigstop): Always switch to no thread
1549 selected if the previously current thread dies.
1550 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1551 process instead of the current thread's.
1552 * remote-utils.c (input_interrupt): Don't check if there's no
1553 current thread.
1554 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1555 current thread to the general thread fails, error out.
1556 (handle_qxfer_auxv, handle_qxfer_libraries)
1557 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1558 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1559 (handle_query): Check if there's a thread selected instead of
1560 checking whether there's any thread in the thread list.
1561 (handle_qxfer_threads, handle_qxfer_btrace)
1562 (handle_qxfer_btrace_conf): Don't error out early if there's no
1563 thread in the thread list.
1564 (handle_v_cont, myresume): Don't set the current thread to the
1565 continue thread.
1566 (process_serial_event) <Hg handling>: Also set thread_id if the
1567 previous general thread is still alive.
1568 (process_serial_event) <g/G handling>: If setting the current
1569 thread to the general thread fails, error out.
1570 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1571 thread's lwp instead of the current thread's.
1572 * target.c (set_desired_thread): If the desired thread was not
1573 found, leave the current thread pointing to NULL. Return an int
1574 (boolean) indicating success.
1575 * target.h (set_desired_thread): Change return type to int.
1576
40045d91
MF
15772015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1578
1579 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1580 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1581 #includes.
1582 (ps_get_thread_area): New function.
1583
45face3b
GB
15842015-08-19 Gary Benson <gbenson@redhat.com>
1585
1586 * hostio.c (handle_pread): Do not attempt to read more data
1587 than hostio_reply_with_data can fit in a packet.
1588
16d5f642
JB
15892015-08-18 Joel Brobecker <brobecker@adacore.com>
1590
1591 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1592
a738da3a
MF
15932015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1594
1595 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1596
33ebda9d
PA
15972015-08-06 Pedro Alves <palves@redhat.com>
1598
1599 * tracepoint.c (expr_eval_result): Now an int.
1600
a44892be
PA
16012015-08-06 Pedro Alves <palves@redhat.com>
1602
1603 * gdbthread.h (struct regcache): Forward declare.
1604 (struct thread_info) <regcache_data>: Now a struct regcache
1605 pointer.
1606 * inferiors.c (inferior_regcache_data)
1607 (set_inferior_regcache_data): Now work with struct regcache
1608 pointers.
1609 * inferiors.h (struct regcache): Forward declare.
1610 (inferior_regcache_data, set_inferior_regcache_data): Now work
1611 with struct regcache pointers.
1612 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1613 (free_register_cache_thread): Remove struct regcache pointer
1614 casts.
1615
608a1e46
PA
16162015-08-06 Pedro Alves <palves@redhat.com>
1617
1618 * server.c (captured_main): On error, print the exception message
1619 to stderr, and if run_once is set, throw a quit.
1620
f0ce0d3a
PA
16212015-08-06 Pedro Alves <palves@redhat.com>
1622
1623 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1624 the current thread.
1625
bf47e248
PA
16262015-08-06 Pedro Alves <palves@redhat.com>
1627
1628 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1629 reading beyond the passed in buffer length.
1630
b6b9ffcc
PL
16312015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1632
1633 * tracepoint.c (symbol_list) <required>: Remove.
1634
863d01bd
PA
16352015-08-06 Pedro Alves <palves@redhat.com>
1636
1637 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1638 count if stopping and suspending threads.
1639 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1640 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1641 (linux_detach): Complete an ongoing step-over.
1642 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1643 throughout.
1644 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1645 (linux_wait_1): If passing a signal to the inferior after
1646 finishing a step-over, unsuspend and re-resume all lwps. If we
1647 see a single-step event but the thread should be continuing, don't
1648 pass the trap to gdb.
1649 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1650 internal_error instead of gdb_assert.
1651 (enqueue_pending_signal): New function.
1652 (check_ptrace_stopped_lwp_gone): Add debug output.
1653 (start_step_over): Use internal_error instead of gdb_assert.
1654 (complete_ongoing_step_over): New function.
1655 (linux_resume_one_thread): Don't resume a suspended thread.
1656 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1657 it stepping.
1658
00db26fa
PA
16592015-08-06 Pedro Alves <palves@redhat.com>
1660
1661 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1662 (linux_thread_alive): Use lwp_is_marked_dead.
1663 (extended_event_reported): Delete.
1664 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1665 instead of extended_event_reported.
1666 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1667 as well.
1668 (lwp_is_marked_dead): New function.
1669 (lwp_running): Use lwp_is_marked_dead.
1670 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1671 comment.
1672
ad071a30
PA
16732015-08-06 Pedro Alves <palves@redhat.com>
1674
1675 * linux-low.c (linux_wait_1): Move fork event output out of the
1676 !report_to_gdb check. Pass event_child->waitstatus to
1677 target_waitstatus_to_string instead of ourstatus.
1678
524b57e6
YQ
16792015-08-04 Yao Qi <yao.qi@linaro.org>
1680
1681 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1682 if current_thread is 32 bit.
1683
6085d6f6
YQ
16842015-08-04 Yao Qi <yao.qi@linaro.org>
1685
1686 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1687 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1688 * server.c (extended_protocol): Remove "static".
1689 * server.h (extended_protocol): Declare it.
1690
8a7e4587
YQ
16912015-08-04 Yao Qi <yao.qi@linaro.org>
1692
1693 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1694 both aarch64 and aarch32.
1695 (aarch64_set_pc): Likewise.
1696
3b53ae99
YQ
16972015-08-04 Yao Qi <yao.qi@linaro.org>
1698
1699 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1700 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1701 arm-with-neon.xml to srv_xmlfiles.
1702 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1703 (is_64bit_tdesc): New function.
1704 (aarch64_linux_read_description): New function.
1705 (aarch64_arch_setup): Call aarch64_linux_read_description.
1706 (regs_info): Rename to regs_info_aarch64.
1707 (aarch64_regs_info): Return right regs_info.
1708 (initialize_low_arch): Call initialize_low_arch_aarch32.
1709
bd9e6534
YQ
17102015-08-04 Yao Qi <yao.qi@linaro.org>
1711
1712 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1713 * linux-aarch32-low.c: New file.
1714 * linux-aarch32-low.h: New file.
1715 * linux-arm-low.c (arm_fill_gregset): Move it to
1716 linux-aarch32-low.c.
1717 (arm_store_gregset): Likewise.
1718 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1719 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1720 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1721 (regs_info): Rename to regs_info_arm.
1722 (arm_regs_info): Return regs_info_aarch32 if
1723 have_ptrace_getregset is 1 and target description is
1724 arm_with_neon or arm_with_vfpv3.
1725 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1726 Call initialize_low_arch_aarch32 instead.
1727
ded48a5e
YQ
17282015-08-04 Yao Qi <yao.qi@linaro.org>
1729
1730 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1731 * linux-low.c: ... here.
1732 * linux-low.h (have_ptrace_getregset): Declare it.
1733
96e9210f
PA
17342015-08-04 Pedro Alves <palves@redhat.com>
1735
1736 * thread-db.c (struct thread_db): Use new typedefs.
1737 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1738 CHK calls.
1739 (disable_thread_event_reporting): Cast result of dlsym to
1740 destination function pointer type.
1741 (thread_db_mourn): Use td_ta_delete_ftype.
1742
af60a1ef
SL
17432015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1744
1745 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1746 arch variant.
1747 (CDX_BREAKPOINT): Define for R2.
1748 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1749 (the_low_target): Add comments.
1750
e8b41681
YQ
17512015-07-30 Yao Qi <yao.qi@linaro.org>
1752
1753 * linux-arm-low.c (arm_hwcap): Remove it.
1754 (arm_read_description): New local variable arm_hwcap. Don't
1755 set arm_hwcap to zero.
1756
89abb039
YQ
17572015-07-30 Yao Qi <yao.qi@linaro.org>
1758
1759 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1760 Use regcache->tdesc instead.
1761 (arm_store_wmmxregset): Likewise.
1762 (arm_fill_vfpregset): Likewise.
1763 (arm_store_vfpregset): Likewise.
1764
deca266c
YQ
17652015-07-30 Yao Qi <yao.qi@linaro.org>
1766
1767 * linux-arm-low.c: Include arch/arm.h.
1768 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1769 (arm_store_gregset): Likewise.
1770
aa58a496
SM
17712015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1772
1773 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1774 ptrace's 4th parameter.
1775
50904b25
YQ
17762015-07-27 Yao Qi <yao.qi@linaro.org>
1777
1778 * configure.srv (case aarch64*-*-linux*): Don't set
1779 srv_linux_usrregs.
1780
5826e159
PA
17812015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1782
1783 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1784 sys/ptrace.h.
1785 * linux-arm-low.c: Likewise.
1786 * linux-cris-low.c: Likewise.
1787 * linux-crisv32-low.c: Likewise.
1788 * linux-low.c: Likewise.
1789 * linux-m68k-low.c: Likewise.
1790 * linux-mips-low.c: Likewise.
1791 * linux-nios2-low.c: Likewise.
1792 * linux-s390-low.c: Likewise.
1793 * linux-sparc-low.c: Likewise.
1794 * linux-tic6x-low.c: Likewise.
1795 * linux-tile-low.c: Likewise.
1796 * linux-x86-low.c: Likewise.
1797
54019719
PA
17982015-07-24 Pedro Alves <palves@redhat.com>
1799
1800 * config.in: Regenerate.
1801 * configure: Regenerate.
1802
eb7aa561
PA
18032015-07-24 Pedro Alves <palves@redhat.com>
1804
1805 * acinclude.m4: Include ../ptrace.m4.
1806 * configure.ac: Call GDB_AC_PTRACE.
1807 * config.in, configure: Regenerate.
1808
55d7b841
YQ
18092015-07-24 Yao Qi <yao.qi@linaro.org>
1810
1811 * linux-low.c (linux_create_inferior): Remove setting to
1812 proc->priv->new_inferior.
1813 (linux_attach): Likewise.
1814 (linux_low_filter_event): Likewise.
1815 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1816
c06cbd92
YQ
18172015-07-24 Yao Qi <yao.qi@linaro.org>
1818
1819 * linux-low.c (linux_arch_setup): New function.
1820 (linux_low_filter_event): If proc->tdesc is NULL and
1821 proc->attached is true, call the_low_target.arch_setup.
1822 Otherwise, keep status pending, and return.
1823 (linux_resume_one_lwp_throw): Don't call get_pc if
1824 thread->while_stepping isn't NULL. Don't call
1825 get_thread_regcache if proc->tdesc is NULL.
1826 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1827 (linux_target_ops): Install arch_setup.
1828 * server.c (start_inferior): Call the_target->arch_setup.
1829 * target.h (struct target_ops) <arch_setup>: New field.
1830 (target_arch_setup): New marco.
1831 * lynx-low.c (lynx_target_ops): Update.
1832 * nto-low.c (nto_target_ops): Update.
1833 * spu-low.c (spu_target_ops): Update.
1834 * win32-low.c (win32_target_ops): Update.
1835
5ae3ebba
YQ
18362015-07-24 Yao Qi <yao.qi@linaro.org>
1837
1838 * linux-low.c (linux_add_process): Don't set
1839 proc->priv->new_inferior.
1840 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1841 (linux_attach): Likewise.
1842
eb97750b
YQ
18432015-07-24 Yao Qi <yao.qi@linaro.org>
1844
1845 * server.c (start_inferior): Code refactor.
1846
51aee833
YQ
18472015-07-24 Yao Qi <yao.qi@linaro.org>
1848
1849 * server.c (process_serial_event): Set general_thread.
1850
af1b22f3
YQ
18512015-07-21 Yao Qi <yao.qi@linaro.org>
1852
1853 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1854 aarch64_linux_get_debug_reg_capacity.
1855
554717a3
YQ
18562015-07-17 Yao Qi <yao.qi@linaro.org>
1857
1858 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1859 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1860 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1861 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1862 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1863 (AARCH64_HWP_ALIGNMENT): Likewise.
1864 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1865 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1866 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1867 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1868 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1869 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1870 (struct aarch64_debug_reg_state): Likewise.
1871 (struct arch_lwp_info): Likewise.
1872 (aarch64_align_watchpoint): Likewise.
1873 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1874 (aarch64_watchpoint_length): Likewise.
1875 (aarch64_point_encode_ctrl_reg): Likewise
1876 (aarch64_point_is_aligned): Likewise.
1877 (aarch64_align_watchpoint): Likewise.
1878 (aarch64_linux_set_debug_regs):
1879 (aarch64_dr_state_insert_one_point): Likewise.
1880 (aarch64_dr_state_remove_one_point): Likewise.
1881 (aarch64_handle_breakpoint): Likewise.
1882 (aarch64_handle_aligned_watchpoint): Likewise.
1883 (aarch64_handle_unaligned_watchpoint): Likewise.
1884 (aarch64_handle_watchpoint): Likewise.
1885
c67ca4de
YQ
18862015-07-17 Yao Qi <yao.qi@linaro.org>
1887
1888 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1889 and don't aarch64_get_debug_reg_state. All callers update.
1890 (aarch64_handle_aligned_watchpoint): Likewise.
1891 (aarch64_handle_unaligned_watchpoint): Likewise.
1892 (aarch64_handle_watchpoint): Likewise.
1893 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1894 (aarch64_remove_point): Likewise.
1895
25abf979
YQ
18962015-07-17 Yao Qi <yao.qi@linaro.org>
1897
1898 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1899 debug_printf.
1900 (aarch64_handle_unaligned_watchpoint): Likewise.
1901
db1ff28b
JK
19022015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1903
1904 Revert the previous 3 commits:
1905 Move gdb_regex* to common/
1906 Move linux_find_memory_regions_full & co.
1907 gdbserver build-id attribute generator
1908
700ca40f
JK
19092015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1910 Jan Kratochvil <jan.kratochvil@redhat.com>
1911
1912 gdbserver build-id attribute generator.
1913 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1914 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1915 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1916 (find_phdr): New.
1917 (get_dynamic): Use find_pdhr to traverse program headers.
1918 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1919 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1920 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1921 (get_hex_build_id): New.
1922 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1923 to reply XML document.
1924
9904185c
JK
19252015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1926 Jan Kratochvil <jan.kratochvil@redhat.com>
1927
1928 * target.c: Include target/target-utils.h and fcntl.h.
1929 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1930 (target_fileio_read_stralloc): New functions.
1931
6e5b4429
JK
19322015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1933
1934 * Makefile.in (OBS): Add gdb_regex.o.
1935 (gdb_regex.o): New.
1936 * config.in: Rebuilt.
1937 * configure: Rebuilt.
1938
ddc98fbf
JK
19392015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1940 Jan Kratochvil <jan.kratochvil@redhat.com>
1941
1942 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1943 * Makefile.in (OBS): Add target-utils.o.
1944 (linux-maps.o, target-utils.o): New.
1945 * configure.srv (srv_linux_obj): Add linux-maps.o.
1946
e57bb7a0
PL
19472015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1948
1949 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1950 function, return 1.
1951 (the_low_target): Install it.
1952
586b02a9
PA
19532015-07-14 Pedro Alves <palves@redhat.com>
1954
1955 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1956 Instead, ignore ECHILD, and throw an error for other errnos.
1957
58c1b36c
PA
19582015-07-10 Pedro Alves <palves@redhat.com>
1959
1960 * event-loop.c (struct callback_event) <data>: Change type to
1961 gdb_client_data instance instead of gdb_client_data pointer.
1962 (append_callback_event): Adjust.
1963
421530db
PL
19642015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1965
1966 * linux-aarch64-low.c: Add comments for each linux_target_ops
1967 method. Remove comments already covered in target_ops and
1968 linux_target_ops definitions.
1969 (the_low_target): Add comments for each unimplemented method.
1970
c2d65f38
YQ
19712015-07-09 Yao Qi <yao.qi@linaro.org>
1972
1973 * linux-aarch64-low.c (aarch64_regmap): Remove.
1974 (aarch64_usrregs_info): Remove.
1975 (regs_info): Set field usrregs to NULL.
1976
b20a6524
MM
19772015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1978
1979 * linux-low.c: Include "rsp-low.h"
1980 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1981 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1982 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1983 (handle_btrace_enable_pt): New.
1984 (handle_btrace_general_set): Support "pt".
1985 (handle_btrace_conf_general_set): Support "pt:size".
1986
96c97461
PL
19872015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1988
1989 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1990 Z_PACKET_SW_BP.
1991
37d66942
PL
19922015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1993
1994 * linux-aarch64-low.c: Remove comment about endianness.
1995 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1996 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1997 memcmp.
1998
dc06243f
GB
19992015-06-24 Gary Benson <gbenson@redhat.com>
2000
2001 * linux-i386-ipa.c (stdint.h): Do not include.
2002 * lynx-i386-low.c (stdint.h): Likewise.
2003 * lynx-ppc-low.c (stdint.h): Likewise.
2004 * mem-break.c (stdint.h): Likewise.
2005 * thread-db.c (stdint.h): Likewise.
2006 * tracepoint.c (stdint.h): Likewise.
2007 * win32-low.c (stdint.h): Likewise.
2008
124e13d9
SM
20092015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2010
2011 * server.c (write_qxfer_response): Update call to
2012 remote_escape_output.
2013
909c2cda
JK
20142015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2015 Jan Kratochvil <jan.kratochvil@redhat.com>
2016
2017 Merge multiple hex conversions.
2018 * gdbreplay.c (tohex): Rename to 'fromhex'.
2019 (logchar): Use fromhex.
2020
24c05f46
JK
20212015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2022
2023 * server.c (handle_qxfer_libraries): Set `version' attribute for
2024 <library-list>.
2025
14d2069a
GB
20262015-06-10 Gary Benson <gbenson@redhat.com>
2027
2028 * target.h (struct target_ops) <multifs_open>: New field.
2029 <multifs_unlink>: Likewise.
2030 <multifs_readlink>: Likewise.
2031 * linux-low.c (nat/linux-namespaces.h): New include.
2032 (linux_target_ops): Initialize the_target->multifs_open,
2033 the_target->multifs_unlink and the_target->multifs_readlink.
2034 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2035 * hostio.c (hostio_fs_pid): New static variable.
2036 (hostio_handle_new_gdb_connection): New function.
2037 (handle_setfs): Likewise.
2038 (handle_open): Use the_target->multifs_open as appropriate.
2039 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2040 (handle_readlink): Use the_target->multifs_readlink as
2041 appropriate.
2042 (handle_vFile): Handle vFile:setfs packets.
2043 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2044 after target_handle_new_gdb_connection.
2045
4b8b5e72
GB
20462015-06-10 Gary Benson <gbenson@redhat.com>
2047
2048 * configure.ac (AC_CHECK_FUNCS): Add setns.
2049 * config.in: Regenerate.
2050 * configure: Likewise.
2051 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2052 (linux-namespaces.o): New rule.
2053 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2054
3ac2e371
GB
20552015-06-09 Gary Benson <gbenson@redhat.com>
2056
2057 * hostio.c (handle_open): Process mode argument with
2058 fileio_to_host_mode.
2059
ca9b78ce
YQ
20602015-06-01 Yao Qi <yao.qi@linaro.org>
2061
2062 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2063 * linux-x86-low.c: Likewise.
2064
bfacd19d
DB
20652015-05-28 Don Breazeal <donb@codesourcery.com>
2066
2067 * linux-low.c (handle_extended_wait): Initialize
2068 thread_info.last_resume_kind for new fork children.
2069
452003ef
PA
20702015-05-15 Pedro Alves <palves@redhat.com>
2071
2072 * target.h (target_handle_new_gdb_connection): Rewrite using if
2073 wrapped in do/while.
2074
1041a03c
JB
20752015-05-14 Joel Brobecker <brobecker@adacore.com>
2076
2077 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2078 * configure, config.in: Regenerate.
2079 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2080 Declare typedef.
2081
c269dbdb
DB
20822015-05-12 Don Breazeal <donb@codesourcery.com>
2083
2084 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2085 PTRACE_EVENT_VFORK_DONE.
2086 (linux_low_ptrace_options, extended_event_reported): Add vfork
2087 events.
2088 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2089 and "vforkdone" for RSP 'T' Stop Reply Packet.
2090 * server.h (report_vfork_events): Declare
2091 global variable.
2092
3a8a0396
DB
20932015-05-12 Don Breazeal <donb@codesourcery.com>
2094
2095 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2096 (the_low_target) <new_fork>: Initialize new member.
2097 * linux-arm-low.c (arm_new_fork): New function.
2098 (the_low_target) <new_fork>: Initialize new member.
2099 * linux-low.c (handle_extended_wait): Call new target function
2100 new_fork.
2101 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2102 * linux-mips-low.c (mips_add_watchpoint): New function
2103 extracted from mips_insert_point.
2104 (the_low_target) <new_fork>: Initialize new member.
2105 (mips_linux_new_fork): New function.
2106 (mips_insert_point): Call mips_add_watchpoint.
2107 * linux-x86-low.c (x86_linux_new_fork): New function.
2108 (the_low_target) <new_fork>: Initialize new member.
2109
de0d863e
DB
21102015-05-12 Don Breazeal <donb@codesourcery.com>
2111
2112 * linux-low.c (handle_extended_wait): Implement return value,
2113 rename argument 'event_child' to 'event_lwp', handle
2114 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2115 (linux_low_ptrace_options): New function.
2116 (linux_low_filter_event): Call linux_low_ptrace_options,
2117 use different argument fo linux_enable_event_reporting,
2118 use return value from handle_extended_wait.
2119 (extended_event_reported): New function.
2120 (linux_wait_1): Call extended_event_reported and set
2121 status to report fork events.
2122 (linux_write_memory): Add pid to debug message.
2123 (reset_lwp_ptrace_options_callback): New function.
2124 (linux_handle_new_gdb_connection): New function.
2125 (linux_target_ops): Initialize new structure member.
2126 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2127 * lynx-low.c: Initialize new structure member.
2128 * remote-utils.c (prepare_resume_reply): Implement stop reason
2129 "fork" for "T" stop message.
2130 * server.c (handle_query): Call handle_new_gdb_connection.
2131 * server.h (report_fork_events): Declare global flag.
2132 * target.h (struct target_ops) <handle_new_gdb_connection>:
2133 New member.
2134 (target_handle_new_gdb_connection): New macro.
2135 * win32-low.c: Initialize new structure member.
2136
ddcbc397
DB
21372015-05-12 Don Breazeal <donb@codesourcery.com>
2138
2139 * mem-break.c (APPEND_TO_LIST): Define macro.
2140 (clone_agent_expr): New function.
2141 (clone_one_breakpoint): New function.
2142 (clone_all_breakpoints): New function.
2143 * mem-break.h: Declare new functions.
2144
89245bc0
DB
21452015-05-12 Don Breazeal <donb@codesourcery.com>
2146
2147 * linux-low.c (linux_supports_fork_events): New function.
2148 (linux_supports_vfork_events): New function.
2149 (linux_target_ops): Initialize new structure members.
2150 (initialize_low): Call linux_check_ptrace_features.
2151 * lynx-low.c (lynx_target_ops): Initialize new structure
2152 members.
2153 * server.c (report_fork_events, report_vfork_events):
2154 New global flags.
2155 (handle_query): Add new features to qSupported packet and
2156 response.
2157 (captured_main): Initialize new global variables.
2158 * target.h (struct target_ops) <supports_fork_events>:
2159 New member.
2160 <supports_vfork_events>: New member.
2161 (target_supports_fork_events): New macro.
2162 (target_supports_vfork_events): New macro.
2163 * win32-low.c (win32_target_ops): Initialize new structure
2164 members.
2165
835205d0
GB
21662015-05-12 Gary Benson <gbenson@redhat.com>
2167
2168 * server.c (handle_qxfer_exec_file): Use current process
2169 if annex is empty.
2170
21e94bd9
SL
21712015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2172
2173 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2174 Remove HAVE_PTRACE_GETREGS conditionals.
2175 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2176 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2177
45614f15
YQ
21782015-05-08 Yao Qi <yao.qi@linaro.org>
2179
2180 * linux-low.c (linux_supports_conditional_breakpoints): New
2181 function.
2182 (linux_target_ops): Install new target method.
2183 * lynx-low.c (lynx_target_ops): Install NULL hook for
2184 supports_conditional_breakpoints.
2185 * nto-low.c (nto_target_ops): Likewise.
2186 * spu-low.c (spu_target_ops): Likewise.
2187 * win32-low.c (win32_target_ops): Likewise.
2188 * server.c (handle_query): Check
2189 target_supports_conditional_breakpoints.
2190 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2191 New field.
2192 (target_supports_conditional_breakpoints): New macro.
2193
80ad801e
PA
21942015-05-06 Pedro Alves <palves@redhat.com>
2195
2196 PR server/18081
2197 * server.c (start_inferior): If the process exits, mourn it.
2198
819843c7
GB
21992015-04-21 Gary Benson <gbenson@redhat.com>
2200
2201 * hostio.c (fileio_open_flags_to_host): Factored out to
2202 fileio_to_host_openflags in common/fileio.c. Single use
2203 updated.
2204
a2d5a9d7
MF
22052015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2206
2207 * linux-xtensa-low.c (xtensa_fill_gregset)
2208 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2209 XCHAL_HAVE_LOOP.
2210
deb44829
MF
22112015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2212
2213 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2214 (regs_info): Replace usrregs pointer with NULL.
2215
e57f1de3
GB
22162015-04-17 Gary Benson <gbenson@redhat.com>
2217
2218 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2219 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2220 * server.c (handle_qxfer_exec_file): New function.
2221 (qxfer_packets): Add exec-file entry.
2222 (handle_query): Report qXfer:exec-file:read as supported packet.
2223
62828379
RN
22242015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2225
2226 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2227
b88bb450
GB
22282015-04-09 Gary Benson <gbenson@redhat.com>
2229
2230 * hostio-errno.c (errno_to_fileio_error): Remove function.
2231 Update caller to use remote_fileio_to_fio_error.
2232
c8f4bfdd
YQ
22332015-04-09 Yao Qi <yao.qi@linaro.org>
2234
2235 * linux-low.c (linux_insert_point): Call
2236 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2237 (linux_remove_point): Call remove_memory_breakpoint if type is
2238 raw_bkpt_type_sw.
2239 * linux-x86-low.c (x86_insert_point): Don't call
2240 insert_memory_breakpoint.
2241 (x86_remove_point): Don't call remove_memory_breakpoint.
2242
41f98f02
PA
22432015-04-01 Pedro Alves <palves@redhat.com>
2244 Cleber Rosa <crosa@redhat.com>
2245
2246 * server.c (gdbserver_usage): Reorganize and extend the usage
2247 message.
2248
2bf6fb9d
PA
22492015-03-24 Pedro Alves <palves@redhat.com>
2250
2251 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2252 output. Also dump TRAP_TRACE.
2253 (linux_low_filter_event): In debug output, distinguish a
2254 resume_stop SIGSTOP from a delayed SIGSTOP.
2255
369f6daa
GB
22562015-03-24 Gary Benson <gbenson@redhat.com>
2257
2258 * linux-x86-low.c (x86_linux_new_thread): Moved to
2259 nat/x86-linux.c.
2260 (x86_linux_prepare_to_resume): Likewise.
2261
8e5d4070
GB
22622015-03-24 Gary Benson <gbenson@redhat.com>
2263
2264 * Makefile.in (x86-linux-dregs.o): New rule.
2265 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2266 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2267 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2268 (x86_linux_dr_get): Likewise.
2269 (x86_linux_dr_set): Likewise.
2270 (update_debug_registers_callback): Likewise.
2271 (x86_linux_dr_set_addr): Likewise.
2272 (x86_linux_dr_get_addr): Likewise.
2273 (x86_linux_dr_set_control): Likewise.
2274 (x86_linux_dr_get_control): Likewise.
2275 (x86_linux_dr_get_status): Likewise.
2276 (x86_linux_update_debug_registers): Likewise.
2277
2b95d440
GB
22782015-03-24 Gary Benson <gbenson@redhat.com>
2279
2280 * linux-x86-low.c (x86_linux_update_debug_registers):
2281 New function, factored out from...
2282 (x86_linux_prepare_to_resume): ...this.
2283
14b0bc68
GB
22842015-03-24 Gary Benson <gbenson@redhat.com>
2285
2286 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2287 (x86_linux_dr_set): Likewise.
2288 (update_debug_registers_callback): Likewise.
2289 (x86_linux_dr_set_addr): Likewise.
2290 (x86_linux_dr_get_addr): Likewise.
2291 (x86_linux_dr_set_control): Likewise.
2292 (x86_linux_dr_get_control): Likewise.
2293 (x86_linux_dr_get_status): Likewise.
2294 (x86_linux_prepare_to_resume): Likewise.
2295
5dfe6ca8
GB
22962015-03-24 Gary Benson <gbenson@redhat.com>
2297
2298 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2299 Use perror_with_name. Pass string through gettext.
2300 (x86_linux_dr_set): Likewise.
2301
d33472ad
GB
23022015-03-24 Gary Benson <gbenson@redhat.com>
2303
2304 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2305 (x86_linux_dr_set_addr): ...this.
2306 (x86_dr_low_get_addr): Rename to...
2307 (x86_linux_dr_get_addr): ...this.
2308 (x86_dr_low_set_control): Rename to...
2309 (x86_linux_dr_set_control): ...this.
2310 (x86_dr_low_get_control): Rename to...
2311 (x86_linux_dr_get_control): ...this.
2312 (x86_dr_low_get_status): Rename to...
2313 (x86_linux_dr_get_status): ...this.
2314 (x86_dr_low): Update with new function names.
2315
4b134ca1
GB
23162015-03-24 Gary Benson <gbenson@redhat.com>
2317
2318 * Makefile.in (x86-linux.o): New rule.
2319 * configure.srv: Add x86-linux.o to relevant targets.
2320 * linux-low.c (lwp_set_arch_private_info): New function.
2321 (lwp_arch_private_info): Likewise.
2322 * linux-x86-low.c: Include nat/x86-linux.h.
2323 (arch_lwp_info): Removed structure.
2324 (update_debug_registers_callback):
2325 Use lwp_set_debug_registers_changed.
2326 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2327 and lwp_set_debug_registers_changed.
2328 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2329
34c703da
GB
23302015-03-24 Gary Benson <gbenson@redhat.com>
2331
2332 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2333 * linux-arm-low.c (arm_new_thread): Likewise.
2334 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2335 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2336 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2337 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2338
cff068da
GB
23392015-03-24 Gary Benson <gbenson@redhat.com>
2340
2341 * linux-low.c (ptid_of_lwp): New function.
2342 (lwp_is_stopped): Likewise.
2343 (lwp_stop_reason): Likewise.
2344 * linux-x86-low.c (update_debug_registers_callback):
2345 Use lwp_is_stopped.
2346 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2347 lwp_stop_reason.
2348
b2f7c7e8
GB
23492015-03-24 Gary Benson <gbenson@redhat.com>
2350
2351 * linux-low.h (linux_stop_lwp): Remove declaration.
2352
6d4ee8c6
GB
23532015-03-24 Gary Benson <gbenson@redhat.com>
2354
2355 * linux-low.h: Include nat/linux-nat.h.
2356 * linux-low.c (iterate_over_lwps_args): New structure.
2357 (iterate_over_lwps_filter): New function.
2358 (iterate_over_lwps): Likewise.
2359 * linux-x86-low.c (update_debug_registers_callback):
2360 Update signature to what iterate_over_lwps expects.
2361 Remove PID check that iterate_over_lwps now performs.
2362 (x86_dr_low_set_addr): Use iterate_over_lwps.
2363 (x86_dr_low_set_control): Likewise.
2364
70a0bb6b
GB
23652015-03-24 Gary Benson <gbenson@redhat.com>
2366
2367 * linux-x86-low.c (x86_debug_reg_state): New function.
2368 (x86_linux_prepare_to_resume): Use the above.
2369
7b669087
GB
23702015-03-24 Gary Benson <gbenson@redhat.com>
2371
2372 * linux-low.c (current_lwp_ptid): New function.
2373 * linux-x86-low.c: Include nat/linux-nat.h.
2374 (x86_dr_low_get_addr): Use current_lwp_ptid.
2375 (x86_dr_low_get_control): Likewise.
2376 (x86_dr_low_get_status): Likewise.
2377
eef49a3d
PA
23782015-03-20 Pedro Alves <palves@redhat.com>
2379
2380 * tracepoint.c (cmd_qtstatus): Make "str" const.
2381
b2333d22
PA
23822015-03-20 Pedro Alves <palves@redhat.com>
2383
2384 * server.c (handle_general_set): Make "req_str" const.
2385
23f238d3
PA
23862015-03-19 Pedro Alves <palves@redhat.com>
2387
2388 * linux-low.c (linux_resume_one_lwp): Rename to ...
2389 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2390 instead call perror_with_name.
2391 (check_ptrace_stopped_lwp_gone): New function.
2392 (linux_resume_one_lwp): Reimplement as wrapper around
2393 linux_resume_one_lwp_throw that swallows errors if the LWP is
2394 gone.
2395
91baf43f
PA
23962015-03-19 Pedro Alves <palves@redhat.com>
2397
2398 * linux-low.c (count_events_callback, select_event_lwp_callback):
2399 No longer check whether the thread has resume_stop as last resume
2400 kind.
2401
8bf3b159
PA
24022015-03-19 Pedro Alves <palves@redhat.com>
2403
2404 * linux-low.c (count_events_callback, select_event_lwp_callback):
2405 Use the lwp's status_pending_p field, not the thread's.
2406
b90fc188
PA
24072015-03-19 Pedro Alves <palves@redhat.com>
2408
2409 * linux-low.c (select_event_lwp_callback): Update comments to
2410 no longer mention SIGTRAP.
2411
464b0089
GB
24122015-03-18 Gary Benson <gbenson@redhat.com>
2413
2414 * server.c (handle_query): Do not report vFile:fstat as supported.
2415
aa9e327f
GB
24162015-03-11 Gary Benson <gbenson@redhat.com>
2417
2418 * hostio.c (sys/types.h): New include.
2419 (sys/stat.h): Likewise.
2420 (common-remote-fileio.h): Likewise.
2421 (handle_fstat): New function.
2422 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2423
791c0056
GB
24242015-03-11 Gary Benson <gbenson@redhat.com>
2425
2426 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2427 struct stat.st_blocks and struct stat.st_blksize.
2428 * configure: Regenerate.
2429 * config.in: Likewise.
2430 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2431 (OBS): Add common-remote-fileio.o.
2432 (common-remote-fileio.o): New rule.
2433
9a9df970
PA
24342015-03-09 Pedro Alves <palves@redhat.com>
2435
2436 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2437 'struct sockaddr' pointer in 'accept' call.
2438
9eb1356e
PA
24392015-03-09 Pedro Alves <palves@redhat.com>
2440
2441 Revert:
2442 2015-03-07 Pedro Alves <palves@redhat.com>
2443 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2444 or <winsock2.h> here. Instead include "gdb_socket.h".
2445 (remote_open): Use union gdb_sockaddr_u.
2446 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2447 or <winsock2.h> here. Instead include "gdb_socket.h".
2448 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2449 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2450 or <sys/un.h>.
2451 (init_named_socket, gdb_agent_helper_thread): Use union
2452 gdb_sockaddr_u.
2453
aac331e4
PA
24542015-03-07 Pedro Alves <palves@redhat.com>
2455
2456 * configure.ac (build_warnings): Move
2457 -Wdeclaration-after-statement to the C-specific set.
2458 * configure: Regenerate.
2459
366c75fc
PA
24602015-03-07 Pedro Alves <palves@redhat.com>
2461
2462 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2463 or <winsock2.h> here. Instead include "gdb_socket.h".
2464 (remote_open): Use union gdb_sockaddr_u.
2465 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2466 or <winsock2.h> here. Instead include "gdb_socket.h".
2467 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2468 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2469 or <sys/un.h>.
2470 (init_named_socket, gdb_agent_helper_thread): Use union
2471 gdb_sockaddr_u.
2472
492d29ea
PA
24732015-03-07 Pedro Alves <palves@redhat.com>
2474
2475 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2476 instead.
2477
60a191ed
YQ
24782015-03-06 Yao Qi <yao.qi@linaro.org>
2479
2480 * linux-aarch64-low.c (aarch64_insert_point): Use
2481 show_debug_regs as a boolean.
2482 (aarch64_remove_point): Likewise.
2483
f5771b1d
PA
24842015-03-05 Pedro Alves <palves@redhat.com>
2485
2486 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2487 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2488 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2489 * nto-low.c (nto_target_ops): Likewise.
2490 * spu-low.c (spu_target_ops): Likewise.
2491 * win32-low.c (win32_target_ops): Likewise.
2492
3e572f71
PA
24932015-03-04 Pedro Alves <palves@redhat.com>
2494
72f4393d 2495 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2496 Decide whether a breakpoint triggered based on the SIGTRAP's
2497 siginfo.si_code.
72f4393d
L
2498 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2499 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2500 (linux_low_filter_event): Check for breakpoints before checking
2501 watchpoints.
2502 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2503 siginfo.si_code.
72f4393d
L
2504 (linux_stopped_by_sw_breakpoint)
2505 (linux_supports_stopped_by_sw_breakpoint)
2506 (linux_stopped_by_hw_breakpoint)
2507 (linux_supports_stopped_by_hw_breakpoint): New functions.
2508 (linux_target_ops): Install new target methods.
3e572f71 2509
1ec68e26
PA
25102015-03-04 Pedro Alves <palves@redhat.com>
2511
2512 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2513 * server.c (swbreak_feature, hwbreak_feature): New globals.
2514 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2515 (captured_main): Clear swbreak_feature and hwbreak_feature.
2516 * server.h (swbreak_feature, hwbreak_feature): Declare.
2517 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2518 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2519 supports_stopped_by_hw_breakpoint>: New fields.
2520 (target_supports_stopped_by_sw_breakpoint)
2521 (target_stopped_by_sw_breakpoint)
2522 (target_supports_stopped_by_hw_breakpoint)
2523 (target_stopped_by_hw_breakpoint): Declare.
2524
15c66dd6
PA
25252015-03-04 Pedro Alves <palves@redhat.com>
2526
2527 enum lwp_stop_reason -> enum target_stop_reason
2528 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2529 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2530 (linux_wait_1, stuck_in_jump_pad_callback)
2531 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2532 (linux_stopped_by_watchpoint):
2533 * linux-low.h (enum lwp_stop_reason): Delete.
2534 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2535 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2536
98fc70d6
YQ
25372015-03-04 Yao Qi <yao.qi@linaro.org>
2538
2539 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2540
dd2ac174
GB
25412015-03-03 Gary Benson <gbenson@redhat.com>
2542
2543 * hostio.c (handle_vFile): Fix prefix lengths.
2544
d68e53f4
MM
25452015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2546
2547 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2548 ptr_bits.
2549
bf2d68ab
AA
25502015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2551
2552 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2553 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2554 (clean): Add "rm -f" for above C files.
2555 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2556 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2557 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2558 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2559 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2560 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2561 (init_registers_s390x_vx_linux64)
2562 (init_registers_s390x_tevx_linux64)
2563 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2564 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2565 declarations.
2566 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2567 (s390_store_vxrs_high): New functions.
2568 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2569 NT_S390_VXRS_HIGH.
2570 (s390_arch_setup): Add logic for selecting one of the new target
2571 descriptions. Activate the new vector regsets if applicable.
2572 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2573 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2574 and init_registers_s390x_tevx_linux64.
2575
c966a859
PA
25762015-03-01 Pedro Alves <palves@redhat.com>
2577
2578 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2579 parameter.
2580
4180215b
PA
25812015-02-27 Pedro Alves <palves@redhat.com>
2582
2583 * linux-x86-low.c (u_debugreg_offset): New function.
2584 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2585
749bab01
PA
25862015-02-27 Pedro Alves <palves@redhat.com>
2587
2588 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2589 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2590 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2591 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2592 (ps_lsetfpregs, ps_getpid)
2593 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2594 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2595 (ps_lsetxregs, ps_plog): Declare.
2596
3c14e5a3
PA
25972015-02-27 Pedro Alves <palves@redhat.com>
2598
2599 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2600 IP_AGENT_EXPORT_FUNC.
2601 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2602 IP_AGENT_EXPORT_FUNC.
2603 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2604 (IP_AGENT_EXPORT): Delete.
2605 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2606 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2607 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2608 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2609 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2610 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2611 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2612 (traceframe_read_count, traceframe_write_count)
2613 (traceframes_created, trace_state_variables, get_raw_reg)
2614 (get_trace_state_variable_value, set_trace_state_variable_value)
2615 (ust_loaded, helper_thread_id, cmd_buf): Use
2616 IPA_SYM_EXPORTED_NAME.
2617 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2618 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2619 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2620 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2621 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2622 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2623 EXTERN_C_PUSH/EXTERN_C_POP.
2624 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2625 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2626 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2627 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2628 (traceframe_write_count, traceframe_read_count)
2629 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2630 (about_to_request_buffer_space, get_trace_state_variable_value)
2631 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2632 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2633 EXTERN_C_PUSH/EXTERN_C_POP.
2634 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2635 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2636 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2637 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2638 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2639 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2640 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2641 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2642 Define.
2643 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2644 (IP_AGENT_EXPORT_VAR_DECL): Define.
2645 (tracing): Declare.
2646 (gdb_agent_get_raw_reg): Declare.
2647
fe978cb0
PA
26482015-02-27 Tom Tromey <tromey@redhat.com>
2649 Pedro Alves <palves@redhat.com>
2650
2651 Rename symbols whose names are reserved C++ keywords throughout.
2652
3bc3d82a
PA
26532015-02-27 Pedro Alves <palves@redhat.com>
2654
2655 * Makefile.in (COMPILER): New, get it from autoconf.
2656 (CXX): Get from autoconf instead.
2657 (COMPILE.pre): Use COMPILER.
2658 (CC-LD): Rename to ...
2659 (CC_LD): ... this. Use COMPILER.
2660 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2661 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2662 * acinclude.m4: Include build-with-cxx.m4.
2663 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2664 Disable -Werror by default if building in C++ mode.
2665 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2666 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2667 the C++ compiler. Save/restore CXXFLAGS too.
2668 * configure: Regenerate.
2669
07697489
PA
26702015-02-27 Pedro Alves <palves@redhat.com>
2671
2672 * acinclude.m4: Include libiberty.m4.
2673 * configure.ac: Call libiberty_INIT.
2674 * config.in, configure: Regenerate.
2675
9beb7c4e
PA
26762015-02-26 Pedro Alves <palves@redhat.com>
2677
2678 * linux-low.c (linux_wait_1): When incrementing the PC past a
2679 program breakpoint always use the_low_target.breakpoint_len as
2680 increment, rather than the maximum between that and
2681 the_low_target.decr_pc_after_break.
2682
8090aef2
PA
26832015-02-23 Pedro Alves <palves@redhat.com>
2684
2685 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2686 thread was doing a step-over; always adjust the PC if
2687 we stepped over a permanent breakpoint.
2688 (linux_wait_1): If we stepped over breakpoint that was on top of a
2689 permanent breakpoint, manually advance the PC past it.
2690
bc9540e8
PA
26912015-02-23 Pedro Alves <palves@redhat.com>
2692
2693 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2694 modes.
2695 (x86_fill_gregset, x86_store_gregset): Use it when handling
2696 $orig_eax.
2697
2db9a427
PA
26982015-02-20 Pedro Alves <palves@redhat.com>
2699
2700 * thread-db.c: Include "nat/linux-procfs.h".
2701 (thread_db_init): Skip listing new threads if the kernel supports
2702 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2703
afa8d396
PA
27042015-02-20 Pedro Alves <palves@redhat.com>
2705
2706 * linux-low.c (status_pending_p_callback): Use ptid_match.
2707
c9587f88
AT
27082015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2709
2710 PR breakpoints/16812
2711 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2712 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2713 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2714
b05ec7a5
AT
27152015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2716
2717 PR breakpoints/15956
2718 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2719
d33501a5
MM
27202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2721
2722 * linux-low.c (linux_low_btrace_conf): Print size.
2723 * server.c (handle_btrace_conf_general_set): New.
2724 (hanle_general_set): Call handle_btrace_conf_general_set.
2725 (handle_query): Report Qbtrace-conf:bts:size as supported.
2726
f4abbc16
MM
27272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2728
2729 * linux-low.c (linux_low_enable_btrace): Update parameters.
2730 (linux_low_btrace_conf): New.
2731 (linux_target_ops)<to_btrace_conf>: Initialize.
2732 * server.c (current_btrace_conf): New.
2733 (handle_btrace_enable): Rename to ...
2734 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2735 to target_enable_btrace. Update comment. Update users.
2736 (handle_qxfer_btrace_conf): New.
2737 (qxfer_packets): Add btrace-conf entry.
2738 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2739 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2740 (target_ops)<read_btrace_conf>: New.
2741 (target_enable_btrace): Update parameters.
2742 (target_read_btrace_conf): New.
2743
043c3577
MM
27442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2745
2746 * server.c (handle_btrace_general_set): Remove call to
2747 target_supports_btrace.
2748 (supported_btrace_packets): New.
2749 (handle_query): Call supported_btrace_packets.
2750 * target.h: include btrace-common.h.
2751 (btrace_target_info): Removed.
2752 (supports_btrace, target_supports_btrace): Update parameters.
2753
734b0e4b
MM
27542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2755
2756 * Makefile.in (SFILES): Add common/btrace-common.c.
2757 (OBS): Add common/btrace-common.o.
2758 (btrace-common.o): Add build rules.
2759 * linux-low: Include btrace-common.h.
2760 (linux_low_read_btrace): Use struct btrace_data. Call
2761 btrace_data_init and btrace_data_fini.
2762
d6c146e9
PA
27632015-02-06 Pedro Alves <palves@redhat.com>
2764
2765 * thread-db.c (find_new_threads_callback): Add debug output.
2766
20ba1ce6
PA
27672015-02-04 Pedro Alves <palves@redhat.com>
2768
2769 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2770 (resume_stopped_resumed_lwps): New function.
2771 (linux_wait_for_event_filtered): Use it.
2772
8cc73a39
SDJ
27732015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2774
2775 * Makefile.in (SFILES): Add linux-personality.c.
2776 (linux-personality.o): New rule.
2777 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2778 list of objects to be built.
2779 * linux-low.c: Include nat/linux-personality.h.
2780 (linux_create_inferior): Remove code to disable address space
2781 randomization (moved to ../nat/linux-personality.c). Create
2782 cleanup to disable address space randomization.
2783
fb23d554
SDJ
27842015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2785
2786 * Makefile.in (posix-strerror.o): New rule.
2787 (mingw-strerror.o): Likewise.
2788 * configure: Regenerated.
2789 * configure.ac: Source file ../common/common.host. Initialize new
2790 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2791
cdf43629
YQ
27922015-01-14 Yao Qi <yao@codesourcery.com>
2793
2794 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2795 (ppc-linux.o): New rule.
2796 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2797 * configure.ac: AC_CHECK_FUNCS(getauxval).
2798 * config.in: Re-generated.
2799 * configure: Re-generated.
2800 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2801 ppc64_64bit_inferior_p
2802
514c5338
YQ
28032015-01-14 Yao Qi <yao@codesourcery.com>
2804
2805 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2806 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2807 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2808 (PT_ORIG_R3, PT_TRAP): Likewise.
2809 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2810 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2811 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2812
3368c1e5
JB
28132015-01-10 Joel Brobecker <brobecker@adacore.com>
2814
2815 * i387-fp.c (i387_cache_to_xsave): In look over
2816 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2817 zmmh_low_space field by use of zmmh_high_space.
2818
582511be
PA
28192015-01-09 Pedro Alves <palves@redhat.com>
2820
2821 * linux-low.c (step_over_bkpt): Move higher up in the file.
2822 (handle_extended_wait): Don't store the stop_pc here.
2823 (get_stop_pc): Adjust comments and rename to ...
2824 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2825 stopped for a software breakpoint or hardware breakpoint.
2826 (thread_still_has_status_pending_p): New function.
2827 (status_pending_p_callback): Use
2828 thread_still_has_status_pending_p. If the event is no longer
2829 interesting, resume the LWP.
2830 (handle_tracepoints): Add assert.
2831 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2832 (wstatus_maybe_breakpoint): New function.
2833 (cancel_breakpoint): Delete function.
2834 (check_stopped_by_watchpoint): New function, factored out from
2835 linux_low_filter_event.
2836 (lp_status_maybe_breakpoint): Delete function.
2837 (linux_low_filter_event): Remove filter_ptid argument.
2838 Leave thread group exits pending here. Store the LWP's stop PC.
2839 Always leave events pending.
2840 (linux_wait_for_event_filtered): Pull all events out of the
2841 kernel, and leave them all pending.
2842 (count_events_callback, select_event_lwp_callback): Consider all
2843 events.
2844 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2845 (select_event_lwp): Only give preference to the stepping LWP in
2846 all-stop mode. Adjust comments.
2847 (ignore_event): New function.
2848 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2849 references to cancel_breakpoints. Adjust to renames. Also give
2850 equal priority to all LWPs that have had events in non-stop mode.
2851 If reporting a software breakpoint event, unadjust the LWP's PC.
2852 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2853 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2854 Adjust.
2855 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2856 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2857 (linux_stopped_by_watchpoint): Adjust.
2858 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2859 * linux-low.h (enum lwp_stop_reason): New.
2860 (struct lwp_info) <stop_pc>: Adjust comment.
2861 <stopped_by_watchpoint>: Delete field.
2862 <stop_reason>: New field.
2863 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2864 * mem-break.c (software_breakpoint_inserted_here)
2865 (hardware_breakpoint_inserted_here): New function.
2866 * mem-break.h (software_breakpoint_inserted_here)
2867 (hardware_breakpoint_inserted_here): Declare.
2868 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2869 (cancel_breakpoints): Delete.
2870 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2871 (upload_fast_traceframes): Remove references to
2872 cancel_breakpoints.
2873
a33e3959
PA
28742015-01-09 Pedro Alves <palves@redhat.com>
2875
2876 * thread-db.c (find_new_threads_callback): Ignore thread if the
2877 kernel thread ID is -1.
2878
8784d563
PA
28792015-01-09 Pedro Alves <palves@redhat.com>
2880
2881 * linux-low.c (linux_attach_fail_reason_string): Move to
2882 nat/linux-ptrace.c, and rename.
2883 (linux_attach_lwp): Update comment.
2884 (attach_proc_task_lwp_callback): New function.
2885 (linux_attach): Adjust to rename and use
2886 linux_proc_attach_tgid_threads.
2887 (linux_attach_fail_reason_string): Delete declaration.
2888
76f2b779
JB
28892015-01-01 Joel Brobecker <brobecker@adacore.com>
2890
2891 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2892 * server.c (gdbserver_version): Likewise.
2893
fafcc06a
SDJ
28942014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2895
2896 * remote-utils.c: Include ctype.h.
2897 (input_interrupt): Explicitly handle the case when the char
2898 received is the NUL byte. Improve the printing of non-ASCII
2899 characters.
2900
beed38b8
JB
29012014-12-16 Joel Brobecker <brobecker@adacore.com>
2902
2903 * linux-low.c (linux_low_filter_event): Update call to
2904 linux_enable_event_reporting following the addition of
2905 a new parameter to that function.
2906
bf330350
CU
29072014-12-16 Catalin Udma <catalin.udma@freescale.com>
2908
2909 PR server/17457
2910 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2911 (AARCH64_FPCR_REGNO): Likewise.
2912 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2913 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2914 (aarch64_store_fpregset): Likewise.
2915
5227d625
JB
29162014-12-15 Joel Brobecker <brobecker@adacore.com>
2917
2918 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2919 Remove FIXME comment about assumption about N.
2920
f93b65a0
JB
29212014-12-13 Joel Brobecker <brobecker@adacore.com>
2922
2923 * configure.ac: If large-file support is disabled in GDBserver,
2924 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2925 * configure: Regenerate.
2926
e5a9158d
AA
29272014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2928
2929 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2930 warning upon ENODATA from ptrace.
2931 * linux-s390-low.c (s390_store_tdb): New.
2932 (s390_regsets): Add regset for NT_S390_TDB.
2933
feea5f36
AA
29342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2935
2936 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2937 without a fill_function.
2938 * linux-s390-low.c (s390_fill_last_break): Remove.
2939 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2940 (s390_arch_setup): Use regset's size instead of fill_function for
2941 loop end condition.
2942
098dbe61
AA
29432014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2944
2945 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2946 the regset's store function when ptrace returned an error.
2947 * regcache.c (get_thread_regcache): Invalidate register cache
2948 before fetching inferior's registers.
2949
28eef672
AA
29502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2951
2952 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2953 while-loop as for-loop.
2954 (regsets_store_inferior_registers): Likewise.
2955
bdca27a2
YQ
29562014-11-28 Yao Qi <yao@codesourcery.com>
2957
2958 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2959 * config.in, configure: Re-generate.
2960 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2961 is defined.
2962
9c232dda
YQ
29632014-11-21 Yao Qi <yao@codesourcery.com>
2964
2965 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2966 (AC_CHECK_HEADERS): Remove malloc.h.
2967 * configure: Re-generated.
2968 * config.in: Re-generated.
2969 * server.h: Don't include alloca.h and malloc.h.
2970 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2971 Don't include malloc.h.
2972
43968415
JB
29732014-11-17 Joel Brobecker <brobecker@adacore.com>
2974
2975 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2976 corresponding ERRNO check in same block.
2977
40e91bc7
PA
29782014-11-12 Pedro Alves <palves@redhat.com>
2979
2980 * server.c (cont_thread): Update comment.
2981 (start_inferior, attach_inferior): No longer clear cont_thread.
2982 (handle_v_cont): No longer set cont_thread.
2983 (captured_main): Clear cont_thread each time a GDB connects.
2984
c2c118cf
PA
29852014-11-12 Pedro Alves <palves@redhat.com>
2986
2987 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2988 thread, and don't resume all threads if the Hc thread has exited.
2989
78708b7c
PA
29902014-11-12 Pedro Alves <palves@redhat.com>
2991
2992 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2993 the process group instead of to a specific LWP.
2994
a2abc7de
PA
29952014-10-15 Pedro Alves <palves@redhat.com>
2996
2997 PR server/17487
2998 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2999 parameter.
3000 (arm_set_thread_context): Delete.
3001 (the_low_target): Adjust.
3002 * win32-i386-low.c (debug_registers_changed)
3003 (debug_registers_used): Delete.
3004 (update_debug_registers_callback): New function.
3005 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3006 needing to update their debug registers.
3007 (win32_get_current_dr): New function.
3008 (x86_dr_low_get_addr, x86_dr_low_get_control)
3009 (x86_dr_low_get_status): Fetch the debug register from the thread
3010 record's context.
3011 (i386_initial_stuff): Adjust.
3012 (i386_get_thread_context): Remove current_event parameter. Don't
3013 clear debug_registers_changed nor copy DR values to
3014 debug_reg_state.
3015 (i386_set_thread_context): Delete.
3016 (i386_prepare_to_resume): New function.
3017 (i386_thread_added): Mark the thread as needing to update irs
3018 debug registers.
3019 (the_low_target): Remove i386_set_thread_context and install
3020 i386_prepare_to_resume.
3021 * win32-low.c (win32_get_thread_context): Adjust.
3022 (win32_set_thread_context): Use SetThreadContext
3023 directly.
3024 (win32_prepare_to_resume): New function.
3025 (win32_require_context): New function, factored out from ...
3026 (thread_rec): ... this.
3027 (continue_one_thread): Call win32_prepare_to_resume on each thread
3028 we're about to continue.
3029 (win32_resume): Call win32_prepare_to_resume on the event thread.
3030 * win32-low.h (struct win32_thread_info)
3031 <debug_registers_changed>: New field.
3032 (struct win32_target_ops): Change prototype of set_thread_context,
3033 delete set_thread_context and add prepare_to_resume.
3034 (win32_require_context): New declaration.
3035
a442d071
GB
30362014-10-08 Gary Benson <gbenson@redhat.com>
3037
3038 * server.h: Do not include common-exceptions.h.
3039
6f1947e8
GB
30402014-10-08 Gary Benson <gbenson@redhat.com>
3041
3042 * server.h: Do not include cleanups.h.
3043
63b434a4
JH
30442014-09-30 James Hogan <james.hogan@imgtec.com>
3045
3046 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3047 mips64-dsp-linux.c.
3048
c4d9ceb6
YQ
30492014-09-23 Yao Qi <yao@codesourcery.com>
3050
3051 * linux-low.c (lp_status_maybe_breakpoint): New function.
3052 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3053 (count_events_callback): Likewise.
3054 (select_event_lwp_callback): Likewise.
3055 (cancel_breakpoints_callback): Likewise.
3056
89a5711c
DB
30572014-09-19 Don Breazeal <donb@codesourcery.com>
3058
3059 * linux-low.c (handle_extended_wait): Call
3060 linux_ptrace_get_extended_event.
3061 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3062 linux_is_extended_waitstatus.
3063
bffc0964
JB
30642014-09-16 Joel Brobecker <brobecker@adacore.com>
3065
3066 * Makefile.in (CPPFLAGS): Define.
3067 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3068 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3069
0bfdf32f
GB
30702014-09-16 Gary Benson <gbenson@redhat.com>
3071
3072 * inferiors.h (current_inferior): Renamed as...
3073 (current_thread): New variable. All uses updated.
3074 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3075 (maybe_move_out_of_jump_pad): Likewise.
3076 (cancel_breakpoint): Likewise.
3077 (linux_low_filter_event): Likewise.
3078 (wait_for_sigstop): Likewise.
3079 (linux_resume_one_lwp): Likewise.
3080 (need_step_over_p): Likewise.
3081 (start_step_over): Likewise.
3082 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3083 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3084 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3085 and save_inferior as saved_thread.
3086 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3087 saved_thread.
3088 (regcache_invalidate_thread): Likewise.
3089 * remote-utils.c (prepare_resume_reply): Likewise.
3090 * thread-db.c (thread_db_get_tls_address): Likewise.
3091 (disable_thread_event_reporting): Likewise.
3092 (remove_thread_event_breakpoints): Likewise.
3093 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3094 as saved_thread.
3095 * target.h (set_desired_inferior): Renamed as...
3096 (set_desired_thread): New declaration. All uses updated.
3097 * server.c (myresume): Updated comment to reference thread instead
3098 of inferior.
3099 (handle_serial_event): Likewise.
3100 (handle_target_event): Likewise.
3101
361c8ade
GB
31022014-09-12 Tom Tromey <tromey@redhat.com>
3103 Gary Benson <gbenson@redhat.com>
3104
3105 * regcache.h: Include common-regcache.h.
3106 (regcache_read_pc): Don't declare.
3107 * regcache.c (get_thread_regcache_for_ptid): New function.
3108
bd9269f7
GB
31092014-09-11 Tom Tromey <tromey@redhat.com>
3110 Gary Benson <gbenson@redhat.com>
3111
3112 * symbol.c: New file.
3113 * Makefile.in (SFILES): Add symbol.c.
3114 (OBS): Add symbol.o.
3115
f8c1d06b
GB
31162014-09-11 Gary Benson <gbenson@redhat.com>
3117
3118 * target.c (target_stop_ptid, target_continue_ptid): New
3119 functions.
3120
721ec300
GB
31212014-09-11 Tom Tromey <tromey@redhat.com>
3122 Gary Benson <gbenson@redhat.com>
3123
3124 * target.h: Include target/target.h.
3125 * target.c (target_read_memory, target_read_uint32)
3126 (target_write_memory): New functions.
3127
c5e92cca
GB
31282014-09-11 Gary Benson <gbenson@redhat.com>
3129
3130 * server.h (debug_hw_points): Don't declare.
3131 * server.c (debug_hw_points): Don't define. Replace all uses
3132 with show_debug_regs.
3133 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3134 all uses with show_debug_regs.
3135
2e4bb98a
EBM
31362014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3137
3138 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3139 endianness into account.
3140 (ppc_supply_ptrace_register): Likewise.
3141
ac740bc7
JH
31422014-09-03 James Hogan <james.hogan@imgtec.com>
3143
3144 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3145 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3146
97ea6506
GB
31472014-09-03 Gary Benson <gbenson@redhat.com>
3148
3149 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3150 ALL_DEBUG_ADDRESS_REGISTERS.
3151
df7e5265
GB
31522014-09-02 Gary Benson <gbenson@redhat.com>
3153
3154 * i386-low.h: Renamed as...
3155 * x86-low.h: New file. All type, function and variable name
3156 prefixes changed from "i386_" to "x86_". All references updated.
3157 * i386-low.c: Renamed as...
3158 * x86-low.c: New file. All type, function and variable name
3159 prefixes changed from "i386_" to "x86_". All references updated.
3160
ed859da7
GB
31612014-09-02 Gary Benson <gbenson@redhat.com>
3162
3163 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3164 (x86_linux_new_thread): Likewise.
3165
860789c7
GB
31662014-08-29 Gary Benson <gbenson@redhat.com>
3167
3168 * server.h (setjmp.h): Do not include.
3169 (toplevel): Do not declare.
3170 (common-exceptions.h): Include.
3171 (cleanups.h): Likewise.
3172 * server.c (toplevel): Do not define.
3173 (exit_code): New static global.
3174 (detach_or_kill_for_exit_cleanup): New function.
3175 (main): New function. Original main renamed to...
3176 (captured_main): New function.
3177 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3178
ff55e1b5
GB
31792014-08-29 Gary Benson <gbenson@redhat.com>
3180
3181 * Makefile.in (SFILES): Add common/common-exceptions.c.
3182 (OBS): Add common-exceptions.o.
3183 (common-exceptions.o): New rule.
3184 * utils.c (prepare_to_throw_exception): New function.
3185
e9bcb658
GB
31862014-08-29 Gary Benson <gbenson@redhat.com>
3187
3188 * config.in: Regenerate.
3189 * configure: Likewise.
3190
e3180625
GB
31912014-08-29 Gary Benson <gbenson@redhat.com>
3192
3193 * Makefile.in (SFILES): Add common/cleanups.c.
3194 (OBS): cleanups.o.
3195 (cleanups.o): New rule.
3196
e3d6ba5d
GB
31972014-08-29 Gary Benson <gbenson@redhat.com>
3198
3199 * utils.c (internal_vwarning): New function.
3200
7096e886
GB
32012014-08-28 Gary Benson <gbenson@redhat.com>
3202
3203 * utils.h (fatal): Remove declaration.
3204 * utils.c (fatal): Remove function.
3205
14ce3192
GB
32062014-08-28 Gary Benson <gbenson@redhat.com>
3207
3208 * tracepoint.c (gdb_agent_init): Replace fatal with
3209 perror_with_name.
3210 (initialize_tracepoint): Likewise.
3211
50278d59
GB
32122014-08-28 Gary Benson <gbenson@redhat.com>
3213
3214 * remote-utils.c (remote_prepare): Replace fatal with error.
3215
aa96c426
GB
32162014-08-28 Gary Benson <gbenson@redhat.com>
3217
3218 * linux-low.c (linux_async): Replace fatal with warning.
3219 Tidy up and return.
3220 (linux_start_non_stop): Return -1 if linux_async failed.
3221
f7160e97
GB
32222014-08-28 Gary Benson <gbenson@redhat.com>
3223
3224 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3225 gdb_assert.
3226 (i386_dr_low_get_addr): Remove vague comment.
3227 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3228 gdb_assert.
3229
38e08fca
GB
32302014-08-28 Gary Benson <gbenson@redhat.com>
3231
3232 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3233 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3234 internal_error.
3235 (linux_resume_one_lwp): Likewise.
3236 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3237 gdb_assert.
3238 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3239 with internal_error.
3240 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3241 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3242 (find_register_by_name): Replace fatal with internal_error.
3243 (find_regno): Likewise.
3244 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3245 * thread-db.c (thread_db_create_event): Likewise.
3246 (thread_db_load_search): Likewise.
3247 (try_thread_db_load_1): Likewise.
3248 * tracepoint.c (get_jump_space_head): Replace fatal with
3249 internal_error.
3250 (claim_trampoline_space): Likewise.
3251 (have_fast_tracepoint_trampoline_buffer): Likewise.
3252 (cmd_qtstart): Likewise.
3253 (stop_tracing): Likewise.
3254 (fast_tracepoint_collecting): Likewise.
3255 (target_malloc): Likewise.
3256 (download_tracepoint): Likewise.
3257 (download_trace_state_variables): Replace check with gdb_assert.
3258 (upload_fast_traceframes): Replace fatal with internal_error.
3259
34abf635
GB
32602014-08-19 Tom Tromey <tromey@redhat.com>
3261 Gary Benson <gbenson@redhat.com>
3262
3263 * Makefile.in (SFILES): Add common/common-debug.c.
3264 (OBS): Add common-debug.o.
3265 (common-debug.o): New rule.
3266 * debug.h (debug_printf): Don't declare.
3267 * debug.c (debug_printf): Renamed and rewritten as...
3268 (debug_vprintf): New function.
3269
f6e94d78
GB
32702014-08-19 Gary Benson <gbenson@redhat.com>
3271
3272 * utils.h: Do not include print-utils.h.
3273
9239eeab
GB
32742014-08-19 Tom Tromey <tromey@redhat.com>
3275 Gary Benson <gbenson@redhat.com>
3276
3277 * server.h: Add static assertion.
3278 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3279
ef87c8bb
GB
32802014-08-19 Tom Tromey <tromey@redhat.com>
3281 Gary Benson <gbenson@redhat.com>
3282
3283 * Makefile.in (SFILES): Add common/errors.c.
3284 (OBS): Add errors.o.
3285 (IPA_OBS): Add errors-ipa.o.
3286 (errors.o): New rule.
3287 (errors-ipa.o): Likewise.
3288 * utils.h (perror_with_name, error, warning): Don't declare.
3289 * utils.c (warning): Renamed and rewritten as...
3290 (vwarning): New function.
3291 (error): Renamed and rewritten as...
3292 (verror): New function.
3293 (internal_error): Renamed and rewritten as...
3294 (internal_verror): New function.
3295
bb974a24
GB
32962014-08-07 Gary Benson <gbenson@redhat.com>
3297
3298 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3299 * configure: Regenerate.
3300 * config.in: Likewise.
3301 * server.h: Do not include errno.h.
3302 * event-loop.c: Likewise.
3303 * hostio-errno.c: Likewise.
3304 * linux-low.c: Likewise.
3305 * remote-utils.c: Likewise.
3306 * spu-low.c: Likewise.
3307 * utils.c: Likewise.
3308 * gdbreplay.c: Unconditionally include errno.h.
3309
6d3d12eb
GB
33102014-08-07 Gary Benson <gbenson@redhat.com>
3311
3312 * server.h: Do not include string.h.
3313 * event-loop.c: Likewise.
3314 * linux-low.c: Likewise.
3315 * regcache.c: Likewise.
3316 * remote-utils.c: Likewise.
3317 * spu-low.c: Likewise.
3318 * utils.c: Likewise.
3319
dccbb609
GB
33202014-08-07 Gary Benson <gbenson@redhat.com>
3321
3322 * server.h: Do not include gdb_assert.h.
3323
e76df0d0
GB
33242014-08-07 Gary Benson <gbenson@redhat.com>
3325
3326 * server.h: Do not include common-utils.h.
3327
4cb9c816
GB
33282014-08-07 Gary Benson <gbenson@redhat.com>
3329
3330 * server.h: Do not include ptid.h.
3331 * notif.h: Likewise.
3332
3995eeee
GB
33332014-08-07 Gary Benson <gbenson@redhat.com>
3334
3335 * server.h: Do not include gdb_locale.h.
3336
cb9f1a9b
GB
33372014-08-07 Gary Benson <gbenson@redhat.com>
3338
3339 * server.h: Do not include gdb/signals.h.
3340 * win32-low.c: Likewise.
3341
a5fceff8
GB
33422014-08-07 Gary Benson <gbenson@redhat.com>
3343
3344 * server.h: Do not include pathmax.h.
3345
b9391142
GB
33462014-08-07 Gary Benson <gbenson@redhat.com>
3347
3348 * server.h: Do not include libiberty.h.
3349 * linux-bfin-low.c: Likewise.
3350
0e443c87
GB
33512014-08-07 Gary Benson <gbenson@redhat.com>
3352
3353 * server.h: Do not include ansidecl.h.
3354
8ebb3f56
GB
33552014-08-07 Gary Benson <gbenson@redhat.com>
3356
3357 * linux-x86-low.c: Do not include stddef.h.
3358 * lynx-ppc-low.c: Likewise.
3359 * tracepoint.c: Likewise.
3360
8980bdf6
GB
33612014-08-07 Gary Benson <gbenson@redhat.com>
3362
3363 * server.h: Do not include stdarg.h.
3364 * nto-low.c: Likewise.
3365
d7096f71
GB
33662014-08-07 Gary Benson <gbenson@redhat.com>
3367
3368 * server.h: Do not include stdlib.h.
3369 * inferiors.c: Likewise.
3370 * linux-low.c: Likewise.
3371 * regcache.c: Likewise.
3372 * spu-low.c: Likewise.
3373 * tracepoint.c: Likewise.
3374 * utils.c: Likewise.
3375
d02f550d
GB
33762014-08-07 Gary Benson <gbenson@redhat.com>
3377
3378 * server.h: Do not include stdio.h.
3379 * linux-low.c: Likewise.
3380 * remote-utils.c: Likewise.
3381 * spu-low.c: Likewise.
3382 * utils.c: Likewise.
3383 * wincecompat.c: Likewise.
3384
87f6c4e3
GB
33852014-08-06 Gary Benson <gbenson@redhat.com>
3386
3387 * regcache.c (init_register_cache): Move conditionals inside if.
3388
7089dca4
GB
33892014-08-06 Gary Benson <gbenson@redhat.com>
3390
3391 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3392
462f517e
GB
33932014-07-31 Gary Benson <gbenson@redhat.com>
3394
3395 * ax.h: Do not include server.h.
3396 * gdbthread.h: Likewise.
3397 * lynx-low.h: Likewise.
3398 * notif.h: Likewise.
3399
976411d6
GB
34002014-07-30 Gary Benson <gbenson@redhat.com>
3401
3402 * server.h: Include common-defs.h.
3403 Do not include config.h or build-gnulib-gdbserver/config.h.
3404
d41f6d8e
GB
34052014-07-30 Gary Benson <gbenson@redhat.com>
3406
3407 * hostio-errno.c: Move server.h to top of includes list.
3408 * inferiors.c: Likewise.
3409 * linux-x86-low.c: Likewise.
3410 * notif.c: Include server.h.
3411
314c6a35
TT
34122014-07-24 Tom Tromey <tromey@redhat.com>
3413 Gary Benson <gbenson@redhat.com>
3414
3415 * server.h (CORE_ADDR): Now unsigned.
3416
69ff6be5
PA
34172014-07-16 Pedro Alves <palves@redhat.com>
3418
3419 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3420
ce9e3fe7
PA
34212014-07-15 Pedro Alves <palves@redhat.com>
3422
3423 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3424 copy.
3425
e76126e8
PA
34262014-07-11 Pedro Alves <palves@redhat.com>
3427
3428 * linux-low.c (kill_wait_lwp): New function, based on
3429 kill_one_lwp_callback, but use my_waitpid directly.
3430 (kill_one_lwp_callback, linux_kill): Use it.
3431
8e9db26e
PA
34322014-06-23 Pedro Alves <palves@redhat.com>
3433
3434 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3435 before setting DR0..DR3.
3436
698b3e08
GB
34372014-06-20 Gary Benson <gbenson@redhat.com>
3438
3439 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3440 * configure: Regenerated.
3441 * config.in: Likewise.
3442
125f8a3d
GB
34432014-06-20 Gary Benson <gbenson@redhat.com>
3444
3445 * Makefile.in (SFILES): Update locations for files moved
3446 from common to nat.
3447 (object file files): Reordered.
3448
42995dbd
GB
34492014-06-20 Gary Benson <gbenson@redhat.com>
3450
3451 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3452 (i386_dr_low_set_addr): Likewise.
3453 (i386_dr_low_get_addr): Likewise.
3454 (i386_dr_low_can_set_control): Likewise.
3455 (i386_dr_low_set_control): Likewise.
3456 (i386_dr_low_get_control): Likewise.
3457 (i386_dr_low_get_status): Likewise.
3458 (i386_get_debug_register_length): Likewise.
3459 * linux-x86-low.c (i386_dr_low_set_addr):
3460 Changed signature. Made static.
3461 (i386_dr_low_get_addr): Likewise.
3462 (i386_dr_low_set_control): Likewise.
3463 (i386_dr_low_get_control): Likewise.
3464 (i386_dr_low_get_status): Likewise.
3465 (i386_dr_low): New global variable.
3466 * win32-i386-low.c (i386_dr_low_set_addr):
3467 Changed signature. Made static.
3468 (i386_dr_low_get_addr): Likewise.
3469 (i386_dr_low_set_control): Likewise.
3470 (i386_dr_low_get_control): Likewise.
3471 (i386_dr_low_get_status): Likewise.
3472 (i386_dr_low): New global variable.
3473
e1d2394b
MS
34742014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3475
3476 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3477 * Makefile.in (AR, AR_FLAGS): Define.
3478 * configure: Regenerate.
3479
3a8ee006
GB
34802014-06-19 Gary Benson <gbenson@redhat.com>
3481
3482 * Makefile.in (i386-dregs.o): New rule.
3483 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3484 * i386-low.c (target.h): Remove include.
3485 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3486 (DR_CONTROL_SHIFT): Likewise.
3487 (DR_CONTROL_SIZE): Likewise.
3488 (DR_RW_EXECUTE): Likewise.
3489 (DR_RW_WRITE): Likewise.
3490 (DR_RW_READ): Likewise.
3491 (DR_RW_IORW): Likewise.
3492 (DR_LEN_1): Likewise.
3493 (DR_LEN_2): Likewise.
3494 (DR_LEN_4): Likewise.
3495 (DR_LEN_8): Likewise.
3496 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3497 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3498 (DR_ENABLE_SIZE): Likewise.
3499 (DR_LOCAL_SLOWDOWN): Likewise.
3500 (DR_GLOBAL_SLOWDOWN): Likewise.
3501 (DR_CONTROL_RESERVED): Likewise.
3502 (I386_DR_CONTROL_MASK): Likewise.
3503 (I386_DR_VACANT): Likewise.
3504 (I386_DR_LOCAL_ENABLE): Likewise.
3505 (I386_DR_GLOBAL_ENABLE): Likewise.
3506 (I386_DR_DISABLE): Likewise.
3507 (I386_DR_SET_RW_LEN): Likewise.
3508 (I386_DR_GET_RW_LEN): Likewise.
3509 (I386_DR_WATCH_HIT): Likewise.
3510 (i386_wp_op_t): Likewise.
3511 (i386_show_dr): Likewise.
3512 (i386_length_and_rw_bits): Likewise.
3513 (i386_insert_aligned_watchpoint): Likewise.
3514 (i386_remove_aligned_watchpoint): Likewise.
3515 (i386_handle_nonaligned_watchpoint): Likewise.
3516 i386_update_inferior_debug_regs(): Likewise.
3517 (i386_dr_insert_watchpoint): Likewise.
3518 (i386_dr_remove_watchpoint): Likewise.
3519 (i386_dr_region_ok_for_watchpoint): Likewise.
3520 (i386_dr_stopped_data_address): Likewise.
3521 (i386_dr_stopped_by_watchpoint): Likewise.
3522
8f26655c
GB
35232014-06-19 Gary Benson <gbenson@redhat.com>
3524
3525 * i386-low.c (i386_dr_show): Renamed to
3526 i386_show_dr and made static. All uses updated.
3527 (i386_dr_length_and_rw_bits): Renamed to
3528 i386_length_and_rw_bits and made static.
3529 All uses updated.
3530 (i386_dr_insert_aligned_watchpoint): Renamed to
3531 i386_insert_aligned_watchpoint and made static.
3532 All uses updated.
3533 (i386_dr_remove_aligned_watchpoint): Renamed to
3534 i386_remove_aligned_watchpoint and made static.
3535 All uses updated.
3536 (i386_dr_update_inferior_debug_regs): Renamed to
3537 i386_update_inferior_debug_regs and made static.
3538 All uses updated.
3539
b9228891
GB
35402014-06-18 Gary Benson <gbenson@redhat.com>
3541
5171def3
GB
3542 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3543 (i386_dr_low_can_set_control): Likewise.
3544 (i386_get_debug_register_length): Likewise.
3545 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3546 (i386_dr_low_can_set_control): Likewise.
3547 (i386_get_debug_register_length): Likewise.
3548
35492014-06-17 Gary Benson <gbenson@redhat.com>
3550
b9228891
GB
3551 * i386-low.h (i386-dregs.h): New include.
3552 (DR_FIRSTADDR): Now in i386-dregs.h.
3553 (DR_LASTADDR): Likewise.
3554 (DR_NADDR): Likewise.
3555 (DR_STATUS): Likewise.
3556 (DR_CONTROL): Likewise.
3557 (i386_debug_reg_state): Likewise.
3558 (i386_dr_insert_watchpoint): Likewise.
3559 (i386_dr_remove_watchpoint): Likewise.
3560 (i386_dr_region_ok_for_watchpoint): Likewise.
3561 (i386_dr_stopped_data_address): Likewise.
3562 (i386_dr_stopped_by_watchpoint): Likewise.
3563 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3564
4be83cc2
GB
35652014-06-18 Gary Benson <gbenson@redhat.com>
3566
3567 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3568 i386_dr_insert_watchpoint.
3569 (i386_low_remove_watchpoint): Renamed to
3570 i386_dr_remove_watchpoint.
3571 (i386_low_region_ok_for_watchpoint): Renamed to
3572 i386_dr_region_ok_for_watchpoint.
3573 (i386_low_stopped_data_address): Renamed to
3574 i386_dr_stopped_data_address.
3575 (i386_low_stopped_by_watchpoint): Renamed to
3576 i386_dr_stopped_by_watchpoint.
3577 * i386-low.c (i386_show_dr): Renamed to
3578 i386_dr_show and made nonstatic. All uses updated.
3579 (i386_length_and_rw_bits): Renamed to
3580 i386_dr_length_and_rw_bits and made nonstatic.
3581 All uses updated.
3582 (i386_insert_aligned_watchpoint): Renamed to
3583 i386_dr_insert_aligned_watchpoint and made nonstatic.
3584 All uses updated.
3585 (i386_remove_aligned_watchpoint): Renamed to
3586 i386_dr_remove_aligned_watchpoint and made nonstatic.
3587 All uses updated.
3588 (i386_update_inferior_debug_regs): Renamed to
3589 i386_dr_update_inferior_debug_regs and made nonstatic.
3590 All uses updated.
3591 (i386_low_insert_watchpoint): Renamed to
3592 i386_dr_insert_watchpoint. All uses updated.
3593 (i386_low_remove_watchpoint): Renamed to
3594 i386_dr_remove_watchpoint. All uses updated.
3595 (i386_low_region_ok_for_watchpoint): Renamed to
3596 i386_dr_region_ok_for_watchpoint. All uses updated.
3597 (i386_low_stopped_data_address): Renamed to
3598 i386_dr_stopped_data_address. All uses updated.
3599 (i386_low_stopped_by_watchpoint): Renamed to
3600 i386_dr_stopped_by_watchpoint. All uses updated.
3601
131aa0d4
GB
36022014-06-18 Gary Benson <gbenson@redhat.com>
3603
3604 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3605 (i386_dr_low_can_set_control): Likewise.
3606 (i386_insert_aligned_watchpoint): New check.
3607
d9305f7f
GB
36082014-06-18 Gary Benson <gbenson@redhat.com>
3609
3610 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3611 Renamed to state.
3612
e927c9fc
GB
36132014-06-18 Gary Benson <gbenson@redhat.com>
3614
3615 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3616 instead of fatal and error.
3617 (i386_handle_nonaligned_watchpoint): Likewise.
3618
1b6d4134
GB
36192014-06-18 Gary Benson <gbenson@redhat.com>
3620
3621 * i386-low.c (i386_get_debug_register_length): New macro.
3622 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3623 (i386_show_dr): Use debug_printf instead of fprintf. Use
3624 phex to format values.
3625
6e62758f
GB
36262014-06-18 Gary Benson <gbenson@redhat.com>
3627
3628 * i386-low.h: Comment changes.
3629 * i386-low.c: Likewise.
3630
fc6e2f03
GB
36312014-06-18 Gary Benson <gbenson@redhat.com>
3632
3633 * i386-low.c: Whitespace changes.
3634
f9d1eeed
TT
36352014-06-12 Tom Tromey <tromey@redhat.com>
3636
3637 * utils.c (freeargv): Remove.
3638
0b04e523
TT
36392014-06-12 Tom Tromey <tromey@redhat.com>
3640
3641 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3642 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3643 (parse_debug_format_options): Likewise.
3644 (gdbserver_usage): Likewise.
3645 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3646 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3647 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3648 against libiberty.
3649 ($(LIBGNU)): Depend on libiberty.
3650 (all-lib): Recurse into all subdirs.
3651 (install-only): Invoke "install" target in subdirs.
3652 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3653 targets.
3654 * configure: Rebuild.
3655 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3656 for vasprintf, vsnprintf, or gettimeofday.
3657 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3658 srv_tgtobj.
3659
270c9937
JB
36602014-06-05 Joel Brobecker <brobecker@adacore.com>
3661
3662 * development.sh: Delete.
3663 * Makefile.in (config.status): Adjust dependency on development.sh.
3664 * configure.ac: Adjust development.sh source call.
3665 * configure: Regenerate.
3666
0a261ed8
PA
36672014-06-02 Pedro Alves <palves@redhat.com>
3668
3669 * ax.c (gdb_free_agent_expr): New function.
3670 * ax.h (gdb_free_agent_expr): New declaration.
3671 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3672 list.
3673 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3674 static.
3675 (clear_breakpoint_conditions_and_commands): New function.
3676 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3677 (clear_breakpoint_conditions_and_commands): New declaration.
3678
e9dae05e
RR
36792014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3680
3681 * linux-aarch64-low.c (asm/ptrace.h): Include.
3682
5876f503
JK
36832014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3684
3685 Fix TLS access for -static -pthread.
3686 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3687 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3688 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3689
802e8e6d
PA
36902014-05-20 Pedro Alves <palves@redhat.com>
3691
3692 * linux-aarch64-low.c (aarch64_insert_point)
3693 (aarch64_remove_point): No longer check whether the type is
3694 supported here. Adjust to new interface.
3695 (the_low_target): Install aarch64_supports_z_point_type as
3696 supports_z_point_type method.
3697 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3698 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3699 instead of a Z packet char. Adjust.
3700 (arm_supports_z_point_type): New function.
3701 (arm_insert_point, arm_remove_point): Adjust to new interface.
3702 (the_low_target): Install arm_supports_z_point_type.
3703 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3704 (cris_insert_point, cris_remove_point): Adjust to new interface.
3705 Don't check whether the type is supported here.
3706 (the_low_target): Install cris_supports_z_point_type.
3707 * linux-low.c (linux_supports_z_point_type): New function.
3708 (linux_insert_point, linux_remove_point): Adjust to new interface.
3709 * linux-low.h (struct linux_target_ops) <insert_point,
3710 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3711 raw_breakpoint pointer parameter.
3712 <supports_z_point_type>: New method.
3713 * linux-mips-low.c (mips_supports_z_point_type): New function.
3714 (mips_insert_point, mips_remove_point): Adjust to new interface.
3715 Use mips_supports_z_point_type.
3716 (the_low_target): Install mips_supports_z_point_type.
3717 * linux-ppc-low.c (the_low_target): Install NULL as
3718 supports_z_point_type method.
3719 * linux-s390-low.c (the_low_target): Install NULL as
3720 supports_z_point_type method.
3721 * linux-sparc-low.c (the_low_target): Install NULL as
3722 supports_z_point_type method.
3723 * linux-x86-low.c (x86_supports_z_point_type): New function.
3724 (x86_insert_point): Adjust to new insert_point interface. Use
3725 insert_memory_breakpoint. Adjust to new
3726 i386_low_insert_watchpoint interface.
3727 (x86_remove_point): Adjust to remove_point interface. Use
3728 remove_memory_breakpoint. Adjust to new
3729 i386_low_remove_watchpoint interface.
3730 (the_low_target): Install x86_supports_z_point_type.
3731 * lynx-low.c (lynx_target_ops): Install NULL as
3732 supports_z_point_type callback.
3733 * nto-low.c (nto_supports_z_point_type): New.
3734 (nto_insert_point, nto_remove_point): Adjust to new interface.
3735 (nto_target_ops): Install nto_supports_z_point_type.
3736 * mem-break.c: Adjust intro comment.
3737 (struct raw_breakpoint) <raw_type, size>: New fields.
3738 <inserted>: Update comment.
3739 <shlib_disabled>: Delete field.
3740 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3741 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3742 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3743 (raw_bkpt_type_to_target_hw_bp_type): New function.
3744 (find_enabled_raw_code_breakpoint_at): New function.
3745 (find_raw_breakpoint_at): New type and size parameters. Use them.
3746 (insert_memory_breakpoint): New function, based off
3747 set_raw_breakpoint_at.
3748 (remove_memory_breakpoint): New function.
3749 (set_raw_breakpoint_at): Reimplement.
3750 (set_breakpoint): New, based on set_breakpoint_at.
3751 (set_breakpoint_at): Reimplement.
3752 (delete_raw_breakpoint): Go through the_target->remove_point
3753 instead of assuming memory breakpoints.
3754 (find_gdb_breakpoint_at): Delete.
3755 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3756 (find_gdb_breakpoint): New function.
3757 (set_gdb_breakpoint_at): Delete.
3758 (z_type_supported): New function.
3759 (set_gdb_breakpoint_1): New function, loosely based off
3760 set_gdb_breakpoint_at.
3761 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3762 (delete_gdb_breakpoint_at): Delete.
3763 (delete_gdb_breakpoint_1): New function, loosely based off
3764 delete_gdb_breakpoint_at.
3765 (delete_gdb_breakpoint): New function.
3766 (clear_gdb_breakpoint_conditions): Rename to ...
3767 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3768 breakpoint.
3769 (add_condition_to_breakpoint): Make static.
3770 (add_breakpoint_condition): Take a struct breakpoint pointer
3771 instead of an address. Adjust.
3772 (gdb_condition_true_at_breakpoint): Rename to ...
3773 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3774 z_type parameter.
3775 (gdb_condition_true_at_breakpoint): Reimplement.
3776 (add_breakpoint_commands): Take a struct breakpoint pointer
3777 instead of an address. Adjust.
3778 (gdb_no_commands_at_breakpoint): Rename to ...
3779 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3780 parameter. Return true if no breakpoint was found. Change debug
3781 output.
3782 (gdb_no_commands_at_breakpoint): Reimplement.
3783 (run_breakpoint_commands): Rename to ...
3784 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3785 and change return type to boolean.
3786 (run_breakpoint_commands): New function.
3787 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3788 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3789 breakpoint. Go through the_target->remove_point instead of
3790 assuming memory breakpoint.
3791 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3792 software and hardware breakpoints.
3793 (reinsert_raw_breakpoint): Go through the_target->insert_point
3794 instead of assuming memory breakpoint.
3795 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3796 software and hardware breakpoints.
3797 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3798 Check both software and hardware breakpoints.
3799 (validate_inserted_breakpoint): Assert the breakpoint is a
3800 software breakpoint. Set the inserted flag to -1 instead of
3801 setting shlib_disabled.
3802 (delete_disabled_breakpoints): Adjust.
3803 (validate_breakpoints): Only validate software breakpoints.
3804 Adjust to inserted flag change.
3805 (check_mem_read, check_mem_write): Skip breakpoint types other
3806 than software breakpoints. Adjust to inserted flag change.
3807 * mem-break.h (enum raw_bkpt_type): New enum.
3808 (raw_breakpoint, struct process_info): Forward declare.
3809 (Z_packet_to_target_hw_bp_type): Delete declaration.
3810 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3811 (set_gdb_breakpoint, delete_gdb_breakpoint)
3812 (clear_breakpoint_conditions): New declarations.
3813 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3814 (breakpoint_inserted_here): Update comment.
3815 (add_breakpoint_condition, add_breakpoint_commands): Replace
3816 address parameter with a breakpoint pointer parameter.
3817 (gdb_breakpoint_here): Update comment.
3818 (delete_gdb_breakpoint_at): Delete.
3819 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3820 * server.c (process_point_options): Take a struct breakpoint
3821 pointer instead of an address. Adjust.
3822 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3823 delete_gdb_breakpoint.
3824 * spu-low.c (spu_target_ops): Install NULL as
3825 supports_z_point_type method.
3826 * target.h: Include mem-break.h.
3827 (struct target_ops) <prepare_to_access_memory>: Update comment.
3828 <supports_z_point_type>: New field.
3829 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3830 instead of a char. Also take a raw breakpoint pointer.
3831 * win32-arm-low.c (the_low_target): Install NULL as
3832 supports_z_point_type.
3833 * win32-i386-low.c (i386_supports_z_point_type): New function.
3834 (i386_insert_point, i386_remove_point): Adjust to new interface.
3835 (the_low_target): Install i386_supports_z_point_type.
3836 * win32-low.c (win32_supports_z_point_type): New function.
3837 (win32_insert_point, win32_remove_point): Adjust to new interface.
3838 (win32_target_ops): Install win32_supports_z_point_type.
3839 * win32-low.h (struct win32_target_ops):
3840 <supports_z_point_type>: New method.
3841 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3842 instead of a char. Also take a raw breakpoint pointer.
3843
932539e3
PA
38442014-05-20 Pedro Alves <palves@redhat.com>
3845
3846 * mem-break.h: Include break-common.h.
3847 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3848 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3849 (Z_packet_to_target_hw_bp_type): New declaration.
3850 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3851 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3852 (Z_PACKET_ACCESS_WP): Delete macros.
3853 (Z_packet_to_hw_type): Delete function.
3854 * i386-low.h: Don't include break-common.h here.
3855 (Z_packet_to_hw_type): Delete declaration.
3856 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3857 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3858 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3859 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3860 * linux-aarch64-low.c: Don't include break-common.h here.
3861 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3862 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3863 (Z_packet_to_target_hw_bp_type): Delete function.
3864 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3865 function.
3866 (mips_insert_point, mips_remove_point): Use
3867 Z_packet_to_target_hw_bp_type.
3868
4ff0d3d8
PA
38692014-05-20 Pedro Alves <palves@redhat.com>
3870
3871 * linux-aarch64-low.c: Include break-common.h.
3872 (enum target_point_type): Delete.
3873 (Z_packet_to_point_type): Rename to ...
3874 (Z_packet_to_target_hw_bp_type): ... this, and return a
3875 target_hw_bp_type instead.
3876 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3877 instead of an enum target_point_type.
3878 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3879 breakpoint type.
3880 (aarch64_dr_state_insert_one_point)
3881 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3882 (aarch64_handle_aligned_watchpoint)
3883 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3884 Take an enum target_hw_bp_type instead of an enum
3885 target_point_type.
3886 (aarch64_supports_z_point_type): New function.
3887 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3888 use Z_packet_to_target_hw_bp_type.
3889
786dc519
JB
38902014-05-20 Joel Brobecker <brobecker@adacore.com>
3891
3892 * configure.ac: Only use -Werror by default when DEVELOPMENT
3893 is true.
3894 * configure: Regenerate.
3895
9e0aa64f
JK
38962014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3897
3898 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3899 * linux-x86-low.c (X86_64_USER_REGS): New.
3900 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3901
2b577b92
YQ
39022014-04-28 Yao Qi <yao@codesourcery.com>
3903
3904 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3905 name.
3906
94611da2
PA
39072014-04-25 Pedro Alves <palves@redhat.com>
3908
3909 PR server/16255
3910 * linux-low.c (linux_attach_fail_reason_string): New function.
3911 (linux_attach_lwp): Delete.
3912 (linux_attach_lwp_1): Rename to ...
3913 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3914 argument. Remove "initial" parameter. Return int instead of
3915 void. Don't error or warn here.
3916 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3917 failure to attach to the tgid. Call warning when failing to
3918 attach to an lwp.
3919 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3920 argument. Remove "initial" parameter. Return int instead of
3921 void. Don't error or warn here.
3922 (linux_attach_fail_reason_string): New declaration.
3923 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3924 interface change. Use linux_attach_fail_reason_string.
3925
01f9f808
MS
39262014-04-24 Michael Sturm <michael.sturm@mintel.com>
3927 Walfred Tedeschi <walfred.tedeschi@intel.com>
3928
3929 * Makefile.in: Added rules to handle new files
3930 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3931 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3932 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3933 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3934 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3935 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3936 x32-avx512-linux.o.
3937 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3938 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3939 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3940 i386/x32-avx512.xml.
3941 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3942 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3943 i386/x32-avx512-linux.xml.
3944 * i387-fp.c (num_avx512_k_registers): New constant for number
3945 of K registers.
3946 (num_avx512_zmmh_low_registers): New constant for number of
3947 lower ZMM registers (0-15).
3948 (num_avx512_zmmh_high_registers): New constant for number of
3949 higher ZMM registers (16-31).
3950 (num_avx512_ymmh_registers): New contant for number of higher
3951 YMM registers (ymm16-31 added by avx521 on x86_64).
3952 (num_avx512_xmm_registers): New constant for number of higher
3953 XMM registers (xmm16-31 added by AVX512 on x86_64).
3954 (struct i387_xsave): Add space for AVX512 registers.
3955 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3956 Add code to handle AVX512 registers.
3957 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3958 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3959 prototypei from generated file.
3960 (tdesc_amd64_avx512_linux): Likewise.
3961 (init_registers_x32_avx512_linux): Likewise.
3962 (tdesc_x32_avx512_linux): Likewise.
3963 (init_registers_i386_avx512_linux): Likewise.
3964 (tdesc_i386_avx512_linux): Likewise.
3965 (x86_64_regmap): Add AVX512 registers.
3966 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3967 mask.
3968 (initialize_low_arch): Add code to initialize AVX512 registers.
3969
51aa91f9
PA
39702014-04-23 Pedro Alves <palves@redhat.com>
3971
3972 * mem-break.c (find_gdb_breakpoint_at): Make static.
3973 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3974
a4165e94
PA
39752014-04-23 Pedro Alves <palves@redhat.com>
3976
3977 * i386-low.c: Don't include break-common.h here.
3978 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3979 prototype to take target_hw_bp_type as argument instead of a Z
3980 packet char.
3981 * i386-low.h: Include break-common.h here.
3982 (Z_packet_to_hw_type): Declare.
3983 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3984 prototypes.
3985 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3986 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3987 (x86_remove_point): Convert the packet number to a
3988 target_hw_bp_type before calling i386_low_remove_watchpoint.
3989 * win32-i386-low.c (i386_insert_point): Convert the packet number
3990 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3991 (i386_remove_point): Convert the packet number to a
3992 target_hw_bp_type before calling i386_low_remove_watchpoint.
3993
b8acf843
PA
39942014-04-23 Pedro Alves <palves@redhat.com>
3995
3996 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3997
d708bcd1
PA
39982014-04-10 Pedro Alves <palves@redhat.com>
3999
4000 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4001 Check if the condition or command is NULL before checking if the
4002 breakpoint is known. On success, return true.
4003 * mem-break.h (add_breakpoint_condition): Document return.
4004 (add_breakpoint_commands): Add describing comment.
4005 * server.c (skip_to_semicolon): New function.
4006 (process_point_options): Use it.
4007
2eec7d5b
PA
40082014-04-09 Pedro Alves <palves@redhat.com>
4009
4010 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4011 to lwpid_of.
4012
fa96cb38
PA
40132014-02-27 Pedro Alves <palves@redhat.com>
4014
4015 PR 12702
4016 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4017 macros.
4018 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4019 output.
4020 (last_thread_of_process_p): Take a PID argument instead of a
4021 thread pointer.
4022 (linux_wait_for_lwp): Delete.
4023 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4024 functions.
4025 (linux_low_filter_event): New function, party factored out from
4026 linux_wait_for_event.
4027 (linux_wait_for_event): Rename to ...
4028 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4029 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4030 sigsuspend. Check for zombie leaders.
4031 (linux_wait_for_event): Reimplement as wrapper around
4032 linux_wait_for_event_filtered.
4033 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4034 a normal or signal exit is seen, it's the whole process exiting.
4035 (wait_for_sigstop): No longer a for_each_inferior callback.
4036 Rewrite on top of linux_wait_for_event_filtered.
4037 (stop_all_lwps): Call wait_for_sigstop directly.
4038 * server.c (resume, handle_target_event): Handle
4039 TARGET_WAITKIND_NO_RESUMED.
4040
d763de10
JB
40412014-02-26 Joel Brobecker <brobecker@adacore.com>
4042
4043 * win32-low.c (psapi_get_dll_name,
4044 * win32_CreateToolhelp32Snapshot): Delete.
4045 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4046 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4047 Delete.
4048 (handle_load_dll): Add function description.
4049 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4050
850a0f76
JB
40512014-02-26 Joel Brobecker <brobecker@adacore.com>
4052
4053 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4054 Add comment.
4055 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4056 base address when calling win32_add_one_solib.
4057 (handle_load_dll): Delete local variable load_addr.
4058 Remove 0x1000 offset applied to DLL base address when calling
4059 win32_add_one_solib.
4060 (handle_unload_dll): Add comment.
4061
f25b3fc3
JB
40622014-02-26 Joel Brobecker <brobecker@adacore.com>
4063
4064 * win32-low.c (win32_add_all_dlls): Renames
4065 win32_ensure_ntdll_loaded. Rewrite function documentation.
4066 Adjust implementation to always load all DLLs.
4067 Add 0x1000 offset to DLL base address when calling
4068 win32_add_one_solib.
4069 (child_initialization_done): New static global.
4070 (do_initial_child_stuff): Set child_initialization_done to
4071 zero during child initialization, and 1 after. Replace call
4072 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4073 Add comment.
4074 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4075 (handle_unload_dll): Add function documentation.
4076 (get_child_debug_event): Ignore load and unload DLL events
4077 during child initialization.
4078
d86d4aaf
DE
40792014-02-20 Doug Evans <dje@google.com>
4080
3bc32da3 4081 Remove global all_lwps.
d86d4aaf
DE
4082 * inferiors.h (ptid_of): Move here from linux-low.h.
4083 (pid_of, lwpid_of): Ditto.
4084 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4085 parameter is a struct thread_info * now.
4086 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4087 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4088 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4089 directly.
4090 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4091 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4092 * linux-arm-low.c (update_registers_callback): Update, "entry"
4093 parameter is a struct thread_info * now.
4094 Fetch lwpid from current_inferior directly.
4095 (arm_insert_point): Pass &all_threads to find_inferior instead of
4096 &all_lwps.
4097 (arm_remove_point): Ditto.
4098 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4099 (arm_prepare_to_resume): Fetch pid from thread.
4100 (arm_read_description): Fetch lwpid from current_inferior directly.
4101 * linux-low.c (all_lwps): Delete.
4102 (delete_lwp): Delete call to remove_inferior.
4103 (handle_extended_wait): Fetch lwpid from thread.
4104 (add_lwp): Don't set lwp->entry.id. Remove call to
4105 add_inferior_to_list.
4106 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4107 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4108 (kill_one_lwp_callback): Ditto.
4109 (linux_kill): Don't dereference NULL pointer.
4110 Fetch ptid,lwpid from thread.
4111 (get_detach_signal): Fetch ptid from thread.
4112 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4113 Simplify call to regcache_invalidate_thread.
4114 (delete_lwp_callback): Update, "entry" parameter is a
4115 struct thread_info * now. Fetch pid from thread.
4116 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4117 (status_pending_p_callback): Update, "entry" parameter is a
4118 struct thread_info * now. Fetch ptid from thread.
4119 (find_lwp_pid): Update, "entry" parameter is a
4120 struct thread_info * now.
4121 (linux_wait_for_lwp): Fetch pid from thread.
4122 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4123 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4124 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4125 (dequeue_one_deferred_signal): Ditto.
4126 (cancel_breakpoint): Fetch ptid from current_inferior.
4127 (linux_wait_for_event): Pass &all_threads to find_inferior,
4128 not &all_lwps. Fetch ptid, lwpid from thread.
4129 (count_events_callback): Update, "entry" parameter is a
4130 struct thread_info * now.
4131 (select_singlestep_lwp_callback): Ditto.
4132 (select_event_lwp_callback): Ditto.
4133 (cancel_breakpoints_callback): Ditto.
4134 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4135 not &all_lwps.
4136 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4137 (unsuspend_one_lwp): Update, "entry" parameter is a
4138 struct thread_info * now.
4139 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4140 not &all_lwps.
4141 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4142 Fetch lwpid from thread, not lwp.
4143 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4144 Pass &all_threads to find_inferior, not &all_lwps.
4145 (send_sigstop): Fetch lwpid from thread, not lwp.
4146 (send_sigstop_callback): Update, "entry" parameter is a
4147 struct thread_info * now.
4148 (suspend_and_send_sigstop_callback): Ditto.
4149 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4150 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4151 struct thread_info * now.
4152 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4153 from thread, lwp.
4154 (lwp_running): Update, "entry" parameter is a
4155 struct thread_info * now.
4156 (stop_all_lwps): Fetch ptid from thread.
4157 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4158 (linux_resume_one_lwp): Fetch lwpid from thread.
4159 (linux_set_resume_request): Update, "entry" parameter is a
4160 struct thread_info * now. Fetch pid, lwpid from thread.
4161 (resume_status_pending_p): Update, "entry" parameter is a
4162 struct thread_info * now.
4163 (need_step_over_p): Ditto. Fetch lwpid from thread.
4164 (start_step_over): Fetch lwpid from thread.
4165 (linux_resume_one_thread): Update, "entry" parameter is a
4166 struct thread_info * now. Fetch lwpid from thread.
4167 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4168 (proceed_one_lwp): Update, "entry" parameter is a
4169 struct thread_info * now. Fetch lwpid from thread.
4170 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4171 struct thread_info * now.
4172 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4173 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4174 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4175 directly.
4176 (regsets_store_inferior_registers): Ditto.
4177 (fetch_register, store_register): Ditto.
4178 (linux_read_memory, linux_write_memory): Ditto.
4179 (linux_request_interrupt): Ditto.
4180 (linux_read_auxv): Ditto.
4181 (linux_xfer_siginfo): Ditto.
4182 (linux_qxfer_spu): Ditto.
4183 (linux_qxfer_libraries_svr4): Ditto.
4184 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4185 moved to inferiors.h.
4186 (get_lwp): Delete.
4187 (get_thread_lwp): Update.
4188 (struct lwp_info): Delete member "entry". Simplify comment for
4189 member "thread".
4190 (all_lwps): Delete.
4191 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4192 current_inferior directly.
4193 (update_watch_registers_callback): Update, "entry" parameter is a
4194 struct thread_info * now. Fetch pid from thread.
4195 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4196 (mips_insert_point): Fetch lwpid from current_inferior.
4197 Pass &all_threads to find_inferior, not &all_lwps.
4198 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4199 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4200 directly.
4201 (mips_stopped_data_address): Ditto.
4202 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4203 directly.
4204 * linux-tile-low.c (tile_arch_setup): Ditto.
4205 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4206 (update_debug_registers_callback): Update, "entry" parameter is a
4207 struct thread_info * now. Fetch pid from thread.
4208 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4209 Pass &all_threads to find_inferior, not &all_lwps.
4210 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4211 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4212 Pass &all_threads to find_inferior, not &all_lwps.
4213 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4214 (i386_dr_low_get_status): Ditto.
4215 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4216 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4217 (x86_linux_read_description): Ditto.
4218 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4219
3b8361aa
DE
42202014-02-20 Doug Evans <dje@google.com>
4221
4222 * inferiors.c (get_first_inferior): Fix buglet.
4223
f7667f0d
DE
42242014-02-19 Doug Evans <dje@google.com>
4225
4226 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4227 * inferiors.c (add_thread): Change result type to struct thread_info *.
4228 All callers updated.
4229 (add_lwp): Call add_thread here instead of in callers.
4230 All callers updated.
4231 * linux-low.h (get_lwp_thread): Rewrite.
4232 (struct lwp_info): New member "thread".
4233
b3312d80
DE
42342014-02-19 Doug Evans <dje@google.com>
4235
4236 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4237 All callers updated.
4238
ecc6f45c
DE
42392014-02-19 Doug Evans <dje@google.com>
4240
4241 * inferiors.c (add_thread): Fix whitespace.
4242
649ebbca
DE
42432014-02-19 Doug Evans <dje@google.com>
4244
4245 * dll.c (clear_dlls): Replace accessing list implemention details
4246 with API function.
4247 * gdbthread.h (get_first_thread): Declare.
4248 * inferiors.c (for_each_inferior_with_data): New function.
4249 (get_first_thread): New function.
4250 (find_thread_ptid): Simplify.
4251 (get_first_inferior): New function.
4252 (clear_list): Delete.
4253 (one_inferior_p): New function.
4254 (clear_inferior_list): New function.
4255 (clear_inferiors): Update.
4256 * inferiors.h (for_each_inferior_with_data): Declare.
4257 (clear_inferior_list): Declare.
4258 (one_inferior_p): Declare.
4259 (get_first_inferior): Declare.
4260 * linux-low.c (linux_wait_for_event): Replace accessing list
4261 implemention details with API function.
4262 * server.c (target_running): Ditto.
4263 (accumulate_file_name_length): New function.
4264 (emit_dll_description): New function.
4265 (handle_qxfer_libraries): Replace accessing list implemention
4266 details with API function.
4267 (handle_qxfer_threads_worker): New function.
4268 (handle_qxfer_threads_proper): Replace accessing list implemention
4269 details with API function.
4270 (handle_query): Ditto.
4271 (visit_actioned_threads_callback_ftype): New typedef.
4272 (visit_actioned_threads_data): New struct.
4273 (visit_actioned_threads): Rewrite to be find_inferior callback.
4274 (resume): Call find_inferior.
4275 (handle_status): Replace accessing list implemention
4276 details with API function.
4277 (process_serial_event): Replace accessing list implemention details
4278 with API function.
4279 * target.c (set_desired_inferior): Replace accessing list implemention
4280 details with API function.
4281 * tracepoint.c (same_process_p): New function.
4282 (gdb_agent_about_to_close): Replace accessing list implemention
4283 details with API function.
4284 * win32-low.c (child_delete_thread): Replace accessing list
4285 implemention details with API function.
4286 (match_dll_by_basename): New function.
4287 (dll_is_loaded_by_basename): New function.
4288 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4289 details call to dll_is_loaded_by_basename.
4290
80894984
DE
42912014-02-19 Doug Evans <dje@google.com>
4292
4293 * dll.h (struct dll_info): Add comment.
4294 * gdbthread.h (struct thread_info): Add comment.
4295 (current_ptid): Simplify.
4296 * inferiors.c (add_process): Update.
4297 (remove_process): Update.
4298 * inferiors.h (struct process_info): Rename member "head" to "entry".
4299 * linux-low.c (delete_lwp): Update.
4300 (add_lwp): Update.
4301 (last_thread_of_process_p): Update.
4302 (kill_one_lwp_callback, linux_kill): Update.
4303 (status_pending_p_callback): Update.
4304 (wait_for_sigstop): Update. Simplify read of ptid.
4305 (start_step_over): Update.
4306 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4307 (get_lwp_thread): Update.
4308 (struct lwp_info): Rename member "head" to "entry".
4309 * regcache.h (inferior_list_entry): Delete.
4310 * server.c (kill_inferior_callback): Update.
4311 (detach_or_kill_inferior_callback): Update.
4312 (print_started_pid): Update.
4313 (print_attached_pid): Update.
4314 (process_serial_event): Simplify read of ptid.
4315 * thread-db.c (thread_db_create_event): Update.
4316 (thread_db_get_tls_address): Update.
4317 * win32-low.c (current_inferior_ptid): Simplify.
4318
46917d26
TT
43192014-02-19 Tom Tromey <tromey@redhat.com>
4320
4321 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4322 argument.
4323 (target_supports_btrace): Update.
4324
0759a81e
YQ
43252014-02-14 Yao Qi <yao@codesourcery.com>
4326
4327 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4328 (rsp-low-ipa.o): New target.
4329
a7191e8b
TT
43302014-02-12 Tom Tromey <tromey@redhat.com>
4331
4332 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4333 convert_ascii_to_int.
4334 * regcache.c (registers_to_string): Likewise.
4335 * remote-utils.c (decode_M_packet): Likewise.
4336 * server.c (process_serial_event): Likewise.
4337
ff0e980e
TT
43382014-02-12 Tom Tromey <tromey@redhat.com>
4339
4340 * server.c (handle_query, handle_v_run): Use hex2bin, not
4341 unhexify.
4342 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4343
e9371aff
TT
43442014-02-12 Tom Tromey <tromey@redhat.com>
4345
4346 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4347 convert_int_to_ascii.
4348 * regcache.c (registers_to_string, collect_register_as_string):
4349 Likewise.
4350 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4351 Likewise.
4352 * server.c (process_serial_event): Likewise.
4353 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4354 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4355
971dc0b8
TT
43562014-02-12 Tom Tromey <tromey@redhat.com>
4357
4358 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4359 bin2hex, not hexify.
4360 * tracepoint.c (cmd_qtstatus): Likewise.
4361
0a822afb
TT
43622014-02-12 Tom Tromey <tromey@redhat.com>
4363
4364 * remote-utils.c (monitor_output): Pass explicit length to
4365 hexify.
4366
9c3d6531
TT
43672014-02-12 Tom Tromey <tromey@redhat.com>
4368
4369 * tracepoint.c: Include rsp-low.h.
4370 * server.c: Include rsp-low.h.
4371 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4372 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4373 declare.
4374 * remote-utils.c: Include rsp-low.h.
4375 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4376 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4377 (convert_int_to_ascii, convert_ascii_to_int): Move to
4378 common/rsp-low.c.
4379 * regcache.c: Include rsp-low.h.
4380 * ax.c: Include rsp-low.h.
4381 * Makefile.in (SFILES): Add common/rsp-low.c.
4382 (OBS): Add rsp-low.o.
4383 (rsp-low.o): New target.
4384
01fd3ea5
TT
43852014-02-12 Tom Tromey <tromey@redhat.com>
4386
4387 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4388 Include print-utils.h.
4389 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4390 (plongest, thirty_two, phex_nz): Remove.
4391 * Makefile.in (SFILES): Add common/print-utils.c.
4392 (OBS): Add print-utils.o.
4393 (print-utils-ipa.o): New target.
4394 (print-utils.o): New target.
4395 (IPA_OBJS): Add print-utils-ipa.o.
4396
e99dc820
TT
43972014-02-06 Tom Tromey <tromey@redhat.com>
4398
4399 * Makefile.in (SFILES): Fix indentation.
4400
ee1e2d4f
DE
44012014-02-05 Doug Evans <dje@google.com>
4402
4403 * linux-low.c (linux_wait_for_event): Improve comment.
4404 (linux_wait_1): Keep current_inferior in sync with event_child.
4405
f5a02773
DE
44062014-01-22 Doug Evans <dje@google.com>
4407
4408 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4409
87ce2a04
DE
44102014-01-22 Doug Evans <dje@google.com>
4411
4412 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4413 * configure: Regenerate.
4414 * config.in: Regenerate.
4415 * Makefile.in (SFILES): Add debug.c.
4416 (OBS): Add debug.o.
4417 * debug.c: New file.
4418 * debug.h: New file.
4419 * linux-aarch64-low.c (*): Update all debugging printfs to use
4420 debug_printf instead of fprintf.
4421 * linux-arm-low.c (*): Ditto.
4422 * linux-cris-low.c (*): Ditto.
4423 * linux-crisv32-low.c (*): Ditto.
4424 * linux-m32r-low.c (*): Ditto.
4425 * linux-sparc-low.c (*): Ditto.
4426 * linux-x86.c (*): Ditto.
4427 * linux-low.c (*): Ditto.
4428 (linux_wait_1): Add calls to debug_enter, debug_exit.
4429 (linux_wait): Remove redundant debugging printf.
4430 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4431 (linux_resume, unstop_all_lwps): Ditto.
4432 * mem-break.c (*): Update all debugging printfs to use
4433 debug_printf instead of fprintf.
4434 * remote-utils.c (*): Ditto.
4435 * thread-db.c (*): Ditto.
4436 * server.c #include <ctype.h>, "gdb_vecs.h".
4437 (debug_threads): Moved to debug.c.
4438 (*): Update all debugging printfs to use debug_printf instead of
4439 fprintf.
4440 (start_inferior): Replace call to fflush with call to debug_flush.
4441 (monitor_show_help): Mention set debug-format.
4442 (parse_debug_format_options): New function.
4443 (handle_monitor_command): Handle "monitor set debug-format".
4444 (gdbserver_usage): Mention --debug-format.
4445 (main): Parse --debug-format.
4446 * server.h (debug_threads): Declaration moved to debug.h.
4447 #include "debug.h".
4448 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4449 trace_debug_1 that uses debug_printf.
4450 (tracepoint_look_up_symbols): Update all debugging printfs to use
4451 debug_printf instead of fprintf.
4452
e671835b
BS
44532014-01-20 Baruch Siach <baruch@tkos.co.il>
4454
4455 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4456 sys/ptrace.h.
4457
b5737fa9
PA
44582014-01-17 Pedro Alves <palves@redhat.com>
4459
ea38d2a9 4460 PR build/16445
c7faa97a
PA
4461 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4462 defined after including gdb_proc_service.h.
b5737fa9 4463
40ed484e
DE
44642014-01-16 Doug Evans <dje@google.com>
4465
4466 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4467 (match_dll): Use it.
4468
969c39fb
MM
44692014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4470
4471 * target.h (target_ops) <read_btrace>: Change parameters and
4472 return type to allow error reporting.
4473 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4474 trace reading errors on.
4475 * linux-low.c (linux_low_read_btrace): Pass trace reading
4476 errors on.
4477 (linux_low_disable_btrace): New.
4478
ab7f45ba
DE
44792014-01-15 Doug Evans <dje@google.com>
4480
4481 * inferiors.c (thread_id_to_gdb_id): Delete.
4482 * inferiors.h (thread_id_to_gdb_id): Delete.
4483
66af0f44
EZ
44842014-01-13 Eli Zaretskii <eliz@gnu.org>
4485
4486 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4487 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4488 versions.
4489
9939e131
PA
44902014-01-08 Pedro Alves <palves@redhat.com>
4491
4492 * server.c (handle_status): Don't discard previous queued stop
4493 replies or thread's pending status here.
4494 (main) <disconnection>: Do it here instead.
4495
b7ea362b
PA
44962014-01-08 Pedro Alves <palves@redhat.com>
4497
4498 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4499 * server.c (visit_actioned_threads, handle_pending_status): New
4500 function.
4501 (handle_v_cont): Factor out parts to ...
4502 (resume): ... this new function. If in all-stop, and a thread
4503 being resumed has a pending status, report it without actually
4504 resuming.
4505 (myresume): Adjust to use the new 'resume' function.
4506 (clear_pending_status_callback, set_pending_status_callback)
4507 (find_status_pending_thread_callback): New functions.
4508 (handle_status): Handle the case of multiple threads having
4509 interesting statuses to report. Report threads' real last signal
4510 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4511 with an interesting thread to report the status for, instead of
4512 always reporting the status of the first thread.
4513
28498c42
JB
45142014-01-01 Joel Brobecker <brobecker@adacore.com>
4515
4516 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4517 * gdbreplay.c (gdbreplay_version): Likewise.
4518
f45c82da
YZ
45192013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4520
4521 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4522 iov.iov_len with the real length in use.
4523
379a5e2d
JB
45242013-12-13 Joel Brobecker <brobecker@adacore.com>
4525
4526 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4527 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4528 for all targets that use win32-low.c.
4529 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4530 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4531
4210d83e
PA
45322013-12-13 Pedro Alves <palves@redhat.com>
4533
4534 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4535 if equal to TARGET_WAITKIND_LOADED.
4536 * win32-low.c (cached_status): New static global.
4537 (win32_wait): Add declaration.
4538 (do_initial_child_stuff): Flush all initial pending debug events
4539 up to the initial breakpoint.
4540 (win32_wait): If CACHED_STATUS was set, return that instead
4541 of doing a real wait. Remove the code resuming the execution
4542 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4543 during the initial phase. Also remove the code changing
4544 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4545 TARGET_WAITKIND_STOPPED.
4546
e7f0d979
YQ
45472013-12-11 Yao Qi <yao@codesourcery.com>
4548
4549 * notif.c (handle_notif_ack): Return 0 if no notification
4550 matches.
4551
ebcf782c
DE
45522013-11-20 Doug Evans <dje@google.com>
4553
4554 * linux-low.c (linux_set_resume_request): Fix comment.
4555
20ad9378
DE
45562013-11-20 Doug Evans <dje@google.com>
4557
4558 * linux-low.c (resume_status_pending_p): Tweak comment.
4559
a196ebeb
WT
45602013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4561
4562 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4563 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4564 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4565 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4566 (srv_amd64_regobj): Add amd64-mpx.o.
4567 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4568 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4569 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4570 * i387-fp.c (num_pl_bnd_register) Added constant.
4571 (num_pl_bnd_cfg_registers) Added constant.
4572 (struct i387_xsave) Added reserved area and MPX fields.
4573 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4574 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4575 function.
4576 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4577 (init_registers_amd64_mpx_linux): Declare new function.
4578 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4579 (x86_64_regmap): Add MPX registers.
4580 (x86_linux_read_description): Add MPX case.
4581 (initialize_low_arch): Initialize MPX targets.
4582
0080a2f6
TT
45832013-11-18 Tom Tromey <tromey@redhat.com>
4584
4585 * configure: Rebuild.
4586 * configure.ac: Don't check for stdlib.h.
4587 * gdbreplay.c: Unconditionally include stdlib.h.
4588
2978b111
TT
45892013-11-18 Tom Tromey <tromey@redhat.com>
4590
4591 * config.in: Rebuild.
4592 * configure: Rebuild.
4593 * configure.ac: Don't use AC_HEADER_DIRENT.
4594
a3d08894
TT
45952013-11-18 Tom Tromey <tromey@redhat.com>
4596
4597 * server.h: Don't check HAVE_STRING_H.
4598 * gdbreplay.c: Don't check HAVE_STRING_H.
4599 * configure: Rebuild.
4600
0a5dd17d
TT
46012013-11-18 Tom Tromey <tromey@redhat.com>
4602
4603 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4604 LIBGNU.
4605
1bd2f0ba
TT
46062013-11-08 Tom Tromey <tromey@redhat.com>
4607
4608 * configure, config.in: Rebuild.
4609 * configure.ac: Remove unused configury.
4610
3266f10b
TT
46112013-11-08 Tom Tromey <tromey@redhat.com>
4612
4613 * acinclude.m4: Include common.m4, codeset.m4.
4614 * configure, config.in: Rebuild.
4615 * configure.ac: Use GDB_AC_COMMON.
4616
6682d959
AA
46172013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4618
4619 * linux-s390-low.c (HWCAP_S390_TE): New define.
4620 (s390_arch_setup): Consider the TE field in the HWCAP for
4621 determining 'have_regset_tdb'.
4622
fd0a4d76
SDJ
46232013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4624
4625 PR gdb/16014
4626 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4627 call to sizeof.
4628
1a3d890b
PA
46292013-10-02 Pedro Alves <palves@redhat.com>
4630
4631 * server.c (process_serial_event): Don't output "GDBserver
4632 exiting" if GDB is connected through stdio.
4633 * target.c (mywait): Likewise, be silent if GDB is connected
4634 through stdio.
4635
97ad4581
JB
46362013-10-01 Joel Brobecker <brobecker@adacore.com>
4637
4638 * lynx-low.c (lynx_add_threads_after_attach): New function.
4639 (lynx_attach): Remove call to add_thread. Add call to
4640 lynx_add_threads_after_attach instead.
4641
5b4e221c
MF
46422013-09-28 Mike Frysinger <vapier@gentoo.org>
4643
4644 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4645 * config.in, configure: Regenerated.
4646
ee47b2f8
YQ
46472013-09-18 Yao Qi <yao@codesourcery.com>
4648
4649 PR server/15959
4650 * server.c (start_inferior): Clear 'resume_info'.
4651
d6707650 46522013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4653
d6707650
JW
4654 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4655 for each register.
4656
9243dd0e 46572013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4658
9243dd0e
JW
4659 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4660 linux-tile-low.o to srv_tgtobj.
4661
c623a6ef
WN
46622013-09-16 Will Newton <will.newton@linaro.org>
4663
4664 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4665 out regs.
4666
fb71d39e
PA
46672013-09-06 Pedro Alves <palves@redhat.com>
4668
4669 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4670 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4671 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4672 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4673 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4674 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4675
8e7e9910
PA
46762013-09-06 Pedro Alves <palves@redhat.com>
4677
4678 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4679 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4680
7c3a12ca
PA
46812013-09-06 Pedro Alves <palves@redhat.com>
4682
4683 * linux-amd64-ipa.c: Include tracepoint.h.
4684 * linux-i386-ipa.c: Include tracepoint.h.
4685
8eb3d7b6
RW
46862013-09-06 Ricard Wanderlof <ricardw@axis.com>
4687
4688 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4689 (ps_get_thread_area): New function.
4690
eddddb9d
RW
46912013-09-06 Ricard Wanderlof <ricardw@axis.com>
4692
4693 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4694 (initialize_low_arch): Call init_registers_crisv32 rather than
4695 init_register_crisv32.
4696
533b0600
PA
46972013-09-05 Pedro Alves <palves@redhat.com>
4698
4699 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4700 to ...
4701 * hostio.h: ... this new file.
4702 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4703 win32-low.c: Include hostio.h.
4704
0ce3d3b5
PA
47052013-09-05 Pedro Alves <palves@redhat.com>
4706
4707 * server.h (gdb_client_data, handler_func, callback_handler_func)
4708 (delete_file_handler, add_file_handler, append_callback_event)
4709 (delete_callback_event, start_event_loop, initialize_event_loop):
4710 Move to event-loop.h and include it.
4711 * event-loop.h: New file.
4712
799cdc37
PA
47132013-09-05 Pedro Alves <palves@redhat.com>
4714
4715 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4716 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4717 (loaded_dll, unloaded_dll): Move to ...
4718 * dll.h: ... this new file.
4719 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4720
6a6bbd9d
PA
47212013-09-05 Pedro Alves <palves@redhat.com>
4722
4723 * server.h (current_process, get_thread_process, all_processes)
4724 (add_inferior_to_list, for_each_inferior, current_inferior)
4725 (remove_inferior, add_process, remove_process, find_process_pid)
4726 (have_started_inferiors_p, have_attached_inferiors_p)
4727 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4728 (clear_inferiors, find_inferior, find_inferior_id)
4729 (inferior_target_data, set_inferior_target_data)
4730 (inferior_regcache_data, set_inferior_regcache_data): Move to
4731 inferiors.h, and include it.
4732 * inferiors.h: New file.
4733
f699aaba
PA
47342013-09-05 Pedro Alves <palves@redhat.com>
4735
4736 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4737 Move ...
72f4393d 4738 * ax.h: ... here.
f699aaba 4739
c144c7a0
PA
47402013-09-05 Pedro Alves <palves@redhat.com>
4741
4742 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4743 tracepoint.h.
4744 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4745 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4746 (handle_tracepoint_general_set, handle_tracepoint_query)
4747 (tracepoint_finished_step, tracepoint_was_hit)
4748 (release_while_stepping_state_list, current_traceframe)
4749 (in_readonly_region, traceframe_read_mem)
4750 (fetch_traceframe_registers, traceframe_read_sdata)
4751 (traceframe_read_info, struct fast_tpoint_collect_status)
4752 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4753 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4754 (supply_fast_tracepoint_registers)
4755 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4756 (ipa_tdesc, claim_trampoline_space)
4757 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4758 (agent_mem_read, agent_get_trace_state_variable_value)
4759 (agent_set_trace_state_variable_value, agent_tsv_read)
4760 (agent_mem_read_string, get_raw_reg_func_addr)
4761 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4762 * tracepoint.h: ... this new file.
4763
ff42e6ab
PA
47642013-09-05 Pedro Alves <palves@redhat.com>
4765
4766 * server.h (perror_with_name, error, fatal, warning, paddress)
4767 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4768 include it.
4769 * utils.h: New file.
4770
541af0f4
PA
47712013-09-05 Pedro Alves <palves@redhat.com>
4772
4773 * server.h (remote_debug, noack_mode, transport_is_reliable)
4774 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4775 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4776 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4777 (write_enn, initialize_async_io, enable_async_io)
4778 (disable_async_io, check_remote_input_interrupt_request)
4779 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4780 (dead_thread_notify, prepare_resume_reply)
4781 (decode_address_to_semicolon, decode_address, decode_m_packet)
4782 (decode_M_packet, decode_X_packet, decode_xfer_write)
4783 (decode_search_memory_packet, unhexify, hexify)
4784 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4785 (look_up_one_symbol, relocate_instruction)
4786 (monitor_output): Move to remote-utils.h, and include it.
4787 * remote-utils.h: New file.
4788
eebdf26b
PA
47892013-09-05 Pedro Alves <palves@redhat.com>
4790
4791 * server.h (_): Delete.
4792
3aafd2ff
PA
47932013-09-02 Pedro Alves <palves@redhat.com>
4794
4795 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4796 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4797 allocated.
4798 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4799
cee83bcb
PM
48002013-09-02 Pierre Muller <muller@sourceware.org>
4801
4802 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4803 or WriteProcessMemory complete successfully and handle
4804 ERROR_PARTIAL_COPY error.
4805
9a13b2fa
PA
48062013-09-02 Pedro Alves <palves@redhat.com>
4807
4808 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4809 error instead of EIO.
4810
602e3198
JK
48112013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4812
4813 PR server/15604
4814 * linux-low.c: Include filestuff.h.
4815 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4816 * lynx-low.c: Include filestuff.h.
4817 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4818 * server.c: Include filestuff.h.
4819 (main): Call notice_open_fds.
4820 * spu-low.c: Include filestuff.h.
4821 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4822
96d7229d
LM
48232013-08-22 Luis Machado <lgustavo@codesourcery.com>
4824
4825 * Makefile.in: Explain why ../target and ../nat are not
4826 listed as include file search paths.
4827 (linux-waitpid.o): New object file rule.
4828 * configure.srv (srv_native_linux_obj): New variable.
4829 Replace all occurrences of linux native object files with
4830 $srv_native_linux_obj.
4831 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4832 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4833 (linux_enable_event_reporting): Remove declaration.
4834 (my_waitpid): Moved to common/linux-waitpid.c.
4835 (linux_wait_for_event): Pass ptid when calling
4836 linux_enable_event_reporting.
4837 (linux_supports_tracefork_flag): Remove.
4838 (linux_enable_event_reporting): Likewise.
4839 (linux_tracefork_grandchild): Remove.
4840 (STACK_SIZE): Moved to common/linux-ptrace.c.
4841 (linux_tracefork_child): Remove.
4842 (linux_test_for_tracefork): Remove.
4843 (linux_look_up_symbols): Call linux_supports_traceclone.
4844 (initialize_low): Remove call to linux_test_for_tracefork.
4845 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4846 common/linux-ptrace.h.
4847 (PTRACE_TYPE_ARG4): Likewise.
4848 Include linux-ptrace.h.
4849
32940073
PA
48502013-08-21 Pedro Alves <palves@redhat.com>
4851
4852 * config.in: Renegerate.
4853
33b60d58 48542013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4855
33b60d58
LM
4856 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4857 (SFILES): Remove $(srcdir)/common/target-common.c and
4858 add $(srcdir)/target/waitstatus.c.
4859 (OBS): Remove target-common.o and add waitstatus.o.
4860 (server_h): Remove $(srcdir)/../common/target-common.h and
4861 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4862 and $(srcdir)/../target/waitstatus.h.
4863 (target-common.o): Remove.
4864 (waitstatus.o): New target object file.
4865 * target.h: Do not include target-common.h and
4866 include target/resume.h, target/wait.h and
4867 target/waitstatus.h.
4868
b8e1b30e
LM
48692013-08-13 Luis Machado <lgustavo@codesourcery.com>
4870
4871 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4872 to PTRACE_TYPE_ARG3.
4873 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4874 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4875 PTRACE_TYPE_ARG4.
4876 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4877 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4878
7a60ad40
YQ
48792013-07-27 Jie Zhang <jie@codesourcery.com>
4880 Daniel Jacobowitz <dan@codesourcery.com>
4881 Yao Qi <yao@codesourcery.com>
4882
4883 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4884 (mips-linux-watch.o): New rule.
4885 (mips_linux_watch_h): New variable.
4886 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4887 srv_tgtobj.
4888 * linux-mips-low.c: Include mips-linux-watch.h.
4889 (struct arch_process_info, struct arch_lwp_info): New.
4890 (update_watch_registers_callback): New function.
4891 (mips_linux_new_process, mips_linux_new_thread) New functions.
4892 (mips_linux_prepare_to_resume, mips_insert_point): New
4893 functions.
4894 (mips_remove_point, mips_stopped_by_watchpoint): New
4895 functions.
4896 (rsp_bp_type_to_target_hw_bp_type): New function.
4897 (mips_stopped_data_address): New function.
4898 (the_low_target): Add watchpoint support functions.
4899
de6f69ad
YQ
49002013-07-27 Yao Qi <yao@codesourcery.com>
4901
4902 * i386-low.c: Include break-common.h.
4903 (enum target_hw_bp_type): Remove.
4904
3360c0bf
LM
49052013-07-24 Luis Machado <lgustavo@codesourcery.com>
4906
4907 * Makefile.in (SFILES): /common/target-common.c.
4908 (OBS): Add target-common.o.
4909 (server_h): Add $(srcdir)/../common/target-common.h.
4910 (target-common.o): New target.
4911 * server.c (queue_stop_reply_callback): Free
4912 status string after use.
4913 * target.c (target_waitstatus_to_string): Remove.
4914 * target.h: Include target-common.h.
4915 (resume_kind): Likewise.
4916 (target_waitkind): Likewise.
4917 (target_waitstatus): Likewise.
4918 (TARGET_WNOHANG): Likewise.
4919
bd885420
YQ
49202013-07-04 Yao Qi <yao@codesourcery.com>
4921
4922 * Makefile.in (host_alias): Use @host_noncanonical@.
4923 (target_alias): Use @target_noncanonical@.
4924 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4925 ACX_NONCANONICAL_HOST.
4926 * configure: Regenerated.
4927
4928 Revert:
4929 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4930
4931 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4932 * configure: Rebuild.
4933 * Makefile.in (version_host, version_target): Get from configure.
4934 (version.c): Use $(version_host) and $(version_target).
4935
17ef446e
PA
49362013-07-03 Pedro Alves <palves@redhat.com>
4937
4938 * Makefile.in (config.status): Depend on development.sh.
4939 * acinclude.m4: Include libmcheck.m4.
4940 * configure: Regenerate.
4941
7a9a7487
MG
49422013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4943
4944 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4945 attribute inside the parentheses.
4946 (winapi_DebugSetProcessKillOnExit): Ditto.
4947 (winapi_DebugBreakProcess): Ditto.
4948 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4949
49b64de6
MG
49502013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4951
4952 * notif.h (notif_event): Add a dummy member to avoid compiler
4953 errors.
4954
d5749ee7
PA
49552013-07-01 Pedro Alves <palves@redhat.com>
4956
4957 * hostio.c (HOSTIO_PATH_MAX): Define.
4958 (require_filename, handle_open, handle_unlink, handle_readlink):
4959 Use it.
4960
d8d2a3ee
PA
49612013-07-01 Pedro Alves <palves@redhat.com>
4962
4963 * server.h: Include "pathmax.h".
4964 * linux-low.c: Don't include sys/param.h.
4965 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4966 MAXPATHLEN.
4967 * win32-low.c: Don't include sys/param.h.
4968 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4969
bc7dea8d
PA
49702013-07-01 Pedro Alves <palves@redhat.com>
4971
4972 * event-loop.c: Don't check HAVE_UNISTD_H before including
4973 <unistd.h>.
4974 * gdbreplay.c: Likewise.
4975 * remote-utils.c: Likewise.
4976 * server.c: Likewise.
4977 * configure.ac: Don't check for unistd.h.
4978 * configure: Regenerate.
4979
d6c2da54
TT
49802013-06-28 Tom Tromey <tromey@redhat.com>
4981
4982 * Makefile.in (version.c): Use version.in, not
4983 common/version.in.
4984
257b6bec
MG
49852013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4986
4987 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4988 * configure: Rebuild.
4989 * Makefile.in (version_host, version_target): Get from configure.
4990 (version.c): Use $(version_host) and $(version_target).
4991
86ebe149
DK
49922013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4993
4994 Fix trace-status to output user name without trailing colon.
4995 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4996
f30aa5af
DK
49972013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4998
4999 Fix trace-status to output proper start-time and stop-time.
5000 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5001 output start time and stop time in hex as gdb expects.
5002
28a93511
YQ
50032013-06-26 Pedro Alves <pedro@codesourcery.com>
5004
5005 * tracepoint.c (build_traceframe_info_xml): Output trace state
5006 variables present in the trace buffer.
5007
01208463
TT
50082013-06-24 Tom Tromey <tromey@redhat.com>
5009
5010 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5011 create-version.sh.
5012 (version.o): Remove.
5013 * gdbreplay.c: Include version.h.
5014 (version, host_name): Don't declare.
5015 * server.h: Include version.h.
5016 (version, host_name): Don't declare.
5017
760256f9
PA
50182013-06-12 Pedro Alves <palves@redhat.com>
5019
5020 * linux-x86-low.c (linux_is_elf64): Delete global.
5021 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5022 with local linux_pid_exe_is_elf_64_file use.
5023
030031ee
PA
50242013-06-11 Pedro Alves <palves@redhat.com>
5025
5026 * linux-low.c (regset_disabled, disable_regset): New functions.
5027 (regsets_fetch_inferior_registers)
5028 (regsets_store_inferior_registers): Use them.
5029 (initialize_regsets_info); Don't allocate the disabled_regsets
5030 array here.
5031 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5032 comment.
5033
5da6eb0a
PA
50342013-06-11 Pedro Alves <palves@redhat.com>
5035
5036 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5037 xmalloc.
5038
7e5aaa09
PA
50392013-06-11 Pedro Alves <palves@redhat.com>
5040
5041 * linux-x86-low.c (initialize_low_arch): Call
5042 init_registers_x32_avx_linux.
5043
d878444c
JK
50442013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5045
5046 Fix compatibility with Android Bionic.
5047 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5048 it is not empty.
5049
3aee8918
PA
50502013-06-07 Pedro Alves <palves@redhat.com>
5051
5f2b57b5 5052 PR server/14823
3aee8918
PA
5053 * Makefile.in (OBS): Add tdesc.o.
5054 (IPA_OBJS): Add tdesc-ipa.o.
5055 (tdesc-ipa.o): New rule.
5056 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5057 interface.
5058 * linux-low.c (new_inferior): Delete.
5059 (disabled_regsets, num_regsets): Delete.
5060 (linux_add_process): Adjust to set the new per-process
5061 new_inferior flag.
5062 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5063 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5064 was a stop. When calling arch_setup, switch the current inferior
5065 to the thread that got an event.
5066 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5067 (regsets_fetch_inferior_registers)
5068 (regsets_store_inferior_registers): New regsets_info parameter.
5069 Adjust to use it.
5070 (linux_register_in_regsets): New regs_info parameter. Adjust to
5071 use it.
5072 (register_addr, fetch_register, store_register): New usrregs_info
5073 parameter. Adjust to use it.
5074 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5075 parameter regs_info. Adjust to use it.
5076 (linux_fetch_registers): Get the current inferior's regs_info, and
5077 adjust to use it.
5078 (linux_store_registers): Ditto.
5079 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5080 (initialize_low): Don't initialize the target_regsets here. Call
5081 initialize_low_arch.
5082 * linux-low.h (target_regsets): Delete declaration.
5083 (struct regsets_info): New.
5084 (struct usrregs_info): New.
5085 (struct regs_info): New.
5086 (struct process_info_private) <new_inferior>: New field.
5087 (struct linux_target_ops): Delete the num_regs, regmap, and
5088 regset_bitmap fields. New field regs_info.
5089 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5090 * i387-fp.c (num_xmm_registers): Delete.
5091 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5092 calls to new interface.
5093 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5094 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5095 Infer the number of xmm registers from the regcache's target
5096 description.
5097 * i387-fp.h (num_xmm_registers): Delete.
5098 * inferiors.c (add_thread): Don't install the thread's regcache
5099 here.
5100 * proc-service.c (gregset_info): Fetch the current inferior's
5101 regs_info. Adjust to use it.
5102 * regcache.c: Include tdesc.h.
5103 (register_bytes, reg_defs, num_registers)
5104 (gdbserver_expedite_regs): Delete.
5105 (get_thread_regcache): If the thread doesn't have a regcache yet,
5106 create one, instead of aborting gdbserver.
5107 (regcache_invalidate_one): Rename to ...
5108 (regcache_invalidate_thread): ... this.
5109 (regcache_invalidate_one): New.
5110 (regcache_invalidate): Only invalidate registers of the current
5111 process.
5112 (init_register_cache): Add target_desc parameter, and use it.
5113 (new_register_cache): Ditto. Assert the target description has a
5114 non zero registers_size.
5115 (regcache_cpy): Add assertions. Adjust.
5116 (realloc_register_cache, set_register_cache): Delete.
5117 (registers_to_string, registers_from_string): Adjust.
5118 (find_register_by_name, find_regno, find_register_by_number)
5119 (register_cache_size): Add target_desc parameter, and use it.
5120 (free_register_cache_thread, free_register_cache_thread_one)
5121 (regcache_release, register_cache_size): New.
5122 (register_size): Add target_desc parameter, and use it.
5123 (register_data, supply_register, supply_register_zeroed)
5124 (supply_regblock, supply_register_by_name, collect_register)
5125 (collect_register_as_string, collect_register_by_name): Adjust.
5126 * regcache.h (struct target_desc): Forward declare.
5127 (struct regcache) <tdesc>: New field.
5128 (init_register_cache, new_register_cache): Add target_desc
5129 parameter.
5130 (regcache_invalidate_thread): Declare.
5131 (regcache_invalidate_one): Delete declaration.
5132 (regcache_release): Declare.
5133 (find_register_by_number, register_cache_size, register_size)
5134 (find_regno): Add target_desc parameter.
5135 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5136 declarations.
5137 * remote-utils.c: Include tdesc.h.
5138 (outreg, prepare_resume_reply): Adjust.
5139 * server.c: Include tdesc.h.
5140 (gdbserver_xmltarget): Delete declaration.
5141 (get_features_xml, process_serial_event): Adjust.
5142 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5143 declare.
5144 (struct process_info) <tdesc>: New field.
5145 (ipa_tdesc): Declare.
5146 * tdesc.c: New file.
5147 * tdesc.h: New file.
5148 * tracepoint.c: Include tdesc.h.
5149 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5150 (get_context_regcache): Adjust to pass ipa_tdesc down.
5151 (do_action_at_tracepoint): Adjust to get the register cache size
5152 from the context regcache's description.
5153 (traceframe_walk_blocks): Adjust to get the register cache size
5154 from the current trace frame's description.
5155 (traceframe_get_pc): Adjust to get current trace frame's
5156 description and pass it down.
5157 (gdb_collect): Adjust to get the register cache size from the
5158 IPA's description.
5159 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5160 (gdbserver_xmltarget): Delete.
5161 (initialize_low_tracepoint): Set the ipa's target description.
5162 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5163 (initialize_low_tracepoint): Set the ipa's target description.
5164 * linux-x86-low.c: Include tdesc.h.
5165 [__x86_64__] (is_64bit_tdesc): New.
5166 (ps_get_thread_area, x86_get_thread_area): Use it.
5167 (i386_cannot_store_register): Rename to ...
5168 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5169 (i386_cannot_fetch_register): Rename to ...
5170 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5171 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5172 to new interface.
5173 (target_regsets): Rename to ...
5174 (x86_regsets): ... this.
5175 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5176 interface.
5177 (x86_siginfo_fixup): Use is_64bit_tdesc.
5178 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5179 (tdesc_x32_avx_linux, tdesc_x32_linux)
5180 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5181 Declare.
5182 (x86_linux_update_xmltarget): Delete.
5183 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5184 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5185 (AMD64_LINUX_USER64_CS): New.
5186 (x86_linux_read_description): New, based on
5187 x86_linux_update_xmltarget.
5188 (same_process_callback): New.
5189 (x86_arch_setup_process_callback): New.
5190 (x86_linux_update_xmltarget): New.
5191 (x86_regsets_info): New.
5192 (amd64_linux_regs_info): New.
5193 (i386_linux_usrregs_info): New.
5194 (i386_linux_regs_info): New.
5195 (x86_linux_regs_info): New.
5196 (x86_arch_setup): Reimplement.
5197 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5198 (x86_emit_ops): Ditto.
5199 (the_low_target): Adjust. Install x86_linux_regs_info,
5200 x86_cannot_fetch_register, and x86_cannot_store_register.
5201 (initialize_low_arch): New.
5202 * linux-ia64-low.c (tdesc_ia64): Declare.
5203 (ia64_fetch_register): Adjust.
5204 (ia64_usrregs_info, regs_info): New globals.
5205 (ia64_regs_info): New function.
5206 (the_low_target): Adjust.
5207 (initialize_low_arch): New function.
5208 * linux-sparc-low.c (tdesc_sparc64): Declare.
5209 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5210 Adjust.
5211 (sparc_arch_setup): New function.
5212 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5213 (the_low_target): Adjust.
5214 (initialize_low_arch): New function.
5215 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5216 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5217 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5218 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5219 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5220 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5221 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5222 (tdesc_powerpc_isa205_vsx64l): Declare.
5223 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5224 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5225 (ppc_set_pc, ppc_get_hwcap): Adjust.
5226 (ppc_usrregs_info): Forward declare.
5227 (!__powerpc64__) ppc_regmap_adjusted: New global.
5228 (ppc_arch_setup): Adjust to the current process'es target
5229 description.
5230 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5231 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5232 (ppc_store_evrregset): Adjust.
5233 (target_regsets): Rename to ...
5234 (ppc_regsets): ... this, and make static.
5235 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5236 (ppc_regs_info): New function.
5237 (the_low_target): Adjust.
5238 (initialize_low_arch): New function.
5239 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5240 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5241 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5242 (tdesc_s390x_linux64v2): Declare.
5243 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5244 (s390_fill_gregset, s390_store_last_break): Adjust.
5245 (target_regsets): Rename to ...
5246 (s390_regsets): ... this, and make static.
5247 (s390_get_pc, s390_set_pc): Adjust.
5248 (s390_get_hwcap): New target_desc parameter, and use it.
5249 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5250 (s390_arch_setup): Adjust to set the current process'es target
5251 description. Don't adjust the regmap.
5252 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5253 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5254 (regs_info_3264): New globals.
5255 (s390_regs_info): New function.
5256 (the_low_target): Adjust.
5257 (initialize_low_arch): New function.
5258 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5259 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5260 [__mips64] (init_registers_mips_linux)
5261 (init_registers_mips_dsp_linux): Delete defines.
5262 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5263 (have_dsp): New global.
5264 (mips_read_description): New, based on mips_arch_setup.
5265 (mips_arch_setup): Reimplement.
5266 (get_usrregs_info): New function.
5267 (mips_cannot_fetch_register, mips_cannot_store_register)
5268 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5269 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5270 (target_regsets): Rename to ...
5271 (mips_regsets): ... this, and make static.
5272 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5273 (dsp_regs_info, regs_info): New globals.
5274 (mips_regs_info): New function.
5275 (the_low_target): Adjust.
5276 (initialize_low_arch): New function.
5277 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5278 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5279 Declare.
5280 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5281 (arm_read_description): New, with bits factored from
5282 arm_arch_setup.
5283 (arm_arch_setup): Reimplement.
5284 (target_regsets): Rename to ...
5285 (arm_regsets): ... this, and make static.
5286 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5287 (arm_regs_info): New function.
5288 (the_low_target): Adjust.
5289 (initialize_low_arch): New function.
5290 * linux-m68k-low.c (tdesc_m68k): Declare.
5291 (target_regsets): Rename to ...
5292 (m68k_regsets): ... this, and make static.
5293 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5294 (m68k_regs_info): New function.
5295 (m68k_arch_setup): New function.
5296 (the_low_target): Adjust.
5297 (initialize_low_arch): New function.
5298 * linux-sh-low.c (tdesc_sharch): Declare.
5299 (target_regsets): Rename to ...
5300 (sh_regsets): ... this, and make static.
5301 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5302 (sh_regs_info, sh_arch_setup): New functions.
5303 (the_low_target): Adjust.
5304 (initialize_low_arch): New function.
5305 * linux-bfin-low.c (tdesc_bfin): Declare.
5306 (bfin_arch_setup): New function.
5307 (bfin_usrregs_info, regs_info): New globals.
5308 (bfin_regs_info): New function.
5309 (the_low_target): Adjust.
5310 (initialize_low_arch): New function.
5311 * linux-cris-low.c (tdesc_cris): Declare.
5312 (cris_arch_setup): New function.
5313 (cris_usrregs_info, regs_info): New globals.
5314 (cris_regs_info): New function.
5315 (the_low_target): Adjust.
5316 (initialize_low_arch): New function.
5317 * linux-cris-low.c (tdesc_crisv32): Declare.
5318 (cris_arch_setup): New function.
5319 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5320 (cris_regs_info): New function.
5321 (the_low_target): Adjust.
5322 (initialize_low_arch): New function.
5323 * linux-m32r-low.c (tdesc_m32r): Declare.
5324 (m32r_arch_setup): New function.
5325 (m32r_usrregs_info, regs_info): New globals.
5326 (m32r_regs_info): Adjust.
5327 (initialize_low_arch): New function.
5328 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5329 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5330 (tic6x_usrregs_info): Forward declare.
5331 (tic6x_read_description): New function, based on ...
5332 (tic6x_arch_setup): ... this. Reimplement.
5333 (target_regsets): Rename to ...
5334 (tic6x_regsets): ... this, and make static.
5335 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5336 (tic6x_regs_info): New function.
5337 (the_low_target): Adjust.
5338 (initialize_low_arch): New function.
5339 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5340 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5341 (target_regsets): Rename to ...
5342 (xtensa_regsets): ... this, and make static.
5343 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5344 globals.
5345 (xtensa_arch_setup, xtensa_regs_info): New functions.
5346 (the_low_target): Adjust.
5347 (initialize_low_arch): New function.
5348 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5349 (nios2_arch_setup): Set the current process'es tdesc.
5350 (target_regsets): Rename to ...
5351 (nios2_regsets): ... this.
5352 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5353 (nios2_regs_info): New function.
5354 (the_low_target): Adjust.
5355 (initialize_low_arch): New function.
a261b8f5
PA
5356 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5357 (aarch64_arch_setup): Set the current process'es tdesc.
5358 (target_regsets): Rename to ...
5359 (aarch64_regsets): ... this.
5360 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5361 (aarch64_regs_info): New function.
5362 (the_low_target): Adjust.
5363 (initialize_low_arch): New function.
3aee8918
PA
5364 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5365 globals.
5366 (target_regsets): Rename to ...
5367 (tile_regsets): ... this.
5368 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5369 (tile_regs_info): New function.
5370 (tile_arch_setup): Set the current process'es tdesc.
5371 (the_low_target): Adjust.
5372 (initialize_low_arch): New function.
5373 * spu-low.c (tdesc_spu): Declare.
5374 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5375 * win32-arm-low.c (tdesc_arm): Declare.
5376 (arm_arch_setup): New function.
5377 (the_low_target): Install arm_arch_setup instead of
5378 init_registers_arm.
5379 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5380 (init_windows_x86): Rename to ...
5381 (i386_arch_setup): ... this. Set `win32_tdesc'.
5382 (the_low_target): Adjust.
5383 * win32-low.c (win32_tdesc): New global.
5384 (child_add_thread): Don't create the thread cache here.
5385 (do_initial_child_stuff): Set the new process'es tdesc.
5386 * win32-low.h (struct target_desc): Forward declare.
5387 (win32_tdesc): Declare.
5388 * lynx-i386-low.c (tdesc_i386): Declare global.
5389 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5390 * lynx-low.c (lynx_tdesc): New global.
5391 (lynx_add_process): Set the new process'es tdesc.
5392 * lynx-low.h (struct target_desc): Forward declare.
5393 (lynx_tdesc): Declare global.
5394 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5395 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5396 * nto-low.c (nto_tdesc): New global.
5397 (do_attach): Set the new process'es tdesc.
5398 * nto-low.h (struct target_desc): Forward declare.
5399 (nto_tdesc): Declare.
5400 * nto-x86-low.c (tdesc_i386): Declare.
5401 (nto_x86_arch_setup): Set `nto_tdesc'.
5402
b1fbec62
GB
54032013-06-04 Gary Benson <gbenson@redhat.com>
5404
5405 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5406 to qSupported response when appropriate.
5407 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5408 with nonzero-length annex.
5409 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5410 arguments supplied in annex.
5411
d1ec4ce7
DE
54122013-05-31 Doug Evans <dje@google.com>
5413
ac44adcb 5414 PR server/15594
d1ec4ce7
DE
5415 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5416 64 bits in 64-cross-32 environment.
5417
9b25f2d3
PA
54182013-05-28 Pedro Alves <palves@redhat.com>
5419
5420 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5421 (aarch64-without-fpu.c): Delete rule.
5422 * configure.srv (aarch64*-*-linux*): Remove references to
5423 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5424 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5425 declaration.
5426
6740dc9c
PA
54272013-05-24 Pedro Alves <palves@redhat.com>
5428
5429 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5430 instead of strchr/decode_address. Error if the range isn't split
5431 with a ','. Don't assume there's be a ':' in the action.
5432
c2d6af84
PA
54332013-05-23 Yao Qi <yao@codesourcery.com>
5434 Pedro Alves <palves@redhat.com>
5435
5436 * linux-low.c (lwp_in_step_range): New function.
5437 (linux_wait_1): If the thread was range stepping and stopped
5438 outside the stepping range, report the stop to GDB. Otherwise,
5439 continue stepping. Add range stepping debug output.
5440 (linux_set_resume_request): Copy the step range from the resume
5441 request to the lwp.
5442 (linux_supports_range_stepping): New.
5443 (linux_target_ops) <supports_range_stepping>: Set to
5444 linux_supports_range_stepping.
5445 * linux-low.h (struct linux_target_ops)
5446 <supports_range_stepping>: New field.
5447 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5448 * linux-x86-low.c (x86_supports_range_stepping): New.
5449 (the_low_target) <supports_range_stepping>: Set to
5450 x86_supports_range_stepping.
5451 * server.c (handle_v_cont): Handle 'r' action.
5452 (handle_v_requests): Append ";r" if the target supports range
5453 stepping.
5454 * target.h (struct thread_resume) <step_range_start,
5455 step_range_end>: New fields.
5456 (struct target_ops) <supports_range_stepping>:
5457 New field.
5458 (target_supports_range_stepping): New macro.
5459
58794e1a
JB
54602013-05-17 Joel Brobecker <brobecker@adacore.com>
5461
5462 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5463 confusion in comment.
5464
d631c5a7
JB
54652013-05-17 Joel Brobecker <brobecker@adacore.com>
5466
5467 * lynx-low.c (struct process_info_private): New type.
5468 (lynx_add_process): New function.
5469 (lynx_create_inferior, lynx_attach): Replace calls to
5470 add_process by calls to lynx_add_process.
5471 (lynx_resume): If PTID is null, then try using
5472 current_process()->private->last_wait_event_ptid.
5473 Add comments.
5474 (lynx_clear_inferiors): Delete. The contents of that function
5475 has been inlined in lynx_mourn;
5476 (lynx_wait_1): Save the ptid in the process's private data.
5477 (lynx_mourn): Free the process' private data. Replace call
5478 to lynx_clear_inferiors by call to clear_inferiors.
5479
96f7a20f
YQ
54802013-05-17 Yao Qi <yao@codesourcery.com>
5481
5482 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5483 the right place.
5484
db0dfaa0
LM
54852013-05-16 Luis Machado <lgustavo@codesourcery.com>
5486
5487 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5488 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5489 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5490 PT_TEXT_END_ADDR guards. Update comments.
5491 (linux_target_op) <read_offsets>: Conditionally define to
5492 linux_read_offsets if the target is UCLIBC and if it defines
5493 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5494
68f5f838
SL
54952013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5496 Andrew Jenner <andrew@codesourcery.com>
5497
5498 * Makefile.in (SFILES): Add linux-nios2-low.c.
5499 (clean): Add action to delete nios2-linux.c.
5500 (nios2-linux.c): New rule.
5501 * configure.srv: Add nios2*-*-linux*.
5502 * linux-nios2-low.c: New.
5503
1ebff1fd
HAQ
55042013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5505
5506 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5507
f6150862
HZ
55082013-04-25 Hui Zhu <hui@codesourcery.com>
5509
5510 PR gdb/15186
f6150862
HZ
5511 * ax.c (ax_printf): Add fflush.
5512
614c279d
TT
55132013-04-22 Tom Tromey <tromey@redhat.com>
5514
5515 * Makefile.in (SFILES): Add filestuff.c.
5516 (OBS): Add filestuff.o.
5517 (filestuff.o): New target.
5518 * config.in, configure: Rebuild.
5519 * configure.ac: Check for fdwalk, pipe2.
5520
7d4e5717
PA
55212013-04-17 Pedro Alves <palves@redhat.com>
5522
5523 * configure.ac (USE_THREAD_DB): Delete variable.
5524 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5525 Don't AC_SUBST USE_THREAD_DB.
5526 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5527 * config.in, configure: Regenerate.
5528
d5c93e41
PA
55292013-04-16 Pedro Alves <palves@redhat.com>
5530
5531 * linux-low.h (struct lwp_info) <thread_known>: Move under
5532 the USE_THREAD_DB #ifdef.
5533
04f5fe89
PA
55342013-04-16 Pedro Alves <palves@redhat.com>
5535
5536 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5537 (linux-low.o): Delete rule.
5538 * linux-low.h: Always include "gdb_thread_db.h" instead of
5539 conditionally including thread_db.h.
5540 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5541 HAVE_THREAD_DB_H.
5542
480b27bf
JK
55432013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5544
5545 * Makefile.in (install-only): Fix make install regression.
5546
43662968
JK
55472013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5548
5549 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5550 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5551 installation.
5552 * gdbserver.1: Remove.
5553
3e74e146
PA
55542013-03-22 Pedro Alves <palves@redhat.com>
5555
5556 * linux-low.c (handle_extended_wait): Don't call
5557 linux_enable_event_reporting.
5558
a8347a2a
TT
55592013-03-15 Tony Theodore <tonyt@logyst.com>
5560
5561 PR build/9098:
5562 * Makefile.in (SHELL): Use @SHELL@.
5563
eeb56fa7
SDJ
55642013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5565
5566 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5567 compiler warning.
5568
4fa7e2ff
JB
55692013-03-13 Joel Brobecker <brobecker@adacore.com>
5570
5571 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5572 Remove extraneous NULL element.
5573
8ddb1965
YQ
55742013-03-13 Yao Qi <yao@codesourcery.com>
5575
5576 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5577 'V' block in trace frame.
5578
9accd112
MM
55792013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5580
5581 * target.h (struct target_ops): Add btrace ops.
5582 (target_supports_btrace): New macro.
5583 (target_enable_btrace): New macro.
5584 (target_disable_btrace): New macro.
5585 (target_read_btrace): New macro.
5586 * gdbthread.h (struct thread_info): Add btrace field.
5587 * server.c: Include btrace-common.h.
5588 (handle_btrace_general_set): New function.
5589 (handle_btrace_enable): New function.
5590 (handle_btrace_disable): New function.
5591 (handle_general_set): Call handle_btrace_general_set.
5592 (handle_qxfer_btrace): New function.
5593 (struct qxfer qxfer_packets[]): Add btrace entry.
5594 * inferiors.c (remove_thread): Disable btrace.
5595 * linux-low: Include linux-btrace.h.
5596 (linux_low_enable_btrace): New function.
5597 (linux_low_read_btrace): New function.
5598 (linux_target_ops): Add btrace ops.
5599 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5600 Add srv_linux_btrace=yes.
5601 (x86_64-*-linux*): Add linux-btrace.o.
5602 Add srv_linux_btrace=yes.
5603 * configure.ac: Define HAVE_LINUX_BTRACE.
5604 * config.in: Regenerated.
5605 * configure: Regenerated.
5606
5cc22e4c
MM
56072013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5608
5609 * server.c (handle_qxfer): Preserve error message if -3 is
5610 returned.
5611 (qxfer): Document the -3 return value.
5612
7c97f91e
MM
56132013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5614
5615 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5616 (linux_btrace_h): New variable.
5617 (linux-btrace.o): New rule.
5618
be9a119c 56192013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5620 Hafiz Abid Qadeer <abidh@codesourcery.com>
5621
5622 * tracepoint.c (trace_buffer_size): New global.
5623 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5624 (init_trace_buffer): Change to one-argument function. Allocate
5625 trace buffer memory.
5626 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5627 handle QTBuffer:size packet.
5628 (cmd_bigqtbuffer_size): New function.
5629 (initialize_tracepoint): Call init_trace_buffer with
5630 DEFAULT_TRACE_BUFFER_SIZE.
5631 * server.c (handle_query): Add QTBuffer:size in the
5632 supported packets.
5633
e64f7499
YQ
56342013-03-07 Yao Qi <yao@codesourcery.com>
5635
5636 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5637 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5638 of -1.
5639 (cmd_qtsp): Adjust condition. Do post increment.
5640 Set cur_action and cur_step_action back to 0.
5641
f0ae6fc3
PA
56422013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5643
5644 PR server/15236
5645 * linux-low.c (linux_write_memory): Return early success if LEN is
5646 zero.
5647
b5b0b0af
CV
56482013-03-05 Corinna Vinschen <vinschen@redhat.de>
5649
334ad4a8 5650 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5651
589bc927
TT
56522013-02-28 Tom Tromey <tromey@redhat.com>
5653
5654 * configure.ac: Invoke AC_SYS_LARGEFILE.
5655 * configure, config.in: Rebuild.
5656
dfe07582
CV
56572013-02-28 Corinna Vinschen <vinschen@redhat.com>
5658
5659 * win32-low.c: Throughout, fix format strings and casts of
5660 printf-like functions to avoid type related warnings on all
5661 platforms.
5662 (get_child_debug_event): Print dwDebugEventCode as hex since
5663 that's how it's usually documented.
5664
736cd585
YQ
56652013-02-28 Yao Qi <yao@codesourcery.com>
5666
5667 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5668 pulongest.
5669
e1f58301
JW
56702013-02-27 Jiong Wang <jiwang@tilera.com>
5671
5672 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5673 (reg-tilegx32.c): New rule.
5674 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5675 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5676 different register info initializer according to elf class.
5677 (init_registers_tilgx32): New function. The tilegx32 register info
5678 initializer.
5679 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5680 (tile_store_gregset): Likewise.
5681
d171ca78
YQ
56822013-02-27 Yao Qi <yao@codesourcery.com>
5683
5684 * server.c (process_point_options): Print debug message when
5685 debug_threads is true.
5686
282bbdf3
YQ
56872013-02-26 Yao Qi <yao@codesourcery.com>
5688
5689 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5690
aca22551
PA
56912013-02-19 Pedro Alves <palves@redhat.com>
5692 Kai Tietz <ktietz@redhat.com>
5693
5694 PR gdb/15161
5695
5696 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5697 instead of strtoul to extract address from packet.
5698 (process_serial_event) <'z'>: Likewise.
5699
4f3cee1c
YQ
57002013-02-18 Yao Qi <yao@codesourcery.com>
5701
5702 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5703
8e1d55a3
PA
57042013-02-14 Pedro Alves <palves@redhat.com>
5705
5706 Plug memory leak.
5707
5708 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5709 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5710
458820da
PA
57112013-02-14 Pedro Alves <palves@redhat.com>
5712
5713 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5714
baea0dae
PA
57152013-02-14 Pedro Alves <palves@redhat.com>
5716
5717 * tracepoint.c (save_string): Delete.
5718 (add_tracepoint_action): Use savestring instead of save_string.
5719
0b1afbb3
PA
57202013-02-12 Pedro Alves <palves@redhat.com>
5721
5722 * linux-xtensa-low.c: Ditto.
5723 * xtensa-xtregs.c: Ditto.
5724
8a4ac37e
PA
57252013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5726
5727 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5728 thread_db.
5729
148de6bb
MS
57302013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5731
5732 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5733 aarch64_num_wp_regs and aarch64_num_bp_regs to
5734 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5735
55fac6e0
MS
57362013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5737
5738 * linux-aarch64-low.c (ps_get_thread_area): Replace
5739 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5740
176eb98c
MS
57412013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5742 Marcus Shawcroft <marcus.shawcroft@arm.com>
5743 Nigel Stephens <nigel.stephens@arm.com>
5744 Yufeng Zhang <yufeng.zhang@arm.com>
5745
5746 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5747 (aarch64.c, aarch64-without-fpu.c): New targets.
5748 * configure.srv (aarch64*-*-linux*): New.
5749 * linux-aarch64-low.c: New file.
5750
56f7af9c
MS
57512013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5752
43aaf8b6 5753 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5754 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5755 (dequeue_one_deferred_signal, linux_resume_one_thread)
5756 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5757 (linux_tracefork_grandchild, linux_test_for_tracefork)
5758 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5759 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5760 where the argument is 0.
5761
60f662b0
YQ
57622013-01-25 Yao Qi <yao@codesourcery.com>
5763
5764 * event-loop.c: Include "queue.h".
5765 (gdb_event_p): New typedef.
5766 (struct gdb_event) <next_event>: Remove.
5767 (event_queue): Change to QUEUE(gdb_event_p).
5768 (async_queue_event): Remove.
5769 (gdb_event_xfree): New.
5770 (initialize_event_loop): New.
5771 (process_event): Use API from QUEUE.
5772 (wait_for_event): Likewise.
5773 * server.c (main): Call initialize_event_loop.
5774 * server.h (initialize_event_loop): Declare.
5775
5ae4861a
YQ
57762013-01-18 Yao Qi <yao@codesourcery.com>
5777
5778 * ax.h (struct eval_agent_expr_context): New.
5779 (gdb_eval_agent_expr): Update declaration.
5780 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5781 TFRAME. Add new argument CTX.
5782 * server.h (struct eval_agent_expr_context): Declare.
5783 (agent_mem_read, agent_tsv_read): Update declaration.
5784 (agent_mem_read_string): Likewise.
5785 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5786 (add_traceframe_block): Add new argument TPOINT.
5787 Increase TPOINT->traceframe_usage.
5788 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5789 eval_tracepoint_agent_expr.
5790 (condition_true_at_tracepoint): Likewise.
5791 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5792 (agent_mem_read_string, agent_tsv_read): Likewise.
5793
85e00e85
YQ
57942013-01-16 Yao Qi <yao@codesourcery.com>
5795
5796 * linux-low.c (linux_resume_one_lwp): Don't check
5797 'lwp->bp_reinsert != 0'.
5798
4039cf45
JB
57992013-01-07 Joel Brobecker <brobecker@adacore.com>
5800 Pedro Alves <palves@redhat.com>
5801
5802 * lynx-low.c (ptrace_request_to_str): Define a temporary
5803 macro and use it to simplify this function's implementation.
5804
9044dee2
JB
58052013-01-07 Joel Brobecker <brobecker@adacore.com>
5806
5807 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5808 sets errno.
5809
e6352c8f
JB
58102013-01-07 Joel Brobecker <brobecker@adacore.com>
5811
5812 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5813
50681a27
JB
58142013-01-07 Joel Brobecker <brobecker@adacore.com>
5815
5816 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5817
3f6e77ef
JB
58182013-01-07 Joel Brobecker <brobecker@adacore.com>
5819
5820 * lynx-low.c (lynx_resume): Use the resume_info parameter
5821 to determine the ptid for the lynx_ptrace call, unless
5822 it is equal to minus_one_ptid, in which case we use the
5823 ptid of the current_inferior.
5824 (lynx_wait_1): After having received a thread create/exit
5825 event, resume the inferior's execution using the signaling
5826 thread's ptid, rather than the old ptid.
5827
7fda33ae
JB
58282013-01-07 Joel Brobecker <brobecker@adacore.com>
5829
5830 * lynx-low.c (lynx_resume): Delete variable ret.
5831
b9786c74
JB
58322013-01-01 Joel Brobecker <brobecker@adacore.com>
5833
5834 * gdbreplay.c (gdbreplay_version): Update copyright year.
5835 * server.c (gdbserver_version): Likewise.
5836
8b93d60f
JB
58372012-12-17 Joel Brobecker <brobecker@adacore.com>
5838
5839 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5840 new thread.
5841
037335a7
JB
58422012-12-17 Joel Brobecker <brobecker@adacore.com>
5843
5844 * lynx-low.c (ptrace_request_to_str): Add handling for
5845 PTRACE_GETTRACESIG.
5846
52d4cbd8
JB
58472012-12-17 Joel Brobecker <brobecker@adacore.com>
5848
5849 * lynx-low.c (lynx_attach): Delete variable new_process.
5850
ab8f6ca9
JB
58512012-12-17 Joel Brobecker <brobecker@adacore.com>
5852
5853 * lynx-low.c (lynx_create_inferior): Delete variable
5854 new_process.
5855
78cbc024
JB
58562012-12-17 Joel Brobecker <brobecker@adacore.com>
5857
5858 * lynx-low.c (ptrace_request_to_str): Do not handle
5859 PTRACE_GETTHREADLIST if this macro does not exist.
5860
14a00470
YQ
58612012-12-15 Yao Qi <yao@codesourcery.com>
5862
5863 * Makefile.in (OBS): Add notif.o.
5864 * notif.c, notif.h: New.
5865 * server.c: Include "notif.h".
5866 (struct vstop_notif) <next>: Remove.
5867 <base>: New field.
5868 (queue_stop_reply): Update.
5869 (push_event, send_next_stop_reply): Remove.
5870 (discard_queued_stop_replies): Update.
5871 (notif_stop): New variable.
5872 (handle_v_stopped): Remove.
5873 (handle_v_requests): Don't call handle_v_stopped. Call
5874 handle_ack_notif instead.
5875 (queue_stop_reply_callback): Call notif_event_enque instead
5876 of queue_stop_reply.
5877 (handle_status): Don't call send_next_stop_reply, call
5878 notif_write_event instead.
5879 (kill_inferior_callback): Likewise.
5880 (detach_or_kill_inferior_callback): Likewise.
5881 (main): Call initialize_notif.
5882 (process_serial_event): Call QUEUE_is_empty.
5883 (handle_target_event): Call notif_push instead of push event.
5884 * server.h (push_event): Remove declaration.
5885
61c125b9
TT
58862012-12-10 Tom Tromey <tromey@redhat.com>
5887
5888 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5889 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5890 macros.
5891 (.c.o): Rewrite.
5892 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5893 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5894 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5895 (amd64-linux-ipa.o, ax.o): Rewrite.
5896 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5897 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5898 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5899 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5900 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5901 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5902 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5903 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5904 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5905 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5906 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5907 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5908 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5909 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5910 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5911 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5912 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5913 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5914 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5915 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5916 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5917 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5918 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5919 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5920 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5921 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5922 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5923 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5924 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5925 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5926 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5927 (reg-tilegx.o): Remove.
5928 (all_object_files): New macro.
5929 Include .deps files.
5930 * aclocal.m4, configure: Rebuild.
5931 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5932 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5933 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5934
e90e9ad9
TT
59352012-12-05 Tom Tromey <tromey@redhat.com>
5936
5937 PR gdb/14917:
5938 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5939
02d403bf 59402012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5941
5942 * configure.ac: Check for linux/perf_event.h.
5943 * config.in: Regenerated.
5944 * configure: Regenerated.
5945
0270a750
PA
59462012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5947
5948 * hostio.c (handle_readlink): Decrease buffer size
5949 parameter passed to readlink by one byte.
5950
8c29b58e
YQ
59512012-11-26 Yao Qi <yao@codesourcery.com>
5952
5953 * configure.ac (build_warnings): Append '-Wempty-body'.
5954 * configure: Regenerated.
5955 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5956 body.
5957
8bdce1ff
PM
59582012-11-15 Pierre Muller <muller@sourceware.org>
5959
5960 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5961 * config.in: Regenerate.
5962 * configure: Regenerate.
5963 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5964 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5965 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5966 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5967 header.
5968 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5969 instead of <sys/wait.h> header.
5970 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5971
02d403bf 59722012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5973
5974 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5975 (various make rules): Remove -DGDBSERVER
5976
fbd5db48
YQ
59772012-11-09 Yao Qi <yao@codesourcery.com>
5978
5979 * spu-low.c (current_ptid): Move it to ..
5980 * gdbthread.h: ... here. New.
5981 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5982 * server.c (myresume, process_serial_event): Likewise.
5983 * thread-db.c (thread_db_find_new_threads): Likewise.
5984 * tracepoint.c (run_inferior_command): Likewise.
5985
b3dc46ff
AB
59862012-10-01 Andrew Burgess <aburgess@broadcom.com>
5987
5988 * server.c (handle_search_memory_1): Include access length in
5989 warning message.
5990
07c04788
HPN
59912012-09-05 Michael Brandt <michael.brandt@axis.com>
5992
5993 * linux-crisv32-low.c: Fix compile errors.
5994
918d227b
YQ
59952012-09-04 Yao Qi <yao@codesourcery.com>
5996
5997 * tracepoint.c (cmd_qtsv): Adjust debug message.
5998 Don't check CUR_TPOINT.
5999
18c1b81a
YQ
60002012-08-28 Yao Qi <yao@codesourcery.com>
6001
6002 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6003 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6004 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6005 Remove declarations of xmalloc, xreallloc, xstrdup and
6006 freeargv.
6007 * Makefile.in (libiberty_h): New.
6008 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6009 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6010
dc82f37b
YQ
60112012-08-23 Yao Qi <yao@codesourcery.com>
6012
6013 * server.h: Remove declaration of 'xsnprintf'.
6014
406b1477
KS
60152012-08-22 Keith Seitz <keiths@redhat.com>
6016
6017 * server.h: Include build-gnulib-gbserver/config.h.
6018 * gdbreplay.c: Likewise.
6019
e6712ff1
DE
60202012-08-08 Doug Evans <dje@google.com>
6021
6022 * Makefile.in (SFILES): Add gdb_vecs.c.
6023 (OBS): Add gdb_vecs.o.
6024 (gdb_vecs_h, host_defs_h): New variables.
6025 (thread-db.o): Add $(gdb_vecs_h) dependency.
6026 (gdb_vecs.o): New rule.
6027 * thread-db.c: #include "gdb_vecs.h".
6028 (thread_db_load_search): Use a vector to iterate over path elements.
6029 Handle text appearing after "$pdir".
6030
6031 * configure.ac: Add check for strstr.
6032 * config.in: Regenerate.
6033 * configure: Regenerate.
6034
7c3270ae
UW
60352012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6036
6037 * hostio.c (handle_pread): If pread fails, fall back to attempting
6038 lseek/read.
6039 (handle_pwrite): Likewise for pwrite.
6040
b62e2b27
UW
60412012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6042
6043 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6044 between unsupported TYPE and unimplementable ADDR/LEN combination.
6045 (arm_insert_point): Act on new return value.
6046
78a99e91
PA
60472012-07-31 Pedro Alves <palves@redhat.com>
6048
6049 * server.c (process_point_options): Only skip tokens if we find
6050 one that is unrecognized. Don't treat 'X' specially while
6051 skipping unrecognized tokens.
6052
fcf303ab
UW
60532012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6054
6055 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6056 to 4-byte-align HW breakpoint addresses for Thumb.
6057
7255706c
YQ
60582012-07-27 Yao Qi <yao@codesourcery.com>
6059
6060 PR remote/14161.
6061
6062 * server.h: Declare gdb_agent_about_to_close.
6063 * target.c (kill_inferior): Include "agent.h".
6064 New. Send command 'kill'.
6065 * target.h (kill_inferior): Removed macro.
6066 * tracepoint.c (gdb_agent_about_to_close): New.
6067 (gdb_agent_helper_thread): Handle command 'close'.
6068 Wait endlessly until the inferior stops.
6069 Install gdb_agent_remove_socket to atexit hook.
6070 (agent_socket_name): New static variable.
6071 (gdb_agent_socket_init): Replace local variable 'name' with
6072 'agent_socket_name'.
6073 (gdb_agent_remove_socket): New.
6074
5a3f286f
YQ
60752012-07-27 Yao Qi <yao@codesourcery.com>
6076
6077 * server.c (process_point_options): Stop at 'X' when parsing.
6078
961bd387
ME
60792012-07-19 Michael Eager <eager@eagercon.com>
6080
a261b8f5 6081 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6082 to hw_execute.
6083 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6084 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6085 hardware breakpoint.
6086
aa7c7447
JK
60872012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6088
6089 * gdbserver/linux-low.c (initialize_low): Call
6090 linux_ptrace_init_warnings.
6091
7f216e7c
DE
60922012-07-02 Doug Evans <dje@google.com>
6093
6094 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6095 pointer to int.
6096
d3ce09f5
SS
60972012-07-02 Stan Shebs <stan@codesourcery.com>
6098
6099 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6100 (ax.o): Add it to build rule.
6101 (ax-ipa.o): Ditto.
6102 (OBS): Add format.o.
6103 (IPA_OBS): Add format.o.
6104 * server.c (handle_query): Claim support for breakpoint commands.
6105 (process_point_options): Add command case.
6106 (process_serial_event): Leave running if there are printfs in
6107 effect.
6108 * mem-break.h (any_persistent_commands): Declare.
6109 (add_breakpoint_commands): Declare.
6110 (gdb_no_commands_at_breakpoint): Declare.
6111 (run_breakpoint_commands): Declare.
6112 * mem-break.c (struct point_command_list): New struct.
6113 (struct breakpoint): New field command_list.
6114 (any_persistent_commands): New function.
6115 (add_commands_to_breakpoint): New function.
6116 (add_breakpoint_commands): New function.
6117 (gdb_no_commands_at_breakpoint): New function.
6118 (run_breakpoint_commands): New function.
6119 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6120 locally.
6121 * ax.c: Include format.h.
6122 (ax_printf): New function.
6123 (gdb_eval_agent_expr): Add printf opcode.
6124
2f8f6aed
YQ
61252012-06-13 Yao Qi <yao@codesourcery.com>
6126
6127 * server.c (start_inferior): Remove duplicated writes to fields
6128 'last_resume_kind' and 'last_status' of 'current_inferior'.
6129
0c9070b3
YQ
61302012-06-12 Yao Qi <yao@codesourcery.com>
6131 Pedro Alves <palves@redhat.com>
6132
6133 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6134 comment.
6135 * server.c (handle_v_cont): Extend comment.
6136
c52daf70
YQ
61372012-06-11 Yao Qi <yao@codesourcery.com>
6138
6139 * linux-low.c (linux_attach): Add 'static'.
6140
d38bbb0a
YQ
61412012-06-06 Yao Qi <yao@codesourcery.com>
6142
6143 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6144
89dc0afd
JK
61452012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6146
6147 Fix gcc -flto compilation warning.
6148 * server.c (main): Make variable multi_mode and attach volatile.
6149
75f62ce7
TJB
61502012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6151
6152 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6153 if the platform doesn't know about it.
6154
65f479b6
PA
61552012-05-30 Jeff Kenton <jkenton@tilera.com>
6156
6157 * Makefile.in (SFILES): Add linux-tile-low.c.
6158 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6159 * configure.srv: Handle tilegx-*-linux*.
6160 * linux-tile-low.c: New file.
6161
0c5bf5a9
JK
61622012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6163
6164 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6165
a493e3e2
PA
61662012-05-24 Pedro Alves <palves@redhat.com>
6167
6168 PR gdb/7205
6169
43aaf8b6 6170 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6171
2ea28649
PA
61722012-05-24 Pedro Alves <palves@redhat.com>
6173
6174 PR gdb/7205
6175
6176 Replace target_signal with gdb_signal throughout.
6177
8d409d16
MR
61782012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6179
6180 * linux-low.c (linux_store_registers): Avoid the copying sequence
6181 when no data has been retrieved by ptrace.
6182
23512c01
MGD
61832012-05-22 Will Deacon <will.deacon@arm.com>
6184
6185 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6186 Include asm/ptrace.h.
6187 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6188 already defined.
6189
4934b29e
MR
61902012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6191
6192 * linux-low.c (linux_store_registers): Don't re-retrieve data
6193 with ptrace that has already been obtained from /proc. Always
6194 copy any data retrieved with ptrace to the buffer supplied.
6195
bde24c0a
PA
61962012-05-11 Yao Qi <yao@codesourcery.com>
6197 Pedro Alves <palves@redhat.com>
6198
6199 * linux-low.c (enum stopping_threads_kind): New.
6200 (stopping_threads): Change type to `enum stopping_threads_kind'.
6201 (handle_extended_wait): If stopping and suspending threads, leave
6202 the new_lwp suspended too.
6203 (linux_wait_for_event): Adjust.
6204 (stop_all_lwps): Set `stopping_threads' to
6205 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6206 whether we're suspending threads or just stopping them. Assert no
6207 recursion happens.
6208
623b6bdf
YQ
62092012-04-29 Yao Qi <yao@codesourcery.com>
6210
6211 * server.h: Move some code to ...
6212 * gdbthread.h: ... here. New.
6213 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6214 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6215 (nto-low.o, win32-low.o): Likewise.
6216 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6217 * regcache.c, remote-utils.c, server.c: Likewise.
6218 * target.c, tracepoint.c, win32-low.c: Likewise.
6219
f15f9948
TJB
62202012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6221
6222 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6223 (PTRACE_ARG4_TYPE): Likewise.
6224 (PTRACE_XFER_TYPE): Likewise.
6225 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6226 ptrace to PTRACE_ARG3_TYPE.
6227 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6228 (PTRACE_ARG4_TYPE): Likewise.
6229 (PTRACE_XFER_TYPE): Likewise.
6230 (linux_detach_one_lwp): Cast fourth argument of
6231 ptrace to long then PTRACE_ARG4_TYPE.
6232 (regsets_fetch_inferior_registers): Cast third argument of
6233 ptrace to long then PTRACE_ARG3_TYPE.
6234 (regsets_store_inferior_registers): Likewise.
6235
38ea300a
PA
62362012-04-20 Pedro Alves <palves@redhat.com>
6237
6238 * configure: Regenerate.
6239
c971b7fa
PA
62402012-04-19 Pedro Alves <palves@redhat.com>
6241
43aaf8b6 6242 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6243 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6244 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6245 (all, install-only, uninstall, clean-info, all-lib, clean): No
6246 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6247 (maintainer-clean realclean distclean): Use subdir_do.
6248 (subdir_do): New.
6249 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6250 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6251 * acinclude.m4: Include acx_configure_dir.m4.
6252 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6253 calls. Call AC_PROG_RANLIB. Configure gnulib using
6254 ACX_CONFIGURE_DIR.
6255 (GNULIB): New.
6256 (GNULIB_STDINT_H): Adjust.
6257 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6258 * gdbreplay.c: Include build-gnulib/config.h.
6259 * server.h: Likewise.
6260 * aclocal.m4: Regenerate.
6261 * config.in: Regenerate.
6262 * configure: Regenerate.
c971b7fa 6263
809277f8
PA
62642012-04-19 Pedro Alves <palves@redhat.com>
6265
6266 * Makefile.in (LIBGNU, INCGNU): Adjust.
6267 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6268 (all, install-only, uninstall, clean-info, all-lib, clean)
6269 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6270 * configure.ac: Adjust AC_OUTPUT output.
6271 * aclocal.m4: Regenerate.
6272 * configure: Regenerate.
6273
fd9bb8b8
PA
62742012-04-19 Pedro Alves <palves@redhat.com>
6275
6276 * Makefile.in (generated_files): New.
6277 (server_h): Remove the explicit dependency on config.h, and depend
6278 on $generated_files.
6279
1c298c66
PA
62802012-04-19 Pedro Alves <palves@redhat.com>
6281
6282 * Makefile.in (INCGNU): Add -Ignulib.
6283
57c4b50b
PA
62842012-04-19 Pedro Alves <palves@redhat.com>
6285
6286 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6287 (INCGNU): ... this, and spell out -I here.
6288 (GNULIB_LIB): Rename to ...
6289 (LIBGNU): ... this.
6290 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6291
1030e047
PA
62922012-04-19 Pedro Alves <palves@redhat.com>
6293
6294 * config.in: Regenerate.
6295
447d4319
PA
62962012-04-19 Pedro Alves <palves@redhat.com>
6297
6298 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6299 * server.h (memmem): Remove declaration.
6300 * config.in: Regenerate.
6301 * configure: Regenerate.
6302
aad9eab9
YQ
63032012-04-19 Yao Qi <yao@codesourcery.com>
6304
6305 * Makefile.in (SFILES): Add common/vec.c.
6306 (OBS): Add vec.o.
6307 (vec.o): New rule.
6308
3e10640f
YQ
63092012-04-19 Yao Qi <yao@codesourcery.com>
6310
6311 * remote-utils.c (prepare_resume_reply): Replace with macro
6312 target_core_of_thread.
6313 * server.c (handle_qxfer_threads_proper): Likewise.
6314 * target.h (traget_core_of_thread): New macro.
6315
71622373
PA
63162012-04-18 Pedro Alves <palves@redhat.com>
6317
6318 * aclocal.m4: Regenerate.
6319 * configure: Regenerate.
6320
80d26939
YQ
63212012-04-16 Yao Qi <yao@codesourcery.com>
6322
6323 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6324 duplicated on address.
6325
42476b70
YQ
63262012-04-16 Yao Qi <yao@codesourcery.com>
6327
6328 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6329 (struct tracepoint_action_ops) <send>: New field.
6330 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6331 (agent_expr_send, x_tracepoint_action_send): New.
6332 (l_tracepoint_action_send): New.
6333 (cmd_qtdp): Download and install tracepoint
6334 according to `use_agent'.
6335 (run_inferior_command): Add one more parameter `len'.
6336 Update callers.
6337 (tracepoint_send_agent): New.
6338 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6339
7bc83639
YQ
63402012-04-16 Yao Qi <yao@codesourcery.com>
6341
6342 * tracepoint.c (download_tracepoints): Moved to ...
6343 (cmd_qtstart): ... here.
6344
5f18041e
YQ
63452012-04-14 Yao Qi <yao@codesourcery.com>
6346
6347 * tracepoint.c: Include inttypes.h.
6348 (struct collect_memory_action): Use sized types.
6349 (struct tracepoint): Likewise.
6350 (cmd_qtdp, stop_tracing): Update print specifiers.
6351 (cmd_qtp, response_tracepoint): Likewise.
6352 (collect_data_at_tracepoint): Likewise.
6353 (collect_data_at_step): Likewise.
6354
55a8c076
YQ
63552012-04-14 Yao Qi <yao@codesourcery.com>
6356
6357 Import gnulib module inttypes.
6358 * aclocal.m4, config.in, configure: Regenerated.
6359
dc750257
YQ
63602012-04-14 Yao Qi <yao@codesourcery.com>
6361
6362 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6363 Makefile and config.status at last.
6364
0ab5faf9
YQ
63652012-04-13 Yao Qi <yao@codesourcery.com>
6366
6367 * tracepoint.c: Include stdint.h unconditionally.
6368
18f5fd81
TJB
63692012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6370
6371 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6372 on BFD_HAVE_SYS_PROCFS_TYPE.
6373 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6374 * configure: Regenerate.
6375 * config.in: Likewise.
6376
4d47af5c
L
63772012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6378
6379 * Makefile.in (clean): Also remove x32.c x32-linux.c
6380 x32-avx.c x32-avx-linux.c.
6381 (x32.o): New target.
6382 (x32.c): Likewise.
6383 (x32-linux.o): Likewise.
6384 (x32-linux.c): Likewise.
6385 (x32-avx.o): Likewise.
6386 (x32-avx.c): Likewise.
6387 (x32-avx-linux.o): Likewise.
6388 (x32-avx-linux.c): Likewise.
6389
6390 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6391 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6392 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6393 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6394 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6395 i386/x32-avx-linux.xml.
6396
6397 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6398 (init_registers_x32_avx_linux): Likwise.
6399 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6400 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6401
ecedbe58
PA
64022012-04-13 Pedro Alves <palves@redhat.com>
6403
6404 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6405 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6406 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6407 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6408 the sub-make.
6409
c92b5177
L
64102012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6411
6412 * linux-x86-low.c (compat_x32_clock_t): New.
6413 (compat_x32_siginfo_t): Likewise.
6414 (compat_x32_siginfo_from_siginfo): Likewise.
6415 (siginfo_from_compat_x32_siginfo): Likewise.
6416 (linux_is_elf64): Likewise.
6417 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6418 and siginfo_from_compat_x32_siginfo for x32.
6419 (x86_arch_setup): Set linux_is_elf64.
6420
214d508e
L
64212012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6422
6423 PR gdb/13969
6424 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6425 e_machine field.
6426 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6427 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6428 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6429 compatible with process.
6430
c9a1864a
YQ
64312012-04-12 Yao Qi <yao@codesourcery.com>
6432
6433 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6434 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6435 (install-only, install-info, clean): Handle sub dir gnulib.
6436 (all-lib, am--refresh): New targets.
6437 (memmem.o): Remove target.
6438 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6439 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6440 (AC_REPLACE_FUNCS): Remove memmem.
6441 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6442 (AC_OUTPUT): Generate Makefile in gnulib/.
6443 * aclocal.m4, config.in, configure: Regenerated.
6444
367ba2c2
MR
64452012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6446
6447 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6448
9d236627
PA
64492012-04-05 Pedro Alves <palves@redhat.com>
6450
6451 -Werror=strict-aliasing
6452
6453 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6454 pointer.
6455
111217b3
PA
64562012-04-04 Pedro Alves <palves@redhat.com>
6457
6458 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6459 (sparc_store_gregset_from_stack, sparc_store_gregset)
6460 (sparc_breakpoint_at): Fix formatting.
6461
8365dcf5
TJB
64622012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6463
6464 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6465 are available.
6466 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6467 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6468 * config.in: Regenerate.
6469 * configure: Likewise.
6470
689cc2ae
PA
64712012-03-29 Pedro Alves <palves@redhat.com>
6472
6473 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6474 Correct ptrace arguments.
6475
c14dfd32
PA
64762012-03-28 Pedro Alves <palves@redhat.com>
6477
6478 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6479 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6480 (IA64_FR1_REGNUM): New defines.
6481 (ia64_fetch_register): New.
6482 (the_low_target): Install it.
6483 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6484 field.
6485 * linux-low.c (linux_fetch_registers): Try the
6486 the_low_target.fetch_register hook first.
6487
6488 * linux-arm-low.c (the_low_target): Adjust.
6489 * linux-bfin-low.c (the_low_target): Adjust.
6490 * linux-cris-low.c (the_low_target): Adjust.
6491 * linux-crisv32-low.c (the_low_target): Adjust.
6492 * linux-m32r-low.c (the_low_target): Adjust.
6493 * linux-m68k-low.c (the_low_target): Adjust.
6494 * linux-mips-low.c (the_low_target): Adjust.
6495 * linux-ppc-low.c (the_low_target): Adjust.
6496 * linux-s390-low.c (the_low_target): Adjust.
6497 * linux-sh-low.c (the_low_target): Adjust.
6498 * linux-sparc-low.c (the_low_target): Adjust.
6499 * linux-tic6x-low.c (the_low_target): Adjust.
6500 * linux-x86-low.c (the_low_target): Adjust.
6501 * linux-xtensa-low.c (the_low_target): Adjust.
6502
63c88e13
PA
65032012-03-26 Pedro Alves <palves@redhat.com>
6504
6505 * server.c (handle_qxfer_libraries): Don't bail early if
6506 the_target->qxfer_libraries_svr4 is not NULL.
6507
fb723180
PA
65082012-03-26 Pedro Alves <palves@redhat.com>
6509
6510 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6511
0afae3cf
PA
65122012-03-23 Pedro Alves <palves@redhat.com>
6513
6514 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6515 "library-list-svr4" element's start tag when the the DSO list is
6516 empty.
6517
485f1ee4
PA
65182012-03-23 Pedro Alves <palves@redhat.com>
6519
6520 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6521 a variable whose type size is the same as the inferior's pointer
6522 size.
6523
a5362b9a
TS
65242012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6525
6526 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6527 struct siginfo.
6528 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6529 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6530 * linux-low.h: Include <signal.h>.
6531 (struct siginfo): Remove forward declaration.
6532 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6533 struct siginfo.
6534
d226c142
MF
65352012-03-21 Mike Frysinger <vapier@gentoo.org>
6536
6537 * .gitignore: Ignore more files.
6538
122f36ef
PA
65392012-03-19 Pedro Alves <palves@redhat.com>
6540 Jan Kratochvil <jan.kratochvil@redhat.com>
6541
6542 * server.c (cont_thread, general_thread): Add describing comments.
6543 (start_inferior): Clear `cont_thread'.
6544 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6545 of a process.
6546
fc3e5175
YQ
65472012-03-15 Yao Qi <yao@codesourcery.com>
6548
6549 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6550 handling to ...
6551 (cmd_qtdp): ... here.
6552
8d0d92cd
YQ
65532012-03-15 Yao Qi <yao@codesourcery.com>
6554
6555 * tracepoint.c (struct tracepoint_action_ops): New.
6556 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6557 (m_tracepoint_action_download): New.
6558 (r_tracepoint_action_download): New.
6559 (x_tracepoint_action_download): New.
6560 (l_tracepoint_action_download): New.
6561 (add_tracepoint_action): Install `action->ops' according type.
6562 (download_tracepoint_1): Move code `download' function pointer
6563 of various tracepoint_action_ops.
6564
87b0bb13
JK
65652012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6566
6567 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6568 linux_ptrace_attach_warnings.
6569
5f572dec
JK
65702012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6571
6572 * Makefile.in (linux-ptrace.o): New.
6573 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6574 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6575 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6576 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6577 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6578 of these targets.
6579 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6580
f4647387
YQ
65812012-03-08 Yao Qi <yao@codesourcery.com>
6582 Pedro Alves <palves@redhat.com>
6583
6584 Fix PR server/13392.
6585 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6586 offset of JMP insn.
6587 * tracepoint.c (remove_tracepoint): New.
6588 (cmd_qtdp): Call remove_tracepoint when failed to install.
6589
9b224c5e
PA
65902012-03-07 Pedro Alves <palves@redhat.com>
6591
6592 * linux-low.c (get_detach_signal): New.
6593 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6594 Pass on pending signals to PTRACE_DETACH. Check the result of the
6595 ptrace call.
6596 * server.c (program_signals, program_signals_p): New.
6597 (handle_general_set): Handle QProgramSignals.
6598 * server.h (program_signals, program_signals_p): Declare.
6599
e237a7e2
JK
66002012-03-05 Pedro Alves <palves@redhat.com>
6601 Jan Kratochvil <jan.kratochvil@redhat.com>
6602
6603 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6604 New comment why.
6605
5808517f
YQ
66062012-03-03 Yao Qi <yao@codesourcery.com>
6607
6608 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6609 agent_look_up_symbols.
6610
58b4daa5
YQ
66112012-03-03 Yao Qi <yao@codesourcery.com>
6612
6613 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6614 (linux-x86-low.o): Likewise.
6615 * server.h: Remove in_process_agent_loaded.
6616 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6617 common/agent.c.
6618 Update callers.
6619
8ffcbaaf
YQ
66202012-03-03 Yao Qi <yao@codesourcery.com>
6621
6622 * tracepoint.c (gdb_agent_capability): New global.
6623 (in_process_agent_loaded_ust): Renamed to
6624 `in_process_agent_supports_ust'.
6625 Update callers.
6626 (in_process_agent_supports_ust): Call agent_capability_check.
6627 (clear_installed_tracepoints): Assert that agent supports
6628 agent.
6629
d1feda86
YQ
66302012-03-03 Yao Qi <yao@codesourcery.com>
6631
6632 * linux-low.c (linux_supports_agent): New.
6633 (linux_target_ops): Initialize field `supports_agent' with
6634 linux_supports_agent.
6635 * target.h (struct target_ops) <supports_agent>: New.
6636 (target_supports_agent): New macro.
6637 * server.c (handle_general_set): Handle packet 'QAgent'.
6638 (handle_query): Send `QAgent+'.
6639 * Makefile.in (server.o): Depends on agent.h.
6640
2fa291ac
YQ
66412012-03-03 Yao Qi <yao@codesourcery.com>
6642
6643 * Makefile.in (OBS): Add agent.o.
6644 Add new rule for agent.o.
6645 Track dependence of tracepoint.c on agent.h.
6646 * tracepoint.c (run_inferior_command_1):
6647 (run_inferior_command): Call agent_run_command.
6648 (gdb_ust_connect_sync_socket): Deleted. Move it to
6649 common/agent.c.
6650 (resume_thread, stop_thread): Likewise.
6651 (gdb_ust_socket_init): Renamed to ...
6652 (gdb_agent_socket_init): ... New.
6653 (gdb_ust_thread): Renamed to ...
6654 (gdb_agent_helper_thread): ... New.
6655 (gdb_ust_init): Move some code to ...
6656 (gdb_agent_init): ... here. New.
6657 [HAVE_UST]: Call gdb_ust_init.
6658 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6659 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6660 * config.in, configure: Regenerated.
6661
05044653
PA
66622012-03-02 Pedro Alves <palves@redhat.com>
6663
6664 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6665 * linux-low.c (struct simple_pid_list): New.
6666 (stopped_pids): New a struct simple_pid_list pointer.
6667 (add_to_pid_list, pull_pid_from_list): New.
6668 (handle_extended_wait): Don't assume the first signal new children
6669 report is SIGSTOP. Adjust call to pull_pid_from_list.
6670 (linux_wait_for_lwp): Adjust.
6671
8d00225b
YQ
66722012-03-02 Yao Qi <yao@codesourcery.com>
6673
6674 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6675 debug log.
6676
19560ba5
YQ
66772012-03-02 Yao Qi <yao@codesourcery.com>
6678
6679 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6680 `stop_pc' and `tpoint'. Update caller.
6681
1faeff08
MR
66822012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6683
6684 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6685 * linux-low.c (use_linux_regsets): New macro.
6686 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6687 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6688 (linux_register_in_regsets): New function.
6689 (usr_fetch_inferior_registers): Skip registers covered by
6690 regsets.
6691 (usr_store_inferior_registers): Likewise.
6692 (usr_fetch_inferior_registers): New macro.
6693 (usr_store_inferior_registers): Likewise.
6694 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6695 (linux_store_registers): Likewise.
6696 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6697 prototype.
6698 (init_registers_mips64_dsp_linux): Likewise.
6699 (init_registers_mips_linux): New macro.
6700 (init_registers_mips_dsp_linux): Likewise.
6701 (mips_dsp_num_regs): Likewise.
6702 (DSP_BASE, DSP_CONTROL): New fallback macros.
6703 (mips_base_regs): New macro.
6704 (mips_regmap): Use it. Fix the size.
6705 (mips_dsp_regmap): New variable.
6706 (mips_dsp_regset_bitmap): Likewise.
6707 (mips_arch_setup): New function.
6708 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6709 than mips_regmap.
6710 (mips_cannot_store_register): Likewise.
6711 (the_low_target): Update .arch_setup, .num_regs and .regmap
6712 initializers. Add .regset_bitmap initializer.
6713 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6714 initializer.
6715 * linux-bfin-low.c (the_low_target): Likewise.
6716 * linux-cris-low.c (the_low_target): Likewise.
6717 * linux-crisv32-low.c (the_low_target): Likewise.
6718 * linux-ia64-low.c (the_low_target): Likewise.
6719 * linux-m32r-low.c (the_low_target): Likewise.
6720 * linux-m68k-low.c (the_low_target): Likewise.
6721 * linux-ppc-low.c (the_low_target): Likewise.
6722 * linux-s390-low.c (the_low_target): Likewise.
6723 * linux-sh-low.c (the_low_target): Likewise.
6724 * linux-sparc-low.c (the_low_target): Likewise.
6725 * linux-tic6x-low.c (the_low_target): Likewise.
6726 * linux-x86-low.c (the_low_target): Likewise.
6727 * linux-xtensa-low.c (the_low_target): Likewise.
6728 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6729 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6730 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6731 srv_xmlfiles.
6732 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6733 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6734
c03e6ccc
YQ
67352012-02-29 Yao Qi <yao@codesourcery.com>
6736 Pedro Alves <palves@redhat.com>
6737
6738 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6739 `step_over_finished' is true.
6740
644cebc9
PA
67412012-02-27 Pedro Alves <palves@redhat.com>
6742
6743 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6744 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6745
c14d7ab2
PA
67462012-02-27 Pedro Alves <palves@redhat.com>
6747
6748 PR server/9684
6749 * linux-low.c (pid_is_stopped): New.
6750 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6751
412c89dd
LM
67522012-02-25 Luis Machado <lgustavo@codesourcery.com>
6753
6754 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6755 of conditions.
6756
b745defe
MR
67572012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6758
6759 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6760
9f3a5c85
LM
67612012-02-24 Luis Machado <lgustavo@codesourcery>
6762
6763 * server.c (handle_query): Advertise support for target-side
6764 breakpoint condition evaluation.
6765 (process_point_options): New function.
6766 (process_serial_event): When inserting a breakpoint, check for
6767 a target-side condition that should be evaluated.
6768
6769 * mem-break.c: Include regcache.h and ax.h.
6770 (point_cond_list_t): New data structure.
6771 (breakpoint) <cond_list>: New field.
6772 (find_gdb_breakpoint_at): Make non-static.
6773 (delete_gdb_breakpoint_at): Clear any target-side
6774 conditions.
6775 (clear_gdb_breakpoint_conditions): New function.
6776 (add_condition_to_breakpoint): Likewise.
6777 (add_breakpoint_condition): Likewise.
6778 (gdb_condition_true_at_breakpoint): Likewise.
6779 (gdb_breakpoint_here): Return result directly instead
6780 of going through a local variable.
6781
6782 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6783 (clear_gdb_breakpoint_conditions): Likewise.
6784 (add_breakpoint_condition): Likewise.
6785 (gdb_condition_true_at_breakpoint): Likewise.
6786
6787 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6788 (need_step_over_p): Take target-side breakpoint condition into
6789 consideration.
6790
5e1dc496
LM
67912012-02-24 Luis Machado <lgustavo@codesourcery>
6792
6793 * server.h: Include tracepoint.h.
6794 (agent_mem_read, agent_get_trace_state_variable_value,
6795 agent_set_trace_state_variable_value,
6796 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6797 get_set_tsv_func_addr): New prototypes.
6798
6799 * ax.h: New include file.
6800 * ax.c: New source file.
6801
6802 * tracepoint.c: Include ax.h.
6803 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6804 agent_expr, eval_result_type): Move to ax.h.
6805 (parse_agent_expr): Rename to ...
6806 (gdb_parse_agent_expr): ... this, make it non-static and move
6807 to ax.h.
6808 (unparse_agent_expr) Rename to ...
6809 (gdb_unparse_agent_expr): ... this, make it non-static and move
6810 to ax.h.
6811 (eval_agent_expr): Rename to ...
6812 (eval_tracepoint_agent_expr): ... this.
6813 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6814 forward declarations.
6815 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6816 (agent_get_trace_state_variable_value): New function.
6817 (agent_set_trace_state_variable_value): New function.
6818 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6819 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6820 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6821 (condition_true_at_tracepoint): Likewise.
6822 (parse_agent_expr): Rename to ...
6823 (gdb_parse_agent_expr): ... this and move to ax.c.
6824 (unparse_agent_expr): Rename to ...
6825 (gdb_unparse_agent_expr): ... this and move to ax.c.
6826 (gdb_agent_op_name): Move to ax.c.
6827 (eval_agent_expr): Rename to ...
6828 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6829 and move to ax.c.
6830 (eval_tracepoint_agent_expr): New function.
6831 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6832 non-static.
5e1dc496
LM
6833 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6834 ax.c.
6835 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6836 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6837 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6838 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6839 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6840 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6841 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6842 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6843 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6844 (compile_bytecodes): Remove forward declaration.
6845 (is_goto_target): Move to ax.c.
6846 (compile_bytecodes): Move to ax.c and call
6847 agent_get_trace_state_variable_value (...) and
6848 agent_set_trace_state_variable_value (...).
6849
6850 * Makefile.in: Update ax.c and IPA dependencies.
6851
277e4e52
PA
68522012-02-24 Pedro Alves <palves@redhat.com>
6853
6854 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6855 (cmd_bigqtbuffer_circular): ... this. Only handle
6856 'QTBuffer:circular:'.
6857 (handle_tracepoint_general_set): Adjust.
6858
bf4c19f7
YQ
68592012-02-16 Yao Qi <yao@codesourcery.com>
6860
6861 * inferiors.c: Move code to ...
6862 * dll.c: .... here. New.
6863 * server.h: Declare clear_dlls.
6864 * Makefile.in (SFILES): Add dll.c.
6865 (OBS): Add dll.o
6866 (dll.o): New rule.
6867
d73f2619
YQ
68682012-02-11 Yao Qi <yao@codesourcery.com>
6869
6870 * server.c: (handle_monitor_command): Add a new parameter
6871 `own_buf'.
6872 (handle_query): Update caller.
6873
f8255c2a
JB
68742012-02-09 Joel Brobecker <brobecker@adacore.com>
6875
6876 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6877 * configure, config.in: Regenerate.
6878 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6879 is not defined.
6880
da84f473
PA
68812012-02-02 Pedro Alves <palves@redhat.com>
6882
6883 Try SIGKILL first, then PTRACE_KILL.
6884 * linux-low.c (linux_kill_one_lwp): New.
6885 (linux_kill_one_lwp): Rename to ...
6886 (kill_one_lwp_callback): ... this. Use the new
6887 linux_kill_one_lwp.
6888
e886a173
PA
68892012-02-02 Pedro Alves <palves@redhat.com>
6890
6891 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6892 inferior.
6893
be07f1a2
PA
68942012-01-27 Pedro Alves <palves@redhat.com>
6895
6896 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6897 (elf_64_file_p): Make static.
6898 (linux_pid_exe_is_elf_64_file): New.
6899 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6900 Delete declarations.
6901 (linux_pid_exe_is_elf_64_file): Declare.
6902 * linux-x86-low.c (x86_arch_setup): Use
6903 linux_pid_exe_is_elf_64_file.
6904
d8301ad1
JK
69052012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6906
6907 * linux-low.c (linux_wait_for_event_1): Rename to ...
6908 (linux_wait_for_event): ... here and merge it with former
6909 linux_wait_for_event - new variable wait_ptid, use it.
6910 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6911
01b17894
PA
69122012-01-23 Pedro Alves <palves@redhat.com>
6913
6914 * server.c (main): Avoid yet another case of infinite loop while
6915 detaching/killing after a longjmp.
6916
e825046f
JK
69172012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6918
6919 Code cleanup.
6920 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6921
b9e7b9c3
UW
69222012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6923
6924 * hostio.c (handle_readlink): New function.
6925 (handle_vFile): Call it to handle "vFile:readlink" packets.
6926
901f9912
UW
69272012-01-20 Pedro Alves <palves@redhat.com>
6928 Ulrich Weigand <ulrich.weigand@linaro.org>
6929
6930 * server.c (handle_v_requests): Only support vAttach and vRun to
6931 start multiple processes when in extended protocol mode.
6932
fc1ab1a0
PA
69332012-01-17 Pedro Alves <palves@redhat.com>
6934
6935 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6936 memalign plus mprotect to allocate the scratch buffer.
6937
7d5d4e98
PA
69382012-01-13 Pedro Alves <palves@redhat.com>
6939
6940 * server.c (attach_inferior): Clear `cont_thread'.
6941
f128d5e9
PA
69422012-01-13 Pedro Alves <palves@redhat.com>
6943
6944 * server.c (main): Avoid infinite loop while detaching/killing
6945 after a longjmp.
6946
06db92f0
DE
69472012-01-09 Doug Evans <dje@google.com>
6948
6949 * server.c (start_inferior): Set last_ptid in --wrapper case.
6950
32d92999
YQ
69512012-01-06 Yao Qi <yao@codesourcery.com>
6952
6953 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6954 defined.
6955 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6956
5e0a92a9
YQ
69572012-01-04 Yao Qi <yao@codesourcery.com>
6958
6959 * tracepoint.c (cmd_qtdp): Print debug message
6960 for static tracepoint.
6961
ae639e8c
YQ
69622012-01-04 Yao Qi <yao@codesourcery.com>
6963
6964 * tracepoint.c (trace_vdebug): Differentiate debug message
6965 between gdbserver and IPA.
6966
f72429c5
YQ
69672012-01-03 Yao Qi <yao@codesourcery.com>
6968
6969 * tracepoint.c (tracepoint_was_hit): Don't collect for
6970 static tracepoint.
6971
12c3e59c
JB
69722012-01-02 Joel Brobecker <brobecker@adacore.com>
6973
6974 * terminal.h: Reformat copyright header.
6975
67827812
JB
69762012-01-02 Joel Brobecker <brobecker@adacore.com>
6977
6978 * server.c (gdbserver_version): Update copyright year.
6979 * gdbreplay.c (gdbreplay_version): Likewise.
6980
3e52c33d
JK
69812011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6982
6983 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6984
6985 Revert:
6986 2011-12-18 Hui Zhu <teawater@gmail.com>
6987 * linux-low.c (linux_create_inferior): Save return value to ret.
6988
66f1260e
HZ
69892011-12-18 Hui Zhu <teawater@gmail.com>
6990
6991 * linux-low.c (linux_create_inferior): Save return value to ret.
6992
e77616d7
DE
69932011-12-16 Doug Evans <dje@google.com>
6994
e7b06c57
DE
6995 * linux-low.c (linux_create_inferior): If stdio connection,
6996 redirect stdin from /dev/null, stdout to stderr.
6997 * remote-utils.c (remote_is_stdio): New static global.
6998 (remote_connection_is_stdio): New function.
6999 (remote_prepare): Handle stdio connection.
7000 (remote_open): Ditto.
7001 (remote_close): Don't close stdin for stdio connections.
7002 (read_prim,write_prim): New functions. Replace all calls to
7003 read/write to these.
7004 * server.c (main): Watch for "-" argument. Move call to
7005 remote_prepare before start_inferior.
7006 * server.h (STDIO_CONNECTION_NAME): New macro.
7007 (remote_connection_is_stdio): Declare.
7008
e77616d7
DE
7009 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7010 in debugging output.
7011
82067193
YQ
70122011-12-15 Yao Qi <yao@codesourcery.com>
7013
7014 * tracepoint.c: Include sys/syscall.h.
7015 (gdb_ust_thread): Remove preprocessor conditional.
7016
82bfbe7e
PA
70172011-12-14 Pedro Alves <pedro@codesourcery.com>
7018
7019 * linux-low.c (linux_detach_one_lwp): Call
7020 the_low_target.prepare_to_resume before detaching.
7021
712c6575
YQ
70222011-12-14 Yao Qi <yao@codesourcery.com>
7023
7024 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7025 of write.
7026
d54d1edf
YQ
70272011-12-14 Yao Qi <yao@codesourcery.com>
7028
7029 * i386-low.c (i386_low_stopped_data_address): Initialize local
7030 variable `control'.
7031
6210a125
PA
70322011-12-13 Pedro Alves <pedro@codesourcery.com>
7033
7034 PR remote/13492
7035
7036 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7037 DR_CONTROL unless necessary. Extend comments.
7038 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7039 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7040
2ece8244
YQ
70412011-12-13 Yao Qi <yao@codesourcery.com>
7042
7043 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7044 macros.
7045 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7046
784867a5
JK
70472011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7048
7049 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7050 Print new debug message for such case.
7051
6bf36717
JK
70522011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7053
7054 Fix overlapping memcpy.
7055 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7056 the read_inferior_memory transfer.
7057 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7058 write_inferior_memory transfer.
7059 (set_fast_tracepoint_jump): New variable buf. Use it for the
7060 read_inferior_memory and write_inferior_memory transfers.
7061 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7062 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7063 Use it for the write_inferior_memory transfer.
7064 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7065 buffers.
7066
50275556
MR
70672011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7068
7069 * linux-low.c (fetch_register, store_register): Make code
7070 consistent, fix formatting.
7071
7325beb4
MR
70722011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7073
7074 * linux-low.c (usr_store_inferior_registers): Factor out code
7075 to handle individual registers into...
7076 (store_register): ... this new function.
7077
c642a434
UW
70782011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7079
7080 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7081 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7082 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7083 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7084 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7085 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7086 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7087 (srv_xmlfiles): Add new XML files.
7088
7089 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7090 and <sys/uio.h>.
7091 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7092 (init_registers_s390_linux32v1): Add prototype.
7093 (init_registers_s390_linux32v2): Likewise.
7094 (init_registers_s390_linux64v1): Likewise.
7095 (init_registers_s390_linux64v2): Likewise.
7096 (init_registers_s390x_linux64v1): Likewise.
7097 (init_registers_s390x_linux64v2): Likewise.
7098 (s390_num_regs): Increment to 52.
7099 (s390_regmap): Add orig_r2 register.
7100 (s390_num_regs_3264): Increment to 68.
7101 (s390_regmap_3264): Add orig_r2 register.
7102 (s390_collect_ptrace_register): Handle orig_r2 register.
7103 (s390_supply_ptrace_register): Likewise.
7104 (s390_fill_last_break): New function.
7105 (s390_store_last_break): Likewise.
7106 (s390_fill_system_call): New function.
7107 (s390_store_system_call): Likewise.
7108 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7109 register sets.
7110 (s390_check_regset): New function.
7111 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7112 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7113 Update target_regsets for available register sets.
7114
2268b414
JK
71152011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7116 Jan Kratochvil <jan.kratochvil@redhat.com>
7117
7118 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7119 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7120 New.
7121 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7122 * linux-low.h (struct process_info_private): New member r_debug.
7123 * server.c (handle_qxfer_libraries): Call
7124 the_target->qxfer_libraries_svr4.
7125 (handle_qxfer_libraries_svr4): New function.
7126 (qxfer_packets): New entry "libraries-svr4".
7127 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7128 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7129 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7130 PACKET_qXfer_libraries_svr4.
7131
d6db1fab
UW
71322011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7133
7134 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7135 PSW address/mask between 8-byte and 16-byte formats.
7136 (s390_supply_ptrace_register): Likewise.
7137 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7138 basic addressing mode bit.
7139
242f5f1c
SS
71402011-11-24 Stan Shebs <stan@codesourcery.com>
7141
7142 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7143
f196051f
SS
71442011-11-17 Stan Shebs <stan@codesourcery.com>
7145
7146 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7147 (tracing_start_time): New global.
7148 (tracing_stop_time): New global.
7149 (tracing_user_name): New global.
7150 (tracing_notes): New global.
7151 (tracing_stop_note): New global.
7152 (cmd_qtstart): Set traceframe_usage, start_time.
7153 (stop_tracing): Set stop_time.
7154 (cmd_qtstatus): Report additional status.
7155 (cmd_qtp): New function.
7156 (handle_tracepoint_query): Call it.
7157 (cmd_qtnotes): New function.
7158 (handle_tracepoint_general_set): Call it.
7159 (get_timestamp): Rename from tsv_get_timestamp.
7160
405f8e94
SS
71612011-11-14 Stan Shebs <stan@codesourcery.com>
7162 Kwok Cheung Yeung <kcy@codesourcery.com>
7163
7164 * linux-x86-low.c (small_jump_insn): New.
7165 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7166 trampoline and error message, build a trampoline and issue a small
7167 jump instruction to it.
7168 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7169 trampoline and error message.
7170 (x86_get_min_fast_tracepoint_insn_len): New.
7171 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7172 * linux-low.h (struct linux_target_ops): Add arguments to
7173 install_fast_tracepoint_jump_pad operation, add new operation.
7174 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7175 arguments.
7176 (linux_get_min_fast_tracepoint_insn_len): New function.
7177 (linux_target_op): Add new operation.
7178 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7179 (gdb_trampoline_buffer_end): Ditto.
7180 (gdb_trampoline_buffer_error): Ditto.
7181 (struct ipa_sym_addresses): Add fields for new IPA variables.
7182 (symbol_list): Add entries for new IPA variables.
7183 (struct tracepoint): Add fields to hold the address range of the
7184 trampoline used by the tracepoint.
7185 (trampoline_buffer_head): New static variable.
7186 (trampoline_buffer_tail): Ditto.
7187 (claim_trampoline_space): New function.
7188 (have_fast_tracepoint_trampoline_buffer): New function.
7189 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7190 structure.
7191 (install_fast_tracepoint): Ditto, also add error buffer argument.
7192 (cmd_qtminftpilen): New function.
7193 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7194 (fast_tracepoint_from_trampoline_address): New function.
7195 (fast_tracepoint_collecting): Handle trampoline as part of jump
7196 pad space.
7197 (set_trampoline_buffer_space): New function.
7198 (initialize_tracepoint): Initialize new IPA variables.
7199 * target.h (struct target_ops): Add arguments to
7200 install_fast_tracepoint_jump_pad operation, add new
7201 get_min_fast_tracepoint_insn_len operation.
7202 (target_get_min_fast_tracepoint_insn_len): New.
7203 (install_fast_tracepoint_jump_pad): Add arguments.
7204 * server.h (IPA_BUFSIZ): Define.
7205 * linux-i386-ipa.c: Include extra header files.
7206 (initialize_fast_tracepoint_trampoline_buffer): New function.
7207 (initialize_low_tracepoint): Call it.
7208 * server.h (set_trampoline_buffer_space): Declare.
7209 (claim_trampoline_space): Ditto.
7210 (have_fast_tracepoint_trampoline_buffer): Ditto.
7211
1e4d1764
YQ
72122011-11-14 Yao Qi <yao@codesourcery.com>
7213
7214 * server.c (handle_query): Handle InstallInTrace for qSupported.
7215 * tracepoint.c (add_tracepoint): Sort list.
7216 (install_tracepoint, download_tracepoint): New.
7217 (cmd_qtdp): Call them to install and download tracepoints.
7218 (sort_tracepoints): Removed.
7219 (cmd_qtstart): Update.
7220
5c73ff4e
YQ
72212011-11-14 Yao Qi <yao@codesourcery.com>
7222
7223 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7224 * mem-break.h: Declare.
7225 * tracepoint.c (cmd_qtstart): Move some code to ...
7226 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7227 New.
7228 (download_tracepoints): Move some code to ...
7229 (download_tracepoint_1): ... here. New.
7230
86a30030
YQ
72312011-11-08 Yao Qi <yao@codesourcery.com>
7232
7233 * remote-utils.c (relocate_instruction): A comment fix.
7234
8d26e50c
JB
72352011-11-07 Joel Brobecker <brobecker@adacore.com>
7236
7237 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7238 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7239 dr_status_mirror and dr_control_mirror from debug_reg_state.
7240 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7241 (i386_initial_stuff): Remove use of deleted globals.
7242 (i386_get_thread_context, i386_set_thread_context,
7243 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7244 from debug_reg_state.
7245
a59306a3
YQ
72462011-11-05 Yao Qi <yao@codesourcery.com>
7247
7248 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7249 address as TPOINT's.
7250
3065dfb6
SS
72512011-11-02 Stan Shebs <stan@codesourcery.com>
7252
7253 * tracepoint.c (agent_mem_read_string): New function.
7254 (eval_agent_expr): Call it for tracenz.
7255 * server.c (handle_query): Report support for tracenz.
7256
fd0d8c7c
YQ
72572011-11-02 Yao Qi <yao@codesourcery.com>
7258
7259 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7260
609086b1
YQ
72612011-11-02 Yao Qi <yao@codesourcery.com>
7262
7263 * target.h: Fix a typo in comment.
7264
b9fd1791
PA
72652011-10-31 Pedro Alves <pedro@codesourcery.com>
7266
7267 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7268 clobber the breakpoints' shadows with fast tracepoint jumps.
7269 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7270 * target.c (write_inferior_memory): Also pass MYADDR down to
7271 check_mem_write.
7272
03583c20
UW
72732011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7274
7275 * configure.ac: Check support for personality routine.
7276 * configure: Regenerate.
7277 * config.in: Likewise.
7278 * linux-low.c: Include <sys/personality.h>.
7279 Define ADDR_NO_RANDOMIZE if necessary.
7280 (linux_create_inferior): Disable address space randomization when
7281 forking inferior, if requested.
7282 (linux_supports_disable_randomization): New function.
7283 (linux_target_ops): Install it.
7284 * server.h (disable_randomization): Declare.
7285 * server.c (disable_randomization): New global variable.
7286 (handle_general_set): Handle QDisableRandomization.
7287 (handle_query): Likewise for qSupported.
7288 (main): Support --disable-randomization and --no-disable-randomization
7289 command line arguments.
7290 * target.h (struct target_ops): Add supports_disable_randomization.
7291 (target_supports_disable_randomization): New macro.
7292
723b724b
MF
72932011-09-29 Mike Frysinger <vapier@gentoo.org>
7294
7295 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7296 ifdef check.
7297 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7298 [!PT_GETDSBT] (target_loadmap): New definition.
7299 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7300 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7301 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7302 and PT_GETDSBT to LINUX_LOADMAP.
7303 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7304 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7305
55329a5c 73062011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7307
7308 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7309 (arm_linux_hwbp_cap): New static variable.
7310 (arm_linux_get_hwbp_cap): Replace by ...
7311 (arm_linux_init_hwbp_cap): ... this new function.
7312 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7313 (arm_linux_get_hw_watchpoint_count): Likewise.
7314 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7315 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7316 (arm_prepare_to_resume): Use perror_with_name instead of error.
7317
55329a5c 73182011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7319
7320 * linux-arm-low.c: Include <signal.h>.
7321 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7322 (struct arm_linux_hwbp_cap): New data type.
7323 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7324 (struct arm_linux_hw_breakpoint): New data type.
7325 (MAX_BPTS, MAX_WPTS): Define.
7326 (struct arch_process_info, struct arch_lwp_info): New data types.
7327 (arm_linux_get_hwbp_cap): New function.
7328 (arm_linux_get_hw_breakpoint_count): Likewise.
7329 (arm_linux_get_hw_watchpoint_count): Likewise.
7330 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7331 (arm_hwbp_control_initialize): Likewise.
7332 (arm_hwbp_control_is_enabled): Likewise.
7333 (arm_hwbp_control_is_initialized): Likewise.
7334 (arm_hwbp_control_disable): Likewise.
7335 (arm_linux_hw_breakpoint_equal): Likewise.
7336 (arm_linux_hw_point_initialize): Likewise.
7337 (struct update_registers_data): New data structure.
7338 (update_registers_callback: New function.
7339 (arm_insert_point): Likewise.
7340 (arm_remove_point): Likewise.
7341 (arm_stopped_by_watchpoint): Likewise.
7342 (arm_stopped_data_address): Likewise.
7343 (arm_new_process): Likewise.
7344 (arm_new_thread): Likewise.
7345 (arm_prepare_to_resume): Likewise.
7346 (the_low_target): Register arm_insert_point, arm_remove_point,
7347 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7348 arm_new_thread, and arm_prepare_to_resume.
7349
6b9801d4
SS
73502011-09-15 Stan Shebs <stan@codesourcery.com>
7351
7352 * server.h (struct emit_ops): Add compare-goto fields.
7353 * tracepoint.c (gdb_agent_op_sizes): New table.
7354 (emit_eq_goto): New function.
7355 (emit_ne_goto): New function.
7356 (emit_lt_goto): New function.
7357 (emit_le_goto): New function.
7358 (emit_gt_goto): New function.
7359 (emit_ge_goto): New function.
7360 (is_goto_target): New function.
7361 (compile_bytecodes): Recognize special cases of compare-goto
7362 combinations and call specialized emitters for them.
7363 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7364 (amd64_emit_ne_goto): New function.
7365 (amd64_emit_lt_goto): New function.
7366 (amd64_emit_le_goto): New function.
7367 (amd64_emit_gt_goto): New function.
7368 (amd64_emit_ge_goto): New function.
7369 (amd64_emit_ops): Add the new functions.
7370 (i386_emit_eq_goto): New function.
7371 (i386_emit_ne_goto): New function.
7372 (i386_emit_lt_goto): New function.
7373 (i386_emit_le_goto): New function.
7374 (i386_emit_gt_goto): New function.
7375 (i386_emit_ge_goto): New function.
7376 (i386_emit_ops): Add the new functions.
7377
bf15cbda
SS
73782011-09-08 Stan Shebs <stan@codesourcery.com>
7379
7380 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7381 (i386_emit_epilogue): Restore %ebx.
7382
943ca1dd
JZ
73832011-08-31 Jie Zhang <jzhang918@gmail.com>
7384
7385 * server.c (step_thread): Remove definition.
7386 (process_serial_event): Don't handle Hs.
7387 * server.h (step_thread): Remove declaration.
7388 * target.c (set_desired_inferior): Remove use of step_thread.
7389
e3deef73
LM
73902011-08-24 Luis Machado <lgustavo@codesourcery.com>
7391
7392 * linux-low.c: Include linux-procfs.h.
7393 (linux_attach_lwp_1): Update comments.
7394 (linux_attach): Scan for existing threads when attaching to a
7395 process that is the tgid.
7396 * Makefile.in: Update dependencies.
7397
13da1c97
LM
73982011-08-24 Luis Machado <lgustavo@codesourcery.com>
7399
7400 * configure.srv: Add linux-procfs.o dependencies.
7401
881127c9
YQ
74022011-08-14 Yao Qi <yao@codesourcery.com>
7403
7404 * target.h (struct target_ops): Fix indent.
7405 * win32-low.c (win32_target_ops): Fix comment.
7406
58dbd541
YQ
74072011-08-14 Andrew Jenner <andrew@codesourcery.com>
7408 Yao Qi <yao@codesourcery.com>
7409
7410 * Makefile.in (clean): Remove tic6x-*.c files.
7411 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7412 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7413 (tic6x-c64xp-linux.c): Likewise.
7414 * configure.srv: Add support for tic6x-*-uclinux.
7415 * linux-tic6x-low.c: New.
7416 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7417
78d85199
YQ
74182011-08-14 Andrew Stubbs <ams@codesourcery.com>
7419 Yao Qi <yao@codesourcery.com>
7420
7421 * target.h (struct target_ops): Add read_loadmap.
7422 * linux-low.c (struct target_loadseg): New type.
7423 (struct target_loadmap): New type.
7424 (linux_read_loadmap): New function.
7425 (linux_target_ops): Add linux_read_loadmap.
7426 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7427 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7428 to NULL.
78d85199 7429
a959a88d
EZ
74302011-08-05 Eli Zaretskii <eliz@gnu.org>
7431
7432 * win32-low.c: Include <stdint.h>.
7433
1ced966e
PA
74342011-07-22 Pedro Alves <pedro@codesourcery.com>
7435
7436 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7437 to the inferior here.
7438 (i386_remove_aligned_watchpoint): Ditto.
7439 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7440 fit part of the watchpoint in the debug registers.
7441 (i386_update_inferior_debug_regs): New.
7442 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7443 registers, and only update the inferior on success.
7444 (i386_low_remove_watchpoint): Ditto.
7445
d26e3629
KY
74462011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7447
7448 * linux-low.c (compare_ints, unique, list_threads, show_process,
7449 linux_core_of_thread): Delete.
7450 (linux_target_ops): Change linux_core_of_thread to
7451 linux_common_core_of_thread.
7452 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7453 * utils.c (malloc_failure): Change type of argument.
7454 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7455 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7456 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7457 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7458 (IPA_OBJS): Add common-utils-ipa.o.
7459 (ptid_h, linux_osdata_h): New macros.
7460 (server_h): Add common/common-utils.h, common/xml-utils.h,
7461 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7462 common/ptid.h.
7463 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7464 ptid.o, buffer.o): New rules.
7465 (linux-low.o): Add common/linux-osdata.h as a dependency.
7466 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7467 * configure.ac: Add AC_HEADER_DIRENT check.
7468 * config.in: Regenerate.
7469 * configure: Regenerate.
7470 * remote-utils.c (xml_escape_text): Delete.
7471 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7472 buffer_xml_printf): Move to common/buffer.c.
7473 * server.c (main): Remove call to initialize_inferiors.
7474 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7475 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7476 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7477 internal_error, gdb_assert, gdb_assert_fail): Delete.
7478 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7479 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7480 common/buffer.h.
7481 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7482 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7483 initialize_inferiors): Delete.
7484
2275a1a7
PA
74852011-07-20 Pedro Alves <pedro@codesourcery.com>
7486
7487 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7488 symbol error.
7489
0a5b1e09
PA
74902011-05-31 Pedro Alves <pedro@codesourcery.com>
7491
7492 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7493 assertion.
7494 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7495
6938fd34
YQ
74962011-05-26 Yao Qi <yao@codesourcery.com>
7497
7498 * Makefile.in (thread-db.o): Track dependence to
7499 common/gdb_thread_db.h.
7500 * thread-db.c: include gdb_thread_db.h from right place.
7501
b481f9e0
TT
75022011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7503
7504 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7505 __FILE__ and __LINE__ to internal_error.
7506
98a5dd13
DE
75072011-05-13 Doug Evans <dje@google.com>
7508
7509 * thread-db.c (try_thread_db_load_from_sdir): New function.
7510 (try_thread_db_load_from_dir): New function.
7511 (thread_db_load_search): Handle $sdir, ignore $pdir.
7512 Remove trying of system directories if search of
7513 libthread-db-search-path fails, that is now done via $sdir.
7514
d248b706
KY
75152011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7516
7517 * server.c (handle_query): Add EnableDisableTracepoints to the list
7518 of supported features.
43aaf8b6 7519 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7520 tracepoints.
43aaf8b6
PA
7521 (cmd_qtenable_disable): New.
7522 (cmd_qtstart): Install tracepoints even if disabled.
7523 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7524 receiving a QTEnable or QTDisable packet.
7525 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7526 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7527 tracepoints.
7528 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7529
84e578fb
DE
75302011-05-10 Doug Evans <dje@google.com>
7531
7532 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7533
71f55dd8
DE
75342011-05-04 Doug Evans <dje@google.com>
7535
7536 * linux-low.c (linux_join): Skip process lookup.
7537 * spu-low.c (spu_join): Ditto.
7538 * server.c (join_inferiors_callback): Delete.
7539 (process_serial_event): For 'D' packet (detach) call join_inferior
7540 directly.
7541
4d393d60
JM
75422011-05-04 Joseph Myers <joseph@codesourcery.com>
7543
7544 * README: Don't mention xscale*-*-linux*.
7545 * configure.srv (xscale*-*-linux*): Don't handle target.
7546
b00ad6ff
NF
75472011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7548
7549 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7550 casting pointers.
7551 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7552 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7553 (i386_emit_void_call_2): Likewise.
7554
af96c192
YQ
75552011-04-26 Yao Qi <yao@codesourcery.com>
7556
43aaf8b6
PA
7557 * linux-low.c: Move common macros to linux-ptrace.h.
7558 Include linux-ptrace.h.
af96c192
YQ
7559 * Makefile.in (linux_ptrace_h): New.
7560 (linux-low.o): Depends on linux-ptrace.h.
7561
03f2bd59
JK
75622011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7563
7564 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7565 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7566 (remote_prepare): New function with most of the TCP code from ...
7567 (remote_open): ... here. Detect PORT here unconditionally. Move also
7568 setting transport_is_reliable.
7569 * server.c (run_once): New variable.
7570 (gdbserver_usage): Document it.
7571 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7572 the first run if RUN_ONCE.
7573 * server.h (run_once, remote_prepare): New declarations.
7574
7a9dd1b2
TT
75752011-04-19 Tom Tromey <tromey@redhat.com>
7576
7577 * win32-low.c (handle_load_dll): Remove duplicate "the".
7578
81239425
PM
75792011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7580
7581 Remove support for old Cygwin 1.5 versions.
7582 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7583 function to avoid warning.
7584 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7585 warning.
7586
9e0627f1
PM
75872011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7588
7589 * gdbserver/server.h (Macro _): Define it if not available.
7590
588eebee
MS
75912011-03-14 Michael Snyder <msnyder@vmware.com>
7592
348af9f7 7593 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7594
43f70d4c
JB
75952011-03-10 Joel Brobecker <brobecker@adacore.com>
7596
7597 * Makefile.in (maintainer-clean realclean distclean): Remove
7598 "make ... subdir_do" command.
7599
348af9f7
MS
76002011-03-10 Michael Snyder <msnyder@vmware.com>
7601
7602 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7603
7604 * server.c (handle_v_run): Free alloced buffer on early return.
7605
e637a4f5
YQ
76062011-03-09 Yao Qi <yao@codesourcery.com>
7607
7608 Revert:
7609 2011-03-04 Yao Qi <yao@codesourcery.com>
7610
7611 * Makefile.in: Remove GNU make feature --directory.
7612
7613 2011-03-05 Yao Qi <yao@codesourcery.com>
7614
7615 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7616 (subdir_do): New make target. Copied from gdb/Makefile.
7617 (maintainer-clean, realclean, distclean, clean): Call corresponding
7618 make targets in common/Makefile.
7619
7620 2011-02-11 Yao Qi <yao@codesourcery.com>
7621
7622 * configure.ac: Call AC_PROG_RANLIB.
7623 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7624 * configure: Regenerate.
7625
e6edda56
JK
76262011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7627
7628 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7629
e5141119
JB
76302011-03-06 Yao Qi <yao@codesourcery.com>
7631
7632 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7633
64794aa4
JB
76342011-03-05 Yao Qi <yao@codesourcery.com>
7635
7636 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7637 (subdir_do): New make target. Copied from gdb/Makefile.
7638 (maintainer-clean, realclean, distclean, clean): Call corresponding
7639 make targets in common/Makefile.
7640
7a762829
YQ
76412011-03-04 Yao Qi <yao@codesourcery.com>
7642
7643 * Makefile.in: Remove GNU make feature --directory.
7644
348af9f7
MS
76452011-03-04 Michael Snyder <msnyder@vmware.com>
7646
7647 * server.c (queue_stop_reply): Call xmalloc not malloc.
7648
76492011-03-02 Michael Snyder <msnyder@vmware.com>
7650
7651 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7652
9f72fee2
MS
76532011-02-28 Michael Snyder <msnyder@vmware.com>
7654
588eebee
MS
7655 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7656 (cmd_qtframe): Ditto.
7657 (cmd_qtbuffer): Ditto.
7658 (cmd_bigqtbuffer): Ditto.
7659
9f72fee2
MS
7660 * utils.c (decimal2str): Initialize 'width' to nine, then
7661 don't mess with it.
7662
8040bd49
UW
76632011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7664
7665 * hostio.c (require_data): Free *data, not data.
7666
7e52cbd0
JK
76672011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7668
7669 * hostio.c (require_data): Use free, not xfree.
7670
9130f83e
MS
76712011-02-27 Michael Snyder <msnyder@vmware.com>
7672
4b812f4e
MS
7673 * server.c (handle_query): Discard unused value.
7674
9130f83e
MS
7675 * hostio.c (require_data): Free malloc memory before returning
7676 error.
7677
69d37113
MS
76782011-02-26 Michael Snyder <msnyder@vmware.com>
7679
7680 * linux-low.c (list_threads): Call closedir for dirent.
7681
35f5825a
MS
76822011-02-27 Michael Snyder <msnyder@vmware.com>
7683
2a589cef
MS
7684 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7685 a case statement falls through.
7686
0adea5f7
MS
7687 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7688
35f5825a
MS
7689 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7690 in comparison.
7691
238f1c74
MS
76922011-02-26 Michael Snyder <msnyder@vmware.com>
7693
7694 * utils.c (decimal2str): Eliminate dead code and dead param.
7695 (pulongest): Drop dead param from call to decimal2str.
7696 (plongest): Ditto.
7697
633ff500
JB
76982011-02-24 Joel Brobecker <brobecker@adacore.com>
7699
7700 Revert the following patch (not approved yet):
7701 2011-02-21 Hui Zhu <teawater@gmail.com>
7702 * tracepoint.c (tp_printf): New function.
7703 (eval_agent_expr): Handle gdb_agent_op_printf.
7704
f9c6ff72
HZ
77052011-02-21 Hui Zhu <teawater@gmail.com>
7706
7707 * tracepoint.c (tp_printf): New function.
7708 (eval_agent_expr): Handle gdb_agent_op_printf.
7709
94d5e490
TT
77102011-02-18 Tom Tromey <tromey@redhat.com>
7711
7712 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7713 (tracepoint.o): Likewise.
7714 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7715 (gdb_agent_op_names): Likewise.
7716
c7f96d2b
TT
77172011-02-18 Tom Tromey <tromey@redhat.com>
7718
7719 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7720 gdb_agent_op_rot>: New constants.
7721 (gdb_agent_op_names): Add pick and roll.
7722 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7723 cases.
7724
0feedb2c
JK
77252011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7726
7727 * aclocal.m4: Regenerated with aclocal-1.11.1.
7728
b3b9301e
PA
77292011-02-14 Pedro Alves <pedro@codesourcery.com>
7730
7731 * server.c (handle_qxfer_traceframe_info): New.
7732 (qxfer_packets): Register "traceframe-info".
7733 (handle_query): Report support for qXfer:traceframe-info:read+.
7734 * tracepoint.c (match_blocktype): New.
7735 (traceframe_find_block_type): Rename to ...
7736 (traceframe_walk_blocks): ... this. Add callback filter argument,
7737 and use it.
7738 (traceframe_find_block_type): New, reimplemented on top of
7739 traceframe_walk_blocks.
7740 (build_traceframe_info_xml): New.
7741 (traceframe_read_info): New.
7742 * server.h (traceframe_read_info): Declare.
7743
4f3e6fb7
YQ
77442011-02-11 Yao Qi <yao@codesourcery.com>
7745
7746 * configure.ac: Call AC_PROG_RANLIB.
7747 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7748 * configure: Regenerate.
7749
764880b7
PA
77502011-02-07 Pedro Alves <pedro@codesourcery.com>
7751
7752 * server.c (gdb_read_memory): Change return semantics to allow
7753 partial transfers.
7754 (handle_search_memory_1): Adjust.
7755 (process_serial_event) <'m' packet>: Handle partial transfers.
7756 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7757
1c79eb8a
PA
77582011-01-28 Pedro Alves <pedro@codesourcery.com>
7759
7760 * regcache.c (init_register_cache): Initialize
7761 regcache->register_status.
7762 (free_register_cache): Release regcache->register_status.
7763 (regcache_cpy): Copy register_status.
7764 (registers_to_string): Print 'x's for unavailable registers.
7765 (supply_register): Mark the register's status valid or
7766 unavailable, depending on whether a buffer was passed in or not.
7767 (supply_register_zeroed): New.
7768 (supply_regblock): Mark the registers' status valid or
7769 unavailable, depending on whether a buffer was passed in or not.
7770 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7771 (struct regcache): New `register_status' field.
7772 (supply_register_zeroed): Declare.
7773 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7774 supply_register_zeroed, rather than passing a NULL buffer to
7775 supply_register.
7776 * tracepoint.c (fetch_traceframe_registers): Update comment.
7777
85724a0e
PA
77782011-01-28 Pedro Alves <pedro@codesourcery.com>
7779
7780 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7781 buffer explicit.
7782
d08aafef
PA
77832011-01-25 Pedro Alves <pedro@codesourcery.com>
7784
7785 * server.h (decode_xfer_write): Change prototype.
7786 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7787 and don't extract the annex here.
7788 * server.c (decode_xfer_read): Remove `annex' parameter,
7789 and don't extract the annex here.
7790 (decode_xfer): New.
7791 (struct qxfer): New.
7792 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7793 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7794 (handle_qxfer_statictrace): New functions, abstracted out from
7795 handle_query, and made to use the struct qxfer interface.
7796 (handle_threads_qxfer_proper): Rename to ...
7797 (handle_qxfer_threads_proper): ... this.
7798 (handle_threads_qxfer): Rename to ...
7799 (handle_qxfer_threads): ... this. Adjust.
7800 (qxfer_packets): New array.
7801 (handle_qxfer): New function.
7802 (handle_query): Use handle_qxfer.
7803
493e2a69
MS
78042011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7805
7806 * gdbreplay.c: Shorten lines of >= 80 columns.
7807 * linux-low.c: Ditto.
7808 * linux-ppc-low.c: Ditto.
7809 * linux-s390-low.c: Ditto.
7810 * linux-sparc-low.c: Ditto.
7811 * linux-x86-low.c: Ditto.
7812 * linux-xtensa-low.c: Ditto.
7813 * mem-break.c: Ditto.
7814 * nto-low.c: Ditto.
7815 * regcache.h: Ditto.
7816 * remote-utils.c: Ditto.
7817 * server.c: Ditto.
7818 * server.h: Ditto.
7819 * thread-db.c: Ditto.
7820 * tracepoint.c: Ditto.
7821 * utils.c: Ditto.
7822 * win32-low.h: Ditto.
7823
44944448
JB
78242011-01-05 Joel Brobecker <brobecker@adacore.com>
7825
7826 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7827 update.
7828
71ce852c
JB
78292011-01-01 Joel Brobecker <brobecker@adacore.com>
7830
7831 * server.c (gdbserver_version): Update copyright year in version
7832 output.
7833 * gdbreplay.c (gdbreplay_version): Ditto.
7834
eb826dc6
MF
78352010-12-29 Jie Zhang <jie.zhang@analog.com>
7836
7837 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7838 * linux-bfin-low.c: New file.
7839 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7840 PT_DATA_ADDR for BFIN targets.
7841 * Makefile.in (SFILES): Add linux-bfin-low.c.
7842 (clean): Remove reg-bfin.c.
7843 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7844 * README: Mention supported Blackfin targets.
7845
39ab222a
MF
78462010-12-23 Mike Frysinger <vapier@gentoo.org>
7847
7848 * .gitignore: New file.
7849
a1f2ce7d
MF
78502010-11-16 Mike Frysinger <vapier@gentoo.org>
7851
7852 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7853
f474844c
JZ
78542010-10-22 Jie Zhang <jie@codesourcery.com>
7855
7856 * Makefile.in: Add FLAGS_TO_PASS variable.
7857 (install): Remove dependency of install-only and recursively
7858 invoke make for install-only.
7859
f1048712
DE
78602010-10-04 Doug Evans <dje@google.com>
7861
7862 * Makefile.in (uninstall): Use $(DESTDIR).
7863
b53a1623
PA
78642010-09-24 Pedro Alves <pedro@codesourcery.com>
7865
e6ee044d
PA
7866 PR gdb/11842
7867
b53a1623
PA
7868 * linux-x86-low.c (compat_siginfo_from_siginfo)
7869 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7870 si_code is < 0. Check for si_code == SI_TIMER before checking for
7871 si_code < 0.
7872
fa1bd1e4
JB
78732010-09-13 Joel Brobecker <brobecker@adacore.com>
7874
7875 * lynx-i386-low.c: New file.
7876 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7877
47fac8f8
JB
78782010-09-13 Joel Brobecker <brobecker@adacore.com>
7879
7880 * lynx-low.c (ptrace_request_to_str): Remove handling for
7881 request values that have been removed in LynxOS 5.x.
7882
1adfc54d
JB
78832010-09-13 Joel Brobecker <brobecker@adacore.com>
7884
7885 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7886 <ptrace.h>
7887
c2a66c29
NS
78882010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7889
7890 * configure.ac: Add --enable-inprocess-agent option.
7891 * configure: Rebuilt.
7892
32fcada3
YQ
78932010-09-06 Yao Qi <yao@codesourcery.com>
7894
7895 * linux-low.c (linux_kill): Remove unused variable.
7896 (linux_stabilize_threads): Likewise.
7897 * server.c (start_inferior): Likewise.
7898 (queue_stop_reply_callback): Likewise.
7899 * tracepoint.c (do_action_at_tracepoint): Likewise.
7900
0cccb683
YQ
79012010-09-06 Yao Qi <yao@codesourcery.com>
7902
7903 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7904 on return.
7905
423ec54c
JK
79062010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7907
7908 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7909
12ac6819
PA
79102010-09-06 Pedro Alves <pedro@codesourcery.com>
7911
7912 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7913 "$(IPA_DEPFILES)".
7914
8ed54b31
JB
79152010-09-01 Joel Brobecker <brobecker@adacore.com>
7916
7917 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7918 gdbserver/lynx-ppc-low.c: New files.
7919 * Makefile.in (lynx_low_h): New variable.
7920 (lynx-low.o, lynx-ppc-low.o): New rules.
7921 * configure.ac: On LynxOS, link with -lnetinet.
7922 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7923 * configure: regenerate.
7924
bb0116a4
JB
79252010-09-01 Joel Brobecker <brobecker@adacore.com>
7926
7927 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7928 * configure.ac: Add check for vasprintf and vsnprintf.
7929 * configure, config.in: Regenerate.
7930 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7931
a778ab81 79322010-09-01 Joel Brobecker <brobecker@adacore.com>
7933
7934 * gdbreplay.c: Move include of alloca.h up, next to include of
7935 malloc.h.
7936 * server.h: Add include of malloc.h.
7937 * mem-break.c: Remove include of malloc.h.
7938 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7939
8b034a19 79402010-09-01 Joel Brobecker <brobecker@adacore.com>
7941
7942 * Makefile.in (memmem.o): Build with -Wno-error.
7943
79442010-09-01 Joel Brobecker <brobecker@adacore.com>
7945
7946 * utils.c (xsnprintf): Make non-static.
7947 * server.h: Add xsnprintf declaration.
7948 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7949 replace calls to snprintf by calls to xsnprintf throughout.
7950
79512010-09-01 Joel Brobecker <brobecker@adacore.com>
7952
7953 * configure.ac: Add configure check for alloca.
7954 * configure, config.in: Regenerate.
7955 * server.h: Include alloca.h if it exists.
7956 * gdbreplay.c: Include alloca.h if it exists.
7957
1a981360
PA
79582010-08-28 Pedro Alves <pedro@codesourcery.com>
7959
7960 * linux-low.c (__SIGRTMIN): Define if not already defined.
7961 (linux_create_inferior): Check for __ANDROID__ rather than
7962 __SIGRTMIN.
7963 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7964 are already deferred.
7965 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7966 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7967 stopped and already has a pending signal to report.
7968 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7969 a pending signal to report or is moving out of a jump pad.
7970 (linux_init_signals): Check for __ANDROID__ rather than
7971 __SIGRTMIN.
7972
b4d51a55
PA
79732010-08-28 Pedro Alves <pedro@codesourcery.com>
7974
7975 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7976 debug_threads check. Avoid a linear search when not doing debug
7977 output.
7978
ec48365d
PA
79792010-08-27 Pedro Alves <pedro@codesourcery.com>
7980
7981 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7982 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7983 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7984 (process_event): Change local fd's type to gdb_fildes_t.
7985 (create_file_handler): Adjust prototype.
7986 (delete_file_handler): Adjust prototype.
7987 (handle_file_event): Adjust prototype. Use pfildes.
7988 (create_file_event): Adjsut prototype.
7989 * remote-utils.c (remote_desc, listen_desc): Change type to
7990 gdb_fildes_t.
7991 * server.h: New gdb_fildes_t typedef.
7992 [USE_WIN32API]: Include winsock2.h.
7993 (delete_file_handler, add_file_handler): Adjust prototypes.
7994 (pfildes): Declare.
7995 * utils.c (pfildes): New.
7996
854d88f0
PA
79972010-08-27 Pedro Alves <pedro@codesourcery.com>
7998
7999 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8000 * configure: Regenerate.
8001
0146f85b
PA
80022010-08-27 Pedro Alves <pedro@codesourcery.com>
8003
8004 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8005 (linux_done_accessing_memory): ... this.
8006 (linux_target_ops): Adjust.
8007 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8008 * nto-low.c (nto_target_ops): Adjust comment.
8009 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8010 * spu-low.c (spu_target_ops): Adjust comment.
8011 * target.h (target_ops): Rename unprepare_to_access_memory field
8012 to done_accessing_memory.
8013 (unprepare_to_access_memory): Rename to ...
8014 (done_accessing_memory): ... this.
8015
90d74c30
PA
80162010-08-26 Pedro Alves <pedro@codesourcery.com>
8017
8018 * linux-low.c (linux_prepare_to_access_memory): New.
8019 (linux_unprepare_to_access_memory): New.
8020 (linux_target_ops): Install them.
8021 * server.c (read_memory): Rename to ...
8022 (gdb_read_memory): ... this. Use
8023 prepare_to_access_memory/prepare_to_access_memory.
8024 (write_memory): Rename to ...
8025 (gdb_write_memory): ... this. Use
8026 prepare_to_access_memory/prepare_to_access_memory.
8027 (handle_search_memory_1): Adjust.
8028 (process_serial_event): Adjust.
8029 * target.h (struct target_ops): New fields
8030 prepare_to_access_memory and unprepare_to_access_memory.
8031 (prepare_to_access_memory, unprepare_to_access_memory): New.
8032 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8033 prepare_to_access_memory/prepare_to_access_memory.
8034 * nto-low.c (nto_target_ops): Adjust.
8035 * spu-low.c (spu_target_ops): Adjust.
8036 * win32-low.c (win32_target_ops): Adjust.
8037
fd467969
PA
80382010-08-26 Pedro Alves <pedro@codesourcery.com>
8039
8040 * Makefile.in (WARN_CFLAGS): Get it from configure.
8041 (WERROR_CFLAGS): New.
8042 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8043 * configure.ac: Introduce --enable-werror, which adds -Werror to
8044 the compiler command line. Enabled by default. Disable with
8045 --disable-werror. Add -Wdeclaration-after-statement
8046 Wpointer-arith and -Wformat-nonliteral to warning flags.
8047 * configure: Regenerate.
8048
331e2f5f
PA
80492010-08-26 Pedro Alves <pedro@codesourcery.com>
8050
8051 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8052
e581f2b4
PA
80532010-08-26 Pedro Alves <pedro@codesourcery.com>
8054
8055 * gdbreplay.c (remote_error): New.
8056 (gdbchar): New.
8057 (expect): Use gdbchar. Check for error reading from GDB.
8058 Clarify sync error output.
8059 (play): Check for errors writing to GDB.
8060 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8061 * remote-utils.c (getpkt): Check for errors writing to the remote
8062 descriptor.
8063
3c11dd79
PA
80642010-08-25 Pedro Alves <pedro@codesourcery.com>
8065
8066 * linux-low.c (linux_wait_1): Move non-debugging code out of
8067 `debug_threads' control.
8068
d20a8ad9
PA
80692010-08-25 Pedro Alves <pedro@codesourcery.com>
8070
8071 * linux-low.c (linux_wait_1): Don't set last_status here.
8072 * server.c (push_event, queue_stop_reply_callback): Assert we're
8073 not pushing a TARGET_WAITKIND_IGNORE event.
8074 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8075 (myresume, handle_target_event): Set the thread's last_resume_kind
8076 and last_status from the target returned status.
8077
964e4306
PA
80782010-08-25 Pedro Alves <pedro@codesourcery.com>
8079
8080 PR threads/10729
8081
8082 * linux-x86-low.c (update_debug_registers_callback): New.
8083 (i386_dr_low_set_addr): Use it.
8084 (i386_dr_low_get_addr): New.
8085 (i386_dr_low_set_control): Use update_debug_registers_callback.
8086 (i386_dr_low_get_control): New.
8087 (i386_dr_low_get_status): Adjust.
8088 * linux-low.c (linux_stop_lwp): New.
8089 * linux-low.h (linux_stop_lwp): Declare.
8090
8091 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8092 argument instead of a i386_debug_reg_state.
8093 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8094 a i386_debug_reg_state.
8095 (i386_insert_aligned_watchpoint): Adjust.
8096 (i386_remove_aligned_watchpoint): Adjust.
8097 (i386_low_stopped_data_address): Read the debug registers from the
8098 inferior instead of from the mirrors.
8099 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8100 (i386_dr_low_get_addr): Declare.
8101 (i386_dr_low_get_control): Declare.
8102 (i386_dr_low_get_status): Change prototype.
8103
8104 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8105 (i386_dr_low_get_addr): New.
8106 (i386_dr_low_get_control): New.
8107 (i386_dr_low_get_status): Adjust prototype. Return
8108 dr_status_mirror.
8109 (i386_initial_stuff): Clear dr_status_mirror and
8110 dr_control_mirror.
8111 (i386_get_thread_context): Adjust.
8112 (i386_set_thread_context): Adjust.
8113 (i386_thread_added): Adjust.
8114
5f21a75b
PA
81152010-08-24 Pedro Alves <pedro@codesourcery.com>
8116
8117 * linux-low.h (linux_thread_area): Delete declaration.
8118
3e4c1235
TS
81192010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8120
8121 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8122 after its termination.
8123
1971b033
PA
81242010-08-09 Pedro Alves <pedro@codesourcery.com>
8125
8126 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8127 (gdb_wants_all_stopped): Delete.
8128 (linux_wait_1): Don't call them.
8129 * server.c (handle_v_cont): Tag all threads as want-stopped.
8130 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8131 stopped as "client-wants-stopped".
8132
310444ac
PA
81332010-07-31 Pedro Alves <pedro@codesourcery.com>
8134
8135 * Makefile.in (signals_h): New.
8136 (server_h): Depend on it.
8137 (server.o): Don't depend on $(signals_def).
8138 (signals.o): Depend on $(signals_def).
8139
a19cae16
JK
81402010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8141
8142 * Makefile.in (signals_def): New.
8143 (server_h): Append include/gdb/signals.h and signals_def.
8144 (server.o): Append signals_def.
8145
30d50328
JK
81462010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8147
8148 * server.c (handle_target_event): Use target_signal_to_host for
8149 resume_info.sig initialization.
8150 * target.h (struct thread_resume) <sig>: New comment.
8151
5c3216e2
OS
81522010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8153
c6f46ca0
OS
8154 * server.c (handle_query): strcpy() the returned string from paddress()
8155 instead of sprintf().
5c3216e2
OS
8156 * utils.c (paddress): Return phex_nz().
8157
6bd31874
JB
81582010-07-07 Joel Brobecker <brobecker@adacore.com>
8159
8160 * server.c (handle_v_cont): Call mourn_inferior if process
8161 just exited.
8162 (myresume): Likewise.
8163
0fb4aa4b
PA
81642010-07-01 Pedro Alves <pedro@codesourcery.com>
8165
8166 Static tracepoints, and integration with UST.
8167
8168 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8169 * mem-break.c (uninsert_all_breakpoints)
8170 (reinsert_all_breakpoints): New.
8171 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8172 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8173 (gdb_agent_ust_loaded, helper_thread_id)
8174 (gdb_agent_helper_thread_id): New macros.
8175 (struct ipa_sym_addresses): Add addr_ust_loaded,
8176 addr_helper_thread_id, addr_cmd_buf.
8177 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8178 (in_process_agent_loaded_ust): New.
8179 (write_e_ust_not_loaded): New.
8180 (maybe_write_ipa_ust_not_loaded): New.
8181 (struct collect_static_trace_data_action): New.
8182 (enum tracepoint_type) <static_tracepoint>: New.
8183 (struct tracepoint) <handle>: Mention static tracepoints.
8184 (struct static_tracepoint_ctx): New.
8185 (CMD_BUF_SIZE): New.
8186 (add_tracepoint_action): Handle static tracepoint actions.
8187 (unprobe_marker_at): New.
8188 (clear_installed_tracepoints): Handle static tracepoints.
8189 (cmd_qtdp): Handle static tracepoints.
8190 (probe_marker_at): New.
8191 (cmd_qtstart): Handle static tracepoints.
8192 (response_tracepoint): Handle static tracepoints.
8193 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8194 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8195 (get_context_regcache): Handle static tracepoints.
8196 (do_action_at_tracepoint): Handle static tracepoint actions.
8197 (traceframe_find_block_type): Handle static trace data blocks.
8198 (traceframe_read_sdata): New.
8199 (download_tracepoints): Download static tracepoint actions.
8200 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8201 (GDB_PROBE_NAME): New.
8202 (ust_ops): New.
8203 (GET_UST_SYM): New.
8204 (USTF): New.
8205 (dlsym_ust): New.
8206 (ust_marker_to_static_tracepoint): New.
8207 (gdb_probe): New.
8208 (collect_ust_data_at_tracepoint): New.
8209 (gdb_ust_probe): New.
8210 (UNIX_PATH_MAX, SOCK_DIR): New.
8211 (gdb_ust_connect_sync_socket): New.
8212 (resume_thread, stop_thread): New.
8213 (run_inferior_command): New.
8214 (init_named_socket): New.
8215 (gdb_ust_socket_init): New.
8216 (cstr_to_hexstr): New.
8217 (next_st): New.
8218 (first_marker, next_marker): New.
8219 (response_ust_marker): New.
8220 (cmd_qtfstm, cmd_qtsstm): New.
8221 (unprobe_marker_at, probe_marker_at): New.
8222 (cmd_qtstmat, gdb_ust_thread): New.
8223 (gdb_ust_init): New.
8224 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8225 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8226 (ST_REGENTRY): New.
8227 (x86_64_st_collect_regmap): New.
8228 (X86_64_NUM_ST_COLLECT_GREGS): New.
8229 (AMD64_RIP_REGNUM): New.
8230 (supply_static_tracepoint_registers): New.
8231 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8232 (ST_REGENTRY): New.
8233 (i386_st_collect_regmap): New.
8234 (i386_NUM_ST_COLLECT_GREGS): New.
8235 (supply_static_tracepoint_registers): New.
8236 * server.c (handle_query): Handle qXfer:statictrace:read.
8237 <qSupported>: Report support for StaticTracepoints, and
8238 qXfer:statictrace:read features.
8239 * server.h (traceframe_read_sdata)
8240 (supply_static_tracepoint_registers): Declare.
8241 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8242 (unpack_varlen_hex): Include in IPA build.
8243 * Makefile.in (ustlibs, ustinc): New.
8244 (IPA_OBJS): Add remote-utils-ipa.o.
8245 ($(IPA_LIB)): Link -ldl and -lpthread.
8246 (UST_CFLAGS): New.
8247 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8248 * config.in, configure: Regenerate.
8249
9e4344e5
PA
82502010-06-20 Ian Lance Taylor <iant@google.com>
8251 Pedro Alves <pedro@codesourcery.com>
8252
8253 * linux-x86-low.c (always_true): Delete.
8254 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8255 trying to fool the compiler with always_true.
8256
c6beb2cb
PA
82572010-06-20 Pedro Alves <pedro@codesourcery.com>
8258
8259 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8260 conditions in gdbserver.
8261
d2ed6730
UW
82622010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8263
8264 * spu-low.c (spu_read_memory): Wrap around local store limit.
8265 (spu_write_memory): Likewise.
8266
4e29fb54
PA
82672010-06-15 Pedro Alves <pedro@codesourcery.com>
8268
8269 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8270 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8271 LONGEST uses.
8272 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8273 uses.
8274 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8275 uses with LONGEST uses.
8276
6a271cae
PA
82772010-06-14 Stan Shebs <stan@codesourcery.com>
8278 Pedro Alves <pedro@codesourcery.com>
8279
8280 Bytecode compiler.
8281
8282 * linux-x86-low.c: Include limits.h.
8283 (add_insns): New.
8284 (always_true): New.
8285 (EMIT_ASM): New.
8286 (EMIT_ASM32): New.
8287 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8288 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8289 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8290 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8291 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8292 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8293 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8294 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8295 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8296 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8297 (amd64_emit_void_call_2): New.
8298 (amd64_emit_ops): New.
8299 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8300 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8301 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8302 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8303 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8304 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8305 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8306 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8307 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8308 (i386_emit_stack_adjust, i386_emit_int_call_1)
8309 (i386_emit_void_call_2): New.
8310 (i386_emit_ops): New.
8311 (x86_emit_ops): New.
8312 (the_low_target): Install x86_emit_ops.
8313 * server.h (struct emit_ops): New.
8314 (get_raw_reg_func_addr): Declare.
8315 (current_insn_ptr, emit_error): Declare.
8316 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8317 (set_trace_state_variable_value): New defines.
8318 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8319 addr_get_trace_state_variable_value and
8320 addr_set_trace_state_variable_value.
8321 (symbol_list): New fields for get_raw_reg,
8322 get_trace_state_variable_value and set_trace_state_variable_value.
8323 (condfn): New typedef.
8324 (struct tracepoint): New field `compiled_cond'.
8325 (do_action_at_tracepoint): Clear compiled_cond.
8326 (get_trace_state_variable_value, set_trace_state_variable_value):
8327 Export in the IPA.
8328 (condition_true_at_tracepoint): If there's a compiled condition,
8329 run that.
8330 (current_insn_ptr, emit_error): New globals.
8331 (struct bytecode_address): New.
8332 (get_raw_reg_func_addr): New.
8333 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8334 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8335 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8336 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8337 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8338 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8339 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8340 (compile_tracepoint_condition, compile_bytecodes): New.
8341 * target.h (emit_ops): Forward declare.
8342 (struct target_ops): New field emit_ops.
8343 (target_emit_ops): New.
8344 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8345 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8346 * linux-low.c (linux_emit_ops): New.
8347 (linux_target_ops): Install it.
8348 * linux-low.h (struct linux_target_ops): New field emit_ops.
8349
92b72907
UW
83502010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8351
8352 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8353 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8354
fa593d66
PA
83552010-06-01 Pedro Alves <pedro@codesourcery.com>
8356 Stan Shebs <stan@codesourcery.com>
8357
8358 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8359 (all): Depend on $(extra_libraries).
8360 (install-only): Install the IPA.
8361 (IPA_OBJS, IPA_LIB): New.
8362 (clean): Remove the IPA lib.
8363 (IPAGENT_CFLAGS): New.
8364 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8365 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8366 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8367 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8368 * configure.ac: Check for atomic builtins support in the compiler.
8369 (IPA_DEPFILES, extra_libraries): Define.
8370 * configure.srv (ipa_obj): Add description.
8371 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8372 (i[34567]86-*-linux*): Set ipa_obj.
8373 (x86_64-*-linux*): Set ipa_obj.
8374 * linux-low.c (stabilizing_threads): New.
8375 (supports_fast_tracepoints): New.
8376 (linux_detach): Stabilize threads before detaching.
8377 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8378 the lwp is either not stabilizing, or is moving out of a jump pad.
8379 (linux_fast_tracepoint_collecting): New.
8380 (maybe_move_out_of_jump_pad): New.
8381 (enqueue_one_deferred_signal): New.
8382 (dequeue_one_deferred_signal): New.
8383 (linux_wait_for_event_1): If moving out of a jump pad, defer
8384 pending signals to later.
8385 (linux_stabilize_threads): New.
8386 (linux_wait_1): Check if threads need moving out of jump pads, and
8387 do it if so.
8388 (stuck_in_jump_pad_callback): New.
8389 (move_out_of_jump_pad_callback): New.
8390 (lwp_running): New.
8391 (linux_resume_one_lwp): Handle moving out of jump pads.
8392 (linux_set_resume_request): Dequeue deferred signals.
8393 (need_step_over_p): Also step over fast tracepoint jumps.
8394 (start_step_over): Also uninsert fast tracepoint jumps.
8395 (finish_step_over): Also reinsert fast tracepoint jumps.
8396 (linux_install_fast_tracepoint_jump): New.
8397 (linux_target_ops): Install linux_stabilize_threads and
8398 linux_install_fast_tracepoint_jump_pad.
8399 * linux-low.h (linux_target_ops) <get_thread_area,
8400 install_fast_tracepoint_jump_pad>: New fields.
8401 (struct lwp_info) <collecting_fast_tracepoint,
8402 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8403 (linux_get_thread_area): Declare.
8404 * linux-x86-low.c (jump_insn): New.
8405 (x86_get_thread_area): New.
8406 (append_insns): New.
8407 (push_opcode): New.
8408 (amd64_install_fast_tracepoint_jump_pad): New.
8409 (i386_install_fast_tracepoint_jump_pad): New.
8410 (x86_install_fast_tracepoint_jump_pad): New.
8411 (the_low_target): Install x86_get_thread_area and
8412 x86_install_fast_tracepoint_jump_pad.
8413 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8414 (struct fast_tracepoint_jump): New.
8415 (fast_tracepoint_jump_insn): New.
8416 (fast_tracepoint_jump_shadow): New.
8417 (find_fast_tracepoint_jump_at): New.
8418 (fast_tracepoint_jump_here): New.
8419 (delete_fast_tracepoint_jump): New.
8420 (set_fast_tracepoint_jump): New.
8421 (uninsert_fast_tracepoint_jumps_at): New.
8422 (reinsert_fast_tracepoint_jumps_at): New.
8423 (set_breakpoint_at): Use write_inferior_memory.
8424 (uninsert_raw_breakpoint): Use write_inferior_memory.
8425 (check_mem_read): Mask out fast tracepoint jumps.
8426 (check_mem_write): Mask out fast tracepoint jumps.
8427 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8428 (set_fast_tracepoint_jump): Declare.
8429 (delete_fast_tracepoint_jump)
8430 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8431 (reinsert_fast_tracepoint_jumps_at): Declare.
8432 * regcache.c: Don't compile many functions when building the
8433 in-process agent library.
8434 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8435 the register buffer in the heap.
8436 (free_register_cache): If the register buffer isn't owned by the
8437 regcache, don't free it.
8438 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8439 pre-existing register caches.
8440 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8441 type.
8442 (convert_ascii_to_int): : Constify `from' parameter type.
8443 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8444 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8445 the needed buffer in-place.
8446 (relocate_instruction): New.
8447 * server.c (handle_query) <qSymbols>: If the target supports
8448 tracepoints, give it a chance of looking up symbols. Report
8449 support for fast tracepoints.
8450 (handle_status): Stabilize threads.
8451 (process_serial_event): Adjust.
8452 * server.h (struct fast_tracepoint_jump): Forward declare.
8453 (struct process_info) <fast_tracepoint_jumps>: New field.
8454 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8455 (decode_X_packet, decode_M_packet): Adjust.
8456 (relocate_instruction): Declare.
8457 (in_process_agent_loaded): Declare.
8458 (tracepoint_look_up_symbols): Declare.
8459 (struct fast_tpoint_collect_status): Declare.
8460 (fast_tracepoint_collecting): Declare.
8461 (force_unlock_trace_buffer): Declare.
8462 (handle_tracepoint_bkpts): Declare.
8463 (initialize_low_tracepoint)
8464 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8465 * target.h (struct target_ops) <stabilize_threads,
8466 install_fast_tracepoint_jump_pad>: New fields.
8467 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8468 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8469 [HAVE_STDINT_H]: Include stdint.h.
8470 (trace_debug_1): Rename to ...
8471 (trace_vdebug): ... this.
8472 (trace_debug): Rename to ...
8473 (trace_debug_1): ... this. Add `level' parameter.
8474 (trace_debug): New.
8475 (ATTR_USED, ATTR_NOINLINE): New.
8476 (IP_AGENT_EXPORT): New.
8477 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8478 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8479 (about_to_request_buffer_space, trace_buffer_is_full)
8480 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8481 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8482 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8483 (traceframe_write_count, traceframes_created)
8484 (trace_state_variables)
8485 New renaming defines.
8486 (struct ipa_sym_addresses): New.
8487 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8488 (symbol_list): New.
8489 (ipa_sym_addrs): New.
8490 (all_tracepoint_symbols_looked_up): New.
8491 (in_process_agent_loaded): New.
8492 (write_e_ipa_not_loaded): New.
8493 (maybe_write_ipa_not_loaded): New.
8494 (tracepoint_look_up_symbols): New.
8495 (debug_threads) [IN_PROCESS_AGENT]: New.
8496 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8497 (UNKNOWN_SIDE_EFFECTS): New.
8498 (stop_tracing): New.
8499 (flush_trace_buffer): New.
8500 (stop_tracing_bkpt): New.
8501 (flush_trace_buffer_bkpt): New.
8502 (read_inferior_integer): New.
8503 (read_inferior_uinteger): New.
8504 (read_inferior_data_pointer): New.
8505 (write_inferior_data_pointer): New.
8506 (write_inferior_integer): New.
8507 (write_inferior_uinteger): New.
8508 (struct collect_static_trace_data_action): Delete.
8509 (enum tracepoint_type): New.
8510 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8511 <actions_str, step_actions, step_actions_str>: Only include in
8512 GDBserver.
fa593d66
PA
8513 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8514 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8515 (tracepoints): Use IP_AGENT_EXPORT.
8516 (last_tracepoint): Don't include in the IPA.
8517 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8518 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8519 (alloced_trace_state_variables): New.
8520 (trace_state_variables): Use IP_AGENT_EXPORT.
8521 (traceframe_t): Delete unused variable.
8522 (circular_trace_buffer): Don't include in the IPA.
8523 (trace_buffer_start): Delete.
8524 (struct trace_buffer_control): New.
8525 (trace_buffer_free): Delete.
8526 (struct ipa_trace_buffer_control): New.
8527 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8528 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8529 New.
8530 (trace_buffer_ctrl): New.
8531 (TRACE_BUFFER_CTRL_CURR): New.
8532 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8533 Reimplement as macros.
8534 (trace_buffer_wrap): Delete.
8535 (traceframe_write_count, traceframe_read_count)
8536 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8537 (struct tracepoint_hit_ctx) <type>: New field.
8538 (struct fast_tracepoint_ctx): New.
8539 (memory_barrier): New.
8540 (cmpxchg): New.
8541 (record_tracepoint_error): Update atomically in the IPA.
8542 (clear_inferior_trace_buffer): New.
8543 (about_to_request_buffer_space): New.
8544 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8545 updating the same buffer.
8546 (add_tracepoint): Default the tracepoint's type to trap
8547 tracepoint, and orig_size to -1.
8548 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8549 internal variables.
8550 (create_trace_state_variable): New parameter `gdb'. Handle it.
8551 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8552 (cmd_qtdp): Handle fast tracepoints.
8553 (cmd_qtdv): Adjust.
8554 (max_jump_pad_size): New.
8555 (gdb_jump_pad_head): New.
8556 (get_jump_space_head): New.
8557 (claim_jump_space): New.
8558 (sort_tracepoints): New.
8559 (MAX_JUMP_SIZE): New.
8560 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8561 IPA.
8562 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8563 support. Upload fast traceframes, and delete internal IPA
8564 breakpoints.
8565 (stop_tracing_handler): New.
8566 (flush_trace_buffer_handler): New.
8567 (cmd_qtstop): Upload fast tracepoints.
8568 (response_tracepoint): Handle fast tracepoints.
8569 (tracepoint_finished_step): Upload fast traceframes. Set the
8570 tracepoint hit context's tracepoint type.
8571 (handle_tracepoint_bkpts): New.
8572 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8573 type. Add comment about fast tracepoints.
8574 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8575 non-existing action_str field.
8576 (get_context_regcache): Handle fast tracepoints.
8577 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8578 to the regcache.
8579 (fast_tracepoint_from_jump_pad_address): New.
8580 (fast_tracepoint_from_ipa_tpoint_address): New.
8581 (collecting_t): New.
8582 (force_unlock_trace_buffer): New.
8583 (fast_tracepoint_collecting): New.
8584 (collecting): New.
8585 (gdb_collect): New.
8586 (write_inferior_data_ptr): New.
8587 (target_tp_heap): New.
8588 (target_malloc): New.
8589 (download_agent_expr): New.
8590 (UALIGN): New.
8591 (download_tracepoints): New.
8592 (download_trace_state_variables): New.
8593 (upload_fast_traceframes): New.
8594 (IPA_FIRST_TRACEFRAME): New.
8595 (IPA_NEXT_TRACEFRAME_1): New.
8596 (IPA_NEXT_TRACEFRAME): New.
8597 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8598 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8599 (gdb_jump_pad_buffer_end): New.
8600 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8601 (initialize_tracepoint): Adjust.
8602 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8603 buffer. Initialize the low module.
8604 * utils.c (PREFIX, TOOLNAME): New.
8605 (malloc_failure): Use PREFIX.
8606 (error): In the IPA, an error causes an exit.
8607 (fatal, warning): Use PREFIX.
8608 (internal_error): Use TOOLNAME.
8609 (NUMCELLS): Increase to 10.
8610 * configure, config.in: Regenerate.
8611
d149dd1d
PA
86122010-06-01 Pedro Alves <pedro@codesourcery.com>
8613
8614 * server.c (handle_query) <qSupported>: Do two passes over the
8615 qSupported string to avoid nesting strtok.
8616
f6528abd
JK
86172010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8618
8619 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8620 (CDEPS): New.
8621 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8622 -Wl,--dynamic-list.
8623 * configure: Regenerate.
8624 * proc-service.list: New.
8625
ca2a87a0
JK
86262010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8627
8628 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8629 New comment.
8630
363a6e9f
OS
86312010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8632
8633 * gdbreplay.c (remote_open): Check error return from socket() call by
8634 its equality to -1 not by it being negative.
8635 * remote-utils.c (remote_open): Likewise.
8636
d23b6cb1
PA
86372010-05-23 Pedro Alves <pedro@codesourcery.com>
8638
8639 * config.h: Regenerate.
8640
28d3cf85
MK
86412010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8642
8643 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8644 doesn't provide PTRACE_GET_THREAD_AREA.
8645
fea36a59
MK
86462010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8647
8648 * linux-m68k-low.c: Include <asm/ptrace.h>
8649 (ps_get_thread_area): Implement.
8650
24b066ba
DE
86512010-05-03 Doug Evans <dje@google.com>
8652
8653 * event-loop.c (struct callback_event): New struct.
8654 (callback_list): New global.
8655 (append_callback_event, delete_callback_event): New functions.
8656 (process_callback): New function.
8657 (start_event_loop): Call it.
8658 * remote-utils.c (NOT_SCHEDULED): Define.
8659 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8660 moved out of readchar.
8661 (readchar): Rewrite. Call reschedule before returning.
8662 (reset_readchar): New function.
8663 (remote_close): Call it.
8664 (process_remaining, reschedule): New functions.
8665 * server.h (callback_handler_func): New typedef.
8666 (append_callback_event, delete_callback_event): Declare.
8667
9836d6ea
PA
86682010-05-03 Pedro Alves <pedro@codesourcery.com>
8669
8670 * proc-service.c (ps_pglobal_lookup): Use
8671 thread_db_look_up_one_symbol.
8672 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8673 parameter. Use it instead of all_symbols_looked_up.
8674 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8675 field.
8676 (all_symbols_looked_up): Don't declare.
8677 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8678 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8679 field.
8680 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8681 Set all_symbols_looked_up here.
8682 (thread_db_look_up_one_symbol): New.
8683 (thread_db_get_tls_address): Adjust.
8684 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8685 thread_db object on the heap, and tentatively set it in the
8686 process structure.
8687 (thread_db_init): Don't set all_symbols_looked_up here.
8688 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8689
7984d532
PA
86902010-05-03 Pedro Alves <pedro@codesourcery.com>
8691
8692 * linux-low.c (linux_kill, linux_detach): Adjust.
8693 (status_pending_p_callback): Remove redundant statement. Check
8694 for !TARGET_WAITIKIND_IGNORE, instead of
8695 TARGET_WAITKIND_STOPPED.
8696 (handle_tracepoints): Make sure LWP is locked. Adjust.
8697 (linux_wait_for_event_1): Adjust.
8698 (linux_cancel_breakpoints): New.
8699 (unsuspend_one_lwp): New.
8700 (unsuspend_all_lwps): New.
8701 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8702 (send_sigstop_callback): Change return type to int, add new
8703 `except' parameter and handle it.
8704 (suspend_and_send_sigstop_callback): New.
8705 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8706 pass them down. If SUSPEND, also increment the lwp's suspend
8707 count.
8708 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8709 (need_step_over_p): Don't consider suspended LWPs.
8710 (start_step_over): Adjust.
8711 (proceed_one_lwp): Change return type to int, add new `except'
8712 parameter and handle it.
8713 (unsuspend_and_proceed_one_lwp): New.
8714 (proceed_all_lwps): Use find_inferior instead of
8715 for_each_inferior.
8716 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8717 also decrement the suspend count of LWPs. Pass `except' down,
8718 instead of hacking its suspend count.
8719 (linux_pause_all): Add `freeze' parameter. Adjust.
8720 (linux_unpause_all): New.
8721 (linux_target_ops): Install linux_unpause_all.
8722 * server.c (handle_status): Adjust.
8723 * target.h (struct target_ops): New fields `unpause_all' and
8724 `cancel_breakpoints'. Add new parameter to `pause_all'.
8725 (pause_all): Add new `freeze' parameter.
8726 (unpause_all): New.
8727 (cancel_breakpoints): New.
8728 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8729 cancel breakpoints.
8730 (cmd_qtstart): Pause threads.
8731 (stop_tracing): Pause threads, and cancel breakpoints.
8732 * win32-low.c (win32_target_ops): Adjust.
8733
e471f25b
PA
87342010-05-03 Pedro Alves <pedro@codesourcery.com>
8735
8736 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8737 the inferior right away from here...
8738 (linux_wait_1): ... to here, and adjust to check the thread's
8739 last_resume_kind instead of the lwp's step or stop_expected flags.
8740
1915ef4f
PA
87412010-05-02 Pedro Alves <pedro@codesourcery.com>
8742
8743 * README: Use consistent `GDB' and `GDBserver' spellings.
8744
f9e39928
PA
87452010-05-02 Pedro Alves <pedro@codesourcery.com>
8746
8747 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8748 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8749 (linux_detach_one_lwp): Assume the lwp is stopped.
8750 (any_thread_of): Delete.
8751 (linux_detach): Stop all lwps here. Don't blindly delete all
8752 breakpoints.
8753 (delete_lwp_callback): New.
8754 (linux_mourn): Delete all lwps of the process that is gone.
8755 (linux_wait_1): Don't delete the last lwp of the process here.
8756 * mem-break.h (mark_breakpoints_out): Declare.
8757 * mem-break.c (mark_breakpoints_out): New.
8758 (free_all_breakpoints): Use it.
8759 * server.c (handle_target_event): If the process is gone, mark
8760 breakpoints out.
8761 * thread-db.c (struct thread_db) <create_bp>: New field.
8762 (thread_db_enable_reporting): Fix prototype. Store a thread event
8763 breakpoint reference in the thread_db struct.
8764 (thread_db_load_search): Clear the thread_db object.
8765 (try_thread_db_load_1): Ditto.
8766 (switch_to_process): New.
8767 (disable_thread_event_reporting): Use it.
8768 (remove_thread_event_breakpoints): New.
8769 (thread_db_detach, thread_db_mourn): Use it.
8770
1e7fc18c
PA
87712010-05-01 Pedro Alves <pedro@codesourcery.com>
8772
8773 * linux-low.c (linux_enable_event_reporting): New.
8774 (linux_wait_for_event_1, handle_extended_wait): Use it.
8775
02fc4de7
PA
87762010-04-30 Pedro Alves <pedro@codesourcery.com>
8777
8778 * linux-low.c (linux_kill_one_lwp, linux_kill)
8779 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8780 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8781 SIGSTOP even if the LWP is stopped.
8782 (send_sigstop_callback): New.
8783 (stop_all_lwps): Use send_sigstop_callback instead.
8784 (linux_resume_one_thread): Adjust.
8785 (proceed_one_lwp): Still proceed an LWP that the client has
8786 requested to stop, if we haven't reported it as stopped yet. Make
8787 sure that LWPs the client want stopped, have a pending SIGSTOP.
8788
bc3b5632
DE
87892010-04-26 Doug Evans <dje@google.com>
8790
ae1ada35
DE
8791 * server.c (handle_general_set): Make static.
8792
bc3b5632
DE
8793 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8794 Print received char after testing for error/eof instead of before.
8795 (input_interrupt): Tweak comment.
8796
65730243
DE
87972010-04-23 Doug Evans <dje@google.com>
8798
8799 * server.c (start_inferior): Print inferior argv if --debug.
8800
a8ae7dc0
AR
88012010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8802
8803 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8804 * nto-x86-low.c: Include server.h
8805
1c07cc19
PM
88062010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8807
8808 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8809 be consistent with other sources of this directory.
8810 (init_registers_amd64): Correct name of source file of this function
8811 in the comment.
8812
e0a61e09
PM
88132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8814
8815 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8816 64-bit executables.
8817
54709339
PM
88182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8819
8820 * win32-i386-low.c: Add 64-bit support.
8821 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8822 (init_registers_amd64): Declare.
8823 (mappings): Add 64-bit version of array.
8824 (init_windows_x86): New function.
8825 (the_low_target): Change init_arch field to init_windows_x86.
8826
e8f0053d
PM
88272010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8828
8829 * win32-low.c: Adapt to support also 64-bit architecture.
8830 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8831 (get_image_name): Use SIZE_T type for local variable `done'.
8832 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8833 (toolhelp_get_dll_name): Idem.
8834 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8835 Use uintptr_t typecast to avoid warning.
8836 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8837 (handle_exception): Use phex_nz to avoid warning.
8838 (win32_wait): Remove unused local variable `process'.
8839
c481e77e
PM
88402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8841
8842 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8843 `amd64-avx.o'.
8844
12ea4b69
PM
88452010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8846
8847 * configure.ac: Use `ws2_32' library for srv_mingw.
8848 * configure: Regenerate.
8849 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8850 * remote-utils.c: Likewise.
8851
f6d1620c
L
88522010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8853
8854 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8855 if __x86_64__ is defined.
8856
8e642873
PM
88572010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8858
8859 * configure: Regenerate.
8860
711e434b
PM
88612010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8862
8863 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8864 * target.h (target_ops): New get_tib_address field.
8865 * win32-low.h (win32_thread_info): Add thread_local_base field.
8866 * win32-low.c (child_add_thread): Add tlb argument.
8867 Set thread_local_base field to TLB.
8868 (get_child_debug_event): Adapt to child_add_thread change.
8869 (win32_get_tib_address): New function.
8870 (win32_target_ops): Set get_tib_address field to
8871 win32_get_tib_address.
8872 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8873
505106cd
PA
88742010-04-12 Pedro Alves <pedro@codesourcery.com>
8875
505106cd
PA
8876 * linux-low.c (linux_mourn): Also remove the process.
8877 * server.c (handle_target_event): Don't remove the process here.
8878 * nto-low.c (nto_mourn): New.
8879 (nto_target_ops): Install it.
8880 * spu-low.c (spu_mourn): New.
8881 (spu_target_ops): Install it.
8882 * win32-low.c (win32_mourn): New.
8883 (win32_target_ops): Install it.
8884
e8470a06
PA
88852010-04-12 Pedro Alves <pedro@codesourcery.com>
8886
8887 * server.h (buffer_xml_printf): Remove redundant `;'.
8888
45ba0d02
PA
88892010-04-12 Pedro Alves <pedro@codesourcery.com>
8890
8891 * regcache.c (set_register_cache): Invalidate regcaches before
8892 changing the register cache layout.
8893 (regcache_invalidate_one): Allow a NULL regcache.
8894 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8895 regcaches before changing the register cache layout or the target
8896 regsets.
8897
59e04013
L
88982010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8899
8900 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8901 variable warning on Linux/x86-64.
8902
8336d594
PA
89032010-04-11 Pedro Alves <pedro@codesourcery.com>
8904
8905 GDBserver disconnected tracing support.
8906
8907 * linux-low.c (linux_remove_process): Delete.
8908 (add_lwp): Don't set last_resume_kind here.
8909 (linux_kill): Use `mourn'.
8910 (linux_detach): Use `thread_db_detach', and `mourn'.
8911 (linux_mourn): New.
8912 (linux_attach_lwp_1): Adjust comment.
8913 (linux_attach): last_resume_kind moved the thread_info; adjust.
8914 (status_pending_p_callback): Adjust.
8915 (linux_wait_for_event_1): Adjust.
8916 (count_events_callback, select_singlestep_lwp_callback)
8917 (select_event_lwp_callback, cancel_breakpoints_callback)
8918 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8919 (proceed_one_lwp): Adjust.
8920 (linux_async): Add debug output.
8921 (linux_thread_stopped): New.
8922 (linux_pause_all): New.
8923 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8924 linux_pause_all.
8925 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8926 (thread_db_free): Delete declaration.
8927 (thread_db_detach, thread_db_mourn): Declare.
8928 * thread-db.c (thread_db_init): Use thread_db_mourn.
8929 (thread_db_free): Delete, split in two.
8930 (disable_thread_event_reporting): New.
8931 (thread_db_detach): New.
8932 (thread_db_mourn): New.
8933
8934 * server.h (struct thread_info) <last_resume_kind>: New field.
8935 <attached>: Add comment.
8936 <gdb_detached>: New field.
8937 (handler_func): Change return type to int.
8938 (handle_serial_event, handle_target_event): Ditto.
8939 (gdb_connected): Declare.
8940 (tracing): Delete.
8941 (disconnected_tracing): Declare.
8942 (stop_tracing): Declare.
8943
8944 * server.c (handle_query) <qSupported>: Report support for
8945 disconnected tracing.
8946 (queue_stop_reply_callback): Account for running threads.
8947 (gdb_wants_thread_stopped): New.
8948 (gdb_wants_all_threads_stopped): New.
8949 (gdb_reattached_process): New.
8950 (handle_status): Clear the `gdb_detached' flag of all processes.
8951 In all-stop, stop all threads.
8952 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8953 (process_serial_event): If the remote connection breaks, or if an
8954 exit was forced with "monitor exit", force an event loop exit.
8955 Handle disconnected tracing on detach.
8956 (handle_serial_event): Adjust.
8957 (handle_target_event): If GDB isn't connected, forward events back
8958 to the inferior, unless the last process exited, in which case,
8959 exit gdbserver. Adjust interface.
8960
8961 * remote-utils.c (remote_open): Don't block in accept. Instead
8962 register an event loop source on the listen socket file
8963 descriptor. Refactor bits into ...
8964 (listen_desc): ... this new global.
8965 (gdb_connected): ... this new function.
8966 (enable_async_notification): ... this new function.
8967 (handle_accept_event): ... this new function.
8968 (remote_close): Clear remote_desc.
8969
8970 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8971
8972 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8973 New fields.
8974 (mourn_inferior): Define.
8975 (target_process_qsupported): Avoid the dangling else problem.
8976 (thread_stopped): Define.
8977 (pause_all): Define.
8978 (target_waitstatus_to_string): Declare.
8979 * target.c (target_waitstatus_to_string): New.
8980
8981 * tracepoint.c (tracing): Make extern.
8982 (disconnected_tracing): New.
8983 (stop_tracing): Make extern. Handle tracing stops due to GDB
8984 disconnecting.
8985 (cmd_qtdisconnected): New.
8986 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8987 (handle_tracepoint_general_set): Handle QTDisconnected.
8988
8989 * event-loop.c (event_handler_func): Change return type to int.
8990 (process_event): Bail out if the event handler wants the event
8991 loop to stop.
8992 (handle_file_event): Ditto.
8993 (start_event_loop): Bail out if the event handler wants the event
8994 loop to stop.
8995
8996 * nto-low.c (nto_target_ops): Adjust.
8997 * spu-low.c (spu_wait): Don't remove the process here.
8998 (spu_target_ops): Adjust.
8999 * win32-low.c (win32_wait): Don't remove the process here.
9000 (win32_target_ops): Adjust.
9001
5d267c4c
PA
90022010-04-11 Pedro Alves <pedro@codesourcery.com>
9003
9004 * regcache.c (realloc_register_cache): Invalidate inferior's
9005 regcache before recreating it.
9006
623ccd72
PA
90072010-04-09 Pedro Alves <pedro@codesourcery.com>
9008
9009 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9010
219f2f23
PA
90112010-04-09 Stan Shebs <stan@codesourcery.com>
9012 Pedro Alves <pedro@codesourcery.com>
9013
9014 * server.h (LONGEST): New.
9015 (struct thread_info) <while_stepping>: New field.
9016 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9017 Declare.
9018 (initialize_tracepoint, handle_tracepoint_general_set)
9019 (handle_tracepoint_query, tracepoint_finished_step)
9020 (tracepoint_was_hit, release_while_stepping_state_list):
9021 (current_traceframe): Declare.
9022 * server.c (handle_general_set): Handle tracepoint packets.
9023 (read_memory): New.
9024 (write_memory): New.
9025 (handle_search_memory_1): Use read_memory.
9026 (handle_query): Report support for conditional tracepoints, trace
9027 state variables, and tracepoint sources. Handle tracepoint
9028 queries.
9029 (main): Initialize the tracepoints module.
9030 (process_serial_event): Handle traceframe reads/writes.
9031
9032 * linux-low.c (handle_tracepoints): New.
9033 (linux_wait_1): Call it.
9034 (linux_resume_one_lwp): Handle while-stepping.
9035 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9036 (linux_target_ops): Install them.
9037 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9038 New field.
9039 * linux-x86-low.c (x86_supports_tracepoints): New.
9040 (the_low_target). Install it.
9041
9042 * mem-break.h (delete_breakpoint): Declare.
9043 * mem-break.c (delete_breakpoint): Make external.
9044
9045 * target.h (struct target_ops): Add `supports_tracepoints',
9046 `read_pc', and `write_pc' fields.
9047 (target_supports_tracepoints): Define.
9048 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9049 (phex_nz): New.
9050
9051 * regcache.h (struct regcache) <registers_owned>: New field.
9052 (init_register_cache, regcache_cpy): Declare.
9053 (regcache_read_pc, regcache_write_pc): Declare.
9054 (register_cache_size): Declare.
9055 (supply_regblock): Declare.
9056 * regcache.c (init_register_cache): New.
9057 (new_register_cache): Use it.
9058 (regcache_cpy): New.
9059 (register_cache_size): New.
9060 (supply_regblock): New.
9061 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9062
219f2f23
PA
9063 * tracepoint.c: New.
9064
9065 * Makefile.in (OBS): Add tracepoint.o.
9066 (tracepoint.o): New rule.
9067
3a13a53b
L
90682010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9069
9070 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9071 (i386-mmx.o): New.
9072 (i386-mmx.c): Likewise.
9073 (i386-mmx-linux.o): Likewise.
9074 (i386-mmx-linux.c): Likewise.
9075
9076 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9077 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9078 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9079 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9080
9081 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9082 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9083 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9084
1570b33e
L
90852010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9086
9087 * Makefile.in (clean): Updated.
9088 (i386-avx.o): New.
9089 (i386-avx.c): Likewise.
9090 (i386-avx-linux.o): Likewise.
9091 (i386-avx-linux.c): Likewise.
9092 (amd64-avx.o): Likewise.
9093 (amd64-avx.c): Likewise.
9094 (amd64-avx-linux.o): Likewise.
9095 (amd64-avx-linux.c): Likewise.
9096
9097 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9098 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9099 (srv_amd64_regobj): Add amd64-avx.o.
9100 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9101 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9102 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9103 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9104 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9105 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9106 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9107
9108 * i387-fp.c: Include "i386-xstate.h".
9109 (i387_xsave): New.
9110 (i387_cache_to_xsave): Likewise.
9111 (i387_xsave_to_cache): Likewise.
9112 (x86_xcr0): Likewise.
9113
9114 * i387-fp.h (i387_cache_to_xsave): Likewise.
9115 (i387_xsave_to_cache): Likewise.
9116 (x86_xcr0): Likewise.
9117
9118 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9119 * linux-crisv32-low.c (target_regsets): Likewise.
9120 * linux-m68k-low.c (target_regsets): Likewise.
9121 * linux-mips-low.c (target_regsets): Likewise.
9122 * linux-ppc-low.c (target_regsets): Likewise.
9123 * linux-s390-low.c (target_regsets): Likewise.
9124 * linux-sh-low.c (target_regsets): Likewise.
9125 * linux-sparc-low.c (target_regsets): Likewise.
9126 * linux-xtensa-low.c (target_regsets): Likewise.
9127
9128 * linux-low.c: Include <sys/uio.h>.
9129 (regsets_fetch_inferior_registers): Support nt_type.
9130 (regsets_store_inferior_registers): Likewise.
9131 (linux_process_qsupported): New.
9132 (linux_target_ops): Add linux_process_qsupported.
9133
9134 * linux-low.h (regset_info): Add nt_type.
9135 (linux_target_ops): Add process_qsupported.
9136
9137 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9138 and <sys/uio.h>.
9139 (init_registers_i386_avx_linux): New.
9140 (init_registers_amd64_avx_linux): Likewise.
9141 (xmltarget_i386_linux_no_xml): Likewise.
9142 (xmltarget_amd64_linux_no_xml): Likewise.
9143 (PTRACE_GETREGSET): Likewise.
9144 (PTRACE_SETREGSET): Likewise.
9145 (x86_fill_xstateregset): Likewise.
9146 (x86_store_xstateregset): Likewise.
9147 (use_xml): Likewise.
9148 (x86_linux_update_xmltarget): Likewise.
9149 (x86_linux_process_qsupported): Likewise.
9150 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9151 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9152 init_registers_i386_linux here. Call
9153 x86_linux_update_xmltarget.
9154 (the_low_target): Add x86_linux_process_qsupported.
9155
9156 * server.c (handle_query): Call target_process_qsupported.
9157
9158 * target.h (target_ops): Add process_qsupported.
9159 (target_process_qsupported): New.
9160
fc7238bb
PA
91612010-04-03 Pedro Alves <pedro@codesourcery.com>
9162
9163 * inferiors.c (add_thread): Set last_status kind to
9164 TARGET_WAITKIND_IGNORE.
9165 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9166 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9167 (linux_wait_1): Move `thread' local definition to block that uses
9168 it. Don't NULL initialize `event_child'.
9169 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9170 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9171 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9172
bdabb078
PA
91732010-04-01 Pedro Alves <pedro@codesourcery.com>
9174
9175 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9176 an extended waitstatus, or by a watchpoint.
9177 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9178 thread was stepping or has been stopped by a watchpoint.
9179
d3bbe7a0
PA
91802010-04-01 Pedro Alves <pedro@codesourcery.com>
9181
9182 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9183 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9184 of another, then delete the previous, and validate all
9185 breakpoints.
9186 (validate_inserted_breakpoint): New.
9187 (delete_disabled_breakpoints): New.
9188 (validate_breakpoints): New.
9189 (check_mem_read): Validate breakpoints before trusting their
9190 shadow. Delete disabled breakpoints.
9191 (check_mem_write): Validate breakpoints before trusting they
9192 should be inserted. Delete disabled breakpoints.
9193 * mem-break.h (validate_breakpoints):
9194 * server.c (handle_query): Validate breakpoints when we see a
9195 qSymbol query.
9196
8b07ae33
PA
91972010-04-01 Pedro Alves <pedro@codesourcery.com>
9198
9199 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9200 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9201 if we could tell there's a GDB breakpoint at stop_pc.
9202 (need_step_over_p): Don't do a step over if we find a GDB
9203 breakpoint at the resume PC.
9204
9205 * mem-break.c (struct raw_breakpoint): New.
9206 (enum bkpt_type): New type `gdb_breakpoint'.
9207 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9208 fields. New field `raw'.
9209 (find_raw_breakpoint_at): New.
9210 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9211 breakpoint instead.
9212 (set_breakpoint_at): Adjust.
9213 (delete_raw_breakpoint): New.
9214 (release_breakpoint): New.
9215 (delete_breakpoint): Rename to...
9216 (delete_breakpoint_1): ... this. Add proc parameter. Use
9217 release_breakpoint. Return ENOENT.
9218 (delete_breakpoint): Reimplement.
9219 (find_breakpoint_at): Delete.
9220 (find_gdb_breakpoint_at): New.
9221 (delete_breakpoint_at): Delete.
9222 (set_gdb_breakpoint_at): New.
9223 (delete_gdb_breakpoint_at): New.
9224 (gdb_breakpoint_here): New.
9225 (set_reinsert_breakpoint): Use release_breakpoint.
9226 (uninsert_breakpoint): Rename to ...
9227 (uninsert_raw_breakpoint): ... this.
9228 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9229 (reinsert_raw_breakpoint): Change parameter type to
9230 raw_breakpoint.
9231 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9232 instead.
9233 (check_breakpoints): Adjust. Use release_breakpoint.
9234 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9235 (breakpoint_inserted_here): Ditto.
9236 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9237 Don't trust the breakpoint's shadow if it is not inserted.
9238 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9239 (delete_all_breakpoints): Adjust.
9240 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9241 use delete_breakpoint_1.
9242
9243 * mem-break.h (breakpoints_supported): Delete declaration.
9244 (set_gdb_breakpoint_at): Declare.
9245 (gdb_breakpoint_here): Declare.
9246 (delete_breakpoint_at): Delete.
9247 (delete_gdb_breakpoint_at): Declare.
9248
9249 * server.h (struct raw_breakpoint): Forward declare.
9250 (struct process_info): New field `raw_breakpoints'.
9251
9252 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9253 breakpoints.
9254
6bf5e0ba
PA
92552010-03-24 Pedro Alves <pedro@codesourcery.com>
9256
9257 * linux-low.c (status_pending_p_callback): Fix comment.
9258 (linux_wait_for_event_1): Move most of the internal breakpoint
9259 handling from here...
9260 (linux_wait_1): ... to here.
9261 (count_events_callback): New.
9262 (select_singlestep_lwp_callback): New.
9263 (select_event_lwp_callback): New.
9264 (cancel_breakpoints_callback): New.
9265 (select_event_lwp): New.
9266 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9267 priority to all LWPs that have had events that should be reported
9268 to the client. Cancel breakpoints when about to reporting the
9269 event to the client, not while stopping lwps. No longer cancel
9270 finished single-steps here.
9271 (cancel_finished_single_step): Delete.
9272 (cancel_finished_single_steps): Delete.
9273
414a389f
PA
92742010-03-24 Pedro Alves <pedro@codesourcery.com>
9275
9276 * mem-break.c (enum bkpt_type): New.
9277 (struct breakpoint): New field `type'.
9278 (set_breakpoint_at): Change return type to struct breakpoint
9279 pointer. Set type to `other_breakpoint' by default.
9280 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9281 in the breakpoint list.
9282 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9283 (reinsert_breakpoint): Rename to ...
9284 (reinsert_raw_breakpoint): ... this.
9285 (reinsert_breakpoints_at): Adjust.
9286 * mem-break.h (struct breakpoint): Declare.
9287 (set_breakpoint_at): Change return type to struct breakpoint
9288 pointer.
9289
2280c721
PA
92902010-03-24 Pedro Alves <pedro@codesourcery.com>
9291
9292 * server.c (handle_query): Assign, not compare.
9293
d50171e4
PA
92942010-03-24 Pedro Alves <pedro@codesourcery.com>
9295
9296 Teach linux gdbserver to step-over-breakpoints.
9297
9298 * linux-low.c (can_hardware_single_step): New.
9299 (supports_breakpoints): New.
9300 (handle_extended_wait): If stopping threads, read the stop pc of
9301 the new cloned LWP.
9302 (get_pc): New.
9303 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9304 low target doesn't support retrieving the PC.
9305 (add_lwp): Set last_resume_kind to resume_continue.
9306 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9307 (linux_attach): Don't clear stop_expected. Set the lwp's
9308 last_resume_kind to resume_stop.
9309 (linux_detach_one_lwp): Don't check for removed breakpoints.
9310 (check_removed_breakpoint): Delete.
9311 (status_pending_p): Rename to ...
9312 (status_pending_p_callback): ... this. Don't check for removed
9313 breakpoints. Don't consider threads that are stopped from GDB's
9314 perspective.
9315 (linux_wait_for_lwp): Always read the stop_pc here.
9316 (cancel_breakpoint): New.
9317 (step_over_bkpt): New global.
9318 (linux_wait_for_event_1): Implement stepping over breakpoints.
9319 (gdb_wants_lwp_stopped): New.
9320 (gdb_wants_all_stopped): New.
9321 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9322 single-step traps here. Store the thread's last reported target
9323 wait status.
9324 (send_sigstop): Don't clear stop_expected. Always set it,
9325 instead.
9326 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9327 (cancel_finished_single_step): New.
9328 (cancel_finished_single_steps): New.
9329 (wait_for_sigstop): Don't cancel finished single-step traps here.
9330 (linux_resume_one_lwp): Don't check for removed breakpoints.
9331 Don't set `step' on non-hardware step archs.
9332 (linux_set_resume_request): Ignore resume_stop requests if already
9333 stopping or stopped. Set the lwp's last_resume_kind.
9334 (resume_status_pending_p): Don't check for removed breakpoints.
9335 (need_step_over_p): New.
9336 (start_step_over): New.
9337 (finish_step_over): New.
9338 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9339 requests. Clear the thread's last reported target waitstatus.
9340 Don't use the `suspended' flag. Don't consider pending breakpoints.
9341 (linux_resume): Start a step-over if necessary.
9342 (proceed_one_lwp): New.
9343 (proceed_all_lwps): New.
9344 (unstop_all_lwps): New.
9345 * linux-low.h (struct lwp_info): Rewrite comment for the
9346 `suspended' flag. Add the `stop_pc' field. Delete the
9347 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9348 Add `'last_resume_kind' and `need_step_over' fields.
9349 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9350 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9351 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9352 (set_raw_breakpoint_at): New.
9353 (set_breakpoint_at): Rewrite to use it.
9354 (reinsert_breakpoint_handler): Delete.
9355 (set_reinsert_breakpoint): New.
9356 (reinsert_breakpoint_by_bp): Delete.
9357 (delete_reinsert_breakpoints): New.
9358 (uninsert_breakpoint): Rewrite.
9359 (uninsert_breakpoints_at): New.
9360 (reinsert_breakpoint): Rewrite.
9361 (reinsert_breakpoints_at): New.
9362 (check_breakpoints): Rewrite.
9363 (breakpoint_here): New.
9364 (breakpoint_inserted_here): New.
9365 (check_mem_read): Adjust.
9366 * mem-break.h (breakpoints_supported, breakpoint_here)
9367 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9368 (reinsert_breakpoint_by_bp): Delete declaration.
9369 (delete_reinsert_breakpoints): Declare.
9370 (reinsert_breakpoint): Delete declaration.
9371 (reinsert_breakpoints_at): Declare.
9372 (uninsert_breakpoint): Delete declaration.
9373 (uninsert_breakpoints_at): Declare.
9374 (check_breakpoints): Adjust prototype.
9375 * server.h: Adjust include order.
9376 (struct thread_info): Declare here. Add a `last_status' field.
9377
30ba68cb
MS
93782010-03-23 Michael Snyder <msnyder@vmware.com>
9379
9380 * server.c (crc32): New function.
9381 (handle_query): Add handling for 'qCRC:' request.
9382
b9a881c2
PA
93832010-03-23 Pedro Alves <pedro@codesourcery.com>
9384
9385 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9386 lwp had been stopped by a watchpoint.
9387
e92d13d5
PA
93882010-03-16 Pedro Alves <pedro@codesourcery.com>
9389
9390 * server.h (internal_error): Declare.
9391 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9392 * utils.c (internal_error): New function.
9393
64daa791
AS
93942010-03-15 Andreas Schwab <schwab@redhat.com>
9395
9396 * configure.srv: Fix typo setting srv_regobj.
9397
f52cd8cd
PA
93982010-03-15 Pedro Alves <pedro@codesourcery.com>
9399
9400 * linux-low.c (fetch_register): Avoid passing a non string literal
9401 format to `error'.
9402 (usr_store_inferior_registers): Ditto.
9403
93ae6fdc
PA
94042010-03-14 Pedro Alves <pedro@codesourcery.com>
9405
9406 * linux-low.c (linux_write_memory): Bail out early if peeking
9407 memory failed.
9408
c3adc08c
PA
94092010-03-14 Pedro Alves <pedro@codesourcery.com>
9410
9411 * linux-low.h (struct lwp_info): New fields
9412 `stopped_by_watchpoint' and `stopped_data_address'.
9413 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9414 here, and cache them in the lwp object.
9415 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9416 directly.
9417 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9418 field.
9419 (linux_stopped_by_watchpoint): Rewrite.
9420 (linux_stopped_data_address): Rewrite.
9421
bce522a2
PA
94222010-03-06 Simo Melenius <simo.melenius@iki.fi>
9423
9424 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9425 switching the current inferior, not before.
9426
90884b2b
L
94272010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9428
9429 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9430 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9431 i386-linux.c and amd64-linux.c.
9432 (reg-i386.o): Removed.
9433 (reg-i386.c): Likewise.
9434 (reg-i386-linux.o): Likewise.
9435 (reg-i386-linux.c): Likewise.
9436 (reg-x86-64.o): Likewise.
9437 (reg-x86-64.c): Likewise.
9438 (reg-x86-64-linux.o): Likewise.
9439 (reg-x86-64-linux.c): Likewise.
9440 (i386.o): New.
9441 (i386.c): Likewise.
9442 (i386-linux.o): Likewise.
9443 (i386-linux.c): Likewise.
9444 (amd64.o): Likewise.
9445 (amd64.c): Likewise.
9446 (amd64-linux.o): Likewise.
9447 (amd64-linux.c): Likewise.
9448
9449 * configure.srv (srv_i386_regobj): New.
9450 (srv_i386_linux_regobj): Likewise.
9451 (srv_amd64_regobj): Likewise.
9452 (srv_amd64_linux_regobj): Likewise.
9453 (srv_i386_32bit_xmlfiles): Likewise.
9454 (srv_i386_64bit_xmlfiles): Likewise.
9455 (srv_i386_xmlfiles): Likewise.
9456 (srv_amd64_xmlfiles): Likewise.
9457 (srv_i386_linux_xmlfiles): Likewise.
9458 (srv_amd64_linux_xmlfiles): Likewise.
9459 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9460 srv_xmlfiles to $srv_i386_xmlfiles.
9461 (i[34567]86-*-mingw32ce*): Likewise.
9462 (i[34567]86-*-mingw*): Likewise.
9463 (i[34567]86-*-nto*): Likewise.
9464 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9465 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9466 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9467 (x86_64-*-linux*): Likewise.
9468
9469 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9470 (init_registers_amd64_linux): New.
9471 (x86_arch_setup): Replace init_registers_x86_64_linux with
9472 init_registers_amd64_linux.
9473
193f13e6
MK
94742010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9475
9476 * configure.ac: Check for libdl. If it is not available link against
9477 static libthread_db.
9478 * configure: Regenerate.
9479
85d721b8
PA
94802010-02-22 Pedro Alves <pedro@codesourcery.com>
9481
9482 PR9605
9483
9484 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9485 handing a read watchpoint.
9486 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9487
6076632b
DE
94882010-02-12 Doug Evans <dje@google.com>
9489
9490 * linux-low.c (linux_supports_tracefork_flag): Document.
9491 (linux_look_up_symbols): Add comment.
9492
3327ccf7
L
94932010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9494
9495 * regcache.c (supply_register): Clear regcache if buf is NULL.
9496
0718675c 94972010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9498 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9499
9500 * inferiors.c (find_inferior): Add function documentation.
9501 (unloaded_dll): Handle the case where the unloaded dll has not
9502 been previously registered in the dll list.
9503
177321bd
DJ
95042010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9505
9506 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9507 (thumb2_breakpoint): New.
9508 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9509
2b009048
DJ
95102010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9511
9512 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9513 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9514 breakpoints.
9515
3be029c7
PA
95162010-01-21 Pedro Alves <pedro@codesourcery.com>
9517
9518 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9519
18f5de3b
JK
95202010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9521
9522 * linux-s390-low.c (s390_collect_ptrace_register)
9523 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9524
3743bb4f
DE
95252010-01-21 Doug Evans <dje@google.com>
9526
14ce3065
DE
9527 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9528 (PTRACE_ARG4_TYPE): New macro.
9529 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9530 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9531 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9532 (usr_store_inferior_registers): Ditto.
9533 (linux_read_memory, linux_write_memory): Ditto.
9534 (linux_test_for_tracefork): Ditto.
9535
3743bb4f
DE
9536 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9537 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9538
8b315be5
PA
95392010-01-21 Pedro Alves <pedro@codesourcery.com>
9540
9541 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9542 target.
9543
85492558
PA
95442010-01-21 Pedro Alves <pedro@codesourcery.com>
9545
9546 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9547 prototype to take a regcache. Adjust.
9548
442ea881
PA
95492010-01-20 Pedro Alves <pedro@codesourcery.com>
9550
9551 * regcache.h (struct thread_info): Forward declare.
9552 (struct regcache): New.
9553 (new_register_cache): Adjust prototype.
9554 (get_thread_regcache): Declare.
9555 (free_register_cache): Adjust prototype.
9556 (registers_to_string, registers_from_string): Ditto.
9557 (supply_register, supply_register_by_name, collect_register)
9558 (collect_register_as_string, collect_register_by_name): Ditto.
9559 * regcache.c (struct inferior_regcache_data): Delete.
9560 (get_regcache): Rename to ...
9561 (get_thread_regcache): ... this. Adjust. Switch inferior before
9562 fetching registers.
9563 (regcache_invalidate_one): Adjust.
9564 (regcache_invalidate): Fix prototype.
9565 (new_register_cache): Return the new register cache.
9566 (free_register_cache): Change prototype.
9567 (realloc_register_cache): Adjust.
9568 (registers_to_string): Change prototype to take a regcache. Adjust.
9569 (registers_from_string): Ditto.
9570 (register_data): Ditto.
9571 (supply_register): Ditto.
9572 (supply_register_by_name): Ditto.
9573 (collect_register): Ditto.
9574 (collect_register_as_string): Ditto.
9575 (collect_register_by_name): Ditto.
9576 * server.c (process_serial_event): Adjust.
9577 * linux-low.h (regset_fill_func, regset_store_func): Change
9578 prototype.
9579 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9580 Change prototype.
9581 * linux-low.c (get_stop_pc): Adjust.
9582 (check_removed_breakpoint): Adjust.
9583 (linux_wait_for_event): Adjust.
9584 (linux_resume_one_lwp): Adjust.
9585 (fetch_register): Add regcache parameter. Adjust.
9586 (usr_store_inferior_registers): Ditto.
9587 (regsets_fetch_inferior_registers): Ditto.
9588 (regsets_store_inferior_registers): Ditto.
9589 (linux_fetch_registers, linux_store_registers): Ditto.
9590 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9591 regcache. Adjust.
43aaf8b6
PA
9592 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9593 Ditto.
442ea881
PA
9594 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9595 prototype to take a regcache.
9596 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9597 * remote-utils.c (convert_ascii_to_int, outreg)
9598 (prepare_resume_reply): Change prototype to take a regcache.
9599 Adjust.
9600 * target.h (struct target_ops) <fetch_registers, store_registers>:
9601 Change prototype to take a regcache.
9602 (fetch_inferior_registers, store_inferior_registers): Change
9603 prototype to take a regcache. Adjust.
9604 * proc-service.c (ps_lgetregs): Adjust.
9605 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9606 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9607 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9608 take a regcache. Adjust.
9609 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9610 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9611 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9612 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9613 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9614 (cris_cannot_fetch_register):
9615 (cris_breakpoint_at): Change prototype to take a regcache.
9616 Adjust.
9617 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9618 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9619 to take a regcache. Adjust.
9620 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9621 Adjust.
9622 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9623 take a regcache. Adjust.
9624 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9625 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9626 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9627 * linux-mips-low.c (mips_get_pc):
9628 (mips_set_pc): Change prototype to take a regcache. Adjust.
9629 (mips_reinsert_addr): Adjust.
9630 (mips_collect_register): Change prototype to take a regcache.
9631 Adjust.
9632 (mips_supply_register):
9633 (mips_collect_register_32bit, mips_supply_register_32bit)
9634 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9635 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9636 * linux-ppc-low.c (ppc_supply_ptrace_register)
9637 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9638 (parse_spufs_run): Adjust.
9639 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9640 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9641 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9642 take a regcache. Adjust.
9643 * linux-s390-low.c (s390_collect_ptrace_register)
9644 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9645 (s390_set_pc): Change prototype to take a regcache. Adjust.
9646 (s390_arch_setup): Adjust.
9647 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9648 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9649 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9650 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9651 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9652 regcache. Adjust.
9653 (sparc_breakpoint_at): Adjust.
9654 * linux-xtensa-low.c (xtensa_fill_gregset):
9655 (xtensa_store_gregset):
9656 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9657 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9658 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9659 prototype to take a regcache. Adjust.
9660 * win32-arm-low.c (arm_fetch_inferior_register)
9661 (arm_store_inferior_register): Change prototype to take a
9662 regcache. Adjust.
9663 * win32-i386-low.c (i386_fetch_inferior_register)
9664 (i386_store_inferior_register): Change prototype to take a
9665 regcache. Adjust.
9666 * win32-low.c (child_fetch_inferior_registers)
9667 (child_store_inferior_registers): Change prototype to take a
9668 regcache. Adjust.
9669 (win32_wait): Adjust.
9670 (win32_fetch_inferior_registers): Change prototype to take a
9671 regcache. Adjust.
9672 (win32_store_inferior_registers): Adjust.
9673 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9674 store_inferior_register>: Change prototype to take a regcache.
9675
60c3d7b0
DE
96762010-01-20 Doug Evans <dje@google.com>
9677
9678 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9679 #ifdef.
9680 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9681 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9682
dc146f7c
VP
96832010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9684
9685 * linux-low.c (linux_core_of_thread): New.
9686 (compare_ints, show_process, list_threads): New.
9687 (linux_qxfer_osdata): Report threads and cores.
9688 (linux_target_op): Register linux_core_of_thread.
9689 * remote-utils.c (prepare_resume_reply): Report the core.
9690 (buffer_xml_printf): Support %d specifier.
9691 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9692 New.
9693 (handle_query): Handle qXfer:threads. Announce availability
9694 thereof.
9695 * target.h (struct target_ops): New field core_of_thread.
9696
7803799a
UW
96972010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9698
9699 * Makefile.in (clean): Remove new generated files.
9700 (reg-s390.o, reg-s390.c): Remove rules.
9701 (reg-s390x.o, reg-s390x.c): Likewise.
9702 (s390-linux32.o, s390-linux32.c): Add rules.
9703 (s390-linux64.o, s390-linux64.c): Likewise.
9704 (s390x-linux64.o, s390x-linux64.c): Likewise.
9705 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9706 * linux-s390-low.c: Include <elf.h>.
9707 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9708 (init_registers_s390): Remove prototype.
9709 (init_registers_s390x): Likewise.
9710 (init_registers_s390_linux32): Add prototype.
9711 (init_registers_s390_linux64): Likewise.
9712 (init_registers_s390x_linux64): Likewise.
9713 (s390_num_regs_3264): New define.
9714 (s390_regmap_3264): New global variable.
9715 (s390_cannot_fetch_register): Remove obsolete check.
9716 (s390_cannot_store_register): Likewise.
9717 (s390_collect_ptrace_register): Handle upper/lower register halves.
9718 (s390_supply_ptrace_register): Likewise.
9719 (s390_fill_gregset): Update to register number changes.
9720 (s390_get_hwcap): New routine.
9721 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9722 Install appropriate regmap and register set.
9723
6e7ffa39
JB
97242010-01-01 Joel Brobecker <brobecker@adacore.com>
9725
9726 * server.c (gdbserver_version): Update copyright year to 2010.
9727 * gdbreplay.c (gdbreplay_version): Likewise.
9728
957f3f49
DE
97292009-12-28 Doug Evans <dje@google.com>
9730
9731 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9732 elf/external.h. Include <elf.h> instead but only if necessary.
9733
ca5c370d
PA
97342009-12-28 Pedro Alves <pedro@codesourcery.com>
9735
9736 * linux-low.c (linux_remove_process): Remove `detaching'
9737 parameter. Don't release/detach from thread_db here.
9738 (linux_kill): Release/detach from thread_db here, ...
9739 (linux_detach): ... and here, before actually detaching.
9740 (linux_wait_1): ... and here, when a process exits.
9741 * thread-db.c (any_thread_of): New.
9742 (thread_db_free): Switch the current inferior to a thread of the
9743 passed in process.
9744
4ee62156
DE
97452009-12-21 Doug Evans <dje@google.com>
9746
d90e6a88
DE
9747 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9748
c5f62d5f
DE
9749 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9750 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9751 warning ifndef __NR_tkill. Move setting of errno there too.
9752 Delete unnecessary resetting of errno after syscall.
9753 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9754
10e86dd7
DE
9755 * configure.ac: Check for dladdr.
9756 * config.in: Regenerate.
9757 * configure: Regenerate.
9758 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9759 (try_thread_db_load): Update.
9760
4ee62156
DE
9761 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9762
00f515da
DE
97632009-12-18 Doug Evans <dje@google.com>
9764
e9464885
DE
9765 * event-loop.c: Include unistd.h if it exists.
9766
07d4f67e
DE
9767 * linux-low.c (my_waitpid): Move definition away from being in
9768 between linux_tracefork_child/linux_test_for_tracefork.
9769
00f515da
DE
9770 * gdb_proc_service.h (psaddr_t): Fix type.
9771 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9772 signature to match glibc.
9773
1de1badb
DE
97742009-12-16 Doug Evans <dje@google.com>
9775
9776 * linux-low.c (linux_read_memory): Fix argument to read.
9777
aeeb81d1
PA
97782009-11-26 Pedro Alves <pedro@codesourcery.com>
9779
9780 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9781 events, don't leave current_inferior pointing at null.
9782
10357975
PA
97832009-11-26 Pedro Alves <pedro@codesourcery.com>
9784
9785 * win32-low.c (LOG): Delete.
9786 (OUTMSG): Output to stderr.
9787 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9788 on compile time LOG macro.
9789 (win32_wait): Fix debug output.
9790
cf6e3471
PA
97912009-11-26 Pedro Alves <pedro@codesourcery.com>
9792
9793 * win32-low.c (win32_add_one_solib): If the dll name is
9794 "ntdll.dll", prepend the system directory to the dll path.
9795
0c85e18e
MK
97962009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9797
9798 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9799
9ac544ce 98002009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9801 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9802
9803 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9804 * configure.ac: Check for __mcoldfire__ and set
9805 gdb_cv_m68k_is_coldfire.
9806 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9807 reg-cf.o and reg-m68k.o.
9808 * configure: Regenerated.
9809
fd7dd3e6
PA
98102009-11-16 Pedro Alves <pedro@codesourcery.com>
9811
9812 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9813 Pass it to thread_db_free.
9814 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9815 proper `detaching' argument to linux_remove_process.
9816 * linux-low.h (thread_db_free): Add `detaching' parameter.
9817 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9818 to thread_db_free.
9819 (thread_db_free): Add `detaching' parameter. Only
9820 call td_ta_clear_event if detaching from process.
9821
75aa492e
MK
98222009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9823
9824 * thread-db.c (thread_db_free): Fix typo.
9825
21e1bee4
PP
98262009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9827
9828 PR gdb/10838
9829 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9830
8838b45e
NS
98312009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9832
9833 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9834 with an i686 compiler.
9835 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9836 needed.
9837 * configure: Rebuilt.
9838
8a35fb51
SL
98392009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9840
9841 PR gdb/10783
9842
9843 * server.c (handle_search_memory_1): Correct read_addr initialization
9844 in loop for searching subsequent chunks.
9845
96f15937
PP
98462009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9847
9848 * configure.ac: New --with-libthread-db option.
9849 * thread-db.c: Allow direct dependence on libthread_db.
9850 (thread_db_free): Adjust.
9851 * config.in: Regenerate.
9852 * configure: Likewise.
889bf7c5 9853
5f7d1694
PP
98542009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9855
9856 PR gdb/10757
9857 * thread-db.c (attach_thread): New function.
9858 (maybe_attach_thread): Return success/failure.
9859 (find_new_threads_callback): Adjust.
889bf7c5
PA
9860 (thread_db_find_new_threads): Loop until no new threads.
9861
88e3b899
PA
98622009-10-13 Pedro Alves <pedro@codesourcery.com>
9863
9864 * proc-service.c (ps_lgetregs): Formatting.
9865
cdbfd419
PP
98662009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9867
9868 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9869 * configure.ac: Adjust.
9870 * linux-low.h (struct process_info_private): Move members to struct
9871 thread_db.
9872 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9873 * linux-low.c (linux_remove_process): Adjust.
9874 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9875 * server.c (handle_query): Move code ...
9876 (handle_monitor_command): ... here. New function.
9877 * target.h (struct target_ops): New member.
9878 * thread-db.c (struct thread_db): New.
9879 (libthread_db_search_path): New variable.
9880 (thread_db_create_event, thread_db_enable_reporting)
9881 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9882 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9883 (try_thread_db_load_1, dladdr_to_soname): New functions.
9884 (try_thread_db_load, thread_db_load_search): New functions.
9885 (thread_db_init): Search for libthread_db.
9886 (thread_db_free): New function.
9887 (thread_db_handle_monitor_command): Likewise.
9888 * config.in: Regenerate.
9889 * configure: Regenerate.
889bf7c5 9890
4168d2d6
UW
98912009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9892
9893 * spu-low.c (spu_kill): Wait for inferior to terminate.
9894 Call clear_inferiors.
9895 (spu_detach): Call clear_inferiors.
9896
81ecdfbb
RW
98972009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9898
9899 * aclocal.m4: Regenerate.
9900 * config.in: Likewise.
9901 * configure: Likewise.
9902
0b9ff2c0
UW
99032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9904
9905 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9906 (parse_spufs_run): New function.
9907 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9908 (ppc_breakpoint_at): Handle SPU breakpoints.
9909
efcbbd14
UW
99102009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9911
9912 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9913 (SPUFS_MAGIC): Define.
9914 (spu_enumerate_spu_ids): New function.
9915 (linux_qxfer_spu): New function.
9916 (linux_target_ops): Install linux_qxfer_spu.
9917
f4d9bade
UW
99182009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9919
9920 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9921 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9922 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9923 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9924 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9925 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9926 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9927 (init_registers_powerpc_cell32l): Add prototype.
9928 (init_registers_powerpc_cell64l): Likewise.
9929 (ppc_arch_setup): Detect Cell/B.E. architecture.
9930
96e946ca
RW
99312009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9932
9933 * Makefile.in (datarootdir): New variable.
9934
58d6951d
DJ
99352009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9936
9937 * linux-low.c (linux_write_memory): Update debugging output.
9938 * Makefile.in (clean): Add new descriptions.
9939 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9940 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9941 * configure.srv: Add new files for arm*-*-linux*.
9942 * linux-arm-low.c: Add new declarations.
9943 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9944 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9945 (HWCAP_VFPv3D16): New.
9946 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9947 instead of __IWMMXT__.
9948 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9949 (arm_arch_setup): New.
9950 (target_regsets): Remove #ifdef. Add VFP regset.
9951 (the_low_target): Use arm_arch_setup.
9952
12b42a12
DJ
99532009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9954
9955 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9956 the main thread again.
9957
ac8c974e
AR
99582009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9959
9960 Adding Neutrino gdbserver.
9961 * configure: Regenerated.
9962 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9963 * configure.srv (i[34567]86-*-nto*): New target.
9964 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9965 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9966 (nto_comctrl) [__QNX__]: New function.
9967 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9968
4424e0c3 99692009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9970
9971 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9972 srv_tgtobj.
9973
912cf4ba
PA
99742009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9975 Pedro Alves <pedro@codesourcery.com>
9976
9977 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9978 don't support CONTEXT_EXTENDED_REGISTERS.
9979 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9980 (the_low_target): Install them.
9981 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9982 failing with ERROR_PIPE_NOT_CONNECTED.
9983
aa5ca48f
DE
99842009-06-30 Doug Evans <dje@google.com>
9985 Pierre Muller <muller@ics.u-strasbg.fr>
9986
9987 Add h/w watchpoint support to x86-linux, win32-i386.
9988 * Makefile.in (SFILES): Add i386-low.c
9989 (i386_low_h): Define.
9990 (i386-low.o): Add dependencies.
9991 (linux-x86-low.o): Add i386-low.h dependency.
9992 (win32-i386-low.o): Ditto.
9993 * i386-low.c: New file.
9994 * i386-low.h: New file.
9995 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9996 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9997 * linux-low.c (linux_add_process): Initialize arch_private.
9998 (linux_remove_process): Free arch_private.
9999 (add_lwp): Initialize arch_private.
10000 (delete_lwp): Free arch_private.
10001 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10002 provided.
10003 * linux-low.h (process_info_private): New member arch_private.
10004 (lwp_info): New member arch_private.
10005 (linux_target_ops): New members new_process, new_thread,
10006 prepare_to_resume.
10007 (ptid_of): New macro.
10008 * linux-x86-low.c: Include stddef.h, i386-low.h.
10009 (arch_process_info): New struct.
10010 (arch_lwp_info): New struct.
10011 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10012 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10013 (i386_dr_low_get_status): New function.
10014 (x86_insert_point, x86_remove_point): New functions.
10015 (x86_stopped_by_watchpoint): New function.
10016 (x86_stopped_data_address): New function.
10017 (x86_linux_new_process, x86_linux_new_thread): New functions.
10018 (x86_linux_prepare_to_resume): New function.
10019 (the_low_target): Add entries for insert_point, remove_point,
10020 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10021 prepare_to_resume.
10022 * server.c (debug_hw_points): New global.
10023 (monitor_show_help): Document set debug-hw-points.
10024 (handle_query): Process "set debug-hw-points".
10025 * server.h (debug_hw_points): Declare.
10026 (paddress): Declare.
10027 * utils.c (NUMCELLS, CELLSIZE): New macros.
10028 (get_sell, xsnprintf, paddress): New functions.
10029 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10030 remove_point, stopped_by_watchpoint, stopped_data_address.
10031 * win32-i386-low.c: Include i386-low.h.
10032 (debug_reg_state): Replaces dr.
10033 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10034 (i386_dr_low_get_status): New function.
10035 (i386_insert_point, i386_remove_point): New functions.
10036 (i386_stopped_by_watchpoint): New function.
10037 (i386_stopped_data_address): New function.
10038 (i386_initial_stuff): Update.
10039 (get_thread_context,set_thread_context,i386_thread_added): Update.
10040 (the_low_target): Add entries for insert_point,
10041 remove_point, stopped_by_watchpoint, stopped_data_address.
10042 * win32-low.c (win32_insert_watchpoint): New function.
10043 (win32_remove_watchpoint): New function.
10044 (win32_stopped_by_watchpoint): New function.
10045 (win32_stopped_data_address): New function.
10046 (win32_target_ops): Add entries for insert_watchpoint,
10047 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10048 * win32-low.h (win32_target_ops): New members insert_point,
10049 remove_point, stopped_by_watchpoint, stopped_data_address.
10050
d993e290
PA
100512009-06-25 Pedro Alves <pedro@codesourcery.com>
10052
10053 * server.c (process_serial_event): Re-return unsupported, not
10054 error, if the type isn't recognized. Re-allow supporting only
10055 insert or remove packets. Also call require_running for
10056 breakpoints. Add missing break statement to default case. Tidy.
10057 * target.h (struct target_ops): Rename insert_watchpoint to
10058 insert_point, and remove_watchpoint to remove_point.
10059
10060 * linux-low.h (struct linux_target_ops): Likewise.
10061 * linux-low.c (linux_insert_watchpoint): Rename to ...
10062 (linux_insert_point): ... this. Adjust.
10063 (linux_remove_watchpoint): Rename to ...
10064 (linux_remove_point): ... this. Adjust.
10065 (linux_target_ops): Adjust.
10066 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10067 (cris_insert_point): ... this.
10068 (cris_remove_watchpoint): Rename to ...
10069 (cris_remove_point): ... this.
10070 (the_low_target): Adjust.
10071
0f54c268
PM
100722009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10073
10074 * server.c (handle_v_kill): Pass signal_pid to
10075 kill_inferior if multi_process is zero.
10076
c6314022
AR
100772009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10078
10079 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10080 * target.h (target_ops): Comment for *_watchpoint to make it clear
10081 the functions can get types '0' and '1'.
10082
4463ce24
AR
100832009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10084
10085 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10086 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10087 * regcache.c (get_regcache): Likewise.
10088 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10089 * win32-low.c (child_fetch_inferior_registers): Remove check for
10090 regno 0.
10091
cf8fd78b
PA
100922009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10093 Pedro Alves <pedro@codesourcery.com>
10094
10095 * target.h (struct target_ops) <supports_multi_process>: New
10096 callback.
10097 (target_supports_multi_process): New.
10098 * server.c (handle_query): Even if GDB reports support, only
10099 enable multi-process if the target also supports it. Report
10100 multi-process support only if the target backend supports it.
10101 * linux-low.c (linux_supports_multi_process): New function.
10102 (linux_target_ops): Install it as target_supports_multi_process
10103 callback.
10104
47c0c975
DE
101052009-05-24 Doug Evans <dje@google.com>
10106
e09875d4
DE
10107 Global renaming of find_thread_pid to find_thread_ptid.
10108 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10109 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10110 All callers updated.
10111
e27d73f6
DE
10112 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10113 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10114 directly.
10115
47c0c975
DE
10116 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10117 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10118 (linux_resume_one_lwp): Ditto.
10119
2acc282a
DE
101202009-05-23 Doug Evans <dje@google.com>
10121
10122 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10123 from struct inferior_list_entry * to struct lwp_info *.
10124 All callers updated.
10125
9f1036c1
DE
101262009-05-13 Doug Evans <dje@google.com>
10127
10128 * linux-x86-low.c: Don't include assert.h.
10129 (x86_siginfo_fixup): Use fatal, not assert.
10130 (x86_arch_setup): Fix comment.
10131
d0722149
DE
101322009-05-12 Doug Evans <dje@google.com>
10133
10134 Biarch support for i386/amd64 gdbserver.
10135 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10136 Add linux-x86-low.c.
10137 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10138 (linux-x86-low.o): Add.
10139 * linux-x86-64-low.c: Delete.
10140 * linux-i386-low.c: Delete.
10141 * linux-x86-low.c: New file.
10142 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10143 linux-x86-low.o.
10144 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10145 linux-x86-low.o.
10146 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10147 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10148 (linux_child_pid_to_exec_file): New function.
10149 (elf_64_header_p, elf_64_file_p): New functions.
10150 (siginfo_fixup): New function.
10151 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10152 give target a chance to convert layout.
10153 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10154 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10155
fdeb2a12
DE
101562009-05-07 Doug Evans <dje@google.com>
10157
10158 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10159 (regsets_store_inferior_registers): Ditto.
10160
a6dbe5df
PA
101612009-05-06 Pedro Alves <pedro@codesourcery.com>
10162
10163 PR server/10048
10164
10165 * linux-low.c (must_set_ptrace_flags): Delete.
10166 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10167 of the global.
10168 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10169 `lwp->must_set_ptrace_flags' instead.
ba42693b 10170 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10171 (linux_wait_1): ... not here.
10172
5091eb23
DE
101732009-04-30 Doug Evans <dje@google.com>
10174
9f767825
DE
10175 * inferiors.c (started_inferior_callback): New function.
10176 (attached_inferior_callback): New function.
10177 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10178 * server.c (print_started_pid, print_attached_pid): New functions.
10179 (detach_or_kill_for_exit): New function.
10180 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10181 * server.h (have_started_inferiors_p): Declare.
10182 (have_attached_inferiors_p): Declare.
10183
5091eb23
DE
10184 * inferiors.c (remove_process): Fix memory leak, free process.
10185 * linux-low.c (linux_remove_process): New function.
10186 (linux_kill): Call it instead of remove_process.
10187 (linux_detach, linux_wait_1): Ditto.
10188
155c8968
PA
101892009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10190
10191 * configure.srv: Add x86 Windows CE target.
10192
7fe519cb
UW
101932009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10194
10195 * inferiors.c (get_thread_process): Make global.
10196 * server.h (get_thread_process): Add prototype.
10197 * thread-db.c (find_one_thread): Use get_thread_process
10198 instead of current_process.
10199 (thread_db_get_tls_address): Do not crash if called when
10200 thread layer is not yet initialized.
10201
5472f405
UW
102022009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10203
10204 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10205 * spu-low.c (current_tid): Rename to ...
10206 (current_ptid): ... this.
10207 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10208 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10209 ptid_get_lwp (current_ptid) instead of current_tid.
10210 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10211 instead of current_tid. Use find_process_pid to verify pid
10212 argument is valid. Pass proper argument to remove_process.
10213 (spu_thread_alive): Compare current_ptid instead of current_tid.
10214 (spu_resume): Likewise.
10215
55ac2b99
PA
102162009-04-02 Pedro Alves <pedro@codesourcery.com>
10217
10218 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10219 variable.
10220
95954743
PA
102212009-04-01 Pedro Alves <pedro@codesourcery.com>
10222
10223 Implement the multiprocess extensions, and add linux multiprocess
10224 support.
10225
10226 * server.h (ULONGEST): Declare.
10227 (struct ptid, ptid_t): New.
10228 (minus_one_ptid, null_ptid): Declare.
10229 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10230 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10231 (struct inferior_list_entry): Change `id' type from unsigned from
10232 to ptid_t.
10233 (struct sym_cache, struct breakpoint, struct
10234 process_info_private): Forward declare.
10235 (struct process_info): Declare.
10236 (current_process): Declare.
10237 (all_processes): Declare.
10238 (initialize_inferiors): Declare.
10239 (add_thread): Adjust to use ptid_t.
10240 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10241 (add_process, remove_process, find_thread_pid): Declare.
10242 (find_inferior_id): Adjust to use ptid_t.
10243 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10244 (multi_process): Declare.
10245 (push_event): Adjust to use ptid_t.
10246 (read_ptid, write_ptid): Declare.
10247 (prepare_resume_reply): Adjust to use ptid_t.
10248 (clear_symbol_cache): Declare.
10249 * inferiors.c (all_processes): New.
10250 (null_ptid, minus_one_ptid): New.
10251 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10252 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10253 (add_thread): Change unsigned long to ptid. Remove gdb_id
10254 parameter. Adjust.
10255 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10256 (gdb_id_to_thread): Rename to ...
10257 (find_thread_pid): ... this. Change unsigned long to ptid.
10258 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10259 (loaded_dll, pull_pid_from_list): Adjust.
10260 (add_process, remove_process, find_process_pid)
10261 (get_thread_process, current_process, initialize_inferiors): New.
10262 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10263 (struct target_waitstatus) <related_pid>: Ditto.
10264 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10265 return type to int.
10266 (struct target_ops) <join>: Add `pid' argument.
10267 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10268 (struct target_ops) <wait>: Add `ptid' field. Change return type
10269 to ptid.
10270 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10271 (mywait): Add `ptid' argument. Change return type to ptid_t.
10272 (target_pid_to_str): Declare.
10273 * target.c (set_desired_inferior): Adjust to use ptids.
10274 (mywait): Add new `ptid' argument. Adjust.
10275 (target_pid_to_str): New.
10276 * mem-break.h (free_all_breakpoints): Declare.
10277 * mem-break.c (breakpoints): Delelete.
10278 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10279 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10280 to use per-process breakpoint list.
10281 (free_all_breakpoints): New.
10282 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10283 (symbol_cache, all_symbols_looked_up): Delete.
10284 (hexchars): New.
10285 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10286 read_ptid): New.
10287 (prepare_resume_reply): Change ptid argument's type from unsigned
10288 long to ptid_t. Adjust. Implement W;process and X;process.
10289 (free_sym_cache, clear_symbol_cache): New.
10290 (look_up_one_symbol): Adjust to per-process symbol cache. *
10291 * server.c (cont_thread, general_thread, step_thread): Change type
10292 to ptid_t.
10293 (attached): Delete.
10294 (multi_process): New.
10295 (last_ptid): Change type to ptid_t.
10296 (struct vstop_notif) <ptid>: Change type to ptid_t.
10297 (queue_stop_reply, push_event): Change `ptid' argument's type to
10298 ptid_t.
10299 (discard_queued_stop_replies): Add `pid' argument.
10300 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10301 changes. Don't reference the `attached' global.
10302 (attach_inferior): Adjust to mywait interface changes.
10303 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10304 features. Handle and report "multiprocess+". Handle
10305 "qAttached:PID".
10306 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10307 changes.
10308 (handle_v_kill): New.
10309 (handle_v_stopped): Adjust to use target_pid_to_str.
10310 (handle_v_requests): Allow multiple attaches and runs when
10311 multiprocess extensions are in effect. Handle "vKill".
10312 (myresume): Adjust to use ptids.
10313 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10314 (handle_status): Adjust to discard_queued_stop_replies interface
10315 change.
10316 (first_thread_of, kill_inferior_callback)
10317 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10318 (main): Call initialize_inferiors. Adjust to use ptids, killing
10319 and detaching from all inferiors. Handle multiprocess packet
10320 variants.
10321 * linux-low.h: Include gdb_proc_service.h.
10322 (struct process_info_private): New.
10323 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10324 <lwpid_of>: Use ptid_get_lwp.
10325 (get_lwp_thread): Adjust.
10326 (struct lwp_info): Add `dead' member.
10327 (find_lwp_pid): Declare.
10328 * linux-low.c (thread_db_active): Delete.
10329 (new_inferior): Adjust comment.
10330 (inferior_pid): Delete.
10331 (linux_add_process): New.
10332 (handle_extended_wait): Adjust.
10333 (add_lwp): Change unsigned long to ptid.
10334 (linux_create_inferior): Add process to processes table. Adjust
10335 to use ptids. Don't set new_inferior here.
10336 (linux_attach_lwp): Rename to ...
10337 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10338 it. Adjust to use ptids.
10339 (linux_attach_lwp): New.
10340 (linux_attach): Add process to processes table. Don't set
10341 new_inferior here.
10342 (struct counter): New.
10343 (second_thread_of_pid_p, last_thread_of_process_p): New.
10344 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10345 multiple processes.
10346 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10347 processes. Remove process from process table.
10348 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10349 to multiple processes.
10350 (any_thread_of): New.
10351 (linux_detach): Add `pid' argument, and handle it. Remove process
10352 from processes table.
10353 (linux_join): Add `pid' argument. Handle it.
10354 (linux_thread_alive): Change unsighed long argument to ptid_t.
10355 Consider dead lwps as not being alive.
10356 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10357 threads we're not interested in.
10358 (same_lwp, find_lwp_pid): New.
10359 (linux_wait_for_lwp): Change `pid' argument's type from int to
10360 ptid_t. Adjust.
10361 (linux_wait_for_event): Rename to ...
10362 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10363 from int to ptid_t. Adjust.
10364 (linux_wait_for_event): New.
10365 (linux_wait_1): Add `ptid' argument. Change return type to
10366 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10367 that exit from the process table.
10368 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10369 Adjust.
10370 (mark_lwp_dead): New.
10371 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10372 stopping all threads, mark its main lwp as dead.
10373 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10374 ptids.
10375 (fetch_register, usr_store_inferior_registers)
10376 (regsets_fetch_inferior_registers)
10377 (regsets_store_inferior_registers, linux_read_memory)
10378 (linux_write_memory): Inline `inferior_pid'.
10379 (linux_look_up_symbols): Adjust to use per-process
10380 `thread_db_active'.
10381 (linux_request_interrupt): Adjust to use ptids.
10382 (linux_read_auxv): Inline `inferior_pid'.
10383 (initialize_low): Don't reference thread_db_active.
10384 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10385 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10386 (ps_getpid): Return the pid of the current inferior.
10387 * thread-db.c (proc_handle, thread_agent): Delete.
10388 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10389 per-process data.
10390 (find_one_thread): Change argument type to ptid_t. Adjust to
10391 per-process data.
10392 (maybe_attach_thread): Adjust to per-process data and ptids.
10393 (thread_db_find_new_threads): Ditto.
10394 (thread_db_init): Ditto.
10395 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10396 processes table. Adjust to use ptids.
10397 (spu_kill, spu_detach): Adjust interface. Remove process from
10398 processes table.
10399 (spu_join, spu_thread_alive): Adjust interface.
10400 (spu_wait): Adjust interface. Remove process from processes
10401 table. Adjust to use ptids.
10402 * win32-low.c (current_inferior_tid): Delete.
10403 (current_inferior_ptid): New.
10404 (debug_event_ptid): New.
10405 (thread_rec): Take a ptid. Adjust.
10406 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10407 (child_delete_thread): Ditto.
10408 (do_initial_child_stuff): Add `attached' argument. Add process to
10409 processes table.
10410 (child_fetch_inferior_registers, child_store_inferior_registers):
10411 Adjust.
10412 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10413 (win32_attach): Pass 1 to do_initial_child_stuff.
10414 (win32_kill): Adjust interface. Remove process from processes
10415 table.
10416 (win32_detach): Ditto.
10417 (win32_join): Adjust interface.
10418 (win32_thread_alive): Take a ptid.
10419 (win32_resume): Adjust to use ptids.
10420 (get_child_debug_event): Ditto.
10421 (win32_wait): Adjust interface. Remove exiting process from
10422 processes table.
10423
bd99dc85
PA
104242009-04-01 Pedro Alves <pedro@codesourcery.com>
10425
10426 Non-stop mode support.
10427
10428 * server.h (non_stop): Declare.
10429 (gdb_client_data, handler_func): Declare.
10430 (delete_file_handler, add_file_handler, start_event_loop):
10431 Declare.
10432 (handle_serial_event, handle_target_event, push_event)
10433 (putpkt_notif): Declare.
10434 * target.h (enum resume_kind): New.
10435 (struct thread_resume): Replace `step' field by `kind' field.
10436 (TARGET_WNOHANG): Define.
10437 (struct target_ops) <wait>: Add `options' argument.
10438 <supports_non_stop, async, start_non_stop>: New fields.
10439 (target_supports_non_stop, target_async): New.
10440 (start_non_stop): Declare.
10441 (mywait): Add `options' argument.
10442 * target.c (mywait): Add `options' argument. Print child exit
10443 notifications here.
10444 (start_non_stop): New.
10445 * server.c (non_stop, own_buf, mem_buf): New globals.
10446 (struct vstop_notif): New.
10447 (notif_queue): New global.
10448 (queue_stop_reply, push_event, discard_queued_stop_replies)
10449 (send_next_stop_reply): New.
10450 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10451 interface changes.
10452 (attach_inferior): In non-stop mode, don't wait for the target
10453 here.
10454 (handle_general_set): Handle QNonStop.
10455 (handle_query): When handling qC, return the current general
10456 thread, instead of the first thread of the list.
10457 (handle_query): If the backend supports non-stop mode, include
10458 QNonStop+ in the qSupported query response.
10459 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10460 and non-stop mode.
10461 (handle_v_attach, handle_v_run): Handle non-stop mode.
10462 (handle_v_stopped): New.
10463 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10464 (myresume): Adjust to use resume_kind. Handle non-stop.
10465 (queue_stop_reply_callback): New.
10466 (handle_status): Handle non-stop mode.
10467 (main): Clear non_stop flag on reconnection. Use the event-loop.
10468 Refactor serial protocol handling from here ...
10469 (process_serial_event): ... to this new function. When GDB
10470 selects any thread, select one here. In non-stop mode, wait until
10471 GDB acks all pending events before exiting.
10472 (handle_serial_event, handle_target_event): New.
10473 * remote-utils.c (remote_open): Install remote_desc in the event
10474 loop.
10475 (remote_close): Remove remote_desc from the event loop.
10476 (putpkt_binary): Rename to...
10477 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10478 (putpkt_binary): New as wrapper around putpkt_binary_1.
10479 (putpkt_notif): New.
10480 (prepare_resume_reply): In non-stop mode, don't change the
10481 general_thread.
10482 * event-loop.c: New.
10483 * Makefile.in (OBJ): Add event-loop.o.
10484 (event-loop.o): New rule.
10485
10486 * linux-low.h (pid_of): Moved here.
10487 (lwpid_of): New.
10488 (get_lwp_thread): Use lwpid_of.
10489 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10490 * linux-low.c (pid_of): Delete.
10491 (inferior_pid): Use lwpid_of.
10492 (linux_event_pipe): New.
10493 (target_is_async_p): New.
10494 (delete_lwp): New.
10495 (handle_extended_wait): Use lwpid_of.
10496 (add_lwp): Don't set lwpid field.
10497 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10498 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10499 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10500 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10501 first. Adjust to linux_wait_for_event interface changes. Use
10502 lwpid_of.
10503 (linux_detach): Don't delete the main lwp here.
10504 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10505 (status_pending_p): Don't consider explicitly suspended lwps.
10506 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10507 pointer. Add OPTIONS argument. Change return type to int. Use
10508 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10509 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10510 pointer. Add status pointer argument. Return a pid instead of a
10511 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10512 changes. In non-stop mode, don't switch to a random thread.
10513 (linux_wait): Rename to...
10514 (linux_wait_1): ... this. Add target_options argument, and handle
10515 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10516 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10517 clean exit and signal exit code. Don't stop all threads in
10518 non-stop mode. In all-stop mode, only stop all threads when
10519 reporting a stop to GDB. Handle explicit thread stop requests.
10520 (async_file_flush, async_file_mark): New.
10521 (linux_wait): New.
10522 (send_sigstop): Use lwpid_of.
10523 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10524 interface changes. In non-stop mode, don't switch to a random
10525 thread.
10526 (linux_resume_one_lwp): Use lwpid_of.
10527 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10528 (linux_resume_one_thread): ... this. Handle resume_stop. In
10529 non-stop mode, don't look for pending flag in all threads.
10530 (resume_status_pending_p): Don't consider explicitly suspended
10531 threads.
10532 (my_waitpid): Reimplement. Emulate __WALL.
10533 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10534 Use lwpid_of.
10535 (sigchld_handler, linux_supports_non_stop, linux_async)
10536 (linux_start_non_stop): New.
10537 (linux_target_ops): Register linux_supports_non_stop, linux_async
10538 and linux_start_non_stop.
10539 (initialize_low): Install SIGCHLD handler.
10540 * thread-db.c (thread_db_create_event, find_one_thread)
10541 (thread_db_get_tls_address): Use lwpid_of.
10542 * win32-low.c (win32_detach): Adjust to use resume_kind.
10543 (win32_wait): Add `options' argument.
10544 * spu-low.c (spu_resume): Adjust to use resume_kind.
10545 (spu_wait): Add `options' argument.
10546
5b1c542e
PA
105472009-04-01 Pedro Alves <pedro@codesourcery.com>
10548
10549 Decouple target code from remote protocol.
10550
10551 * target.h (enum target_waitkind): New.
10552 (struct target_waitstatus): New.
10553 (struct target_ops) <wait>: Return an unsigned long. Take a
10554 target_waitstatus pointer instead of a char pointer.
10555 (mywait): Likewise.
10556 * target.c (mywait): Change prototype to return an unsigned long.
10557 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10558 * server.h (thread_from_wait, old_thread_from_wait): Delete
10559 declarations.
10560 (prepare_resume_reply): Change prototype to take a
10561 target_waitstatus.
10562 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10563 (last_status, last_ptid): New.
10564 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10565 pid instead of a signal.
10566 (attach_inferior): Remove "status" and "signal" parameters.
10567 Adjust.
10568 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10569 not as an address.
10570 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10571 (handle_v_requests, myresume): Remove "status" and "signal"
10572 parameters. Adjust.
10573 (handle_status): New.
10574 (main): Delete local `status'. Adjust.
10575 * remote-utils.c: Include target.h.
10576 (prepare_resume_reply): Change prototype to take a
10577 target_waitstatus. Adjust.
10578
10579 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10580 interface.
10581 * spu-low.c (spu_wait): Adjust.
10582 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10583 Delete.
10584 (win32_wait): Adjust.
10585
2bd7c093
PA
105862009-04-01 Pedro Alves <pedro@codesourcery.com>
10587
10588 * target.h (struct thread_resume): Delete leave_stopped member.
10589 (struct target_ops): Add a `n' argument to the `resume' callback.
10590 * server.c (start_inferior): Adjust.
10591 (handle_v_cont, myresume): Adjust.
10592 * linux-low.c (check_removed_breakpoint): Adjust to resume
10593 interface change, and to removed leave_stopped field.
10594 (resume_ptr): Delete.
10595 (struct thread_resume_array): New.
10596 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10597 resume interface change.
10598 (linux_continue_one_thread, linux_queue_one_thread)
10599 (resume_status_pending_p): Check if the resume field is NULL
10600 instead of checking the leave_stopped member.
10601 (linux_resume): Adjust to the target resume interface change.
10602 * spu-low.c (spu_resume): Adjust to the target resume interface
10603 change.
10604 * win32-low.c (win32_detach, win32_resume): Ditto.
10605
c35fafde
PA
106062009-04-01 Pedro Alves <pedro@codesourcery.com>
10607
10608 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10609 flag.
10610 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10611 pending.
10612 (linux_continue_one_thread): Only preserve the stepping flag if
10613 there's a pending breakpoint.
10614
0a59d50b
PA
106152009-03-31 Pedro Alves <pedro@codesourcery.com>
10616
10617 * server.c (main): After the inferior having exited, call
10618 remote_close before exiting gdbserver.
10619
f04c6d38
TJB
106202009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10621
10622 Fix size of FPSCR in Power 7 processors.
10623 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10624 (PPC_FEATURE_HAS_DFP): New #define.
10625 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10626 size of the FPSCR.
10627
78e5cee6
PA
106282009-03-23 Pedro Alves <pedro@codesourcery.com>
10629
10630 * server.c (handle_query) Whitespace and formatting.
10631
1b3f6016
PA
106322009-03-22 Pedro Alves <pedro@codesourcery.com>
10633
10634 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10635 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10636 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10637 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10638 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10639 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10640 Makefile.in, configure.ac: Fix whitespace throughout.
10641 * configure: Regenerate.
10642
a07b2135
PA
106432009-03-22 Pedro Alves <pedro@codesourcery.com>
10644
10645 * inferiors.c (find_inferior): Make it safe for the callback
10646 function to delete the currently iterated inferior.
10647
67cc2626
PA
106482009-03-22 Pedro Alves <pedro@codesourcery.com>
10649
10650 * Makefile.in (linuw_low_h): Move higher.
10651 (thread-db.o): Depend on $(linux_low_h).
10652
54a0b537
PA
106532009-03-17 Pedro Alves <pedro@codesourcery.com>
10654
10655 Rename "process" to "lwp" throughout.
10656
10657 * linux-low.c (all_processes): Rename to...
10658 (all_lwps): ... this.
10659 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10660 (add_process): Rename to ...
10661 (add_lwp): ... this. Adjust.
10662 (linux_create_inferior): Adjust.
10663 (linux_attach_lwp): Adjust.
10664 (linux_attach): Adjust.
10665 (linux_kill_one_process): Rename to ...
10666 (linux_kill_one_lwp): ... this. Adjust.
10667 (linux_kill): Adjust.
10668 (linux_detach_one_process): Rename to ...
10669 (linux_detach_one_lwp): ... this. Adjust.
10670 (linux_detach): Adjust.
10671 (check_removed_breakpoint): Adjust.
10672 (status_pending_p): Adjust.
10673 (linux_wait_for_process): Rename to ...
10674 (linux_wait_for_lwp): ... this. Adjust.
10675 (linux_wait_for_event): Adjust.
10676 (send_sigstop): Adjust.
10677 (wait_for_sigstop): Adjust.
10678 (stop_all_processes): Rename to ...
10679 (stop_all_lwps): ... this.
10680 (linux_resume_one_process): Rename to ...
10681 (linux_resume_one_lwp): ... this. Adjust.
10682 (linux_set_resume_request, linux_continue_one_thread)
10683 (linux_queue_one_thread, resume_status_pending_p)
10684 (usr_store_inferior_registers, regsets_store_inferior_registers)
10685 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10686 Adjust.
10687 * linux-low.h (get_process): Rename to ...
10688 (get_lwp): ... this. Adjust.
10689 (get_thread_process): Rename to ...
10690 (get_thread_lwp): ... this. Adjust.
10691 (get_process_thread): Rename to ...
10692 (get_lwp_thread): ... this. Adjust.
10693 (struct process_info): Rename to ...
10694 (struct lwp_info): ... this.
10695 (all_processes): Rename to ...
10696 (all_lwps): ... this.
10697 * proc-service.c (ps_lgetregs): Adjust.
10698 * thread-db.c (thread_db_create_event, find_one_thread)
10699 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10700
0b16c5cf
PA
107012009-03-14 Pedro Alves <pedro@codesourcery.com>
10702
10703 * server.c (handle_query): Handle "qAttached".
10704
32de4b9d
NS
107052009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10706
10707 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10708 GPLv3, update license URL.
10709
2aecd87f
DE
107102009-03-01 Doug Evans <dje@google.com>
10711
93efd302 10712 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10713 (server_h): Add gdb_signals.h.
10714 (signals.o): Update.
10715 * server.h (target_signal_from_host,target_signal_to_host_p)
10716 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10717
86b1f9c5
PM
107182009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10719
10720 * remote-utils.c (getpkt): Also generate remote-debug
10721 information if noack_mode is set.
10722
4aa995e1
PA
107232009-02-06 Pedro Alves <pedro@codesourcery.com>
10724
10725 * server.c (handle_query): Report qXfer:siginfo:read and
10726 qXfer:siginfo:write as supported and handle them.
10727 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10728 * linux-low.c (linux_xfer_siginfo): New.
10729 (linux_target_ops): Set it.
10730
62709adf
PA
107312009-01-26 Pedro Alves <pedro@codesourcery.com>
10732
10733 * server.c (gdbserver_usage): Mention --remote-debug.
10734 (main): Accept '--remote-debug' switch.
10735
aef93bd7
DE
107362009-01-18 Doug Evans <dje@google.com>
10737
10738 * regcache.c (new_register_cache): No need to check result of xcalloc.
10739 * server.c (handle_search_memory): Back out calls to xmalloc,
10740 result is checked and error is returned to user upon failure.
10741 (handle_query): Ditto. Add more checks for result of malloc.
10742 (handle_v_cont): Check result of malloc, report error back to
10743 user upon failure.
10744 (handle_v_run): Ditto. Call freeargv.
10745 * server.h (freeargv): Declare.
10746 * utils.c (freeargv): New fn.
10747
54363045
DE
107482009-01-15 Doug Evans <dje@google.com>
10749
f626972c
DE
10750 * gdbreplay.c (perror_with_name): Make arg const char *.
10751 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10752 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10753 * utils.c (perror_with_name): Make arg const char *.
54363045 10754
18aae699
PA
107552009-01-14 Pedro Alves <pedro@codesourcery.com>
10756
10757 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10758 when handling a EXIT_PROCESS_DEBUG_EVENT.
10759
ff703abe
JB
107602009-01-06 Joel Brobecker <brobecker@adacore.com>
10761
10762 * gdbreplay.c (gdbreplay_version): Update copyright year.
10763 * server.c (gdbserver_version): Likewise.
10764
f21cc1a2 107652009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10766
10767 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10768 (handle_extended_wait): Improve comment.
0e21c1ec 10769
bca929d3
DE
107702008-12-13 Doug Evans <dje@google.com>
10771
10772 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10773 * server.h (ATTR_MALLOC): New macro.
10774 (xmalloc,xcalloc,xstrdup): Declare.
10775 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10776 * inferiors.c: Ditto.
10777 * linux-low.c: Ditto.
10778 * mem-break.c: Ditto.
10779 * regcache.c: Ditto.
10780 * remote-utils.c: Ditto.
10781 * server.c: Ditto.
10782 * target.c: Ditto.
10783 * win32-low.c: Ditto.
10784
97438e3f
DE
107852008-12-12 Doug Evans <dje@google.com>
10786
896c7fbb
DE
10787 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10788 in debugging printf.
10789
97438e3f
DE
10790 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10791
e3b886f8
DE
107922008-12-09 Doug Evans <dje@google.com>
10793
10794 * linux-low.h (struct process_info): Delete member tid, unused.
10795 * thread-db.c (find_one_thread): Update.
10796 (maybe_attach_thread): Update.
10797
07e059b5
VP
107982008-12-02 Pedro Alves <pedro@codesourcery.com>
10799
889bf7c5
PA
10800 * target.h (struct target_ops): Add qxfer_osdata member.
10801 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10802 and dirent.h.
10803 (linux_qxfer_osdata): New functions.
10804 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10805 callback.
10806 * server.c (handle_query): Handle "qXfer:osdata:read:".
10807 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10808 (buffer_xml_printf): New functions.
10809 * server.h (struct buffer): New.
10810 (buffer_grow_str, buffer_grow_str0): New macros.
10811 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10812 (buffer_xml_printf): Declare.
07e059b5 10813
4cab47ab
DE
108142008-11-24 Doug Evans <dje@google.com>
10815
10816 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10817
f142445f
DJ
108182008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10819
10820 * server.c (handle_v_run): Always use the supplied argument list.
10821
d0107bb6 108222008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10823
d0107bb6
BW
10824 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10825 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10826
2c4ad781
TJB
108272008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10828
10829 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10830 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10831 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10832 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10833 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10834 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10835 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10836 XML target descriptions.
10837 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10838 when inferior is running on an ISA 2.05 or later processor. Add
10839 special case to return offset for full 64-bit slot of FPSCR when
10840 in 32-bits.
10841
dfb64f85
DJ
108422008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10843
10844 * Makefile.in (SFILES, clean): Added sparc64 files.
10845 (reg-sparc64.o, reg-sparc64.c): New.
10846 * configure.srv (sparc*-*-linux*): New configuration.
10847 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10848 syscall arguments for SPARC.
10849 (regsets_store_inferior_registers): Likewise.
10850 * linux-sparc-low.c: New file.
10851
66b6e1dd
DE
108522008-10-21 Doug Evans <dje@google.com>
10853
10854 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10855 (READLINE_DIR,READLINE_DEP): Delete.
10856 (INTERNAL_CFLAGS): Update.
10857 (LINTFLAGS): Update.
10858
9b710a42
PA
108592008-10-10 Pedro Alves <pedro@codesourcery.com>
10860
10861 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10862 whole argv from the last run, not just argv[0].
10863
5822d809
PA
108642008-09-08 Pedro Alves <pedro@codesourcery.com>
10865
10866 * regcache.c (new_register_cache): Return NULL if the register
10867 cache size isn't known yet.
10868 (free_register_cache): Avoid dereferencing a NULL regcache.
10869
74aac56f
DJ
108702008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10871
10872 * configure.srv: Merge MIPS and MIPS64.
10873
400b20f5
MR
108742008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10875
10876 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10877
677c5bb1
LM
108782008-08-18 Luis Machado <luisgpm@br.ibm.com>
10879
10880 * Makefile.in: Add required vsx dependencies.
10881
10882 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10883 Declare init_registers_powerpc_vsx32l.
10884 Declare init_registers_powerpc_vsx64l.
10885 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10886 (ppc_arch_setup): Check for VSX in hwcap.
10887 (ppc_fill_vsxregset): New function.
10888 (ppc_store_vsxregset): New function.
10889 Add new VSX entry in regset_info target_regsets.
10890
10891 * configure.srv: Add new VSX dependencies.
10892
a6f3e723
SL
108932008-08-12 Pedro Alves <pedro@codesourcery.com>
10894
10895 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10896 (remote_open): Set or clear transport_is_reliable.
10897 (putpkt_binary): Don't expect acks in noack mode.
10898 (getpkt): Don't send ack/nac in noack mode.
10899 * server.c (handle_general_set): Handle QStartNoAckMode.
10900 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10901 qSupported.
10902 (main): Reset noack_mode on every connection.
10903 * server.h (noack_mode): Declare.
10904
a417dc56
RW
109052008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10906
10907 * Makefile.in (GDBREPLAY_OBS): New variable.
10908 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10909
3221518c
UW
109102008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10911 Daniel Jacobowitz <dan@codesourcery.com>
10912
10913 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10914 (usr_store_inferior_registers): Likewise.
10915 (regsets_store_inferior_registers): Likewise.
10916
ec56be1b
PA
109172008-07-31 Rolf Jansen <rj@surtec.com>
10918 Pedro Alves <pedro@codesourcery.com>
10919
10920 * configure.ac: Check for memmem declaration.
10921 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10922 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10923 (disable_packet_qfThreadInfo): Unconditionally compile.
10924 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10925 * configure, config.in: Regenerate.
10926
2fe5e3ff
DE
109272008-07-28 Doug Kwan <dougkwan@google.com>
10928
10929 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10930 (linux_write_memory): Remove declaration of errno.
10931
836acd6d
UW
109322008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10933
10934 * linux-low.c (handle_extended_wait): Do not use "status"
10935 variable uninitialized.
10936
aeba519e
PA
109372008-07-07 Pedro Alves <pedro@codesourcery.com>
10938
10939 * server.c (handle_v_attach): Inhibit reporting dll changes.
10940
db42f210
PA
109412008-06-27 Pedro Alves <pedro@codesourcery.com>
10942
10943 * remote-utils.c (prepare_resume_reply): If requested, don't
10944 output "thread:TID" in the T stop reply.
10945
10946 * server.c (disable_packet_vCont, disable_packet_Tthread)
10947 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10948 (handle_query): If requested, disable support for qC, qfThreadInfo
10949 and qsThreadInfo.
10950 (handle_v_requests): If requested, disable support for vCont.
10951 (gdbserver_show_disableable): New.
10952 (main): Handle --disable-packet and --disable-packet=LIST.
10953
10954 * server.h (disable_packet_vCont, disable_packet_Tthread)
10955 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10956
8e4c5421
CD
109572008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10958
10959 * server.c (gdbserver_usage): Mention --version.
10960
6e23a804
DJ
109612008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10962
10963 * Makefile.in (gdbreplay.o): New rule.
10964
90aa6a40
JM
109652008-06-06 Joseph Myers <joseph@codesourcery.com>
10966
10967 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10968 message, not gdbserver.
10969
c16158bc 109702008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10971 Nathan Sidwell <nathan@codesourcery.com>
10972 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10973
10974 * acinclude.m4: Include ../../config/acx.m4.
10975 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10976 * configure, config.in: Regenerate.
10977 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10978 * server.c (gdbserver_version): Print PKGVERSION.
10979 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10980 (main): Adjust gdbserver_usage calls.
10981 * gdbreplay.c (version, host_name): Add declarations.
10982 (gdbreplay_version, gdbreplay_usage): New.
10983 (main): Accept --version and --help options.
10984
aeb75bf5
DJ
109852008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10986
10987 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10988 (arm_breakpoint_at): Handle Thumb.
10989 (the_low_target): Add comment.
10990
76b233dd
UW
109912008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10992
10993 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10994
08388c79
DE
109952008-05-09 Doug Evans <dje@google.com>
10996
a3c83fae
DE
10997 * server.h (decode_search_memory_packet): Declare.
10998 * remote-utils.c (decode_search_memory_packet): New fn.
10999 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11000 (handle_search_memory): New fn.
11001 (handle_query): Process qSearch:memory packets.
11002
bb9c3d36
UW
110032008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11004
11005 * regcache.c (registers_length): Remove.
11006 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11007 full register packet.
11008 * regcache.h (registers_length): Remove prototype.
11009 * server.h (PBUFSIZ): Define to 16384.
11010
7284e1be
UW
110112008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11012
11013 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11014 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11015 powerpc-64l.o, and powerpc-altivec64l.o.
11016 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11017 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11018 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11019 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11020 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11021 to srv_xmlfiles.
11022
11023 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11024 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11025 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11026 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11027 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11028 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11029 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11030 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11031 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11032 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11033 (clean): Update.
11034
11035 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11036 (init_registers_powerpc_32l): ... this new prototype.
11037 (init_registers_powerpc_32): Remove, replace by ...
11038 (init_registers_powerpc_altivec32l): ... this new prototype.
11039 (init_registers_powerpc_e500): Remove, replace by ...
11040 (init_registers_powerpc_e500l): ... this new prototype.
11041 (init_registers_ppc64): Remove, replace by ...
11042 (init_registers_powerpc_64l): ... this new prototype.
11043 (init_registers_powerpc_64): Remove, replace by ...
11044 (init_registers_powerpc_altivec64l): ... this new prototype.
11045 (ppc_num_regs): Set to 73.
11046 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11047 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11048 (ppc_cannot_store_register): Handle orig_r3 and trap.
11049 (ppc_arch_setup): Update init_registers_... calls.
11050 (ppc_fill_gregset): Handle orig_r3 and trap.
11051
11052 * inferiors.c (clear_inferiors): Reset current_inferior.
11053
fdc59709
PB
110542008-04-23 Paolo Bonzini <bonzini@gnu.org>
11055
889bf7c5
PA
11056 * acinclude.m4: Add override.m4.
11057 * configure: Regenerate.
fdc59709 11058
c9b2f845
UW
110592008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11060
11061 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11062 initial call to init_register_ppc64.
11063
550512b8
UW
110642008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11065
43aaf8b6
PA
11066 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11067 single powerpc*-*-linux* case.
550512b8
UW
11068 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11069
b6430ec3
UW
110702008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11071
11072 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11073 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11074 from reg_xmlfiles.
11075 * linux-ppc-low.c: Include <elf.h>.
11076 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11077 (ppc_hwcap): New global variable.
11078 (ppc_regmap): Remove __SPE__ #ifdef sections.
11079 (ppc_regmap_e500): New global variable.
11080 (ppc_cannot_store_register): Update __SPE__ special case.
11081 (ppc_get_hwcap): New function.
11082 (ppc_arch_setup): Use it to determine whether inferior supports
11083 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11084 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11085 Do not access registers if target does not support AltiVec.
11086 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11087 Do not access registers if target does not support SPE.
11088 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11089
52fa2412
UW
110902008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11091
11092 * linux-low.c (disabled_regsets, num_regsets): New.
11093 (use_regsets_p): Delete.
11094 (linux_wait_for_process): Clear disabled_regsets.
11095 (regsets_fetch_inferior_registers): Check and set it.
11096 (regsets_store_inferior_registers): Likewise.
11097 (linux_fetch_registers, linux_store_registers): Do not use
11098 use_regsets_p.
11099 (initialize_low): Allocate disabled_regsets.
11100
e28b3332
DJ
111012008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11102
11103 * Makefile.in (LIBOBJS): New.
11104 (OBS): Use LIBOBJS.
11105 (memmem.o): New rule.
11106 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11107 * configure: Regenerated.
11108
4536995d
UW
111092008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11110
11111 * server.c (handle_query): Never return "unsupported" for
11112 qXfer:features:read queries.
11113
221c031f
UW
111142008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11115
11116 * server.c (get_features_xml): Fix inverted condition.
11117 (handle_query): Always support qXfer:feature:read.
11118
ccd213ac
DJ
111192008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11120
11121 * server.c (wrapper_argv): New.
11122 (start_inferior): Handle wrapper_argv. If set, expect an extra
11123 trap.
11124 (gdbserver_usage): Document --wrapper.
11125 (main): Parse --wrapper.
11126
6fe305f7
UW
111272008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11128
11129 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11130 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11131 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11132 (ppc_set_pc): Likewise.
11133 (ppc_arch_setup): New function.
11134 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11135 of collect_register.
889bf7c5 11136 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11137
5b0a002e
UW
111382008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11139
11140 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11141 instead of linux-ppc64-low.o.
11142 * linux-ppc64-low.c: Remove file.
11143 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11144 (linux-ppc64-low.o): Remove rule.
11145
11146 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11147 (init_registers_powerpc_64): Likewise.
11148 (ppc_regmap): Conditionally define depending on __powerpc64__.
11149 (ppc_cannot_store_register): Do not special-case "fpscr" when
11150 compiled on __powerpc64__.
11151 (ppc_collect_ptrace_register): New function.
11152 (ppc_supply_ptrace_register): New function.
11153 (ppc_breakpoint): Change type to "unsigned int".
11154 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11155 (the_low_target): Conditionally provide initializers for the
889bf7c5 11156 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11157 collect_ptrace_register and supply_ptrace_register members.
11158
9b4b61c8
UW
111592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11160
11161 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11162 * server.c (gdbserver_xmltarget): Define.
11163 (get_features_xml): Use it to replace "target.xml" and arch_string.
11164
11165 * configure.srv: Remove srv_xmltarget. Add XML files that were
11166 mentioned there to srv_xmlfiles instead. Remove conditional tests
11167 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11168 srv_xmlfiles and srv_regobj to include all possible choices.
11169 * configure.ac (srv_xmltarget): Remove.
11170 (srv_xmlfiles): Do not add "target.xml".
11171 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11172 checks for supplementary target information.
11173 * configure: Regenerate.
11174 * Makefile.in (XML_TARGET): Remove.
11175 (target.xml): Remove rule.
11176 (clean): Do not clean up target.xml.
11177 (.PRECIOUS): Do not mention target.xml.
11178
11179 * target.h (struct target_ops): Remove arch_string member.
11180 * linux-low.c (linux_arch_string): Remove.
11181 (linux_target_ops): Remove arch_string initializer.
11182 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11183 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11184 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11185 * spu-low.c (spu_arch_string): Remove.
11186 (spu_target_ops): Remove arch_string initializer.
11187 * win32-low.c (win32_arch_string): Remove.
11188 (win32_target_ops): Remove arch_string initializer.
11189 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11190 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11191 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11192
ee1a7ae4
UW
111932008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11194
11195 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11196 by collect_ptrace_register and supply_ptrace_register hooks.
11197 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11198 instead of checking for the_low_target.left_pad_xfer.
11199 (usr_store_inferior_registers): Use collect_ptrace_register callback
11200 instead of checking for the_low_target.left_pad_xfer.
11201
11202 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11203 (s390_supply_ptrace_register): Likewise.
11204 (s390_fill_gregset): Call s390_collect_ptrace_register.
11205 (the_low_target): Update.
11206
11207 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11208 (ppc_supply_ptrace_register): Likewise.
11209 (the_low_target): Update.
11210
11211 * linux-i386-low.c (the_low_target): Update.
11212 * linux-x86-64-low.c (the_low_target): Update.
11213
d61ddec4
UW
112142008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11215
11216 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11217 reg-s390.o and reg-s390x.o.
11218
11219 * linux-low.c (new_inferior): New global variable.
11220 (linux_create_inferior, linux_attach): Set it.
11221 (linux_wait_for_process): Call the_low_target.arch_setup after the
11222 target has stopped for the first time.
11223 (initialize_low): Do not call the_low_target.arch_setup.
11224
11225 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11226 (s390_set_pc): Likewise.
11227 (s390_arch_setup): New function.
11228 (the_low_target): Use s390_arch_setup as arch_setup routine.
11229
11230 * regcache.c (realloc_register_cache): New function.
11231 (set_register_cache): Call it for each existing regcache.
11232
d05b4ac3
UW
112332008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11234
11235 * server.h (init_registers): Remove prototype.
11236
11237 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11238 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11239 instead of init_registers ().
11240 * linux-arm-low.c (init_registers_arm): Add prototype.
11241 (init_registers_arm_with_iwmmxt): Likewise.
11242 (the_low_target): Add initializer for arch_setup field.
11243 * linux-cris-low.c (init_registers_cris): Add prototype.
11244 (the_low_target): Add initializer for arch_setup field.
11245 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11246 (the_low_target): Add initializer for arch_setup field.
11247 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11248 (the_low_target): Add initializer for arch_setup field.
11249 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11250 (the_low_target): Add initializer for arch_setup field.
11251 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11252 (the_low_target): Add initializer for arch_setup field.
11253 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11254 (the_low_target): Add initializer for arch_setup field.
11255 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11256 (init_registers_mips64_linux): Likewise.
11257 (the_low_target): Add initializer for arch_setup field.
11258 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11259 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11260 (the_low_target): Add initializer for arch_setup field.
11261 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11262 (init_registers_powerpc_64): Likewise.
11263 (the_low_target): Add initializer for arch_setup field.
11264 * linux-s390-low.c (init_registers_s390): Add prototype.
11265 (init_registers_s390x): Likewise.
11266 (the_low_target): Add initializer for arch_setup field.
11267 * linux-sh-low.c (init_registers_sh): Add prototype.
11268 (the_low_target): Add initializer for arch_setup field.
11269 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11270 (the_low_target): Add initializer for arch_setup field.
11271 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11272 (the_low_target): Add initializer for arch_setup field.
11273
11274 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11275 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11276 instead of init_registers ().
11277 * win32-arm-low.c (init_registers_arm): Add prototype.
11278 (the_low_target): Add initializer for arch_setup field.
11279 * win32-i386-low.c (init_registers_i386): Add prototype.
11280 (the_low_target): Add initializer for arch_setup field.
11281
11282 * spu-low.c (init_registers_spu): Add prototype.
11283 (initialize_low): Call initialie_registers_spu () instead of
11284 initialize_registers ().
11285
fd96d250
PA
112862008-02-19 Pedro Alves <pedro@codesourcery.com>
11287
11288 * server.c (handle_v_requests): When handling the vRun and vAttach
11289 packets, if already debugging a process, don't kill it. Return an
11290 error instead.
11291
d41b6bb4
DJ
112922008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11293
11294 * server.c (handle_query): Correct length check.
11295
5ac588cf
PA
112962008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11297
11298 * win32-low.c (do_initial_child_stuff): Add process handle
11299 parameter. Set current_process_handle and current_process_id from the
11300 parameters. Clear globals.
11301 (win32_create_inferior): Don't set current_process_handle and
11302 current_process_id here. Instead pass them on the call to
11303 do_initial_child_stuff.
11304 (win32_attach): Likewise.
11305 (win32_clear_inferiors): New.
11306 (win32_kill): Don't close the current process handle or the
11307 current thread handle here. Instead call win32_clear_inferiors.
11308 (win32_detach): Don't open a new handle to the process. Call
11309 win32_clear_inferiors.
11310 (win32_join): Don't rely on current_process_handle; open a new
11311 handle using the process id.
11312 (win32_wait): Call win32_clear_inferiors when the inferior process
11313 has exited.
11314
ecd7ecbc
DJ
113152008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11316
11317 * server.c (monitor_show_help): Add "exit".
11318
1525d545
MG
113192008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11320
ecd7ecbc 11321 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11322 (clean): Add reg-xtensa.c.
11323 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11324 * configure.srv (xtensa*-*-linux*) New target.
11325 * linux-xtensa-low.c: New.
11326 * xtensa-xtregs.c: New.
1525d545 11327
59a016f0
PA
113282008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11329
11330 * hostio.c: Don't include errno.h.
11331 (errno_to_fileio_errno): Move to hostio-errno.
11332 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11333 error number outputting to the target->hostio_last_error callback.
11334 (hostio_packet_error): Use FILEIO_EINVAL directly.
11335 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11336 calls to hostio_error.
11337 * hostio-errno.c: New.
11338 * server.h (hostio_last_error_from_errno): Declare.
11339 * target.h (target_ops): Add hostio_last_error member.
11340 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11341 as hostio_last_error handler.
889bf7c5 11342 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11343 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11344 (wince_hostio_last_error): New functions.
11345 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11346 as hostio_last_error handler.
11347 (win32_target_ops) [!_WIN32_WCE]: Register
11348 hostio_last_error_from_errno as hostio_last_error handler.
11349 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11350 (hostio-errno.o): New rule.
11351 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11352 * configure.srv (srv_hostio_err_objs): New variable. Default to
11353 hostio-errno.o.
11354 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11355 * configure: Regenerate.
11356
2d717e4f
DJ
113572008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11358
11359 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11360 (linux_kill, linux_detach): Clean up the process list.
11361 * remote-utils.c (remote_open): Improve port number parsing.
11362 (putpkt_binary, input_interrupt): Only send interrupts if the target
11363 is running.
11364 * server.c (extended_protocol): Make static.
11365 (attached): Define earlier.
11366 (exit_requested, response_needed, program_argv): New variables.
11367 (target_running): New.
11368 (start_inferior): Clear attached here.
11369 (attach_inferior): Set attached here.
11370 (require_running): Define.
11371 (handle_query): Use require_running and target_running. Implement
11372 "monitor exit".
11373 (handle_v_attach, handle_v_run): New.
11374 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11375 (gdbserver_usage): Update.
11376 (main): Redo argument parsing. Handle --debug and --multi. Handle
11377 --attach along with other options or after the port. Save
11378 program_argv. Support no initial program. Resynchronize
11379 communication with GDB after an error. Handle "monitor exit".
11380 Use require_running and target_running. Always allow the extended
11381 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11382 restart in extended mode.
11383 * README: Refer to the GDB manual. Update --attach usage.
11384
7407e2de
AS
113852007-12-20 Andreas Schwab <schwab@suse.de>
11386
11387 * linux-low.c (STACK_SIZE): Define.
11388 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11389 (linux_test_for_tracefork): Likewise.
11390
b65d95c5
DJ
113912007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11392
11393 * linux-low.c (linux_wait_for_event): Update messages. Do not
11394 reinsert auto-delete breakpoints.
11395 * mem-break.c (struct breakpoint): Change return type of handler to
11396 int.
11397 (set_breakpoint_at): Update handler type.
11398 (reinsert_breakpoint_handler): Return 1 instead of calling
11399 delete_breakpoint.
11400 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11401 setting a new one.
11402 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11403 * mem-break.h (set_breakpoint_at): Update handler type.
11404 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11405 * win32-low.c (auto_delete_breakpoint): New.
11406 (get_child_debug_event): Use it.
11407
4e799345
DJ
114082007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11409
11410 * configure.ac: Check for pread and pwrite.
11411 * hostio.c (handle_pread): Fall back to lseek and read.
11412 (handle_pwrite): Fall back to lseek and write.
11413 * config.in, configure: Regenerated.
11414
27524b67
DJ
114152007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11416
11417 * server.c (myresume): Add own_buf argument.
11418 (main): Update calls.
11419
a20d5e98
DJ
114202007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11421
11422 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11423 * remote-utils.c (remote_open): Do not call disable_async_io.
11424 (block_async_io): Delete.
11425 (unblock_async_io): Make static.
11426 (initialize_async_io): New.
11427 * server.c (handle_v_cont): Handle async I/O here.
11428 (myresume): Likewise. Move other common resume tasks here...
11429 (main): ... from here. Call initialize_async_io. Disable async
11430 I/O before the main loop.
11431 * server.h (initialize_async_io): Declare.
11432 (block_async_io, unblock_async_io): Delete prototypes.
11433 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11434
b79d787e
DJ
114352007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11436
11437 * remote-utils.c (readchar): Allow binary data in received messages.
11438
d97903b2
PA
114392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11440
11441 * win32-low.c (attaching): New global.
11442 (win32_create_inferior): Clear the `attaching' global.
11443 (win32_attach): Set the `attaching' global.
11444 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11445 attaching. Only set a breakpoint at the entry point if not
11446 attaching.
11447
311de423
PA
114482007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11449
11450 * server.c (main): Don't report dll events on the initial
11451 connection on attaches.
11452
6c2d16d2
PA
114532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11454
11455 * server.c (main): Relax numerical bases supported for the pid of
11456 the --attach command line argument.
11457
5ca906e6
PA
114582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11459
11460 * win32-low.c (win32_attach): Call OpenProcess before
11461 DebugActiveProcess, not after. Add last error output to error
11462 call.
11463
9c6c8194
PA
114642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11465
11466 * win32-low.c (win32_get_thread_context)
11467 (win32_set_thread_context): New functions.
11468 (thread_rec): Use win32_get_thread_context.
11469 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11470 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11471 field.
11472
4d5d1aaa
PA
114732007-12-03 Leo Zayas
11474 Pedro Alves <pedro_alves@portugalmail.pt>
11475
11476 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11477 global variables.
11478 (child_add_thread): Minor cleanup.
11479 (child_continue): Resume artificially suspended threads before
11480 calling ContinueDebugEvent.
11481 (suspend_one_thread): New.
11482 (fake_breakpoint_event): New.
11483 (get_child_debug_event): Change return type to int. Check here if
11484 gdb sent an interrupt request. If a soft interrupt was requested,
11485 fake a breakpoint event. Return 0 if there is no event to handle,
11486 and 1 otherwise.
11487 (win32_wait): Don't check here if gdb sent an interrupt request.
11488 Ensure there is a valid event to handle.
11489 (win32_request_interrupt): Add soft interruption method as last
11490 resort.
11491
c436e841
PA
114922007-12-03 Leo Zayas
11493 Pedro Alves <pedro_alves@portugalmail.pt>
11494
11495 * win32-low.h (win32_thread_info): Add descriptions to the
11496 structure members. Replace `suspend_count' counter by a
11497 `suspended' flag.
11498 * win32-low.c (thread_rec): Update condition of when to get the
11499 context from the inferior. Rely on ContextFlags being set if it
11500 has already been retrieved. Only suspend the inferior thread if
11501 we haven't already. Warn if that fails.
11502 (continue_one_thread): s/suspend_count/suspended/. Only call
11503 ResumeThread once. Warn if that fails.
11504
e7b5fa67
PA
115052007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11506
11507 * win32-low.c (win32_wait): Don't read from the inferior when it
11508 has already exited.
11509
a385171d
PA
115102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11511
11512 * Makefile.in (win32_low_h): New variable.
11513 (win32-low.o): Add dependency on $(win32_low_h).
11514 (win32-arm-low.o, win32-i386-low.o): New rules.
11515
f80c84b3
DJ
115162007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11517
11518 * hostio.c: Correct copyright year.
11519
a6b151f1
DJ
115202007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11521
11522 * Makefile.in (OBS): Add hostio.o.
11523 (hostio.o): New rule.
11524 * server.h (handle_vFile): Declare.
11525 * hostio.c: New file.
11526 * server.c (handle_v_requests): Take packet_len and new_packet_len
11527 for binary packets. Call handle_vFile.
11528 (main): Update call to handle_v_requests.
11529
f9387fc3
DJ
115302007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11531
11532 * linux-low.c: Include <sched.h>.
11533
51c2684e
DJ
115342007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11535
11536 * linux-low.c (linux_tracefork_grandchild): New.
11537 (linux_tracefork_child): Use clone.
11538 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11539
75f83163
JB
115402007-10-31 Joel Brobecker <brobecker@adacore.com>
11541
11542 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11543
da5898ce
DJ
115442007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11545
11546 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11547
24a09b5f
DJ
115482007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11549
11550 * inferiors.c (change_inferior_id): Delete.
11551 (add_pid_to_list, pull_pid_from_list): New.
11552 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11553 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11554 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11555 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11556 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11557 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11558 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11559 (using_threads): Always set to 1.
11560 (handle_extended_wait): New.
11561 (add_process): Do not set TID.
11562 (linux_create_inferior): Set must_set_ptrace_flags.
11563 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11564 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11565 (linux_thread_alive): Rename TID argument to LWPID.
11566 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11567 (linux_wait_for_event): Do not use TID or check using_threads. Update
11568 call to dead_thread_notify. Call handle_extended_wait.
11569 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11570 (send_sigstop): Delete sigstop_sent.
11571 (wait_for_sigstop): Avoid TID.
11572 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11573 (linux_test_for_tracefork): New.
11574 (linux_lookup_signals): Use thread_db_active and
11575 linux_supports_tracefork_flag.
11576 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11577 * linux-low.h (get_process_thread): Avoid TID.
11578 (struct process_ifo): Move thread_known and tid to the end. Remove
11579 sigstop_sent.
11580 (linux_attach_lwp, thread_db_init): Update prototypes.
11581 * server.h (change_inferior_id): Delete prototype.
11582 (add_pid_to_list, pull_pid_from_list): New prototypes.
11583 * thread-db.c (thread_db_use_events): New.
11584 (find_first_thread): Rename to...
11585 (find_one_thread): ...this. Update callers and messages. Do not
11586 call fatal. Check thread_db_use_events. Do not call
11587 change_inferior_id or new_thread_notify.
11588 (maybe_attach_thread): Update. Do not call new_thread_notify.
11589 (thread_db_init): Set thread_db_use_events. Check use_events.
11590 * utils.c (fatal, warning): Correct message prefix.
11591
30ed0a8f
DJ
115922007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11593
11594 * Makefile.in (clean): Remove new files.
11595 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11596 (powerpc-64.o, powerpc-64.c): New rules.
11597 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11598 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11599 with SPE.
11600 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11601 SPE targets.
11602 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11603 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11604 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11605 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11606 (target_regsets): Add AltiVec and SPE register sets.
11607 * configure.ac: Check for AltiVec and SPE.
11608 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11609 (ppc_fill_vrregset, ppc_store_vrregset): New.
11610 (target_regsets): Add AltiVec register set.
11611 * configure: Regenerated.
11612
fd462a61
DJ
116132007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11614
11615 * linux-low.c (O_LARGEFILE): Define.
11616 (linux_read_memory): Use /proc/PID/mem.
11617 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11618 * configure, config.in: Regenerated.
11619
69f223ed
DJ
116202007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11621
11622 * linux-low.c (linux_wait_for_event): Do not pass signals while
11623 single-stepping.
11624
aec18585
PA
116252007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11626
11627 * win32-low.c (create_process): New.
11628 (win32_create_inferior): Use create_process instead of
11629 CreateProcess. If create_process failed retry appending an ".exe"
11630 suffix. Store the GetLastError result immediatelly after
11631 create_process calls and use it on the call to error.
11632
34d86ddd
PA
116332007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11634
11635 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11636
5a0e3bd0
JB
116372007-08-23 Joel Brobecker <brobecker@adacore.com>
11638
11639 * configure.ac: Switch license to GPLv3.
11640
f88c79e6
MS
116412007-08-01 Michael Snyder <msnyder@access-company.com>
11642
11643 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11644
6b3d9b83
PA
116452007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11646
11647 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11648 typedef.
11649 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11650 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11651 CloseToolhelp32Snapshot.
11652 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11653 CloseToolhelp32Snapshot.
11654
c588c53c
MS
116552007-07-27 Michael Snyder <michael.snyder@access-company.com>
11656
11657 * server.c (main): Check for inferior exit before main loop.
11658
aa0403d9
PA
116592007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11660
11661 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11662 instead of on tmp_desc.
11663
255e7678
DJ
116642007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11665 Daniel Jacobowitz <dan@codesourcery.com>
11666
11667 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11668 (add_thread): Minor cleanups.
11669 (clear_inferiors): Move lower in the file. Clear the DLL
11670 list.
11671 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11672 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11673 (xml_escape_text): New.
11674 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11675 for qSupported.
11676 (handle_v_cont): Report errors.
11677 (gdbserver_version): Update.
11678 (main): Correct size of own_buf. Do not report initial DLL events.
11679 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11680 (unloaded_dll, xml_escape_text): New.
11681 * win32-low.c (enum target_waitkind): Update comments.
11682 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11683 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11684 (win32_EnumProcessModules, win32_GetModuleInformation)
11685 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11686 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11687 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11688 (win32_Module32First, win32_Module32Next, load_toolhelp)
11689 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11690 (get_child_debug_event): Handle DLL events.
11691 (win32_wait): Likewise.
11692
0d37add9
DJ
116932007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11694
11695 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11696 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11697
45e2715e
PA
116982007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11699
11700 * win32-low.c (handle_output_debug_string): Ignore event if not
11701 waiting.
11702
c5674cf1
PA
117032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11704
11705 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11706
2bbe3cc1
DJ
117072007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11708
11709 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11710
ae13219e
DJ
117112007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11712
11713 * inferiors.c (change_inferior_id): Add comment.
11714 * linux-low.c (check_removed_breakpoint): Add an early
11715 prototype. Improve debug output.
11716 (linux_attach): Doc update.
11717 (linux_detach_one_process, linux_detach): Clean up before releasing
11718 each process.
11719 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11720 * linux-low.h (struct process_info): Doc improvement.
11721 * mem-break.c (delete_all_breakpoints): New.
11722 * mem-break.h (delete_all_breakpoints): New prototype.
11723 * thread-db.c (find_first_thread): New.
11724 (thread_db_create_event): Call it instead of
11725 thread_db_find_new_threads. Clean up unused variables.
11726 (maybe_attach_thread): Remove first thread handling.
11727 (thread_db_find_new_threads): Use find_first_thread.
11728 (thread_db_get_tls_address): Likewise.
11729
4105de34
DJ
117302007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11731
11732 * thread-db.c (thread_db_find_new_threads): Add prototype.
11733 (thread_db_create_event): Check for the main thread before adding
11734 a new thread.
11735 (maybe_attach_thread): Only enable event reporting if TID == 0.
11736 (thread_db_get_tls_address): Check for new threads.
11737
2b876972
DJ
117382007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11739
11740 * linux-low.c (linux_create_inferior): Try execv before execvp.
11741 * spu-low.c (spu_create_inferior): Likewise.
11742
7a245884
DJ
117432007-06-13 Mike Frysinger <vapier@gentoo.org>
11744
11745 * linux-low.c (linux_create_inferior): Change execv to execvp.
11746 * spu-low.c (spu_create_inferior): Likewies.
11747
117ce543
DJ
117482007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11749
11750 * Makefile.in (clean): Clean new files instead of deleted ones.
11751 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11752 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11753 rules.
11754 * configure.srv: Specify XML files and new regformats for MIPS and
11755 MIPS64 GNU/Linux.
11756 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11757 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11758 an entry for the restart register.
11759 (mips_cannot_fetch_register, mips_cannot_store_register)
11760 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11761 register names to match the XML descriptions.
11762 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11763 restart register instead of $0.
11764
0e7f50da
UW
117652007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11766 Markus Deuling <deuling@de.ibm.com>
11767
11768 * remote-utils.c (decode_xfer_write): New function.
11769 * server.h (decode_xfer_write): Add prototype.
11770 * server.c (handle_query): Add PACKET_LEN argument. Support
11771 qXfer:spu:read and qXfer:spu:write packets.
11772 (main): Pass packet_len to handle_query.
11773 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11774 * target.h (target_ops): Add qxfer_spu.
11775
374c1d38
UW
117762007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11777
11778 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11779 accessing non-seekable spufs files.
11780
bb63802a
UW
117812007-05-16 Markus Deuling <deuling@de.ibm.com>
11782
889bf7c5 11783 * server.c (handle_query): Add reply for qC packet.
bb63802a 11784
7390519e
PA
117852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11786 Leo Zayas <lerele@champenstudios@com>
11787
11788 * server.h (check_remote_input_interrupt_request): New function.
11789 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11790 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11791 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11792 (check_remote_input_interrupt_request): New function.
11793 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11794 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11795 winapi_GenerateConsoleCtrlEvent): New typedefs.
11796 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11797 to 250 ms.
11798 (win32_wait): Check for remote interrupt request
11799 with check_remote_input_interrupt_request.
11800 (win32_request_interrupt): New function.
11801 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11802
34b34921
PA
118032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11804
11805 * win32-low.c (debug_registers_changed,
11806 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11807 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11808 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11809 (thread_rec): Get context using the low target.
11810 (child_add_thread): Call thread_added on the low target,
11811 which does the same thing.
11812 (regptr): Delete.
11813 (do_initial_child_stuff): Remove debug registers references.
11814 Set context using the low target. Resume threads after
11815 setting the contexts.
11816 (child_continue): Remove dead variable. Remove debug
11817 registers references.
11818 (child_fetch_inferior_registers): Go through the low target.
11819 (do_child_store_inferior_registers): Remove.
11820 (child_store_inferior_registers): Go through the low target.
11821 (win32_resume): Remove debug registers references.
11822 Set context using the low target.
11823 (handle_exception): Change return type to void. Don't record
11824 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11825 first chance exception.
889bf7c5 11826 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11827 goto loop. Always return after waiting for debug event.
11828 (win32_wait): Convert to switch statement. Handle spurious
11829 events.
11830
11831 * win32-i386-low.c (debug_registers_changed,
11832 debug_registers_used): New.
11833 (initial_stuff): Rename to ...
11834 (i386_initial_stuff): ... this. Clear debug registers
11835 state variables.
11836 (store_debug_registers): Delete.
11837 (i386_get_thread_context): New.
11838 (load_debug_registers): Delete.
11839 (i386_set_thread_context): New.
11840 (i386_thread_added): New.
11841 (single_step): Rename to ...
11842 (i386_single_step): ... this.
11843 (do_fetch_inferior_registers): Rename to ...
11844 (i386_fetch_inferior_register): ... this.
11845 (i386_store_inferior_register): New.
11846 (the_low_target): Adapt to new interface.
11847
11848 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11849 (arm_get_thread_context): New.
11850 (arm_set_thread_context): New.
11851 (regptr): New.
11852 (do_fetch_inferior_registers): Rename to ...
11853 (arm_fetch_inferior_register): ... this.
11854 (arm_store_inferior_register): New.
11855 (arm_wince_breakpoint): Reimplement as unsigned long.
11856 (arm_wince_breakpoint_len): Define.
11857 (the_low_target): Adapt to new interface.
11858
11859 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11860 load_debug_registers. Add get_thread_context, set_thread_context,
11861 thread_added and store_inferior_register. Rename
11862 fetch_inferior_registers to fetch_inferior_register.
11863 (regptr): Remove declaration.
11864
dd6953e1
PA
118652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11866
11867 * linux-low.c (linux_detach): Change return type to int. Return 0.
11868 * spu-low.c (spu_detach): Likewise.
11869
444d6139
PA
118702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11871
11872 * target.h (target_ops): Change return type of detach to int.
11873 Add join.
11874 (join_inferior): New.
11875 * server.c (main): Don't skip detach support on mingw32.
11876 If the inferior doesn't support detaching return error.
11877 Call join_inferior instead of using waitpid.
11878 * linux-low.c (linux_join): New.
11879 (linux_target_op): Add linux_join.
11880 * spu-low.c (spu_join): New.
11881 (spu_target_ops): Add spu_join.
11882 * win32-low.c (win32_detach): Adapt to new interface.
11883 Reopen current_process_handle before detaching. Issue a child
11884 resume before detaching.
11885 (win32_join): New.
11886 (win32_target_op): Add win32_join.
11887
1d5315fe
PA
118882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11889
11890 * win32-low.c (win32-attach): Fix return value.
11891 * target.h (target_ops): Describe ATTACH return values.
11892
bf914831
PA
118932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11894
11895 * win32-low.c (GETPROCADDRESS): Define.
11896 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11897 (winapi_DebugSetProcessKillOnExit): Likewise.
11898 (win32_create_inferior): Force usage of ansi CreateProcessA.
11899 (win32_attach): Use GETPROCADDRESS.
11900 (win32_detach): Likewise.
11901
f72f3e60
PA
119022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11903
11904 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11905
ed50f18f
PA
119062007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11907
11908 * win32-low.c: Commit leftover changes from 2007-03-29.
11909
0c2ead7e
DJ
119102007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11911
11912 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11913 fields short instead of int. Add explicit padding.
11914 (i387_cache_to_fsave): Remove unnecessary casts.
11915 (i387_fsave_to_cache): Doc fix.
11916 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11917
73725ff3
DJ
119182007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11919
11920 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11921 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11922
d99f33d8
PA
119232007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11924
11925 * configure.srv (arm*-*-mingw32ce*): Move near the other
11926 arm targets.
11927
68070c10
PA
119282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11929
2482afc6 11930 * configure.ac: Add errno checking.
68070c10
PA
11931 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11932 sys/file.h and malloc.h.
11933 (AC_CHECK_DECLS): Add perror.
11934 (srv_mingwce): Handle.
2482afc6 11935 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11936 win32-i386-low.o to srv_tgtobj.
11937 (i[34567]86-*-mingw*): Likewise.
11938 (arm*-*-mingw32ce*): Add case.
11939 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11940 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11941 [__MINGW32CE__] (strerror): New function.
11942 [__MINGW32CE__] (errno): Define to GetLastError.
11943 [__MINGW32CE__] (COUNTOF): New macro.
11944 (remote_open): Remove extra close call.
11945 * mem-break.c (delete_breakpoint_at): New function.
11946 * mem-break.h (delete_breakpoint_at): Declare.
11947 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11948 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11949 [USE_WIN32API] (read, write): Add char* casts.
11950 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11951 * server.h: Include wincecompat.h on Windows CE.
11952 [HAVE_ERRNO_H]: Check.
11953 (perror): Declare if not declared.
11954 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11955 (perror_with_name): Remove errno declaration.
11956 * wincecompat.h: New.
11957 * wincecompat.c: New.
11958 * win32-low.h: New.
11959 * win32-arm-low.c: New.
11960 * win32-i386-low.c: New.
11961 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11962 (OUTMSG2): Make it safe.
11963 (_T): New macro.
11964 (COUNTOF): New macro.
11965 (NUM_REGS): Get it from the low target.
11966 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11967 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11968 (thread_rec): Let low target handle debug registers.
11969 (child_add_thread): Likewise.
11970 (child_init_thread_list): Likewise.
11971 (continue_one_thread): Likewise.
11972 (regptr): New.
11973 (do_child_fetch_inferior_registers): Move to ...
11974 * win32-i386-low.c: ... here, and rename to ...
11975 (do_fetch_inferior_registers): ... this.
889bf7c5 11976 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11977 Go through the low target.
11978 (do_child_store_inferior_registers): Use regptr.
11979 (strwinerror): New function.
11980 (win32_create_inferior): Handle Windows CE.
11981 Use strwinerror instead of strerror on Windows error
11982 codes. Add program to the error output.
11983 Don't close the main thread handle on Windows CE.
11984 (win32_attach): Use coredll.dll on Windows CE.
11985 (win32_kill): Close current process and current
11986 thread handles.
11987 (win32_detach): Use coredll.dll on Windows CE.
11988 (win32_resume): Let low target handle debug registers, and
11989 step request.
11990 (handle_exception): Add/Remove initial breakpoint. Avoid
11991 non-existant WSTOPSIG on Windows CE.
11992 (win32_read_inferior_memory): Cast to remove warning.
11993 (win32_arch_string): Go through the low target.
11994 (initialize_low): Call set_breakpoint_data with the low
11995 target's breakpoint.
11996 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11997 FOP_REGNUM, mappings): Move to ...
11998 * win32-i386-low.c: ... here.
11999 * win32-low.c (win32_thread_info): Move to ...
12000 * win32-low.h: ... here.
12001 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12002 win32-arm-low.c and wincecompat.c.
12003 (all:): Add $EXEEXT.
12004 (install-only:): Likewise.
12005 (gdbserver:): Likewise.
12006 (gdbreplay:): Likewise.
12007 * config.in: Regenerate.
12008 * configure: Regenerate.
12009
41093d81
PA
120102007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12011
12012 * win32-low.c: Rename typedef thread_info to
12013 win32_thread_info throughout.
12014
544afa54
PA
120152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12016
12017 * win32-i386-low.c: Rename to ...
12018 * win32-low.c: ... this.
12019 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12020 * Makefile.in: Likewise.
12021
bce7165d
PA
120222007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12023
12024 * remote-utils.c (monitor_output): Constify msg parameter.
12025 * server.h (monitor_output): Likewise.
12026 * win32-i386-low.c (handle_output_debug_string): New.
12027 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12028 handle_output_debug_string.
12029 (get_child_debug_event): Likewise.
12030
506c7aa0
DJ
120312007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12032
12033 * server.c (main): Correct strtoul check.
12034
42c81e2a
DJ
120352007-03-27 Jon Ringle <jon@ringle.org>
12036
12037 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12038
9453113a
DJ
120392007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12040
12041 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12042
64a69107
DJ
120432007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12044
12045 * terminal.h: Check HAVE_SGTTY_H.
12046
120472007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12048
12049 * remote-utils.c (remote_open): Print out the assigned port number.
12050
c74d0ad8
DJ
120512007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12052
12053 * remote-utils.c (monitor_output): New function.
12054 * server.c (debug_threads): Define here.
12055 (monitor_show_help): New function.
12056 (handle_query): Handle qRcmd.
12057 (main): Do not handle 'd' packet.
12058 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12059 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12060 of debug_threads.
12061
de7c3b4a
PA
120622007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12063
12064 * Makefile.in (EXEEXT): New.
12065 (clean): Use $(EXEEXT).
12066
ef57601b
PA
120672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12068
12069 * target.h (target_ops): Rename send_signal to request_interrupt,
12070 and remove enum target_signal parameter.
12071 * linux-low.c (linux_request_interrupt): Rename from
12072 linux_send_signal, and always send SIGINT.
12073 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12074 and always send SIGINT.
12075 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12076 of send_signal.
12077 (input_interrupt): Likewise.
12078
820f2bda
PA
120792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12080
12081 * server.c (get_features_xml): Check if target implemented
12082 arch_string.
12083 * win32-i386-low.c (win32_arch_string): New.
12084 (win32_target_ops): Add win32_arch_string as arch_string member.
12085
ab39bf24
UW
120862007-02-22 Markus Deuling <deuling@de.ibm.com>
12087
12088 * spu-low.c (spu_arch_string): New.
12089 (spu_target_ops): Add spu_arch_string.
12090
61ff6e04
DJ
120912007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12092
12093 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12094 * configure.ac: Do not check for terminal.h.
12095 * configure, config.in: Regenerated.
12096
fb1e4ffc
DJ
120972007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12098
12099 * Makefile.in (OBS): Add $(XML_BUILTIN).
12100 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12101 (clean): Update.
12102 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12103 (arm-with-iwmmxt.c): New.
12104 * config.in, configure: Regenerate.
12105 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12106 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12107 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12108 (arm*-*-linux*): Add iWMMXt and regset support.
12109 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12110 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12111 (arm_store_wmmxregset, target_regsets): New.
12112 * server.c (get_features_xml): Take annex argument. Check builtin
12113 XML documents.
12114 (handle_query): Handle multiple annexes.
12115
0f48aa01
DJ
121162007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12117
12118 * remote-utils.c [USE_WIN32API] (read, write): Define.
12119 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12120 write.
12121
23181151
DJ
121222007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12123
12124 * linux-i386-low.c (the_low_target): Set arch_string.
12125 * linux-x86-64-low.c (the_low_target): Likewise.
12126 * linux-low.c (linux_arch_string): New.
12127 (linux_target_ops): Add it.
12128 * linux-low.h (struct linux_target_ops): Add arch_string.
12129 * server.c (write_qxfer_response): Use const void * for DATA.
12130 (get_features_xml): New.
12131 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12132 * target.h (struct target_ops): Add arch_string method.
12133
9d606399
DJ
121342007-01-03 Denis Pilat <denis.pilat@st.com>
12135 Daniel Jacobowitz <dan@codesourcery.com>
12136
12137 * linux-low.c (linux_kill): Handle being called with no threads.
12138 * win32-i386-low.c (win32_kill): Likewise.
12139 (get_child_debug_event): Clear current_process_handle.
12140
121412006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12142 Daniel Jacobowitz <dan@codesourcery.com>
12143
12144 * remote-utils.c (remote_open): Check the type of specified
12145 serial port devices before opening them.
12146 * server.c (main): Kill the inferior if an error occurs during
12147 the first remote_open.
12148
a5e13d24
DJ
121492006-12-05 Markus Deuling <deuling@de.ibm.com>
12150
12151 * README: Update supported targets.
12152
186947f7
DJ
121532006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12154
12155 * Makefile.in (clean): Remove reg-mips64.c.
12156 (reg-mips64.c, reg-mips64.o): New rules.
12157 * configure.srv: Handle mips64. Include regset support for mips.
12158 * linux-mips-low.c (union mips_register): New.
12159 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12160 (mips_breakpoint, mips_breakpoint_at): Use int.
12161 (mips_collect_register, mips_supply_register)
12162 (mips_collect_register_32bit, mips_supply_register_32bit)
12163 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12164 (mips_store_fpregset, target_regsets): New.
12165 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12166
a13e2c95
UW
121672006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12168
12169 * configure.srv: Add target "spu*-*-*".
12170 * Makefile.in (clean): Remove reg-spu.c.
12171 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12172 * spu-low.c: New file.
12173
cb7283db
DJ
121742006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12175
12176 * configure.ac: Correct td_thr_tls_get_addr test.
12177 * configure: Regenerated.
12178
89be2091
DJ
121792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12180
12181 * linux-low.c (linux_wait_for_event): Reformat. Use the
12182 pass_signals array.
12183 * remote-utils.c (decode_address_to_semicolon): New.
12184 * server.c (pass_signals, handle_general_set): New.
12185 (handle_query): Mention QPassSignals for qSupported.
12186 (main): Call handle_general_set.
12187 * server.h (pass_signals, decode_address_to_semicolon): New.
12188
000ef4f0
DJ
121892006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12190
12191 * server.c (handle_query): Correct error handling for read_auxv.
12192
b7149293
UW
121932005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12194
12195 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12196 and srv_linux_thread_db to yes.
12197 * linux-s390-low.c (s390_fill_gregset): New function.
12198 (target_regsets): Define data structure.
12199
dae5f5cf
DJ
122002006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12201
12202 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12203 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12204 * config.in, configure: Regenerated.
12205 * inferiors.c (gdb_id_to_thread): New function.
12206 (gdb_id_to_thread_id): Use it.
12207 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12208 * linux-low.h (struct process_info): Add th member.
12209 (thread_db_get_tls_address): New prototype.
12210 * remote-utils.c (decode_address): Make non-static.
12211 * server.c (handle_query): Handle qGetTLSAddr.
12212 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12213 * target.h (struct target_ops): Add get_tls_address.
12214 * thread-db.c (maybe_attach_thread): Save the thread handle.
12215 (thread_db_get_tls_address): New.
12216
32ca6d61
DJ
122172006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12218
12219 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12220 (linux_resume_one_process): Take a siginfo_t *. Update all
12221 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12222 (struct pending_signals): Add a siginfo_t.
12223 (linux_wait_for_process): Always set last_status.
12224 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12225 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12226 * linux-low.h (struct process_info): Add last_status.
12227
5ffff7c1
DJ
122282006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12229
12230 * remote-utils.c (try_rle): New function.
12231 (putpkt_binary): Use it.
12232
8695c747
DJ
122332006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12234
12235 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12236 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12237 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12238 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12239 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12240 point registers.
12241
290fadea
RS
122422006-08-08 Richard Sandiford <richard@codesourcery.com>
12243
12244 * server.c (terminal_fd): New variable.
12245 (old_foreground_pgrp): Likewise.
12246 (restore_old_foreground_pgrp): New function.
12247 (start_inferior): Record the terminal file descriptor in terminal_fd
12248 and its original foreground group in old_foreground_pgrp. Register
12249 restore_old_foreground_pgrp with atexit().
12250
9f2e1e63
DJ
122512006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12252
12253 * server.c (handle_query): Correct qPart to qXfer.
12254
b80864fb
DJ
122552006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12256
12257 * configure.ac: Check for more headers which are missing on
12258 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12259 * configure.srv: Add Cygwin and mingw32.
12260 * remote-utils.c: Don't include headers unconditionally which
12261 are missing on mingw32. Include <winsock.h> for mingw32.
12262 (remote_open): Adjust for mingw32 support. Flush
12263 standard error after writing to it.
12264 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12265 (unblock_async_io, enable_async_io, disable_async_io)
12266 (readchar, getpkt): Update for Winsock support.
12267 (prepare_resume_reply): Expect a protocol signal number.
12268 * server.c: Disable <sys/wait.h> on mingw32.
12269 (start_inferior): Adjust for mingw32 support. Flush
12270 standard error after writing to it.
12271 (attach_inferior): Likewise. Use protocol signal
12272 numbers.
12273 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12274 and names.
12275 * win32-i386-low.c: New file.
12276 * Makefile.in (XM_CLIBS): Set.
12277 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12278 (win32-i386-low.o): New dependency rule.
12279 * linux-low.c (linux_wait): Use target signal numbers.
12280 * target.h (struct target_ops): Doc fix.
12281 * server.h (target_signal_to_name): New prototype.
12282 * gdbreplay.c: Don't include headers unconditionally which
12283 are missing on mingw32. Include <winsock.h> for mingw32.
12284 (remote_close, remote_open): Adjust for Winsock support.
12285 * configure, config.in: Regenerated.
12286
0876f84a
DJ
122872006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12288
12289 * server.c (decode_xfer_read, write_qxfer_response): New.
12290 (handle_query): Take a packet length argument. Handle
12291 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12292 the qSupported response.
12293 (main): Update call to handle_query.
12294
01f9e8fa
DJ
122952006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12296
12297 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12298 (putpkt_binary): Renamed from putpkt and adjusted for binary
12299 data.
12300 (putpkt): New wrapper for putpkt_binary.
12301 (readchar): Don't mask off the high bit.
12302 (decode_X_packet): New function.
12303 * server.c (main): Call putpkt_binary if a handler sets the packet
12304 length. Save the length of the incoming packet. Handle 'X'.
12305 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12306
be2a5f71
DJ
123072006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12308
12309 * server.c (handle_query): Handle qSupported.
12310
ea025f5f
DJ
123112006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12312
12313 * remote-utils.c (all_symbols_looked_up): New variable.
12314 (look_up_one_symbol): Check it.
12315 * server.h (look_up_one_symbol): New declaration.
12316 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12317
9308fc88
DJ
123182006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12319
12320 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12321 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12322 (PTRACE_GET_THREAD_AREA): Define.
12323 (ps_get_thread_area): New function.
12324
52fb6437
NS
123252006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12326
12327 * configure.srv (m68k*-*-uclinux*): New target.
12328 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12329 (linux_resume_one_process): Remove extraneous cast.
12330 (linux_read_offsets): New.
12331 (linux_target_op): Add linux_read_offsets on mmuless systems.
12332 * server.c (handle_query): Add qOffsets logic.
12333 * target.h (struct target_ops): Add read_offsets.
12334
21b0f40c
DJ
123352006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12336
12337 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12338 (PTRACE_GET_THREAD_AREA): Define.
12339 (ps_get_thread_area): New function.
12340 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12341 (linux-x86-64-low.o): Update.
12342
0050a760
DJ
123432006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12344
12345 * configure.ac: Remove checks for prfpregset_t.
12346 * gdb_proc_service.h: New file.
12347 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12348 new "gdb_proc_service.h".
12349 * proc-service.c: Likewise.
12350 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12351 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12352 * Makefile.in (gdb_proc_service_h): Updated.
12353 * configure, config.in: Regenerated.
12354
b92a518e
DJ
123552006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12356
12357 * remote-utils.c (prepare_resume_reply): Move declaration
12358 of gdb_id_from_wait to the top of the block.
12359
545587ee
DJ
123602006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12361
12362 * linux-low.c (regsets_store_inferior_registers): Read the regset
12363 from the target before filling it.
12364
9db87ebd
DJ
123652006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12366
12367 * server.c (attach_inferior): Return SIGTRAP for a successful
12368 attach.
12369
dd24457d
DJ
123702006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12371
12372 * Makefile.in (OBS): Add version.o.
12373 (STAGESTUFF): Delete.
12374 (version.o): Add dependencies.
12375 (version.c): Replace rule.
12376 (clean): Remove version.c.
12377 * server.c (gdbserver_version): New.
12378 (gdbserver_usage): Use printf.
12379 (main): Handle --version and --help.
12380 * server.h (version, host_name): Add declarations.
12381
6f0f660e
EZ
123822005-12-23 Eli Zaretskii <eliz@gnu.org>
12383
889bf7c5
PA
12384 * linux-arm-low.c:
12385 * linux-arm-low.c:
12386 * inferiors.c:
12387 * i387-fp.h:
12388 * i387-fp.c:
12389 * gdbreplay.c:
12390 * regcache.c:
12391 * proc-service.c:
12392 * mem-break.h:
12393 * mem-break.c:
12394 * linux-x86-64-low.c:
12395 * linux-sh-low.c:
12396 * linux-s390-low.c:
12397 * linux-ppc64-low.c:
12398 * linux-ppc-low.c:
12399 * linux-mips-low.c:
12400 * linux-m68k-low.c:
12401 * linux-m32r-low.c:
12402 * linux-low.h:
12403 * linux-low.c:
12404 * linux-ia64-low.c:
12405 * linux-i386-low.c:
12406 * linux-crisv32-low.c:
12407 * thread-db.c:
12408 * terminal.h:
12409 * target.h:
12410 * target.c:
12411 * server.h:
12412 * server.c:
12413 * remote-utils.c:
12414 * regcache.h:
12415 * utils.c:
12416 * Makefile.in:
12417 * configure.ac:
6f0f660e
EZ
12418 * gdbserver.1: Add (C) after Copyright. Update the FSF
12419 address.
12420
9d1fb177
DJ
124212005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12422
12423 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12424 (arm_breakpoint_at): Recognize both breakpoints.
12425 (the_low_target): Use the correct breakpoint instruction.
12426
011a70c2
DJ
124272005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12428
12429 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12430 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12431 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12432 (the_low_target): Update.
12433
7fb85e41
AS
124342005-10-25 Andreas Schwab <schwab@suse.de>
12435
12436 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12437
12438 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12439 (ia64_num_regs): Reduce to 462.
12440
3db0444b
DJ
124412005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12442
12443 * acinclude.m4: Correct quoting.
12444 * aclocal.m4: Regenerated.
12445
12446 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12447 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12448 (thread_db_init): Call thread_db_err_str.
12449 * configure.ac: Check for TD_VERSION.
12450 * config.in, configure: Regenerated.
12451
bee0189a
DJ
124522005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12453
12454 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12455
e9d25b98
DJ
124562005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12457
12458 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12459 is not available. Define HAVE_PTRACE_GETREGS if it is.
12460 * config.in, configure: Regenerated.
12461 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12462 * linux-i386-low.c, linux-m68k-low.c: Update to use
12463 HAVE_PTRACE_GETREGS.
12464 * linux-low.c (regsets_fetch_inferior_registers)
12465 (regsets_store_inferior_registers): Only return 0 if we processed
12466 GENERAL_REGS.
12467 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12468 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12469
a06660f7
DJ
124702005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12471
12472 * inferiors.c (struct thread_info): Add gdb_id.
12473 (add_thread): Add gdb_id argument.
12474 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12475 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12476 calls to add_thread.
12477 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12478 * server.c (handle_query): Use thread_to_gdb_id.
12479 (handle_v_cont, main): Use gdb_id_to_thread_id.
12480 * server.h (add_thread): Update prototype.
12481 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12482 prototypes.
12483
5a1f5858
DJ
124842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12485
12486 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12487 left-padded registers.
12488 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12489 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12490
e122f1f5
SE
124912005-07-01 Steve Ellcey <sje@cup.hp.com>
12492
12493 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12494 * configure: Regenerate.
12495 * config.in: Regenerate.
12496 * server.h (NEED_DECLARATION_STRERROR):
12497 Replace with !HAVE_DECL_STRERROR.
12498
d592fa2f
DJ
124992005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12500
12501 * linux-low.c (linux_wait, linux_send_signal): Don't test
12502 an unsigned long variable for > 0 if it could be MAX_ULONG.
12503 * server.c (myresume): Likewise.
12504 * target.c (set_desired_inferior): Likewise.
12505
ccbd4912
MK
125062005-06-13 Mark Kettenis <kettenis@gnu.org>
12507
12508 * configure.ac: Simplify and improve check for socklen_t.
12509 * configure, config.in: Regenerate.
12510
f450004a
DJ
125112005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12512
12513 * acconfig.h: Remove.
12514 * configure.ac: Add a test for socklen_t. Use three-argument
12515 AC_DEFINE throughout.
12516 * config.in: Regenerated using autoheader 2.59.
12517 * configure: Regenerated.
12518
12519 * gdbreplay.c (socklen_t): Provide a default.
12520 (remote_open): Use socklen_t.
12521 * remote-utils.c (socklen_t): Provide a default.
12522 (remote_open): Use socklen_t.
12523 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12524 unsigned char.
12525
12526 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12527 char for buffers.
12528 * linux-low.c (linux_read_memory, linux_write_memory)
12529 (linux_read_auxv): Likewise.
12530 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12531 (check_mem_write): Likewise.
12532 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12533 Likewise.
12534 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12535 (registers_from_string, register_data): Likewise.
12536 * server.c (handle_query, main): Likewise.
12537 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12538 (decode_M_packet): Likewise.
12539 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12540 * target.h (struct target_ops): Update read_memory, write_memory,
12541 and read_auxv.
12542 (read_inferior_memory, write_inferior_memory): Update.
12543 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12544 to unsigned char *.
12545 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12546 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12547 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12548 linux-s390-low.c, linux-sh-low.c: Update for changes in
12549 read_inferior_memory and the_low_target->breakpoint.
12550
eee84df1
DJ
125512005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12552
12553 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12554 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12555 * configure.srv: Add powerpc64-*-linux*.
12556 * linux-ppc64-low.c: New file.
12557
45b134e5
OF
125582005-05-23 Orjan Friberg <orjanf@axis.com>
12559
12560 * linux-cris-low.c: New file with support for CRIS.
12561 * linux-crisv32-low.c: Ditto for CRISv32.
12562 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12563 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12564 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12565 reg-crisv32.o, and reg-crisv32.c to make rules.
12566 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12567 recognized targets.
12568
48d93c75
UW
125692005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12570
12571 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12572 of sizeof (PTRACE_XFER_TYPE).
12573 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12574
e013ee27
OF
125752005-05-12 Orjan Friberg <orjanf@axis.com>
12576
889bf7c5 12577 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12578 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12579 pointers for hardware watchpoint support.
12580 * linux-low.h (struct linux_target_ops): Ditto.
12581 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12582 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12583 to linux_target_ops.
12584 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12585 reply packet.
12586 * server.c (main): Recognize 'Z' and 'z' packets.
12587
b0ded00b
UW
125882005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12589
12590 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12591 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12592 (the_low_target): Add new members.
12593
8643e2ad
DJ
125942005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12595
12596 * proc-service.c (ps_lgetregs): Search all_processes instead of
12597 all_threads.
12598
fc620387
DJ
125992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12600
12601 * server.c (start_inferior): Change return type to int.
12602 (attach_inferior): Change sigptr to int *.
12603 (handle_v_cont, handle_v_requests): Change signal to int *.
12604 (main): Change signal to int.
12605
126062005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12607
12608 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12609 * configure.srv: Add m32r*-*-linux*.
12610 * linux-m32r-low.c: New file.
12611
e0e76420
DJ
126122005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12613
12614 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12615
a1928bad
DJ
126162005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12617
12618 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12619 Take unsigned long arguments for PIDs.
12620 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12621 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12622 (wait_for_sigstop, linux_resume_one_process)
12623 (regsets_fetch_inferior_registers, linux_send_signal)
12624 (linux_read_auxv): Likewise. Update the types of variables holding
12625 PIDs. Update format string specifiers.
12626 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12627 * remote-utils.c (prepare_resume_reply): Likewise.
12628 * server.c (cont_thread, general_thread, step_thread)
12629 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12630 unsigned long.
12631 (handle_query): Update format specifiers.
12632 (handle_v_cont, main): Use strtoul for thread IDs.
12633 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12634 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12635 (general_thread, step_thread, thread_from_wait)
12636 (old_thread_from_wait): Update.
12637 * target.h (struct thread_resume): Use unsigned long for THREAD.
12638 (struct target_ops): Use unsigned long for arguments to attach and
12639 thread_alive.
12640
dcdb98d2
DJ
126412005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12642
12643 * acinclude.m4: Include bfd/bfd.m4 directly.
12644 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12645 <agriffis@toolchain.org>.
12646 * aclocal.m4, configure: Regenerated.
12647
bec39cab
AC
126482005-01-07 Andrew Cagney <cagney@gnu.org>
12649
12650 * configure.ac: Rename configure.in, require autoconf 2.59.
12651 * configure: Re-generate.
12652
434c4c77
DJ
126532004-12-08 Daniel Jacobowitz <dan@debian.org>
12654
12655 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12656 LIBS when finished.
12657 * aclocal.m4: Regenerated.
12658 * configure: Regenerated.
12659
db1d3e1b
AS
126602004-11-21 Andreas Schwab <schwab@suse.de>
12661
12662 * linux-m68k-low.c (m68k_num_gregs): Define.
12663 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12664 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12665 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12666 (m68k_breakpoint_at): New. Add to the_low_target.
12667
12668 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12669 srv_linux_thread_db to yes.
12670
43360365
JB
126712004-10-20 Joel Brobecker <brobecker@gnat.com>
12672
12673 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12674 (ARCH_SET_FS): Likewise.
12675 (ARCH_GET_FS): Likewise.
12676 (ARCH_GET_GS): Likewise.
12677
fd500816
DJ
126782004-10-16 Daniel Jacobowitz <dan@debian.org>
12679
12680 * linux-i386-low.c (ps_get_thread_area): New.
12681 * linux-x86-64-low.c (ps_get_thread_area): New.
12682 * linux-low.c: Include <sys/syscall.h>.
12683 (linux_kill_one_process): Don't kill the first thread here.
12684 (linux_kill): Kill the first thread here.
12685 (kill_lwp): New function.
12686 (send_sigstop, linux_send_signal): Use it.
12687 * proc-service.c: Clean up #ifdefs.
12688 (fpregset_info): Delete.
12689 (ps_lgetregs): Update and enable implementation.
12690 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12691 implementations.
12692 * remote-utils.c (struct sym_cache, symbol_cache): New.
12693 (input_interrupt): Print a clearer message.
12694 (async_io_enabled): New variable.
12695 (enable_async_io, disable_async_io): Use it. Update comments.
12696 (look_up_one_symbol): Use the symbol cache.
12697 * thread-db.c (thread_db_look_up_symbols): New function.
12698 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12699
f6de3c42
DJ
127002004-10-16 Daniel Jacobowitz <dan@debian.org>
12701
12702 * configure.in: Test for -rdynamic.
12703 * configure: Regenerated.
12704 * Makefile (INTERNAL_LDFLAGS): New.
12705 (gdbserver, gdbreplay): Use it.
12706
2c0fc042
AC
127072004-09-02 Andrew Cagney <cagney@gnu.org>
12708
12709 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12710
075b3282
DJ
127112004-03-23 Daniel Jacobowitz <drow@mvista.com>
12712
12713 * linux-low.c (linux_wait): Clear all_processes list also.
12714
fa6a77dc
DJ
127152004-03-12 Daniel Jacobowitz <drow@mvista.com>
12716
12717 * linux-low.c: Include <errno.h>. Remove extern declaration of
12718 errno.
12719
6d782a97
DJ
127202004-03-12 Daniel Jacobowitz <drow@mvista.com>
12721
12722 * gdbreplay.c, server.h, utils.c: Update copyright years.
12723
3a7fb99b
DJ
127242004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12725
12726 * server.c (main): Print child status or termination signal from
12727 variable 'signal', not 'sig'.
12728
c3e735a6
DJ
127292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12730
12731 * linux-low.c (linux_read_memory): Change return type to
12732 int. Check for and return error from ptrace().
12733 * target.c (read_inferior_memory): Change return type to int. Pass
12734 back return status from the_target->read_memory().
12735 * target.h (struct target_ops): Adapt *read_memory() prototype.
12736 Update comment.
12737 (read_inferior_memory): Adapt prototype.
12738 * server.c (main): Return an error packet if
12739 read_inferior_memory() returns an error.
12740
a59d1c82
DJ
127412004-03-04 Daniel Jacobowitz <drow@mvista.com>
12742
12743 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12744 Unify with other clean targets.
12745
dc3f8883
DJ
127462004-02-29 Daniel Jacobowitz <drow@mvista.com>
12747
12748 * server.c (handle_v_cont): Call set_desired_inferior.
12749
89a208da
DJ
127502004-02-29 Daniel Jacobowitz <drow@mvista.com>
12751
12752 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12753
62ea82f5
DJ
127542004-02-29 Daniel Jacobowitz <drow@mvista.com>
12755
12756 * linux-low.c (linux_wait): Unblock async I/O.
12757 (linux_resume): Block and enable async I/O.
12758 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12759 * server.h (block_async_io, unblock_async_io): Add prototypes.
12760
6910d122
DJ
127612004-02-29 Daniel Jacobowitz <drow@mvista.com>
12762
12763 * remote-utils.c (remote_open): Print a status notice after
12764 opening a TCP port.
12765 * server.c (attach_inferior): Print a status notice after
12766 attaching.
12767
127682004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12769
12770 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12771
c89dc5d4
DJ
127722004-02-26 Daniel Jacobowitz <drow@mvista.com>
12773
12774 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12775 error packet.
12776 * server.c, target.h: Update copyright years.
12777
4b8dad4a
RM
127782004-02-25 Roland McGrath <roland@redhat.com>
12779
12780 * target.h (struct target_ops): New member `read_auxv'.
12781 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12782 * linux-low.c (linux_read_auxv): New function.
12783 (linux_target_ops): Initialize `read_auxv' member to that.
12784
d7446758
JB
127852004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12786
12787 Committed by Jim Blandy <jimb@redhat.com>.
12788
12789 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12790 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12791 instead of GPR_SIZE to distiguish s390 and s390x targets.
12792
5544ad89
DJ
127932004-01-31 Daniel Jacobowitz <drow@mvista.com>
12794
12795 * linux-low.c: Update copyright year.
12796 (check_removed_breakpoint): Clear pending_is_breakpoint.
12797 (linux_set_resume_request, linux_queue_one_thread)
12798 (resume_status_pending_p): New functions.
12799 (linux_continue_one_thread): Use process->resume.
12800 (linux_resume): Only resume threads if there are no pending events.
12801 * linux-low.h (struct process_info): Add resume request
12802 pointer.
12803
2a68b70e
DJ
128042004-01-30 Daniel Jacobowitz <drow@mvista.com>
12805
12806 * regcache.c (new_register_cache): Clear the allocated register
12807 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12808
64386c31
DJ
128092003-10-13 Daniel Jacobowitz <drow@mvista.com>
12810
12811 * linux-low.c (linux_resume): Take a struct thread_resume *
12812 argument.
12813 (linux_wait): Update call.
12814 (resume_ptr): New static variable.
12815 (linux_continue_one_thread): Renamed from
12816 linux_continue_one_process. Use resume_ptr.
12817 (linux_resume): Use linux_continue_one_thread.
12818 * server.c (handle_v_cont, handle_v_requests): New functions.
12819 (myresume): New function.
12820 (main): Handle 'v' case.
12821 * target.h (struct thread_resume): New type.
12822 (struct target_ops): Change argument of "resume" to struct
12823 thread_resume *.
12824 (myresume): Delete macro.
12825
c938e9b0
L
128262003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12827
12828 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12829 (uninstall): Support DESTDIR.
12830
7f313d07
BC
12831Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12832
12833 * configure.srv: Add xscale*linux copy of arm*linux entry.
12834
3b2fc2ea
DJ
128352003-07-24 Daniel Jacobowitz <drow@mvista.com>
12836
12837 * linux-arm-low.c (arm_reinsert_addr): New function.
12838 (the_low_target): Add arm_reinsert_addr.
12839
1c0a559e
MK
128402003-07-08 Mark Kettenis <kettenis@gnu.org>
12841
12842 * mem-break.c: Remove whitespace at end of file.
12843
43d5792c
DJ
128442003-06-28 Daniel Jacobowitz <drow@mvista.com>
12845
12846 * configure.in: Check whether we need to prototype strerror.
12847 * server.h: Optionally prototype strerror.
12848 * gdbreplay.c (perror_with_name): Use strerror.
12849 * linux-low.c (linux_attach_lwp): Use strerror.
12850 * utils.c (perror_with_name): Use strerror.
12851 * config.in, configure: Regenerated.
12852
c8a86edf
DJ
128532003-06-28 Daniel Jacobowitz <drow@mvista.com>
12854
12855 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12856 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12857
73d37363
DJ
128582003-06-20 Daniel Jacobowitz <drow@mvista.com>
12859
12860 * Makefile.in (SFILES): Update.
12861 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12862 low-sun3.c: Remove files.
12863
6ad8ae5c
DJ
128642003-06-17 Daniel Jacobowitz <drow@mvista.com>
12865
12866 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12867 (linux_detach_one_process, linux_detach): New functions.
12868 (linux_target_ops): Add linux_detach.
12869 * server.c (main): Handle 'D' packet.
12870 * target.h (struct target_ops): Add "detach" member.
12871 (detach_inferior): Define.
12872
1581182a
MK
128732003-06-13 Mark Kettenis <kettenis@gnu.org>
12874
12875 From Kelley Cook <kelleycook@wideopenwest.com>:
12876 * configure.srv: Accept i[34567]86 variants.
12877
e5379b03
DJ
128782003-06-05 Daniel Jacobowitz <drow@mvista.com>
12879
12880 * linux-low.c (linux_wait_for_event): Correct comment typos.
12881 (linux_resume_one_process): Call check_removed_breakpoint.
12882 (linux_send_signal): New function.
12883 (linux_target_ops): Add linux_send_signal.
12884 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12885 of kill.
12886 * target.h (struct target_ops): Add send_signal.
12887
2ff29de4
JB
128882003-05-29 Jim Blandy <jimb@redhat.com>
12889
12890 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12891 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12892 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12893 away part of the register's value.
12894
254787d4
DJ
128952003-03-26 Daniel Jacobowitz <drow@mvista.com>
12896
12897 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12898 (linux_wait_for_event, linux_init_signals): Likewise.
12899
94e10508
DJ
129002003-03-17 Daniel Jacobowitz <drow@mvista.com>
12901
12902 * configure.in: Check for stdlib.h.
12903 * configure: Regenerated.
12904 * config.in: Regenerated.
12905
4c0711e0
DJ
129062003-01-04 Andreas Schwab <schwab@suse.de>
12907
12908 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12909
ef66e766
AC
129102003-01-02 Andrew Cagney <ac131313@redhat.com>
12911
12912 * Makefile.in: Remove obsolete code.
12913
a1358604
DJ
129142002-11-20 Daniel Jacobowitz <drow@mvista.com>
12915
12916 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12917 defined(PT_FPR0_HI).
12918
23ce3b1c
DJ
129192002-11-17 Stuart Hughes <seh@zee2.com>
12920
12921 * linux-arm-low.c (arm_num_regs): Increase.
12922 (arm_regmap): Include status register.
12923
129242002-11-17 Daniel Jacobowitz <drow@mvista.com>
12925
12926 * linux-low.c (register_addr): Remove incorrect -1 check.
12927
a9fa9f7d
DJ
129282002-08-29 Daniel Jacobowitz <drow@mvista.com>
12929
12930 * linux-low.c (linux_create_inferior): Call setpgid. Return
12931 the new PID.
12932 (unstopped_p, linux_signal_pid): Remove.
12933 (linux_target_ops): Remove linux_signal_pid.
12934 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12935 global instead of target method.
12936 * target.h (struct target_ops): Remove signal_pid. Update comment
12937 for create_inferior.
12938 * server.c (signal_pid): New variable.
12939 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12940 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12941 (attach_inferior): Set signal_pid.
12942
17574093
DJ
129432002-08-23 Daniel Jacobowitz <drow@mvista.com>
12944
12945 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12946
129472002-08-20 Jim Blandy <jimb@redhat.com>
12948
12949 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12950 default for this.
12951
129522002-08-01 Andrew Cagney <cagney@redhat.com>
12953
12954 * Makefile.in: Make chill references obsolete.
12955
129562002-07-24 Kevin Buettner <kevinb@redhat.com>
12957
12958 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12959 * configure: Regenerate.
12960 * config.in: Regenerate.
12961
129622002-07-09 David O'Brien <obrien@FreeBSD.org>
12963
12964 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12965 (perror_with_name, remote_close, remote_open, expect, play): Static.
12966
129672002-07-04 Michal Ludvig <mludvig@suse.cz>
12968
4b8dad4a 12969 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12970 byte offsets instead of an array of indexes.
12971 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12972
129732002-06-13 Daniel Jacobowitz <drow@mvista.com>
12974
12975 * regcache.c: Add comment.
12976
129772002-06-11 Daniel Jacobowitz <drow@mvista.com>
12978
12979 * thread-db.c: New file.
12980 * proc-service.c: New file.
12981 * acinclude.m4: New file.
12982 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12983 proc-service.o, and thread-db.o.
12984 (linux-low.o): Add USE_THREAD_DB.
12985 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12986 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12987 * aclocal.m4: Regenerated.
12988 * config.in: Regenerated.
12989 * configure: Regenerated.
12990 * configure.in: Check for proc_service.h, sys/procfs.h,
12991 thread_db.h, and linux/elf.h headrs.
12992 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12993 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12994 Check for -lthread_db and thread support.
12995 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12996 PowerPC, and SuperH.
12997 * i387-fp.c: Constify arguments.
12998 * i387-fp.h: Likewise.
12999 * inferiors.c: (struct thread_info): Renamed from
13000 `struct inferior_info'. Remove PID member. Use generic inferior
13001 list header. All uses updated.
13002 (inferiors, signal_pid): Removed.
13003 (all_threads): New variable.
13004 (get_thread): Define.
13005 (add_inferior_to_list): New function.
13006 (for_each_inferior): New function.
13007 (change_inferior_id): New function.
13008 (add_inferior): Removed.
13009 (remove_inferior): New function.
13010 (add_thread): New function.
13011 (free_one_thread): New function.
13012 (remove_thread): New function.
13013 (clear_inferiors): Use for_each_inferior and free_one_thread.
13014 (find_inferior): New function.
13015 (find_inferior_id): New function.
13016 (inferior_target_data): Update argument type.
13017 (set_inferior_target_data): Likewise.
13018 (inferior_regcache_data): Likewise.
13019 (set_inferior_regcache_data): Likewise.
13020 * linux-low.c (linux_bp_reinsert): Remove.
13021 (all_processes, stopping_threads, using_thrads)
13022 (struct pending_signals, debug_threads, pid_of): New.
13023 (inferior_pid): Replace with macro.
13024 (struct inferior_linux_data): Remove.
13025 (get_stop_pc, add_process): New functions.
13026 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13027 Use add_process and add_thread.
13028 (linux_attach_lwp): New function, based on old linux_attach. Use
13029 add_process and add_thread. Set stop_expected for new threads.
13030 (linux_attach): New function.
13031 (linux_kill_one_process): New function.
13032 (linux_kill): Kill all LWPs.
13033 (linux_thread_alive): Use find_inferior_id.
13034 (check_removed_breakpoints, status_pending_p): New functions.
13035 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13036 Update. Use WNOHANG. Wait for cloned processes also. Update process
13037 struct for the found process.
13038 (linux_wait_for_event): New function.
13039 (linux_wait): Use it. Support LWPs.
13040 (send_sigstop, wait_for_sigstop, stop_all_processes)
13041 (linux_resume_one_process, linux_continue_one_process): New functions.
13042 (linux_resume): Support LWPs.
13043 (REGISTER_RAW_SIZE): Remove.
13044 (fetch_register): Use register_size instead. Call supply_register.
13045 (usr_store_inferior_registers): Likewise. Call collect_register.
13046 Fix recursive case.
13047 (regsets_fetch_inferior_registers): Improve error message.
13048 (regsets_store_inferior_registers): Add debugging.
13049 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13050 (unstopped_p, linux_signal_pid): New functions.
13051 (linux_target_ops): Add linux_signal_pid.
13052 (linux_init_signals): New function.
13053 (initialize_low): Call it. Initialize using_threads.
13054 * regcache.c (inferior_regcache_data): Add valid
13055 flag.
13056 (get_regcache): Fetch registers lazily. Add fetch argument
13057 and update all callers.
13058 (regcache_invalidate_one, regcache_invalidate): New
13059 functions.
13060 (new_register_cache): Renamed from create_register_cache.
13061 Return the new regcache.
13062 (free_register_cache): Change argument to a void *.
13063 (registers_to_string, registers_from_string): Call get_regcache
13064 with fetch flag set.
13065 (register_data): Make static. Pass fetch flag to get_regcache.
13066 (supply_register): Call get_regcache with fetch flag clear.
13067 (collect_register): Call get_regcache with fetch flag set.
13068 (collect_register_as_string): New function.
13069 * regcache.h: Update.
13070 * remote-utils.c (putpkt): Flush after debug output and use
13071 stderr.
13072 Handle input interrupts while waiting for an ACK.
13073 (input_interrupt): Use signal_pid method.
13074 (getpkt): Flush after debug output and use stderr.
13075 (outreg): Use collect_register_as_string.
13076 (new_thread_notify, dead_thread_notify): New functions.
13077 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13078 and general_thread.
13079 (look_up_one_symbol): Flush after debug output.
13080 * server.c (step_thread, server_waiting): New variables.
13081 (start_inferior): Don't use signal_pid. Update call to mywait.
13082 (attach_inferior): Update call to mywait.
13083 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13084 (main): Don't fetch/store registers explicitly. Use
13085 set_desired_inferior. Support proposed ``Hs'' packet. Update
13086 calls to mywait.
13087 * server.h: Update.
13088 (struct inferior_list, struct_inferior_list_entry): New.
13089 * target.c (set_desired_inferior): New.
13090 (write_inferior_memory): Constify.
13091 (mywait): New function.
13092 * target.h: Update.
13093 (struct target_ops): New signal_pid method.
13094 (mywait): Removed macro, added prototype.
13095
13096 * linux-low.h (regset_func): Removed.
13097 (regset_fill_func, regset_store_func): New.
13098 (enum regset_type): New.
13099 (struct regset_info): Add type field. Use new operation types.
13100 (struct linux_target_ops): stop_pc renamed to get_pc.
13101 Add decr_pc_after_break and breakpoint_at.
13102 (get_process, get_thread_proess, get_process_thread)
13103 (strut process_info, all_processes, linux_attach_lwp)
13104 (thread_db_init): New.
13105
13106 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13107 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13108 (the_low_target): Add new members.
13109 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13110 (i386_store_fpxregset): Constify.
13111 (target_regsets): Add new kind identifier.
13112 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13113 (i386_set_pc): Add debugging.
13114 (i386_breakpoint_at): New function.
13115 (the_low_target): Add new members.
13116 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13117 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13118 (mips_breakpoint_at): New.
13119 (the_low_target): Add new members.
13120 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13121 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13122 (the_low_target): Add new members.
13123 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13124 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13125 (the_low_target): Add new members.
13126 * linux-x86-64-low.c (target_regsets): Add new kind
13127 identifier.
13128
131292002-05-15 Daniel Jacobowitz <drow@mvista.com>
13130
13131 From Martin Pool <mbp@samba.org>:
13132 * server.c (gdbserver_usage): New function.
13133 (main): Call it.
13134
131352002-05-14 Daniel Jacobowitz <drow@mvista.com>
13136
13137 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13138 stop_at -> stop_pc.
13139
131402002-05-04 Andrew Cagney <ac131313@redhat.com>
13141
13142 * Makefile.in: Remove obsolete code.
13143
131442002-04-24 Michal Ludvig <mludvig@suse.cz>
13145
13146 * linux-low.c (regsets_fetch_inferior_registers),
13147 (regsets_store_inferior_registers): Removed cast to int from
13148 ptrace() calls.
13149 * regcache.h: Added declaration of struct inferior_info.
13150
131512002-04-20 Daniel Jacobowitz <drow@mvista.com>
13152
13153 * inferiors.c (struct inferior_info): Add regcache_data.
13154 (add_inferior): Call create_register_cache.
13155 (clear_inferiors): Call free_register_cache.
13156 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13157 * regcache.c (struct inferior_regcache_data): New.
13158 (registers): Remove.
13159 (get_regcache): New function.
13160 (create_register_cache, free_register_cache): New functions.
13161 (set_register_cache): Don't initialize the register cache here.
13162 (registers_to_string, registers_from_string, register_data): Call
13163 get_regcache.
13164 * regcache.h: Add prototypes.
13165 * server.h: Likewise.
13166
131672002-04-20 Daniel Jacobowitz <drow@mvista.com>
13168
13169 * mem-break.c: New file.
13170 * mem-break.h: New file.
13171 * Makefile.in: Add mem-break.o rule; update server.h
13172 dependencies.
13173 * inferiors.c (struct inferior_info): Add target_data
13174 member.
13175 (clear_inferiors): Free target_data member if set.
13176 (inferior_target_data, set_inferior_target_data): New functions.
13177 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13178 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13179 * linux-low.c (linux_bp_reinsert): New variable.
13180 (struct inferior_linux_data): New.
13181 (linux_create_inferior): Use set_inferior_target_data.
13182 (linux_attach): Likewise. Call add_inferior.
13183 (linux_wait_for_one_inferior): New function.
13184 (linux_wait): Call it.
13185 (linux_write_memory): Add const.
13186 (initialize_low): Call set_breakpoint_data.
13187 * linux-low.h (struct linux_target_ops): Add breakpoint
13188 handling members.
13189 * server.c (attach_inferior): Remove extra add_inferior
13190 call.
13191 * server.h: Include mem-break.h. Update inferior.c
13192 prototypes.
13193 * target.c (read_inferior_memory)
13194 (write_inferior_memory): New functions.
13195 * target.h (read_inferior_memory)
13196 (write_inferior_memory): Change macros to prototypes.
13197 (struct target_ops): Update comments. Add const to write_memory
13198 definition.
13199
132002002-04-11 Daniel Jacobowitz <drow@mvista.com>
13201
13202 * linux-low.c (usr_store_inferior_registers): Support
13203 registers which are allowed to fail to store.
13204 * linux-low.h (linux_target_ops): Likewise.
13205 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13206 (ppc_cannot_store_register): FPSCR may not be storable.
13207
132082002-04-09 Daniel Jacobowitz <drow@mvista.com>
13209
13210 * server.h: Include <string.h> if HAVE_STRING_H.
13211 * ChangeLog: Correct paths in last ChangeLog entry.
13212
132132002-04-09 Daniel Jacobowitz <drow@mvista.com>
13214
13215 * linux-low.h: Remove obsolete prototypes.
13216 (struct linux_target_ops): New.
13217 (extern the_low_target): New.
13218 * linux-low.c (num_regs, regmap): Remove declarations.
13219 (register_addr): Use the_low_target explicitly.
13220 (fetch_register): Likewise.
13221 (usr_fetch_inferior_registers): Likewise.
13222 (usr_store_inferior_registers): Likewise.
13223 * linux-arm-low.c (num_regs): Remove.
13224 (arm_num_regs): Define.
13225 (arm_regmap): Renamed from regmap, made static.
13226 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13227 made static.
13228 (arm_cannot_store_register): Renamed from cannot_store_register,
13229 made static.
13230 (the_low_target): New.
13231 * linux-i386-low.c (num_regs): Remove.
13232 (i386_num_regs): Define.
13233 (i386_regmap): Renamed from regmap, made static.
13234 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13235 made static.
13236 (i386_cannot_store_register): Renamed from cannot_store_register,
13237 made static.
13238 (the_low_target): New.
13239 * linux-ia64-low.c (num_regs): Remove.
13240 (ia64_num_regs): Define.
13241 (ia64_regmap): Renamed from regmap, made static.
13242 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13243 made static.
13244 (ia64_cannot_store_register): Renamed from cannot_store_register,
13245 made static.
13246 (the_low_target): New.
13247 * linux-m68k-low.c (num_regs): Remove.
13248 (m68k_num_regs): Define.
13249 (m68k_regmap): Renamed from regmap, made static.
13250 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13251 made static.
13252 (m68k_cannot_store_register): Renamed from cannot_store_register,
13253 made static.
13254 (the_low_target): New.
13255 * linux-mips-low.c (num_regs): Remove.
13256 (mips_num_regs): Define.
13257 (mips_regmap): Renamed from regmap, made static.
13258 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13259 made static.
13260 (mips_cannot_store_register): Renamed from cannot_store_register,
13261 made static.
13262 (the_low_target): New.
13263 * linux-ppc-low.c (num_regs): Remove.
13264 (ppc_num_regs): Define.
13265 (ppc_regmap): Renamed from regmap, made static.
13266 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13267 made static.
13268 (ppc_cannot_store_register): Renamed from cannot_store_register,
13269 made static.
13270 (the_low_target): New.
13271 * linux-s390-low.c (num_regs): Remove.
13272 (s390_num_regs): Define.
13273 (s390_regmap): Renamed from regmap, made static.
13274 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13275 made static.
13276 (s390_cannot_store_register): Renamed from cannot_store_register,
13277 made static.
13278 (the_low_target): New.
13279 * linux-sh-low.c (num_regs): Remove.
13280 (sh_num_regs): Define.
13281 (sh_regmap): Renamed from regmap, made static.
13282 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13283 made static.
13284 (sh_cannot_store_register): Renamed from cannot_store_register,
13285 made static.
13286 (the_low_target): New.
13287 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13288 (the_low_target): New.
13289
132902002-04-09 Daniel Jacobowitz <drow@mvista.com>
13291
13292 * Makefile.in: Add stamp-h target.
13293 * configure.in: Create stamp-h.
13294 * configure: Regenerated.
13295
132962002-04-09 Daniel Jacobowitz <drow@mvista.com>
13297
13298 * inferiors.c: New file.
13299 * target.c: New file.
13300 * target.h: New file.
13301 * Makefile.in: Add target.o and inferiors.o. Update
13302 dependencies.
13303 * linux-low.c (inferior_pid): New static variable,
13304 moved from server.c.
13305 (linux_create_inferior): Renamed from create_inferior.
13306 Call add_inferior. Return 0 on success instead of a PID.
13307 (linux_attach): Renamed from myattach.
13308 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13309 (linux_thread_alive): Renamed from mythread_alive.
13310 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13311 child dies.
13312 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13313 (regsets_store_inferior_registers): Correct error message.
13314 Add missing ``return 0''.
13315 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13316 (linux_store_registers): Renamed from store_inferior_registers.
13317 (linux_read_memory): Renamed from read_inferior_memory.
13318 (linux_write_memory): Renamed from write_inferior_memory.
13319 (linux_target_ops): New structure.
13320 (initialize_low): Call set_target_ops ().
13321 * remote-utils.c (unhexify): New function.
13322 (hexify): New function.
13323 (input_interrupt): Send signals to ``signal_pid''.
13324 * server.c (inferior_pid): Remove.
13325 (start_inferior): Update create_inferior call.
13326 (attach_inferior): Call add_inferior.
13327 (handle_query): New function.
13328 (main): Call handle_query for `q' packets.
13329 * server.h: Include "target.h". Remove obsolete prototypes.
13330 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13331
133322002-04-09 Daniel Jacobowitz <drow@mvista.com>
13333
13334 * Makefile.in: Add WARN_CFLAGS. Update configury
13335 dependencies.
13336 * configure.in: Check for <string.h>
13337 * configure: Regenerate.
13338 * config.in: Regenerate.
13339 * gdbreplay.c: Include needed system headers.
13340 (remote_open): Remove strchr prototype.
13341 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13342 * regcache.c (supply_register): Change buf argument to const void *.
13343 (supply_register_by_name): Likewise.
13344 (collect_register): Change buf argument to void *.
13345 (collect_register_by_name): Likewise.
13346 * regcache.h: Add missing prototypes.
13347 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13348 * server.c (handle_query): New function.
13349 (attached): New static variable, moved out of main.
13350 (main): Quiet longjmp clobber warnings.
13351 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13352 * utils.c (error): Remove NORETURN.
13353 (fatal): Likewise.